github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/darwin/socket_inet6.txt (about) 1 # Copyright 2021 syzkaller project authors. All rights reserved. 2 # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 3 4 include <sys/types.h> 5 include <sys/param.h> 6 include <sys/socket.h> 7 include <netinet/in.h> 8 include <net/route.h> 9 include <sys/sockio.h> 10 11 # IPv6 sockets 12 13 resource sock_in6[sock] 14 15 sockaddr_in6 { 16 len len[parent, int8] 17 family const[AF_INET6, int8] 18 port sock_port 19 flow int32 20 addr ipv6_addr 21 scope int32 22 } 23 24 sockaddr_storage_in6 { 25 addr sockaddr_in6 26 pad array[const[0, int64], 12] 27 } 28 29 socket$inet6(domain const[AF_INET6], type flags[socket_type], proto int8) sock_in6 30 accept$inet6(fd sock_in6, peer ptr[out, sockaddr_in6, opt], peerlen ptr[inout, len[peer, int32]]) sock_in6 31 bind$inet6(fd sock_in6, addr ptr[in, sockaddr_in6], addrlen len[addr]) 32 connect$inet6(fd sock_in6, addr ptr[in, sockaddr_in6], addrlen len[addr]) 33 sendto$inet6(fd sock_in6, buf buffer[in], len len[buf], f flags[send_flags], addr ptr[in, sockaddr_in6, opt], addrlen len[addr]) 34 recvfrom$inet6(fd sock_in6, buf buffer[out], len len[buf], f flags[recv_flags], addr ptr[in, sockaddr_in6, opt], addrlen len[addr]) 35 getsockname$inet6(fd sock_in6, addr ptr[out, sockaddr_in6], addrlen ptr[inout, len[addr, int32]]) 36 getpeername$inet6(fd sock_in6, peer ptr[out, sockaddr_in6], peerlen ptr[inout, len[peer, int32]]) 37 38 # Generic IPv6 options 39 40 inet6_option_types_int = IPV6_2292DSTOPTS, IPV6_2292HOPLIMIT, IPV6_2292HOPOPTS, IPV6_2292NEXTHOP, IPV6_2292PKTINFO, IPV6_2292PKTOPTIONS, IPV6_2292RTHDR, IPV6_BOUND_IF, IPV6_CHECKSUM, IPV6_IPSEC_POLICY, IPV6_JOIN_GROUP, IPV6_LEAVE_GROUP, IPV6_MULTICAST_HOPS, IPV6_MULTICAST_IF, IPV6_MULTICAST_LOOP, IPV6_PORTRANGE, IPV6_PORTRANGE_DEFAULT, IPV6_PORTRANGE_HIGH, IPV6_PORTRANGE_LOW, IPV6_RECVTCLASS, IPV6_RTHDR_TYPE_0, IPV6_TCLASS, IPV6_UNICAST_HOPS, IPV6_V6ONLY 41 inet6_option_types_buf = IPV6_2292DSTOPTS, IPV6_2292HOPLIMIT, IPV6_2292HOPOPTS, IPV6_2292NEXTHOP, IPV6_2292PKTINFO, IPV6_2292PKTOPTIONS, IPV6_2292RTHDR, IPV6_BOUND_IF, IPV6_CHECKSUM, IPV6_IPSEC_POLICY, IPV6_JOIN_GROUP, IPV6_LEAVE_GROUP, IPV6_MULTICAST_HOPS, IPV6_MULTICAST_IF, IPV6_MULTICAST_LOOP, IPV6_PORTRANGE, IPV6_PORTRANGE_DEFAULT, IPV6_PORTRANGE_HIGH, IPV6_PORTRANGE_LOW, IPV6_RECVTCLASS, IPV6_RTHDR_TYPE_0, IPV6_TCLASS, IPV6_UNICAST_HOPS, IPV6_V6ONLY 42 43 getsockopt$inet6_int(fd sock_in6, level const[IPPROTO_IPV6], optname flags[inet6_option_types_int], optval ptr[out, int32], optlen ptr[inout, len[optval, int32]]) 44 setsockopt$inet6_int(fd sock_in6, level const[IPPROTO_IPV6], optname flags[inet6_option_types_int], optval ptr[in, int32], optlen len[optval]) 45 getsockopt$inet6_buf(fd sock_in6, level const[IPPROTO_IPV6], optname flags[inet6_option_types_buf], optval buffer[out], optlen ptr[inout, len[optval, int32]]) 46 setsockopt$inet6_buf(fd sock_in6, level const[IPPROTO_IPV6], optname flags[inet6_option_types_buf], optval buffer[in], optlen len[optval]) 47 48 # Specific IPv6 options 49 50 setsockopt$inet6_MCAST_JOIN_GROUP(fd sock_in6, level const[IPPROTO_IPV6], optname const[MCAST_JOIN_GROUP], optval ptr[in, group_req_in6], optlen len[optval]) 51 setsockopt$inet6_MCAST_LEAVE_GROUP(fd sock_in6, level const[IPPROTO_IPV6], optname const[MCAST_LEAVE_GROUP], optval ptr[in, group_req_in6], optlen len[optval]) 52 53 setsockopt$inet6_group_source_req(fd sock_in6, level const[IPPROTO_IPV6], optname flags[sockopt_opt_group_source_req], optval ptr[in, group_source_req_in6], optlen len[optval]) 54 55 group_req_in6 { 56 gr_interface int32 57 gr_group sockaddr_storage_in6 58 } 59 60 group_source_req_in6 { 61 gsr_interface int32 62 gsr_group sockaddr_storage_in6 63 gsr_source sockaddr_storage_in6 64 }