15 #ifndef __included_nsh_md2_ioam_util_h__ 16 #define __included_nsh_md2_ioam_util_h__ 38 u32 * next0,
u32 drop_node_val,
44 nsh_base_header_t *nsh_hdr;
45 nsh_tlv_header_t *opt0;
46 nsh_tlv_header_t *limit0;
54 nsh_hdr = (nsh_base_header_t *) (lisp_gpe_hdr0 + 1);
55 opt0 = (nsh_tlv_header_t *) (nsh_hdr + 1);
57 (nsh_tlv_header_t *) ((
u8 *) opt0 + (nsh_hdr->length * 4) -
58 sizeof (nsh_base_header_t));
63 if ((nsh_hdr->length * 4) > clib_net_to_host_u16 (ip0->
length))
65 *next0 = drop_node_val;
69 if (nsh_hdr->md_type != 2)
71 *next0 = drop_node_val;
83 opt0 = (nsh_tlv_header_t *) ((
u8 *) opt0) + 1;
93 *next0 = drop_node_val;
100 (nsh_tlv_header_t *) (((
u8 *) opt0) + opt0->length +
101 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)
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)
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
int(* options[MAX_MD2_OPTIONS])(vlib_buffer_t *b, nsh_tlv_header_t *opt)
VLIB buffer representation.