aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/neighbour.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/neighbour.h')
-rw-r--r--include/net/neighbour.h26
1 files changed, 9 insertions, 17 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 6cdfeedb650..344d8988842 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -202,9 +202,16 @@ extern struct neighbour * neigh_lookup(struct neigh_table *tbl,
202extern struct neighbour * neigh_lookup_nodev(struct neigh_table *tbl, 202extern 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);
205extern struct neighbour * neigh_create(struct neigh_table *tbl, 205extern struct neighbour * __neigh_create(struct neigh_table *tbl,
206 const void *pkey,
207 struct net_device *dev,
208 bool want_ref);
209static 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}
208extern void neigh_destroy(struct neighbour *neigh); 215extern void neigh_destroy(struct neighbour *neigh);
209extern int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb); 216extern int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb);
210extern int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, 217extern 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
305static inline void neigh_confirm(struct neighbour *neigh)
306{
307 if (neigh)
308 neigh->confirmed = jiffies;
309}
310
311static inline int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb) 312static 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
354static 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
363static inline struct neighbour * 355static 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{