diff options
Diffstat (limited to 'include/net/neighbour.h')
-rw-r--r-- | include/net/neighbour.h | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 6cdfeedb650b..344d8988842a 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
@@ -202,9 +202,16 @@ extern struct neighbour * neigh_lookup(struct neigh_table *tbl, | |||
202 | extern struct neighbour * neigh_lookup_nodev(struct neigh_table *tbl, | 202 | extern struct neighbour * neigh_lookup_nodev(struct neigh_table *tbl, |
203 | struct net *net, | 203 | struct net *net, |
204 | const void *pkey); | 204 | const void *pkey); |
205 | extern struct neighbour * neigh_create(struct neigh_table *tbl, | 205 | extern struct neighbour * __neigh_create(struct neigh_table *tbl, |
206 | const void *pkey, | ||
207 | struct net_device *dev, | ||
208 | bool want_ref); | ||
209 | static inline struct neighbour *neigh_create(struct neigh_table *tbl, | ||
206 | const void *pkey, | 210 | const void *pkey, |
207 | struct net_device *dev); | 211 | struct net_device *dev) |
212 | { | ||
213 | return __neigh_create(tbl, pkey, dev, true); | ||
214 | } | ||
208 | extern void neigh_destroy(struct neighbour *neigh); | 215 | extern void neigh_destroy(struct neighbour *neigh); |
209 | extern int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb); | 216 | extern int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb); |
210 | extern int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, | 217 | extern int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, |
@@ -302,12 +309,6 @@ static inline struct neighbour * neigh_clone(struct neighbour *neigh) | |||
302 | 309 | ||
303 | #define neigh_hold(n) atomic_inc(&(n)->refcnt) | 310 | #define neigh_hold(n) atomic_inc(&(n)->refcnt) |
304 | 311 | ||
305 | static inline void neigh_confirm(struct neighbour *neigh) | ||
306 | { | ||
307 | if (neigh) | ||
308 | neigh->confirmed = jiffies; | ||
309 | } | ||
310 | |||
311 | static inline int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb) | 312 | static inline int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb) |
312 | { | 313 | { |
313 | unsigned long now = jiffies; | 314 | unsigned long now = jiffies; |
@@ -351,15 +352,6 @@ static inline int neigh_hh_output(struct hh_cache *hh, struct sk_buff *skb) | |||
351 | return dev_queue_xmit(skb); | 352 | return dev_queue_xmit(skb); |
352 | } | 353 | } |
353 | 354 | ||
354 | static inline int neigh_output(struct neighbour *n, struct sk_buff *skb) | ||
355 | { | ||
356 | struct hh_cache *hh = &n->hh; | ||
357 | if ((n->nud_state & NUD_CONNECTED) && hh->hh_len) | ||
358 | return neigh_hh_output(hh, skb); | ||
359 | else | ||
360 | return n->output(n, skb); | ||
361 | } | ||
362 | |||
363 | static inline struct neighbour * | 355 | static inline struct neighbour * |
364 | __neigh_lookup(struct neigh_table *tbl, const void *pkey, struct net_device *dev, int creat) | 356 | __neigh_lookup(struct neigh_table *tbl, const void *pkey, struct net_device *dev, int creat) |
365 | { | 357 | { |