Merge branch 'core-iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[safe/jmp/linux-2.6] / include / net / ip6_fib.h
index fae267f..86f46c4 100644 (file)
 #include <net/flow.h>
 #include <net/netlink.h>
 
+#ifdef CONFIG_IPV6_MULTIPLE_TABLES
+#define FIB6_TABLE_HASHSZ 256
+#else
+#define FIB6_TABLE_HASHSZ 1
+#endif
+
 struct rt6_info;
 
-struct fib6_config
-{
+struct fib6_config {
        u32             fc_table;
        u32             fc_metric;
        int             fc_dst_len;
@@ -45,8 +50,7 @@ struct fib6_config
        struct nl_info  fc_nlinfo;
 };
 
-struct fib6_node
-{
+struct fib6_node {
        struct fib6_node        *parent;
        struct fib6_node        *left;
        struct fib6_node        *right;
@@ -72,16 +76,14 @@ struct fib6_node
  *
  */
 
-struct rt6key
-{
+struct rt6key {
        struct in6_addr addr;
        int             plen;
 };
 
 struct fib6_table;
 
-struct rt6_info
-{
+struct rt6_info {
        union {
                struct dst_entry        dst;
        } u;
@@ -121,13 +123,14 @@ static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst)
        return ((struct rt6_info *)dst)->rt6i_idev;
 }
 
-struct fib6_walker_t
-{
-       struct fib6_walker_t *prev, *next;
+struct fib6_walker_t {
+       struct list_head lh;
        struct fib6_node *root, *node;
        struct rt6_info *leaf;
        unsigned char state;
        unsigned char prune;
+       unsigned int skip;
+       unsigned int count;
        int (*func)(struct fib6_walker_t *);
        void *args;
 };
@@ -174,7 +177,8 @@ struct fib6_table {
 #define RT6_TABLE_LOCAL                RT6_TABLE_MAIN
 #endif
 
-typedef struct rt6_info *(*pol_lookup_t)(struct fib6_table *,
+typedef struct rt6_info *(*pol_lookup_t)(struct net *,
+                                        struct fib6_table *,
                                         struct flowi *, int);
 
 /*