Add syntax & fields description for 'mpls()' function,
also:

        1) add line break for VLAN header notes

        2) fixed ip -> ipv4 in UDP echo example

Signed-off-by: Vadim Kochan <vadi...@gmail.com>
---
 trafgen.8 | 29 +++++++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/trafgen.8 b/trafgen.8
index 4a91d1f..ebb5beb 100644
--- a/trafgen.8
+++ b/trafgen.8
@@ -334,8 +334,33 @@ Supported protocol headers:
 - Set 802.1ad header (TPID: 0x88a8)
 .sp
 .in -4
-By default, if the lower level header is Ethernet, its Ethertype is set to
+By default, if the lower level header is Ethernet, its EtherType is set to
 0x8100 (802.1q).
+.sp
+
+.I MPLS
+:
+.B mpls(label=<number>, tc=<number>, last=<number>, ttl=<number>)
+.sp
+.in +4
+.B label|lbl
+- MPLS label value (default: 0)
+.sp
+.B tclass|tc
+- Traffic Class for QoS field (default: 0)
+.sp
+.B last
+- Bottom of stack S-flag (default: 1 for most last label)
+.sp
+.B ttl
+- Time To Live (TTL) (default: 0)
+.sp
+.in -4
+By default, if the lower level header is Ethernet, its EtherType is set to
+0x8847 (MPLS Unicast). S-flag is set automatically to 1 for the last label and
+resets to 0 if the lower MPLS label was added after.
+.sp
+
 .I ARP
 :
 .B arp(htype=<number>, ptype=<number>, op=<request|reply|number>, request,
@@ -521,7 +546,7 @@ Simple example of a UDP Echo packet:
 .in +5
    {
      eth(da=11:22:33:44:55:66),
-     ip(daddr=1.2.3.4)
+     ipv4(daddr=1.2.3.4)
      udp(dp=7),
      "Hello world"
    }
-- 
2.6.3

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netsniff-ng+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to