diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2020-04-23 14:23:36 +0200 |
---|---|---|
committer | Alberto Compagno <acompagn+fdio@cisco.com> | 2020-05-04 15:19:41 +0200 |
commit | 43d0ecbb1a1f7e1f72bf85441547b1678aed4350 (patch) | |
tree | 3da1d867acb6c8b735fbd76eeec51189b5d3996f /hicn-plugin/src/hicn_api.c | |
parent | c1b56d5861829a23289f42cecd716e681b520cf0 (diff) |
[HICN-603] Cleanup code for managing route
- Remove old code to add and remove hicn route. Routes are now
added only through the ip route commands/apis
- Adjusted the cli to set the strategy for a particular prefix
- Adjusted libtransport consumer and producer app creation
- Adjusted sysrepo plugin. Added hicn enable and disable and removed old
api related to hicn routes and hicn faces
- Adjusted libhicnctrl. Only routes api and listener are now available
for hicn-plugin
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Change-Id: Ib4f7f45ba0b99253d60a9da2b295d6e783e5cd51
Diffstat (limited to 'hicn-plugin/src/hicn_api.c')
-rw-r--r-- | hicn-plugin/src/hicn_api.c | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/hicn-plugin/src/hicn_api.c b/hicn-plugin/src/hicn_api.c index 1aa6178a7..f5d2cee74 100644 --- a/hicn-plugin/src/hicn_api.c +++ b/hicn-plugin/src/hicn_api.c @@ -304,77 +304,6 @@ static void /****** ROUTE *******/ -static void -vl_api_hicn_api_route_nhops_add_t_handler (vl_api_hicn_api_route_nhops_add_t - * mp) -{ - vl_api_hicn_api_route_nhops_add_reply_t *rmp; - int rv = HICN_ERROR_NONE; - hicn_face_id_t face_ids[HICN_PARAM_FIB_ENTRY_NHOPS_MAX]; - - hicn_main_t *sm = &hicn_main; - - fib_prefix_t prefix; - ip_prefix_decode (&mp->prefix, &prefix); - - u8 n_faces = mp->n_faces; - - for (int i = 0; i < HICN_PARAM_FIB_ENTRY_NHOPS_MAX; i++) - { - face_ids[i] = clib_net_to_host_u32 (mp->face_ids[i]); - } - - if ((face_ids == NULL) || (n_faces > HICN_PARAM_FIB_ENTRY_NHOPS_MAX)) - { - rv = VNET_API_ERROR_INVALID_ARGUMENT; - } - if (rv == HICN_ERROR_NONE) - { - rv = hicn_route_add (face_ids, n_faces, &prefix); - - if (rv == HICN_ERROR_ROUTE_ALREADY_EXISTS) - { - rv = hicn_route_add_nhops (face_ids, n_faces, &prefix); - } - } - REPLY_MACRO (VL_API_HICN_API_ROUTE_NHOPS_ADD_REPLY /* , rmp, mp, rv */ ); -} - - -static void vl_api_hicn_api_route_del_t_handler - (vl_api_hicn_api_route_del_t * mp) -{ - vl_api_hicn_api_route_del_reply_t *rmp; - int rv = HICN_ERROR_NONE; - - hicn_main_t *sm = &hicn_main; - - fib_prefix_t prefix; - ip_prefix_decode (&mp->prefix, &prefix); - - rv = hicn_route_del (&prefix); - - REPLY_MACRO (VL_API_HICN_API_ROUTE_DEL_REPLY /* , rmp, mp, rv */ ); -} - -static void vl_api_hicn_api_route_nhop_del_t_handler - (vl_api_hicn_api_route_nhop_del_t * mp) -{ - vl_api_hicn_api_route_nhop_del_reply_t *rmp; - int rv = HICN_ERROR_NONE; - - hicn_main_t *sm = &hicn_main; - - fib_prefix_t prefix; - ip_prefix_decode (&mp->prefix, &prefix); - hicn_face_id_t faceid = clib_net_to_host_u32 (mp->faceid); - - - rv = hicn_route_del_nhop (&prefix, faceid); - - REPLY_MACRO (VL_API_HICN_API_ROUTE_NHOP_DEL_REPLY /* , rmp, mp, rv */ ); -} - static void vl_api_hicn_api_route_get_t_handler (vl_api_hicn_api_route_get_t * mp) { |