Struct pcap_file::pcap_header::PcapHeader
[−]
[src]
pub struct PcapHeader { pub magic_number: u32, pub version_major: u16, pub version_minor: u16, pub ts_correction: i32, pub ts_accuracy: u32, pub snaplen: u32, pub datalink: Datalink, }
Struct that represent the global Pcap header of a Pcap file
Fields
magic_number: u32
Magic number
version_major: u16
Major version number
version_minor: u16
Minor version number
ts_correction: i32
GMT to local timezone correction
ts_accuracy: u32
Timestamp accuracy
snaplen: u32
Max length of captured packet
datalink: Datalink
Datalink type (first layer in the packet (u32))
Methods
impl PcapHeader
[src]
fn from_reader<R: Read>(reader: &mut R) -> ResultChain<PcapHeader>
fn to_array<B: ByteOrder>(&self) -> ResultChain<Vec<u8>>
Convert the PcapHeader
to a slice of bytes.
Trait Implementations
impl Copy for PcapHeader
[src]
impl Clone for PcapHeader
[src]
fn clone(&self) -> PcapHeader
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more