26 #define foreach_l2t_decap_error \ 27 _(USER_TO_NETWORK, "L2TP user (ip6) to L2 network pkts") \ 28 _(SESSION_ID_MISMATCH, "l2tpv3 local session id mismatches") \ 29 _(COOKIE_MISMATCH, "l2tpv3 local cookie mismatches") 32 #define _(sym,string) string, 38 #define _(sym,str) L2T_DECAP_ERROR_##sym, 73 l2tpv3_header_t * l2t;
90 l2t = (l2tpv3_header_t*)(ip6+1);
101 session_index = p[0];
120 l2tpv3_header_t * l2tp;
132 em->
counters[node_counter_base_index + L2T_DECAP_ERROR_USER_TO_NETWORK] += 1;
154 em->
counters[node_counter_base_index + L2T_DECAP_ERROR_SESSION_ID_MISMATCH] += 1;
162 b->
error = node->
errors[L2T_DECAP_ERROR_COOKIE_MISMATCH];
228 return dispatch_pipeline (vm, node, frame);
233 .name =
"l2tp-decap",
234 .vector_size =
sizeof (
u32),
ip6_address_t client_address
void ip6_register_protocol(u32 protocol, u32 node_index)
always_inline vlib_node_t * vlib_get_node(vlib_main_t *vm, u32 i)
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static u32 last_stage(vlib_main_t *vm, vlib_node_runtime_t *node, u32 bi)
uword * session_by_session_id
ip_config_main_t rx_config_mains[VNET_N_CAST]
vlib_node_registration_t l2t_decap_node
(constructor) VLIB_REGISTER_NODE (l2t_decap_node)
static u32 session_index_to_counter_index(u32 session_index, u32 counter_id)
always_inline void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
static char * l2t_decap_error_strings[]
always_inline void vlib_increment_combined_counter(vlib_combined_counter_main_t *cm, u32 cpu_index, u32 index, u32 packet_increment, u32 byte_increment)
always_inline uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
static void stage1(vlib_main_t *vm, vlib_node_runtime_t *node, u32 bi)
#define pool_elt_at_index(p, i)
vlib_error_main_t error_main
u8 * format_l2t_trace(u8 *s, va_list *args)
uword os_get_cpu_number(void)
vlib_error_t error
Error code for buffers to be enqueued to error handler.
ip6_to_l2_lookup_t lookup_type
ip6_address_t our_address
#define CLIB_PREFETCH(addr, size, type)
static void stage0(vlib_main_t *vm, vlib_node_runtime_t *node, u32 buffer_index)
ip_lookup_main_t lookup_main
#define foreach_l2t_decap_error
static uword l2t_decap_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
uword * session_by_dst_address
#define VLIB_BUFFER_IS_TRACED
vlib_combined_counter_main_t counter_main
void l2tp_decap_init(void)
always_inline void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
always_inline void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
#define hash_get_mem(h, key)
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
#define VLIB_REGISTER_NODE(x,...)
uword * session_by_src_address
#define CLIB_CACHE_LINE_BYTES
always_inline void * vnet_get_config_data(vnet_config_main_t *cm, u32 *config_index, u32 *next_index, u32 n_data_bytes)
u32 flags
buffer flags: VLIB_BUFFER_IS_TRACED: trace this buffer.
always_inline vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
vnet_config_main_t config_main
always_inline u32 counter_index(vlib_main_t *vm, vlib_error_t e)