FD.io VPP  v16.12-rc0-308-g931be3a
Vector Packet Processing
cnat_db.h File Reference
+ Include dependency graph for cnat_db.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cnat_db_key_t
 
union  cnat_key_t
 
struct  cnat_db_key_bucket_t
 
struct  dslite_key_t
 
struct  dslite_db_key_bucket_t
 
struct  cnat_timeout_t
 
struct  cnat_timeout_db_entry_t
 
struct  cnat_main_db_entry_t
 
struct  cnat_user_db_entry_t
 
struct  cnat_session_entry_t
 
struct  cnat_db_create_args_t
 
struct  cnat_vrfmap_t
 
struct  cnat_global_counters_t
 
struct  cnat_gen_icmp_info
 
struct  nat44_dslite_common_stats_t
 
struct  nat44_dslite_global_stats_t
 
struct  nat44_counters_stats_t
 

Macros

#define VRF_NAME_LEN_STORED   12
 
#define MAX_VRFID   400
 
#define HASH_ENHANCE   4
 
#define CNAT_DB_SIZE   (PLATFORM_MAX_NAT_ENTRIES / PLATFORM_CNAT_INSTS)
 
#define CNAT_MAIN_HASH_SIZE   (HASH_ENHANCE * PLATFORM_CNAT_MAIN_PRELIM_HASH_SIZE)
 
#define CNAT_MAIN_HASH_MASK   (CNAT_MAIN_HASH_SIZE-1)
 
#define CNAT_USER_DB_SIZE   (PLATFORM_MAX_USER_ENTRIES / PLATFORM_CNAT_INSTS)
 
#define CNAT_USER_HASH_SIZE   (HASH_ENHANCE * PLATFORM_CNAT_USER_PRELIM_HASH_SIZE)
 
#define CNAT_USER_HASH_MASK   (CNAT_USER_HASH_SIZE-1)
 
#define CNAT_SESSION_DB_SIZE   (PLATFORM_MAX_NAT_ENTRIES / PLATFORM_CNAT_INSTS)
 
#define CNAT_SESSION_HASH_SIZE   (HASH_ENHANCE * PLATFORM_CNAT_MAIN_PRELIM_HASH_SIZE)
 
#define CNAT_SESSION_HASH_MASK   (CNAT_SESSION_HASH_SIZE-1)
 
#define CNAT_MAX_SESSIONS_PER_BIB   0xFFFF
 
#define NUM_BITS_IN_UWORD   (8*sizeof(uword))
 
#define CNAT_TIMEOUT_HASH_SIZE   1024
 
#define CNAT_TIMEOUT_HASH_MASK   (CNAT_TIMEOUT_HASH_SIZE - 1)
 
#define CNAT_TIMEOUT_FULL_MASK   0xFFFFFFFFFFFFFFFF
 
#define CNAT_TIMEOUT_IPPROT_MASK   PLATFORM_CNAT_TIMEOUT_IPPROT_MASK
 
#define CNAT_TIMEOUT_PORTPROT_MASK   PLATFORM_CNAT_TIMEOUT_PORTPROT_MASK
 
#define TRUE   1
 
#define FALSE   0
 
#define CNAT_INVALID_PROTO   0x0000
 
#define CNAT_PPTP   0x0000
 
#define CNAT_UDP   0x4000
 
#define CNAT_TCP   0x8000
 
#define CNAT_ICMP   0xc000
 
#define CNAT_VRF_MASK   0x3fff
 
#define CNAT_PRO_MASK   0xc000
 
#define CNAT_PRO_SHIFT   14
 
#define CNAT_MAX_VRFMAP_ENTRIES   (CNAT_VRF_MASK + 1)
 
#define CNAT_DB_FLAG_PORT_PAIR   (1<<0)
 
#define CNAT_DB_FLAG_TCP_ACTIVE   (1<<1)
 
#define CNAT_DB_FLAG_ENTRY_FREE   (1<<2)
 
#define CNAT_DB_FLAG_UDP_ACTIVE   (1<<3)
 
#define CNAT_DB_FLAG_STATIC_PORT   (1<<4)
 
