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

     1  # Copyright 2018 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_RXRPC support.
     5  
     6  include <linux/socket.h>
     7  include <linux/net.h>
     8  include <uapi/linux/rxrpc.h>
     9  
    10  resource sock_rxrpc[sock]
    11  type rxrpc_service int16[0:4]
    12  
    13  socket$rxrpc(fam const[AF_RXRPC], type const[SOCK_DGRAM], proto flags[rxrpc_protos]) sock_rxrpc
    14  bind$rxrpc(fd sock_rxrpc, addr ptr[in, sockaddr_rxrpc], addrlen len[addr])
    15  connect$rxrpc(fd sock_rxrpc, addr ptr[in, sockaddr_rxrpc], addrlen len[addr])
    16  sendto$rxrpc(fd sock_rxrpc, buf ptr[in, array[int8]], len len[buf], f flags[send_flags], addr ptr[in, sockaddr_rxrpc, opt], addrlen len[addr])
    17  recvfrom$rxrpc(fd sock_rxrpc, buf ptr[out, array[int8]], len len[buf], f flags[recv_flags], addr ptr[in, sockaddr_rxrpc, opt], addrlen len[addr])
    18  setsockopt$RXRPC_EXCLUSIVE_CONNECTION(fd sock_rxrpc, level const[SOL_RXRPC], opt const[RXRPC_EXCLUSIVE_CONNECTION])
    19  setsockopt$RXRPC_SECURITY_KEY(fd sock_rxrpc, level const[SOL_RXRPC], opt const[RXRPC_SECURITY_KEY], arg ptr[in, string], arglen len[arg])
    20  setsockopt$RXRPC_SECURITY_KEYRING(fd sock_rxrpc, level const[SOL_RXRPC], opt const[RXRPC_SECURITY_KEYRING], arg ptr[in, string], arglen len[arg])
    21  setsockopt$RXRPC_MIN_SECURITY_LEVEL(fd sock_rxrpc, level const[SOL_RXRPC], opt const[RXRPC_MIN_SECURITY_LEVEL], arg ptr[in, int32[RXRPC_SECURITY_PLAIN:RXRPC_SECURITY_ENCRYPT]], arglen len[arg])
    22  setsockopt$RXRPC_UPGRADEABLE_SERVICE(fd sock_rxrpc, level const[SOL_RXRPC], opt const[RXRPC_UPGRADEABLE_SERVICE], arg ptr[in, array[rxrpc_service, 2]], arglen len[arg])
    23  
    24  rxrpc_protos = AF_INET, AF_INET6
    25  
    26  sockaddr_rxrpc [
    27  	in4	sockaddr_rxrpc_t[sockaddr_in]
    28  	in6	sockaddr_rxrpc_t[sockaddr_in6]
    29  ]
    30  
    31  type sockaddr_rxrpc_t[ADDR] {
    32  	srx_family	const[AF_RXRPC, int16]
    33  	srx_service	rxrpc_service
    34  	transport_type	const[SOCK_DGRAM, int16]
    35  	transport_len	bytesize[transport, int16]
    36  	transport	ADDR
    37  }