Package dpkt :: Module ip :: Class IP
[show private | hide private]
[frames | no frames]

Type IP

object --+    
         |    
    Packet --+
             |
            IP


Method Summary
  __len__(self)
  __str__(self)
  get_proto(cls, p)
(Class method)
  set_proto(cls, p, pktclass)
(Class method)
  unpack(self, buf)
Unpack packet header fields from buf, and set self.data.
  _get_hl(self)
  _get_v(self)
  _set_hl(self, hl)
  _set_v(self, v)
    Inherited from Packet
  __init__(self, *args, **kwargs)
Packet constructor with ([buf], [field=val,...]) prototype.
  __getitem__(self, k)
  __repr__(self)
  pack(self)
Return packed header + self.data string.
  pack_hdr(self)
Return packed header string.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name...
  __hash__(x)
x.__hash__() <==> hash(x)...
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle...
  __reduce_ex__(...)
helper for pickle...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value...

Property Summary
  hl
  v

Class Variable Summary
tuple __hdr__ = (('v_hl', 'B', 69), ('tos', 'B', 0), ('len', '...
dict __hdr_defaults__ = {'src': '\x00\x00\x00\x00', 'off': 0,...
list __hdr_fields__ = ['v_hl', 'tos', 'len', 'id', 'off', 'tt...
str __hdr_fmt__ = '>BBHHHBBH4s4s'
int __hdr_len__ = 20                                                                    
str opts = ''
dict _protosw = {0: <class 'dpkt.ip.IP'>, 1: <class 'dpkt.icm...

Instance Method Details

unpack(self, buf)

Unpack packet header fields from buf, and set self.data.
Overrides:
dpkt.dpkt.Packet.unpack (inherited documentation)

Property Details

hl

Get Method:
_get_hl(self)
Set Method:
_set_hl(self, hl)

v

Get Method:
_get_v(self)
Set Method:
_set_v(self, v)

Class Variable Details

__hdr__

Type:
tuple
Value:
(('v_hl', 'B', 69),
 ('tos', 'B', 0),
 ('len', 'H', 20),
 ('id', 'H', 0),
 ('off', 'H', 0),
 ('ttl', 'B', 64),
 ('p', 'B', 0),
 ('sum', 'H', 0),
...                                                                    

__hdr_defaults__

Type:
dict
Value:
{'dst': '\x00\x00\x00\x00',
 'id': 0,
 'len': 20,
 'off': 0,
 'p': 0,
 'src': '\x00\x00\x00\x00',
 'sum': 0,
 'tos': 0,
...                                                                    

__hdr_fields__

Type:
list
Value:
['v_hl', 'tos', 'len', 'id', 'off', 'ttl', 'p', 'sum', 'src', 'dst']   

__hdr_fmt__

Type:
str
Value:
'>BBHHHBBH4s4s'                                                        

__hdr_len__

Type:
int
Value:
20                                                                    

opts

Type:
str
Value:
''                                                                     

_protosw

Type:
dict
Value:
{0: <class 'dpkt.ip.IP'>,
 1: <class 'dpkt.icmp.ICMP'>,
 2: <class 'dpkt.igmp.IGMP'>,
 6: <class 'dpkt.tcp.TCP'>,
 17: <class 'dpkt.udp.UDP'>,
 41: <class 'dpkt.ip6.IP6'>,
 47: <class 'dpkt.gre.GRE'>,
 50: <class 'dpkt.esp.ESP'>,
...                                                                    

Generated by Epydoc 2.1 on Sun Oct 1 11:24:13 2006 http://epydoc.sf.net