gre.h 661 B

12345678910111213141516171819202122232425262728
  1. #ifndef __LINUX_GRE_H
  2. #define __LINUX_GRE_H
  3. #include <linux/skbuff.h>
  4. #include <net/ip_tunnels.h>
  5. struct gre_base_hdr {
  6. __be16 flags;
  7. __be16 protocol;
  8. };
  9. #define GRE_HEADER_SECTION 4
  10. #define GREPROTO_CISCO 0
  11. #define GREPROTO_PPTP 1
  12. #define GREPROTO_MAX 2
  13. #define GRE_IP_PROTO_MAX 2
  14. struct gre_protocol {
  15. int (*handler)(struct sk_buff *skb);
  16. void (*err_handler)(struct sk_buff *skb, u32 info);
  17. };
  18. int gre_add_protocol(const struct gre_protocol *proto, u8 version);
  19. int gre_del_protocol(const struct gre_protocol *proto, u8 version);
  20. struct net_device *gretap_fb_dev_create(struct net *net, const char *name,
  21. u8 name_assign_type);
  22. #endif