Package dpkt :: Module ethernet :: Class Ethernet
[hide private]
[frames] | no frames]

Class Ethernet

source code

 object --+    
          |    
dpkt.Packet --+
              |
             Ethernet

Nested Classes [hide private]

Inherited from dpkt.Packet: __metaclass__

Instance Methods [hide private]
 
_unpack_data(self, buf) source code
 
unpack(self, buf)
Unpack packet header fields from buf, and set self.data.
source code

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

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

Class Methods [hide private]
 
set_type(cls, t, pktclass) source code
 
get_type(cls, t) source code
Class Variables [hide private]
  __hdr__ = (('dst', '6s', ''), ('src', '6s', ''), ('type', 'H',...
  _typesw = {2048: <class 'dpkt.ip.IP'>, 2054: <class 'dpkt.arp....
  __hdr_defaults__ = {'dst': '', 'src': '', 'type': 2048}
  __hdr_fields__ = ['dst', 'src', 'type']
  __hdr_fmt__ = '>6s6sH'
  __hdr_len__ = 14
Properties [hide private]
  data
  dst
  src
  type

Inherited from object: __class__

Method Details [hide private]

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:
(('dst', '6s', ''), ('src', '6s', ''), ('type', 'H', 2048))

_typesw

Value:
{2048: <class 'dpkt.ip.IP'>,
 2054: <class 'dpkt.arp.ARP'>,
 8192: <class 'dpkt.cdp.CDP'>,
 8196: <class 'dpkt.dtp.DTP'>,
 33079: <class 'dpkt.ipx.IPX'>,
 34525: <class 'dpkt.ip6.IP6'>,
 34827: <class 'dpkt.ppp.PPP'>,
 34916: <class 'dpkt.pppoe.PPPoE'>,
...