pub struct Icmpv4Timestamp { /* private fields */ }Expand description
RFC 792 timestamp message body.
Timestamp request (type 13) and timestamp reply (type 14) append three 32-bit timestamps after the fixed ICMP header: the originate timestamp set by the requester, the receive timestamp set when the responder received the request, and the transmit timestamp set when the responder sent the reply. RFC 792 defines each as milliseconds since midnight UT; a sender that cannot supply a standard value may set the high-order bit, so the raw 32-bit values are exposed verbatim rather than reinterpreted.
This layer always encodes exactly 12 bytes. Malformed timestamp lengths
(a short or oversized trailing region) are not forced into this layer on
decode; they remain a Raw payload so the bytes are never lost.
Implementations§
Source§impl Icmpv4Timestamp
impl Icmpv4Timestamp
Sourcepub fn originate_value(&self) -> u32
pub fn originate_value(&self) -> u32
Originate timestamp value.
Sourcepub fn receive_value(&self) -> u32
pub fn receive_value(&self) -> u32
Receive timestamp value.
Sourcepub fn transmit_value(&self) -> u32
pub fn transmit_value(&self) -> u32
Transmit timestamp value.
Trait Implementations§
Source§impl Clone for Icmpv4Timestamp
impl Clone for Icmpv4Timestamp
Source§fn clone(&self) -> Icmpv4Timestamp
fn clone(&self) -> Icmpv4Timestamp
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Icmpv4Timestamp
impl Debug for Icmpv4Timestamp
Source§impl Default for Icmpv4Timestamp
impl Default for Icmpv4Timestamp
Source§impl<R> Div<R> for Icmpv4Timestampwhere
R: IntoPacket,
impl<R> Div<R> for Icmpv4Timestampwhere
R: IntoPacket,
impl Eq for Icmpv4Timestamp
Source§impl Layer for Icmpv4Timestamp
impl Layer for Icmpv4Timestamp
Source§fn inspection_fields(&self) -> Vec<(&'static str, String)>
fn inspection_fields(&self) -> Vec<(&'static str, String)>
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn compile(&self, _ctx: &LayerContext<'_>, out: &mut Vec<u8>) -> Result<()>
fn compile(&self, _ctx: &LayerContext<'_>, out: &mut Vec<u8>) -> Result<()>
out.Source§fn clone_layer(&self) -> Box<dyn Layer>
fn clone_layer(&self) -> Box<dyn Layer>
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Any for typed packet access.Source§fn into_any(self: Box<Self>) -> Box<dyn Any>
fn into_any(self: Box<Self>) -> Box<dyn Any>
Any for downcasting.Source§fn encoded_len_with_context(&self, _ctx: &LayerContext<'_>) -> usize
fn encoded_len_with_context(&self, _ctx: &LayerContext<'_>) -> usize
Source§fn consumes_following(&self) -> bool
fn consumes_following(&self) -> bool
compile() emits all following layers itself. Read moreSource§fn transport_checksum_context(
&self,
_transport_protocol: u8,
) -> Option<TransportChecksumContext>
fn transport_checksum_context( &self, _transport_protocol: u8, ) -> Option<TransportChecksumContext>
Source§impl PartialEq for Icmpv4Timestamp
impl PartialEq for Icmpv4Timestamp
Source§fn eq(&self, other: &Icmpv4Timestamp) -> bool
fn eq(&self, other: &Icmpv4Timestamp) -> bool
self and other values to be equal, and is used by ==.