forked from Mirror/frr
bgpd: Add API to get SRv6 locator info
Add an API to request information from the SRv6 SID Manager (zebra) regarding a specific SRv6 locator. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
This commit is contained in:
parent
4f185c5c9d
commit
c50b4b9afc
|
@ -4090,6 +4090,24 @@ int bgp_zebra_srv6_manager_release_locator_chunk(const char *name)
|
|||
return srv6_manager_release_locator_chunk(zclient, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ask the SRv6 Manager (zebra) about a specific locator
|
||||
*
|
||||
* @param name Locator name
|
||||
* @return 0 on success, -1 otherwise
|
||||
*/
|
||||
int bgp_zebra_srv6_manager_get_locator(const char *name)
|
||||
{
|
||||
if (!name)
|
||||
return -1;
|
||||
|
||||
/*
|
||||
* Send the Get Locator request to the SRv6 Manager and return the
|
||||
* result
|
||||
*/
|
||||
return srv6_manager_get_locator(zclient, name);
|
||||
}
|
||||
|
||||
void bgp_zebra_send_nexthop_label(int cmd, mpls_label_t label,
|
||||
ifindex_t ifindex, vrf_id_t vrf_id,
|
||||
enum lsp_types_t ltype, struct prefix *p,
|
||||
|
|
|
@ -117,6 +117,8 @@ extern int bgp_zebra_update(struct bgp *bgp, afi_t afi, safi_t safi,
|
|||
extern int bgp_zebra_stale_timer_update(struct bgp *bgp);
|
||||
extern int bgp_zebra_srv6_manager_get_locator_chunk(const char *name);
|
||||
extern int bgp_zebra_srv6_manager_release_locator_chunk(const char *name);
|
||||
extern int bgp_zebra_srv6_manager_get_locator(const char *name);
|
||||
|
||||
extern void bgp_zebra_send_nexthop_label(int cmd, mpls_label_t label,
|
||||
ifindex_t index, vrf_id_t vrfid,
|
||||
enum lsp_types_t ltype,
|
||||
|
|
Loading…
Reference in a new issue