Add description icmpv4() function parameters with few examples.

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

diff --git a/trafgen.8 b/trafgen.8
index 6691e16..6be6f1c 100644
--- a/trafgen.8
+++ b/trafgen.8
@@ -498,6 +498,124 @@ By default, if the lower level header is Ethernet, its 
EtherType field is set to
 By default, if the lower level header is Ethernet, its EtherType field is set 
to
 0x86DD (IPv6).
 
+.I ICMPv4
+:
+.B icmp4|icmpv4(type=<number>, code=<number>, csum=<number>,
+.B mtu=<number>, seq=<number>, id=<number>, addr=<ip4_addr>, net-unreach,
+.B host-unreach, prot-unreach, port-unreach, net-tos-unreach, host-tos-unreach,
+.B frag-needed, route-failed, net-unknown, host-unknown, host-isolated,
+.B net-forbidden, host-forbidden, pkt-filtered, net-redirect, host-redirect,
+.B net-tos-redirect, host-tos-redirect, ttl-timeout, frag-timeout)
+.sp
+.in +4
+.B type
+- ICMP message type (default: 0 - Echo reply)
+.sp
+.B code
+- ICMP message code (default: 0)
+.sp
+.B csum
+- Checksum of ICMP header and payload (default: calculated)
+.sp
+.B mtu
+- MTU field used in 'Datagram is too big' message type (default; 0)
+.sp
+.B seq
+- Sequence number - used in Echo/Timestamp/Address mask messages (default: 0)
+.sp
+.B id
+- Identifier - used in Echo/Timestamp/Address mask messages (default: 0)
+.sp
+.B addr
+- IPv4 address - used in Redirect messages (default: 0.0.0.0)
+.sp
+.B net-unreach
+- Sets 'Network unreachable error' message type (type: 3, code: 0)
+.sp
+.B host-unreach
+- Sets 'Host unreachable error' message type (type: 3, code: 1)
+.sp
+.B prot-unreach
+- Sets 'Protocol unreachable error' message type (type: 3, code: 2)
+.sp
+.B port-unreach
+- Sets 'Port unreachable error' message type (type: 3, code: 3)
+.sp
+.B frag-needed
+- Sets 'Datagram is too big' message type (type: 3, code: 4)
+.sp
+.B route-failed
+- Sets 'Source route is failed' message type (type: 3, code: 5)
+.sp
+.B net-unknown
+- Sets 'Destination network unknown error' message type (type: 3, code: 6)
+.sp
+.B host-unknown
+- Sets 'Destination host unknown error' message type (type: 3, code: 7)
+.sp
+.B host-isolated
+- Sets 'Source host is isolated' message type (type: 3, code: 8)
+.sp
+.B net-forbidden
+- Sets 'Destination network is administratively prohibited' message type 
(type: 3, code: 9)
+.sp
+.B host-forbidden
+- Sets 'Destination host is administratively prohibited' message type (type: 
3, code: 10)
+.sp
+.B net-tos-unreach
+- Sets 'Network is unreachable for Type Of Service' message type (type: 3, 
code: 11)
+.sp
+.B host-tos-unreach
+- Sets 'Host is unreachable for Type Of Service' message type (type: 3, code: 
12)
+.sp
+.B pkt-filterered
+- Sets 'Packet is filtered' message type (type: 3, code: 13)
+.sp
+.B net-redirect
+- Sets 'Redirect for network' message type (type: 5, code: 0)
+.sp
+.B host-redirect
+- Sets 'Redirect for host' message type (type: 5, code: 1)
+.sp
+.B net-tos-redirect
+- Sets 'Redirect for Type Of Service and network' message type (type: 5, code: 
2)
+.sp
+.B host-tos-redirect
+- Sets 'Redirect for Type Of Service and host' message type (type: 5, code: 3)
+.sp
+.B ttl-timeout
+- Sets 'Time-to-live exceeded in transit' message type (type: 11, code: 0)
+.sp
+.B frag-timeout
+- Sets 'Fragment reassembly time exceeded' message type (type: 11, code: 1)
+.sp
+.B echo-request
+- Sets 'Echo request' message type (type: 8, code: 0)
+.sp
+.B echo-reply
+- Sets 'Echo reply' message type (type: 0, code: 0)
+.sp
+Examples:
+.in +4
+.sp
+1) Send ping request:
+.sp
+{ icmpv4(echo-request, seq=1, id=1326) }
+.sp
+2) Send 'Host Unreachable' message with IPv4 header as payload:
+.sp
+{
+.in +4
+icmpv4(host-unreach),
+.sp
+ipv4()
+.in -4
+}
+.sp
+.in -4
+
+.in -4
+
 .I ICMPv6
 :
 .B icmp6|icmpv6(type=<number>, echo-request, echo-reply, code=<number>,
-- 
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