File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
src/unix/bsd/freebsdlike/freebsd Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -2178,6 +2178,9 @@ fn test_freebsd(target: &str) {
21782178 true
21792179 }
21802180
2181+ // Those were introduced in FreeBSD 12.
2182+ "TCP_FUNCTION_NAME_LEN_MAX" | "TCP_FASTOPEN_PSK_LEN" if Some ( 11 ) == freebsd_ver => true ,
2183+
21812184 _ => false ,
21822185 }
21832186 } ) ;
@@ -2221,6 +2224,11 @@ fn test_freebsd(target: &str) {
22212224 // `sockcred2` is not available in FreeBSD 12.
22222225 "sockcred2" if Some ( 13 ) > freebsd_ver => true ,
22232226
2227+ // `tcp_fastopen` introduced in FreeBSD 12.
2228+ "tcp_fastopen" if Some ( 11 ) == freebsd_ver => true ,
2229+ // `tcp_function_set` introduced in FreeBSD 12.
2230+ "tcp_function_set" if Some ( 11 ) == freebsd_ver => true ,
2231+
22242232 _ => false ,
22252233 }
22262234 } ) ;
Original file line number Diff line number Diff line change @@ -1128,6 +1128,8 @@ TABDLY
11281128TCP_CCALGOOPT
11291129TCP_CONGESTION
11301130TCP_FASTOPEN
1131+ TCP_FASTOPEN_PSK_LEN
1132+ TCP_FUNCTION_NAME_LEN_MAX
11311133TCP_INFO
11321134TCP_KEEPCNT
11331135TCP_KEEPIDLE
@@ -1805,6 +1807,8 @@ syscall
18051807sysctl
18061808sysctlbyname
18071809sysctlnametomib
1810+ tcp_fastopen
1811+ tcp_function_set
18081812telldir
18091813thr_kill
18101814thr_kill2
Original file line number Diff line number Diff line change @@ -978,6 +978,16 @@ s! {
978978 pub ai_termid: au_tid_t,
979979 pub ai_asid: :: au_asid_t,
980980 }
981+
982+ pub struct tcp_fastopen {
983+ pub enable: :: c_int,
984+ pub psk: [ u8 ; :: TCP_FASTOPEN_PSK_LEN as usize ] ,
985+ }
986+
987+ pub struct tcp_function_set {
988+ pub function_set_name: [ :: c_char; :: TCP_FUNCTION_NAME_LEN_MAX as usize ] ,
989+ pub pcbcnt: u32 ,
990+ }
981991}
982992
983993s_no_extra_traits ! {
@@ -2855,6 +2865,8 @@ pub const TCP_KEEPINIT: ::c_int = 128;
28552865pub const TCP_FASTOPEN : :: c_int = 1025 ;
28562866pub const TCP_PCAP_OUT : :: c_int = 2048 ;
28572867pub const TCP_PCAP_IN : :: c_int = 4096 ;
2868+ pub const TCP_FASTOPEN_PSK_LEN : :: c_int = 16 ;
2869+ pub const TCP_FUNCTION_NAME_LEN_MAX : :: c_int = 32 ;
28582870
28592871pub const IP_BINDANY : :: c_int = 24 ;
28602872pub const IP_BINDMULTI : :: c_int = 25 ;
You can’t perform that action at this time.
0 commit comments