github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/socket_x25.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/x25.h>
     7  include <net/x25.h>
     8  
     9  resource sock_x25[sock]
    10  
    11  syz_init_net_socket$x25(domain const[AF_X25], type const[SOCK_SEQPACKET], proto const[0]) sock_x25
    12  bind$x25(fd sock_x25, addr ptr[in, sockaddr_x25], addrlen len[addr])
    13  connect$x25(fd sock_x25, addr ptr[in, sockaddr_x25], addrlen len[addr])
    14  accept4$x25(fd sock_x25, peer ptr[out, sockaddr_x25, opt], peerlen ptr[inout, len[peer, int32]], flags flags[accept_flags]) sock_x25
    15  sendto$x25(fd sock_x25, buf ptr[in, array[int8]], len len[buf], f flags[send_flags], addr ptr[in, sockaddr_x25, opt], addrlen len[addr])
    16  recvfrom$x25(fd sock_x25, buf ptr[out, array[int8]], len len[buf], f flags[recv_flags], addr ptr[in, sockaddr_x25, opt], addrlen len[addr])
    17  setsockopt$X25_QBITINCL(fd sock_x25, level const[SOL_X25], opt const[X25_QBITINCL], arg ptr[in, bool32], arglen len[arg])
    18  getsockopt$X25_QBITINCL(fd sock_x25, level const[SOL_X25], opt const[X25_QBITINCL], arg ptr[out, int32], arglen ptr[inout, len[arg, int32]])
    19  
    20  ioctl$sock_x25_SIOCADDRT(fd sock_x25, cmd const[SIOCADDRT], arg ptr[in, x25_route_struct])
    21  ioctl$sock_x25_SIOCDELRT(fd sock_x25, cmd const[SIOCDELRT], arg ptr[in, x25_route_struct])
    22  ioctl$SIOCX25GSUBSCRIP(fd sock_x25, cmd const[SIOCX25GSUBSCRIP], arg ptr[in, x25_subscrip_struct])
    23  ioctl$SIOCX25SSUBSCRIP(fd sock_x25, cmd const[SIOCX25SSUBSCRIP], arg ptr[in, x25_subscrip_struct])
    24  ioctl$SIOCX25GFACILITIES(fd sock_x25, cmd const[SIOCX25GFACILITIES], arg ptr[out, x25_facilities])
    25  ioctl$SIOCX25SFACILITIES(fd sock_x25, cmd const[SIOCX25SFACILITIES], arg ptr[in, x25_facilities])
    26  ioctl$SIOCX25GDTEFACILITIES(fd sock_x25, cmd const[SIOCX25GDTEFACILITIES], arg ptr[out, x25_dte_facilities])
    27  ioctl$SIOCX25SDTEFACILITIES(fd sock_x25, cmd const[SIOCX25SDTEFACILITIES], arg ptr[in, x25_dte_facilities])
    28  ioctl$SIOCX25GCALLUSERDATA(fd sock_x25, cmd const[SIOCX25GCALLUSERDATA], arg ptr[in, x25_calluserdata])
    29  ioctl$SIOCX25SCALLUSERDATA(fd sock_x25, cmd const[SIOCX25SCALLUSERDATA], arg ptr[in, x25_calluserdata])
    30  ioctl$SIOCX25GCAUSEDIAG(fd sock_x25, cmd const[SIOCX25GCAUSEDIAG], arg ptr[in, x25_causediag])
    31  ioctl$SIOCX25SCAUSEDIAG(fd sock_x25, cmd const[SIOCX25SCAUSEDIAG], arg ptr[in, x25_causediag])
    32  ioctl$SIOCX25SCUDMATCHLEN(fd sock_x25, cmd const[SIOCX25SCUDMATCHLEN], arg ptr[in, x25_subaddr])
    33  ioctl$SIOCX25CALLACCPTAPPRV(fd sock_x25, cmd const[SIOCX25CALLACCPTAPPRV])
    34  ioctl$SIOCX25SENDCALLACCPT(fd sock_x25, cmd const[SIOCX25SENDCALLACCPT])
    35  
    36  sockaddr_x25 {
    37  	sx25_family	const[AF_X25, int16]
    38  	sx25_addr	x25_address
    39  }
    40  
    41  x25_address [
    42  	null	x25_address_null
    43  	remote	x25_address_remote
    44  ]
    45  
    46  type x25_address_null string["               "]
    47  
    48  x25_address_remote {
    49  	prefix	array[const[0xcc, int8], 14]
    50  	id	proc[0x20, 4, int8]
    51  	z	const[0, int8]
    52  }
    53  
    54  x25_route_struct {
    55  	address		x25_address
    56  	sigdigits	int32[0:15]
    57  	device		string[devnames, 200]
    58  }
    59  
    60  x25_subscrip_struct {
    61  	device			string[devnames, X25_SUBSCRIP_DEVICE_SIZE]
    62  	global_facil_mask	intptr
    63  	extended		int32
    64  }
    65  
    66  define X25_SUBSCRIP_DEVICE_SIZE	200 - sizeof(long)
    67  
    68  x25_facilities {
    69  	winsize_in	int32[1:127]
    70  	winsize_out	int32
    71  	pacsize_in	int32[X25_PS16:X25_PS4096]
    72  	pacsize_out	int32[X25_PS16:X25_PS4096]
    73  	throughput	int32
    74  	reverse		flags[x25_facilities_reverse, int32]
    75  }
    76  
    77  x25_facilities_reverse = 0, 0x81
    78  
    79  x25_dte_facilities {
    80  	delay_cumul	int16
    81  	delay_target	int16
    82  	delay_max	int16
    83  	min_throughput	int8
    84  	expedited	int8
    85  	calling_len	int8[0:X25_MAX_AE_LEN]
    86  	called_len	int8[0:X25_MAX_AE_LEN]
    87  	calling_ae	array[int8, 20]
    88  	called_ae	array[int8, 20]
    89  }
    90  
    91  x25_calluserdata {
    92  	cudlength	int32[0:128]
    93  	cuddata		array[int8, 128]
    94  }
    95  
    96  x25_causediag {
    97  	cause		int8
    98  	diagnostic	int8
    99  }
   100  
   101  x25_subaddr {
   102  	cudmatchlength	int32[0:X25_MAX_CUD_LEN]
   103  }