summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2010-10-27 01:21:50 +0200
committerThomas Graf <tgraf@suug.ch>2010-10-27 01:21:50 +0200
commit65e386c8ba490d405f539322a12e1f1c7ea2eb5c (patch)
tree155a0dafacd32619123042f926a8d1638b28ed8b /man
parentb57a697ef1053a70264e9bedea3d2b98b8b24019 (diff)
downloadlibnl-65e386c8ba490d405f539322a12e1f1c7ea2eb5c.tar.gz
Packet location updates
This patch includes various bugfixes in the packet location parser. Namely it removes two memory leaks if parsing fails. The parser is correctly quit if an allocation error occurs and it is no longer possible to add duplicates. It removes the possibility to differ between net and host byteorder. This is better done in the actual classifiers as it makes more sense to specify this together with the value to compare against. The patch also extends the API to add new packet locations via rtnl_pktloc_add(). It introduces reference counting, therefore you now have to give back packet locations with rtnl_pktloc_put() after looking them up with rtnl_pktloc_lookup(). But you are allowed to keep using them if the packet location file has been reread. The packet location file now also understands "eth", "ip", and "tcp" for "link", "net", and "transport". A --list option has been added to nl-pktloc-lookup to list all packet location definitions A --u32=VALUE option has been added to let nl-pktloc-lookup print the definition in iproute2's u32 selector style. A manual page has been written for nl-pktloc-lookup. Finally, nl-pktloc-lookup has been made installable.
Diffstat (limited to 'man')
-rw-r--r--man/Makefile.am1
-rw-r--r--man/nl-pktloc-lookup.849
2 files changed, 50 insertions, 0 deletions
diff --git a/man/Makefile.am b/man/Makefile.am
index 5d628a4..afbef3f 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -2,4 +2,5 @@
dist_man8_MANS = \
nl-classid-lookup.8 \
+ nl-pktloc-lookup.8 \
nl-qdisc-add.8 nl-qdisc-delete.8 nl-qdisc-list.8
diff --git a/man/nl-pktloc-lookup.8 b/man/nl-pktloc-lookup.8
new file mode 100644
index 0000000..a583dcc
--- /dev/null
+++ b/man/nl-pktloc-lookup.8
@@ -0,0 +1,49 @@
+.TH nl\-pktloc-lookup 8 "27 October 2010" "libnl"
+.LO 1
+.SH NAME
+nl\-pktloc\-lookup - Lookup packet location definitions
+.SH SYNOPSIS
+.B nl\-pktloc\-lookup
+.I name
+.br
+.B nl\-pktloc\-lookup \-\-list
+
+.SH DESCRIPTION
+.PP
+nl\-pktloc\-lookup searches the packet location database for a matching
+entry. It is used to resolve packet location aliases to their definition,
+i.e. alignment, layer, offset, and mask.
+
+.SH OPTIONS
+.TP
+.BR \-\^h " or " \-\-help
+Print help text to console and exit.
+.TP
+.BR \-\^v " or " \-\-version
+Print versioning information to console and exit.
+.TP
+.BR \-\^l " or " \-\-list
+List all packet location definitions.
+.TP
+.BR \-\-u32=VALUE
+Prints the packet location definition in a special format that is
+understood by iproute2's u32 selector parser. It will output a
+u32 selector which will compare the provided value with the value
+specified by the packet location.
+
+Please note that due to the limitation of u32, it is not possible
+to use packet locations based on the link layer. nl-pktloc-lookup
+will print an error message in this case.
+
+Example:
+ selector=$(nl-pktloc-lookup --u32 22 tcp.sport)
+ tc filter add [...] u32 match $(selector) flowid 1:2
+
+.SH FILES
+.PP
+/etc/libnl/pktloc
+
+.SH AUTHOR
+.PP
+Thomas Graf is the original author and current maintainer of libnl and
+libnl tools. Many people have contributed to it since.