72 if (profile && !profile->
valid)
124 .path =
"clear ioam-trace profile",
125 .short_help =
"clear ioam-trace profile [<index>|all]",
143 if (
unformat (input,
"trace-type 0x%x", &trace_type));
144 else if (
unformat (input,
"trace-elts %d", &num_elts));
145 else if (
unformat (input,
"trace-tsp %d", &trace_tsp));
146 else if (
unformat (input,
"node-id 0x%x", &node_id));
147 else if (
unformat (input,
"app-data 0x%x", &app_data));
163 .path =
"set ioam-trace profile",
164 .short_help =
"set ioam-trace \ 165 trace-type <0x1f|0x3|0x9|0x11|0x19> trace-elts <nn> trace-tsp <0|1|2|3> \ 166 node-id <node id in hex> app-data <app_data in hex>",
179 if (!(p && p->
valid))
181 s =
format (s,
"\nTrace configuration not valid\n");
186 s =
format (s,
" HOP BY HOP OPTIONS - TRACE CONFIG - \n");
187 s =
format (s,
" Trace Type : 0x%x (%d)\n",
190 format (s,
" Trace timestamp precision : %d (%s)\n",
202 format (s,
" Node-id : 0x%x (%d)\n",
205 format (s,
" App Data : 0x%x (%d)\n",
215 .path =
"show ioam-trace profile",
216 .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_ioam_set_rewrite(u8 **rwp, int has_trace_option, int has_pot_option, int has_seqno_option)
u8 options_size[MAX_IP6_HBH_OPTION]
int ioam_trace_get_sizeof_handler(u32 *result)
void clear_trace_profiles(void)
static int trace_main_profiles_reset(void)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
#define vec_free(V)
Free vector's memory (no header).
#define VLIB_CLI_COMMAND(x,...)
static trace_profile * trace_profile_find(void)
#define HBH_OPTION_TYPE_IOAM_TRACE_DATA_LIST
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)
ip6_hop_by_hop_ioam_main_t ip6_hop_by_hop_ioam_main
int trace_profile_create(trace_profile *profile, u8 trace_type, u8 num_elts, u32 trace_tsp, u32 node_id, u32 app_data)