45 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 51 #define vl_api_version(n,v) static u32 api_version=(v); 63 #define TRACE_REPLY_MACRO(t) \ 66 vl_api_client_index_to_input_queue (mp->client_index); \ 70 rmp = vl_msg_api_alloc (sizeof (*rmp)); \ 71 rmp->_vl_msg_id = ntohs((t)+sm->msg_id_base); \ 72 rmp->context = mp->context; \ 73 rmp->retval = ntohl(rv); \ 75 vl_msg_api_send_shmem (q, (u8 *)&rmp); \ 79 #define TRACE_REPLY_MACRO2(t, body) \ 82 rv = vl_msg_api_pd_handler (mp, rv); \ 83 q = vl_api_client_index_to_input_queue (mp->client_index); \ 87 rmp = vl_msg_api_alloc (sizeof (*rmp)); \ 88 rmp->_vl_msg_id = ntohs((t)+sm->msg_id_base); \ 89 rmp->context = mp->context; \ 90 rmp->retval = ntohl(rv); \ 91 do {body;} while (0); \ 92 vl_msg_api_send_shmem (q, (u8 *)&rmp); \ 98 #define foreach_trace_plugin_api_msg \ 99 _(TRACE_PROFILE_ADD, trace_profile_add) \ 100 _(TRACE_PROFILE_DEL, trace_profile_del) \ 101 _(TRACE_PROFILE_SHOW_CONFIG, trace_profile_show_config) 108 vl_api_trace_profile_add_reply_t *rmp;
135 vl_api_trace_profile_del_reply_t *rmp;
175 vl_msg_api_set_handlers((VL_API_##N + sm->msg_id_base), \ 177 vl_api_##n##_t_handler, \ 179 vl_api_##n##_t_endian, \ 180 vl_api_##n##_t_print, \ 181 sizeof(vl_api_##n##_t), 1); 188 #define vl_msg_name_crc_list 190 #undef vl_msg_name_crc_list 195 #define _(id,n,crc) \ 196 vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id + sm->msg_id_base); 197 foreach_vl_msg_name_crc_trace;
214 name =
format (0,
"ioam_trace_%08x%c", api_version, 0);
static void vl_api_trace_profile_show_config_t_handler(vl_api_trace_profile_show_config_t *mp)
vnet_main_t * vnet_get_main(void)
static clib_error_t * trace_plugin_api_hookup(vlib_main_t *vm)
static trace_profile * trace_profile_find(void)
#define TRACE_REPLY_MACRO2(t, body)
#define VLIB_INIT_FUNCTION(x)
void clear_trace_profiles(void)
iOAM6 Trace - Set the iOAM6 trace profile
API main structure, used by both vpp and binary API clients.
#define vec_free(V)
Free vector's memory (no header).
Show trace config response.
#define TRACE_REPLY_MACRO(t)
static void vl_api_trace_profile_del_t_handler(vl_api_trace_profile_del_t *mp)
static void setup_message_id_table(trace_main_t *sm, api_main_t *am)
#define foreach_trace_plugin_api_msg
static void vl_api_trace_profile_add_t_handler(vl_api_trace_profile_add_t *mp)
int trace_util_init(void)
static clib_error_t * trace_init(vlib_main_t *vm)
int trace_profile_create(trace_profile *profile, u8 trace_type, u8 num_elts, u32 trace_tsp, u32 node_id, u32 app_data)
u16 vl_msg_api_get_msg_ids(const char *name, int n)