Class coroner.protocol.ip

Internet protocol version 4 packet dissector.

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

Tables

coroner.protocol.ip.proto IP protocol types.

Methods

coroner.protocol.ip:new (packet) Create a new object.
coroner.protocol.ip:parse () Parse the packet data.
coroner.protocol.ip:type () Get the module name.
coroner.protocol.ip:get_rawpacket () Get raw packet data uncapsulated in the IP packet data.
coroner.protocol.ip:set_packet (packet) Change or set new packet data.
coroner.protocol.ip:get_version () Get packet's IP address version.
coroner.protocol.ip:get_saddr () Get packet's source IP address.
coroner.protocol.ip:get_rawsaddr () Get packet's source IP address.
coroner.protocol.ip:get_daddr () Get packet's destination IP address.
coroner.protocol.ip:get_rawdaddr () Get packet's destination IP address.
coroner.protocol.ip:get_id () Get packet's ID.
coroner.protocol.ip:get_ttl () Get packet's TTL value.
coroner.protocol.ip:get_protocol () Get packet's protocol ID.
coroner.protocol.ip:get_length () Get packet's length.
coroner.protocol.ip:get_hdrlen () Get packet's header length.
coroner.protocol.ip:get_hdrchecksum () Get packet's header checksum.
coroner.protocol.ip:get_fragoffset () Get packet's fragment offset.
coroner.protocol.ip:get_error () Get last error message.


Tables

coroner.protocol.ip.proto
IP protocol types.

Fields:

  • IPPROTO_HOPOPT IPv6 Hop-by-Hop Option
  • IPPROTO_ICMP Internet Control Message Protocol
  • IPPROTO_IGMP Internet Group Management Protocol
  • IPPROTO_IPIP IP in IP (encapsulation)
  • IPPROTO_TCP Transmission Control Protocol
  • IPPROTO_EGP Exterior Gateway Protocol
  • IPPROTO_UDP User Datagram Protocol
  • IPPROTO_IPV6 IPv6 Encapsulation
  • IPPROTO_IPV6ROUTE Routing Header for IPv6
  • IPPROTO_IPV6FRAG Fragment Header for IPv6
  • IPPROTO_IPV6ICMP ICMP for IPv6
  • IPPROTO_IPV6NONXT No Next Header for IPv6
  • IPPROTO_IPV6DSTOPTS Destination Options for IPv6
  • IPPROTO_IPV6MOBHDR Mobility Extension Header for IPv6

See also:

Methods

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

Parameters:

  • packet string pass packet data as an opaque string

Returns:

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

Returns:

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

See also:

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

Returns:

    string Module name.
coroner.protocol.ip:get_rawpacket ()
Get raw packet data uncapsulated in the IP packet data.

Returns:

    string Raw packet data or an empty string.
coroner.protocol.ip:set_packet (packet)
Change or set new packet data.

Parameters:

  • packet string byte string of packet data
coroner.protocol.ip:get_version ()
Get packet's IP address version.

Returns:

    integer IP address version.
coroner.protocol.ip:get_saddr ()
Get packet's source IP address.

Returns:

    string IP address formatted as XXX.XXX.XXX.XXX string.
coroner.protocol.ip:get_rawsaddr ()
Get packet's source IP address.

Returns:

    string Byte string representing an IP address.
coroner.protocol.ip:get_daddr ()
Get packet's destination IP address.

Returns:

    string IP address formatted as XXX.XXX.XXX.XXX string.
coroner.protocol.ip:get_rawdaddr ()
Get packet's destination IP address.

Returns:

    string Byte string representing an IP address.
coroner.protocol.ip:get_id ()
Get packet's ID.

Returns:

    integer Packet ID.
coroner.protocol.ip:get_ttl ()
Get packet's TTL value.

Returns:

    integer Packet TTL value.
coroner.protocol.ip:get_protocol ()
Get packet's protocol ID.

Returns:

    integer A value representing a type of encapsulated data.

See also:

coroner.protocol.ip:get_length ()
Get packet's length.

Returns:

    integer Packet length.
coroner.protocol.ip:get_hdrlen ()
Get packet's header length.

Returns:

    integer Header length.
coroner.protocol.ip:get_hdrchecksum ()
Get packet's header checksum.

Returns:

    integer Header checksum.
coroner.protocol.ip:get_fragoffset ()
Get packet's fragment offset.

Returns:

    integer Fragment offset.
coroner.protocol.ip:get_error ()
Get last error message.

Returns:

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