Struct pcap::PacketHeader
source · #[repr(C)]pub struct PacketHeader {
pub ts: timeval,
pub caplen: u32,
pub len: u32,
}
Expand description
Represents a packet header provided by pcap, including the timeval, caplen and len.
Fields§
§ts: timeval
The time when the packet was captured
caplen: u32
The number of bytes of the packet that are available from the capture
len: u32
The length of the packet, in bytes (which might be more than the number of bytes available from the capture, if the length of the packet is larger than the maximum number of bytes to capture)
Trait Implementations§
source§impl Clone for PacketHeader
impl Clone for PacketHeader
source§fn clone(&self) -> PacketHeader
fn clone(&self) -> PacketHeader
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 Debug for PacketHeader
impl Debug for PacketHeader
source§impl PartialEq for PacketHeader
impl PartialEq for PacketHeader
source§fn eq(&self, rhs: &PacketHeader) -> bool
fn eq(&self, rhs: &PacketHeader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for PacketHeader
impl Eq for PacketHeader
Auto Trait Implementations§
impl Freeze for PacketHeader
impl RefUnwindSafe for PacketHeader
impl Send for PacketHeader
impl Sync for PacketHeader
impl Unpin for PacketHeader
impl UnwindSafe for PacketHeader
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