Package killerbee :: Module pcapdump :: Class PcapReader
[hide private]
[frames] | no frames]

Class PcapReader

source code

Instance Methods [hide private]
None
__init__(self, savefile)
Opens the specified file, validates a libpcap header is present.
source code
Int
datalink(self)
Returns the data link type for the packet capture.
source code
None
close(self)
Closes the output packet capture; wrapper for pcap_close().
source code
None
pcap_close(self)
Closes the output packet capture.
source code
 
pnext(self)
Wrapper for pcap_next to mimic method for Daintree SNA.
source code
List
pcap_next(self)
Retrieves the next packet from the capture file.
source code
Method Details [hide private]

__init__(self, savefile)
(Constructor)

source code 

Opens the specified file, validates a libpcap header is present.

Parameters:
  • savefile (String) - Input libpcap filename to open
Returns: None

pnext(self)

source code 

Wrapper for pcap_next to mimic method for Daintree SNA. See pcap_next()

pcap_next(self)

source code 

Retrieves the next packet from the capture file. Returns a list of [Hdr, packet] where Hdr is a list of [timestamp, snaplen, plen] and packet is a string of the payload content. Returns None at the end of the packet capture.

Returns: List