github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/socket_netrom.txt (about) 1 # Copyright 2016 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 <linux/net.h> 5 include <uapi/linux/netrom.h> 6 include <uapi/linux/ax25.h> 7 include <asm/ioctls.h> 8 9 resource sock_netrom[sock] 10 11 syz_init_net_socket$netrom(domain const[AF_NETROM], type const[SOCK_SEQPACKET], proto const[0]) sock_netrom 12 bind$netrom(fd sock_netrom, addr ptr[in, full_sockaddr_ax25], addrlen len[addr]) 13 connect$netrom(fd sock_netrom, addr ptr[in, full_sockaddr_ax25], addrlen len[addr]) 14 accept$netrom(fd sock_netrom, peer ptr[out, full_sockaddr_ax25, opt], peerlen ptr[inout, len[peer, int32]]) sock_netrom 15 accept4$netrom(fd sock_netrom, peer ptr[out, full_sockaddr_ax25, opt], peerlen ptr[inout, len[peer, int32]], flags flags[accept_flags]) sock_netrom 16 sendto$netrom(fd sock_netrom, buf ptr[in, array[int8]], len len[buf], f flags[send_flags], addr ptr[in, full_sockaddr_ax25, opt], addrlen len[addr]) 17 recvfrom$netrom(fd sock_netrom, buf ptr[out, array[int8]], len len[buf], f flags[recv_flags], addr ptr[in, full_sockaddr_ax25, opt], addrlen len[addr]) 18 getsockname$netrom(fd sock_netrom, addr ptr[out, full_sockaddr_ax25], addrlen ptr[inout, len[addr, int32]]) 19 getpeername$netrom(fd sock_netrom, peer ptr[out, full_sockaddr_ax25], peerlen ptr[inout, len[peer, int32]]) 20 21 setsockopt$netrom_NETROM_T1(fd sock_netrom, level const[SOL_NETROM], opt const[NETROM_T1], arg ptr[in, int32], arglen len[arg]) 22 setsockopt$netrom_NETROM_T2(fd sock_netrom, level const[SOL_NETROM], opt const[NETROM_T2], arg ptr[in, int32], arglen len[arg]) 23 setsockopt$netrom_NETROM_N2(fd sock_netrom, level const[SOL_NETROM], opt const[NETROM_N2], arg ptr[in, int32], arglen len[arg]) 24 setsockopt$netrom_NETROM_T4(fd sock_netrom, level const[SOL_NETROM], opt const[NETROM_T4], arg ptr[in, int32], arglen len[arg]) 25 setsockopt$netrom_NETROM_IDLE(fd sock_netrom, level const[SOL_NETROM], opt const[NETROM_IDLE], arg ptr[in, int32], arglen len[arg]) 26 27 getsockopt$netrom_NETROM_T1(fd sock_netrom, level const[SOL_NETROM], opt const[NETROM_T1], arg ptr[out, int32], arglen ptr[inout, len[arg, int32]]) 28 getsockopt$netrom_NETROM_T2(fd sock_netrom, level const[SOL_NETROM], opt const[NETROM_T2], arg ptr[in, int32], arglen ptr[inout, len[arg, int32]]) 29 getsockopt$netrom_NETROM_N2(fd sock_netrom, level const[SOL_NETROM], opt const[NETROM_N2], arg ptr[in, int32], arglen ptr[inout, len[arg, int32]]) 30 getsockopt$netrom_NETROM_T4(fd sock_netrom, level const[SOL_NETROM], opt const[NETROM_T4], arg ptr[in, int32], arglen ptr[inout, len[arg, int32]]) 31 getsockopt$netrom_NETROM_IDLE(fd sock_netrom, level const[SOL_NETROM], opt const[NETROM_IDLE], arg ptr[in, int32], arglen ptr[inout, len[arg, int32]]) 32 33 ioctl$sock_netrom_SIOCADDRT(fd sock_netrom, cmd const[SIOCADDRT], arg ptr[in, nr_route_struct]) 34 ioctl$sock_netrom_SIOCDELRT(fd sock_netrom, cmd const[SIOCDELRT], arg ptr[in, nr_route_struct]) 35 ioctl$SIOCNRDECOBS(fd sock_netrom, cmd const[SIOCNRDECOBS]) 36 37 # This is what we assign to nr* devices in initialize_netdevices_init: bb:bb:bb:bb:bb:00:%02hx 38 address_netrom_dev { 39 b0 const[0xbb, int8] 40 b1 const[0xbb, int8] 41 b2 const[0xbb, int8] 42 b3 const[0xbb, int8] 43 b4 const[0xbb, int8] 44 b5 const[0x0, int8] 45 b6 proc[0, 1, int8] 46 } 47 48 nr_route_struct { 49 type flags[nr_route_type, int32] 50 callsign ax25_address 51 device ax25_devname 52 quality int32 53 mnemonic string[nr_route_mnemonics, 7] 54 neighbour ax25_address 55 obs_count int32 56 ndigis int32[0:AX25_MAX_DIGIS] 57 digipeaters array[ax25_address, AX25_MAX_DIGIS] 58 } 59 60 nr_route_type = NETROM_NEIGH, NETROM_NODE 61 nr_route_mnemonics = "syz0", "syz1"