[3e39d34] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[8c19ac9] | 7 | <!ENTITY libnl-download-http "https://github.com/thom311/libnl/releases/download/libnl&libnl-dl-version;/libnl-&libnl-version;.tar.gz">
|
---|
[3e39d34] | 8 | <!ENTITY libnl-download-ftp " ">
|
---|
[575e4c1] | 9 | <!ENTITY libnl-md5sum "86a4245274aae0a1cfdbd85ce88eede9">
|
---|
| 10 | <!ENTITY libnl-size "1.1 MB">
|
---|
| 11 | <!ENTITY libnl-buildsize "73 MB (with API documentation)">
|
---|
| 12 | <!ENTITY libnl-time "0.6 SBU (with API documentation)">
|
---|
[fad8db2] | 13 |
|
---|
| 14 |
|
---|
[8c19ac9] | 15 | <!ENTITY libnl-doc-download-http "https://github.com/thom311/libnl/releases/download/libnl&libnl-dl-version;/libnl-doc-&libnl-version;.tar.gz">
|
---|
[fad8db2] | 16 | <!ENTITY libnl-doc-download-ftp " ">
|
---|
[575e4c1] | 17 | <!ENTITY libnl-doc-md5sum "f97a293688f80bfa61753278f937e65b">
|
---|
| 18 | <!ENTITY libnl-doc-size "3.8 MB">
|
---|
[3e39d34] | 19 | ]>
|
---|
| 20 |
|
---|
| 21 | <sect1 id="libnl" xreflabel="libnl-&libnl-version;">
|
---|
| 22 | <?dbhtml filename="libnl.html"?>
|
---|
| 23 |
|
---|
| 24 | <title>libnl-&libnl-version;</title>
|
---|
| 25 |
|
---|
| 26 | <indexterm zone="libnl">
|
---|
| 27 | <primary sortas="a-libnl">libnl</primary>
|
---|
| 28 | </indexterm>
|
---|
| 29 |
|
---|
| 30 | <sect2 role="package">
|
---|
| 31 | <title>Introduction to libnl</title>
|
---|
| 32 |
|
---|
[c6ac193] | 33 | <para>
|
---|
| 34 | The <application>libnl</application> suite is a collection of libraries
|
---|
| 35 | providing APIs to netlink protocol based Linux kernel interfaces.
|
---|
| 36 | </para>
|
---|
[3e39d34] | 37 |
|
---|
[ed345e7] | 38 | &lfs120_checked;
|
---|
[3e39d34] | 39 |
|
---|
| 40 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 41 | <itemizedlist spacing="compact">
|
---|
| 42 | <listitem>
|
---|
[c6ac193] | 43 | <para>
|
---|
| 44 | Download (HTTP): <ulink url="&libnl-download-http;"/>
|
---|
| 45 | </para>
|
---|
[3e39d34] | 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
[c6ac193] | 48 | <para>
|
---|
| 49 | Download (FTP): <ulink url="&libnl-download-ftp;"/>
|
---|
| 50 | </para>
|
---|
[3e39d34] | 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
[c6ac193] | 53 | <para>
|
---|
| 54 | Download MD5 sum: &libnl-md5sum;
|
---|
| 55 | </para>
|
---|
[3e39d34] | 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
[c6ac193] | 58 | <para>
|
---|
| 59 | Download size: &libnl-size;
|
---|
| 60 | </para>
|
---|
[3e39d34] | 61 | </listitem>
|
---|
| 62 | <listitem>
|
---|
[c6ac193] | 63 | <para>
|
---|
| 64 | Estimated disk space required: &libnl-buildsize;
|
---|
| 65 | </para>
|
---|
[3e39d34] | 66 | </listitem>
|
---|
| 67 | <listitem>
|
---|
[c6ac193] | 68 | <para>
|
---|
| 69 | Estimated build time: &libnl-time;
|
---|
| 70 | </para>
|
---|
[3e39d34] | 71 | </listitem>
|
---|
| 72 | </itemizedlist>
|
---|
| 73 |
|
---|
[fad8db2] | 74 | <bridgehead renderas="sect3">Optional Download</bridgehead>
|
---|
| 75 | <itemizedlist spacing="compact">
|
---|
| 76 | <listitem>
|
---|
| 77 | <para>
|
---|
| 78 | Download (HTTP): <ulink url="&libnl-doc-download-http;"/>
|
---|
| 79 | </para>
|
---|
| 80 | </listitem>
|
---|
| 81 | <listitem>
|
---|
| 82 | <para>
|
---|
| 83 | Download (FTP): <ulink url="&libnl-doc-download-ftp;"/>
|
---|
| 84 | </para>
|
---|
| 85 | </listitem>
|
---|
| 86 | <listitem>
|
---|
| 87 | <para>
|
---|
| 88 | Download MD5 sum: &libnl-doc-md5sum;
|
---|
| 89 | </para>
|
---|
| 90 | </listitem>
|
---|
| 91 | <listitem>
|
---|
| 92 | <para>
|
---|
| 93 | Download size: &libnl-doc-size;
|
---|
| 94 | </para>
|
---|
| 95 | </listitem>
|
---|
| 96 | </itemizedlist>
|
---|
[987fb161] | 97 | <!--
|
---|
[60f67b92] | 98 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 99 | <itemizedlist spacing='compact'>
|
---|
| 100 | <listitem>
|
---|
| 101 | <para>
|
---|
| 102 | Optional patch: <ulink
|
---|
[b97d9f4] | 103 | url="&patch-root;/libnl-&libnl-version;-upstream_test_fix-1.patch"/>
|
---|
[60f67b92] | 104 | </para>
|
---|
| 105 | </listitem>
|
---|
| 106 | </itemizedlist>
|
---|
[987fb161] | 107 | -->
|
---|
[3e39d34] | 108 | </sect2>
|
---|
| 109 |
|
---|
| 110 | <sect2 role="installation">
|
---|
| 111 | <title>Installation of libnl</title>
|
---|
[8252f03f] | 112 | <!--
|
---|
[60f67b92] | 113 | <para>
|
---|
| 114 | If you are going to run the package tests apply this patch:
|
---|
| 115 | </para>
|
---|
| 116 |
|
---|
[15ebdfe] | 117 | <screen><userinput>patch -Np1 -i ../libnl-&libnl-version;-upstream_test_fix-1.patch
|
---|
| 118 | autoreconf -fi</userinput></screen>
|
---|
[8252f03f] | 119 | -->
|
---|
[c6ac193] | 120 | <para>
|
---|
| 121 | Install <application>libnl</application> by running the following
|
---|
| 122 | commands:
|
---|
| 123 | </para>
|
---|
[3e39d34] | 124 |
|
---|
[3e7d4c6] | 125 | <screen><userinput>./configure --prefix=/usr \
|
---|
[d61e48e3] | 126 | --sysconfdir=/etc \
|
---|
[fad8db2] | 127 | --disable-static &&
|
---|
[9c24d38] | 128 | make</userinput></screen>
|
---|
[3e39d34] | 129 |
|
---|
[b8fc37e] | 130 | <!-- "keyboard inputs not displayed at all" highly reproducible in
|
---|
| 131 | a QEMU VM with -j8 under Linux console. In xterm I've seen "all
|
---|
| 132 | texts blinking". I'd considered this caused by my CFLAGS, but
|
---|
| 133 | this time I've not deviated from the book at all. -->
|
---|
| 134 | <note>
|
---|
| 135 | <para>
|
---|
| 136 | If the <command>make</command> command was executed with
|
---|
| 137 | multiple parallel jobs enabled, it might disrupt the terminal mode
|
---|
| 138 | and cause some <quote>amusing</quote> visual effects. In the
|
---|
| 139 | worst case, this issue may cause keyboard inputs not
|
---|
| 140 | displayed on the screen at all (but you can still run any command
|
---|
| 141 | if you can type it correctly). Run the <command>reset</command>
|
---|
| 142 | to fix such an issue.
|
---|
| 143 | </para>
|
---|
| 144 | </note>
|
---|
| 145 |
|
---|
[c6ac193] | 146 | <para>
|
---|
[2dd6b6b] | 147 | If you wish to run the tests, check that the following options
|
---|
| 148 | are enabled in the kernel configuration and recompile the kernel
|
---|
| 149 | if necessary. Some of them may not be strictly needed, but they
|
---|
| 150 | should support a complete test coverage.
|
---|
| 151 | </para>
|
---|
| 152 |
|
---|
| 153 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 154 | href="libnl-test-kernel.xml"/>
|
---|
| 155 |
|
---|
| 156 | <para>
|
---|
| 157 | To test the results, issue: <command>make check</command>.
|
---|
[c6ac193] | 158 | </para>
|
---|
[3e39d34] | 159 |
|
---|
[c6ac193] | 160 | <para>
|
---|
| 161 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 162 | </para>
|
---|
[3e39d34] | 163 |
|
---|
| 164 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 165 |
|
---|
[fad8db2] | 166 | <para>
|
---|
[5fa1961] | 167 | If you wish to install the API documentation, as the
|
---|
[fad8db2] | 168 | <systemitem class="username">root</systemitem> user:
|
---|
| 169 | </para>
|
---|
| 170 |
|
---|
| 171 | <screen role="root"><userinput>mkdir -vp /usr/share/doc/libnl-&libnl-version; &&
|
---|
[8f79ce13] | 172 | tar -xf ../libnl-doc-&libnl-version;.tar.gz --strip-components=1 --no-same-owner \
|
---|
[d915944] | 173 | -C /usr/share/doc/libnl-&libnl-version;</userinput></screen>
|
---|
[fad8db2] | 174 |
|
---|
[3e39d34] | 175 | </sect2>
|
---|
| 176 |
|
---|
| 177 | <sect2 role="commands">
|
---|
| 178 | <title>Command Explanations</title>
|
---|
| 179 |
|
---|
[c6ac193] | 180 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 181 | href="../../xincludes/static-libraries.xml"/>
|
---|
| 182 |
|
---|
| 183 | <para>
|
---|
| 184 | <option>--disable-cli</option>: Use this parameter if you
|
---|
| 185 | don't want to install cli tools provided by the package.
|
---|
| 186 | </para>
|
---|
[3e39d34] | 187 |
|
---|
| 188 | </sect2>
|
---|
| 189 |
|
---|
| 190 | <sect2 role="content">
|
---|
| 191 | <title>Contents</title>
|
---|
| 192 |
|
---|
| 193 | <segmentedlist>
|
---|
| 194 | <segtitle>Installed Programs</segtitle>
|
---|
[d61e48e3] | 195 | <segtitle>Installed Libraries</segtitle>
|
---|
[3e39d34] | 196 | <segtitle>Installed Directories</segtitle>
|
---|
| 197 |
|
---|
| 198 | <seglistitem>
|
---|
[c6ac193] | 199 | <seg>
|
---|
[f3429309] | 200 | genl-ctrl-list,
|
---|
[d915944] | 201 | idiag-socket-details,
|
---|
[f3429309] | 202 | nl-class-add,
|
---|
| 203 | nl-class-delete,
|
---|
[d915944] | 204 | nl-classid-lookup,
|
---|
[f3429309] | 205 | nl-class-list,
|
---|
| 206 | nl-cls-add,
|
---|
| 207 | nl-cls-delete,
|
---|
| 208 | nl-cls-list,
|
---|
[d915944] | 209 | nl-link-list,
|
---|
[f3429309] | 210 | nl-pktloc-lookup,
|
---|
| 211 | nl-qdisc-add,
|
---|
[d915944] | 212 | nl-qdisc-delete,
|
---|
[a89a5a6] | 213 | nl-qdisc-list, and 48 other helper programs with nl- and nf- prefixes
|
---|
[c6ac193] | 214 | </seg>
|
---|
| 215 | <seg>
|
---|
[8b5b31b] | 216 | libnl-3.so,
|
---|
| 217 | libnl-cli-3.so,
|
---|
[91b65df] | 218 | libnl-genl-3.so,
|
---|
[9304e0a] | 219 | libnl-idiag-3.so,
|
---|
[8b5b31b] | 220 | libnl-nf-3.so,
|
---|
[f3429309] | 221 | libnl-route-3.so,
|
---|
[d915944] | 222 | libnl-xfrm-3.so, and
|
---|
[fad8db2] | 223 | cli modules under /usr/lib/libnl/cli tree
|
---|
[c6ac193] | 224 | </seg>
|
---|
[3e7d4c6] | 225 | <seg>
|
---|
[c6ac193] | 226 | /etc/libnl,
|
---|
[fad8db2] | 227 | /usr/include/libnl3,
|
---|
| 228 | /usr/lib/libnl, and
|
---|
| 229 | /usr/share/doc/libnl-&libnl-version;
|
---|
[c6ac193] | 230 | </seg>
|
---|
[3e39d34] | 231 | </seglistitem>
|
---|
| 232 | </segmentedlist>
|
---|
[c6ac193] | 233 |
|
---|
[3e39d34] | 234 | <variablelist>
|
---|
| 235 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 236 | <?dbfo list-presentation="list"?>
|
---|
| 237 | <?dbhtml list-presentation="table"?>
|
---|
| 238 |
|
---|
[6d772cc] | 239 | <varlistentry id="genl-ctrl-list">
|
---|
| 240 | <term><command>genl-ctrl-list</command></term>
|
---|
| 241 | <listitem>
|
---|
| 242 | <para>
|
---|
[bea508c] | 243 | queries the Generic Netlink controller in the kernel and prints
|
---|
[6d772cc] | 244 | a list of all registered Generic Netlink families including
|
---|
[4c24eb0a] | 245 | the version of the interface that has been registered
|
---|
[6d772cc] | 246 | </para>
|
---|
| 247 | <indexterm zone="libnl genl-ctrl-list">
|
---|
| 248 | <primary sortas="b-genl-ctrl-list">genl-ctrl-list</primary>
|
---|
| 249 | </indexterm>
|
---|
| 250 | </listitem>
|
---|
| 251 | </varlistentry>
|
---|
| 252 |
|
---|
| 253 | <varlistentry id="nl-class-add">
|
---|
| 254 | <term><command>nl-class-add</command></term>
|
---|
| 255 | <listitem>
|
---|
| 256 | <para>
|
---|
[bea508c] | 257 | adds, updates, or replaces Traffic Classes
|
---|
[6d772cc] | 258 | </para>
|
---|
| 259 | <indexterm zone="libnl nl-class-add">
|
---|
| 260 | <primary sortas="b-nl-class-add">nl-class-add</primary>
|
---|
| 261 | </indexterm>
|
---|
| 262 | </listitem>
|
---|
| 263 | </varlistentry>
|
---|
| 264 |
|
---|
| 265 | <varlistentry id="nl-class-delete">
|
---|
| 266 | <term><command>nl-class-delete</command></term>
|
---|
| 267 | <listitem>
|
---|
| 268 | <para>
|
---|
[bea508c] | 269 | deletes Traffic Classes
|
---|
[6d772cc] | 270 | </para>
|
---|
| 271 | <indexterm zone="libnl nl-class-delete">
|
---|
| 272 | <primary sortas="b-nl-class-delete">nl-class-delete</primary>
|
---|
| 273 | </indexterm>
|
---|
| 274 | </listitem>
|
---|
| 275 | </varlistentry>
|
---|
| 276 |
|
---|
| 277 | <varlistentry id="nl-classid-lookup">
|
---|
| 278 | <term><command>nl-classid-lookup</command></term>
|
---|
| 279 | <listitem>
|
---|
| 280 | <para>
|
---|
| 281 | is used to resolve qdisc/class names to classid values and vice
|
---|
[4c24eb0a] | 282 | versa
|
---|
[6d772cc] | 283 | </para>
|
---|
| 284 | <indexterm zone="libnl nl-classid-lookup">
|
---|
| 285 | <primary sortas="b-nl-classid-lookup">nl-classid-lookup</primary>
|
---|
| 286 | </indexterm>
|
---|
| 287 | </listitem>
|
---|
| 288 | </varlistentry>
|
---|
| 289 |
|
---|
| 290 | <varlistentry id="nl-class-list">
|
---|
| 291 | <term><command>nl-class-list</command></term>
|
---|
| 292 | <listitem>
|
---|
| 293 | <para>
|
---|
[4c24eb0a] | 294 | lists Traffic Classes
|
---|
[6d772cc] | 295 | </para>
|
---|
| 296 | <indexterm zone="libnl nl-class-list">
|
---|
| 297 | <primary sortas="b-nl-class-list">nl-class-list</primary>
|
---|
| 298 | </indexterm>
|
---|
| 299 | </listitem>
|
---|
| 300 | </varlistentry>
|
---|
| 301 |
|
---|
| 302 | <varlistentry id="nl-cls-add">
|
---|
| 303 | <term><command>nl-cls-add</command></term>
|
---|
| 304 | <listitem>
|
---|
| 305 | <para>
|
---|
[4c24eb0a] | 306 | adds a classifier
|
---|
[6d772cc] | 307 | </para>
|
---|
| 308 | <indexterm zone="libnl nl-cls-add">
|
---|
| 309 | <primary sortas="b-nl-cls-add">nl-cls-add</primary>
|
---|
| 310 | </indexterm>
|
---|
| 311 | </listitem>
|
---|
| 312 | </varlistentry>
|
---|
| 313 |
|
---|
| 314 | <varlistentry id="nl-cls-delete">
|
---|
| 315 | <term><command>nl-cls-delete</command></term>
|
---|
| 316 | <listitem>
|
---|
| 317 | <para>
|
---|
[4c24eb0a] | 318 | deletes a classifier
|
---|
[6d772cc] | 319 | </para>
|
---|
| 320 | <indexterm zone="libnl nl-cls-delete">
|
---|
| 321 | <primary sortas="b-nl-cls-delete">nl-cls-delete</primary>
|
---|
| 322 | </indexterm>
|
---|
| 323 | </listitem>
|
---|
| 324 | </varlistentry>
|
---|
| 325 |
|
---|
| 326 | <varlistentry id="nl-cls-list">
|
---|
| 327 | <term><command>nl-cls-list</command></term>
|
---|
| 328 | <listitem>
|
---|
| 329 | <para>
|
---|
[4c24eb0a] | 330 | lists classifiers
|
---|
[6d772cc] | 331 | </para>
|
---|
| 332 | <indexterm zone="libnl nl-cls-list">
|
---|
| 333 | <primary sortas="b-nl-cls-list">nl-cls-list</primary>
|
---|
| 334 | </indexterm>
|
---|
| 335 | </listitem>
|
---|
| 336 | </varlistentry>
|
---|
| 337 |
|
---|
| 338 | <varlistentry id="nl-link-list">
|
---|
| 339 | <term><command>nl-link-list</command></term>
|
---|
| 340 | <listitem>
|
---|
| 341 | <para>
|
---|
[4c24eb0a] | 342 | dumps link attributes
|
---|
[6d772cc] | 343 | </para>
|
---|
| 344 | <indexterm zone="libnl nl-link-list">
|
---|
| 345 | <primary sortas="b-nl-link-list">nl-link-list</primary>
|
---|
| 346 | </indexterm>
|
---|
| 347 | </listitem>
|
---|
| 348 | </varlistentry>
|
---|
| 349 |
|
---|
| 350 | <varlistentry id="nl-pktloc-lookup">
|
---|
| 351 | <term><command>nl-pktloc-lookup</command></term>
|
---|
| 352 | <listitem>
|
---|
| 353 | <para>
|
---|
[4c24eb0a] | 354 | allows the lookup of packet location definitions
|
---|
[6d772cc] | 355 | </para>
|
---|
| 356 | <indexterm zone="libnl nl-pktloc-lookup">
|
---|
| 357 | <primary sortas="b-nl-pktloc-lookup">nl-pktloc-lookup</primary>
|
---|
| 358 | </indexterm>
|
---|
| 359 | </listitem>
|
---|
| 360 | </varlistentry>
|
---|
| 361 |
|
---|
| 362 | <varlistentry id="nl-qdisc-add">
|
---|
| 363 | <term><command>nl-qdisc-add</command></term>
|
---|
| 364 | <listitem>
|
---|
| 365 | <para>
|
---|
[4c24eb0a] | 366 | adds queueing disciplines (qdiscs) in the kernel
|
---|
[6d772cc] | 367 | </para>
|
---|
| 368 | <indexterm zone="libnl nl-qdisc-add">
|
---|
| 369 | <primary sortas="b-nl-qdisc-add">nl-qdisc-add</primary>
|
---|
| 370 | </indexterm>
|
---|
| 371 | </listitem>
|
---|
| 372 | </varlistentry>
|
---|
| 373 |
|
---|
| 374 | <varlistentry id="nl-qdisc-delete">
|
---|
| 375 | <term><command>nl-qdisc-delete</command></term>
|
---|
| 376 | <listitem>
|
---|
| 377 | <para>
|
---|
[4c24eb0a] | 378 | deletes queueing disciplines (qdiscs) in the kernel
|
---|
[6d772cc] | 379 | </para>
|
---|
| 380 | <indexterm zone="libnl nl-qdisc-delete">
|
---|
| 381 | <primary sortas="b-nl-qdisc-delete">nl-qdisc-delete</primary>
|
---|
| 382 | </indexterm>
|
---|
| 383 | </listitem>
|
---|
| 384 | </varlistentry>
|
---|
| 385 |
|
---|
| 386 | <varlistentry id="nl-qdisc-list">
|
---|
| 387 | <term><command>nl-qdisc-list</command></term>
|
---|
| 388 | <listitem>
|
---|
| 389 | <para>
|
---|
[4c24eb0a] | 390 | lists queueing disciplines (qdiscs) in the kernel
|
---|
[6d772cc] | 391 | </para>
|
---|
| 392 | <indexterm zone="libnl nl-qdisc-list">
|
---|
| 393 | <primary sortas="b-nl-qdisc-list">nl-qdisc-list</primary>
|
---|
| 394 | </indexterm>
|
---|
| 395 | </listitem>
|
---|
| 396 | </varlistentry>
|
---|
| 397 |
|
---|
[3e39d34] | 398 | <varlistentry id="libnl-lib">
|
---|
[b7b6efc] | 399 | <term><filename class="libraryfile">libnl*-3.so</filename></term>
|
---|
[3e39d34] | 400 | <listitem>
|
---|
[c6ac193] | 401 | <para>
|
---|
| 402 | These libraries contain API functions used to access Netlink
|
---|
[4c24eb0a] | 403 | interfaces in Linux kernel
|
---|
[c6ac193] | 404 | </para>
|
---|
[3e39d34] | 405 | <indexterm zone="libnl libnl-lib">
|
---|
[c6ac193] | 406 | <primary sortas="c-libnl">libnl*-3.so</primary>
|
---|
[3e39d34] | 407 | </indexterm>
|
---|
| 408 | </listitem>
|
---|
| 409 | </varlistentry>
|
---|
| 410 |
|
---|
| 411 | </variablelist>
|
---|
[c6ac193] | 412 |
|
---|
[3e39d34] | 413 | </sect2>
|
---|
| 414 |
|
---|
| 415 | </sect1>
|
---|