Skip to main content

TracerouteOptions

Struct TracerouteOptions 

Source
pub struct TracerouteOptions {
Show 17 fields pub protocol: TracerouteProtocol, pub count: u8, pub first_hop: u8, pub gap_limit: u8, pub max_hops: u8, pub size: u16, pub dest_port: u16, pub tos: u32, pub timeout_ms: u32, pub dup_timeout_ms: u32, pub paris_mod: u8, pub paris_base: u8, pub hbh_opt_size: u16, pub dest_opt_size: u16, pub dont_fragment: bool, pub interface: Option<String>, pub bundle: Option<String>,
}
Expand description

One evtraceroute measurement’s options (everything but the target, -4/-6 and the -A/-O plumbing).

Fields§

§protocol: TracerouteProtocol§count: u8

-c: probes per hop (trtcount)

§first_hop: u8

-f: first hop limit

§gap_limit: u8

-g: after this many hops without an answer, one last-ditch hop (255) and the result

§max_hops: u8

-m: last hop limit

§size: u16

-S: data bytes after the ICMP/UDP/TCP header (maxpacksize); the result’s envelope “size”

§dest_port: u16

-p: TCP destination port

§tos: u32

-t: IP TOS / IPv6 traffic class of the probes (0: left alone)

§timeout_ms: u32

-w: ms to wait for each probe’s reply

§dup_timeout_ms: u32

-z: ms to wait for duplicates after a reply before the next probe

§paris_mod: u8

-a: Paris traceroute: the id cycles through paris_mod values, one per run; 0 is classic traceroute (and no “paris_id” in the result)

§paris_base: u8

-b: lowest Paris id

§hbh_opt_size: u16

-H: IPv6 hop-by-hop options header of this many bytes (PadN)

§dest_opt_size: u16

-D: IPv6 destination options header of this many bytes (PadN)

§dont_fragment: bool

-F: set don’t-fragment (path MTU discovery) on the probes

§interface: Option<String>

-i: bind the probes to this interface

§bundle: Option<String>

-B: bundle id, written into the result as “bundle”

Implementations§

Source§

impl TracerouteOptions

Source

pub const MAX_SIZE: u16 = 4096

The largest -S traceroute_init accepts (MAX_DATA_SIZE, traceroute.c:46 and 4282-4286: “max. packet size too big”).

Source

pub fn paris_id(&self, run: u64) -> Option<u16>

The Paris id of a measurement’s run-th run (1 for the first). traceroute_init sets paris to parisbase (traceroute.c:4408) and each run’s traceroute_start2 steps it (traceroute.c:4492-4497): paris= (paris-parisbase+1+parismod) % parismod + parisbase, i.e. run % parismod + parisbase. None without Paris (-a 0), where report() writes no “paris_id” (traceroute.c:428-431).

Trait Implementations§

Source§

impl Clone for TracerouteOptions

Source§

fn clone(&self) -> TracerouteOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TracerouteOptions

Source§

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

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

impl Default for TracerouteOptions

Source§

fn default() -> Self

traceroute_init’s defaults (traceroute.c:4237-4251).

Source§

impl<'de> Deserialize<'de> for TracerouteOptions

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Hash for TracerouteOptions

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for TracerouteOptions

Source§

fn eq(&self, other: &TracerouteOptions) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for TracerouteOptions

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
Source§

impl Eq for TracerouteOptions

Source§

impl StructuralPartialEq for TracerouteOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

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

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,