2010-08-22 14:05:39 +08:00
|
|
|
#ifndef __LINUX_GRE_H
|
|
|
|
#define __LINUX_GRE_H
|
|
|
|
|
|
|
|
#include <linux/skbuff.h>
|
2013-03-25 22:49:35 +08:00
|
|
|
#include <net/ip_tunnels.h>
|
2010-08-22 14:05:39 +08:00
|
|
|
|
2015-08-08 14:51:52 +08:00
|
|
|
struct gre_base_hdr {
|
|
|
|
__be16 flags;
|
|
|
|
__be16 protocol;
|
|
|
|
};
|
|
|
|
#define GRE_HEADER_SECTION 4
|
|
|
|
|
2010-08-22 14:05:39 +08:00
|
|
|
#define GREPROTO_CISCO 0
|
|
|
|
#define GREPROTO_PPTP 1
|
|
|
|
#define GREPROTO_MAX 2
|
2013-06-18 08:49:38 +08:00
|
|
|
#define GRE_IP_PROTO_MAX 2
|
2010-08-22 14:05:39 +08:00
|
|
|
|
|
|
|
struct gre_protocol {
|
|
|
|
int (*handler)(struct sk_buff *skb);
|
|
|
|
void (*err_handler)(struct sk_buff *skb, u32 info);
|
|
|
|
};
|
|
|
|
|
|
|
|
int gre_add_protocol(const struct gre_protocol *proto, u8 version);
|
|
|
|
int gre_del_protocol(const struct gre_protocol *proto, u8 version);
|
|
|
|
|
2015-08-08 14:51:47 +08:00
|
|
|
struct net_device *gretap_fb_dev_create(struct net *net, const char *name,
|
|
|
|
u8 name_assign_type);
|
2010-08-22 14:05:39 +08:00
|
|
|
#endif
|