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