Dmitry Kozlov | 00959ad | 2010-08-21 23:05:39 -0700 | [diff] [blame] | 1 | #ifndef __LINUX_GRE_H |
| 2 | #define __LINUX_GRE_H |
| 3 | |
| 4 | #include <linux/skbuff.h> |
Pravin B Shelar | c544193 | 2013-03-25 14:49:35 +0000 | [diff] [blame] | 5 | #include <net/ip_tunnels.h> |
Dmitry Kozlov | 00959ad | 2010-08-21 23:05:39 -0700 | [diff] [blame] | 6 | |
Pravin B Shelar | 9f57c67 | 2015-08-07 23:51:52 -0700 | [diff] [blame] | 7 | struct gre_base_hdr { |
| 8 | __be16 flags; |
| 9 | __be16 protocol; |
| 10 | }; |
| 11 | #define GRE_HEADER_SECTION 4 |
| 12 | |
Dmitry Kozlov | 00959ad | 2010-08-21 23:05:39 -0700 | [diff] [blame] | 13 | #define GREPROTO_CISCO 0 |
| 14 | #define GREPROTO_PPTP 1 |
| 15 | #define GREPROTO_MAX 2 |
Pravin B Shelar | bda7bb4 | 2013-06-17 17:49:38 -0700 | [diff] [blame] | 16 | #define GRE_IP_PROTO_MAX 2 |
Dmitry Kozlov | 00959ad | 2010-08-21 23:05:39 -0700 | [diff] [blame] | 17 | |
| 18 | struct gre_protocol { |
| 19 | int (*handler)(struct sk_buff *skb); |
| 20 | void (*err_handler)(struct sk_buff *skb, u32 info); |
| 21 | }; |
| 22 | |
| 23 | int gre_add_protocol(const struct gre_protocol *proto, u8 version); |
| 24 | int gre_del_protocol(const struct gre_protocol *proto, u8 version); |
| 25 | |
Pravin B Shelar | b2acd1d | 2015-08-07 23:51:47 -0700 | [diff] [blame] | 26 | struct net_device *gretap_fb_dev_create(struct net *net, const char *name, |
| 27 | u8 name_assign_type); |
Dmitry Kozlov | 00959ad | 2010-08-21 23:05:39 -0700 | [diff] [blame] | 28 | #endif |