github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/dev_ppp.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/ioctl.h>
     5  include <uapi/linux/filter.h>
     6  include <uapi/linux/ppp-ioctl.h>
     7  include <uapi/linux/ppp_defs.h>
     8  
     9  resource fd_ppp[fd]
    10  # TODO: what is this?
    11  type ppp_unit int32[0:4]
    12  
    13  openat$ppp(fd const[AT_FDCWD], file ptr[in, string["/dev/ppp"]], flags flags[open_flags], mode const[0]) fd_ppp
    14  write$ppp(fd fd_ppp, data ptr[in, ppp_packet], size bytesize[data])
    15  
    16  ioctl$PPPIOCBRIDGECHAN(fd fd_ppp, cmd const[PPPIOCBRIDGECHAN], arg ptr[in, int32])
    17  ioctl$PPPIOCUNBRIDGECHAN(fd fd_ppp, cmd const[PPPIOCUNBRIDGECHAN])
    18  
    19  ioctl$PPPIOCNEWUNIT(fd fd_ppp, cmd const[PPPIOCNEWUNIT], arg ptr[in, ppp_unit])
    20  ioctl$PPPIOCATTACH(fd fd_ppp, cmd const[PPPIOCATTACH], arg ptr[in, ppp_unit])
    21  ioctl$PPPIOCATTCHAN(fd fd_ppp, cmd const[PPPIOCATTCHAN], arg ptr[in, ppp_unit])
    22  ioctl$PPPIOCCONNECT(fd fd_ppp, cmd const[PPPIOCCONNECT], arg ptr[in, ppp_unit])
    23  ioctl$PPPIOCDISCONN(fd fd_ppp, cmd const[PPPIOCDISCONN])
    24  ioctl$PPPIOCSCOMPRESS(fd fd_ppp, cmd const[PPPIOCSCOMPRESS])
    25  ioctl$PPPIOCGUNIT(fd fd_ppp, cmd const[PPPIOCGUNIT], arg ptr[out, int32])
    26  ioctl$PPPIOCSDEBUG(fd fd_ppp, cmd const[PPPIOCSDEBUG], arg ptr[in, int32])
    27  ioctl$PPPIOCGDEBUG(fd fd_ppp, cmd const[PPPIOCGDEBUG], arg ptr[out, int32])
    28  ioctl$PPPIOCGIDLE32(fd fd_ppp, cmd const[PPPIOCGIDLE32], arg ptr[out, ppp_idle32])
    29  ioctl$PPPIOCGIDLE64(fd fd_ppp, cmd const[PPPIOCGIDLE64], arg ptr[out, ppp_idle64])
    30  ioctl$PPPIOCGIDLE(fd fd_ppp, cmd const[PPPIOCGIDLE], arg ptr[out, array[int64, 2]])
    31  ioctl$PPPIOCSMAXCID(fd fd_ppp, cmd const[PPPIOCSMAXCID], arg ptr[in, int32])
    32  ioctl$PPPIOCGNPMODE(fd fd_ppp, cmd const[PPPIOCGNPMODE], arg ptr[in, npioctl])
    33  ioctl$PPPIOCSNPMODE(fd fd_ppp, cmd const[PPPIOCSNPMODE], arg ptr[in, npioctl])
    34  ioctl$PPPIOCSPASS(fd fd_ppp, cmd const[PPPIOCSPASS], arg ptr[in, sock_fprog])
    35  ioctl$PPPIOCSACTIVE(fd fd_ppp, cmd const[PPPIOCSACTIVE], arg ptr[in, sock_fprog])
    36  ioctl$PPPIOCSMRRU(fd fd_ppp, cmd const[PPPIOCSMRRU], arg ptr[in, int32])
    37  
    38  # NEED: these ioctl's are also defined for sock_pppox. We need multiple inheritance here (#322).
    39  ioctl$PPPIOCSMRU1(fd fd_ppp, cmd const[PPPIOCSMRU], arg ptr[in, int32])
    40  ioctl$PPPIOCSFLAGS1(fd fd_ppp, cmd const[PPPIOCSFLAGS], arg ptr[in, flags[ppp_flags, int32]])
    41  ioctl$PPPIOCGFLAGS1(fd fd_ppp, cmd const[PPPIOCGFLAGS], arg ptr[out, int32])
    42  
    43  ppp_proto = PPP_IP, PPP_AT, PPP_IPX, PPP_VJC_COMP, PPP_VJC_UNCOMP, PPP_MP, PPP_IPV6, PPP_COMPFRAG, PPP_COMP, PPP_MPLS_UC, PPP_MPLS_MC, PPP_IPCP, PPP_ATCP, PPP_IPXCP, PPP_IPV6CP, PPP_CCPFRAG, PPP_CCP, PPP_MPLSCP, PPP_LCP, PPP_PAP, PPP_LQR, PPP_CHAP, PPP_CBCP
    44  NPmode = NPMODE_PASS, NPMODE_DROP, NPMODE_ERROR, NPMODE_QUEUE
    45  
    46  npioctl {
    47  	protocol	flags[ppp_proto, int32]
    48  	mode		flags[NPmode, int32]
    49  }
    50  
    51  ppp_idle32 {
    52  	xmit_idle	int32
    53  	recv_idle	int32
    54  }
    55  
    56  ppp_idle64 {
    57  	xmit_idle	int64
    58  	recv_idle	int64
    59  }