pub struct PacketBlock<'a> {
pub interface_id: u16,
pub drop_count: u16,
pub timestamp: u64,
pub captured_len: u32,
pub original_len: u32,
pub data: Cow<'a, [u8]>,
pub options: Vec<PacketOption<'a>>,
}
Expand description
The Packet Block is obsolete, and MUST NOT be used in new files. Use the Enhanced Packet Block or Simple Packet Block instead.
Fields§
§interface_id: u16
It specifies the interface this packet comes from.
drop_count: u16
Local drop counter.
It specifies the number of packets lost (by the interface and the operating system) between this packet and the preceding one.
timestamp: u64
The timestamp is a single 64-bit unsigned integer that represents the number of units of time that have elapsed since 1970-01-01 00:00:00 UTC.
captured_len: u32
Number of octets captured from the packet (i.e. the length of the Packet Data field).
original_len: u32
Actual length of the packet when it was transmitted on the network.
data: Cow<'a, [u8]>
The data coming from the network, including link-layer headers.
options: Vec<PacketOption<'a>>
Options
Implementations§
source§impl<'a> PacketBlock<'a>
impl<'a> PacketBlock<'a>
sourcepub fn into_owned(self) -> PacketBlock<'static>
pub fn into_owned(self) -> PacketBlock<'static>
Returns a version of self
with all fields converted to owning versions.
Trait Implementations§
source§impl<'a> Clone for PacketBlock<'a>
impl<'a> Clone for PacketBlock<'a>
source§fn clone(&self) -> PacketBlock<'a>
fn clone(&self) -> PacketBlock<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'a> Debug for PacketBlock<'a>
impl<'a> Debug for PacketBlock<'a>
source§impl<'a> PartialEq<PacketBlock<'a>> for PacketBlock<'a>
impl<'a> PartialEq<PacketBlock<'a>> for PacketBlock<'a>
source§fn eq(&self, other: &PacketBlock<'a>) -> bool
fn eq(&self, other: &PacketBlock<'a>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PcapNgBlock<'a> for PacketBlock<'a>
impl<'a> PcapNgBlock<'a> for PacketBlock<'a>
source§fn from_slice<B: ByteOrder>(
slice: &'a [u8]
) -> Result<(&'a [u8], Self), PcapError>
fn from_slice<B: ByteOrder>(
slice: &'a [u8]
) -> Result<(&'a [u8], Self), PcapError>
source§fn write_to<B: ByteOrder, W: Write>(&self, writer: &mut W) -> IoResult<usize>
fn write_to<B: ByteOrder, W: Write>(&self, writer: &mut W) -> IoResult<usize>
source§fn into_block(self) -> Block<'a>
fn into_block(self) -> Block<'a>
Block
enumeration