diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2017-12-20 12:29:21 +0100 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2018-02-27 11:11:24 +0100 |
commit | ce1be3692f809cfa4d533d484a75653f91c24c4e (patch) | |
tree | d6a151cb9d906b8e1f517b641fabd39b741ef3a0 /lib/ns.h | |
parent | lib: add namespace name structure in zebra message (diff) | |
download | frr-ce1be3692f809cfa4d533d484a75653f91c24c4e.tar.xz frr-ce1be3692f809cfa4d533d484a75653f91c24c4e.zip |
lib: provide an API to switch from one netns to an other
Two apis are provided so that the switch from one netns to an other one
is taken care.
Also an other API to know if the VRF has a NETNS backend or a VRF Lite
backend.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'lib/ns.h')
-rw-r--r-- | lib/ns.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -84,6 +84,7 @@ extern void ns_add_hook(int type, int (*)(struct ns *)); /* * NS initializer/destructor */ +extern void ns_init(void); extern void ns_init_zebra(void); extern void ns_terminate(void); @@ -101,4 +102,9 @@ extern void *ns_info_lookup(ns_id_t ns_id); extern void ns_walk_func(int (*func)(struct ns *)); extern const char *ns_get_name(struct ns *ns); +/* API that can be used by all daemons */ +extern int ns_switchback_to_initial(void); +extern int ns_switch_to_netns(const char *netns_name); +extern void ns_init(void); + #endif /*_ZEBRA_NS_H*/ |