#define CNAT_DB_FLAG_ALG_ENTRY   (1<<5)
 
#define CNAT_DB_FLAG_PPTP_TUNNEL_INIT   (1<<6)
 
#define CNAT_DB_FLAG_PPTP_TUNNEL_ACTIVE   (1<<7)
 
#define CNAT_DB_FLAG_PPTP_GRE_ENTRY   (1<<8)
 
#define CNAT_DB_FLAG_PCPI   (1<<9)
 
#define CNAT_DB_FLAG_PCPE   (1<<10)
 
#define CNAT_PCP_FLAG   (CNAT_DB_FLAG_PCPI | CNAT_DB_FLAG_PCPE)
 
#define CNAT_TAC_SEQ_MISMATCH   (1<<11)
 
#define CNAT_DB_FLAG_ALG_CTRL_FLOW   (1<<12)
 
#define CNAT_DB_FLAG_TCP_CLOSING   (1<<13)
 
#define CNAT_DB_DSLITE_FLAG   (1<<14)
 
#define CNAT_DB_NAT64_FLAG   (1<<15)
 
#define CNAT_USER_DB_NAT44_FLAG   0
 
#define CNAT_USER_DB_NAT64_FLAG   1
 
#define CNAT_USER_DB_DSLITE_FLAG   2
 
#define CNAT_USER_DB_PORT_LIMIT_EXCEEDED   0X80
 
#define S_WAO   0
 
#define S_WA   1 /* waiting for address pool */
 
#define S_WO   2 /* waiting for outside vrf */
 
#define S_RUN   3 /* got everything */
 
#define S_DEL   4 /* just delete */
 
#define INVALID_UIDX   0xffff /*invalid svi app uidb index */
 
#define INVALID_VRFID   0xffffffff /*invalid vrf id */
 
#define CNAT_SET_VRFMAP_NFV9_LOGGING_INDEX(logging_index, i_vrf)
 
#define VRF_MAP_ENTRY_EMPTY   0xffff
 
#define CNAT_V4_GET_HASH(key64, hash, mask)
 
#define CNAT_V4_GET_SESSION_HASH(main_index, in_addr, port, vrf, hash, mask)
 
#define CNAT_V4_GET_FRAG_HASH(key64, key32, hash, mask)
 
#define CNAT_DB_UPDATE_IN2OUT_TIMER
 
#define CNAT_DB_TIMEOUT_RST(db)
 
#define DEBUG_I2O_DROP(debug_flag)
 
#define MAIN_DB_TYPE   0
 
#define SESSION_DB_TYPE   1
 
#define NAT44_STATS   0
 
#define DSLITE_STATS   1
 
#define NAT44_COMMON_STATS   nat44_dslite_common_stats[NAT44_RESERVED_INST_ID]
 
#define NAT44_GLOBAL_STATS   nat44_dslite_global_stats[NAT44_STATS]
 
#define DSLITE_GLOBAL_STATS   nat44_dslite_global_stats[DSLITE_STATS]
 
#define SESSION_LOG_ENABLE   1
 
#define ALG_ENABLED_DB(db)
 

Typedefs

typedef struct _cnat_svi_params_entry cnat_svi_params_entry
 
typedef struct _cnat_ingress_vrfid_name_entry cnat_ingress_vrfid_name_entry
 
typedef cnat_vrfmap_t nat64_vrfmap_t
 
typedef cnat_portmap_v2_t nat64_portmap_v2_t
 

Enumerations

enum  cnat_db_create_policy_t { CNAT_DB_CREATE_DEFAULT =0, CNAT_DB_CREATE_OVERRIDE }
 
enum  cnat_db_which_t { CNAT_DB_IN2OUT = 0, CNAT_DB_OUT2IN }
 
enum  cnat_icmp_msg_t { CNAT_NO_ICMP_MSG =0, CNAT_ICMP_MSG }
 

Functions

cnat_main_db_entry_tcnat_main_db_create (cnat_db_create_args_t *a)
 
void cnat_main_db_entry_delete (cnat_main_db_entry_t *ep)
 
