Class coroner.protocol.udp

User Datagram Protocol (UDP) packet dissector.

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

Methods

coroner.protocol.udp:new (packet) Create a new object.
coroner.protocol.udp:parse () Parse the packet data.
coroner.protocol.udp:type () Get the module name.
coroner.protocol.udp:get_data () Get data encapsulated in a packet.
coroner.protocol.udp:get_datalen () Get length of data encapsulated in a packet.
coroner.protocol.udp:set_packet (packet) Change or set new packet data.
coroner.protocol.udp:get_srcport () Get packet's source port.
coroner.protocol.udp:get_dstport () Get packet's destination port.
coroner.protocol.udp:get_length () Get packet's length.
coroner.protocol.udp:get_checksum () Get packet's checksum.
coroner.protocol.udp:get_error () Get last error message.


Methods

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

Parameters:

  • packet string byte string of packet data

Returns:

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

Returns:

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

See also:

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

Returns:

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

Returns:

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

Returns:

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

Parameters:

  • packet string byte string of packet data
coroner.protocol.udp:get_srcport ()
Get packet's source port.

Returns:

    integer Source port.
coroner.protocol.udp:get_dstport ()
Get packet's destination port.

Returns:

    integer Destination port.
coroner.protocol.udp:get_length ()
Get packet's length.

Returns:

    integer Packet length.
coroner.protocol.udp:get_checksum ()
Get packet's checksum.

Returns:

    integer Checksum.
coroner.protocol.udp:get_error ()
Get last error message.

Returns:

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