Home | Trees | Indices | Help |
|
---|
|
1 # $Id: loopback.py 38 2007-03-17 03:33:16Z dugsong $ 2 # -*- coding: utf-8 -*- 3 """Platform-dependent loopback header.""" 4 from __future__ import absolute_import 5 6 from . import dpkt 7 from . import ethernet 8 from . import ip 9 from . import ip6 10 1113 """Platform-dependent loopback header. 14 15 TODO: Longer class information.... 16 17 Attributes: 18 __hdr__: Header fields of Loopback. 19 TODO. 20 """ 21 22 __hdr__ = (('family', 'I', 0), ) 23 __byte_order__ = '@' 243626 dpkt.Packet.unpack(self, buf) 27 if self.family == 2: 28 self.data = ip.IP(self.data) 29 elif self.family == 0x02000000: 30 self.family = 2 31 self.data = ip.IP(self.data) 32 elif self.family in (24, 28, 30): 33 self.data = ip6.IP6(self.data) 34 elif self.family > 1500: 35 self.data = ethernet.Ethernet(self.data)
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Apr 29 23:17:55 2019 | http://epydoc.sourceforge.net |