[][src]Struct pcap_parser::pcap::PcapHeader

pub struct PcapHeader {
    pub magic_number: u32,
    pub version_major: u16,
    pub version_minor: u16,
    pub thiszone: i32,
    pub sigfigs: u32,
    pub snaplen: u32,
    pub network: Linktype,
}

PCAP global header

Fields

magic_number: u32

File format and byte ordering. If equal to 0xa1b2c3d4 or 0xa1b23c4d then the rest of the file uses native byte ordering. If 0xd4c3b2a1 or 0x4d3cb2a1 (swapped), then all following fields will have to be swapped too.

version_major: u16

Version major number (currently 2)

version_minor: u16

Version minor number (currently 4)

thiszone: i32

The correction time in seconds between GMT (UTC) and the local timezone of the following packet header timestamps

sigfigs: u32

In theory, the accuracy of time stamps in the capture; in practice, all tools set it to 0

snaplen: u32

max len of captured packets, in octets

network: Linktype

Data link type

Implementations

impl PcapHeader[src]

pub fn new() -> PcapHeader[src]

pub const fn size(&self) -> usize[src]

pub fn is_bigendian(&self) -> bool[src]

pub fn is_nanosecond_precision(&self) -> bool[src]

Trait Implementations

impl Clone for PcapHeader[src]

impl Debug for PcapHeader[src]

impl Default for PcapHeader[src]

impl<'a> From<&'a PcapHeader> for PcapBlock<'a>[src]

impl<'a> From<PcapHeader> for PcapBlockOwned<'a>[src]

impl ToVec for PcapHeader[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.