X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvlibapi%2Fapi_common.h;h=6b36314e7bb94a3c3bbaa40db5c9c8953eedadcb;hb=9b7e8acf792cced80e6775bc5668d9db415cdb46;hp=320e7c44e1672250700a494777d3812b9050f762;hpb=755042dec0fcc733d456adc2a74042c529eff039;p=vpp.git diff --git a/src/vlibapi/api_common.h b/src/vlibapi/api_common.h index 320e7c44e16..6b36314e7bb 100644 --- a/src/vlibapi/api_common.h +++ b/src/vlibapi/api_common.h @@ -132,6 +132,7 @@ typedef struct void *print_json; /**< message print function (JSON format) */ void *tojson; /**< binary to JSON convert function */ void *fromjson; /**< JSON to binary convert function */ + void *calc_size; /**< message size calculation */ int size; /**< message size */ int traced; /**< is this message to be traced? */ int replay; /**< is this message to be replayed? */ @@ -170,17 +171,18 @@ VL_MSG_API_POISON (const void *a) } /* api_shared.c prototypes */ -void vl_msg_api_handler (void *the_msg); -void vl_msg_api_handler_no_free (void *the_msg); -void vl_msg_api_handler_no_trace_no_free (void *the_msg); -void vl_msg_api_trace_only (void *the_msg); +void vl_msg_api_handler (void *the_msg, uword msg_len); +void vl_msg_api_handler_no_free (void *the_msg, uword msg_len); +void vl_msg_api_handler_no_trace_no_free (void *the_msg, uword msg_len); +void vl_msg_api_trace_only (void *the_msg, uword msg_len); void vl_msg_api_cleanup_handler (void *the_msg); void vl_msg_api_replay_handler (void *the_msg); -void vl_msg_api_socket_handler (void *the_msg); +void vl_msg_api_socket_handler (void *the_msg, uword msg_len); void vl_msg_api_set_handlers (int msg_id, char *msg_name, void *handler, void *cleanup, void *endian, void *print, int msg_size, int traced, void *print_json, - void *tojson, void *fromjson); + void *tojson, void *fromjson, + void *validate_size); void vl_msg_api_clean_handlers (int msg_id); void vl_msg_api_config (vl_msg_api_msg_config_t *); void vl_msg_api_set_cleanup_handler (int msg_id, void *fp); @@ -251,6 +253,9 @@ typedef struct api_main_t /** Message convert function vector */ void *(**msg_fromjson_handlers) (cJSON *, int *); + /** Message calc size function vector */ + uword (**msg_calc_size_funcs) (void *); + /** Message name vector */ const char **msg_names;