]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/ip6_fib.h
[PATCH] Mark struct super_operations const
[linux-2.6-omap-h63xx.git] / include / net / ip6_fib.h
index 9610b887ffb55131935018ab6860a256dd0209de..9eda572a2a6534f157b233b71f22bf9ed70abd65 100644 (file)
@@ -50,9 +50,9 @@ struct fib6_node
        struct fib6_node        *parent;
        struct fib6_node        *left;
        struct fib6_node        *right;
-
+#ifdef CONFIG_IPV6_SUBTREES
        struct fib6_node        *subtree;
-
+#endif
        struct rt6_info         *leaf;
 
        __u16                   fn_bit;         /* bit key */
@@ -60,6 +60,11 @@ struct fib6_node
        __u32                   fn_sernum;
 };
 
+#ifndef CONFIG_IPV6_SUBTREES
+#define FIB6_SUBTREE(fn)       NULL
+#else
+#define FIB6_SUBTREE(fn)       ((fn)->subtree)
+#endif
 
 /*
  *     routing information
@@ -78,7 +83,6 @@ struct rt6_info
 {
        union {
                struct dst_entry        dst;
-               struct rt6_info         *next;
        } u;
 
        struct inet6_dev                *rt6i_idev;
@@ -102,6 +106,11 @@ struct rt6_info
        u8                              rt6i_protocol;
 };
 
+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;
@@ -168,9 +177,6 @@ struct fib6_table {
 #define RT6_TABLE_LOCAL                RT6_TABLE_MAIN
 #endif
 
-#define RT6_F_STRICT           1
-#define RT6_F_HAS_SADDR                2
-
 typedef struct rt6_info *(*pol_lookup_t)(struct fib6_table *,
                                         struct flowi *, int);