34 #define foreach_cnat_ipv4_tcp_outside_input_error \ 35 _(CNAT_V4_TCP_O2I_R_PKT, "v4 tcp o2i pkt received") \ 36 _(CNAT_V4_TCP_O2I_T_PKT, "v4 tcp o2i pkt natted & transmitted") \ 37 _(CNAT_V4_TCP_O2I_LOOKUP_FAILED, "v4 tcp o2i lookup failed") \ 38 _(CNAT_V4_TCP_O2I_TTL_GEN, "v4 tcp o2i generated TTL Expiry ICMP packet") \ 39 _(CNAT_V4_TCP_O2I_TTL_DROP, "v4 tcp o2i drop due to failure in creating TTL expiry ICMP msg") \ 40 _(CNAT_V4_TCP_O2I_PTB_GEN, "v4 tcp o2i PTB ICMP pkt generation") \ 41 _(CNAT_V4_UDP_O2I_PTB_DROP, "v4 tcp o2i drop due to failure in creating PTB ICMP pkt") \ 42 _(CNAT_V4_TCP_O2I_SESSION_DROP, "v4 tcp o2i drop due to failure in creating session db") \ 43 _(CNAT_V4_TCP_O2I_SEQ_MISMATCH_DROP, "v4 tcp o2i drop due to TCP sequence mismatch") \ 44 _(CNAT_V4_TCP_O2I_FILTER_DROP, "v4 tcp o2i drop due to endpoint filtering") \ 45 _(CNAT_V4_TCP_O2I_NON_SYN_RST_DROP, "v4 tcp o2i drop due no syn/rst flag") \ 46 _(CNAT_V4_TCP_O2I_FIRST_FRAG_DROP, "v4 tcp o2i first fragment drop") \ 47 _(CNAT_V4_TCP_O2I_SUB_FRAG_NO_DB_DROP, "v4 tcp o2i subsequest frag no DB drop") 50 #define _(sym,str) sym, 57 #define _(sym,string) string, 87 #define stage0 generic_stage0 129 #define SPP_LOG2_CACHE_LINE_BYTES 6 130 #define SPP_CACHE_LINE_BYTES (1 << SPP_LOG2_CACHE_LINE_BYTES) 136 uword prefetch_target0, prefetch_target1;
152 prefetch_target1 = prefetch_target0 +
187 }
while (db_index !=
EMPTY);
201 int counter = CNAT_V4_TCP_O2I_T_PKT;
217 counter = CNAT_V4_TCP_O2I_LOOKUP_FAILED;
224 ip, ctx->ru.rx.uidb_index)) {
226 disposition = CNAT_V4_TCP_O2I_T_PKT;
227 counter = CNAT_V4_TCP_O2I_TTL_GEN;
231 counter = CNAT_V4_TCP_O2I_TTL_DROP;
274 counter = CNAT_V4_TCP_O2I_SESSION_DROP;
287 counter = CNAT_V4_TCP_O2I_SESSION_DROP;
295 stored_ack_no = session_db->
ack_no;
296 window = session_db->
window;
304 counter = CNAT_V4_TCP_O2I_T_PKT;
339 em->
counters[node_counter_base_index + counter] += 1;
349 return dispatch_pipeline (vm, node, frame);
355 .name =
"vcgn-v4-tcp-o2i",
356 .vector_size =
sizeof (
u32),
cnat_main_db_entry_t * cnat_main_db
nat44_dslite_global_stats_t nat44_dslite_global_stats[2]
cnat_session_entry_t * cnat_create_session_db_entry(cnat_key_t *ko, cnat_main_db_entry_t *bdb, u8 log)
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
u64 no_translation_entry_drops
struct cnat_main_db_entry_t::@165::tcp_seq_chk_t tcp_seq_chk
#define V4_TCP_UPDATE_SESSION_FLAG(db, tcp)
struct _vlib_node_registration vlib_node_registration_t
#define STRUCT_OFFSET_OF(t, f)
cnat_session_entry_t * cnat_handle_1to2_session(cnat_main_db_entry_t *mdb, cnat_key_t *dest_info)
always_inline void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
index_slist_t out2in_hash
vnet_main_t * vnet_get_main(void)
#define CNAT_DB_TIMEOUT_RST(db)
#define VLIB_INIT_FUNCTION(x)
static void cnat_v4_recalculate_tcp_checksum(ipv4_header *ip, tcp_hdr_type *tcp, u32 *ip_addr_ptr, u16 *tcp_port_addr_ptr, u32 new_ip, u16 new_port)
vlib_error_main_t error_main
int icmpv4_generate_with_throttling(spp_ctx_t *ctx, ipv4_header *ipv4, u16 rx_uidb_index)
#define CLIB_PREFETCH(addr, size, type)
u32 out2in_forwarding_count
void cnat_add_dest_n_log(cnat_main_db_entry_t *mdb, cnat_key_t *dest_info)
#define INCREMENT_NODE_COUNTER(c)
index_slist_t * cnat_out2in_hash
cnat_vrfmap_t * cnat_map_by_vrf
#define CNAT_MAIN_HASH_MASK
always_inline void ipv4_decr_ttl_n_calc_csum(ipv4_header *ipv4)
struct _spp_ctx spp_ctx_t
#define VLIB_REGISTER_NODE(x,...)
#define CNAT_V4_GET_HASH(key64, hash, mask)
#define CLIB_CACHE_LINE_BYTES
union cnat_main_db_entry_t::@165 proto_data
#define V4_TCP_UPDATE_SESSION_DB_FLAG(sdb, tcp)
always_inline vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
nat44_dslite_common_stats_t nat44_dslite_common_stats[255]