aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/route.h
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2020-04-17 18:51:54 +0200
committerAlberto Compagno <acompagn+fdio@cisco.com>2020-05-04 11:28:25 +0200
commit0c7f490009e8633e015b5cba48b78cc243254953 (patch)
treeda438bc9336501766f024f5146300d2675baa7cb /hicn-plugin/src/route.h
parent2fba74798833331fe6312e8a764688a23918c14a (diff)
[HICN-592] Updating the vrf 0 (default fib) when a mapme event occurs
Updates on the vrf 0 will be reflected on the hicn vrf thanks to the fib entry tracking. Change-Id: I4afd6256593f27172c4b0a613316fb8428fa8e50 Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/route.h')
-rw-r--r--hicn-plugin/src/route.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/hicn-plugin/src/route.h b/hicn-plugin/src/route.h
index f601d0b22..678a828b5 100644
--- a/hicn-plugin/src/route.h
+++ b/hicn-plugin/src/route.h
@@ -21,6 +21,7 @@
#include "hicn.h"
#include "faces/face.h"
+extern fib_source_t hicn_fib_src;
/*
* Retrieve the hicn dpo corresponding to a hicn prefix
*/
@@ -52,12 +53,37 @@ int hicn_route_del_nhop (fib_prefix_t * prefix, u32 face_id);
int
hicn_route_set_strategy (fib_prefix_t * prefix, u32 strategy_id);
+/**
+ * @Brief Helper to add a nex hop in the vrf 0. If there are no entries in the
+ * vrf 0 that matches with the prefix (epm), a new one is created.
+ *
+ * @param fib_proto FIB_PROTOCOL_IP6 or FIB_PROTOCOL_IP4 (mpls not supported)
+ * @param pfx Prefix for which to add a next hop
+ * @param nh Next hop to add
+ * @param sw_if Software interface index to add in the next hop
+ */
+int
+ip_nh_add_helper (fib_protocol_t fib_proto, const fib_prefix_t * pfx, ip46_address_t * nh, u32 sw_if);
+
+/**
+ * @Brief Helper to remove a nex hop in the vrf 0. If there are no entries in the
+ * vrf 0 nothing happens.
+ *
+ * @param fib_proto FIB_PROTOCOL_IP6 or FIB_PROTOCOL_IP4 (mpls not supported)
+ * @param pfx Prefix for which to remove a next hop
+ * @param nh Next hop to remove
+ * @param sw_if Software interface index in the next hop definition
+ */
+int
+ip_nh_del_helper (fib_protocol_t fib_proto, const fib_prefix_t * rpfx, ip46_address_t * nh, u32 sw_if);
+
int
hicn_route_enable (fib_prefix_t *prefix);
int
hicn_route_disable (fib_prefix_t *prefix);
+
/* Init route internal strustures */
void
hicn_route_init();