syzkaller/sys/freebsd/socket_inet_udp.txt
Michael Tuexen f162ad97ac sys/freebsd: improve udp tests
Add support for the UDP_ENCAP. Add required includes and
remove the Linux specific ones.
2018-12-04 14:15:42 +00:00

25 lines
1.1 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: UDP support
include <sys/types.h>
include <sys/socket.h>
include <netinet/in.h>
include <netinet/udp.h>
resource sock_udp[sock_in]
socket$inet_udp(domain const[AF_INET], type const[SOCK_DGRAM], proto const[0]) sock_udp
resource sock_udp6[sock_in6]
socket$inet6_udp(domain const[AF_INET6], type const[SOCK_DGRAM], proto const[0]) sock_udp6
udp_option_types = UDP_ENCAP
getsockopt$inet_udp(fd sock_udp, level const[IPPROTO_UDP], optname flags[udp_option_types], optval ptr[out, int32], optlen ptr[inout, len[optval, int32]])
setsockopt$inet_udp(fd sock_udp, level const[IPPROTO_UDP], optname flags[udp_option_types], optval ptr[in, int32], optlen len[optval])
getsockopt$inet6_udp(fd sock_udp6, level const[IPPROTO_UDP], optname flags[udp_option_types], optval ptr[out, int32], optlen ptr[inout, len[optval, int32]])
setsockopt$inet6_udp(fd sock_udp6, level const[IPPROTO_UDP], optname flags[udp_option_types], optval ptr[in, int32], optlen len[optval])