summaryrefslogtreecommitdiffstats
path: root/zebra/kernel_socket.c
diff options
context:
space:
mode:
authorFeng Lu <lu.feng@6wind.com>2015-05-22 11:39:59 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2015-06-02 06:59:28 +0200
commit5a5702fac5458d63d7a099c4db7ac387afefd2de (patch)
tree0547fea145cb10fb9ed6d9493963d374556eb65f /zebra/kernel_socket.c
parent126215c1238eb42cc92d23aefbe1fac3b204438f (diff)
downloadquagga-5a5702fac5458d63d7a099c4db7ac387afefd2de.tar.bz2
quagga-5a5702fac5458d63d7a099c4db7ac387afefd2de.tar.xz
lib: move the interface list into "struct vrf"
An interface belongs to a specific VRF. So move the interface list into the "struct vrf". * vrf.c/vrf.h: - add a new member "struct list *iflist" to the the "struct vrf"; - call if_init() in vrf_new(); - call if_terminate() in vrf_delete(); - add utilities to access the interface list and VRF ID in the specified VRF. * if.c/if.h: - the global "iflist" now only exists for the default VRF; - the global "if_master" is initialized on the definition; - in if_create(), the interface is added into the list in the specified VRF; if the VRF does not exist, create one; - add parameters to if_init()/if_terminate() so that the interface list in the VRF can be initialized/destroyed; - in if_dump_all() scan the interfaces in all the VRFs; - add a command "show address vrf N" to show addresses in a specified VRF; - add a command "show address vrf all" to show addresses in all VRFs; - new APIs ifxxx_vrf() are added to access an interface in a specified VRF. The old interface APIs (the global variable "iflist" and the API functions) are not changed to keep the backward compatibility. The new APIs are used in the daemons which support multiple VRFs (till now only zebra). Signed-off-by: Feng Lu <lu.feng@6wind.com> Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: Vincent JARDIN <vincent.jardin@6wind.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'zebra/kernel_socket.c')
0 files changed, 0 insertions, 0 deletions