diff options
| author | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2023-02-02 12:54:48 +0100 |
|---|---|---|
| committer | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2023-09-11 17:34:52 +0200 |
| commit | b822dc4beea74ac6a8cc9ad4d64e41851d3b7e9f (patch) | |
| tree | 84d35ed954887dd6fed4fd3711d9830faa89a2db | |
| parent | 2e8d254ac71a5bce205616a8d62690a183f54126 (diff) | |
isisd: Add func to request an SRv6 locator chunk
Add a function to ask zebra to allocate a chunk from the SRv6 locator
specified as a parameter.
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
| -rw-r--r-- | isisd/isis_zebra.c | 12 | ||||
| -rw-r--r-- | isisd/isis_zebra.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/isisd/isis_zebra.c b/isisd/isis_zebra.c index 4f3198a9fe..e2c6a5eadc 100644 --- a/isisd/isis_zebra.c +++ b/isisd/isis_zebra.c @@ -820,6 +820,18 @@ static int isis_zebra_client_close_notify(ZAPI_CALLBACK_ARGS) return ret; } +/** + * Request an SRv6 locator chunk to the SRv6 Manager (zebra) asynchronously. + * + * @param locator_name Name of SRv6 locator + * + * @result 0 on success, -1 otherwise + */ +int isis_zebra_srv6_manager_get_locator_chunk(const char *name) +{ + return srv6_manager_get_locator_chunk(zclient, name); +} + static zclient_handler *const isis_handlers[] = { [ZEBRA_ROUTER_ID_UPDATE] = isis_router_id_update_zebra, [ZEBRA_INTERFACE_ADDRESS_ADD] = isis_zebra_if_address_add, diff --git a/isisd/isis_zebra.h b/isisd/isis_zebra.h index 1dcd896d0b..c32093f957 100644 --- a/isisd/isis_zebra.h +++ b/isisd/isis_zebra.h @@ -57,4 +57,6 @@ void isis_zebra_vrf_register(struct isis *isis); void isis_zebra_vrf_deregister(struct isis *isis); int isis_zebra_ls_register(bool up); +extern int isis_zebra_srv6_manager_get_locator_chunk(const char *name); + #endif /* _ZEBRA_ISIS_ZEBRA_H */ |
