summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJonas Johansson <jonas.johansson@westermo.se>2016-04-28 14:07:11 (GMT)
committerThomas Haller <thaller@redhat.com>2016-05-29 13:19:22 (GMT)
commit3bf503d30c271822158414f63eed620afc9b10cd (patch)
tree69459bb2a8e438328c8182430425748a474765af /include
parent648338a2170854952e605175af141ee27cc8dd2b (diff)
downloadlibnl-3bf503d30c271822158414f63eed620afc9b10cd.zip
libnl-3bf503d30c271822158414f63eed620afc9b10cd.tar.gz
libnl-3bf503d30c271822158414f63eed620afc9b10cd.tar.bz2
neigh: add function to look up neighbour (fdb) by ifindex, mac and vlan
The rtnl_neigh_get() function can not be used to look up a fdb entry in the neigh cache. This is due to that the function searches among destination addresses (NDA_DST) and not among link layer addresses (NDA_LLADDR), which is used by fdb entries. A fdb entry can also exist in several vlans, so a vlan id parameter is also needed to find a unique entry. This commit adds a function, rtnl_neigh_get_by_vlan() which searches the neigh cache for a specific neighbour (fdb) entry by interface index, link layer address and vlan id. Signed-off-by: Jonas Johansson <jonas.johansson@westermo.se> Signed-off-by: Thomas Haller <thaller@redhat.com> http://lists.infradead.org/pipermail/libnl/2016-May/002124.html https://github.com/thom311/libnl/pull/98
Diffstat (limited to 'include')
-rw-r--r--include/netlink/route/neighbour.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/netlink/route/neighbour.h b/include/netlink/route/neighbour.h
index fb98113..6ea4753 100644
--- a/include/netlink/route/neighbour.h
+++ b/include/netlink/route/neighbour.h
@@ -31,6 +31,8 @@ extern int rtnl_neigh_alloc_cache_flags(struct nl_sock *,
unsigned int);
extern struct rtnl_neigh *rtnl_neigh_get(struct nl_cache *, int,
struct nl_addr *);
+extern struct rtnl_neigh *rtnl_neigh_get_by_vlan(struct nl_cache *, int,
+ struct nl_addr *, int);
extern int rtnl_neigh_parse(struct nlmsghdr *, struct rtnl_neigh **);