Ejemplo n.º 1
0
	def choose_pcap_packet(self,data,offset=None,size=None):
		if self.network.name=='ethernet':
			return ArrayAttr._c(dtype=PCapPacket._c(dtype=Ether))
		else: return ArrayAttr._c(dtype=PCapPacket)
Ejemplo n.º 2
0
 def choose_pcap_packet(self,data,offset=None,size=None):
     if self.network.name=='ieee802_15_4':
         return ArrayAttr._c(dtype=structx.ethernet.PCapPacket._c(dtype=IEEE802154Packet))
     else:
         return super(PCapFile, self).choose_pcap_packet(data, offset, size)