github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/socket_rose.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 include <linux/socket.h> 5 include <linux/net.h> 6 include <uapi/linux/rose.h> 7 8 resource sock_rose[sock] 9 10 syz_init_net_socket$rose(domain const[AF_ROSE], type const[SOCK_SEQPACKET], proto const[0]) sock_rose 11 bind$rose(fd sock_rose, addr ptr[in, sockaddr_rose_any], addrlen len[addr]) 12 connect$rose(fd sock_rose, addr ptr[in, sockaddr_rose_any], addrlen len[addr]) 13 accept4$rose(fd sock_rose, peer ptr[out, sockaddr_rose_any, opt], peerlen ptr[inout, len[peer, int32]], flags flags[accept_flags]) sock_rose 14 sendto$rose(fd sock_rose, buf ptr[in, array[int8]], len len[buf], f flags[send_flags], addr ptr[in, sockaddr_rose_any, opt], addrlen len[addr]) 15 recvfrom$rose(fd sock_rose, buf ptr[out, array[int8]], len len[buf], f flags[recv_flags], addr ptr[in, sockaddr_rose_any, opt], addrlen len[addr]) 16 setsockopt$rose(fd sock_rose, level const[SOL_ROSE], opt flags[rose_sockopts], arg ptr[in, int32], arglen len[arg]) 17 getsockopt$rose(fd sock_rose, level const[SOL_ROSE], opt flags[rose_sockopts], arg ptr[out, int32], arglen ptr[inout, len[arg, int32]]) 18 19 rose_sockopts = ROSE_DEFER, ROSE_T1, ROSE_T2, ROSE_T3, ROSE_IDLE, ROSE_QBITINCL, ROSE_HOLDBACK 20 21 ioctl$sock_rose_SIOCADDRT(fd sock_rose, cmd const[SIOCADDRT], arg ptr[in, rose_route_struct]) 22 ioctl$sock_rose_SIOCDELRT(fd sock_rose, cmd const[SIOCDELRT], arg ptr[in, rose_route_struct]) 23 ioctl$sock_rose_SIOCRSCLRRT(fd sock_rose, cmd const[SIOCRSCLRRT]) 24 ioctl$SIOCRSGCAUSE(fd sock_rose, cmd const[SIOCRSGCAUSE], arg ptr[out, int16]) 25 ioctl$SIOCRSSCAUSE(fd sock_rose, cmd const[SIOCRSSCAUSE], arg ptr[in, int16]) 26 ioctl$SIOCRSSL2CALL(fd sock_rose, cmd const[SIOCRSSL2CALL], arg ptr[in, ax25_address]) 27 ioctl$SIOCRSGL2CALL(fd sock_rose, cmd const[SIOCRSGL2CALL], arg ptr[out, ax25_address]) 28 ioctl$SIOCRSACCEPT(fd sock_rose, cmd const[SIOCRSACCEPT]) 29 30 sockaddr_rose_any [ 31 short sockaddr_rose 32 full full_sockaddr_rose 33 ] [varlen] 34 35 sockaddr_rose { 36 srose_family const[AF_ROSE, int16] 37 srose_addr rose_address 38 srose_call ax25_address 39 srose_ndigis const[1, int32] 40 srose_digi ax25_address 41 } 42 43 full_sockaddr_rose { 44 srose_family const[AF_ROSE, int16] 45 srose_addr rose_address 46 srose_call ax25_address 47 srose_ndigis int32[0:ROSE_MAX_DIGIS] 48 srose_digis array[ax25_address, ROSE_MAX_DIGIS] 49 } 50 51 rose_address [ 52 remote rose_address_remote 53 dev rose_address_dev 54 ] [size[5]] 55 56 # Just some address without special meaning. 57 rose_address_remote { 58 b0 const[0xcc, int8] 59 b1 const[0xcc, int8] 60 b2 const[0xcc, int8] 61 b3 const[0xcc, int8] 62 b4 proc[0, 4, int8] 63 } 64 65 # This is what we assign to rose* devices in initialize_netdevices_init: bb:bb:bb:01:%02hx 66 rose_address_dev { 67 b0 const[0xbb, int8] 68 b1 const[0xbb, int8] 69 b2 const[0xbb, int8] 70 b3 const[0x1, int8] 71 b4 proc[0, 1, int8] 72 } 73 74 rose_route_struct { 75 address rose_address 76 mask int16 77 neighbour ax25_address 78 device ax25_devname 79 ndigis int8[0:AX25_MAX_DIGIS] 80 digipeaters array[ax25_address, AX25_MAX_DIGIS] 81 }