summaryrefslogtreecommitdiff
path: root/lib/nexthop_group.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-09-20 13:59:35 -0400
committerStephen Worley <sworley@cumulusnetworks.com>2019-06-25 22:58:47 -0400
commit6c8b51e172a67c8e575299ad493f1702a0608336 (patch)
tree3788f202434dc6c23fe4e4761468cd11879dfc5c /lib/nexthop_group.h
parentf3afd0a4e18f3b1fe11f687f9fceba1befbdb06d (diff)
lib: Add a couple functions to nexthop_group.c
Add nexthop_group_copy and nexthop_group_add_sorted functions. nexthop_group_copy -> Copy src nexthop_group into dst nexthop_group nexthop_group_add_sorted -> Adds a new nexthop to the nexthop group in a sorted manner. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/nexthop_group.h')
-rw-r--r--lib/nexthop_group.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/nexthop_group.h b/lib/nexthop_group.h
index 5adf2db937..104e2051f5 100644
--- a/lib/nexthop_group.h
+++ b/lib/nexthop_group.h
@@ -43,6 +43,10 @@ struct nexthop_group *nexthop_group_new(void);
void nexthop_group_delete(struct nexthop_group **nhg);
void nexthop_add(struct nexthop **target, struct nexthop *nexthop);
+void nexthop_group_add_sorted(struct nexthop_group *nhg,
+ struct nexthop *nexthop);
+void nexthop_group_copy(struct nexthop_group *to,
+ struct nexthop_group *from);
void nexthop_del(struct nexthop_group *nhg, struct nexthop *nexthop);
void copy_nexthops(struct nexthop **tnh, const struct nexthop *nh,
struct nexthop *rparent);