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

Type Ethernet

object --+    
         |    
    Packet --+
             |
            Ethernet


Method Summary
  get_type(cls, t)
(Class method)
  set_type(cls, t, pktclass)
(Class method)
  unpack(self, buf)
Unpack packet header fields from buf, and set self.data.
  _unpack_data(self, buf)
    Inherited from Packet
  __init__(self, *args, **kwargs)
Packet constructor with ([buf], [field=val,...]) prototype.
  __getitem__(self, k)
  __len__(self)
  __repr__(self)
  __str__(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...

Class Variable Summary
tuple __hdr__ = (('dst', '6s', ''), ('src', '6s', ''), ('type'...
dict __hdr_defaults__ = {'src': '', 'dst': '', 'type': 2048}
list __hdr_fields__ = ['dst', 'src', 'type']
str __hdr_fmt__ = '>6s6sH'
int __hdr_len__ = 14                                                                    
dict _typesw = {2048: <class 'dpkt.ip.IP'>, 8192: <class 'dpk...

Instance Method Details

unpack(self, buf)

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

Class Variable Details

__hdr__

Type:
tuple
Value:
(('dst', '6s', ''), ('src', '6s', ''), ('type', 'H', 2048))            

__hdr_defaults__

Type:
dict
Value:
{'src': '', 'dst': '', 'type': 2048}                                   

__hdr_fields__

Type:
list
Value:
['dst', 'src', 'type']                                                 

__hdr_fmt__

Type:
str
Value:
'>6s6sH'                                                               

__hdr_len__

Type:
int
Value:
14                                                                    

_typesw

Type:
dict
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'>}                                    

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