syzkaller/sys/socket_llc.txt
2017-05-29 17:06:14 +02:00

53 lines
2.5 KiB
Plaintext

# Copyright 2017 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
# http://www.bocc.de/llcsocket.c
# AF_LLC support.
include <linux/socket.h>
include <linux/net.h>
include <linux/if_ether.h>
include <linux/if_arp.h>
include <linux/llc.h>
resource sock_llc[sock]
socket$llc(domain const[AF_LLC], type flags[llc_socket_type], proto const[0]) sock_llc
socketpair$llc(domain const[AF_LLC], type flags[llc_socket_type], proto const[0], fds ptr[out, llc_pair])
bind$llc(fd sock_llc, addr ptr[in, sockaddr_llc], addrlen len[addr])
connect$llc(fd sock_llc, addr ptr[in, sockaddr_llc], addrlen len[addr])
accept$llc(fd sock_llc, peer ptr[out, sockaddr_llc, opt], peerlen ptr[inout, len[peer, int32]]) sock_llc
accept4$llc(fd sock_llc, peer ptr[out, sockaddr_llc, opt], peerlen ptr[inout, len[peer, int32]], flags flags[accept_flags]) sock_llc
sendto$llc(fd sock_llc, buf buffer[in], len len[buf], f flags[send_flags], addr ptr[in, sockaddr_llc, opt], addrlen len[addr])
recvfrom$llc(fd sock_llc, buf buffer[out], len len[buf], f flags[recv_flags], addr ptr[in, sockaddr_llc, opt], addrlen len[addr])
getsockname$llc(fd sock_llc, addr ptr[out, sockaddr_llc], addrlen ptr[inout, len[addr, int32]])
getpeername$llc(fd sock_llc, peer ptr[out, sockaddr_llc], peerlen ptr[inout, len[peer, int32]])
llc_socket_type = SOCK_DGRAM, SOCK_STREAM
llc_protocols = ETH_P_802_3, ETH_P_AX25, ETH_P_ALL, ETH_P_802_2, ETH_P_SNAP, ETH_P_DDCMP, ETH_P_WAN_PPP, ETH_P_PPP_MP, ETH_P_LOCALTALK, ETH_P_CAN, ETH_P_CANFD, ETH_P_PPPTALK, ETH_P_TR_802_2, ETH_P_MOBITEX, ETH_P_CONTROL, ETH_P_IRDA, ETH_P_ECONET, ETH_P_HDLC, ETH_P_ARCNET, ETH_P_DSA, ETH_P_TRAILER, ETH_P_PHONET, ETH_P_IEEE802154, ETH_P_CAIF, ETH_P_XDSA
llc_pair {
fd0 sock_llc
fd1 sock_llc
}
sockaddr_llc {
sllc_family const[AF_LLC, int16]
sllc_protocol flags[llc_protocols, int16be]
sllc_test int8
sllc_xid int8
sllc_ua int8
sllc_sap int8
sll_addr mac_addr
pad array[const[0, int8], 2]
}
# Generic options
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
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]])
setsockopt$llc_int(fd sock_llc, level const[SOL_LLC], optname flags[llc_option_types_int], optval ptr[in, int32], optlen len[optval])