summaryrefslogtreecommitdiffstats
path: root/zebra/label_manager.c
diff options
context:
space:
mode:
authorHiroki Shirokura <slank.dev@gmail.com>2020-12-10 01:33:29 +0100
committerHiroki Shirokura <slank.dev@gmail.com>2020-12-10 01:56:55 +0100
commitd3d9639d9a2251aa519b5399706ce816982001a1 (patch)
treeef994f114e5146c8404b693367c5d2ddc622ae7a /zebra/label_manager.c
parentMerge pull request #7685 from mjstapp/fix_nhrp_int_sa (diff)
downloadfrr-d3d9639d9a2251aa519b5399706ce816982001a1.tar.xz
frr-d3d9639d9a2251aa519b5399706ce816982001a1.zip
zebra: unexpose label-manager util-funcs as static
Following functions which is a piece of label-maanager implementation isn't called from out side of its file. And all lines of label-manager are coded on zebra/label_manager.c at this time. So these functions should be unexposed. Functions: - create_label_chunk - assign_label_chunk - delete_label_chunk - release_label_chunk Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
Diffstat (limited to 'zebra/label_manager.c')
-rw-r--r--zebra/label_manager.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/zebra/label_manager.c b/zebra/label_manager.c
index d312a661f..feec49ecc 100644
--- a/zebra/label_manager.c
+++ b/zebra/label_manager.c
@@ -91,8 +91,11 @@ static int label_manager_get_chunk(struct label_manager_chunk **lmc,
vrf_id_t vrf_id);
static int label_manager_release_label_chunk(struct zserv *client,
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);
-void delete_label_chunk(void *val)
+static void delete_label_chunk(void *val)
{
XFREE(MTYPE_LM_CHUNK, val);
}
@@ -175,11 +178,11 @@ void label_manager_init(void)
}
/* alloc and fill a label chunk */
-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)
+static 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)
{
/* alloc chunk, fill it and return it */
struct label_manager_chunk *lmc =
@@ -302,11 +305,11 @@ 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
* @return Pointer to the assigned label chunk, or NULL if the request could not be satisfied
*/
-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)
+static 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)
{
struct label_manager_chunk *lmc;
struct listnode *node;
@@ -390,11 +393,12 @@ static int label_manager_release_label_chunk(struct zserv *client,
*
* @param proto Daemon protocol of client, to identify the owner
* @param instance Instance, to identify the owner
+ * @param session_id Zclient session ID, to identify the zclient session
* @param start First label of the chunk
* @param end Last label of the chunk
* @return 0 on success, -1 otherwise
*/
-int release_label_chunk(uint8_t proto, unsigned short instance,
+static int release_label_chunk(uint8_t proto, unsigned short instance,
uint32_t session_id, uint32_t start, uint32_t end)
{
struct listnode *node;