16 #include <linux/ipv6_route.h>
17 #include <linux/rtnetlink.h>
24 #ifdef CONFIG_IPV6_MULTIPLE_TABLES
25 #define FIB6_TABLE_HASHSZ 256
27 #define FIB6_TABLE_HASHSZ 1
58 #ifdef CONFIG_IPV6_SUBTREES
69 #ifndef CONFIG_IPV6_SUBTREES
70 #define FIB6_SUBTREE(fn) NULL
72 #define FIB6_SUBTREE(fn) ((fn)->subtree)
128 static inline bool rt6_has_peer(
struct rt6_info *rt)
135 __inetpeer_ptr_set_peer(&rt->
_rt6i_peer, peer);
140 return inetpeer_ptr_set_peer(&rt->
_rt6i_peer, peer);
148 static inline void rt6_transfer_peer(
struct rt6_info *rt,
struct rt6_info *ort)
155 return ((
struct rt6_info *)dst)->rt6i_idev;
158 static inline void rt6_clean_expires(
struct rt6_info *rt)
167 static inline void rt6_set_expires(
struct rt6_info *rt,
unsigned long expires)
173 rt->
dst.expires = expires;
176 static inline void rt6_update_expires(
struct rt6_info *rt,
int timeout)
187 dst_set_expires(&rt->
dst, timeout);
196 if (
new == rt->
dst.from)
227 #define RTN_TL_ROOT 0x0001
228 #define RTN_ROOT 0x0002
229 #define RTN_RTINFO 0x0004
245 #define RT6_TABLE_UNSPEC RT_TABLE_UNSPEC
246 #define RT6_TABLE_MAIN RT_TABLE_MAIN
247 #define RT6_TABLE_DFLT RT6_TABLE_MAIN
248 #define RT6_TABLE_INFO RT6_TABLE_MAIN
249 #define RT6_TABLE_PREFIX RT6_TABLE_MAIN
251 #ifdef CONFIG_IPV6_MULTIPLE_TABLES
252 #define FIB6_TABLE_MIN 1
253 #define FIB6_TABLE_MAX RT_TABLE_MAX
254 #define RT6_TABLE_LOCAL RT_TABLE_LOCAL
256 #define FIB6_TABLE_MIN RT_TABLE_MAIN
257 #define FIB6_TABLE_MAX FIB6_TABLE_MIN
258 #define RT6_TABLE_LOCAL RT6_TABLE_MAIN
285 int prune,
void *arg);
289 int prune,
void *arg);
308 #ifdef CONFIG_IPV6_MULTIPLE_TABLES