void cnat_delete_main_db_entry (cnat_main_db_entry_t *ep)
 
void cnat_delete_main_db_entry_v2 (cnat_main_db_entry_t *ep)
 
cnat_main_db_entry_tcnat_get_main_db_entry (cnat_db_key_bucket_t *ki, port_pair_t port_type, cnat_errno_t *error, cnat_user_db_entry_t **user_db_entry)
 
cnat_main_db_entry_tcnat_get_main_db_entry_v2 (cnat_db_key_bucket_t *ki, port_pair_t port_pair_type, port_type_t port_type, cnat_gen_icmp_info *info, cnat_key_t *dest_info)
 
cnat_main_db_entry_tcnat_create_static_main_db_entry_v2 (cnat_db_key_bucket_t *ki, cnat_db_key_bucket_t *ko, cnat_vrfmap_t *my_vrfmap, cnat_gen_icmp_info *info)
 
cnat_main_db_entry_tcnat_create_main_db_entry_and_hash (cnat_db_key_bucket_t *ki, cnat_db_key_bucket_t *ko, cnat_user_db_entry_t *udb)
 
cnat_user_db_entry_tcnat_user_db_create_entry (cnat_db_key_bucket_t *uki, u32 portmap_index)
 
cnat_user_db_entry_tcnat_user_db_lookup_entry (cnat_db_key_bucket_t *uki)
 
cnat_main_db_entry_tcnat_main_db_lookup_entry (cnat_db_key_bucket_t *ki)
 
cnat_main_db_entry_tcnat_main_db_lookup_entry_out2in (cnat_db_key_bucket_t *ko)
 
void cnat_main_db_entry_dump (cnat_main_db_entry_t *db)
 
void cnat_db_in2out_hash_delete (cnat_main_db_entry_t *ep, cnat_user_db_entry_t *up)
 
void cnat_db_out2in_hash_delete (cnat_main_db_entry_t *ep)
 
void cnat_user_db_delete (cnat_user_db_entry_t *up)
 
void cnat_db_debug_i2o_drop (cnat_db_key_bucket_t *ki)
 
void cnat_if_num_hash_table_dump (void)
 
u16 query_and_update_db_timeout (void *db, u8 db_type)
 
u16 cnat_timeout_db_create (cnat_timeout_t t_entry)
 
void cnat_timeout_db_delete (cnat_key_t t_key)
 
cnat_session_entry_tcnat_create_session_db_entry (cnat_key_t *ko, cnat_main_db_entry_t *bdb, u8 log)
 
void cnat_dest_update_main2session (cnat_main_db_entry_t *mdb, cnat_session_entry_t *sdb)
 
cnat_session_entry_tcnat_handle_1to2_session (cnat_main_db_entry_t *mdb, cnat_key_t *dest_info)
 
void cnat_add_dest_n_log (cnat_main_db_entry_t *mdb, cnat_key_t *dest_info)
 
cnat_session_entry_tcnat_session_db_lookup_entry (cnat_key_t *ko, u32 main_db_index)
 
cnat_session_entry_tcnat_session_db_edm_lookup_entry (cnat_key_t *ko, u32 session_head_index, u32 main_db_index)
 

Variables

index_slist_tcnat_timeout_hash
 
cnat_timeout_db_entry_tcnat_timeout_db
 
cnat_main_db_entry_tcnat_main_db
 
cnat_user_db_entry_tcnat_user_db
 
cnat_session_entry_tcnat_session_db
 
cnat_global_counters_t cnat_global_counters
 
u16cnat_portmap_indices_by_vrf
 
cnat_vrfmap_tcnat_portmap_by_vrf
 
cnat_portmap_t ** cnat_portmaps
 
u16 ** cnat_portmaps_inuse
 
cnat_vrfmap_tcnat_map_by_vrf
 
u16 vrf_map_array [CNAT_MAX_VRFMAP_ENTRIES]
 
cnat_svi_params_entry svi_params_array [CNAT_MAX_VRFMAP_ENTRIES]
 
cnat_ingress_vrfid_name_entry vrfid_name_map [MAX_VRFID]
 
index_slist_tcnat_out2in_hash
 
