60 if (!trace_type || !num_elts || !(node_id))
64 if (profile && !profile->
valid)
103 .path =
"clear ioam-trace profile",
104 .short_help =
"clear ioam-trace profile [<index>|all]",
122 if (
unformat (input,
"trace-type 0x%x", &trace_type));
123 else if (
unformat (input,
"trace-elts %d", &num_elts));
124 else if (
unformat (input,
"trace-tsp %d", &trace_tsp));
125 else if (
unformat (input,
"node-id 0x%x", &node_id));
126 else if (
unformat (input,
"app-data 0x%x", &app_data));
142 .path =
"set ioam-trace profile",
143 .short_help =
"set ioam-trace \ 144 trace-type <0x1f|0x3|0x9|0x11|0x19> trace-elts <nn> trace-tsp <0|1|2|3> \ 145 node-id <node id in hex> app-data <app_data in hex>",
158 if (!(p && p->
valid))
160 s =
format (s,
"\nTrace configuration not valid\n");
165 s =
format (s,
" HOP BY HOP OPTIONS - TRACE CONFIG - \n");
166 s =
format (s,
" Trace Type : 0x%x (%d)\n",
169 format (s,
" Trace timestamp precision : %d (%s)\n",
181 format (s,
" Node-id : 0x%x (%d)\n",
184 format (s,
" App Data : 0x%x (%d)\n",
194 .path =
"show ioam-trace profile",
195 .short_help =
"show ioam-trace profile",
clib_error_t * clear_trace_profile_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static int trace_profile_cleanup(trace_profile *profile)
static clib_error_t * show_trace_profile_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
int ip6_trace_profile_setup()
void clear_trace_profiles(void)
static int trace_main_profiles_reset(void)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
int ip6_trace_profile_cleanup(void)
#define vec_free(V)
Free vector's memory (no header).
#define VLIB_CLI_COMMAND(x,...)
static clib_error_t * set_trace_profile_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
int trace_util_init(void)
static trace_profile * trace_profile_find(void)
int trace_profile_create(trace_profile *profile, u8 trace_type, u8 num_elts, u32 trace_tsp, u32 node_id, u32 app_data)