diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-03-03 18:11:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-04 00:23:23 -0500 |
commit | 4fd3d7d9e868ffbdb0e7a67c5c8e9dfdcd846a62 (patch) | |
tree | a6ee61e3ac7571516b693c2465c6309a59cd0a08 /include/net/neighbour.h | |
parent | 60395a20ffd74166ea373ea91418d6f98fa7fdfb (diff) |
neigh: Add helper function neigh_xmit
For MPLS I am building the code so that either the neighbour mac
address can be specified or we can have a next hop in ipv4 or ipv6.
The kind of next hop we have is indicated by the neighbour table
pointer. A neighbour table pointer of NULL is a link layer address.
A non-NULL neighbour table pointer indicates which neighbour table and
thus which address family the next hop address is in that we need to
look up.
The code either sends a packet directly or looks up the appropriate
neighbour table entry and sends the packet.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/neighbour.h')
-rw-r--r-- | include/net/neighbour.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 14e3f017966b..afb8237b0a8c 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
@@ -358,6 +358,7 @@ void neigh_for_each(struct neigh_table *tbl, | |||
358 | void (*cb)(struct neighbour *, void *), void *cookie); | 358 | void (*cb)(struct neighbour *, void *), void *cookie); |
359 | void __neigh_for_each_release(struct neigh_table *tbl, | 359 | void __neigh_for_each_release(struct neigh_table *tbl, |
360 | int (*cb)(struct neighbour *)); | 360 | int (*cb)(struct neighbour *)); |
361 | int neigh_xmit(int fam, struct net_device *, const void *, struct sk_buff *); | ||
361 | void pneigh_for_each(struct neigh_table *tbl, | 362 | void pneigh_for_each(struct neigh_table *tbl, |
362 | void (*cb)(struct pneigh_entry *)); | 363 | void (*cb)(struct pneigh_entry *)); |
363 | 364 | ||
@@ -511,4 +512,6 @@ static inline void neigh_ha_snapshot(char *dst, const struct neighbour *n, | |||
511 | memcpy(dst, n->ha, dev->addr_len); | 512 | memcpy(dst, n->ha, dev->addr_len); |
512 | } while (read_seqretry(&n->ha_lock, seq)); | 513 | } while (read_seqretry(&n->ha_lock, seq)); |
513 | } | 514 | } |
515 | |||
516 | |||
514 | #endif | 517 | #endif |