File tree 3 files changed +24
-0
lines changed
src/unix/bsd/freebsdlike/freebsd 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) {
2178
2178
true
2179
2179
}
2180
2180
2181
+ // Those were introduced in FreeBSD 12.
2182
+ "TCP_FUNCTION_NAME_LEN_MAX" | "TCP_FASTOPEN_PSK_LEN" if Some ( 11 ) == freebsd_ver => true ,
2183
+
2181
2184
_ => false ,
2182
2185
}
2183
2186
} ) ;
@@ -2221,6 +2224,11 @@ fn test_freebsd(target: &str) {
2221
2224
// `sockcred2` is not available in FreeBSD 12.
2222
2225
"sockcred2" if Some ( 13 ) > freebsd_ver => true ,
2223
2226
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
+
2224
2232
_ => false ,
2225
2233
}
2226
2234
} ) ;
Original file line number Diff line number Diff line change @@ -1128,6 +1128,8 @@ TABDLY
1128
1128
TCP_CCALGOOPT
1129
1129
TCP_CONGESTION
1130
1130
TCP_FASTOPEN
1131
+ TCP_FASTOPEN_PSK_LEN
1132
+ TCP_FUNCTION_NAME_LEN_MAX
1131
1133
TCP_INFO
1132
1134
TCP_KEEPCNT
1133
1135
TCP_KEEPIDLE
@@ -1805,6 +1807,8 @@ syscall
1805
1807
sysctl
1806
1808
sysctlbyname
1807
1809
sysctlnametomib
1810
+ tcp_fastopen
1811
+ tcp_function_set
1808
1812
telldir
1809
1813
thr_kill
1810
1814
thr_kill2
Original file line number Diff line number Diff line change @@ -978,6 +978,16 @@ s! {
978
978
pub ai_termid: au_tid_t,
979
979
pub ai_asid: :: au_asid_t,
980
980
}
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
+ }
981
991
}
982
992
983
993
s_no_extra_traits ! {
@@ -2855,6 +2865,8 @@ pub const TCP_KEEPINIT: ::c_int = 128;
2855
2865
pub const TCP_FASTOPEN : :: c_int = 1025 ;
2856
2866
pub const TCP_PCAP_OUT : :: c_int = 2048 ;
2857
2867
pub 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 ;
2858
2870
2859
2871
pub const IP_BINDANY : :: c_int = 24 ;
2860
2872
pub const IP_BINDMULTI : :: c_int = 25 ;
You can’t perform that action at this time.
0 commit comments