diff options
| author | Hiroki Shirokura <slank.dev@gmail.com> | 2020-08-19 09:46:33 +0900 | 
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2021-06-02 10:24:47 -0400 | 
| commit | cb7775a9740d78ba81b5126fcb637102e4bad1d6 (patch) | |
| tree | 3a28719469555d21feb8e7b9c4d0b0401f177cfc /lib/nexthop.h | |
| parent | 7a4b49bdd1ce453cb50a84167fb9f3e2f8e58630 (diff) | |
lib: add new nexthop's attributes seg6local (step1)
This commit is a part of #5853 works that add new nexthop's addional
object for SRv6 routing about seg6local route. Before this commit,
we can add MPLS info as additional object on nexthop.
This commit make it add more support about seg6local routes.
seg6local routes are ones of the LWT routing mechanism,
so configuration of seg6local routes is performed by
ZEBRA_ROUTE_SEND, it's same as MPLS configuration.
Real configuration implementation isn't implemented at this commit.
later commit add that. This commit add only nexthop additional object
and some misc functions.
Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
Diffstat (limited to 'lib/nexthop.h')
| -rw-r--r-- | lib/nexthop.h | 8 | 
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/nexthop.h b/lib/nexthop.h index d6ea83cf06..7bddee8713 100644 --- a/lib/nexthop.h +++ b/lib/nexthop.h @@ -26,6 +26,7 @@  #include "prefix.h"  #include "mpls.h"  #include "vxlan.h" +#include "srv6.h"  #ifdef __cplusplus  extern "C" { @@ -139,6 +140,10 @@ struct nexthop {  	/* SR-TE color used for matching SR-TE policies */  	uint32_t srte_color; + +	/* SRv6 localsid info for Endpoint-behaviour */ +	enum seg6local_action_t nh_seg6local_action; +	struct seg6local_context *nh_seg6local_ctx;  };  /* Utility to append one nexthop to another. */ @@ -157,6 +162,9 @@ void nexthops_free(struct nexthop *nexthop);  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_seg6local(struct nexthop *nexthop, uint32_t action, +			   const struct seg6local_context *ctx); +void nexthop_del_seg6local(struct nexthop *nexthop);  /*   * Allocate a new nexthop object and initialize it from various args.  | 
