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)
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)