#include "prefix.h"
#include "mpls.h"
#include "vxlan.h"
+#include "srv6.h"
#ifdef __cplusplus
extern "C" {
/* SR-TE color used for matching SR-TE policies */
uint32_t srte_color;
+
+ /* SRv6 information */
+ struct nexthop_srv6 *nh_srv6;
};
/* Utility to append one nexthop to another. */
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 *);
+void nexthop_add_srv6_seg6local(struct nexthop *nexthop, uint32_t action,
+ const struct seg6local_context *ctx);
+void nexthop_del_srv6_seg6local(struct nexthop *nexthop);
+void nexthop_add_srv6_seg6(struct nexthop *nexthop,
+ const struct in6_addr *segs);
+void nexthop_del_srv6_seg6(struct nexthop *nexthop);
/*
* Allocate a new nexthop object and initialize it from various args.
vrf_id_t vrf_id);
struct nexthop *nexthop_from_ipv6_ifindex(const struct in6_addr *ipv6,
ifindex_t ifindex, vrf_id_t vrf_id);
-struct nexthop *nexthop_from_blackhole(enum blackhole_type bh_type);
+struct nexthop *nexthop_from_blackhole(enum blackhole_type bh_type,
+ vrf_id_t nh_vrf_id);
/*
* Hash a nexthop. Suitable for use with hash tables.
const union g_addr *addr1,
const union g_addr *addr2);
+/* More-limited comparison function used to detect duplicate nexthops.
+ * Returns -1, 0, 1
+ */
+int nexthop_cmp_basic(const struct nexthop *nh1, const struct nexthop *nh2);
+
extern const char *nexthop_type_to_str(enum nexthop_types_t nh_type);
extern bool nexthop_labels_match(const struct nexthop *nh1,
const struct nexthop *nh2);
#pragma FRR printfrr_ext "%pNH" (struct nexthop *)
#endif
+ssize_t printfrr_nhs(struct fbuf *buf, const struct nexthop *nh);
#ifdef __cplusplus
}
#endif