Skip to content

Commit

Permalink
Auto merge of #3113 - devnexen:nbsd_tcp_info, r=JohnTitor
Browse files Browse the repository at this point in the history
netbsd tcp_info data addition.
  • Loading branch information
bors committed Feb 12, 2023
2 parents 4701fcb + 448b3e2 commit 781e0c3
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions libc-test/semver/netbsd.txt
Expand Up @@ -1521,6 +1521,7 @@ syscall
sysctl
sysctlbyname
sysctldesc
tcp_info
telldir
timer_create
timer_delete
Expand Down
43 changes: 43 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Expand Up @@ -709,6 +709,49 @@ s! {
#[cfg(libc_union)]
pub ifc_ifcu: __c_anonymous_ifc_ifcu,
}

pub struct tcp_info {
pub tcpi_state: u8,
pub __tcpi_ca_state: u8,
pub __tcpi_retransmits: u8,
pub __tcpi_probes: u8,
pub __tcpi_backoff: u8,
pub tcpi_options: u8,
pub tcp_snd_wscale: u8,
pub tcp_rcv_wscale: u8,
pub tcpi_rto: u32,
pub __tcpi_ato: u32,
pub tcpi_snd_mss: u32,
pub tcpi_rcv_mss: u32,
pub __tcpi_unacked: u32,
pub __tcpi_sacked: u32,
pub __tcpi_lost: u32,
pub __tcpi_retrans: u32,
pub __tcpi_fackets: u32,
pub __tcpi_last_data_sent: u32,
pub __tcpi_last_ack_sent: u32,
pub tcpi_last_data_recv: u32,
pub __tcpi_last_ack_recv: u32,
pub __tcpi_pmtu: u32,
pub __tcpi_rcv_ssthresh: u32,
pub tcpi_rtt: u32,
pub tcpi_rttvar: u32,
pub tcpi_snd_ssthresh: u32,
pub tcpi_snd_cwnd: u32,
pub __tcpi_advmss: u32,
pub __tcpi_reordering: u32,
pub __tcpi_rcv_rtt: u32,
pub tcpi_rcv_space: u32,
pub tcpi_snd_wnd: u32,
pub tcpi_snd_bwnd: u32,
pub tcpi_snd_nxt: u32,
pub tcpi_rcv_nxt: u32,
pub tcpi_toe_tid: u32,
pub tcpi_snd_rexmitpack: u32,
pub tcpi_rcv_ooopack: u32,
pub tcpi_snd_zerowin: u32,
pub __tcpi_pad: [u32; 26],
}
}

s_no_extra_traits! {
Expand Down

0 comments on commit 781e0c3

Please sign in to comment.