From ae817ae0d56170b3c394d0b8709e2da83681fca4 Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Mon, 8 Feb 2016 08:01:54 +0200 Subject: trafgen: man: Add description for 'mpls()' function Add syntax & fields description for 'mpls()' function, also: 1) add line break for VLAN header notes 2) fix ip -> ipv4 in UDP echo example 3) consistent spelling of EtherType Signed-off-by: Vadim Kochan Signed-off-by: Tobias Klauser --- trafgen.8 | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/trafgen.8 b/trafgen.8 index 4a91d1f..871ee05 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=, tc|exp=, last=, ttl=) +.sp +.in +4 +.B label|lbl +- MPLS label value (default: 0) +.sp +.B tclass|tc|exp +- 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=, ptype=, op=, 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" } -- cgit v1.2.3-54-g00ecf