[][src]Struct pcap_parser::PacketHeader

pub struct PacketHeader {
    pub ts_sec: u32,
    pub ts_usec: u32,
    pub caplen: u32,
    pub len: u32,
}

Record (Packet) Header

Fields

ts_sec: u32

The date and time when this packet was captured (seconds since epoch).

ts_usec: u32

In regular pcap files, the microseconds when this packet was captured, as an offset to ts_sec. In nanosecond-resolution files, this is, instead, the nanoseconds when the packet was captured, as an offset to ts_sec

caplen: u32

The number of bytes of packet data actually captured and saved in the file.

len: u32

The length of the packet as it appeared on the network when it was captured. If cap_len and len differ, the actually saved packet size was limited by snaplen.

Methods

impl PacketHeader[src]

pub fn to_string(&self) -> Vec<u8>[src]

Trait Implementations

impl Eq for PacketHeader[src]

impl Clone for PacketHeader[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq<PacketHeader> for PacketHeader[src]

impl Debug for PacketHeader[src]

Auto Trait Implementations

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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