TcpInfo

Struct TcpInfo 

Source
pub struct TcpInfo {
Show 54 fields pub state: u8, pub ca_state: u8, pub retransmits: u8, pub probes: u8, pub backoff: u8, pub options: u8, pub wscale: u8, pub delivery_rate_app_limited: u8, pub rto: u32, pub ato: u32, pub snd_mss: u32, pub rcv_mss: u32, pub unacked: u32, pub sacked: u32, pub lost: u32, pub retrans: u32, pub fackets: u32, pub last_data_sent: u32, pub last_ack_sent: u32, pub last_data_recv: u32, pub last_ack_recv: u32, pub pmtu: u32, pub rcv_ssthresh: u32, pub rtt: u32, pub rttvar: u32, pub snd_ssthresh: u32, pub snd_cwnd: u32, pub advmss: u32, pub reordering: u32, pub rcv_rtt: u32, pub rcv_space: u32, pub total_retrans: u32, pub pacing_rate: u64, pub max_pacing_rate: u64, pub bytes_acked: u64, pub bytes_received: u64, pub segs_out: u32, pub segs_in: u32, pub notsent_bytes: u32, pub min_rtt: u32, pub data_segs_in: u32, pub data_segs_out: u32, pub delivery_rate: u64, pub busy_time: u64, pub rwnd_limited: u64, pub sndbuf_limited: u64, pub delivered: u32, pub delivered_ce: u32, pub bytes_sent: u64, pub bytes_retrans: u64, pub dsack_dups: u32, pub reord_seen: u32, pub rcv_ooopack: u32, pub snd_wnd: u32,
}

Fields§

§state: u8

State of the TCP connection: one of TCP_ESTABLISHED, TCP_SYN_SENT, TP_SYN_RECV, TCP_FIN_WAIT1, TCP_FIN_WAIT2 TCP_TIME_WAIT, TCP_CLOSE, TCP_CLOSE_WAIT, TCP_LAST_ACK TCP_LISTEN, TCP_CLOSING.

§ca_state: u8

Congestion algorithm state: one of TCP_CA_OPEN, TCP_CA_DISORDER, TCP_CA_CWR, TCP_CA_RECOVERY, TCP_CA_LOSS

§retransmits: u8
§probes: u8§backoff: u8§options: u8§wscale: u8§delivery_rate_app_limited: u8

A boolean indicating if the goodput was measured when the socket’s throughput was limited by the sending application. tcpi_delivery_rate_app_limited:1, tcpi_fastopen_client_fail:2

§rto: u32

Value of the RTO (Retransmission TimeOut) timer. This value is calculated using the RTT.

§ato: u32

Value of the ATO (ACK TimeOut) timer.

§snd_mss: u32

MSS (Maximum Segment Size). Not shure how it differs from advmss.

§rcv_mss: u32

MSS (Maximum Segment Size) advertised by peer

§unacked: u32

Number of segments that have not been ACKnowledged yet, ie the number of in-flight segments.

§sacked: u32

Number of segments that have been SACKed

§lost: u32

Number of segments that have been lost

§retrans: u32

Number of segments that have been retransmitted

§fackets: u32

Number of segments that have been FACKed

§last_data_sent: u32§last_ack_sent: u32§last_data_recv: u32§last_ack_recv: u32§pmtu: u32§rcv_ssthresh: u32§rtt: u32

RTT (Round Trip Time). There RTT is the time between the moment a segment is sent out and the moment it is acknowledged. There are different kinds of RTT values, and I don’t know which one this value corresponds to: mRTT (measured RTT), sRTT (smoothed RTT), RTTd (deviated RTT), etc.

§rttvar: u32

RTT variance (or variation?)

§snd_ssthresh: u32

Slow-Start Threshold

§snd_cwnd: u32

Size of the congestion window

§advmss: u32

MSS advertised by this peer

§reordering: u32§rcv_rtt: u32§rcv_space: u32§total_retrans: u32§pacing_rate: u64§max_pacing_rate: u64§bytes_acked: u64§bytes_received: u64§segs_out: u32§segs_in: u32§notsent_bytes: u32§min_rtt: u32§data_segs_in: u32§data_segs_out: u32§delivery_rate: u64

The most recent goodput, as measured by tcp_rate_gen(). If the socket is limited by the sending application (e.g., no data to send), it reports the highest measurement instead of the most recent. The unit is bytes per second (like other rate fields in tcp_info).

§busy_time: u64§rwnd_limited: u64§sndbuf_limited: u64§delivered: u32§delivered_ce: u32§bytes_sent: u64§bytes_retrans: u64§dsack_dups: u32§reord_seen: u32

reordering events seen

§rcv_ooopack: u32

Out-of-order packets received

§snd_wnd: u32

peer’s advertised receive window after scaling (bytes)

Trait Implementations§

Source§

impl Clone for TcpInfo

Source§

fn clone(&self) -> TcpInfo

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 TcpInfo

Source§

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

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

impl Emitable for TcpInfo

Source§

fn buffer_len(&self) -> usize

Return the length of the serialized data.
Source§

fn emit(&self, buf: &mut [u8])

Serialize this types and write the serialized data into the given buffer. Read more
Source§

impl<T: AsRef<[u8]>> Parseable<TcpInfoBuffer<T>> for TcpInfo

Source§

type Error = DecodeError

Source§

fn parse(buf: &TcpInfoBuffer<T>) -> Result<Self, DecodeError>

Deserialize the current type.
Source§

impl PartialEq for TcpInfo

Source§

fn eq(&self, other: &TcpInfo) -> 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 Eq for TcpInfo

Source§

impl StructuralPartialEq for TcpInfo

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.