index_slist_tcnat_in2out_hash
 
index_slist_tcnat_user_hash
 
index_slist_tcnat_session_hash
 
nat44_dslite_common_stats_t nat44_dslite_common_stats [255]
 
nat44_dslite_global_stats_t nat44_dslite_global_stats [2]
 
nat44_counters_stats_t nat44_counters_stats [CNAT_MAX_VRFMAP_ENTRIES]
 

Macro Definition Documentation

#define ALG_ENABLED_DB (   db)
Value:
((db->flags & CNAT_PCP_FLAG) || \
(db->flags & CNAT_DB_FLAG_ALG_CTRL_FLOW) || \
#define CNAT_DB_FLAG_PPTP_TUNNEL_INIT
Definition: cnat_db.h:170
#define CNAT_DB_FLAG_ALG_CTRL_FLOW
Definition: cnat_db.h:183
#define CNAT_DB_FLAG_PPTP_TUNNEL_ACTIVE
Definition: cnat_db.h:171
#define CNAT_PCP_FLAG
Definition: cnat_db.h:179

Definition at line 694 of file cnat_db.h.

#define CNAT_DB_DSLITE_FLAG   (1<<14)

Definition at line 188 of file cnat_db.h.

#define CNAT_DB_FLAG_ALG_CTRL_FLOW   (1<<12)

Definition at line 183 of file cnat_db.h.

#define CNAT_DB_FLAG_ALG_ENTRY   (1<<5)

Definition at line 166 of file cnat_db.h.

#define CNAT_DB_FLAG_ENTRY_FREE   (1<<2)

Definition at line 162 of file cnat_db.h.

#define CNAT_DB_FLAG_PCPE   (1<<10)

Definition at line 178 of file cnat_db.h.

#define CNAT_DB_FLAG_PCPI   (1<<9)

Definition at line 177 of file cnat_db.h.

#define CNAT_DB_FLAG_PORT_PAIR   (1<<0)

Definition at line 160 of file cnat_db.h.

#define CNAT_DB_FLAG_PPTP_GRE_ENTRY   (1<<8)

Definition at line 174 of file cnat_db.h.

#define CNAT_DB_FLAG_PPTP_TUNNEL_ACTIVE   (1<<7)

Definition at line 171 of file cnat_db.h.

#define CNAT_DB_FLAG_PPTP_TUNNEL_INIT   (1<<6)

Definition at line 170 of file cnat_db.h.

#define CNAT_DB_FLAG_STATIC_PORT   (1<<4)

Definition at line 164 of file cnat_db.h.

#define CNAT_DB_FLAG_TCP_ACTIVE   (1<<1)

Definition at line 161 of file cnat_db.h.

#define CNAT_DB_FLAG_TCP_CLOSING   (1<<13)

Definition at line 186 of file cnat_db.h.

#define CNAT_DB_FLAG_UDP_ACTIVE   (1<<3)

Definition at line 163 of file cnat_db.h.

#define CNAT_DB_NAT64_FLAG   (1<<15)

Definition at line 189 of file cnat_db.h.

#define CNAT_DB_SIZE   (PLATFORM_MAX_NAT_ENTRIES / PLATFORM_CNAT_INSTS)

Definition at line 54 of file cnat_db.h.

#define CNAT_DB_TIMEOUT_RST (   db)
Value:
if(PREDICT_TRUE(db->entry_expires != 0 )) \
db->entry_expires = cnat_current_time;
#define PREDICT_TRUE(x)
Definition: clib.h:98
u32 cnat_current_time
Definition: cnat_global.c:29

Definition at line 561 of file cnat_db.h.

#define CNAT_DB_UPDATE_IN2OUT_TIMER
Value:
db->entry_expires = cnat_current_time; \
db->in2out_pkts++;
u32 cnat_current_time
Definition: cnat_global.c:29

Definition at line 557 of file cnat_db.h.

#define CNAT_ICMP   0xc000

Definition at line 95 of file cnat_db.h.

#define CNAT_INVALID_PROTO   0x0000

Definition at line 91 of file cnat_db.h.

#define CNAT_MAIN_HASH_MASK   (CNAT_MAIN_HASH_SIZE-1)

Definition at line 56 of file cnat_db.h.

#define CNAT_MAIN_HASH_SIZE   (HASH_ENHANCE * PLATFORM_CNAT_MAIN_PRELIM_HASH_SIZE)

Definition at line 55 of file cnat_db.h.

#define CNAT_MAX_SESSIONS_PER_BIB   0xFFFF

Definition at line 67 of file cnat_db.h.

#define CNAT_MAX_VRFMAP_ENTRIES   (CNAT_VRF_MASK + 1)

Definition at line 103 of file cnat_db.h.

#define CNAT_PCP_FLAG   (CNAT_DB_FLAG_PCPI | CNAT_DB_FLAG_PCPE)

Definition at line 179 of file cnat_db.h.

#define CNAT_PPTP   0x0000

Definition at line 92 of file cnat_db.h.

#define CNAT_PRO_MASK   0xc000

Definition at line 97 of file cnat_db.h.

#define CNAT_PRO_SHIFT   14

Definition at line 98 of file cnat_db.h.

#define CNAT_SESSION_DB_SIZE   (PLATFORM_MAX_NAT_ENTRIES / PLATFORM_CNAT_INSTS)

Definition at line 62 of file cnat_db.h.

#define CNAT_SESSION_HASH_MASK   (CNAT_SESSION_HASH_SIZE-1)

Definition at line 64 of file cnat_db.h.

#define CNAT_SESSION_HASH_SIZE   (HASH_ENHANCE * PLATFORM_CNAT_MAIN_PRELIM_HASH_SIZE)

Definition at line 63 of file cnat_db.h.

#define CNAT_SET_VRFMAP_NFV9_LOGGING_INDEX (   logging_index,
  i_vrf 
)
Value:
do { \
cnat_nfv9_logging_info_t *my_nfv9_logging_info = 0; \
pool_foreach (my_nfv9_logging_info, cnat_nfv9_logging_info, ({ \
if (my_nfv9_logging_info->i_vrf == i_vrf) { \
logging_index = my_nfv9_logging_info - cnat_nfv9_logging_info; \
break; \
} \
})); \
while (0)
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
Definition: pool.h:348

Definition at line 456 of file cnat_db.h.

#define CNAT_TAC_SEQ_MISMATCH   (1<<11)

Definition at line 181 of file cnat_db.h.

#define CNAT_TCP   0x8000

Definition at line 94 of file cnat_db.h.

#define CNAT_TIMEOUT_FULL_MASK   0xFFFFFFFFFFFFFFFF

Definition at line 74 of file cnat_db.h.

#define CNAT_TIMEOUT_HASH_MASK   (CNAT_TIMEOUT_HASH_SIZE - 1)

Definition at line 73 of file cnat_db.h.

#define CNAT_TIMEOUT_HASH_SIZE   1024

Definition at line 72 of file cnat_db.h.

#define CNAT_TIMEOUT_IPPROT_MASK   PLATFORM_CNAT_TIMEOUT_IPPROT_MASK

Definition at line 75 of file cnat_db.h.

#define CNAT_TIMEOUT_PORTPROT_MASK   PLATFORM_CNAT_TIMEOUT_PORTPROT_MASK

Definition at line 76 of file cnat_db.h.

#define CNAT_UDP   0x4000

Definition at line 93 of file cnat_db.h.

#define CNAT_USER_DB_DSLITE_FLAG   2

Definition at line 299 of file cnat_db.h.

#define CNAT_USER_DB_NAT44_FLAG   0

Definition at line 297 of file cnat_db.h.

#define CNAT_USER_DB_NAT64_FLAG   1

Definition at line 298 of file cnat_db.h.

#define CNAT_USER_DB_PORT_LIMIT_EXCEEDED   0X80

Definition at line 300 of file cnat_db.h.

#define CNAT_USER_DB_SIZE   (PLATFORM_MAX_USER_ENTRIES / PLATFORM_CNAT_INSTS)

Definition at line 58 of file cnat_db.h.

#define CNAT_USER_HASH_MASK   (CNAT_USER_HASH_SIZE-1)

Definition at line 60 of file cnat_db.h.

#define CNAT_USER_HASH_SIZE   (HASH_ENHANCE * PLATFORM_CNAT_USER_PRELIM_HASH_SIZE)

Definition at line 59 of file cnat_db.h.

#define CNAT_V4_GET_FRAG_HASH (   key64,
  key32,
  hash,
  mask 
)
Value:
a = key64; \
b = key32; \
c = 0x9e3779b97f4a7c13LL; \
hash_mix64(a, b, c); \
hash = c % mask;
a
Definition: bitmap.h:516
#define hash_mix64(a0, b0, c0)
Definition: hash.h:507
svmdb_client_t * c

