Package dpkt :: Module dhcp :: Class DHCP
[hide private]
[frames] | no frames]

Class DHCP

source code

object --+        
         |        
   ??.Temp --+    
             |    
   dpkt.Packet --+
                 |
                DHCP

Dynamic Host Configuration Protocol.

TODO: Longer class information....

Attributes:
    __hdr__: Header fields of DHCP.
    TODO.

Instance Methods [hide private]
 
__len__(self) source code
 
__bytes__(self) source code
 
pack_opts(self)
Return packed options string.
source code
 
unpack(self, buf)
Unpack packet header fields from buf, and set self.data.
source code

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

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

Class Variables [hide private]
  __hdr__ = (('op', 'B', 1), ('hrd', 'B', 1), ('hln', 'B', 6), (...
  opts = ((53, '\x01'), (55, '2\x03\x01\x06'))
  __hdr_defaults__ = {'chaddr': '\x00\x00\x00\x00\x00\x00\x00\x0...
  __hdr_fields__ = ['op', 'hrd', 'hln', 'hops', 'xid', 'secs', '...
  __hdr_fmt__ = '>BBBBIHHIIII16s64s128sI'
  __hdr_len__ = 240
Properties [hide private]
  chaddr
  ciaddr
  data
  file
  flags
  giaddr
  hln
  hops
  hrd
  magic
  op
  secs
  siaddr
  sname
  xid
  yiaddr

Inherited from object: __class__

Method Details [hide private]

__len__(self)
(Length operator)

source code 
Overrides: dpkt.Packet.__len__

__bytes__(self)

source code 
Overrides: dpkt.Packet.__bytes__

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:
(('op', 'B', 1),
 ('hrd', 'B', 1),
 ('hln', 'B', 6),
 ('hops', 'B', 0),
 ('xid', 'I', 3735928559),
 ('secs', 'H', 0),
 ('flags', 'H', 0),
 ('ciaddr', 'I', 0),
...

__hdr_defaults__

Value:
{'chaddr': '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x\
00\x00',
 'ciaddr': 0,
 'file': '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x\
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x\
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
...

__hdr_fields__

Value:
['op',
 'hrd',
 'hln',
 'hops',
 'xid',
 'secs',
 'flags',
 'ciaddr',
...