Class coroner.protocol.icmp

Internet Control Message Protocol (ICMP) packet dissector.

This module is based on code adapted from nmap's nselib. See http://nmap.org/.

Tables

coroner.protocol.icmp.types ICMP message types.
coroner.protocol.icmp.codes ICMP message type codes.

Methods

coroner.protocol.icmp:new (packet) Create a new object.
coroner.protocol.icmp:parse () Parse the packet data.
coroner.protocol.icmp:type () Get the module name.
coroner.protocol.icmp:get_data () Get data encapsulated in a packet.
coroner.protocol.icmp:get_datalen () Get length of data encapsulated in a packet.
coroner.protocol.icmp:set_packet (packet) Change or set new packet data.
coroner.protocol.icmp:get_type () Get packet type.
coroner.protocol.icmp:get_code () Get packet code.
coroner.protocol.icmp:get_checksum () Get packet's checksum.
coroner.protocol.icmp:get_id () Get ICMP ECHO Request/Response ID.
coroner.protocol.icmp:get_seqnum () Get ICMP ECHO Request/Response sequence number.
coroner.protocol.icmp:get_type_str () Convert packet's type to the text representation (human readable format).
coroner.protocol.icmp:get_code_str () Convert packet's type and code to the text representation (human readable format).
coroner.protocol.icmp:get_error () Get last error message.


Tables

coroner.protocol.icmp.types
ICMP message types.

Fields:

  • ICMP_ECHOREPLY Echo reply
  • ICMP_DEST_UNREACH Destination unreachable
  • ICMP_SOURCE_QUENCH Source quench
  • ICMP_REDIRECT Redirect (change route)
  • ICMP_ECHO Echo request
  • ICMP_ROUTERADVERT Router advertisement
  • ICMP_ROUTERSOLICIT Router solicitation
  • ICMP_TIME_EXCEEDED Time exceeded
  • ICMP_PARAMPROB Parameter problem
  • ICMP_TIMESTAMP Timestamp request
  • ICMP_TIMESTAMPREPLY Timestamp reply
  • ICMP_INFO_REQUEST Information request
  • ICMP_INFO_REPLY Information reply
  • ICMP_ADDRESS Address Mask request
  • ICMP_ADDRESSREPLY Address Mask reply
  • ICMP_TRACEROUTE Traceroute
  • ICMP_CONVERR Conversion error
  • ICMP_DOMAIN Domain Name request
  • ICMP_DOMAINREPLY Domain Name reply
coroner.protocol.icmp.codes
ICMP message type codes.

Fields:

  • ICMP_NET_UNREACH Network unreachable
  • ICMP_HOST_UNREACH Host unreachable
  • ICMP_PROT_UNREACH Protocol unreachable
  • ICMP_PORT_UNREACH Port unreachable
  • ICMP_FRAG_NEEDED Packet fragmentation is required but the DF bit in the IP header is set
  • ICMP_SR_FAILED Source route failed
  • ICMP_NET_UNKNOWN Destination network unknown
  • ICMP_HOST_UNKNOWN Destination host unknown
  • ICMP_HOST_ISOLATED Source host isolated
  • ICMP_NET_ANO The destination network is administratively prohibited
  • ICMP_HOST_ANO The destination host is administratively prohibited
  • ICMP_NET_UNR_TOS The network is unreachable for TOS
  • ICMP_HOST_UNR_TOS The host is unreachable for TOS
  • ICMP_PKT_FILTERED Packet filtered
  • ICMP_PREC_VIOLATION Host precedence violation
  • ICMP_PREC_CUTOFF Precedence cutoff in effect
  • ICMP_ROUTERADVERT_NORMAL Normal router advertisement
  • ICMP_ROUTERADVERT_NROUTE Does not route common traffic
  • ICMP_REDIR_NET Network error
  • ICMP_REDIR_HOST Host error
  • ICMP_REDIR_NETTOS TOS and network error
  • ICMP_REDIR_HOSTTOS TOS and host error
  • ICMP_EXC_TTL Time to live exceeded during transit
  • ICMP_EXC_FRAGTIME Fragment reassembly timeout
  • ICMP_INVALIDIPHDR Invalid IP header
  • ICMP_OPTMISSING A required option is missing
  • ICMP_PKTFORWSUCCESS Outbound packet successfully forwarded
  • ICMP_PKTNOROUTE No route for outbound packet
  • ICMP_ERRUNKNOWN Unknown or unspecified error
  • ICMP_NOCONVERTOPT Don't convert option present
  • ICMP_UNKNOWNOPT Unknown mandatory option present
  • ICMP_KNOWNOPTNSUPPORTED Known unsupported option present
  • ICMP_NSUPPTRANSPROTO Unsupported transport protocol
  • ICMP_LENGTHEXC Overall length exceeded
  • ICMP_IPHDRLENGTHEXC IP header length exceeded
  • ICMP_TRANSPROTOEXC Transport protocol > 255
  • ICMP_PORTCONVOUTOFRANGE Port conversion out of range
  • ICMP_TRANSHDRLENGTEXC Transport header length exceeded
  • ICMP_ROLLOVERMISSING 32-bit rollover missing and ACK set
  • ICMP_TRANSOPTMISSING Unknown mandatory transport option present

Methods

coroner.protocol.icmp:new (packet)
Create a new object.

Parameters:

  • packet string byte string of packet data

Returns:

    table New icmp table.
coroner.protocol.icmp:parse ()
Parse the packet data.

Returns:

    boolean True on success, false on failure (error message is set).

See also:

coroner.protocol.icmp:type ()
Get the module name.

Returns:

    string Module name.
coroner.protocol.icmp:get_data ()
Get data encapsulated in a packet.

Returns:

    string Packet data or an empty string.
coroner.protocol.icmp:get_datalen ()
Get length of data encapsulated in a packet.

Returns:

    integer Data length.
coroner.protocol.icmp:set_packet (packet)
Change or set new packet data.

Parameters:

  • packet string byte string of packet data
coroner.protocol.icmp:get_type ()
Get packet type.

Returns:

    integer Packet type.

See also:

coroner.protocol.icmp:get_code ()
Get packet code.

Returns:

    integer Packet code.

See also:

coroner.protocol.icmp:get_checksum ()
Get packet's checksum.

Returns:

    integer Packet checksum.
coroner.protocol.icmp:get_id ()
Get ICMP ECHO Request/Response ID.

Returns:

    integer ID or nil.
coroner.protocol.icmp:get_seqnum ()
Get ICMP ECHO Request/Response sequence number.

Returns:

    integer Sequence number or nil.
coroner.protocol.icmp:get_type_str ()
Convert packet's type to the text representation (human readable format).

Returns:

    string Text or an empty string.

See also:

coroner.protocol.icmp:get_code_str ()
Convert packet's type and code to the text representation (human readable format).

Returns:

    string Message or an empty string, if combination of type and code does not exists.

See also:

coroner.protocol.icmp:get_error ()
Get last error message.

Returns:

    string Error message.
generated by LDoc 1.4.3 Last updated 2016-08-15 00:59:34