summaryrefslogtreecommitdiff
path: root/lib/log.c
diff options
context:
space:
mode:
authorßingen <bingen@voltanet.io>2017-03-20 15:34:49 +0100
committerßingen <bingen@voltanet.io>2017-03-20 17:10:41 +0100
commitfea12efb86407248c6baea2df49e4f03d564dad8 (patch)
treeffa410618f4629af446b28743c944750a6302df6 /lib/log.c
parent138f894409bb5d0a766b4b0f95578235ff67976c (diff)
Implement generic label manager
Label Manager allows to share MPLS label space among different daemons. Each daemon can request a chunk of consecutive labels and release it if it doesn't need them anymore. Label Manager stores the daemon protocol and instance to identify the owner client. It uses them to perform garbage collection, releasing all label chunks from a client when it gets disconnected or reconnected. Additionally, every client can request that the chunk is never garbage collected. In that case client has the responsibility to release non-used labels. Zebra can host the label manager itself (if no -l param is provided) or connect to an external one using zserv/zclient (providing its address with -l param). Client code is in lib/zclient.c, but currently only LDP is using it. TODO: Allow for custom ranges requests, i.e., specify the start label besides the chunk. TODO: Release labels from LDP. Signed-off-by: Bingen Eguzkitza <bingen@voltanet.io>
Diffstat (limited to 'lib/log.c')
-rw-r--r--lib/log.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/log.c b/lib/log.c
index 0fd9621f37..69225dbf7a 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -964,6 +964,9 @@ static const struct zebra_desc_table command_types[] = {
DESC_ENTRY (ZEBRA_IPV6_NEXTHOP_ADD),
DESC_ENTRY (ZEBRA_IPV6_NEXTHOP_DELETE),
DESC_ENTRY (ZEBRA_IPMR_ROUTE_STATS),
+ DESC_ENTRY (ZEBRA_LABEL_MANAGER_CONNECT),
+ DESC_ENTRY (ZEBRA_GET_LABEL_CHUNK),
+ DESC_ENTRY (ZEBRA_RELEASE_LABEL_CHUNK),
};
#undef DESC_ENTRY