mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 09:46:54 +00:00
zebra: expose label-manager util-funcs
Revert "zebra: unexpose label-manager util-funcs as static"
This reverts commit d3d9639d9a
.
Signed-off-by: Pat Ruddy <pat@voltanet.io>
This commit is contained in:
parent
b567ed7eeb
commit
507d2737d6
@ -91,11 +91,8 @@ static int label_manager_get_chunk(struct label_manager_chunk **lmc,
|
|||||||
vrf_id_t vrf_id);
|
vrf_id_t vrf_id);
|
||||||
static int label_manager_release_label_chunk(struct zserv *client,
|
static int label_manager_release_label_chunk(struct zserv *client,
|
||||||
uint32_t start, uint32_t end);
|
uint32_t start, uint32_t end);
|
||||||
static int release_label_chunk(uint8_t proto, unsigned short instance,
|
|
||||||
uint32_t session_id, uint32_t start,
|
|
||||||
uint32_t end);
|
|
||||||
|
|
||||||
static void delete_label_chunk(void *val)
|
void delete_label_chunk(void *val)
|
||||||
{
|
{
|
||||||
XFREE(MTYPE_LM_CHUNK, val);
|
XFREE(MTYPE_LM_CHUNK, val);
|
||||||
}
|
}
|
||||||
@ -178,11 +175,9 @@ void label_manager_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* alloc and fill a label chunk */
|
/* alloc and fill a label chunk */
|
||||||
static struct label_manager_chunk *create_label_chunk(uint8_t proto,
|
struct label_manager_chunk *
|
||||||
unsigned short instance,
|
create_label_chunk(uint8_t proto, unsigned short instance, uint32_t session_id,
|
||||||
uint32_t session_id,
|
uint8_t keep, uint32_t start, uint32_t end)
|
||||||
uint8_t keep, uint32_t start,
|
|
||||||
uint32_t end)
|
|
||||||
{
|
{
|
||||||
/* alloc chunk, fill it and return it */
|
/* alloc chunk, fill it and return it */
|
||||||
struct label_manager_chunk *lmc =
|
struct label_manager_chunk *lmc =
|
||||||
@ -305,11 +300,9 @@ assign_specific_label_chunk(uint8_t proto, unsigned short instance,
|
|||||||
* @param base Desired starting label of the chunk; if MPLS_LABEL_BASE_ANY it does not apply
|
* @param base Desired starting label of the chunk; if MPLS_LABEL_BASE_ANY it does not apply
|
||||||
* @return Pointer to the assigned label chunk, or NULL if the request could not be satisfied
|
* @return Pointer to the assigned label chunk, or NULL if the request could not be satisfied
|
||||||
*/
|
*/
|
||||||
static struct label_manager_chunk *assign_label_chunk(uint8_t proto,
|
struct label_manager_chunk *
|
||||||
unsigned short instance,
|
assign_label_chunk(uint8_t proto, unsigned short instance, uint32_t session_id,
|
||||||
uint32_t session_id,
|
uint8_t keep, uint32_t size, uint32_t base)
|
||||||
uint8_t keep, uint32_t size,
|
|
||||||
uint32_t base)
|
|
||||||
{
|
{
|
||||||
struct label_manager_chunk *lmc;
|
struct label_manager_chunk *lmc;
|
||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
@ -398,7 +391,7 @@ static int label_manager_release_label_chunk(struct zserv *client,
|
|||||||
* @param end Last label of the chunk
|
* @param end Last label of the chunk
|
||||||
* @return 0 on success, -1 otherwise
|
* @return 0 on success, -1 otherwise
|
||||||
*/
|
*/
|
||||||
static int release_label_chunk(uint8_t proto, unsigned short instance,
|
int release_label_chunk(uint8_t proto, unsigned short instance,
|
||||||
uint32_t session_id, uint32_t start, uint32_t end)
|
uint32_t session_id, uint32_t start, uint32_t end)
|
||||||
{
|
{
|
||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
|
@ -94,6 +94,12 @@ int lm_client_connect_response(uint8_t proto, uint16_t instance,
|
|||||||
int lm_get_chunk_response(struct label_manager_chunk *lmc, struct zserv *client,
|
int lm_get_chunk_response(struct label_manager_chunk *lmc, struct zserv *client,
|
||||||
vrf_id_t vrf_id);
|
vrf_id_t vrf_id);
|
||||||
|
|
||||||
|
/* convenience function to allocate an lmc to be consumed by the above API */
|
||||||
|
struct label_manager_chunk *
|
||||||
|
create_label_chunk(uint8_t proto, unsigned short instance, uint32_t session_id,
|
||||||
|
uint8_t keep, uint32_t start, uint32_t end);
|
||||||
|
void delete_label_chunk(void *val);
|
||||||
|
|
||||||
/* register/unregister callbacks for hooks */
|
/* register/unregister callbacks for hooks */
|
||||||
void lm_hooks_register(void);
|
void lm_hooks_register(void);
|
||||||
void lm_hooks_unregister(void);
|
void lm_hooks_unregister(void);
|
||||||
@ -107,6 +113,11 @@ struct label_manager {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void label_manager_init(void);
|
void label_manager_init(void);
|
||||||
|
struct label_manager_chunk *
|
||||||
|
assign_label_chunk(uint8_t proto, unsigned short instance, uint32_t session_id,
|
||||||
|
uint8_t keep, uint32_t size, uint32_t base);
|
||||||
|
int release_label_chunk(uint8_t proto, unsigned short instance,
|
||||||
|
uint32_t session_id, uint32_t start, uint32_t end);
|
||||||
int lm_client_disconnect_cb(struct zserv *client);
|
int lm_client_disconnect_cb(struct zserv *client);
|
||||||
int release_daemon_label_chunks(struct zserv *client);
|
int release_daemon_label_chunks(struct zserv *client);
|
||||||
void label_manager_close(void);
|
void label_manager_close(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user