Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/inet/nlas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ buffer!(MemInfoBuffer(MEM_INFO_LEN) {
/// documentation with a huge grain of salt. Please report any error
/// you may notice. Here are the references I used:
///
/// - [https://wiki.linuxfoundation.org/networking/sk_buff](a short introduction
/// to `sk_buff`, the struct used in the kernel to store packets)
/// - [a short introduction to `sk_buff`, the struct used in the kernel to store packets](https://wiki.linuxfoundation.org/networking/sk_buff)
/// - [vger.kernel.org has a lot of documentation about the low level network stack APIs](http://vger.kernel.org/~davem/skb_data.html)
/// - [thorough high level explanation of buffering in the network stack](https://www.coverfire.com/articles/queueing-in-the-linux-network-stack/)
/// - [understanding the backlog queue](http://veithen.io/2014/01/01/how-tcp-backlog-works-in-linux.html)
Expand Down Expand Up @@ -155,7 +154,7 @@ pub struct MemInfo {
/// Memory used for packets that have been passed down the network
/// stack, i.e. that are either in the QDisc or device driver
/// queues. This attribute is known as `sk_wmem_alloc` in the
/// kernel. See also [`send_queue`].
/// kernel. See also [`send_queue`](#structfield.send_queue).
pub bottom_send_queues: u32,
/// The amount of memory already allocated for this socket but
/// currently unused. When more memory is needed either for
Expand Down Expand Up @@ -477,7 +476,7 @@ pub struct TcpInfo {
/// `TCP_CA_DISORDER`, `TCP_CA_CWR`, `TCP_CA_RECOVERY`,
/// `TCP_CA_LOSS`
pub ca_state: u8,
///
/// Number of retransmits since the last ACK
pub retransmits: u8,
pub probes: u8,
pub backoff: u8,
Expand Down Expand Up @@ -507,7 +506,7 @@ pub struct TcpInfo {
pub sacked: u32,
/// Number of segments that have been lost
pub lost: u32,
/// Number of segments that have been retransmitted
/// Number of segments that are currently being retransmitted
pub retrans: u32,
/// Number of segments that have been FACKed
pub fackets: u32,
Expand Down Expand Up @@ -539,6 +538,7 @@ pub struct TcpInfo {
pub rcv_rtt: u32,
pub rcv_space: u32,

/// Number of segments that have been retransmitted during lifetime of the socket
pub total_retrans: u32,

pub pacing_rate: u64,
Expand Down
8 changes: 2 additions & 6 deletions src/unix/nlas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@ pub enum Nla {
/// attribute is reported for listening sockets only. This
/// attribute is known as `UNIX_DIAG_ICONS` in the kernel.
PendingConnections(Vec<u32>),
/// This attribute corresponds to the `UNIX_DIAG_RQLEN`. It
/// reports the length of the socket receive queue, and the queue
/// size limit. Note that for **listening** sockets the receive
/// queue is used to store actual data sent by other sockets. It
/// is used to store pending connections. So the meaning of this
/// attribute differs for listening sockets.
/// This attribute corresponds to the `UNIX_DIAG_RQLEN`. Actual meaning of
/// this attribute differs depending on the type of socket.
///
/// For **listening** sockets:
///
Expand Down