1 #ifndef _COMPAT_NET_DST_H
2 #define _COMPAT_NET_DST_H 1
4 #include <linux/version.h>
6 #if (LINUX_VERSION_CODE > KERNEL_VERSION(3,1,0))
8 #else /* (LINUX_VERSION_CODE > KERNEL_VERSION(3,1,0)) */
9 #include_next <net/dst.h>
11 static inline struct neighbour *dst_get_neighbour(struct dst_entry *dst)
13 return dst->neighbour;
16 static inline void dst_set_neighbour(struct dst_entry *dst, struct neighbour *neigh)
18 dst->neighbour = neigh;
21 static inline struct neighbour *dst_get_neighbour_raw(struct dst_entry *dst)
23 return rcu_dereference_raw(dst->neighbour);
25 #endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(3,1,0)) */
27 #endif /* _COMPAT_NET_DST_H */