|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
15 #ifndef __included_ip6_hop_by_hop_ioam_h__
16 #define __included_ip6_hop_by_hop_ioam_h__
22 #define MAX_IP6_HBH_OPTION 256
25 #define IOAM_DECAP_BIT 0x80000000
27 #define IOAM_DEAP_ENABLED(opaque_data) (opaque_data & IOAM_DECAP_BIT)
29 #define IOAM_SET_DECAP(opaque_data) \
30 (opaque_data |= IOAM_DECAP_BIT)
32 #define IOAM_MASK_DECAP_BIT(x) (x & ~IOAM_DECAP_BIT)
45 u8 next_index_by_protocol[256];
58 #define IOAM_HBYH_ADD 0
59 #define IOAM_HBYH_MOD 1
60 #define IOAM_HBYH_POP 2
104 int has_seqno_option,
105 int has_analyse_option);
116 return (
a->as_u32 == 0);
122 dst->as_u64[0] =
src->as_u64[0];
123 dst->as_u64[1] =
src->as_u64[1];
136 return ((a1->as_u64[0] == a2->as_u64[0])
137 && (a1->as_u64[1] == a2->as_u64[1]));
143 return ((
a->as_u64[0] == 0) && (
a->as_u64[1] == 0));
148 int rewrite_options (
u8 * rewrite_string,
160 int get_sizeof_hdr_options (
u32 *
165 int has_pot_option,
int has_seq_no);
169 int config_handler (
void *
data,
u8 disable));
174 u32 ioam_flow_handler (
u32 flow_ctx,
204 return (
flow->ctx[option]);
227 strncpy ((
char *)
flow->flow_name, (
char *) flow_name, 31);
232 for (
i = 0;
i < 255;
i++)
251 ((
u8 *) hbh0 + ((hbh0->
length + 1) << 3));
254 while (opt0 < limit0)
265 if (type0 == option_to_search)
ip6_local_hop_by_hop_runtime_t * ip6_local_hbh_runtime
int ip6_hbh_pop_unregister_option(u8 option)
static u8 is_seqno_enabled(void)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static u8 is_zero_ip4_address(ip4_address_t *a)
int ip6_ioam_set_destination(ip6_address_t *addr, u32 mask_width, u32 vrf_id, int is_add, int is_pop, int is_none)
#define MAX_IP6_HBH_OPTION
void * ioam_end_of_path_cb
int ip6_ioam_set_rewrite(u8 **rwp, int has_trace_option, int has_pot_option, int has_seq_no)
u32(* flow_handler[MAX_IP6_HBH_OPTION])(u32 flow_ctx, u8 add)
static void set_zero_ip6_address(ip6_address_t *a)
static u32 ioam_flow_add(u8 encap, u8 *flow_name)
static flow_data_t * get_flow(u32 index)
static u32 get_flow_data_from_flow_ctx(u32 flow_ctx, u8 option)
int ip6_trace_profile_setup()
static void copy_ip6_address(ip6_address_t *dst, ip6_address_t *src)
#define IOAM_MASK_DECAP_BIT(x)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
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))
int ip6_hbh_get_sizeof_register_option(u8 option, int get_sizeof_hdr_options(u32 *rewrite_size))
static ip6_hop_by_hop_option_t * ip6_hbh_get_option(ip6_hop_by_hop_header_t *hbh0, u8 option_to_search)
int ip6_hbh_add_register_option(u8 option, u8 size, int rewrite_options(u8 *rewrite_string, u8 *size))
static u8 is_zero_ip6_address(ip6_address_t *a)
sll srl srl sll sra u16x4 i
clib_error_t * clear_ioam_rewrite_fn(void)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
clib_error_t * ip6_ioam_enable(int has_trace_option, int has_pot_option, int has_seqno_option, int has_analyse_option)
int ip6_hbh_config_handler_register(u8 option, int config_handler(void *data, u8 disable))
static struct option options[]
static u8 cmp_ip6_address(ip6_address_t *a1, ip6_address_t *a2)
int ip6_hbh_add_unregister_option(u8 option)
ip6_hop_by_hop_ioam_main_t ip6_hop_by_hop_ioam_main
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
u8 * get_flow_name_from_flow_ctx(u32 flow_ctx)
int ip6_hbh_config_handler_unregister(u8 option)
int ip6_hbh_flow_handler_register(u8 option, u32 ioam_flow_handler(u32 flow_ctx, u8 add))
int ip6_hbh_flow_handler_unregister(u8 option)
VLIB buffer representation.
#define IOAM_SET_DECAP(opaque_data)