Definition at line 550 of file cnat_db.h.

#define CNAT_V4_GET_HASH (   key64,
  hash,
  mask 
)
Value:
a = key64; \
b = c = 0x9e3779b97f4a7c13LL; \
/* Jenkins hash, arbitrarily use c as the "answer" */ \
hash_mix64(a, b, c); \
hash = c & mask;
a
Definition: bitmap.h:516
#define hash_mix64(a0, b0, c0)
Definition: hash.h:507
svmdb_client_t * c

Definition at line 536 of file cnat_db.h.

#define CNAT_V4_GET_SESSION_HASH (   main_index,
  in_addr,
  port,
  vrf,
  hash,
  mask 
)
Value:
a = main_index ^ in_addr ^ port ^ vrf; \
b = c = 0x9e3779b9; \
/* Jenkins hash, arbitrarily use c as the "answer" */ \
hash_mix32(a, b, c); \
hash = c & mask;
a
Definition: bitmap.h:516
svmdb_client_t * c
#define hash_mix32(a0, b0, c0)
Definition: hash.h:515

Definition at line 543 of file cnat_db.h.

#define CNAT_VRF_MASK   0x3fff

Definition at line 96 of file cnat_db.h.

#define DEBUG_I2O_DROP (   debug_flag)
Value:
if (debug_i_flag & debug_flag) { \
}
void cnat_db_debug_i2o_drop(cnat_db_key_bucket_t *ki)
Definition: cnat_db_v2.c:417
u32 debug_i_flag

