28 #define _(sym,string) string, 37 u32 n_left_from, *from, *to_next;
45 while (n_left_from > 0)
51 while (n_left_from > 0 && n_left_to_next > 0)
56 u8 error0 = DSLITE_ERROR_CE_ENCAP;
75 error0 = DSLITE_ERROR_UNSUPPORTED_PROTOCOL;
84 clib_host_to_net_u32 ((6 << 28) + (ip40->
tos << 20));
86 ip60->
protocol = IP_PROTOCOL_IP_IN_IP;
95 && (b0->
flags & VLIB_BUFFER_IS_TRACED)))
105 n_left_to_next, bi0, next0);
116 .name =
"dslite-ce-encap",
117 .vector_size =
sizeof (
u32),
static uword dslite_ce_encap_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
vlib_error_t * errors
Vector of errors for this node.
ip6_address_t b4_ip6_addr
VLIB_NODE_FUNCTION_MULTIARCH(dslite_ce_encap_node, dslite_ce_encap_node_fn)
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).
vlib_error_t error
Error code for buffers to be enqueued to error handler.
ip6_address_t aftr_ip6_addr
#define VLIB_REGISTER_NODE(x,...)
dslite_main_t dslite_main
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 char * dslite_ce_encap_error_strings[]
u16 cached_next_index
Next frame index that vector arguments were last enqueued to last time this node ran.
vlib_node_registration_t dslite_ce_encap_node
(constructor) VLIB_REGISTER_NODE (dslite_ce_encap_node)
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
struct _vlib_node_registration vlib_node_registration_t
static u32 ip_proto_to_snat_proto(u8 ip_proto)
The NAT inline functions.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
#define foreach_dslite_error
u16 flags
Copy of main node flags.
u8 * format_dslite_ce_trace(u8 *s, va_list *args)
#define VLIB_NODE_FLAG_TRACE
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, 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.