diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2017-12-13 11:04:31 +0100 |
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2018-02-27 11:11:24 +0100 |
| commit | 697d3ec73157fde8a008738907fef94fdcd569bb (patch) | |
| tree | ed168a01b0c4535f172cbcd437b676cece7fdc09 /lib/ns.h | |
| parent | fbb65ff50428eefba0653e8f3f6f33afa003c4cd (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/ns.h')
| -rw-r--r-- | lib/ns.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -24,6 +24,8 @@ #include "openbsd-tree.h" #include "linklist.h" +#include "vty.h" +#include "vrf.h" typedef u_int32_t ns_id_t; @@ -93,5 +95,8 @@ extern void ns_terminate(void); /* Create a socket serving for the given NS */ extern int ns_socket(int, int, int, ns_id_t); extern void ns_cmd_init(void); +extern int ns_handler_create(struct vty *vty, struct vrf *vrf, + char *pathname, ns_id_t ns_id); +extern char *ns_netns_pathname(struct vty *vty, const char *name); #endif /*_ZEBRA_NS_H*/ |
