34 ioam_e2e_option_t * e2e = (ioam_e2e_option_t *)opt;
39 seqno = clib_net_to_host_u32 (e2e->e2e_hdr.e2e_data);
42 s =
format (s,
"SeqNo = 0x%Lx", seqno);
86 ioam_e2e_option_t *e2e_option;
88 if (rewrite_string && *rewrite_size ==
sizeof(ioam_e2e_option_t))
90 e2e_option = (ioam_e2e_option_t *)rewrite_string;
93 e2e_option->hdr.length =
sizeof (ioam_e2e_option_t) -
121 if (data && (data->
flow_ctx == ctx))
141 s =
format(0,
"IOAM E2E information: \n");
161 .path =
"show ioam e2e ",
162 .short_help =
"show ioam e2e information",
180 "HBH_OPTION_TYPE_IOAM_EDGE_TO_EDGE for rewrite failed"));
184 sizeof(ioam_e2e_option_t),
188 "HBH_OPTION_TYPE_IOAM_EDGE_TO_EDGE for rewrite failed"));
195 "HBH_OPTION_TYPE_IOAM_EDGE_TO_EDGE Flow handler failed"));
211 .runs_after =
VLIB_INITS(
"ip6_hop_by_hop_ioam_init"),
int ioam_seqno_encap_handler(vlib_buffer_t *b, ip6_header_t *ip, ip6_hop_by_hop_option_t *opt)
vnet_main_t * vnet_get_main(void)
int ip6_hbh_register_option(u8 option, int options(vlib_buffer_t *b, ip6_header_t *ip, ip6_hop_by_hop_option_t *opt), u8 *trace(u8 *s, ip6_hop_by_hop_option_t *opt))
int ioam_seqno_decap_handler(vlib_buffer_t *b, ip6_header_t *ip, ip6_hop_by_hop_option_t *opt)
void ioam_seqno_init_data(ioam_seqno_data *data)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
int ip6_hbh_flow_handler_register(u8 option, u32 ioam_flow_handler(u32 flow_ctx, u8 add))
int ip6_hbh_pop_unregister_option(u8 option)
static u8 * ioam_e2e_trace_handler(u8 *s, ip6_hop_by_hop_option_t *opt)
#define VLIB_INIT_FUNCTION(x)
#define HBH_OPTION_TYPE_IOAM_EDGE_TO_EDGE
int ip6_hbh_pop_register_option(u8 option, int options(vlib_buffer_t *b, ip6_header_t *ip, ip6_hop_by_hop_option_t *opt))
description fragment has unexpected format
#define clib_error_create(args...)
int ip6_hbh_unregister_option(u8 option)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static clib_error_t * ioam_e2e_init(vlib_main_t *vm)
The fine-grained event logger allows lightweight, thread-safe event logging at minimum cost...
u32 ioam_e2e_flow_handler(u32 ctx, u8 add)
int ip6_hbh_config_handler_register(u8 option, int config_handler(void *data, u8 disable))
sll srl srl sll sra u16x4 i
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
ioam_seqno_data seqno_data
ioam_e2e_main_t ioam_e2e_main
#define VLIB_CLI_COMMAND(x,...)
#define pool_put_index(p, i)
Free pool element with given index.
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
u8 * show_ioam_seqno_cmd_fn(u8 *s, ioam_seqno_data *seqno_data, u8 enc)
u8 * get_flow_name_from_flow_ctx(u32 flow_ctx)
int ioam_e2e_config_handler(void *data, u8 disable)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static clib_error_t * ioam_show_e2e_cmd_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
ioam_e2e_data_t * e2e_data
int ioam_e2e_rewrite_handler(u8 *rewrite_string, u8 *rewrite_size)
#define HBH_OPTION_TYPE_SKIP_UNKNOWN
#define IOAM_DEAP_ENABLED(opaque_data)
int ip6_hbh_add_register_option(u8 option, u8 size, int rewrite_options(u8 *rewrite_string, u8 *rewrite_size))