[][src]Struct pcap_rs::Header

pub struct Header {
    pub major: u16,
    pub minor: u16,
    pub this_zone: i32,
    pub sigfigs: u32,
    pub snaplen: u32,
    pub network: LinkType,
    pub nano_sec: bool,
    pub endianness: Endianness,
}

Header of the pcap file.

The type of frame contained in the records is described by the field network.

Fields

major: u16

Major version of this file format.

minor: u16

Minor version of this file format.

this_zone: i32

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

Examples: If the timestamps are in GMT (UTC), this_zone is simply 0. If the timestamps are in Central European time (Amsterdam, Berlin, ...) which is GMT + 1:00, this_zone must be -3600. In practice, time stamps are always in GMT, so this_zone is always 0.

sigfigs: u32

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

snaplen: u32

Maximum length of a captured packet. If the initial packet is bigger than this value it will be truncated.

network: LinkTypenano_sec: boolendianness: Endianness

Trait Implementations

impl Debug for Header[src]

impl PartialEq<Header> for Header[src]

impl StructuralPartialEq for Header[src]

Auto Trait Implementations

impl RefUnwindSafe for Header

impl Send for Header

impl Sync for Header

impl Unpin for Header

impl UnwindSafe for Header

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> From<T> for T[src]

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

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.