toolchain: switch kernel 2.4 builds to gcc 4.2.4
[tomato.git] / tools / brcm / K24 / hndtools-mipsel-uclibc-4.1.2 / include / linux / netfilter_ipv4 / ip_conntrack_pptp.h
blob3c9e83396c8cdf4eb14486af150fd130033b2285
1 /* PPTP constants and structs */
2 #ifndef _CONNTRACK_PPTP_H
3 #define _CONNTRACK_PPTP_H
5 /* state of the control session */
6 enum pptp_ctrlsess_state {
7 PPTP_SESSION_NONE, /* no session present */
8 PPTP_SESSION_ERROR, /* some session error */
9 PPTP_SESSION_STOPREQ, /* stop_sess request seen */
10 PPTP_SESSION_REQUESTED, /* start_sess request seen */
11 PPTP_SESSION_CONFIRMED, /* session established */
14 /* state of the call inside the control session */
15 enum pptp_ctrlcall_state {
16 PPTP_CALL_NONE,
17 PPTP_CALL_ERROR,
18 PPTP_CALL_OUT_REQ,
19 PPTP_CALL_OUT_CONF,
20 PPTP_CALL_IN_REQ,
21 PPTP_CALL_IN_REP,
22 PPTP_CALL_IN_CONF,
23 PPTP_CALL_CLEAR_REQ,
27 /* conntrack private data */
28 struct ip_ct_pptp_master {
29 enum pptp_ctrlsess_state sstate; /* session state */
31 /* everything below is going to be per-expectation in newnat,
32 * since there could be more than one call within one session */
33 enum pptp_ctrlcall_state cstate; /* call state */
34 u_int16_t pac_call_id; /* call id of PAC, host byte order */
35 u_int16_t pns_call_id; /* call id of PNS, host byte order */
38 /* conntrack_expect private member */
39 struct ip_ct_pptp_expect {
40 enum pptp_ctrlcall_state cstate; /* call state */
41 u_int16_t pac_call_id; /* call id of PAC */
42 u_int16_t pns_call_id; /* call id of PNS */
46 #ifdef __KERNEL__
48 #include <linux/netfilter_ipv4/lockhelp.h>
49 DECLARE_LOCK_EXTERN(ip_pptp_lock);
51 #define IP_CONNTR_PPTP PPTP_CONTROL_PORT
53 union pptp_ctrl_union {
54 void *rawreq;
55 struct PptpStartSessionRequest *sreq;
56 struct PptpStartSessionReply *srep;
57 struct PptpStopSessionRequest *streq;
58 struct PptpStopSessionReply *strep;
59 struct PptpOutCallRequest *ocreq;
60 struct PptpOutCallReply *ocack;
61 struct PptpInCallRequest *icreq;
62 struct PptpInCallReply *icack;
63 struct PptpInCallConnected *iccon;
64 struct PptpClearCallRequest *clrreq;
65 struct PptpCallDisconnectNotify *disc;
66 struct PptpWanErrorNotify *wanerr;
67 struct PptpSetLinkInfo *setlink;
72 #define PPTP_CONTROL_PORT 1723
74 #define PPTP_PACKET_CONTROL 1
75 #define PPTP_PACKET_MGMT 2
77 #define PPTP_MAGIC_COOKIE 0x1a2b3c4d
79 struct pptp_pkt_hdr {
80 __u16 packetLength;
81 __u16 packetType;
82 __u32 magicCookie;
85 /* PptpControlMessageType values */
86 #define PPTP_START_SESSION_REQUEST 1
87 #define PPTP_START_SESSION_REPLY 2
88 #define PPTP_STOP_SESSION_REQUEST 3
89 #define PPTP_STOP_SESSION_REPLY 4
90 #define PPTP_ECHO_REQUEST 5
91 #define PPTP_ECHO_REPLY 6
92 #define PPTP_OUT_CALL_REQUEST 7
93 #define PPTP_OUT_CALL_REPLY 8
94 #define PPTP_IN_CALL_REQUEST 9
95 #define PPTP_IN_CALL_REPLY 10
96 #define PPTP_IN_CALL_CONNECT 11
97 #define PPTP_CALL_CLEAR_REQUEST 12
98 #define PPTP_CALL_DISCONNECT_NOTIFY 13
99 #define PPTP_WAN_ERROR_NOTIFY 14
100 #define PPTP_SET_LINK_INFO 15
102 #define PPTP_MSG_MAX 15
104 /* PptpGeneralError values */
105 #define PPTP_ERROR_CODE_NONE 0
106 #define PPTP_NOT_CONNECTED 1
107 #define PPTP_BAD_FORMAT 2
108 #define PPTP_BAD_VALUE 3
109 #define PPTP_NO_RESOURCE 4
110 #define PPTP_BAD_CALLID 5
111 #define PPTP_REMOVE_DEVICE_ERROR 6
113 struct PptpControlHeader {
114 __u16 messageType;
115 __u16 reserved;
118 /* FramingCapability Bitmap Values */
119 #define PPTP_FRAME_CAP_ASYNC 0x1
120 #define PPTP_FRAME_CAP_SYNC 0x2
122 /* BearerCapability Bitmap Values */
123 #define PPTP_BEARER_CAP_ANALOG 0x1
124 #define PPTP_BEARER_CAP_DIGITAL 0x2
126 struct PptpStartSessionRequest {
127 __u16 protocolVersion;
128 __u8 reserved1;
129 __u8 reserved2;
130 __u32 framingCapability;
131 __u32 bearerCapability;
132 __u16 maxChannels;
133 __u16 firmwareRevision;
134 __u8 hostName[64];
135 __u8 vendorString[64];
138 /* PptpStartSessionResultCode Values */
139 #define PPTP_START_OK 1
140 #define PPTP_START_GENERAL_ERROR 2
141 #define PPTP_START_ALREADY_CONNECTED 3
142 #define PPTP_START_NOT_AUTHORIZED 4
143 #define PPTP_START_UNKNOWN_PROTOCOL 5
145 struct PptpStartSessionReply {
146 __u16 protocolVersion;
147 __u8 resultCode;
148 __u8 generalErrorCode;
149 __u32 framingCapability;
150 __u32 bearerCapability;
151 __u16 maxChannels;
152 __u16 firmwareRevision;
153 __u8 hostName[64];
154 __u8 vendorString[64];
157 /* PptpStopReasons */
158 #define PPTP_STOP_NONE 1
159 #define PPTP_STOP_PROTOCOL 2
160 #define PPTP_STOP_LOCAL_SHUTDOWN 3
162 struct PptpStopSessionRequest {
163 __u8 reason;
166 /* PptpStopSessionResultCode */
167 #define PPTP_STOP_OK 1
168 #define PPTP_STOP_GENERAL_ERROR 2
170 struct PptpStopSessionReply {
171 __u8 resultCode;
172 __u8 generalErrorCode;
175 struct PptpEchoRequest {
176 __u32 identNumber;
179 /* PptpEchoReplyResultCode */
180 #define PPTP_ECHO_OK 1
181 #define PPTP_ECHO_GENERAL_ERROR 2
183 struct PptpEchoReply {
184 __u32 identNumber;
185 __u8 resultCode;
186 __u8 generalErrorCode;
187 __u16 reserved;
190 /* PptpFramingType */
191 #define PPTP_ASYNC_FRAMING 1
192 #define PPTP_SYNC_FRAMING 2
193 #define PPTP_DONT_CARE_FRAMING 3
195 /* PptpCallBearerType */
196 #define PPTP_ANALOG_TYPE 1
197 #define PPTP_DIGITAL_TYPE 2
198 #define PPTP_DONT_CARE_BEARER_TYPE 3
200 struct PptpOutCallRequest {
201 __u16 callID;
202 __u16 callSerialNumber;
203 __u32 minBPS;
204 __u32 maxBPS;
205 __u32 bearerType;
206 __u32 framingType;
207 __u16 packetWindow;
208 __u16 packetProcDelay;
209 __u16 reserved1;
210 __u16 phoneNumberLength;
211 __u16 reserved2;
212 __u8 phoneNumber[64];
213 __u8 subAddress[64];
216 /* PptpCallResultCode */
217 #define PPTP_OUTCALL_CONNECT 1
218 #define PPTP_OUTCALL_GENERAL_ERROR 2
219 #define PPTP_OUTCALL_NO_CARRIER 3
220 #define PPTP_OUTCALL_BUSY 4
221 #define PPTP_OUTCALL_NO_DIAL_TONE 5
222 #define PPTP_OUTCALL_TIMEOUT 6
223 #define PPTP_OUTCALL_DONT_ACCEPT 7
225 struct PptpOutCallReply {
226 __u16 callID;
227 __u16 peersCallID;
228 __u8 resultCode;
229 __u8 generalErrorCode;
230 __u16 causeCode;
231 __u32 connectSpeed;
232 __u16 packetWindow;
233 __u16 packetProcDelay;
234 __u32 physChannelID;
237 struct PptpInCallRequest {
238 __u16 callID;
239 __u16 callSerialNumber;
240 __u32 callBearerType;
241 __u32 physChannelID;
242 __u16 dialedNumberLength;
243 __u16 dialingNumberLength;
244 __u8 dialedNumber[64];
245 __u8 dialingNumber[64];
246 __u8 subAddress[64];
249 /* PptpInCallResultCode */
250 #define PPTP_INCALL_ACCEPT 1
251 #define PPTP_INCALL_GENERAL_ERROR 2
252 #define PPTP_INCALL_DONT_ACCEPT 3
254 struct PptpInCallReply {
255 __u16 callID;
256 __u16 peersCallID;
257 __u8 resultCode;
258 __u8 generalErrorCode;
259 __u16 packetWindow;
260 __u16 packetProcDelay;
261 __u16 reserved;
264 struct PptpInCallConnected {
265 __u16 peersCallID;
266 __u16 reserved;
267 __u32 connectSpeed;
268 __u16 packetWindow;
269 __u16 packetProcDelay;
270 __u32 callFramingType;
273 struct PptpClearCallRequest {
274 __u16 callID;
275 __u16 reserved;
278 struct PptpCallDisconnectNotify {
279 __u16 callID;
280 __u8 resultCode;
281 __u8 generalErrorCode;
282 __u16 causeCode;
283 __u16 reserved;
284 __u8 callStatistics[128];
287 struct PptpWanErrorNotify {
288 __u16 peersCallID;
289 __u16 reserved;
290 __u32 crcErrors;
291 __u32 framingErrors;
292 __u32 hardwareOverRuns;
293 __u32 bufferOverRuns;
294 __u32 timeoutErrors;
295 __u32 alignmentErrors;
298 struct PptpSetLinkInfo {
299 __u16 peersCallID;
300 __u16 reserved;
301 __u32 sendAccm;
302 __u32 recvAccm;
306 struct pptp_priv_data {
307 __u16 call_id;
308 __u16 mcall_id;
309 __u16 pcall_id;
312 #endif /* __KERNEL__ */
313 #endif /* _CONNTRACK_PPTP_H */