[−][src]Module pcap_parser::pcapng
PCAPNG file format
See https://github.com/pcapng/pcapng for details.
There are 2 main ways of parsing a PCAPNG file. The first method is to use
parse_pcapng
. This method requires to load the entire
file to memory, and thus may not be good for large files.
The PcapNGCapture
implements the
Capture
trait to provide generic methods. However,
this trait also reads the entire file.
The second method is to loop over parse_block
and match the
result. The first block should be a Section header, then there should be one or more
interfaces, etc.
This can be used in a streaming parser.
Structs
Enums
Block | A block from a PcapNG file |
Constants
BOM_MAGIC | Byte Order magic |
CB_MAGIC | Custom Block magic |
DCB_MAGIC | Do-not-copy Custom Block magic |
DSB_MAGIC | Decryption Secrets Block magic |
EPB_MAGIC | Enhanced Packet Block magic |
IDB_MAGIC | Interface Description Block magic |
ISB_MAGIC | Interface Statistic Block magic |
NRB_MAGIC | Name Resolution Block magic |
SHB_MAGIC | Section Header Block magic |
SJE_MAGIC | Systemd Journal Export Block magic |
SPB_MAGIC | Simple Packet Block magic |