-
-/* List of message types that this plugin understands */
-#define foreach_stn_plugin_api_msg \
-_(STN_ADD_DEL_RULE, stn_add_del_rule) \
-_(STN_RULES_DUMP, stn_rules_dump)
-
-/**
- * @brief Set up the API message handling tables
- * @param vm vlib_main_t * vlib main data structure pointer
- * @returns 0 to indicate all is well
- */
-static clib_error_t *
-stn_plugin_api_hookup (vlib_main_t * vm)
-{
- stn_main_t *stn = &stn_main;
-#define _(N,n) \
- vl_msg_api_set_handlers((VL_API_##N + stn->msg_id_base), \
- #n, \
- vl_api_##n##_t_handler, \
- vl_noop_handler, \
- vl_api_##n##_t_endian, \
- vl_api_##n##_t_print, \
- sizeof(vl_api_##n##_t), 1);
- foreach_stn_plugin_api_msg;
-#undef _
-
- return 0;
-}
-
-#define vl_msg_name_crc_list
-#include <stn/stn.api.h>
-#undef vl_msg_name_crc_list
-
-static void
-setup_message_id_table (stn_main_t * stn, api_main_t * am)
-{
-#define _(id,n,crc) \
- vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id + stn->msg_id_base);
- foreach_vl_msg_name_crc_stn;
-#undef _
-}
-
-static void
-plugin_custom_dump_configure (stn_main_t * stn)
-{
-#define _(n,f) api_main.msg_print_handlers \
- [VL_API_##n + stn->msg_id_base] \
- = (void *) vl_api_##f##_t_print;
- foreach_stn_plugin_api_msg;
-#undef _
-}
-