2010-08-22 10:05:39 +04:00
|
|
|
#ifndef __LINUX_GRE_H
|
|
|
|
#define __LINUX_GRE_H
|
|
|
|
|
|
|
|
#include <linux/skbuff.h>
|
2013-03-25 18:49:35 +04:00
|
|
|
#include <net/ip_tunnels.h>
|
2010-08-22 10:05:39 +04:00
|
|
|
|
2015-08-08 09:51:52 +03:00
|
|
|
struct gre_base_hdr {
|
|
|
|
__be16 flags;
|
|
|
|
__be16 protocol;
|
|
|
|
};
|
|
|
|
#define GRE_HEADER_SECTION 4
|
|
|
|
|
2010-08-22 10:05:39 +04:00
|
|
|
#define GREPROTO_CISCO 0
|
|
|
|
#define GREPROTO_PPTP 1
|
|
|
|
#define GREPROTO_MAX 2
|
2013-06-18 04:49:38 +04:00
|
|
|
#define GRE_IP_PROTO_MAX 2
|
2010-08-22 10:05:39 +04: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 09:51:47 +03:00
|
|
|
struct net_device *gretap_fb_dev_create(struct net *net, const char *name,
|
|
|
|
u8 name_assign_type);
|
2010-08-22 10:05:39 +04:00
|
|
|
#endif
|