diff options
author | James Chapman <jchapman@katalix.com> | 2007-06-27 18:43:43 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-11 01:15:58 -0400 |
commit | cf14a4d06742d59ecb2d837a3f53bb24d1ff9acb (patch) | |
tree | 78b8058dd7bd8b1cfba243d7d478495e0ba9281b /include/linux/if_ppp.h | |
parent | 342f0234c71b40da785dd6a7ce1dd481ecbfdb81 (diff) |
[L2TP]: Changes to existing ppp and socket kernel headers for L2TP
Add struct sockaddr_pppol2tp to carry L2TP-specific address
information for the PPPoX (PPPoL2TP) socket. Unfortunately we can't
use the union inside struct sockaddr_pppox because the L2TP-specific
data is larger than the current size of the union and we must preserve
the size of struct sockaddr_pppox for binary compatibility.
Also add a PPPIOCGL2TPSTATS ioctl to allow userspace to obtain
L2TP counters and state from the kernel.
Add new if_pppol2tp.h header.
[ Modified to use aligned_u64 in statistics structure -DaveM ]
Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_ppp.h')
-rw-r--r-- | include/linux/if_ppp.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h index 768372f07caa..0f2f70d4e48c 100644 --- a/include/linux/if_ppp.h +++ b/include/linux/if_ppp.h | |||
@@ -110,6 +110,21 @@ struct ifpppcstatsreq { | |||
110 | struct ppp_comp_stats stats; | 110 | struct ppp_comp_stats stats; |
111 | }; | 111 | }; |
112 | 112 | ||
113 | /* For PPPIOCGL2TPSTATS */ | ||
114 | struct pppol2tp_ioc_stats { | ||
115 | __u16 tunnel_id; /* redundant */ | ||
116 | __u16 session_id; /* if zero, get tunnel stats */ | ||
117 | __u32 using_ipsec:1; /* valid only for session_id == 0 */ | ||
118 | aligned_u64 tx_packets; | ||
119 | aligned_u64 tx_bytes; | ||
120 | aligned_u64 tx_errors; | ||
121 | aligned_u64 rx_packets; | ||
122 | aligned_u64 rx_bytes; | ||
123 | aligned_u64 rx_seq_discards; | ||
124 | aligned_u64 rx_oos_packets; | ||
125 | aligned_u64 rx_errors; | ||
126 | }; | ||
127 | |||
113 | #define ifr__name b.ifr_ifrn.ifrn_name | 128 | #define ifr__name b.ifr_ifrn.ifrn_name |
114 | #define stats_ptr b.ifr_ifru.ifru_data | 129 | #define stats_ptr b.ifr_ifru.ifru_data |
115 | 130 | ||
@@ -146,6 +161,7 @@ struct ifpppcstatsreq { | |||
146 | #define PPPIOCDISCONN _IO('t', 57) /* disconnect channel */ | 161 | #define PPPIOCDISCONN _IO('t', 57) /* disconnect channel */ |
147 | #define PPPIOCATTCHAN _IOW('t', 56, int) /* attach to ppp channel */ | 162 | #define PPPIOCATTCHAN _IOW('t', 56, int) /* attach to ppp channel */ |
148 | #define PPPIOCGCHAN _IOR('t', 55, int) /* get ppp channel number */ | 163 | #define PPPIOCGCHAN _IOR('t', 55, int) /* get ppp channel number */ |
164 | #define PPPIOCGL2TPSTATS _IOR('t', 54, struct pppol2tp_ioc_stats) | ||
149 | 165 | ||
150 | #define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0) | 166 | #define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0) |
151 | #define SIOCGPPPVER (SIOCDEVPRIVATE + 1) /* NEVER change this!! */ | 167 | #define SIOCGPPPVER (SIOCDEVPRIVATE + 1) /* NEVER change this!! */ |