]> 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 69c444209781e2f468a4337fefb5498742353001..9eda572a2a6534f157b233b71f22bf9ed70abd65 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 */
@@ -39,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
@@ -57,7 +83,6 @@ struct rt6_info
 {
        union {
                struct dst_entry        dst;
-               struct rt6_info         *next;
        } u;
 
        struct inet6_dev                *rt6i_idev;
@@ -81,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;
@@ -147,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);
 
@@ -175,18 +202,13 @@ extern void                       fib6_clean_all(int (*func)(struct rt6_info *, void *arg),
 
 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);