History

pptp: Refactor the struct and macros of PPTP codes

1. Use struct gre_base_hdr directly in pptp_gre_header instead of duplicated members; 2. Use existing macros like GRE_KEY, GRE_SEQ, and so on instead of duplicated macros defined by PPTP; 3. Add new macros like GRE_IS_ACK/SEQ and so on instead of PPTP_GRE_IS_A/S and so on;

Gao Feng committed 10 years ago

Commit 03459341 parent cfad65c3 files · +24 −35Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/linux/if_tunnel.h+10−2
@@ -28,8 +28,16 @@ · 27 unmodified lines
28#define GRE_FLAGS __cpu_to_be16(0x0078)28#define GRE_FLAGS __cpu_to_be16(0x0078)
29#define GRE_VERSION __cpu_to_be16(0x0007)29#define GRE_VERSION __cpu_to_be16(0x0007)
30 30
31#define GRE_VERSION_1 __cpu_to_be16(0x0001)31#define GRE_IS_CSUM(f) ((f) & GRE_CSUM)
32#define GRE_PROTO_PPP __cpu_to_be16(0x880b)32#define GRE_IS_ROUTING(f) ((f) & GRE_ROUTING)
33#define GRE_IS_KEY(f) ((f) & GRE_KEY)
34#define GRE_IS_SEQ(f) ((f) & GRE_SEQ)
35#define GRE_IS_STRICT(f) ((f) & GRE_STRICT)
36#define GRE_IS_REC(f) ((f) & GRE_REC)
37#define GRE_IS_ACK(f) ((f) & GRE_ACK)
38
39#define GRE_VERSION_1 __cpu_to_be16(0x0001)
40#define GRE_PROTO_PPP __cpu_to_be16(0x880b)
33#define GRE_PPTP_KEY_MASK __cpu_to_be32(0xffff)41#define GRE_PPTP_KEY_MASK __cpu_to_be32(0xffff)
34 42
35struct ip_tunnel_parm {43struct ip_tunnel_parm {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t