Class coroner.protocol.eth

Ethernet II frame dissector.

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

Tables

coroner.protocol.eth.ethertype EtherType constants.

Methods

coroner.protocol.eth:new (frame) Create a new object.
coroner.protocol.eth:parse () Parse frame data.
coroner.protocol.eth:type () Get the module name.
coroner.protocol.eth:get_rawpacket () Get raw packet data encapsulated in the frame data.
coroner.protocol.eth:set_frame (frame) Change or set new frame data.
coroner.protocol.eth:get_ethertype () Get EtherType value from the parsed content.
coroner.protocol.eth:get_saddr () Get source MAC address from the parsed content.
coroner.protocol.eth:get_daddr () Get destination MAC address from the parsed content.
coroner.protocol.eth:get_rawsaddr () Get source MAC address from the parsed content.
coroner.protocol.eth:get_rawdaddr () Get destination MAC address from the parsed content.
coroner.protocol.eth:get_error () Get last error message.


Tables

coroner.protocol.eth.ethertype
EtherType constants.

Fields:

  • ETHERTYPE_IP Internet Protocol version 4
  • ETHERTYPE_ARP Address Resolution Protocol
  • ETHERTYPE_IPV6 Internet Protocol version 6

See also:

Methods

coroner.protocol.eth:new (frame)
Create a new object.

Parameters:

  • frame string pass frame data as an opaque string

Returns:

    table New eth table.
coroner.protocol.eth:parse ()
Parse frame data.

Returns:

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

See also:

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

Returns:

    string Module name.
coroner.protocol.eth:get_rawpacket ()
Get raw packet data encapsulated in the frame data.

Returns:

    string Raw packet data or an empty string.
coroner.protocol.eth:set_frame (frame)
Change or set new frame data.

Parameters:

  • frame string pass frame data as an opaque string
coroner.protocol.eth:get_ethertype ()
Get EtherType value from the parsed content.

Returns:

    integer Value representing a type of encapsulated packet.

See also:

coroner.protocol.eth:get_saddr ()
Get source MAC address from the parsed content.

Returns:

    string MAC address formatted as xx:xx:xx:xx:xx:xx string.
coroner.protocol.eth:get_daddr ()
Get destination MAC address from the parsed content.

Returns:

    string MAC address formatted as xx:xx:xx:xx:xx:xx string.
coroner.protocol.eth:get_rawsaddr ()
Get source MAC address from the parsed content.

Returns:

    string Byte string representing a MAC address.
coroner.protocol.eth:get_rawdaddr ()
Get destination MAC address from the parsed content.

Returns:

    string Byte string representing a MAC address.
coroner.protocol.eth:get_error ()
Get last error message.

Returns:

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