summaryrefslogtreecommitdiffstats
path: root/lib/ns.h
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2019-10-02 13:37:11 +0200
committerAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2020-08-18 18:25:06 +0200
commitb1cc23b2cdaf70b279dfe53aa8ded6e2e6d3b1fd (patch)
treead7c4704c8c704cedf0480e3cc20f48e52b78469 /lib/ns.h
parentzebra, lib: store relative default ns id in each namespace (diff)
downloadfrr-b1cc23b2cdaf70b279dfe53aa8ded6e2e6d3b1fd.tar.xz
frr-b1cc23b2cdaf70b279dfe53aa8ded6e2e6d3b1fd.zip
zebra, lib: new API to get absolute netns val from relative netns val
when receiving a netlink API for an interface in a namespace, this interface may come with LINK_NSID value, which means that the interface has its link in an other namespace. Unfortunately, the link_nsid value is self to that namespace, and there is a need to know what is its associated nsid value from the default namespace point of view. The information collected previously on each namespace, can then be compared with that value to check if the link belongs to the default namespace or not. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'lib/ns.h')
-rw-r--r--lib/ns.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ns.h b/lib/ns.h
index 188161e11..0dfd97742 100644
--- a/lib/ns.h
+++ b/lib/ns.h
@@ -181,6 +181,7 @@ extern struct ns *ns_lookup_name(const char *name);
*/
extern int ns_enable(struct ns *ns, void (*func)(ns_id_t, void *));
extern struct ns *ns_get_created(struct ns *ns, char *name, ns_id_t ns_id);
+extern ns_id_t ns_id_get_absolute(ns_id_t ns_id_reference, ns_id_t link_nsid);
extern void ns_disable(struct ns *ns);
extern struct ns *ns_get_default(void);