From 0c7f490009e8633e015b5cba48b78cc243254953 Mon Sep 17 00:00:00 2001 From: Alberto Compagno Date: Fri, 17 Apr 2020 18:51:54 +0200 Subject: [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 --- hicn-plugin/src/route.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'hicn-plugin/src/route.h') 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(); -- cgit 1.2.3-korg