-#define foreach_standard_reply_retval_handler \
-_(pot_profile_add_reply) \
-_(pot_profile_activate_reply) \
-_(pot_profile_del_reply)
-
-#define foreach_custom_reply_retval_handler \
-_(pot_profile_show_config_details, \
- errmsg(" ID:%d\n",mp->id); \
- errmsg(" Validator:%d\n",mp->validator); \
- errmsg(" secret_key:%Lx\n",clib_net_to_host_u64(mp->secret_key)); \
- errmsg(" secret_share:%Lx\n",clib_net_to_host_u64(mp->secret_share)); \
- errmsg(" prime:%Lx\n",clib_net_to_host_u64(mp->prime)); \
- errmsg(" bitmask:%Lx\n",clib_net_to_host_u64(mp->bit_mask)); \
- errmsg(" lpc:%Lx\n",clib_net_to_host_u64(mp->lpc)); \
- errmsg(" public poly:%Lx\n",clib_net_to_host_u64(mp->polynomial_public)); \
- )
-
-#define _(n) \
- static void vl_api_##n##_t_handler \
- (vl_api_##n##_t * mp) \
- { \
- vat_main_t * vam = pot_test_main.vat_main; \
- i32 retval = ntohl(mp->retval); \
- if (vam->async_mode) { \
- vam->async_errors += (retval < 0); \
- } else { \
- vam->retval = retval; \
- vam->result_ready = 1; \
- } \
- }
-foreach_standard_reply_retval_handler;
-#undef _
-
-#define _(n,body) \
- static void vl_api_##n##_t_handler \
- (vl_api_##n##_t * mp) \
- { \
- vat_main_t * vam = pot_test_main.vat_main; \
- i32 retval = ntohl(mp->retval); \
- if (vam->async_mode) { \
- vam->async_errors += (retval < 0); \
- } else { \
- vam->retval = retval; \
- vam->result_ready = 1; \
- } \
- do{body;}while(0); \
- }
-foreach_custom_reply_retval_handler;
-#undef _
-
-/*
- * Table of message reply handlers, must include boilerplate handlers
- * we just generated
- */
-#define foreach_vpe_api_reply_msg \
-_(POT_PROFILE_ADD_REPLY, pot_profile_add_reply) \
-_(POT_PROFILE_ACTIVATE_REPLY, pot_profile_activate_reply) \
-_(POT_PROFILE_DEL_REPLY, pot_profile_del_reply) \
-_(POT_PROFILE_SHOW_CONFIG_DETAILS, pot_profile_show_config_details)
-