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/vrf.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/vrf.h')
| -rw-r--r-- | lib/vrf.h | 10 | 
1 files changed, 10 insertions, 0 deletions
@@ -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  | 
