patch-2.1.8 linux/include/net/protocol.h

Next file: linux/include/net/rawv6.h
Previous file: linux/include/net/netlink.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.7/linux/include/net/protocol.h linux/include/net/protocol.h
@@ -18,11 +18,18 @@
  *		Alan Cox	:	Added a name field and a frag handler
  *					field for later.
  *		Alan Cox	:	Cleaned up, and sorted types.
+ *		Pedro Roque	:	inet6 protocols
  */
  
 #ifndef _PROTOCOL_H
 #define _PROTOCOL_H
 
+#include <linux/config.h>
+#include <linux/in6.h>
+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
+#include <linux/ipv6.h>
+#endif
+
 #define MAX_INET_PROTOS	32		/* Must be a power of 2		*/
 
 
@@ -33,8 +40,7 @@
 				   unsigned short len, __u32 saddr,
 				   int redo, struct inet_protocol *protocol);
   void			(*err_handler)(int type, int code, unsigned char *buff,
-				       __u32 daddr,
-				       __u32 saddr,
+				       __u32 info, __u32 daddr, __u32 saddr,
 				       struct inet_protocol *protocol);
   struct inet_protocol *next;
   unsigned char		protocol;
@@ -43,13 +49,41 @@
   const char		*name;
 };
 
+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
+struct inet6_protocol {
+  int			(*handler)(struct sk_buff *skb, struct device *dev,
+				   struct in6_addr *saddr,
+				   struct in6_addr *daddr,
+				   struct ipv6_options *opt, 
+				   unsigned short len,
+				   int redo, struct inet6_protocol *protocol);
+
+  void			(*err_handler)(int type, int code, unsigned char *buff,
+				       __u32 info, struct in6_addr *saddr,
+				       struct in6_addr *daddr,
+				       struct inet6_protocol *protocol);
+  struct inet6_protocol *next;
+  unsigned char		protocol;
+  unsigned char		copy:1;
+  void			*data;
+  const char		*name;
+};
+#endif
 
 extern struct inet_protocol *inet_protocol_base;
 extern struct inet_protocol *inet_protos[MAX_INET_PROTOS];
 
+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
+extern struct inet6_protocol *inet6_protocol_base;
+extern struct inet6_protocol *inet6_protos[MAX_INET_PROTOS];
+#endif
 
 extern void		inet_add_protocol(struct inet_protocol *prot);
 extern int		inet_del_protocol(struct inet_protocol *prot);
 
+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
+extern void		inet6_add_protocol(struct inet6_protocol *prot);
+extern int		inet6_del_protocol(struct inet6_protocol *prot);
+#endif
 
 #endif	/* _PROTOCOL_H */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov