Enum pcap::TimestampType
source · [−]#[repr(i32)]
pub enum TimestampType {
Host,
HostLowPrec,
HostHighPrec,
Adapter,
AdapterUnsynced,
}
Expand description
Timestamp types
Not all systems and interfaces will necessarily support all of these.
Note that time stamps synchronized with the system clock can go backwards, as the system clock can go backwards. If a clock is not in sync with the system clock, that could be because the system clock isn’t keeping accurate time, because the other clock isn’t keeping accurate time, or both.
Note that host-provided time stamps generally correspond to the time when the time-stamping code sees the packet; this could be some unknown amount of time after the first or last bit of the packet is received by the network adapter, due to batching of interrupts for packet arrival, queueing delays, etc..
Variants
Host
Timestamps are provided by the host machine, rather than by the capture device.
The characteristics of the timestamp are unknown.
HostLowPrec
A timestamp provided by the host machine that is low precision but relatively cheap to fetch.
This is normally done using the system clock, so it’s normally synchornized with times you’d fetch from system calls.
HostHighPrec
A timestamp provided by the host machine that is high precision. It might be more expensive to fetch.
The timestamp might or might not be synchronized with the system clock, and might have problems with time stamps for packets received on different CPUs, depending on the platform.
Adapter
The timestamp is a high-precision time stamp supplied by the capture device.
The timestamp is synchronized with the system clock.
AdapterUnsynced
The timestamp is a high-precision time stamp supplied by the capture device.
The timestamp is not synchronized with the system clock.
Trait Implementations
sourceimpl Clone for TimestampType
impl Clone for TimestampType
sourcefn clone(&self) -> TimestampType
fn clone(&self) -> TimestampType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TimestampType
impl Debug for TimestampType
sourceimpl PartialEq<TimestampType> for TimestampType
impl PartialEq<TimestampType> for TimestampType
impl Copy for TimestampType
impl Eq for TimestampType
impl StructuralEq for TimestampType
impl StructuralPartialEq for TimestampType
Auto Trait Implementations
impl RefUnwindSafe for TimestampType
impl Send for TimestampType
impl Sync for TimestampType
impl Unpin for TimestampType
impl UnwindSafe for TimestampType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more