[][src]Struct pcap_parser::traits::LegacyPcapBlock

pub struct LegacyPcapBlock<'a> { /* fields omitted */ }

Container for network data in legacy Pcap files

Methods

impl<'a> LegacyPcapBlock<'a>[src]

pub fn new(data: &[u8], big_endian: bool) -> Option<LegacyPcapBlock>[src]

pub fn origlen(&self) -> u32[src]

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.

pub fn caplen(&self) -> u32[src]

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

pub fn ts_sec(&self) -> u32[src]

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

pub fn ts_usec(&self) -> u32[src]

The date and time when this packet was captured (microseconds part).

pub fn ts(&self) -> (u32, u32, u64)[src]

The date and time when this packet was captured (full resolution). Returns the seconds, fractional part value and unit (in number per second)

pub fn raw_data(&self) -> &[u8][src]

Raw packet data (including header)

pub fn raw_header(&self) -> &[u8][src]

Raw packet header

pub fn data(&self) -> &[u8][src]

Network packet data. Can be shorter than caplen if packet does not contain enough data

Trait Implementations

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

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

Auto Trait Implementations

impl<'a> Sync for LegacyPcapBlock<'a>

impl<'a> Send for LegacyPcapBlock<'a>

impl<'a> Unpin for LegacyPcapBlock<'a>

impl<'a> RefUnwindSafe for LegacyPcapBlock<'a>

impl<'a> UnwindSafe for LegacyPcapBlock<'a>

Blanket Implementations

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.

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]