Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / include / net / ip_fib.h
index 48a6ea4..e000fa2 100644 (file)
@@ -37,6 +37,7 @@ struct kern_rta {
        u32             *rta_flow;
        struct rta_cacheinfo *rta_ci;
        struct rta_session *rta_sess;
+       u32             *rta_mp_alg;
 };
 
 struct fib_info;
@@ -80,6 +81,9 @@ struct fib_info {
        int                     fib_nhs;
 #ifdef CONFIG_IP_ROUTE_MULTIPATH
        int                     fib_power;
+#endif
+#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
+       u32                     fib_mp_alg;
 #endif
        struct fib_nh           fib_nh[0];
 #define fib_dev                fib_nh[0].nh_dev
@@ -95,12 +99,30 @@ struct fib_result {
        unsigned char   nh_sel;
        unsigned char   type;
        unsigned char   scope;
+#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
+       __u32           network;
+       __u32           netmask;
+#endif
        struct fib_info *fi;
 #ifdef CONFIG_IP_MULTIPLE_TABLES
        struct fib_rule *r;
 #endif
 };
 
+struct fib_result_nl {
+       u32             fl_addr;   /* To be looked up*/ 
+       u32             fl_fwmark; 
+       unsigned char   fl_tos;
+       unsigned char   fl_scope;
+       unsigned char   tb_id_in;
+
+       unsigned char   tb_id;      /* Results */
+       unsigned char   prefixlen;
+       unsigned char   nh_sel;
+       unsigned char   type;
+       unsigned char   scope;
+       int             err;      
+};
 
 #ifdef CONFIG_IP_ROUTE_MULTIPATH
 
@@ -119,6 +141,14 @@ struct fib_result {
 #define FIB_RES_DEV(res)               (FIB_RES_NH(res).nh_dev)
 #define FIB_RES_OIF(res)               (FIB_RES_NH(res).nh_oif)
 
+#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
+#define FIB_RES_NETWORK(res)           ((res).network)
+#define FIB_RES_NETMASK(res)           ((res).netmask)
+#else /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */
+#define FIB_RES_NETWORK(res)           (0)
+#define FIB_RES_NETMASK(res)           (0)
+#endif /* CONFIG_IP_ROUTE_MULTIPATH_WRANDOM */
+
 struct fib_table {
        unsigned char   tb_id;
        unsigned        tb_stamp;
@@ -200,7 +230,6 @@ extern void fib_select_default(const struct flowi *flp, struct fib_result *res);
 
 /* Exported by fib_frontend.c */
 extern void            ip_fib_init(void);
-extern void            fib_flush(void);
 extern int inet_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
 extern int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
 extern int inet_rtm_getroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
@@ -209,6 +238,8 @@ extern int fib_validate_source(u32 src, u32 dst, u8 tos, int oif,
                               struct net_device *dev, u32 *spec_dst, u32 *itag);
 extern void fib_select_multipath(const struct flowi *flp, struct fib_result *res);
 
+struct rtentry;
+
 /* Exported by fib_semantics.c */
 extern int ip_fib_check_default(u32 gw, struct net_device *dev);
 extern int fib_sync_down(u32 local, struct net_device *dev, int force);
@@ -226,7 +257,6 @@ extern struct fib_table *fib_hash_init(int id);
 extern int inet_rtm_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
 extern int inet_rtm_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
 extern int inet_dump_rules(struct sk_buff *skb, struct netlink_callback *cb);
-extern u32 fib_rules_map_destination(u32 daddr, struct fib_result *res);
 #ifdef CONFIG_NET_CLS_ROUTE
 extern u32 fib_rules_tclass(struct fib_result *res);
 #endif
@@ -267,4 +297,9 @@ static inline void fib_res_put(struct fib_result *res)
 #endif
 }
 
+#ifdef CONFIG_PROC_FS
+extern int  fib_proc_init(void);
+extern void fib_proc_exit(void);
+#endif
+
 #endif  /* _NET_FIB_H */