0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef _PPP_IOCTL_H
0012 #define _PPP_IOCTL_H
0013
0014 #include <linux/types.h>
0015 #include <linux/compiler.h>
0016 #include <linux/ppp_defs.h>
0017
0018
0019
0020
0021 #define SC_COMP_PROT 0x00000001
0022 #define SC_COMP_AC 0x00000002
0023 #define SC_COMP_TCP 0x00000004
0024 #define SC_NO_TCP_CCID 0x00000008
0025 #define SC_REJ_COMP_AC 0x00000010
0026 #define SC_REJ_COMP_TCP 0x00000020
0027 #define SC_CCP_OPEN 0x00000040
0028 #define SC_CCP_UP 0x00000080
0029 #define SC_ENABLE_IP 0x00000100
0030 #define SC_LOOP_TRAFFIC 0x00000200
0031 #define SC_MULTILINK 0x00000400
0032 #define SC_MP_SHORTSEQ 0x00000800
0033 #define SC_COMP_RUN 0x00001000
0034 #define SC_DECOMP_RUN 0x00002000
0035 #define SC_MP_XSHORTSEQ 0x00004000
0036 #define SC_DEBUG 0x00010000
0037 #define SC_LOG_INPKT 0x00020000
0038 #define SC_LOG_OUTPKT 0x00040000
0039 #define SC_LOG_RAWIN 0x00080000
0040 #define SC_LOG_FLUSH 0x00100000
0041 #define SC_SYNC 0x00200000
0042 #define SC_MUST_COMP 0x00400000
0043 #define SC_MASK 0x0f600fff
0044
0045
0046 #define SC_XMIT_BUSY 0x10000000
0047 #define SC_RCV_ODDP 0x08000000
0048 #define SC_RCV_EVNP 0x04000000
0049 #define SC_RCV_B7_1 0x02000000
0050 #define SC_RCV_B7_0 0x01000000
0051 #define SC_DC_FERROR 0x00800000
0052 #define SC_DC_ERROR 0x00400000
0053
0054
0055 struct npioctl {
0056 int protocol;
0057 enum NPmode mode;
0058 };
0059
0060
0061 struct ppp_option_data {
0062 __u8 __user *ptr;
0063 __u32 length;
0064 int transmit;
0065 };
0066
0067
0068 struct pppol2tp_ioc_stats {
0069 __u16 tunnel_id;
0070 __u16 session_id;
0071 __u32 using_ipsec:1;
0072 __aligned_u64 tx_packets;
0073 __aligned_u64 tx_bytes;
0074 __aligned_u64 tx_errors;
0075 __aligned_u64 rx_packets;
0076 __aligned_u64 rx_bytes;
0077 __aligned_u64 rx_seq_discards;
0078 __aligned_u64 rx_oos_packets;
0079 __aligned_u64 rx_errors;
0080 };
0081
0082
0083
0084
0085
0086 #define PPPIOCGFLAGS _IOR('t', 90, int)
0087 #define PPPIOCSFLAGS _IOW('t', 89, int)
0088 #define PPPIOCGASYNCMAP _IOR('t', 88, int)
0089 #define PPPIOCSASYNCMAP _IOW('t', 87, int)
0090 #define PPPIOCGUNIT _IOR('t', 86, int)
0091 #define PPPIOCGRASYNCMAP _IOR('t', 85, int)
0092 #define PPPIOCSRASYNCMAP _IOW('t', 84, int)
0093 #define PPPIOCGMRU _IOR('t', 83, int)
0094 #define PPPIOCSMRU _IOW('t', 82, int)
0095 #define PPPIOCSMAXCID _IOW('t', 81, int)
0096 #define PPPIOCGXASYNCMAP _IOR('t', 80, ext_accm)
0097 #define PPPIOCSXASYNCMAP _IOW('t', 79, ext_accm)
0098 #define PPPIOCXFERUNIT _IO('t', 78)
0099 #define PPPIOCSCOMPRESS _IOW('t', 77, struct ppp_option_data)
0100 #define PPPIOCGNPMODE _IOWR('t', 76, struct npioctl)
0101 #define PPPIOCSNPMODE _IOW('t', 75, struct npioctl)
0102 #define PPPIOCSPASS _IOW('t', 71, struct sock_fprog)
0103 #define PPPIOCSACTIVE _IOW('t', 70, struct sock_fprog)
0104 #define PPPIOCGDEBUG _IOR('t', 65, int)
0105 #define PPPIOCSDEBUG _IOW('t', 64, int)
0106 #define PPPIOCGIDLE _IOR('t', 63, struct ppp_idle)
0107 #define PPPIOCGIDLE32 _IOR('t', 63, struct ppp_idle32)
0108 #define PPPIOCGIDLE64 _IOR('t', 63, struct ppp_idle64)
0109 #define PPPIOCNEWUNIT _IOWR('t', 62, int)
0110 #define PPPIOCATTACH _IOW('t', 61, int)
0111 #define PPPIOCDETACH _IOW('t', 60, int)
0112 #define PPPIOCSMRRU _IOW('t', 59, int)
0113 #define PPPIOCCONNECT _IOW('t', 58, int)
0114 #define PPPIOCDISCONN _IO('t', 57)
0115 #define PPPIOCATTCHAN _IOW('t', 56, int)
0116 #define PPPIOCGCHAN _IOR('t', 55, int)
0117 #define PPPIOCGL2TPSTATS _IOR('t', 54, struct pppol2tp_ioc_stats)
0118 #define PPPIOCBRIDGECHAN _IOW('t', 53, int)
0119 #define PPPIOCUNBRIDGECHAN _IO('t', 52)
0120
0121 #define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0)
0122 #define SIOCGPPPVER (SIOCDEVPRIVATE + 1)
0123 #define SIOCGPPPCSTATS (SIOCDEVPRIVATE + 2)
0124
0125 #endif