Package dpkt :: Module tcp :: Class TCP
[hide private]
[frames] | no frames]

Class TCP

source code

 object --+    
          |    
dpkt.Packet --+
              |
             TCP

Nested Classes [hide private]

Inherited from dpkt.Packet: __metaclass__

Instance Methods [hide private]
 
_get_off(self) source code
 
_set_off(self, off) source code
 
__len__(self) source code
 
__str__(self)
str(x)
source code
 
unpack(self, buf)
Unpack packet header fields from buf, and set self.data.
source code

Inherited from dpkt.Packet: __getitem__, __init__, __repr__, pack, pack_hdr

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  __hdr__ = (('sport', 'H', 57005), ('dport', 'H', 0), ('seq', '...
  opts = ''
  __hdr_defaults__ = {'ack': 0, 'dport': 0, 'flags': 2, 'off_x2'...
  __hdr_fields__ = ['sport', 'dport', 'seq', 'ack', 'off_x2', 'f...
  __hdr_fmt__ = '>HHIIBBHHH'
  __hdr_len__ = 20
Properties [hide private]
  off
  ack
  data
  dport
  flags
  off_x2
  seq
  sport
  sum
  urp
  win

Inherited from object: __class__

Method Details [hide private]

__len__(self)
(Length operator)

source code 
Overrides: dpkt.Packet.__len__

__str__(self)
(Informal representation operator)

source code 
str(x)

Overrides: object.__str__
(inherited documentation)

unpack(self, buf)

source code 
Unpack packet header fields from buf, and set self.data.

Overrides: dpkt.Packet.unpack
(inherited documentation)

Class Variable Details [hide private]

__hdr__

Value:
(('sport', 'H', 57005),
 ('dport', 'H', 0),
 ('seq', 'I', 3735928559),
 ('ack', 'I', 0),
 ('off_x2', 'B', 80),
 ('flags', 'B', 2),
 ('win', 'H', 65535),
 ('sum', 'H', 0),
...

__hdr_defaults__

Value:
{'ack': 0,
 'dport': 0,
 'flags': 2,
 'off_x2': 80,
 'seq': 3735928559,
 'sport': 57005,
 'sum': 0,
 'urp': 0,
...

__hdr_fields__

Value:
['sport',
 'dport',
 'seq',
 'ack',
 'off_x2',
 'flags',
 'win',
 'sum',
...

Property Details [hide private]

off

Get Method:
_get_off(self)
Set Method:
_set_off(self, off)