diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-07-12 06:34:42 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-07-12 06:34:42 -0400 |
commit | f2006e27396f55276f24434f56e208d86e7f9908 (patch) | |
tree | 71896db916d33888b4286f80117d3cac0da40e6d /include/net/gre.h | |
parent | e399eb56a6110e13f97e644658648602e2b08de7 (diff) | |
parent | 9903883f1dd6e86f286b7bfa6e4b423f98c1cd9e (diff) |
Merge branch 'linus' into timers/urgent
Get upstream changes so we can apply fixes against them
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/net/gre.h')
-rw-r--r-- | include/net/gre.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/net/gre.h b/include/net/gre.h index 9f03a390c826..57e4afdf7879 100644 --- a/include/net/gre.h +++ b/include/net/gre.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #define GREPROTO_CISCO 0 | 7 | #define GREPROTO_CISCO 0 |
8 | #define GREPROTO_PPTP 1 | 8 | #define GREPROTO_PPTP 1 |
9 | #define GREPROTO_MAX 2 | 9 | #define GREPROTO_MAX 2 |
10 | #define GRE_IP_PROTO_MAX 2 | ||
10 | 11 | ||
11 | struct gre_protocol { | 12 | struct gre_protocol { |
12 | int (*handler)(struct sk_buff *skb); | 13 | int (*handler)(struct sk_buff *skb); |
@@ -22,6 +23,36 @@ struct gre_base_hdr { | |||
22 | int gre_add_protocol(const struct gre_protocol *proto, u8 version); | 23 | int gre_add_protocol(const struct gre_protocol *proto, u8 version); |
23 | int gre_del_protocol(const struct gre_protocol *proto, u8 version); | 24 | int gre_del_protocol(const struct gre_protocol *proto, u8 version); |
24 | 25 | ||
26 | struct gre_cisco_protocol { | ||
27 | int (*handler)(struct sk_buff *skb, const struct tnl_ptk_info *tpi); | ||
28 | int (*err_handler)(struct sk_buff *skb, u32 info, | ||
29 | const struct tnl_ptk_info *tpi); | ||
30 | u8 priority; | ||
31 | }; | ||
32 | |||
33 | int gre_cisco_register(struct gre_cisco_protocol *proto); | ||
34 | int gre_cisco_unregister(struct gre_cisco_protocol *proto); | ||
35 | |||
36 | int gre_offload_init(void); | ||
37 | void gre_offload_exit(void); | ||
38 | |||
39 | void gre_build_header(struct sk_buff *skb, const struct tnl_ptk_info *tpi, | ||
40 | int hdr_len); | ||
41 | struct sk_buff *gre_handle_offloads(struct sk_buff *skb, bool gre_csum); | ||
42 | |||
43 | static inline int ip_gre_calc_hlen(__be16 o_flags) | ||
44 | { | ||
45 | int addend = 4; | ||
46 | |||
47 | if (o_flags&TUNNEL_CSUM) | ||
48 | addend += 4; | ||
49 | if (o_flags&TUNNEL_KEY) | ||
50 | addend += 4; | ||
51 | if (o_flags&TUNNEL_SEQ) | ||
52 | addend += 4; | ||
53 | return addend; | ||
54 | } | ||
55 | |||
25 | static inline __be16 gre_flags_to_tnl_flags(__be16 flags) | 56 | static inline __be16 gre_flags_to_tnl_flags(__be16 flags) |
26 | { | 57 | { |
27 | __be16 tflags = 0; | 58 | __be16 tflags = 0; |