Struct caracat::models::Reply

source ·
pub struct Reply {
Show 20 fields pub capture_timestamp: u64, pub reply_src_addr: Ipv6Addr, pub reply_dst_addr: Ipv6Addr, pub reply_id: u16, pub reply_size: u16, pub reply_ttl: u8, pub reply_protocol: u8, pub reply_icmp_type: u8, pub reply_icmp_code: u8, pub reply_mpls_labels: Vec<MPLSLabel>, pub probe_dst_addr: Ipv6Addr, pub probe_id: u16, pub probe_size: u16, pub probe_protocol: u8, pub quoted_ttl: u8, pub probe_src_port: u16, pub probe_dst_port: u16, pub probe_ttl: u8, pub rtt: u16, pub extra: Option<String>,
}
Expand description

A reply to a probe packet.

Fields§

§capture_timestamp: u64

The capture timestamp in microseconds.

§reply_src_addr: Ipv6Addr

The source IP of the reply packet.

§reply_dst_addr: Ipv6Addr

The destination IP of the reply packet.

§reply_id: u16

The ID field of the reply packet (0 for IPv6).

§reply_size: u16

The size in bytes of the reply packet. For IPv6 this doesn’t include the IP header.

§reply_ttl: u8

The TTL of the reply packet.

§reply_protocol: u8

The L3 protocol of the reply.

§reply_icmp_type: u8

ICMP type (0 if not an ICMP reply)

§reply_icmp_code: u8

ICMP code (0 if not an ICMP reply)

§reply_mpls_labels: Vec<MPLSLabel>

MPLS labels contained in the ICMP extension.

§probe_dst_addr: Ipv6Addr

The IP that was targeted by the probe. If we received a reply from this IP then reply_src_addr == probe_dst_addr.

§probe_id: u16

The ID field of the probe packet (0 for IPv6).

§probe_size: u16

The size in bytes of the probe packet. For IPv6 this doesn’t include the IP header.

§probe_protocol: u8

The protocol of the probe packet.

§quoted_ttl: u8

The TTL as seen by the host that emitted the ICMP reply.

§probe_src_port: u16

The source port of the probe packet. For ICMP probes, we encode the source port in the ICMP checksum and ID fields in order to vary the flow ID.

§probe_dst_port: u16

The destination port of the probe packet, 0 for ICMP probes.

§probe_ttl: u8

The TTL that was encoded in the L4 header, 0 if not available.

§rtt: u16

The estimated round-trip time, in tenth of milliseconds.

§extra: Option<String>

An extra string that is appended at the end of the reply.

Implementations§

source§

impl Reply

source

pub fn checksum(&self, caracat_id: u16) -> u16

source

pub fn is_valid(&self, caracat_id: u16) -> bool

source

pub fn is_destination_unreachable(&self) -> bool

source

pub fn is_echo_reply(&self) -> bool

source

pub fn is_time_exceeded(&self) -> bool

Trait Implementations§

source§

impl Debug for Reply

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Reply

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Display for Reply

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Serialize for Reply

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for Reply

§

impl Send for Reply

§

impl Sync for Reply

§

impl Unpin for Reply

§

impl UnwindSafe for Reply

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V