diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-01-07 02:33:00 +0000 |
---|---|---|
committer | <ralf@linux-mips.org> | 1997-01-07 02:33:00 +0000 |
commit | beb116954b9b7f3bb56412b2494b562f02b864b1 (patch) | |
tree | 120e997879884e1b9d93b265221b939d2ef1ade1 /include/net/protocol.h | |
parent | 908d4681a1dc3792ecafbe64265783a86c4cccb6 (diff) |
Import of Linux/MIPS 2.1.14
Diffstat (limited to 'include/net/protocol.h')
-rw-r--r-- | include/net/protocol.h | 52 |
1 files changed, 41 insertions, 11 deletions
diff --git a/include/net/protocol.h b/include/net/protocol.h index 3e0b6fb3c..979298832 100644 --- a/include/net/protocol.h +++ b/include/net/protocol.h @@ -17,11 +17,18 @@ * Changes: * 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 */ @@ -29,31 +36,54 @@ /* This is used to register protocols. */ struct inet_protocol { int (*handler)(struct sk_buff *skb, struct device *dev, - struct options *opt, unsigned long daddr, - unsigned short len, unsigned long saddr, + struct options *opt, __u32 daddr, + unsigned short len, __u32 saddr, int redo, struct inet_protocol *protocol); - int (*frag_handler)(struct sk_buff *skb, struct device *dev, - struct options *opt, unsigned long daddr, - unsigned short len, unsigned long saddr, - int redo, struct inet_protocol *protocol); - void (*err_handler)(int err, unsigned char *buff, - unsigned long daddr, - unsigned long saddr, - struct inet_protocol *protocol); + void (*err_handler)(int type, int code, unsigned char *buff, + __u32 info, __u32 daddr, __u32 saddr, + struct inet_protocol *protocol, int len); struct inet_protocol *next; unsigned char protocol; unsigned char copy:1; void *data; - char *name; + 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 */ |