PACKET.TRANSPORT.TCP(1)

NAME
packet.transport.tcp - TCP module

DESCRIPTION
Decode TCP layer.

CLASSES

  class TCP(baseobj.BaseObj, packet.unpack.Unpack)
TCP object Usage:
    from packet.transport.tcp import TCP
    x = TCP(pktt, buffer) Object definition: TCP(
    src_port = int,
    dst_port = int,
    seq_number = int,
    seq = int, # relative sequence number
    ack_number = int,
    hl = int,
    header_size = int,
    window_size = int,
    checksum = int,
    urgent_ptr = int,
    flags_raw = int, # raw flags
    flags = Flags(
        FIN = int,
        SYN = int,
        RST = int,
        PSH = int,
        ACK = int,
        URG = int,
        ECE = int,
        CWR = int,
    ),
    options = string, # raw data of TCP options if available
    data = string, # raw data of payload if unable to decode )

Methods defined here:
---------------------

__init__(self, pktt, data)
    Constructor Initialize object's private data.

    pktt:
        Packet trace object (packet.pktt.Pktt) so this layer has access to the parent layers.

    data:
        Raw packet data for this layer.

__str__(self)
    String representation of object The representation depends on the verbose level set by debug_repr(). If set to 0 the generic object representation is returned. If set to 1 the representation of the object is condensed:
        'TCP 708 -> 2049, seq: 3294175829, ack: 3395739041, ACK,FIN' If set to 2 the representation of the object also includes the length of payload and a little bit more verbose:
        'src port 708 -> dst port 2049, seq: 3294175829, ack: 3395739041, len: 0, flags: ACK,FIN'

SEE ALSO
baseobj(1), packet.application.rpc(1), packet.unpack(1)

BUGS
No known bugs.

AUTHOR
Jorge Mora (mora@netapp.com)