github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/socket_inet_udp.txt (about)

     1  # Copyright 2017 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  # AF_INET and AF_INET6: UDP support
     5  
     6  include <asm/ioctls.h>
     7  include <linux/udp.h>
     8  include <uapi/linux/sockios.h>
     9  
    10  resource sock_udp[sock_in]
    11  
    12  socket$inet_udp(domain const[AF_INET], type const[SOCK_DGRAM], proto const[0]) sock_udp
    13  socket$inet_udplite(domain const[AF_INET], type const[SOCK_DGRAM], proto const[IPPROTO_UDPLITE]) sock_udp
    14  
    15  resource sock_udp6[sock_in6]
    16  
    17  socket$inet6_udp(domain const[AF_INET6], type const[SOCK_DGRAM], proto const[0]) sock_udp6
    18  socket$inet6_udplite(domain const[AF_INET6], type const[SOCK_DGRAM], proto const[IPPROTO_UDPLITE]) sock_udp6
    19  
    20  # Generic UDP socket options
    21  
    22  udp_option_types_int = UDP_CORK, UDP_NO_CHECK6_TX, UDP_NO_CHECK6_RX, UDP_SEGMENT, UDPLITE_SEND_CSCOV, UDPLITE_RECV_CSCOV
    23  
    24  getsockopt$inet_udp_int(fd sock_udp, level const[IPPROTO_UDP], optname flags[udp_option_types_int], optval ptr[out, int32], optlen ptr[inout, len[optval, int32]])
    25  setsockopt$inet_udp_int(fd sock_udp, level const[IPPROTO_UDP], optname flags[udp_option_types_int], optval ptr[in, int32], optlen len[optval])
    26  getsockopt$inet6_udp_int(fd sock_udp6, level const[IPPROTO_UDP], optname flags[udp_option_types_int], optval ptr[out, int32], optlen ptr[inout, len[optval, int32]])
    27  setsockopt$inet6_udp_int(fd sock_udp6, level const[IPPROTO_UDP], optname flags[udp_option_types_int], optval ptr[in, int32], optlen len[optval])
    28  
    29  # Specific UDP socket options
    30  
    31  udp_encap_option_values = UDP_ENCAP_ESPINUDP_NON_IKE, UDP_ENCAP_ESPINUDP, UDP_ENCAP_L2TPINUDP, UDP_ENCAP_GTP0, UDP_ENCAP_GTP1U
    32  
    33  setsockopt$inet_udp_encap(fd sock_udp, level const[IPPROTO_UDP], optname const[UDP_ENCAP], optval ptr[in, flags[udp_encap_option_values, int32]], optlen len[optval])
    34  setsockopt$inet6_udp_encap(fd sock_udp6, level const[IPPROTO_UDP], optname const[UDP_ENCAP], optval ptr[in, flags[udp_encap_option_values, int32]], optlen len[optval])
    35  
    36  # UDP ioctls
    37  
    38  ioctl$sock_inet_udp_SIOCINQ(fd sock_udp, cmd const[SIOCINQ], arg ptr[out, int32])
    39  ioctl$sock_inet6_udp_SIOCINQ(fd sock_udp6, cmd const[SIOCINQ], arg ptr[out, int32])
    40  
    41  ioctl$sock_inet_udp_SIOCOUTQ(fd sock_udp, cmd const[SIOCOUTQ], arg ptr[out, int32])
    42  ioctl$sock_inet6_udp_SIOCOUTQ(fd sock_udp6, cmd const[SIOCOUTQ], arg ptr[out, int32])
    43  
    44  define UDPLITE_SEND_CSCOV	10
    45  define UDPLITE_RECV_CSCOV	11