summaryrefslogtreecommitdiff
path: root/zebra/zebra_srv6.h
diff options
context:
space:
mode:
authorCarmine Scarpitta <cscarpit@cisco.com>2024-03-22 19:31:01 +0100
committerCarmine Scarpitta <cscarpit@cisco.com>2024-06-13 14:54:16 +0200
commit779d4c2702ac446cc4b96a1a9d2d62d1b0bbe232 (patch)
tree1a5447630cf2c4869cd40d44529bab15b7cc4120 /zebra/zebra_srv6.h
parentf00554ed563b8a4ce0cc7fff7ea107d3ae8aa6b1 (diff)
zebra: CLI to specify format of an SRv6 locator
Add the CLI to choose the SID format of a locator. When the SID format of a locator is changed, the SIDs allocated from that locator might no longer be valid (for example, because the new format might involve a different SID allocation schema). In such a case, it is necessary to notify all the zclients so that they can withdraw/uninstall the old SIDs that use the previous format and allocate/install/advertise the new SIDs based on the new format. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Diffstat (limited to 'zebra/zebra_srv6.h')
-rw-r--r--zebra/zebra_srv6.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/zebra/zebra_srv6.h b/zebra/zebra_srv6.h
index e81d182419..0a8b58ce61 100644
--- a/zebra/zebra_srv6.h
+++ b/zebra/zebra_srv6.h
@@ -68,7 +68,7 @@ struct zebra_srv6_sid_block {
* Pointer to the SID format that defines the structure of the SIDs
* allocated from this block
*/
- struct zebra_srv6_sid_format *sid_format;
+ struct srv6_sid_format *sid_format;
/*
* Run-time information/state of this SID block.
@@ -169,13 +169,16 @@ extern void zebra_srv6_encap_src_addr_unset(void);
void srv6_sid_format_register(struct srv6_sid_format *format);
void srv6_sid_format_unregister(struct srv6_sid_format *format);
struct srv6_sid_format *srv6_sid_format_lookup(const char *name);
+void zebra_srv6_locator_format_set(struct srv6_locator *locator,
+ struct srv6_sid_format *format);
+void zebra_srv6_sid_format_changed_cb(struct srv6_sid_format *format);
uint32_t *zebra_srv6_sid_func_alloc(uint32_t func);
void zebra_srv6_sid_func_free(uint32_t *func);
void delete_zebra_srv6_sid_func(void *val);
extern struct zebra_srv6_sid_block *
-zebra_srv6_sid_block_alloc(struct zebra_srv6_sid_format *format,
+zebra_srv6_sid_block_alloc(struct srv6_sid_format *format,
struct prefix_ipv6 *prefix);
extern void zebra_srv6_sid_block_free(struct zebra_srv6_sid_block *block);
extern void delete_zebra_srv6_sid_block(void *val);