summaryrefslogtreecommitdiff
path: root/lib/nexthop.h
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2019-04-02 12:33:06 -0400
committerMark Stapp <mjs@voltanet.io>2019-04-03 04:25:21 -0400
commit55f93d4b0d5f14136b2b29307b3ee55363669aa4 (patch)
tree2da0467f3aaec37344cb529352d240f8d9cf8eb3 /lib/nexthop.h
parent09310979549d06725619fc80fdcb3c2f914a4549 (diff)
libs: nexthop comparison includes labels if present
Adjust the nexthop comparison api so that it calls the label- comparison api. Adjust the label-comp api so that "no labels" is "equal". Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'lib/nexthop.h')
-rw-r--r--lib/nexthop.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/nexthop.h b/lib/nexthop.h
index fd27ca207b..9cdb040fc4 100644
--- a/lib/nexthop.h
+++ b/lib/nexthop.h
@@ -143,10 +143,12 @@ extern bool nexthop_same(const struct nexthop *nh1, const struct nexthop *nh2);
extern const char *nexthop_type_to_str(enum nexthop_types_t nh_type);
extern int nexthop_same_no_recurse(const struct nexthop *next1,
const struct nexthop *next2);
-extern int nexthop_labels_match(struct nexthop *nh1, struct nexthop *nh2);
+extern int nexthop_labels_match(const struct nexthop *nh1,
+ const struct nexthop *nh2);
extern int nexthop_same_firsthop(struct nexthop *next1, struct nexthop *next2);
-extern const char *nexthop2str(const struct nexthop *nexthop, char *str, int size);
+extern const char *nexthop2str(const struct nexthop *nexthop,
+ char *str, int size);
extern struct nexthop *nexthop_next(struct nexthop *nexthop);
extern unsigned int nexthop_level(struct nexthop *nexthop);