blob: 97eafdc47eea118f6122b4a51a790d93a3830f86 [file] [log] [blame]
Dmitry Kozlov00959ad2010-08-21 23:05:39 -07001#ifndef __LINUX_GRE_H
2#define __LINUX_GRE_H
3
4#include <linux/skbuff.h>
Pravin B Shelarc5441932013-03-25 14:49:35 +00005#include <net/ip_tunnels.h>
Dmitry Kozlov00959ad2010-08-21 23:05:39 -07006
Pravin B Shelar9f57c672015-08-07 23:51:52 -07007struct gre_base_hdr {
8 __be16 flags;
9 __be16 protocol;
10};
11#define GRE_HEADER_SECTION 4
12
Dmitry Kozlov00959ad2010-08-21 23:05:39 -070013#define GREPROTO_CISCO 0
14#define GREPROTO_PPTP 1
15#define GREPROTO_MAX 2
Pravin B Shelarbda7bb42013-06-17 17:49:38 -070016#define GRE_IP_PROTO_MAX 2
Dmitry Kozlov00959ad2010-08-21 23:05:39 -070017
18struct gre_protocol {
19 int (*handler)(struct sk_buff *skb);
20 void (*err_handler)(struct sk_buff *skb, u32 info);
21};
22
23int gre_add_protocol(const struct gre_protocol *proto, u8 version);
24int gre_del_protocol(const struct gre_protocol *proto, u8 version);
25
Pravin B Shelarb2acd1d2015-08-07 23:51:47 -070026struct net_device *gretap_fb_dev_create(struct net *net, const char *name,
27 u8 name_assign_type);
Dmitry Kozlov00959ad2010-08-21 23:05:39 -070028#endif