Logo Search packages:      
Sourcecode: scapy version File versions  Download package

def scapy::PcapReader::read_packet (   self  ) 

return a single packet read from the file

returns None when no more packets are available

Definition at line 8010 of file scapy.py.

08010                          :
        """return a single packet read from the file
        
        returns None when no more packets are available
        """
        hdr = self.f.read(16)
        if len(hdr) < 16:
            return None
        sec,usec,caplen,olen = struct.unpack("IIII", hdr)
        p = self.LLcls(self.f.read(caplen))
        p.time = sec+0.000001*usec
        return p
      
    def dispatch(self, callback):


Generated by  Doxygen 1.6.0   Back to index