github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/socket_llc.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 # http://www.bocc.de/llcsocket.c 5 6 # AF_LLC support. 7 8 include <linux/socket.h> 9 include <linux/net.h> 10 include <linux/if_ether.h> 11 include <linux/if_arp.h> 12 include <linux/llc.h> 13 14 resource sock_llc[sock] 15 16 syz_init_net_socket$llc(domain const[AF_LLC], type flags[llc_socket_type], proto const[0]) sock_llc 17 bind$llc(fd sock_llc, addr ptr[in, sockaddr_llc], addrlen len[addr]) 18 connect$llc(fd sock_llc, addr ptr[in, sockaddr_llc], addrlen len[addr]) 19 accept4$llc(fd sock_llc, peer ptr[out, sockaddr_llc, opt], peerlen ptr[inout, len[peer, int32]], flags flags[accept_flags]) sock_llc 20 sendto$llc(fd sock_llc, buf buffer[in], len len[buf], f flags[send_flags], addr ptr[in, sockaddr_llc, opt], addrlen len[addr]) 21 recvfrom$llc(fd sock_llc, buf buffer[out], len len[buf], f flags[recv_flags], addr ptr[in, sockaddr_llc, opt], addrlen len[addr]) 22 getsockname$llc(fd sock_llc, addr ptr[out, sockaddr_llc], addrlen ptr[inout, len[addr, int32]]) 23 getpeername$llc(fd sock_llc, peer ptr[out, sockaddr_llc], peerlen ptr[inout, len[peer, int32]]) 24 25 llc_socket_type = SOCK_DGRAM, SOCK_STREAM 26 27 sockaddr_llc { 28 sllc_family const[AF_LLC, int16] 29 sllc_arphrd flags[dev_type_arphdr, int16] 30 sllc_test int8 31 sllc_xid int8 32 sllc_ua int8 33 sllc_sap int8 34 sll_addr mac_addr 35 } [size[SOCKADDR_SIZE]] 36 37 # Generic options 38 39 llc_option_types_int = LLC_OPT_RETRY, LLC_OPT_SIZE, LLC_OPT_ACK_TMR_EXP, LLC_OPT_P_TMR_EXP, LLC_OPT_REJ_TMR_EXP, LLC_OPT_BUSY_TMR_EXP, LLC_OPT_TX_WIN, LLC_OPT_RX_WIN, LLC_OPT_PKTINFO 40 41 getsockopt$llc_int(fd sock_llc, level const[SOL_LLC], optname flags[llc_option_types_int], optval ptr[out, int32], optlen ptr[inout, len[optval, int32]]) 42 setsockopt$llc_int(fd sock_llc, level const[SOL_LLC], optname flags[llc_option_types_int], optval ptr[in, int32], optlen len[optval])