Network Layer Decodes
Class ICMP
Provides access to fields in an (IPv4) ICMP header.
| Instance Variables |
| type |
icmp.type ->
anInteger |
|
ICMP message type |
| code |
icmp.code ->
anInteger |
|
ICMP message code |
| checksum |
icmp.checksum ->
anInteger |
|
ICMP checksum |
| data | icmp.data ->
aString |
| All the ICMP header bytes. Use this if you need to work with some of the ICMP message types that libtrace doesn't decode. |
The content of an (IPv4) ICMP header varies depending on its type field. libtrace decodes a few of the types as follows. [.un. in the following reflects the fact that libtrace uses a C union to describe the ICMP header].
| Echo Request (type 8) and Echo Reply (type 0) |
| id |
icmp.un.echo.id ->
anInteger |
|
Echo identifier |
| sequence |
icmp.un.sequence ->
anInteger |
|
Echo sequence number |
| Destination Unreachable (type 3) |
| frag_mtu |
icmp.un.frag.mtu ->
anInteger |
|
Returns the 'unreachable destination's' MTU |
| Redirect (type 5) |
| gateway |
icmp.un.gateway ->
anIPprefix |
|
Returns IPv4 address of the gateway |
Nevil Brownlee
Tue, 25 Mar 08 (PDT)