Skip to main content

NetTraversalStatsV2

Struct NetTraversalStatsV2 

Source
#[repr(C)]
pub struct NetTraversalStatsV2 {
Show 13 fields pub punches_attempted: u64, pub punches_succeeded: u64, pub punches_failed: u64, pub relay_fallbacks: u64, pub punch_timeouts: u64, pub punch_rejections: u64, pub rendezvous_no_relay: u64, pub upgrades_attempted: u64, pub upgrades_succeeded: u64, pub upgrades_deferred_busy: u64, pub port_mapping_renewals: u64, pub port_mapping_active: u8, pub port_mapping_external: [c_char; 64],
}
Expand description

Full traversal-stats snapshot for net_mesh_traversal_stats_v2. #[repr(C)] — field order, widths, and the 64-byte address buffer are ABI; matched by net_traversal_stats_v2_t in include/net.go.h. Extend only by appending a new versioned struct + call, never by mutating this one.

Fields§

§punches_attempted: u64

Punches whose PunchRequest was successfully mediated.

§punches_succeeded: u64

Mediated punches that produced a direct session.

§punches_failed: u64

Derived: punches_attempted - punches_succeeded (saturating).

§relay_fallbacks: u64

connect_direct calls that resolved on the routed path.

§punch_timeouts: u64

Punch flows that gave up on a deadline (cause counter).

§punch_rejections: u64

Punch flows refused by a typed PunchReject (cause counter).

§rendezvous_no_relay: u64

Punch-needing pairs skipped with no coordinator candidate.

§upgrades_attempted: u64

Background direct-path upgrades started (Stage 3).

§upgrades_succeeded: u64

Upgrades that replaced a relay session with a direct one.

§upgrades_deferred_busy: u64

Upgrades deferred by the C3 busy gate (retried; not failures).

§port_mapping_renewals: u64

Successful renewal ticks since the current mapping installed.

§port_mapping_active: u8

1 when a port mapping is currently installed, else 0.

§port_mapping_external: [c_char; 64]

NUL-terminated "ip:port" of the mapped external address; empty string when no mapping is active. 64 bytes covers the longest textual form ([v6]:65535 ≤ 54 chars).

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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