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 -> aByteArray |
All the ICMP bytes, i.e. header and payload. Use this if you need to work with some of the ICMP message types that python-libtrace doesn't decode fully | |
payload | icmp.payload ->anIP for types 3, 4, 5, 11 and 12, otherwise aByteArray |
Most ICMP messages carry some content from the packet that triggered them; icmp.payload returns as much as it can of the triggering packet |
The content of an (IPv4) ICMP header varies depending on its type field. python-libtrace decodes the following types ...
Echo Request (type 8) and Echo Reply (type 0) | |
ident | icmp.echo.ident -> anInteger |
Echo identifier | |
sequence | icmp.echo.sequence -> anInteger |
Echo sequence number |
Redirect (type 5) | |
gateway | icmp.redirect.gateway -> anIPprefix |
Returns IPv4 address of the gateway |
Nevil Brownlee
Sat, 22 Oct 16 (NZDT)