Trait PcapNGPacketBlock

Source
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§

Source

fn big_endian(&self) -> bool

Return true if block is encoded as big-endian

Source

fn orig_len(&self) -> u32

Return the original length of the packet

Source

fn raw_packet_data(&self) -> &[u8]

Return the raw captured packet data, with padding if present, and eventually truncated.

Source

fn packet_data(&self) -> &[u8]

Return the captured packet data without padding

If packet was truncated, the truncated data field is returned.

Provided Methods§

Source

fn truncated(&self) -> bool

Return true if block data was truncated (typically when snaplen < origlen)

Implementors§