Expand description
Pcapng parser and serializer.
The reference document is the pcapng RFC.
Modules§
- compile
- Module for compiling pcap filters using libpcap.
Structs§
- Enhanced
Packet Block Header - An Enhanced Packet Block structure for serialization as defined in pcapng RFC Section 4.3.
- Interface
Description Block Header - An Interface Description Block structure for serialization as defined in pcapng RFC Section 4.2.
- Option
Header - An option header structure for serialization.
- Parsed
Enhanced Packet - A parsed Enhanced Packet Block as defined in pcapng RFC Section 4.3.
- Parsed
Interface Description - A parsed Interface Description Block as defined in pcapng RFC Section 4.2.
- Parsed
Interface Description Options - Options parsed from an Interface Description Block as defined in pcapng RFC Section 4.2.
- Parsed
Section Header - A parsed Section Header Block as defined in pcapng RFC Section 4.1.
- Pcap
NgPacket Iter - An iterator over Enhanced Packet Blocks in a pcapng section as defined in pcapng RFC Section 4.3.
- Pcap
NgSection - A parsed pcapng section.
- Section
Header Block - A Section Header Block structure for serialization as defined in pcapng RFC Section 4.1.
Enums§
- Block
Type - Pcapng block type.
- Interface
Description Option - Interface Description Block options.
- Interface
Description Option Code - Option codes specific to Interface Description Blocks.
- Link
Type - Link type of an interface.
- Parsing
Error - Errors that can occur while parsing a pcapng file.
Constants§
- BLOCK_
LEN_ FOOTER_ SIZE - The size of the block length footer that appears in all pcapng blocks.
- UNSPECIFIED_
SECTION_ SIZE - According to pcapng RFC Section 4.1:
Traits§
- Pcap
NgBlock - A trait for types that represent a pcapng block.
Functions§
- parse_
pcapng - Parses a pcapng file from a byte slice.
- write_
enhanced_ packet_ block - Writes an Enhanced Packet Block.
- write_
if_ name_ option - Writes a single if_name option.
- write_
interface_ description_ block - Write an interface description block with an interface name option.
- write_
prelude - Writes a Section Header Block and an Interface Description Block.