summaryrefslogtreecommitdiff
path: root/lib/vrf.h
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2017-12-13 11:04:31 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2018-02-27 11:11:24 +0100
commit697d3ec73157fde8a008738907fef94fdcd569bb (patch)
treeed168a01b0c4535f172cbcd437b676cece7fdc09 /lib/vrf.h
parentfbb65ff50428eefba0653e8f3f6f33afa003c4cd (diff)
lib: externalise vrf and ns creation
In addition to have the possibility to create from vty vrf based on a netns backend, the API will be made accessible from external, especially for zebra that will handle the netns discovery part. This commit is externalising following functions: - netns_pathname - ns_handler_create - vrf_handler_create Also, the VRF initialisation case when under NETNS backend is changed, since the NS identifier may not be known at the configuration time,but may be known later, under discovery process. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'lib/vrf.h')
-rw-r--r--lib/vrf.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/vrf.h b/lib/vrf.h
index 40e6ab6cd6..16d75c3efb 100644
--- a/lib/vrf.h
+++ b/lib/vrf.h
@@ -212,6 +212,16 @@ extern int vrf_socket(int, int, int, vrf_id_t);
extern void vrf_configure_backend(int vrf_backend_netns);
extern int vrf_get_backend(void);
extern int vrf_is_backend_netns(void);
+extern int vrf_handler_create(struct vty *vty,
+ const char *name,
+ struct vrf **vrf);
+
+/* used by NS when vrf backend is NS.
+ * Notify a change in the VRF ID of the VRF
+ */
+extern int vrf_update_vrf_id(vrf_id_t vrf_id, struct vrf *vrf);
+extern void vrf_disable(struct vrf *vrf);
+extern int vrf_enable(struct vrf *vrf);
/*
* VRF Debugging