ip_fib.h (f43dc23d5ea91fca257be02138a255f02d98e806) ip_fib.h (c7066f70d9610df0b9406cc635fc09e86136e714)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Definitions for the Forwarding Information Base.
7 *
8 * Authors: A.N.Kuznetsov, <kuznet@ms2.inr.ac.ru>

--- 41 unchanged lines hidden (view full) ---

50 struct hlist_node nh_hash;
51 struct fib_info *nh_parent;
52 unsigned nh_flags;
53 unsigned char nh_scope;
54#ifdef CONFIG_IP_ROUTE_MULTIPATH
55 int nh_weight;
56 int nh_power;
57#endif
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Definitions for the Forwarding Information Base.
7 *
8 * Authors: A.N.Kuznetsov, <kuznet@ms2.inr.ac.ru>

--- 41 unchanged lines hidden (view full) ---

50 struct hlist_node nh_hash;
51 struct fib_info *nh_parent;
52 unsigned nh_flags;
53 unsigned char nh_scope;
54#ifdef CONFIG_IP_ROUTE_MULTIPATH
55 int nh_weight;
56 int nh_power;
57#endif
58#ifdef CONFIG_NET_CLS_ROUTE
58#ifdef CONFIG_IP_ROUTE_CLASSID
59 __u32 nh_tclassid;
60#endif
61 int nh_oif;
62 __be32 nh_gw;
63};
64
65/*
66 * This structure contains data shared by many of routes.

--- 129 unchanged lines hidden (view full) ---

196 return 0;
197 return -ENETUNREACH;
198}
199
200#else /* CONFIG_IP_MULTIPLE_TABLES */
201extern int __net_init fib4_rules_init(struct net *net);
202extern void __net_exit fib4_rules_exit(struct net *net);
203
59 __u32 nh_tclassid;
60#endif
61 int nh_oif;
62 __be32 nh_gw;
63};
64
65/*
66 * This structure contains data shared by many of routes.

--- 129 unchanged lines hidden (view full) ---

196 return 0;
197 return -ENETUNREACH;
198}
199
200#else /* CONFIG_IP_MULTIPLE_TABLES */
201extern int __net_init fib4_rules_init(struct net *net);
202extern void __net_exit fib4_rules_exit(struct net *net);
203
204#ifdef CONFIG_NET_CLS_ROUTE
204#ifdef CONFIG_IP_ROUTE_CLASSID
205extern u32 fib_rules_tclass(struct fib_result *res);
206#endif
207
208extern int fib_lookup(struct net *n, struct flowi *flp, struct fib_result *res);
209
210extern struct fib_table *fib_new_table(struct net *net, u32 id);
211extern struct fib_table *fib_get_table(struct net *net, u32 id);
212

--- 17 unchanged lines hidden (view full) ---

230extern void fib_select_multipath(const struct flowi *flp, struct fib_result *res);
231
232/* Exported by fib_{hash|trie}.c */
233extern void fib_hash_init(void);
234extern struct fib_table *fib_hash_table(u32 id);
235
236static inline void fib_combine_itag(u32 *itag, struct fib_result *res)
237{
205extern u32 fib_rules_tclass(struct fib_result *res);
206#endif
207
208extern int fib_lookup(struct net *n, struct flowi *flp, struct fib_result *res);
209
210extern struct fib_table *fib_new_table(struct net *net, u32 id);
211extern struct fib_table *fib_get_table(struct net *net, u32 id);
212

--- 17 unchanged lines hidden (view full) ---

230extern void fib_select_multipath(const struct flowi *flp, struct fib_result *res);
231
232/* Exported by fib_{hash|trie}.c */
233extern void fib_hash_init(void);
234extern struct fib_table *fib_hash_table(u32 id);
235
236static inline void fib_combine_itag(u32 *itag, struct fib_result *res)
237{
238#ifdef CONFIG_NET_CLS_ROUTE
238#ifdef CONFIG_IP_ROUTE_CLASSID
239#ifdef CONFIG_IP_MULTIPLE_TABLES
240 u32 rtag;
241#endif
242 *itag = FIB_RES_NH(*res).nh_tclassid<<16;
243#ifdef CONFIG_IP_MULTIPLE_TABLES
244 rtag = fib_rules_tclass(res);
245 if (*itag == 0)
246 *itag = (rtag<<16);

--- 27 unchanged lines hidden ---
239#ifdef CONFIG_IP_MULTIPLE_TABLES
240 u32 rtag;
241#endif
242 *itag = FIB_RES_NH(*res).nh_tclassid<<16;
243#ifdef CONFIG_IP_MULTIPLE_TABLES
244 rtag = fib_rules_tclass(res);
245 if (*itag == 0)
246 *itag = (rtag<<16);

--- 27 unchanged lines hidden ---