mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-30 14:50:36 +00:00
ac6c05788b
* sys/freebsd: improve TCP tests Add missing TCP socket options for FreeBSD. * sys/freebsd: improve TCP tests Add socket option description for TCP_FASTOPEN.
59 lines
3.4 KiB
Plaintext
59 lines
3.4 KiB
Plaintext
# Copyright 2017 syzkaller project authors. All rights reserved.
|
|
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
|
|
|
# AF_INET and AF_INET6: TCP support
|
|
|
|
include <sys/types.h>
|
|
include <sys/socket.h>
|
|
include <netinet/in.h>
|
|
include <netinet/tcp.h>
|
|
|
|
resource sock_tcp[sock_in]
|
|
|
|
socket$inet_tcp(domain const[AF_INET], type const[SOCK_STREAM], proto const[0]) sock_tcp
|
|
|
|
resource sock_tcp6[sock_in6]
|
|
|
|
socket$inet6_tcp(domain const[AF_INET6], type const[SOCK_STREAM], proto const[0]) sock_tcp6
|
|
|
|
# Generic TCP socket options
|
|
|
|
tcp_option_types_int = TCP_NODELAY, TCP_MAXSEG, TCP_NOPUSH, TCP_NOOPT, TCP_MD5SIG, TCP_LOG, TCP_DELACK, TCP_KEEPINIT, TCP_KEEPIDLE, TCP_KEEPINTVL, TCP_KEEPCNT, TCP_PCAP_OUT, TCP_PCAP_IN
|
|
|
|
tcp_option_types_buf = TCP_INFO, TCP_LOGBUF, TCP_LOGID, TCP_LOGDUMP, TCP_LOGDUMPID, TCP_CONGESTION, TCP_CCALGOOPT, TCP_FASTOPEN, TCP_FUNCTION_BLK
|
|
|
|
getsockopt$inet_tcp_int(fd sock_tcp, level const[IPPROTO_TCP], optname flags[tcp_option_types_int], optval ptr[out, int32], optlen ptr[inout, len[optval, int32]])
|
|
setsockopt$inet_tcp_int(fd sock_tcp, level const[IPPROTO_TCP], optname flags[tcp_option_types_int], optval ptr[in, int32], optlen len[optval])
|
|
getsockopt$inet6_tcp_int(fd sock_tcp6, level const[IPPROTO_TCP], optname flags[tcp_option_types_int], optval ptr[out, int32], optlen ptr[inout, len[optval, int32]])
|
|
setsockopt$inet6_tcp_int(fd sock_tcp6, level const[IPPROTO_TCP], optname flags[tcp_option_types_int], optval ptr[in, int32], optlen len[optval])
|
|
|
|
getsockopt$inet_tcp_buf(fd sock_tcp, level const[IPPROTO_TCP], optname flags[tcp_option_types_buf], optval buffer[out], optlen ptr[inout, len[optval, int32]])
|
|
setsockopt$inet_tcp_buf(fd sock_tcp, level const[IPPROTO_TCP], optname flags[tcp_option_types_buf], optval buffer[in], optlen len[optval])
|
|
getsockopt$inet6_tcp_buf(fd sock_tcp6, level const[IPPROTO_TCP], optname flags[tcp_option_types_buf], optval buffer[out], optlen ptr[inout, len[optval, int32]])
|
|
setsockopt$inet6_tcp_buf(fd sock_tcp6, level const[IPPROTO_TCP], optname flags[tcp_option_types_buf], optval buffer[in], optlen len[optval])
|
|
|
|
# Specific TCP socket options
|
|
|
|
setsockopt$inet_tcp_TCP_CONGESTION(fd sock_tcp, level const[IPPROTO_TCP], optname const[TCP_CONGESTION], optval ptr[in, string[tcp_congestion_control_alg_names]], optlen len[optval])
|
|
setsockopt$inet6_tcp_TCP_CONGESTION(fd sock_tcp6, level const[IPPROTO_TCP], optname const[TCP_CONGESTION], optval ptr[in, string[tcp_congestion_control_alg_names]], optlen len[optval])
|
|
|
|
tcp_congestion_control_alg_names = "cdg", "chd", "cubic", "dctcp", "hd", "htcp", "newreno", "vegas"
|
|
|
|
setsockopt$inet_tcp_TCP_FUNCTION_BLK(fd sock_tcp, level const[IPPROTO_TCP], optname const[TCP_FUNCTION_BLK], optval ptr[in, tcp_function_set], optlen len[optval])
|
|
setsockopt$inet6_tcp_TCP_FUNCTION_BLK(fd sock_tcp6, level const[IPPROTO_TCP], optname const[TCP_FUNCTION_BLK], optval ptr[in, tcp_function_set], optlen len[optval])
|
|
|
|
tcp_function_set {
|
|
function_set_name string[tcp_function_set_names, TCP_FUNCTION_NAME_LEN_MAX]
|
|
pcbcnt int32
|
|
}
|
|
|
|
tcp_function_set_names = "freebsd", "rack", "bbr"
|
|
|
|
setsockopt$inet_tcp_TCP_FASTOPEN(fd sock_tcp, level const[IPPROTO_TCP], optname const[TCP_FASTOPEN], optval ptr[in, tcp_fastopen], optlen len[optval])
|
|
setsockopt$inet6_tcp_TCP_FASTOPEN(fd sock_tcp6, level const[IPPROTO_TCP], optname const[TCP_FASTOPEN], optval ptr[in, tcp_fastopen], optlen len[optval])
|
|
|
|
tcp_fastopen {
|
|
enable int32
|
|
psk array[int8, TCP_FASTOPEN_PSK_LEN]
|
|
}
|