aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-plugin')
-rw-r--r--hicn-plugin/src/hicn.api4
-rw-r--r--hicn-plugin/src/hicn_api.c4
-rw-r--r--hicn-plugin/src/hicn_api_test.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/hicn-plugin/src/hicn.api b/hicn-plugin/src/hicn.api
index ba776c5f6..50a6f6a64 100644
--- a/hicn-plugin/src/hicn.api
+++ b/hicn-plugin/src/hicn.api
@@ -16,13 +16,13 @@
option version = "5.1.0";
import "vnet/ip/ip_types.api";
-enum face_type : u8
+enum face_type
{
IP_FACE = 0,
UDP_FACE,
};
-enum punt_type : u8
+enum punt_type
{
IP_PUNT = 0,
UDP_PUNT,
diff --git a/hicn-plugin/src/hicn_api.c b/hicn-plugin/src/hicn_api.c
index 4c75d406d..df3365999 100644
--- a/hicn-plugin/src/hicn_api.c
+++ b/hicn-plugin/src/hicn_api.c
@@ -352,7 +352,7 @@ vl_api_hicn_api_face_add_t_handler (vl_api_hicn_api_face_add_t * mp)
hicn_main_t *sm = &hicn_main;
hicn_face_id_t face_id;
- vl_api_face_type_t face_type = mp->type;
+ vl_api_face_type_t face_type = clib_net_to_host_u32(mp->type);
switch (face_type)
{
@@ -371,7 +371,7 @@ vl_api_hicn_api_face_add_t_handler (vl_api_hicn_api_face_add_t * mp)
REPLY_MACRO2 (VL_API_HICN_API_FACE_ADD_REPLY /* , rmp, mp, rv */ ,(
{
rmp->faceid = clib_host_to_net_u32 ((u32) face_id);
- rmp->retval = rv;
+ rmp->retval = clib_host_to_net_u32 (rv);
}));
/* *INDENT-ON* */
}
diff --git a/hicn-plugin/src/hicn_api_test.c b/hicn-plugin/src/hicn_api_test.c
index bf58cf245..704e66352 100644
--- a/hicn-plugin/src/hicn_api_test.c
+++ b/hicn-plugin/src/hicn_api_test.c
@@ -515,7 +515,7 @@ api_hicn_api_face_ip_add (vat_main_t * vam)
}
/* Construct the API message */
M (HICN_API_FACE_ADD, mp);
- mp->type = IP_FACE;
+ mp->type = clib_host_to_net_u32(IP_FACE);
ip_address_encode (&local_addr, IP46_TYPE_ANY, &mp->face.ip.local_addr);
ip_address_encode (&remote_addr, IP46_TYPE_ANY, &mp->face.ip.remote_addr);
mp->face.ip.swif = clib_host_to_net_u32 (sw_if);
@@ -592,7 +592,7 @@ api_hicn_api_face_udp_add (vat_main_t * vam)
}
/* Construct the API message */
M (HICN_API_FACE_ADD, mp);
- mp->type = UDP_FACE;
+ mp->type = clib_host_to_net_u32(UDP_FACE);
ip_address_encode (&local_addr, IP46_TYPE_ANY, &mp->face.udp.local_addr);
ip_address_encode (&remote_addr, IP46_TYPE_ANY, &mp->face.udp.remote_addr);
mp->face.udp.lport = clib_host_to_net_u16 (sport);