summaryrefslogtreecommitdiffstats
path: root/include/netlink/route
diff options
context:
space:
mode:
authorBen Gamsa <ben@somanetworks.com>2008-05-08 15:42:09 (GMT)
committerThomas Graf <tgr@lsx.localdomain>2008-05-08 15:54:37 (GMT)
commitcc9c6d63848400b77906a4a9df0be826dfc21b72 (patch)
tree203c2ed72d8bd0c8fbd5bd9e748c7ee4714d72a0 /include/netlink/route
parent48e1e5c4720094f60494ee55c2a22230ac986ad3 (diff)
downloadlibnl-cc9c6d63848400b77906a4a9df0be826dfc21b72.zip
libnl-cc9c6d63848400b77906a4a9df0be826dfc21b72.tar.gz
libnl-cc9c6d63848400b77906a4a9df0be826dfc21b72.tar.bz2
Added two new functions to facilitate processing the nexthop entries for routes.
Added rtnl_route_foreach_nexthop() to walk the list of nexthops invoking a caller-provided callback for each nexthop entry, and added rtnl_route_nexthop_n() to retrieve the Nth nexthop entry in the list.
Diffstat (limited to 'include/netlink/route')
-rw-r--r--include/netlink/route/route.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/netlink/route/route.h b/include/netlink/route/route.h
index b7bf155..071f2c5 100644
--- a/include/netlink/route/route.h
+++ b/include/netlink/route/route.h
@@ -102,6 +102,12 @@ extern void rtnl_route_remove_nexthop(struct rtnl_route *,
extern struct nl_list_head * rtnl_route_get_nexthops(struct rtnl_route *);
extern int rtnl_route_get_nnexthops(struct rtnl_route *);
+extern void rtnl_route_foreach_nexthop(struct rtnl_route *r,
+ void (*cb)(struct rtnl_nexthop *, void *),
+ void *arg);
+
+extern struct rtnl_nexthop * rtnl_route_nexthop_n(struct rtnl_route *r, int n);
+
extern int rtnl_route_guess_scope(struct rtnl_route *);
extern char * rtnl_route_table2str(int, char *, size_t);