Definition at line 565 of file cnat_db.h.

#define DSLITE_GLOBAL_STATS   nat44_dslite_global_stats[DSLITE_STATS]

Definition at line 692 of file cnat_db.h.

#define DSLITE_STATS   1

Definition at line 685 of file cnat_db.h.

#define FALSE   0

Definition at line 79 of file cnat_db.h.

#define HASH_ENHANCE   4

Definition at line 52 of file cnat_db.h.

#define INVALID_UIDX   0xffff /*invalid svi app uidb index */

Definition at line 419 of file cnat_db.h.

#define INVALID_VRFID   0xffffffff /*invalid vrf id */

Definition at line 420 of file cnat_db.h.

#define MAIN_DB_TYPE   0

Definition at line 626 of file cnat_db.h.

#define MAX_VRFID   400

Definition at line 28 of file cnat_db.h.

#define NAT44_COMMON_STATS   nat44_dslite_common_stats[NAT44_RESERVED_INST_ID]

Definition at line 690 of file cnat_db.h.

#define NAT44_GLOBAL_STATS   nat44_dslite_global_stats[NAT44_STATS]

Definition at line 691 of file cnat_db.h.

#define NAT44_STATS   0

Definition at line 684 of file cnat_db.h.

#define NUM_BITS_IN_UWORD   (8*sizeof(uword))

Definition at line 69 of file cnat_db.h.

#define S_DEL   4 /* just delete */

Definition at line 417 of file cnat_db.h.

#define S_RUN   3 /* got everything */

Definition at line 416 of file cnat_db.h.

#define S_WA   1 /* waiting for address pool */

Definition at line 414 of file cnat_db.h.

#define S_WAO   0

Definition at line 413 of file cnat_db.h.

#define S_WO   2 /* waiting for outside vrf */

Definition at line 415 of file cnat_db.h.

#define SESSION_DB_TYPE   1

