[][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 Clone for PacketHeader[src]

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

Performs copy-assignment from source. Read more

impl Eq for PacketHeader[src]

impl PartialEq<PacketHeader> for PacketHeader[src]

impl Debug for PacketHeader[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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