Skip to content

Commit

Permalink
Auto merge of #2677 - devnexen:fbsd14_tcp_flags, r=Amanieu
Browse files Browse the repository at this point in the history
freebsd 14 new tcp constants.
  • Loading branch information
bors committed Feb 12, 2022
2 parents 14c9ec1 + edead08 commit f856aa6
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
18 changes: 18 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2195,6 +2195,24 @@ fn test_freebsd(target: &str) {
// Those were introduced in FreeBSD 12.
"TCP_FUNCTION_NAME_LEN_MAX" | "TCP_FASTOPEN_PSK_LEN" if Some(11) == freebsd_ver => true,

// Flags introduced in FreeBSD 14.
"TCP_MAXUNACKTIME"
| "TCP_MAXPEAKRATE"
| "TCP_IDLE_REDUCE"
| "TCP_REMOTE_UDP_ENCAPS_PORT"
| "TCP_DELACK"
| "TCP_FIN_IS_RST"
| "TCP_LOG_LIMIT"
| "TCP_SHARED_CWND_ALLOWED"
| "TCP_PROC_ACCOUNTING"
| "TCP_USE_CMP_ACKS"
| "TCP_PERF_INFO"
| "TCP_LRD"
if Some(14) > freebsd_ver =>
{
true
}

_ => false,
}
});
Expand Down
11 changes: 11 additions & 0 deletions libc-test/semver/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1128,20 +1128,31 @@ TAB3
TABDLY
TCP_CCALGOOPT
TCP_CONGESTION
TCP_DELACK
TCP_FASTOPEN
TCP_FASTOPEN_PSK_LEN
TCP_FIN_IS_RST
TCP_FUNCTION_NAME_LEN_MAX
TCP_IDLE_REDUCE
TCP_INFO
TCP_KEEPCNT
TCP_KEEPIDLE
TCP_KEEPINIT
TCP_KEEPINTVL
TCP_LOG_LIMIT
TCP_MAXPEAKRATE
TCP_MAXSEG
TCP_MAXUNACKTIME
TCP_MD5SIG
TCP_NOOPT
TCP_NOPUSH
TCP_PCAP_IN
TCP_PCAP_OUT
TCP_PERF_INFO
TCP_PROC_ACCOUNTING
TCP_REMOTE_UDP_ENCAPS_PORT
TCP_SHARED_CWND_ALLOWED
TCP_USE_CMP_ACKS
THOUSEP
TIMER_ABSTIME
TIME_DEL
Expand Down
12 changes: 12 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2861,6 +2861,18 @@ pub const TCP_MD5SIG: ::c_int = 16;
pub const TCP_INFO: ::c_int = 32;
pub const TCP_CONGESTION: ::c_int = 64;
pub const TCP_CCALGOOPT: ::c_int = 65;
pub const TCP_MAXUNACKTIME: ::c_int = 68;
pub const TCP_MAXPEAKRATE: ::c_int = 69;
pub const TCP_IDLE_REDUCE: ::c_int = 70;
pub const TCP_REMOTE_UDP_ENCAPS_PORT: ::c_int = 71;
pub const TCP_DELACK: ::c_int = 72;
pub const TCP_FIN_IS_RST: ::c_int = 73;
pub const TCP_LOG_LIMIT: ::c_int = 74;
pub const TCP_SHARED_CWND_ALLOWED: ::c_int = 75;
pub const TCP_PROC_ACCOUNTING: ::c_int = 76;
pub const TCP_USE_CMP_ACKS: ::c_int = 77;
pub const TCP_PERF_INFO: ::c_int = 78;
pub const TCP_LRD: ::c_int = 79;
pub const TCP_KEEPINIT: ::c_int = 128;
pub const TCP_FASTOPEN: ::c_int = 1025;
pub const TCP_PCAP_OUT: ::c_int = 2048;
Expand Down

0 comments on commit f856aa6

Please sign in to comment.