ip6_fib.h (3f4fe759f0042c762e03194716c8f79f1905dc40) ip6_fib.h (6a3e030f08e1b700aa6d1ebdc7ebe4c44a2ef67a)
1/*
2 * Linux INET6 implementation
3 *
4 * Authors:
5 * Pedro Roque <roque@di.fc.ul.pt>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License

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

218
219static inline bool fib6_check_expired(const struct fib6_info *f6i)
220{
221 if (f6i->fib6_flags & RTF_EXPIRES)
222 return time_after(jiffies, f6i->expires);
223 return false;
224}
225
1/*
2 * Linux INET6 implementation
3 *
4 * Authors:
5 * Pedro Roque <roque@di.fc.ul.pt>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License

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

218
219static inline bool fib6_check_expired(const struct fib6_info *f6i)
220{
221 if (f6i->fib6_flags & RTF_EXPIRES)
222 return time_after(jiffies, f6i->expires);
223 return false;
224}
225
226static inline void rt6_clean_expires(struct rt6_info *rt)
227{
228 rt->rt6i_flags &= ~RTF_EXPIRES;
229 rt->dst.expires = 0;
230}
231
232static inline void rt6_set_expires(struct rt6_info *rt, unsigned long expires)
233{
234 rt->dst.expires = expires;
235 rt->rt6i_flags |= RTF_EXPIRES;
236}
237
238static inline void rt6_update_expires(struct rt6_info *rt0, int timeout)
239{
240 if (!(rt0->rt6i_flags & RTF_EXPIRES) && rt0->from)
241 rt0->dst.expires = rt0->from->expires;
242
243 dst_set_expires(&rt0->dst, timeout);
244 rt0->rt6i_flags |= RTF_EXPIRES;
245}
246
247/* Function to safely get fn->sernum for passed in rt
248 * and store result in passed in cookie.
249 * Return true if we can get cookie safely
250 * Return false if not
251 */
252static inline bool rt6_get_cookie_safe(const struct fib6_info *f6i,
253 u32 *cookie)
254{

--- 248 unchanged lines hidden ---
226/* Function to safely get fn->sernum for passed in rt
227 * and store result in passed in cookie.
228 * Return true if we can get cookie safely
229 * Return false if not
230 */
231static inline bool rt6_get_cookie_safe(const struct fib6_info *f6i,
232 u32 *cookie)
233{

--- 248 unchanged lines hidden ---