summaryrefslogtreecommitdiff
path: root/ripd/rip_interface.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-01-04 19:08:10 -0200
committerRenato Westphal <renato@opensourcerouting.org>2019-01-18 16:15:41 -0200
commitae7b826a2338aa1cc61019fa74391da1c3ceb542 (patch)
tree6a2456b96aad0aeb182525e14c865ca9f6ba13dd /ripd/rip_interface.h
parent9852be711c80430004ed9ee0bd718476837896e8 (diff)
ripd: add VRF support
* Turn the "instance" YANG presence-container into a YANG list keyed by the new "vrf" leaf. This is a backward incompatible change but this should be ok for now. * RIP VRF instances can be configured even when the corresponding VRF doesn't exist. And a RIP VRF instance isn't deleted when the corresponding VRF is deleted. For this to work, implement the rip_instance_enable() and rip_instance_disable() functions that are called to enable/disable RIP routing instances when necessary. A RIP routing instance can be enabled only when the corresponding VRF is enabled (this information comes from zebra and depends on the underlying VRF backend). Routing instances are stored in the new rip_instances rb-tree (global variable). * Add a vrf pointer to the rip structure instead of storing vrf_id only. This is much more convenient than using vrf_lookup_by_id() every time we need to get the vrf pointer from the VRF ID. The rip->vrf pointer is updated whenever the VRF enable/disable hooks are called. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ripd/rip_interface.h')
-rw-r--r--ripd/rip_interface.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/ripd/rip_interface.h b/ripd/rip_interface.h
index 8723388e75..303be0315d 100644
--- a/ripd/rip_interface.h
+++ b/ripd/rip_interface.h
@@ -20,6 +20,8 @@
#ifndef _QUAGGA_RIP_INTERFACE_H
#define _QUAGGA_RIP_INTERFACE_H
+#include "zclient.h"
+
extern int rip_interface_down(int, struct zclient *, zebra_size_t, vrf_id_t);
extern int rip_interface_up(int, struct zclient *, zebra_size_t, vrf_id_t);
extern int rip_interface_add(int, struct zclient *, zebra_size_t, vrf_id_t);
@@ -28,5 +30,8 @@ extern int rip_interface_address_add(int, struct zclient *, zebra_size_t,
vrf_id_t);
extern int rip_interface_address_delete(int, struct zclient *, zebra_size_t,
vrf_id_t);
+extern int rip_interface_vrf_update(int command, struct zclient *zclient,
+ zebra_size_t length, vrf_id_t vrf_id);
+extern void rip_interface_sync(struct interface *ifp);
#endif /* _QUAGGA_RIP_INTERFACE_H */