32 #define foreach_nsh_md2_ioam_encap_transit_error \ 33 _(ENCAPSULATED, "good packets encapsulated") 36 #define _(sym,string) string, 43 #define _(sym,str) NSH_MD2_IOAM_ENCAP_TRANSIT_IOAM_ERROR_##sym, 60 .arc_name =
"ip4-output",
61 .node_name =
"nsh-md2-ioam-encap-transit",
72 u32 n_left_from, next_index, *from, *to_next;
79 while (n_left_from > 0)
86 while (n_left_from > 0 && n_left_to_next > 0)
102 iph_offset =
vnet_buffer (b0)->ip.save_rewrite_length;
113 ((ip0->
protocol == IP_PROTOCOL_UDP) &&
114 (clib_net_to_host_u16 (udp_hdr0->
dst_port) ==
115 UDP_DST_PORT_lisp_gpe)))
121 nsh_base_header_t *nsh_hdr =
122 (nsh_base_header_t *) (lisp_gpe_hdr0 + 1);
157 n_left_to_next, bi0, next0);
170 .name =
"nsh-md2-ioam-encap-transit",
171 .vector_size =
sizeof (
u32),
fib_protocol_t fp_proto
protocol type
u8 * format_nsh_node_map_trace(u8 *s, va_list *args)
vlib_node_registration_t nsh_md2_ioam_encap_transit_node
(constructor) VLIB_REGISTER_NODE (nsh_md2_ioam_encap_transit_node)
VNET_FEATURE_INIT(nsh_md2_ioam_encap_transit, static)
clib_memset(h->entries, 0, sizeof(h->entries[0])*entries)
nsh_md2_ioam_encap_transit_next_t
Aggregrate type for a prefix.
static uword nsh_md2_ioam_encap_transit(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
nsh_md2_ioam_main_t nsh_md2_ioam_main
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
Finish enqueueing one buffer forward in the graph.
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
Get pointer to next frame vector data by (vlib_node_runtime_t, next_index).
LISP-GPE packet header structure.
#define VLIB_REGISTER_NODE(x,...)
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)
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
Release pointer to next frame vector data.
u16 cached_next_index
Next frame index that vector arguments were last enqueued to last time this node ran.
nsh_md2_ioam_encap_transit_error_t
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
#define VNET_FEATURES(...)
VLIB buffer representation.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
#define hash_get_mem(h, key)
static char * nsh_md2_ioam_encap_transit_error_strings[]
#define foreach_nsh_md2_ioam_encap_transit_error
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.