summaryrefslogtreecommitdiffstats
path: root/lib/vrf.h
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2017-12-20 12:29:21 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2018-02-27 11:11:24 +0100
commitce1be3692f809cfa4d533d484a75653f91c24c4e (patch)
treed6a151cb9d906b8e1f517b641fabd39b741ef3a0 /lib/vrf.h
parentlib: add namespace name structure in zebra message (diff)
downloadfrr-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/vrf.h')
-rw-r--r--lib/vrf.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/vrf.h b/lib/vrf.h
index c1da4e8bb..4bdc183b5 100644
--- a/lib/vrf.h
+++ b/lib/vrf.h
@@ -218,6 +218,13 @@ extern int vrf_handler_create(struct vty *vty,
const char *name,
struct vrf **vrf);
+/* VRF is mapped on netns or not ? */
+int vrf_is_mapped_on_netns(vrf_id_t vrf_id);
+
+/* VRF switch from NETNS */
+extern int vrf_switch_to_netns(vrf_id_t vrf_id);
+extern int vrf_switchback_to_initial(void);
+
/* used by NS when vrf backend is NS.
* Notify a change in the VRF ID of the VRF
*/