summaryrefslogtreecommitdiffstats
path: root/src/vlibmemory/socket_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlibmemory/socket_api.c')
-rw-r--r--src/vlibmemory/socket_api.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/vlibmemory/socket_api.c b/src/vlibmemory/socket_api.c
index ce834a70aac..3e3f7d5bc04 100644
--- a/src/vlibmemory/socket_api.c
+++ b/src/vlibmemory/socket_api.c
@@ -45,6 +45,10 @@
#include <vlibmemory/vl_memory_api_h.h>
#undef vl_endianfun
+#define vl_calcsizefun
+#include <vlibmemory/vl_memory_api_h.h>
+#undef vl_calcsizefun
+
socket_main_t socket_main;
#define SOCK_API_REG_HANDLE_BIT (1<<31)
@@ -200,7 +204,7 @@ vl_socket_process_api_msg (vl_api_registration_t * rp, i8 * input_v)
u8 *the_msg = (u8 *) (mbp->data);
socket_main.current_rp = rp;
- vl_msg_api_socket_handler (the_msg);
+ vl_msg_api_socket_handler (the_msg, ntohl (mbp->data_len));
socket_main.current_rp = 0;
}
@@ -792,11 +796,11 @@ vl_sock_api_init (vlib_main_t * vm)
return 0;
#define _(N, n, t) \
- vl_msg_api_set_handlers (VL_API_##N, #n, vl_api_##n##_t_handler, \
- vl_noop_handler, vl_api_##n##_t_endian, \
- vl_api_##n##_t_print, sizeof (vl_api_##n##_t), t, \
- vl_api_##n##_t_print_json, vl_api_##n##_t_tojson, \
- vl_api_##n##_t_fromjson); \
+ vl_msg_api_set_handlers ( \
+ VL_API_##N, #n, vl_api_##n##_t_handler, vl_noop_handler, \
+ vl_api_##n##_t_endian, vl_api_##n##_t_print, sizeof (vl_api_##n##_t), t, \
+ vl_api_##n##_t_print_json, vl_api_##n##_t_tojson, \
+ vl_api_##n##_t_fromjson, vl_api_##n##_t_calc_size); \
am->api_trace_cfg[VL_API_##N].replay_enable = 0;
foreach_vlib_api_msg;
#undef _