Struct pcap_file::pcapng::blocks::section_header::SectionHeaderBlock
source · pub struct SectionHeaderBlock<'a> {
pub endianness: Endianness,
pub major_version: u16,
pub minor_version: u16,
pub section_length: i64,
pub options: Vec<SectionHeaderOption<'a>>,
}Expand description
Section Header Block: it defines the most important characteristics of the capture file.
Fields§
§endianness: EndiannessEndianness of the section.
major_version: u16Major version of the format. Current value is 1.
minor_version: u16Minor version of the format. Current value is 0.
section_length: i64Length in bytes of the following section excluding this block.
This block can be used to skip the section for faster navigation in large files. Length of -1i64 means that the length is unspecified.
options: Vec<SectionHeaderOption<'a>>Options
Implementations§
source§impl<'a> SectionHeaderBlock<'a>
impl<'a> SectionHeaderBlock<'a>
sourcepub fn into_owned(self) -> SectionHeaderBlock<'static>
pub fn into_owned(self) -> SectionHeaderBlock<'static>
Returns a version of self with all fields converted to owning versions.
Trait Implementations§
source§impl<'a> Clone for SectionHeaderBlock<'a>
impl<'a> Clone for SectionHeaderBlock<'a>
source§fn clone(&self) -> SectionHeaderBlock<'a>
fn clone(&self) -> SectionHeaderBlock<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<'a> Debug for SectionHeaderBlock<'a>
impl<'a> Debug for SectionHeaderBlock<'a>
source§impl Default for SectionHeaderBlock<'static>
impl Default for SectionHeaderBlock<'static>
source§impl<'a> PartialEq<SectionHeaderBlock<'a>> for SectionHeaderBlock<'a>
impl<'a> PartialEq<SectionHeaderBlock<'a>> for SectionHeaderBlock<'a>
source§fn eq(&self, other: &SectionHeaderBlock<'a>) -> bool
fn eq(&self, other: &SectionHeaderBlock<'a>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'a> PcapNgBlock<'a> for SectionHeaderBlock<'a>
impl<'a> PcapNgBlock<'a> for SectionHeaderBlock<'a>
source§fn from_slice<B: ByteOrder>(
slice: &'a [u8]
) -> Result<(&'a [u8], Self), PcapError>
fn from_slice<B: ByteOrder>(
slice: &'a [u8]
) -> Result<(&'a [u8], Self), PcapError>
Parse a new block from a slice
source§fn write_to<B: ByteOrder, W: Write>(&self, writer: &mut W) -> IoResult<usize>
fn write_to<B: ByteOrder, W: Write>(&self, writer: &mut W) -> IoResult<usize>
Write the content of a block into a writer
source§fn into_block(self) -> Block<'a>
fn into_block(self) -> Block<'a>
Convert a block into the
Block enumeration