pub trait PcapNGBlock {
    fn big_endian(&self) -> bool;
fn raw_data(&self) -> &[u8]Notable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8];
fn data_len(&self) -> usize;
fn data(&self) -> &[u8]Notable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8];
fn header_len(&self) -> usize; fn block_type(&self) -> u32 { ... }
fn block_length(&self) -> u32 { ... }
fn block_length2(&self) -> u32 { ... }
fn raw_header(&self) -> &[u8]Notable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8] { ... }
fn offset_options(&self) -> usize { ... }
fn raw_options(&self) -> &[u8]Notable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8] { ... } }
Expand description

Common methods for PcapNG blocks

Required methods

Returns true if block is encoded as big-endian

Raw block data (including header)

The length of inner data, if any

The inner data, if any

The Header length (without options)

Provided methods

The type of this block

The block length from the block header

The block length from the block footer

Raw packet header (without options)

Return the declared offset of options. Warning: the offset can be out of bounds, caller must test value before accessing data

Network packet options. Can be empty if packet does not contain options

Implementors