15 #ifndef __included_nsh_md2_ioam_util_h__ 16 #define __included_nsh_md2_ioam_util_h__ 37 u32 * next0,
u32 drop_node_val,
43 nsh_base_header_t *nsh_hdr;
44 nsh_tlv_header_t *opt0;
45 nsh_tlv_header_t *limit0;
53 nsh_hdr = (nsh_base_header_t *) (lisp_gpe_hdr0 + 1);
54 opt0 = (nsh_tlv_header_t *) (nsh_hdr + 1);
56 (nsh_tlv_header_t *) ((
u8 *) opt0 + (nsh_hdr->length * 4) -
57 sizeof (nsh_base_header_t));
62 if ((nsh_hdr->length * 4) > clib_net_to_host_u16 (ip0->
length))
64 *next0 = drop_node_val;
68 if (nsh_hdr->md_type != 2)
70 *next0 = drop_node_val;
82 opt0 = (nsh_tlv_header_t *) ((
u8 *) opt0) + 1;
92 *next0 = drop_node_val;
99 (nsh_tlv_header_t *) (((
u8 *) opt0) + opt0->length +
100 sizeof (nsh_tlv_header_t));
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
#define clib_memcpy_fast(a, b, c)
nsh_option_map_t * nsh_md2_lookup_option(u16 class, u8 type)
vl_api_fib_path_type_t type
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
LISP-GPE packet header structure.
static void nsh_md2_ioam_encap_decap_ioam_v4_one_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b0, u32 *next0, u32 drop_node_val, u8 use_adj)
vlib_main_t vlib_node_runtime_t * node
int(* options[MAX_MD2_OPTIONS])(vlib_buffer_t *b, nsh_tlv_header_t *opt)
VLIB buffer representation.
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)