Skip to content

Commit

Permalink
Add the TCP_FUNCTION_BLK and TCP_FUNCTION_ALIAS socket options
Browse files Browse the repository at this point in the history
For FreeBSD only

(backport <rust-lang#4047>)
(cherry picked from commit 2e8be88)
  • Loading branch information
asomers authored and tgross35 committed Nov 16, 2024
1 parent 681f50e commit 38e903e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2597,6 +2597,9 @@ fn test_freebsd(target: &str) {
// FIXME: The values has been changed in FreeBSD 15:
"CLOCK_BOOTTIME" if Some(15) <= freebsd_ver => true,

// Added in FreeBSD 14.0
"TCP_FUNCTION_ALIAS" if Some(14) > freebsd_ver => true,

_ => false,
}
});
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1505,6 +1505,8 @@ TCP_DELACK
TCP_FASTOPEN
TCP_FASTOPEN_PSK_LEN
TCP_FIN_IS_RST
TCP_FUNCTION_ALIAS
TCP_FUNCTION_BLK
TCP_FUNCTION_NAME_LEN_MAX
TCP_IDLE_REDUCE
TCP_INFO
Expand Down
2 changes: 2 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3895,6 +3895,8 @@ pub const TCP_KEEPINIT: ::c_int = 128;
pub const TCP_FASTOPEN: ::c_int = 1025;
pub const TCP_PCAP_OUT: ::c_int = 2048;
pub const TCP_PCAP_IN: ::c_int = 4096;
pub const TCP_FUNCTION_BLK: ::c_int = 8192;
pub const TCP_FUNCTION_ALIAS: ::c_int = 8193;
pub const TCP_FASTOPEN_PSK_LEN: ::c_int = 16;
pub const TCP_FUNCTION_NAME_LEN_MAX: ::c_int = 32;

Expand Down

0 comments on commit 38e903e

Please sign in to comment.