(self, size=MTU)
return s,(sec,usec,wirelen)
return a single packet read from the file
        
        returns None when no more packets are available
return a single packet read from the file
        
        returns None when no more packets are available
return a single packet read from the file returns None when no more packets are available
def read_packet(self, size=MTU):
        """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,wirelen = struct.unpack(self.endian+"IIII", hdr)
        s = self.f.read(caplen)[:MTU]
        return s,(sec,usec,wirelen)
def read_packet ( self , size = MTU ) : hdr = self . f . read ( 16 ) if len ( hdr ) < 16 : return None sec , usec , caplen , wirelen = struct . unpack ( self . endian + "IIII" , hdr ) s = self . f . read ( caplen ) [ : MTU ] return s , ( sec , usec , wirelen )