61 if (!trace_type || !num_elts || !(node_id))
65 if (profile && !profile->
valid)
104 .path =
"clear ioam-trace profile",
105 .short_help =
"clear ioam-trace profile [<index>|all]",
123 if (
unformat (input,
"trace-type 0x%x", &trace_type));
124 else if (
unformat (input,
"trace-elts %d", &num_elts));
125 else if (
unformat (input,
"trace-tsp %d", &trace_tsp));
126 else if (
unformat (input,
"node-id 0x%x", &node_id));
127 else if (
unformat (input,
"app-data 0x%x", &app_data));
143 .path =
"set ioam-trace profile",
144 .short_help =
"set ioam-trace \ 145 trace-type <0x1f|0x3|0x9|0x11|0x19> trace-elts <nn> trace-tsp <0|1|2|3> \ 146 node-id <node id in hex> app-data <app_data in hex>",
159 if (!(p && p->
valid))
161 s =
format (s,
"\nTrace configuration not valid\n");
166 s =
format (s,
" HOP BY HOP OPTIONS - TRACE CONFIG - \n");
167 s =
format (s,
" Trace Type : 0x%x (%d)\n",
170 format (s,
" Trace timestamp precision : %d (%s)\n",
182 format (s,
" Node-id : 0x%x (%d)\n",
185 format (s,
" App Data : 0x%x (%d)\n",
195 .path =
"show ioam-trace profile",
196 .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)
Optimized string handling code, including c11-compliant "safe C library" variants.
static clib_error_t * show_trace_profile_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static trace_profile * trace_profile_find(void)
clib_memset(h->entries, 0, sizeof(h->entries[0])*entries)
int ip6_trace_profile_setup()
void clear_trace_profiles(void)
static int trace_main_profiles_reset(void)
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)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
int trace_profile_create(trace_profile *profile, u8 trace_type, u8 num_elts, u32 trace_tsp, u32 node_id, u32 app_data)