9p: add 9P2000.L rename operation
[safe/jmp/linux-2.6] / include / net / protocol.h
index 357691f..f1effdd 100644 (file)
@@ -24,7 +24,6 @@
 #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>
 struct net_protocol {
        int                     (*handler)(struct sk_buff *skb);
        void                    (*err_handler)(struct sk_buff *skb, u32 info);
-       int                     no_policy;
+       int                     (*gso_send_check)(struct sk_buff *skb);
+       struct sk_buff         *(*gso_segment)(struct sk_buff *skb,
+                                              int features);
+       struct sk_buff        **(*gro_receive)(struct sk_buff **head,
+                                              struct sk_buff *skb);
+       int                     (*gro_complete)(struct sk_buff *skb);
+       unsigned int            no_policy:1,
+                               netns_ok:1;
 };
 
 #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
-struct inet6_protocol 
-{
-       int     (*handler)(struct sk_buff **skb, unsigned int *nhoffp);
+struct inet6_protocol {
+       int     (*handler)(struct sk_buff *skb);
 
        void    (*err_handler)(struct sk_buff *skb,
                               struct inet6_skb_parm *opt,
-                              int type, int code, int offset,
-                              __u32 info);
+                              u8 type, u8 code, int offset,
+                              __be32 info);
+
+       int     (*gso_send_check)(struct sk_buff *skb);
+       struct sk_buff *(*gso_segment)(struct sk_buff *skb,
+                                      int features);
+       struct sk_buff **(*gro_receive)(struct sk_buff **head,
+                                       struct sk_buff *skb);
+       int     (*gro_complete)(struct sk_buff *skb);
+
        unsigned int    flags;  /* INET6_PROTO_xxx */
 };
 
 #define INET6_PROTO_NOPOLICY   0x1
 #define INET6_PROTO_FINAL      0x2
+/* This should be set for any extension header which is compatible with GSO. */
+#define INET6_PROTO_GSO_EXTHDR 0x4
 #endif
 
 /* This is used to register socket interfaces for IP protocols.  */
@@ -62,37 +77,33 @@ struct inet_protosw {
 
         /* These two fields form the lookup key.  */
        unsigned short   type;     /* This is the 2nd argument to socket(2). */
-       int              protocol; /* This is the L4 protocol number.  */
+       unsigned short   protocol; /* This is the L4 protocol number.  */
 
        struct proto     *prot;
-       struct proto_ops *ops;
+       const struct proto_ops *ops;
   
-       int              capability; /* Which (if any) capability do
-                                     * we need to use this socket
-                                     * interface?
-                                      */
        char             no_check;   /* checksum on rcv/xmit/none? */
        unsigned char    flags;      /* See INET_PROTOSW_* below.  */
 };
 #define INET_PROTOSW_REUSE 0x01             /* Are ports automatically reusable? */
 #define INET_PROTOSW_PERMANENT 0x02  /* Permanent protocols are unremovable. */
+#define INET_PROTOSW_ICSK      0x04  /* Is this an inet_connection_sock? */
 
-extern struct net_protocol *inet_protocol_base;
-extern struct net_protocol *inet_protos[MAX_INET_PROTOS];
+extern const struct net_protocol *inet_protos[MAX_INET_PROTOS];
 
 #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
-extern struct inet6_protocol *inet6_protos[MAX_INET_PROTOS];
+extern const struct inet6_protocol *inet6_protos[MAX_INET_PROTOS];
 #endif
 
-extern int     inet_add_protocol(struct net_protocol *prot, unsigned char num);
-extern int     inet_del_protocol(struct net_protocol *prot, unsigned char num);
+extern int     inet_add_protocol(const struct net_protocol *prot, unsigned char num);
+extern int     inet_del_protocol(const struct net_protocol *prot, unsigned char num);
 extern void    inet_register_protosw(struct inet_protosw *p);
 extern void    inet_unregister_protosw(struct inet_protosw *p);
 
 #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
-extern int     inet6_add_protocol(struct inet6_protocol *prot, unsigned char num);
-extern int     inet6_del_protocol(struct inet6_protocol *prot, unsigned char num);
-extern void    inet6_register_protosw(struct inet_protosw *p);
+extern int     inet6_add_protocol(const struct inet6_protocol *prot, unsigned char num);
+extern int     inet6_del_protocol(const struct inet6_protocol *prot, unsigned char num);
+extern int     inet6_register_protosw(struct inet_protosw *p);
 extern void    inet6_unregister_protosw(struct inet_protosw *p);
 #endif