summaryrefslogtreecommitdiff
path: root/lib/nexthop.h
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2019-08-19 15:56:45 -0400
committerStephen Worley <sworley@cumulusnetworks.com>2019-08-19 15:56:45 -0400
commit3c6e0bd4726f43bd0ab96c26747022bff03b119d (patch)
treef082c807a625c8b2d5290c98548102d716f66c97 /lib/nexthop.h
parent8c15fa95a81fe0062556e3b64df29509eeb035e6 (diff)
lib: Sort zapi_nexthops on the encode
Sort nexthops before we push them to zebra. This offloads the nexthop sorting zebra is doing onto the upper level protocols so that when it gets to zebra and we construct a group, it just has to append them to the tail for every nexthop. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'lib/nexthop.h')
-rw-r--r--lib/nexthop.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/nexthop.h b/lib/nexthop.h
index 20401cd581..9dd5fc6fd3 100644
--- a/lib/nexthop.h
+++ b/lib/nexthop.h
@@ -142,6 +142,9 @@ extern bool nexthop_same(const struct nexthop *nh1, const struct nexthop *nh2);
extern bool nexthop_same_no_labels(const struct nexthop *nh1,
const struct nexthop *nh2);
extern int nexthop_cmp(const struct nexthop *nh1, const struct nexthop *nh2);
+extern int nexthop_g_addr_cmp(enum nexthop_types_t type,
+ const union g_addr *addr1,
+ const union g_addr *addr2);
extern const char *nexthop_type_to_str(enum nexthop_types_t nh_type);
extern bool nexthop_labels_match(const struct nexthop *nh1,