wltrace.pcap module¶
Pcap file parser.
-
class
wltrace.pcap.
PcapCapture
(path, *args, **kwargs)[source]¶ Bases:
wltrace.common.WlTrace
Represent a Pcap packet trace.
Currently only support two link types.
-
LINKTYPES
= [105, 127]¶
-
-
exception
wltrace.pcap.
PcapException
[source]¶ Bases:
exceptions.Exception
-
class
wltrace.pcap.
PcapHeader
(fh, *args, **kwargs)[source]¶ Bases:
wltrace.common.GenericHeader
Pcap file header.
The format is documented here: https://wiki.wireshark.org/Development/LibpcapFileFormat
Note that the file header does not contain the total number of packets in the file.
Parameters: fh (file object) – the packet trace file. -
FIELDS
= ['magic_number', 'version_major', 'version_minor', 'thiszone', 'sigfigs', 'snaplen', 'network']¶
-