19 #define SIXRD_ENCAP_DUAL 0 39 u32 n_left_from, *from, next_index, *to_next, n_left_to_next;
46 while (n_left_from > 0) {
49 while (n_left_from > 0 && n_left_to_next > 0) {
53 u8 error0 = SIXRD_ERROR_NONE;
57 u32 sixrd_domain_index0 = ~0;
59 pi0 = to_next[0] = from[0];
75 if (da40 == 0) error0 = SIXRD_ERROR_UNKNOWN;
83 ip4h0->
length = clib_host_to_net_u16(len);
112 #define _(sym,string) string, 120 .vector_size =
sizeof(
u32),
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.
static_always_inline sixrd_domain_t * ip6_sixrd_get_domain(u32 sdi, u32 *sixrd_domain_index)
static uword ip6_sixrd(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
struct _vlib_node_registration vlib_node_registration_t
static_always_inline u32 sixrd_get_addr(sixrd_domain_t *d, u64 dal)
static char * sixrd_error_strings[]
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
#define foreach_sixrd_error
static vlib_node_registration_t ip6_sixrd_node
(constructor) VLIB_REGISTER_NODE (ip6_sixrd_node)
#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).
vlib_error_t error
Error code for buffers to be enqueued to error handler.
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
static vlib_node_runtime_t * vlib_node_get_runtime(vlib_main_t *vm, u32 node_index)
Get node runtime by node index.
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
#define VLIB_BUFFER_IS_TRACED
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
u8 * format_sixrd_trace(u8 *s, va_list *args)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
#define VLIB_REGISTER_NODE(x,...)
u32 flags
buffer flags: VLIB_BUFFER_IS_TRACED: trace this buffer.
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static u16 ip4_header_checksum(ip4_header_t *i)