pub trait PcapNGPacketBlock {
// Required methods
fn big_endian(&self) -> bool;
fn orig_len(&self) -> u32;
fn raw_packet_data(&self) -> &[u8] ⓘ;
fn packet_data(&self) -> &[u8] ⓘ;
// Provided method
fn truncated(&self) -> bool { ... }
}
Expand description
Common methods for PcapNG Packet blocks
Required Methods§
Sourcefn big_endian(&self) -> bool
fn big_endian(&self) -> bool
Return true if block is encoded as big-endian
Sourcefn raw_packet_data(&self) -> &[u8] ⓘ
fn raw_packet_data(&self) -> &[u8] ⓘ
Return the raw captured packet data, with padding if present, and eventually truncated.
Sourcefn packet_data(&self) -> &[u8] ⓘ
fn packet_data(&self) -> &[u8] ⓘ
Return the captured packet data without padding
If packet was truncated, the truncated data field is returned.