Definition at line 627 of file cnat_db.h.

#define SESSION_LOG_ENABLE   1

Definition at line 693 of file cnat_db.h.

#define TRUE   1

Definition at line 78 of file cnat_db.h.

#define VRF_MAP_ENTRY_EMPTY   0xffff

Definition at line 506 of file cnat_db.h.

#define VRF_NAME_LEN_STORED   12

Definition at line 27 of file cnat_db.h.

Typedef Documentation

typedef struct _cnat_ingress_vrfid_name_entry cnat_ingress_vrfid_name_entry
typedef struct _cnat_svi_params_entry cnat_svi_params_entry

Definition at line 534 of file cnat_db.h.

Definition at line 533 of file cnat_db.h.

Enumeration Type Documentation

Enumerator
CNAT_DB_CREATE_DEFAULT 
CNAT_DB_CREATE_OVERRIDE 

Definition at line 392 of file cnat_db.h.

Enumerator
CNAT_DB_IN2OUT 
CNAT_DB_OUT2IN 

Definition at line 517 of file cnat_db.h.

Enumerator
CNAT_NO_ICMP_MSG 
CNAT_ICMP_MSG 

Definition at line 522 of file cnat_db.h.

Function Documentation

void cnat_add_dest_n_log ( cnat_main_db_entry_t mdb,
cnat_key_t dest_info 
)

Definition at line 1083 of file cnat_db_v2.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

cnat_main_db_entry_t* cnat_create_main_db_entry_and_hash ( cnat_db_key_bucket_t ki,
cnat_db_key_bucket_t ko,
cnat_user_db_entry_t udb 
)

Definition at line 653 of file cnat_db_v2.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

cnat_session_entry_t* cnat_create_session_db_entry ( cnat_key_t ko,
cnat_main_db_entry_t bdb,
u8  log 
)

Definition at line 2643 of file cnat_db_v2.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

cnat_main_db_entry_t* cnat_create_static_main_db_entry_v2 ( cnat_db_key_bucket_t ki,
cnat_db_key_bucket_t ko,
cnat_vrfmap_t my_vrfmap,
cnat_gen_icmp_info info 
)

Definition at line 1669 of file cnat_db_v2.c.

+ Here is the call graph for this function:

void cnat_db_debug_i2o_drop ( cnat_db_key_bucket_t ki)

Definition at line 417 of file cnat_db_v2.c.

+ Here is the call graph for this function:

void cnat_db_in2out_hash_delete ( cnat_main_db_entry_t ep,
cnat_user_db_entry_t up 
)

Definition at line 433 of file cnat_db_v2.c.

+ Here is the caller graph for this function:

void cnat_db_out2in_hash_delete ( cnat_main_db_entry_t ep)

Definition at line 482 of file cnat_db_v2.c.

+ Here is the caller graph for this function:

void cnat_delete_main_db_entry ( cnat_main_db_entry_t ep)
void cnat_delete_main_db_entry_v2 ( cnat_main_db_entry_t ep)

Definition at line 763 of file cnat_db_v2.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_dest_update_main2session ( cnat_main_db_entry_t mdb,
cnat_session_entry_t sdb 
)

Definition at line 2743 of file cnat_db_v2.c.

+ Here is the caller graph for this function:

cnat_main_db_entry_t* cnat_get_main_db_entry ( cnat_db_key_bucket_t ki,
port_pair_t  port_type,
cnat_errno_t error,
cnat_user_db_entry_t **  user_db_entry 
)
cnat_main_db_entry_t* cnat_get_main_db_entry_v2 ( cnat_db_key_bucket_t ki,
port_pair_t  port_pair_type,
port_type_t  port_type,
cnat_gen_icmp_info info,
cnat_key_t dest_info 
)

Definition at line 1647 of file cnat_db_v2.c.

+ Here is the caller graph for this function:

cnat_session_entry_t* cnat_handle_1to2_session ( cnat_main_db_entry_t mdb,
cnat_key_t dest_info 
)

