]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
Fix ematch cmp and nbyte syntax help text.
authorLionel Elie Mamane <lionel@mamane.lu>
Fri, 12 Oct 2007 08:56:43 +0000 (10:56 +0200)
committerStephen Hemminger <shemminger@linux-foundation.org>
Fri, 12 Oct 2007 21:56:31 +0000 (14:56 -0700)
The help/usage screen of ematch cmp and nbyte say recognised symbolic
values for "layer FOO" are link, header and next-header, but the code
does _not_ implement that: it will recognise "next-header" as what is
supposed to be "header" and will not recognise "header". The right
symbolic values seem to be link, network, transport. Here is a patch
that changes the help/usage screen to match the code.
(http://bugs.debian.org/438653)

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
tc/em_cmp.c
tc/em_nbyte.c

index b8f9b467bc9f8ca5f09dce223f6d1d7de1d8110a..ce72a42918e376207032912fb570ae41d3be28d4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * em_cmp.c            Simle coparison Ematch
+ * em_cmp.c            Simple comparison Ematch
  *
  *             This program is free software; you can distribute it and/or
  *             modify it under the terms of the GNU General Public License
@@ -32,7 +32,7 @@ static void cmp_print_usage(FILE *fd)
            "Usage: cmp(ALIGN at OFFSET [ ATTRS ] { eq | lt | gt } VALUE)\n" \
            "where: ALIGN  := { u8 | u16 | u32 }\n" \
            "       ATTRS  := [ layer LAYER ] [ mask MASK ] [ trans ]\n" \
-           "       LAYER  := { link | header | next-header | 0..%d }\n" \
+           "       LAYER  := { link | network | transport | 0..%d }\n" \
            "\n" \
            "Example: cmp(u16 at 3 layer 2 mask 0xff00 gt 20)\n",
            TCF_LAYER_MAX);
index 98f988371ae02c4300a0c0c2a96ba12b2e8c2dcb..242c361ba912f1ce572c55c582daa882ff6896e5 100644 (file)
@@ -32,7 +32,7 @@ static void nbyte_print_usage(FILE *fd)
            "Usage: nbyte(NEEDLE at OFFSET [layer LAYER])\n" \
            "where: NEEDLE := { string | \"c-escape-sequence\" }\n" \
            "       OFFSET := int\n" \
-           "       LAYER  := { link | header | next-header | 0..%d }\n" \
+           "       LAYER  := { link | network | transport | 0..%d }\n" \
            "\n" \
            "Example: nbyte(\"ababa\" at 12 layer 1)\n",
            TCF_LAYER_MAX);