[−][src]Struct pcap_parser::traits::LegacyPcapBlock
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]
fn from(b: LegacyPcapBlock<'a>) -> PcapBlockOwned<'a>[src]
impl<'a> From<&'a LegacyPcapBlock<'a>> for PcapBlock<'a>[src]
fn from(b: &'a LegacyPcapBlock) -> PcapBlock<'a>[src]
Auto Trait Implementations
impl<'a> Sync for LegacyPcapBlock<'a>
impl<'a> Unpin for LegacyPcapBlock<'a>
impl<'a> Send for LegacyPcapBlock<'a>
impl<'a> UnwindSafe for LegacyPcapBlock<'a>
impl<'a> RefUnwindSafe for LegacyPcapBlock<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,