aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-11-22 11:55:46 +0000
committerGerrit Code Review <gerrit@fd.io>2019-11-22 11:55:46 +0000
commit4d593c09d9cc1496788f7953de25832193064103 (patch)
treef066cb1cc2d5910ed1f84613f652e27bf6fc7a6c /libtransport
parent7efe8c9372615d0333d1aa045de5d0c4a171a978 (diff)
parent4eb89ea4dcad4c01664b5331745f4e9a38facbd2 (diff)
Merge "[HICN-394] Add route commands add, list, del for the hicn-plugin"
Diffstat (limited to 'libtransport')
-rw-r--r--libtransport/CMakeLists.txt4
-rw-r--r--libtransport/src/hicn/transport/core/hicn_binary_api.c8
2 files changed, 9 insertions, 3 deletions
diff --git a/libtransport/CMakeLists.txt b/libtransport/CMakeLists.txt
index 836a524f5..a76e91208 100644
--- a/libtransport/CMakeLists.txt
+++ b/libtransport/CMakeLists.txt
@@ -71,7 +71,7 @@ find_package_wrapper(Asio REQUIRED)
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
if (__vpp__)
- find_package_wrapper(HicnBinaryApi REQUIRED)
+ find_package_wrapper(HicnPlugin REQUIRED)
find_package(Libmemif REQUIRED)
list(APPEND LIBRARIES
@@ -147,7 +147,7 @@ list(APPEND LIBRARIES
# Include dirs -- Order does matter!
list(APPEND LIBTRANSPORT_INTERNAL_INCLUDE_DIRS
${HICN_INCLUDE_DIRS}
- ${HICN_BINARY_API_INCLUDE_DIRS}
+ ${HICNPLUGIN_INCLUDE_DIRS}
${LIBPARC_INCLUDE_DIRS}
${CMAKE_THREADS_INCLUDE_DIRS}
${ASIO_INCLUDE_DIRS}
diff --git a/libtransport/src/hicn/transport/core/hicn_binary_api.c b/libtransport/src/hicn/transport/core/hicn_binary_api.c
index aea2f09f7..80ba11e75 100644
--- a/libtransport/src/hicn/transport/core/hicn_binary_api.c
+++ b/libtransport/src/hicn/transport/core/hicn_binary_api.c
@@ -50,6 +50,12 @@
/* Declare message IDs */
#include <hicn/hicn_msg_enum.h>
+#define vl_endianfun
+#define vl_typedefs
+#include <vnet/ip/ip_types.api.h>
+#undef vl_typedefs
+#undef vl_endianfun
+
#define vl_endianfun /* define message structures */
#define vl_print(handle, ...)
#define vl_printfun
@@ -115,7 +121,7 @@ int hicn_binary_api_register_prod_app(
memcpy(&prefix.fp_addr, &input_params->prefix->address, sizeof(ip46_address_t));
prefix.fp_len = input_params->prefix->len;
prefix.fp_proto = ip46_address_is_ip4(&prefix.fp_addr) ? FIB_PROTOCOL_IP4 : FIB_PROTOCOL_IP6;
- ip_prefix_encode(&prefix, &mp->prefix);
+ ip_prefix_encode(&prefix, &(mp->prefix));
mp->swif = clib_host_to_net_u32(input_params->swif);
mp->cs_reserved = clib_host_to_net_u32(input_params->cs_reserved);