2 #ifndef _NF_CONNTRACK_PPTP_H
3 #define _NF_CONNTRACK_PPTP_H
5 #include <linux/netfilter/nf_conntrack_common.h>
49 #define PPTP_CONTROL_PORT 1723
51 #define PPTP_PACKET_CONTROL 1
52 #define PPTP_PACKET_MGMT 2
54 #define PPTP_MAGIC_COOKIE 0x1a2b3c4d
63 #define PPTP_START_SESSION_REQUEST 1
64 #define PPTP_START_SESSION_REPLY 2
65 #define PPTP_STOP_SESSION_REQUEST 3
66 #define PPTP_STOP_SESSION_REPLY 4
67 #define PPTP_ECHO_REQUEST 5
68 #define PPTP_ECHO_REPLY 6
69 #define PPTP_OUT_CALL_REQUEST 7
70 #define PPTP_OUT_CALL_REPLY 8
71 #define PPTP_IN_CALL_REQUEST 9
72 #define PPTP_IN_CALL_REPLY 10
73 #define PPTP_IN_CALL_CONNECT 11
74 #define PPTP_CALL_CLEAR_REQUEST 12
75 #define PPTP_CALL_DISCONNECT_NOTIFY 13
76 #define PPTP_WAN_ERROR_NOTIFY 14
77 #define PPTP_SET_LINK_INFO 15
79 #define PPTP_MSG_MAX 15
82 #define PPTP_ERROR_CODE_NONE 0
83 #define PPTP_NOT_CONNECTED 1
84 #define PPTP_BAD_FORMAT 2
85 #define PPTP_BAD_VALUE 3
86 #define PPTP_NO_RESOURCE 4
87 #define PPTP_BAD_CALLID 5
88 #define PPTP_REMOVE_DEVICE_ERROR 6
90 struct PptpControlHeader {
96 #define PPTP_FRAME_CAP_ASYNC 0x1
97 #define PPTP_FRAME_CAP_SYNC 0x2
100 #define PPTP_BEARER_CAP_ANALOG 0x1
101 #define PPTP_BEARER_CAP_DIGITAL 0x2
103 struct PptpStartSessionRequest {
111 __u8 vendorString[64];
115 #define PPTP_START_OK 1
116 #define PPTP_START_GENERAL_ERROR 2
117 #define PPTP_START_ALREADY_CONNECTED 3
118 #define PPTP_START_NOT_AUTHORIZED 4
119 #define PPTP_START_UNKNOWN_PROTOCOL 5
121 struct PptpStartSessionReply {
124 __u8 generalErrorCode;
130 __u8 vendorString[64];
134 #define PPTP_STOP_NONE 1
135 #define PPTP_STOP_PROTOCOL 2
136 #define PPTP_STOP_LOCAL_SHUTDOWN 3
138 struct PptpStopSessionRequest {
145 #define PPTP_STOP_OK 1
146 #define PPTP_STOP_GENERAL_ERROR 2
148 struct PptpStopSessionReply {
150 __u8 generalErrorCode;
154 struct PptpEchoRequest {
159 #define PPTP_ECHO_OK 1
160 #define PPTP_ECHO_GENERAL_ERROR 2
162 struct PptpEchoReply {
165 __u8 generalErrorCode;
170 #define PPTP_ASYNC_FRAMING 1
171 #define PPTP_SYNC_FRAMING 2
172 #define PPTP_DONT_CARE_FRAMING 3
175 #define PPTP_ANALOG_TYPE 1
176 #define PPTP_DIGITAL_TYPE 2
177 #define PPTP_DONT_CARE_BEARER_TYPE 3
179 struct PptpOutCallRequest {
190 __u8 phoneNumber[64];
195 #define PPTP_OUTCALL_CONNECT 1
196 #define PPTP_OUTCALL_GENERAL_ERROR 2
197 #define PPTP_OUTCALL_NO_CARRIER 3
198 #define PPTP_OUTCALL_BUSY 4
199 #define PPTP_OUTCALL_NO_DIAL_TONE 5
200 #define PPTP_OUTCALL_TIMEOUT 6
201 #define PPTP_OUTCALL_DONT_ACCEPT 7
203 struct PptpOutCallReply {
207 __u8 generalErrorCode;
215 struct PptpInCallRequest {
220 __be16 dialedNumberLength;
221 __be16 dialingNumberLength;
222 __u8 dialedNumber[64];
223 __u8 dialingNumber[64];
228 #define PPTP_INCALL_ACCEPT 1
229 #define PPTP_INCALL_GENERAL_ERROR 2
230 #define PPTP_INCALL_DONT_ACCEPT 3
232 struct PptpInCallReply {
236 __u8 generalErrorCode;
242 struct PptpInCallConnected {
251 struct PptpClearCallRequest {
256 struct PptpCallDisconnectNotify {
259 __u8 generalErrorCode;
262 __u8 callStatistics[128];
265 struct PptpWanErrorNotify {
276 struct PptpSetLinkInfo {
283 union pptp_ctrl_union {
284 struct PptpStartSessionRequest sreq;
285 struct PptpStartSessionReply srep;
286 struct PptpStopSessionRequest
streq;
287 struct PptpStopSessionReply strep;
288 struct PptpOutCallRequest ocreq;
289 struct PptpOutCallReply ocack;
290 struct PptpInCallRequest icreq;
291 struct PptpInCallReply icack;
292 struct PptpInCallConnected iccon;
293 struct PptpClearCallRequest clrreq;
294 struct PptpCallDisconnectNotify disc;
295 struct PptpWanErrorNotify wanerr;
296 struct PptpSetLinkInfo setlink;
306 unsigned int protoff,
307 struct PptpControlHeader *ctlh,
308 union pptp_ctrl_union *pptpReq);
313 unsigned int protoff,
314 struct PptpControlHeader *ctlh,
315 union pptp_ctrl_union *pptpReq);