Commit | Line | Data |
---|---|---|
ab10dccb GF |
1 | #ifndef _NET_PPTP_H |
2 | #define _NET_PPTP_H | |
3 | ||
4 | #define PPP_LCP_ECHOREQ 0x09 | |
5 | #define PPP_LCP_ECHOREP 0x0A | |
6 | #define SC_RCV_BITS (SC_RCV_B7_1|SC_RCV_B7_0|SC_RCV_ODDP|SC_RCV_EVNP) | |
7 | ||
8 | #define MISSING_WINDOW 20 | |
9 | #define WRAPPED(curseq, lastseq)\ | |
10 | ((((curseq) & 0xffffff00) == 0) &&\ | |
11 | (((lastseq) & 0xffffff00) == 0xffffff00)) | |
12 | ||
13 | #define PPTP_GRE_PROTO 0x880B | |
14 | #define PPTP_GRE_VER 0x1 | |
15 | ||
16 | #define PPTP_GRE_FLAG_C 0x80 | |
17 | #define PPTP_GRE_FLAG_R 0x40 | |
18 | #define PPTP_GRE_FLAG_K 0x20 | |
19 | #define PPTP_GRE_FLAG_S 0x10 | |
20 | #define PPTP_GRE_FLAG_A 0x80 | |
21 | ||
22 | #define PPTP_GRE_IS_C(f) ((f)&PPTP_GRE_FLAG_C) | |
23 | #define PPTP_GRE_IS_R(f) ((f)&PPTP_GRE_FLAG_R) | |
24 | #define PPTP_GRE_IS_K(f) ((f)&PPTP_GRE_FLAG_K) | |
25 | #define PPTP_GRE_IS_S(f) ((f)&PPTP_GRE_FLAG_S) | |
26 | #define PPTP_GRE_IS_A(f) ((f)&PPTP_GRE_FLAG_A) | |
27 | ||
28 | #define PPTP_HEADER_OVERHEAD (2+sizeof(struct pptp_gre_header)) | |
29 | struct pptp_gre_header { | |
30 | u8 flags; | |
31 | u8 ver; | |
32 | __be16 protocol; | |
33 | __be16 payload_len; | |
34 | __be16 call_id; | |
35 | __be32 seq; | |
36 | __be32 ack; | |
37 | } __packed; | |
38 | ||
39 | ||
40 | #endif |