github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/socket_pppox.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/net.h> 5 include <uapi/linux/if_pppox.h> 6 include <uapi/linux/ppp-ioctl.h> 7 include <uapi/linux/if_pppol2tp.h> 8 9 resource sock_pppox[sock] 10 resource sock_pppoe[sock_pppox] 11 resource sock_pppl2tp[sock_pppox] 12 resource sock_pptp[sock_pppox] 13 14 type pptp_call_id int16be[0:3] 15 type sid_t int16[0:4] 16 type l2tp_tunnel[BASE] BASE[0:4] 17 type l2tp_session[BASE] BASE[0:4] 18 19 socket$pppoe(domain const[AF_PPPOX], type const[SOCK_STREAM], proto const[PX_PROTO_OE]) sock_pppoe 20 connect$pppoe(fd sock_pppoe, addr ptr[in, sockaddr_pppoe], addrlen len[addr]) 21 ioctl$PPPOEIOCSFWD(fd sock_pppoe, cmd const[PPPOEIOCSFWD], arg ptr[in, sockaddr_pppoe]) 22 ioctl$PPPOEIOCDFWD(fd sock_pppoe, cmd const[PPPOEIOCDFWD], arg const[0]) 23 24 socket$pppl2tp(domain const[AF_PPPOX], type const[SOCK_STREAM], proto const[PX_PROTO_OL2TP]) sock_pppl2tp 25 connect$pppl2tp(fd sock_pppl2tp, addr ptr[in, sockaddr_pppl2tp], addrlen len[addr]) 26 ioctl$PPPIOCGL2TPSTATS(fd sock_pppl2tp, cmd const[PPPIOCGL2TPSTATS], arg ptr[in, array[int8]]) 27 ioctl$SIOCGIFMTU(fd sock_pppl2tp, cmd const[SIOCGIFMTU], arg ptr[out, ifreq_t[int32]]) 28 ioctl$SIOCSIFMTU(fd sock_pppl2tp, cmd const[SIOCSIFMTU], arg ptr[in, ifreq_t[int32]]) 29 setsockopt$pppl2tp_PPPOL2TP_SO_DEBUG(fd sock_pppl2tp, level const[SOL_PPPOL2TP], optname const[PPPOL2TP_SO_DEBUG], optval int32, optlen bytesize[optval]) 30 setsockopt$pppl2tp_PPPOL2TP_SO_RECVSEQ(fd sock_pppl2tp, level const[SOL_PPPOL2TP], optname const[PPPOL2TP_SO_RECVSEQ], optval bool32, optlen bytesize[optval]) 31 setsockopt$pppl2tp_PPPOL2TP_SO_SENDSEQ(fd sock_pppl2tp, level const[SOL_PPPOL2TP], optname const[PPPOL2TP_SO_SENDSEQ], optval bool32, optlen bytesize[optval]) 32 setsockopt$pppl2tp_PPPOL2TP_SO_LNSMODE(fd sock_pppl2tp, level const[SOL_PPPOL2TP], optname const[PPPOL2TP_SO_LNSMODE], optval bool32, optlen bytesize[optval]) 33 setsockopt$pppl2tp_PPPOL2TP_SO_REORDERTO(fd sock_pppl2tp, level const[SOL_PPPOL2TP], optname const[PPPOL2TP_SO_REORDERTO], optval int32, optlen bytesize[optval]) 34 35 socket$pptp(domain const[AF_PPPOX], type const[SOCK_STREAM], proto const[PX_PROTO_PPTP]) sock_pptp 36 bind$pptp(fd sock_pptp, addr ptr[in, sockaddr_pptp], addrlen len[addr]) 37 connect$pptp(fd sock_pptp, addr ptr[in, sockaddr_pptp], addrlen len[addr]) 38 39 ioctl$PPPIOCGCHAN(fd sock_pppox, cmd const[PPPIOCGCHAN], arg ptr[out, int32]) 40 ioctl$PPPIOCGFLAGS(fd sock_pppox, cmd const[PPPIOCGFLAGS], arg ptr[out, int32]) 41 ioctl$PPPIOCSFLAGS(fd sock_pppox, cmd const[PPPIOCSFLAGS], arg ptr[in, flags[ppp_flags, int32]]) 42 ioctl$PPPIOCGMRU(fd sock_pppox, cmd const[PPPIOCGMRU], arg ptr[out, int32]) 43 ioctl$PPPIOCSMRU(fd sock_pppox, cmd const[PPPIOCSMRU], arg ptr[in, int32]) 44 45 define SOCKADDR_PPPOX_SIZE sizeof(struct sockaddr_pppox) 46 47 sockaddr_pppoe { 48 sa_family const[AF_PPPOX, int16] 49 sa_protocol const[PX_PROTO_OE, int32] 50 pppoe pppoe_addr 51 } [packed, size[SOCKADDR_PPPOX_SIZE]] 52 53 pppoe_addr { 54 sid sid_t 55 remote mac_addr 56 dev devname 57 } 58 59 sockaddr_pppl2tp [ 60 pppol2tp sockaddr_pppol2tp 61 pppol2tpin6 sockaddr_pppol2tpin6 62 pppol2tpv3 sockaddr_pppol2tpv3 63 pppol2tpv3in6 sockaddr_pppol2tpv3in6 64 ] [varlen] 65 66 type sockaddr_pppol2tp sockaddr_pppl2tp_t[pppol2tp_addr] 67 type sockaddr_pppol2tpin6 sockaddr_pppl2tp_t[pppol2tpin6_addr] 68 type sockaddr_pppol2tpv3 sockaddr_pppl2tp_t[pppol2tpv3_addr] 69 type sockaddr_pppol2tpv3in6 sockaddr_pppl2tp_t[pppol2tpv3in6_addr] 70 71 type sockaddr_pppl2tp_t[ADDR] { 72 sa_family const[AF_PPPOX, int16] 73 sa_protocol const[PX_PROTO_OL2TP, int32] 74 addr ADDR 75 } [packed] 76 77 type pppol2tp_addr_t[BASE] { 78 pid const[0, int32] 79 fd sock 80 addr sockaddr_in 81 s_tunnel l2tp_tunnel[BASE] 82 s_session l2tp_session[BASE] 83 d_tunnel l2tp_tunnel[BASE] 84 d_session l2tp_session[BASE] 85 } 86 87 type pppol2tpin6_addr_t[BASE] { 88 pid const[0, int32] 89 fd sock 90 s_tunnel l2tp_tunnel[BASE] 91 s_session l2tp_session[BASE] 92 d_tunnel l2tp_tunnel[BASE] 93 d_session l2tp_session[BASE] 94 addr sockaddr_in6 95 } 96 97 type pppol2tp_addr pppol2tp_addr_t[int16] 98 type pppol2tpv3_addr pppol2tp_addr_t[int32] 99 type pppol2tpin6_addr pppol2tpin6_addr_t[int16] 100 type pppol2tpv3in6_addr pppol2tpin6_addr_t[int32] 101 102 sockaddr_pptp { 103 sa_family const[AF_PPPOX, int16] 104 sa_protocol const[PX_PROTO_PPTP, int32] 105 pptp pptp_addr 106 } [packed, size[SOCKADDR_PPPOX_SIZE]] 107 108 pptp_addr { 109 call_id pptp_call_id 110 sin_addr ipv4_addr 111 } 112 113 ppp_flags = SC_COMP_PROT, SC_COMP_AC, SC_COMP_TCP, SC_NO_TCP_CCID, SC_REJ_COMP_AC, SC_REJ_COMP_TCP, SC_CCP_OPEN, SC_CCP_UP, SC_ENABLE_IP, SC_LOOP_TRAFFIC, SC_MULTILINK, SC_MP_SHORTSEQ, SC_COMP_RUN, SC_DECOMP_RUN, SC_MP_XSHORTSEQ, SC_DEBUG, SC_LOG_INPKT, SC_LOG_OUTPKT, SC_LOG_RAWIN, SC_LOG_FLUSH, SC_SYNC, SC_MUST_COMP, SC_RCV_B7_0, SC_RCV_B7_1, SC_RCV_EVNP, SC_RCV_ODDP