SCTP: Clean-up some defines for regressions tests.
[safe/jmp/linux-2.6] / include / net / ip6_fib.h
index c0660ce..8578213 100644 (file)
 #ifdef __KERNEL__
 
 #include <linux/ipv6_route.h>
-
-#include <net/dst.h>
-#include <net/flow.h>
 #include <linux/rtnetlink.h>
 #include <linux/spinlock.h>
+#include <net/dst.h>
+#include <net/flow.h>
+#include <net/netlink.h>
 
 struct rt6_info;
 
+struct fib6_config
+{
+       u32             fc_table;
+       u32             fc_metric;
+       int             fc_dst_len;
+       int             fc_src_len;
+       int             fc_ifindex;
+       u32             fc_flags;
+       u32             fc_protocol;
+
+       struct in6_addr fc_dst;
+       struct in6_addr fc_src;
+       struct in6_addr fc_gateway;
+
+       unsigned long   fc_expires;
+       struct nlattr   *fc_mx;
+       int             fc_mx_len;
+
+       struct nl_info  fc_nlinfo;
+};
+
 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 */
        __u16                   fn_flags;
        __u32                   fn_sernum;
+       struct rt6_info         *rr_ptr;
 };
 
+#ifndef CONFIG_IPV6_SUBTREES
+#define FIB6_SUBTREE(fn)       NULL
+#else
+#define FIB6_SUBTREE(fn)       ((fn)->subtree)
+#endif
 
 /*
  *     routing information
@@ -57,7 +84,6 @@ struct rt6_info
 {
        union {
                struct dst_entry        dst;
-               struct rt6_info         *next;
        } u;
 
        struct inet6_dev                *rt6i_idev;
@@ -79,8 +105,17 @@ struct rt6_info
        struct rt6key                   rt6i_src;
 
        u8                              rt6i_protocol;
+
+#ifdef CONFIG_XFRM
+       u32                             rt6i_flow_cache_genid;
+#endif
 };
 
+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;
@@ -92,28 +127,6 @@ struct fib6_walker_t
        void *args;
 };
 
-extern struct fib6_walker_t fib6_walker_list;
-extern rwlock_t fib6_walker_lock;
-
-static inline void fib6_walker_link(struct fib6_walker_t *w)
-{
-       write_lock_bh(&fib6_walker_lock);
-       w->next = fib6_walker_list.next;
-       w->prev = &fib6_walker_list;
-       w->next->prev = w;
-       w->prev->next = w;
-       write_unlock_bh(&fib6_walker_lock);
-}
-
-static inline void fib6_walker_unlink(struct fib6_walker_t *w)
-{
-       write_lock_bh(&fib6_walker_lock);
-       w->next->prev = w->prev;
-       w->prev->next = w->next;
-       w->prev = w->next = w;
-       write_unlock_bh(&fib6_walker_lock);
-}
-
 struct rt6_statistics {
        __u32           fib_nodes;
        __u32           fib_route_nodes;
@@ -169,9 +182,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);
 
@@ -195,23 +205,15 @@ struct fib6_node          *fib6_locate(struct fib6_node *root,
 extern void                    fib6_clean_all(int (*func)(struct rt6_info *, void *arg),
                                               int prune, void *arg);
 
-extern int                     fib6_walk(struct fib6_walker_t *w);
-extern int                     fib6_walk_continue(struct fib6_walker_t *w);
-
 extern int                     fib6_add(struct fib6_node *root,
                                         struct rt6_info *rt,
-                                        struct nlmsghdr *nlh,
-                                        void *rtattr,
-                                        struct netlink_skb_parms *req);
+                                        struct nl_info *info);
 
 extern int                     fib6_del(struct rt6_info *rt,
-                                        struct nlmsghdr *nlh,
-                                        void *rtattr,
-                                        struct netlink_skb_parms *req);
+                                        struct nl_info *info);
 
 extern void                    inet6_rt_notify(int event, struct rt6_info *rt,
-                                               struct nlmsghdr *nlh,
-                                               struct netlink_skb_parms *req);
+                                               struct nl_info *info);
 
 extern void                    fib6_run_gc(unsigned long dummy);
 
@@ -221,8 +223,6 @@ extern void                 fib6_init(void);
 
 extern void                    fib6_rules_init(void);
 extern void                    fib6_rules_cleanup(void);
-extern int                     fib6_rules_dump(struct sk_buff *,
-                                               struct netlink_callback *);
 
 #endif
 #endif