Class coroner.protocol.tcp

Transmission Control Protocol (TCP) packet dissector.

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

Methods

coroner.protocol.tcp:new (packet) Create a new object.
coroner.protocol.tcp:parse () Parse the packet data.
coroner.protocol.tcp:type () Get the module name.
coroner.protocol.tcp:get_data () Get data encapsulated in a packet.
coroner.protocol.tcp:get_datalen () Get length of data encapsulated in a packet.
coroner.protocol.tcp:set_packet (packet) Change or set new packet data.
coroner.protocol.tcp:get_srcport () Get packet's source port.
coroner.protocol.tcp:get_dstport () Get packet's destination port.
coroner.protocol.tcp:get_seqnum () Get packet's sequence number.
coroner.protocol.tcp:get_acknum () Get packet's acknowledgment number.
coroner.protocol.tcp:get_hdrlen () Get packet's header length.
coroner.protocol.tcp:get_flags () Get packet's flags.
coroner.protocol.tcp:get_rawflags () Get packet's flags.
coroner.protocol.tcp:isset_fin () Check if the FIN flag is set in a packet.
coroner.protocol.tcp:isset_syn () Check if the SYN flag is set in a packet.
coroner.protocol.tcp:isset_rst () Check if the RST flag is set in a packet.
coroner.protocol.tcp:isset_push () Check if the PSH flag is set in a packet.
coroner.protocol.tcp:isset_ack () Check if the ACK flag is set in a packet.
coroner.protocol.tcp:isset_urg () Check if the URGENT flag is set in a packet.
coroner.protocol.tcp:isset_echo () Check if the ECHO flag is set in a packet.
coroner.protocol.tcp:isset_cwr () Check if the CWR flag is set in a packet.
coroner.protocol.tcp:get_winsize () Get packet's window size.
coroner.protocol.tcp:get_checksum () Get packet's checksum.
coroner.protocol.tcp:get_urgpointer () Get packet's value of the urgent pointer.
coroner.protocol.tcp:get_error () Get last error message.


Methods

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

Parameters:

  • packet string byte string of packet data

Returns:

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

Returns:

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

See also:

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

Returns:

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

Returns:

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

Returns:

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

Parameters:

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

Returns:

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

Returns:

    integer Destination port.
coroner.protocol.tcp:get_seqnum ()
Get packet's sequence number.

Returns:

    integer Sequence number.
coroner.protocol.tcp:get_acknum ()
Get packet's acknowledgment number.

Returns:

    integer Acknowledgment number.
coroner.protocol.tcp:get_hdrlen ()
Get packet's header length.

Returns:

    integer Header length.
coroner.protocol.tcp:get_flags ()
Get packet's flags.

Returns:

    table Flags.
coroner.protocol.tcp:get_rawflags ()
Get packet's flags.

Returns:

    integer Flags.
coroner.protocol.tcp:isset_fin ()
Check if the FIN flag is set in a packet.

Returns:

    boolean True if flag is set, otherwise False.
coroner.protocol.tcp:isset_syn ()
Check if the SYN flag is set in a packet.

Returns:

    boolean True if flag is set, otherwise False.
coroner.protocol.tcp:isset_rst ()
Check if the RST flag is set in a packet.

Returns:

    boolean True if flag is set, otherwise False.
coroner.protocol.tcp:isset_push ()
Check if the PSH flag is set in a packet.

Returns:

    boolean True if flag is set, otherwise False.
coroner.protocol.tcp:isset_ack ()
Check if the ACK flag is set in a packet.

Returns:

    boolean True if flag is set, otherwise False.
coroner.protocol.tcp:isset_urg ()
Check if the URGENT flag is set in a packet.

Returns:

    boolean True if flag is set, otherwise False.
coroner.protocol.tcp:isset_echo ()
Check if the ECHO flag is set in a packet.

Returns:

    boolean True if flag is set, otherwise False.
coroner.protocol.tcp:isset_cwr ()
Check if the CWR flag is set in a packet.

Returns:

    boolean True if flag is set, otherwise False.
coroner.protocol.tcp:get_winsize ()
Get packet's window size.

Returns:

    integer Window size.
coroner.protocol.tcp:get_checksum ()
Get packet's checksum.

Returns:

    integer Checksum.
coroner.protocol.tcp:get_urgpointer ()
Get packet's value of the urgent pointer.

Returns:

    integer Urgent pointer.
coroner.protocol.tcp:get_error ()
Get last error message.

Returns:

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