pub struct PcapRecord<'a> {
pub timestamp: SystemTime,
pub actual_length: u32,
pub original_length: u32,
pub payload: &'a [u8],
}
Expand description
Pcap record associated with a libpcap capture
Fields§
§timestamp: SystemTime
§actual_length: u32
§original_length: u32
§payload: &'a [u8]
Implementations§
Source§impl<'a> PcapRecord<'a>
impl<'a> PcapRecord<'a>
Sourcepub fn convert_packet_time(ts_seconds: u32, ts_microseconds: u32) -> SystemTime
pub fn convert_packet_time(ts_seconds: u32, ts_microseconds: u32) -> SystemTime
Convert a packet time (seconds and partial second microseconds) to a system time (offset from epoch)
pub fn new( timestamp: SystemTime, actual_length: u32, original_length: u32, payload: &'a [u8], ) -> PcapRecord<'a>
pub fn parse<'b>( input: &'b [u8], endianness: Endianness, ) -> Result<(&'b [u8], PcapRecord<'b>), Error>
Trait Implementations§
Source§impl<'a> Clone for PcapRecord<'a>
impl<'a> Clone for PcapRecord<'a>
Source§fn clone(&self) -> PcapRecord<'a>
fn clone(&self) -> PcapRecord<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for PcapRecord<'a>
impl<'a> Debug for PcapRecord<'a>
Source§impl<'a> Default for PcapRecord<'a>
impl<'a> Default for PcapRecord<'a>
Source§impl<'a> Display for PcapRecord<'a>
impl<'a> Display for PcapRecord<'a>
Source§impl<'a> FlowExtraction for PcapRecord<'a>
impl<'a> FlowExtraction for PcapRecord<'a>
impl<'a> Copy for PcapRecord<'a>
Auto Trait Implementations§
impl<'a> Freeze for PcapRecord<'a>
impl<'a> RefUnwindSafe for PcapRecord<'a>
impl<'a> Send for PcapRecord<'a>
impl<'a> Sync for PcapRecord<'a>
impl<'a> Unpin for PcapRecord<'a>
impl<'a> UnwindSafe for PcapRecord<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more