pub struct SectionHeaderBlock<'a> {
pub block_type: u32,
pub block_len1: u32,
pub bom: u32,
pub major_version: u16,
pub minor_version: u16,
pub section_len: i64,
pub options: Vec<PcapNGOption<'a>>,
pub block_len2: u32,
}
Expand description
The Section Header Block (SHB) identifies the beginning of a section of the capture capture file.
The Section Header Block does not contain data but it rather identifies a list of blocks (interfaces, packets) that are logically correlated.
Fields§
§block_type: u32
§block_len1: u32
§bom: u32
Byte-order magic
major_version: u16
§minor_version: u16
§section_len: i64
§options: Vec<PcapNGOption<'a>>
§block_len2: u32
Implementations§
Source§impl SectionHeaderBlock<'_>
impl SectionHeaderBlock<'_>
pub fn big_endian(&self) -> bool
Sourcepub fn shb_hardware(&self) -> Option<Result<&str, PcapNGOptionError>>
pub fn shb_hardware(&self) -> Option<Result<&str, PcapNGOptionError>>
Return the shb_hardware
option value, if present
If the option is present multiple times, the first value is returned.
Returns None
if option is not present, Some(Ok(value))
if the value is present and valid,
or Some(Err(_))
if value is present but invalid
Sourcepub fn shb_os(&self) -> Option<Result<&str, PcapNGOptionError>>
pub fn shb_os(&self) -> Option<Result<&str, PcapNGOptionError>>
Return the shb_os
option value, if present
If the option is present multiple times, the first value is returned.
Returns None
if option is not present, Some(Ok(value))
if the value is present and valid,
or Some(Err(_))
if value is present but invalid
Sourcepub fn shb_userappl(&self) -> Option<Result<&str, PcapNGOptionError>>
pub fn shb_userappl(&self) -> Option<Result<&str, PcapNGOptionError>>
Return the shb_userappl
option value, if present
If the option is present multiple times, the first value is returned.
Returns None
if option is not present, Some(Ok(value))
if the value is present and valid,
or Some(Err(_))
if value is present but invalid