summaryrefslogtreecommitdiff
path: root/lib/nexthop.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/nexthop.h')
-rw-r--r--lib/nexthop.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/nexthop.h b/lib/nexthop.h
index 6710914e40..8d7580f6b4 100644
--- a/lib/nexthop.h
+++ b/lib/nexthop.h
@@ -118,13 +118,22 @@ struct nexthop {
uint8_t weight;
};
+
+/* Utility to append one nexthop to another. */
+#define NEXTHOP_APPEND(to, new) \
+ do { \
+ (to)->next = (new); \
+ (new)->prev = (to); \
+ (new)->next = NULL; \
+ } while (0)
+
struct nexthop *nexthop_new(void);
void nexthop_free(struct nexthop *nexthop);
void nexthops_free(struct nexthop *nexthop);
-void nexthop_add_labels(struct nexthop *, enum lsp_types_t, uint8_t,
- mpls_label_t *);
+void nexthop_add_labels(struct nexthop *nexthop, enum lsp_types_t ltype,
+ uint8_t num_labels, const mpls_label_t *labels);
void nexthop_del_labels(struct nexthop *);
/*