summaryrefslogtreecommitdiff
path: root/lib/nexthop_group.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-02-15 11:02:44 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-04-18 14:17:44 -0400
commit454192f46f76c221670f4a7aa4bfc0c870d6ed45 (patch)
treeb7fe489f0d1024634fcf508c46d97caeb2f3e1d2 /lib/nexthop_group.h
parent73587535ff205e7e65eb77765be565fc76707e0c (diff)
lib: Add a counter for number of nexthops
Add a ability to count the number of nexthops in a nexthop_group. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/nexthop_group.h')
-rw-r--r--lib/nexthop_group.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/nexthop_group.h b/lib/nexthop_group.h
index f68033c20c..5adf2db937 100644
--- a/lib/nexthop_group.h
+++ b/lib/nexthop_group.h
@@ -117,6 +117,11 @@ extern struct nexthop_group_cmd *nhgc_find(const char *name);
extern void nexthop_group_write_nexthop(struct vty *vty, struct nexthop *nh);
+/* Return the number of nexthops in this nhg */
+extern uint8_t nexthop_group_nexthop_num(const struct nexthop_group *nhg);
+extern uint8_t
+nexthop_group_active_nexthop_num(const struct nexthop_group *nhg);
+
#ifdef __cplusplus
}
#endif