diff options
author | Jonas Gorski <jonas.gorski@bisdn.de> | 2024-05-13 12:00:39 (GMT) |
---|---|---|
committer | Jonas Gorski <jonas.gorski@bisdn.de> | 2024-05-14 09:50:57 (GMT) |
commit | 8cf29d7b4a8f4dadcc68932edc23e05f5d0fee89 (patch) | |
tree | 270e51baaf57f26cf47824d1910bae469f55fb23 /include | |
parent | 7cc72d19f84698a194bee843af66be9be6179baa (diff) | |
download | libnl-8cf29d7b4a8f4dadcc68932edc23e05f5d0fee89.zip libnl-8cf29d7b4a8f4dadcc68932edc23e05f5d0fee89.tar.gz libnl-8cf29d7b4a8f4dadcc68932edc23e05f5d0fee89.tar.bz2 |
nexthop: add a identical helper function
Not all attributes of a nexthop are id attributes, e.g. the flags will
contain state (LINKDOWN, DEAD) of the attached link about which the
kernel will not send route updates.
Likewise, the weight may not exist when processing an ECMP IPv6 route
update which only contains a single nexthop.
Since rtnl_nexthop isn't a first class cache object, we cannot use
nl_object_identical(), so add a separate identical helper function which
compares only fixed attributes.
Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/netlink/route/nexthop.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/netlink/route/nexthop.h b/include/netlink/route/nexthop.h index c4a2604..1beb9fa 100644 --- a/include/netlink/route/nexthop.h +++ b/include/netlink/route/nexthop.h @@ -30,6 +30,9 @@ extern int rtnl_route_nh_compare(struct rtnl_nexthop *, struct rtnl_nexthop *, uint32_t, int); +extern int rtnl_route_nh_identical(struct rtnl_nexthop *, + struct rtnl_nexthop *); + extern void rtnl_route_nh_dump(struct rtnl_nexthop *, struct nl_dump_params *); |