Definition at line 1027 of file cnat_db_v2.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_if_num_hash_table_dump ( void  )
cnat_main_db_entry_t* cnat_main_db_create ( cnat_db_create_args_t a)
void cnat_main_db_entry_delete ( cnat_main_db_entry_t ep)
void cnat_main_db_entry_dump ( cnat_main_db_entry_t db)

Definition at line 108 of file cnat_show.c.

+ Here is the caller graph for this function:

cnat_main_db_entry_t* cnat_main_db_lookup_entry ( cnat_db_key_bucket_t ki)

Definition at line 515 of file cnat_db_v2.c.

+ Here is the caller graph for this function:

cnat_main_db_entry_t* cnat_main_db_lookup_entry_out2in ( cnat_db_key_bucket_t ko)

Definition at line 996 of file cnat_db_v2.c.

cnat_session_entry_t* cnat_session_db_edm_lookup_entry ( cnat_key_t ko,
u32  session_head_index,
u32  main_db_index 
)

Definition at line 2583 of file cnat_db_v2.c.

cnat_session_entry_t* cnat_session_db_lookup_entry ( cnat_key_t ko,
u32  main_db_index 
)

Definition at line 2612 of file cnat_db_v2.c.

+ Here is the caller graph for this function:

u16 cnat_timeout_db_create ( cnat_timeout_t  t_entry)

Definition at line 2450 of file cnat_db_v2.c.

+ Here is the call graph for this function:

void cnat_timeout_db_delete ( cnat_key_t  t_key)

Definition at line 2496 of file cnat_db_v2.c.

cnat_user_db_entry_t* cnat_user_db_create_entry ( cnat_db_key_bucket_t uki,
u32  portmap_index 
)

Definition at line 628 of file cnat_db_v2.c.

+ Here is the caller graph for this function:

void cnat_user_db_delete ( cnat_user_db_entry_t up)

Definition at line 541 of file cnat_db_v2.c.

+ Here is the caller graph for this function:

cnat_user_db_entry_t* cnat_user_db_lookup_entry ( cnat_db_key_bucket_t uki)

Definition at line 603 of file cnat_db_v2.c.

+ Here is the caller graph for this function:

u16 query_and_update_db_timeout ( void *  db,
u8  db_type 
)

Definition at line 2325 of file cnat_db_v2.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

cnat_global_counters_t cnat_global_counters

Definition at line 190 of file cnat_db_v2.c.

index_slist_t* cnat_in2out_hash

Definition at line 196 of file cnat_db_v2.c.

cnat_main_db_entry_t* cnat_main_db

Definition at line 201 of file cnat_db_v2.c.

cnat_vrfmap_t* cnat_map_by_vrf

Definition at line 218 of file cnat_db_v2.c.

index_slist_t* cnat_out2in_hash

Definition at line 195 of file cnat_db_v2.c.

cnat_vrfmap_t* cnat_portmap_by_vrf
u16* cnat_portmap_indices_by_vrf
cnat_portmap_t** cnat_portmaps
u16** cnat_portmaps_inuse
cnat_session_entry_t* cnat_session_db

Definition at line 203 of file cnat_db_v2.c.

index_slist_t* cnat_session_hash

Definition at line 199 of file cnat_db_v2.c.

cnat_timeout_db_entry_t* cnat_timeout_db

Definition at line 204 of file cnat_db_v2.c.

index_slist_t* cnat_timeout_hash

Definition at line 198 of file cnat_db_v2.c.

cnat_user_db_entry_t* cnat_user_db

Definition at line 202 of file cnat_db_v2.c.

index_slist_t* cnat_user_hash

Definition at line 197 of file cnat_db_v2.c.

Definition at line 212 of file cnat_db_v2.c.

nat44_dslite_common_stats_t nat44_dslite_common_stats[255]

Definition at line 210 of file cnat_db_v2.c.

nat44_dslite_global_stats_t nat44_dslite_global_stats[2]

Definition at line 211 of file cnat_db_v2.c.

Definition at line 226 of file cnat_db_v2.c.

u16 vrf_map_array[CNAT_MAX_VRFMAP_ENTRIES]

Definition at line 225 of file cnat_db_v2.c.

Definition at line 227 of file cnat_db_v2.c.