FD.io VPP  v16.09
Vector Packet Processing
cnat_logging.c File Reference
+ Include dependency graph for cnat_logging.c:

Go to the source code of this file.

Macros

#define CNAT_NFV9_DEBUG_CODE   2
 
#define NFV9_DEBUG_PRINTF1(a)
 
#define NFV9_DEBUG_PRINTF2(a, b)
 
#define NFV9_DEBUG_PRINTF3(a, b, c)
 
#define NFV9_DEBUG_PRINTF4(a, b, c, d)
 
#define CNAT_NFV9_OPTION_TEMPLATE   cnat_nfv9_template_info.cnat_nfv9_option_template
 
#define NFV9_SERVER_POOL_SIZE   16
 

Functions

static void cnat_nfv9_insert_ingress_vrfid_name_record (cnat_nfv9_logging_info_t *nfv9_logging_info, u16 index)
 
void cnat_nfv9_ingress_vrfid_name_mapping_create (cnat_nfv9_logging_info_t *nfv9_logging_info)
 
u32 cnat_get_sys_up_time_in_ms (void)
 
void cnat_dump_time_change_logs (void)
 
void cnat_nfv9_handle_sys_time_change (time_t current_unix_time)
 
void cnat_nfv9_update_sys_time_change ()
 
void nfv9_params_show (u32 logging_index)
 
void cnat_nfv9_dump_logging_context (u32 value1, cnat_nfv9_logging_info_t *nfv9_logging_info, u32 value2)
 
static int cnat_nfv9_pad_added_to_an_addr (u8 *new_addr, u8 *org_addr)
 
static u8cnat_nfv9_add_end_of_record_padding (u8 *data_ptr)
 
static u16 cnat_nfv9_pad_end_of_record_length (u16 record_length)
 
void fill_ip_n_udp_hdr (u32 ipv4_addr, u16 port, cnat_nfv9_logging_info_t *nfv9_logging_info)
 
static void cnat_nfv9_fill_nfv9_ip_header (cnat_nfv9_logging_info_t *nfv9_logging_info)
 
static void cnat_nfv9_send_queued_pkt (cnat_nfv9_logging_info_t *nfv9_logging_info)
 
static void cnat_nfv9_send_pkt (cnat_nfv9_logging_info_t *nfv9_logging_info)
 
static void send_vpp3_nfv9_pkt (cnat_nfv9_logging_info_t *nfv9_logging_info)
 
static void cnat_nfv9_send_pkt_always_success (cnat_nfv9_logging_info_t *nfv9_logging_info, vlib_node_t *output_node)
 
static void cnat_nfv9_create_logging_context (cnat_nfv9_logging_info_t *nfv9_logging_info, cnat_nfv9_template_add_flag_t template_flag)
 
void cnat_nfv9_record_create (cnat_nfv9_logging_info_t *nfv9_logging_info, u16 cur_record)
 
static void cnat_nfv9_insert_add_record (cnat_nfv9_logging_info_t *nfv9_logging_info, cnat_main_db_entry_t *db, cnat_vrfmap_t *vrfmap)
 
static void cnat_nfv9_ds_lite_insert_add_record (cnat_nfv9_logging_info_t *nfv9_logging_info, cnat_main_db_entry_t *db, dslite_table_entry_t *dslite_entry)
 
static void cnat_nfv9_ds_lite_insert_del_record (cnat_nfv9_logging_info_t *nfv9_logging_info, cnat_main_db_entry_t *db, dslite_table_entry_t *dslite_entry)
 
static void cnat_nfv9_insert_bulk_add_record (cnat_nfv9_logging_info_t *nfv9_logging_info, cnat_main_db_entry_t *db, cnat_vrfmap_t *vrfmap, int bulk_alloc_start_port)
 
static void cnat_nfv9_ds_lite_insert_bulk_add_record (cnat_nfv9_logging_info_t *nfv9_logging_info, cnat_main_db_entry_t *db, dslite_table_entry_t *dslite_entry, int bulk_alloc_start_port)
 
static void cnat_nfv9_ds_lite_insert_bulk_del_record (cnat_nfv9_logging_info_t *nfv9_logging_info, cnat_main_db_entry_t *db, dslite_table_entry_t *dslite_entry, int bulk_alloc_start_port)
 
static void cnat_nfv9_insert_del_record (cnat_nfv9_logging_info_t *nfv9_logging_info, cnat_main_db_entry_t *db, cnat_vrfmap_t *vrfmap)
 
static void cnat_nfv9_insert_bulk_del_record (cnat_nfv9_logging_info_t *nfv9_logging_info, cnat_main_db_entry_t *db, cnat_vrfmap_t *vrfmap, int bulk_alloc_start_port)
 
void cnat_nfv9_log_mapping_create (cnat_main_db_entry_t *db, cnat_vrfmap_t *vrfmap, int bulk_alloc)
 
void cnat_nfv9_log_mapping_delete (cnat_main_db_entry_t *db, cnat_vrfmap_t *vrfmap, int bulk_alloc)
 
void cnat_nfv9_bib_mapping_create (nat64_bib_entry_t *db, nat64_table_entry_t *nat64_entry)
 
void cnat_nfv9_session_mapping_create (nat64_bib_entry_t *bdb, nat64_session_entry_t *sdb, nat64_table_entry_t *nat64_entry_ptr)
 
void cnat_nfv9_bib_mapping_delete (nat64_bib_entry_t *db, nat64_table_entry_t *nat64_entry)
 
void cnat_nfv9_session_mapping_delete (nat64_bib_entry_t *bdb, nat64_session_entry_t *sdb, nat64_table_entry_t *nat64_entry_ptr)
 
void cnat_nfv9_nat44_log_session_create (cnat_main_db_entry_t *db, cnat_session_entry_t *sdb, cnat_vrfmap_t *vrfmap)
 
void cnat_nfv9_nat44_log_session_delete (cnat_main_db_entry_t *db, cnat_session_entry_t *sdb, cnat_vrfmap_t *vrfmap)
 
void cnat_nfv9_ds_lite_mapping_create (cnat_main_db_entry_t *db, dslite_table_entry_t *dslite_entry, int bulk_alloc)
 
void cnat_nfv9_ds_lite_mapping_delete (cnat_main_db_entry_t *db, dslite_table_entry_t *dslite_entry, int bulk_alloc)
 
void cnat_nfv9_ds_lite_log_session_create (cnat_main_db_entry_t *db, dslite_table_entry_t *dslite_entry, cnat_session_entry_t *sdb)
 
void cnat_nfv9_ds_lite_log_session_delete (cnat_main_db_entry_t *db, dslite_table_entry_t *dslite_entry, cnat_session_entry_t *sdb)
 
static void handle_vrfid_name_mapping (void)
 
void handle_pending_nfv9_pkts ()
 
static void cnat_nfv9_template_init (void)
 
void cnat_nfv9_logging_init ()
 

Variables

cnat_nfv9_global_info_t cnat_nfv9_global_info
 
cnat_nfv9_template_t cnat_nfv9_template_info
 
u16 cnat_template_id [MAX_RECORDS]
 
cnat_nfv9_logging_info_t cnat_default_nfv9_logging_info
 
cnat_nfv9_logging_info_tcnat_nfv9_logging_info_pool
 
nfv9_server_info_tnfv9_server_info_pool
 
u32 nfv9_src_id = 0
 

Macro Definition Documentation

#define CNAT_NFV9_DEBUG_CODE   2

Definition at line 39 of file cnat_logging.c.

#define CNAT_NFV9_OPTION_TEMPLATE   cnat_nfv9_template_info.cnat_nfv9_option_template

Definition at line 67 of file cnat_logging.c.

#define NFV9_DEBUG_PRINTF1 (   a)

Definition at line 51 of file cnat_logging.c.

#define NFV9_DEBUG_PRINTF2 (   a,
 
)

Definition at line 52 of file cnat_logging.c.

#define NFV9_DEBUG_PRINTF3 (   a,
  b,
  c 
)

Definition at line 53 of file cnat_logging.c.

#define NFV9_DEBUG_PRINTF4 (   a,
  b,
  c,
 
)

Definition at line 54 of file cnat_logging.c.

#define NFV9_SERVER_POOL_SIZE   16

Definition at line 94 of file cnat_logging.c.

Function Documentation

void cnat_dump_time_change_logs ( void  )

Definition at line 110 of file cnat_logging.c.

u32 cnat_get_sys_up_time_in_ms ( void  )

Definition at line 100 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* cnat_nfv9_add_end_of_record_padding ( u8 data_ptr)
inlinestatic

Definition at line 332 of file cnat_logging.c.

+ Here is the caller graph for this function:

void cnat_nfv9_bib_mapping_create ( nat64_bib_entry_t db,
nat64_table_entry_t nat64_entry 
)

Definition at line 1528 of file cnat_logging.c.

+ Here is the call graph for this function:

void cnat_nfv9_bib_mapping_delete ( nat64_bib_entry_t db,
nat64_table_entry_t nat64_entry 
)

Definition at line 1779 of file cnat_logging.c.

+ Here is the call graph for this function:

static void cnat_nfv9_create_logging_context ( cnat_nfv9_logging_info_t nfv9_logging_info,
cnat_nfv9_template_add_flag_t  template_flag 
)
inlinestatic

Definition at line 661 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void cnat_nfv9_ds_lite_insert_add_record ( cnat_nfv9_logging_info_t nfv9_logging_info,
cnat_main_db_entry_t db,
dslite_table_entry_t dslite_entry 
)
static

Definition at line 933 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void cnat_nfv9_ds_lite_insert_bulk_add_record ( cnat_nfv9_logging_info_t nfv9_logging_info,
cnat_main_db_entry_t db,
dslite_table_entry_t dslite_entry,
int  bulk_alloc_start_port 
)
static

Definition at line 1140 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void cnat_nfv9_ds_lite_insert_bulk_del_record ( cnat_nfv9_logging_info_t nfv9_logging_info,
cnat_main_db_entry_t db,
dslite_table_entry_t dslite_entry,
int  bulk_alloc_start_port 
)
static

Definition at line 1213 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void cnat_nfv9_ds_lite_insert_del_record ( cnat_nfv9_logging_info_t nfv9_logging_info,
cnat_main_db_entry_t db,
dslite_table_entry_t dslite_entry 
)
static

Definition at line 1014 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_nfv9_ds_lite_log_session_create ( cnat_main_db_entry_t db,
dslite_table_entry_t dslite_entry,
cnat_session_entry_t sdb 
)

Definition at line 2384 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_nfv9_ds_lite_log_session_delete ( cnat_main_db_entry_t db,
dslite_table_entry_t dslite_entry,
cnat_session_entry_t sdb 
)

Definition at line 2522 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_nfv9_ds_lite_mapping_create ( cnat_main_db_entry_t db,
dslite_table_entry_t dslite_entry,
int  bulk_alloc 
)

Definition at line 2255 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_nfv9_ds_lite_mapping_delete ( cnat_main_db_entry_t db,
dslite_table_entry_t dslite_entry,
int  bulk_alloc 
)

Definition at line 2319 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_nfv9_dump_logging_context ( u32  value1,
cnat_nfv9_logging_info_t nfv9_logging_info,
u32  value2 
)

Definition at line 161 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void cnat_nfv9_fill_nfv9_ip_header ( cnat_nfv9_logging_info_t nfv9_logging_info)
inlinestatic

Definition at line 409 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_nfv9_handle_sys_time_change ( time_t  current_unix_time)
inline

Definition at line 115 of file cnat_logging.c.

+ Here is the call graph for this function:

void cnat_nfv9_ingress_vrfid_name_mapping_create ( cnat_nfv9_logging_info_t nfv9_logging_info)

Definition at line 2679 of file cnat_logging.c.

+ Here is the call graph for this function:

static void cnat_nfv9_insert_add_record ( cnat_nfv9_logging_info_t nfv9_logging_info,
cnat_main_db_entry_t db,
cnat_vrfmap_t vrfmap 
)
static

Definition at line 874 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void cnat_nfv9_insert_bulk_add_record ( cnat_nfv9_logging_info_t nfv9_logging_info,
cnat_main_db_entry_t db,
cnat_vrfmap_t vrfmap,
int  bulk_alloc_start_port 
)
static

Definition at line 1089 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void cnat_nfv9_insert_bulk_del_record ( cnat_nfv9_logging_info_t nfv9_logging_info,
cnat_main_db_entry_t db,
cnat_vrfmap_t vrfmap,
int  bulk_alloc_start_port 
)
static

Definition at line 1328 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void cnat_nfv9_insert_del_record ( cnat_nfv9_logging_info_t nfv9_logging_info,
cnat_main_db_entry_t db,
cnat_vrfmap_t vrfmap 
)
static

Definition at line 1275 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void cnat_nfv9_insert_ingress_vrfid_name_record ( cnat_nfv9_logging_info_t nfv9_logging_info,
u16  index 
)
static

Definition at line 2707 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_nfv9_log_mapping_create ( cnat_main_db_entry_t db,
cnat_vrfmap_t vrfmap,
int  bulk_alloc 
)

Definition at line 1383 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_nfv9_log_mapping_delete ( cnat_main_db_entry_t db,
cnat_vrfmap_t vrfmap,
int  bulk_alloc 
)

Definition at line 1458 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_nfv9_logging_init ( )

Definition at line 3470 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_nfv9_nat44_log_session_create ( cnat_main_db_entry_t db,
cnat_session_entry_t sdb,
cnat_vrfmap_t vrfmap 
)

Definition at line 2010 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_nfv9_nat44_log_session_delete ( cnat_main_db_entry_t db,
cnat_session_entry_t sdb,
cnat_vrfmap_t vrfmap 
)

Definition at line 2136 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int cnat_nfv9_pad_added_to_an_addr ( u8 new_addr,
u8 org_addr 
)
inlinestatic

Definition at line 315 of file cnat_logging.c.

+ Here is the caller graph for this function:

static u16 cnat_nfv9_pad_end_of_record_length ( u16  record_length)
inlinestatic

Definition at line 352 of file cnat_logging.c.

+ Here is the caller graph for this function:

void cnat_nfv9_record_create ( cnat_nfv9_logging_info_t nfv9_logging_info,
u16  cur_record 
)

Definition at line 789 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void cnat_nfv9_send_pkt ( cnat_nfv9_logging_info_t nfv9_logging_info)
inlinestatic

Definition at line 496 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void cnat_nfv9_send_pkt_always_success ( cnat_nfv9_logging_info_t nfv9_logging_info,
vlib_node_t output_node 
)
inlinestatic

Definition at line 585 of file cnat_logging.c.

+ Here is the call graph for this function:

static void cnat_nfv9_send_queued_pkt ( cnat_nfv9_logging_info_t nfv9_logging_info)
inlinestatic

Definition at line 479 of file cnat_logging.c.

+ Here is the caller graph for this function:

void cnat_nfv9_session_mapping_create ( nat64_bib_entry_t bdb,
nat64_session_entry_t sdb,
nat64_table_entry_t nat64_entry_ptr 
)

Definition at line 1635 of file cnat_logging.c.

+ Here is the call graph for this function:

void cnat_nfv9_session_mapping_delete ( nat64_bib_entry_t bdb,
nat64_session_entry_t sdb,
nat64_table_entry_t nat64_entry_ptr 
)

Definition at line 1880 of file cnat_logging.c.

+ Here is the call graph for this function:

static void cnat_nfv9_template_init ( void  )
static

Definition at line 2809 of file cnat_logging.c.

+ Here is the caller graph for this function:

void cnat_nfv9_update_sys_time_change ( )

Definition at line 123 of file cnat_logging.c.

void fill_ip_n_udp_hdr ( u32  ipv4_addr,
u16  port,
cnat_nfv9_logging_info_t nfv9_logging_info 
)

Definition at line 359 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void handle_pending_nfv9_pkts ( )

Definition at line 2753 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void handle_vrfid_name_mapping ( void  )
inlinestatic

Definition at line 2654 of file cnat_logging.c.

void nfv9_params_show ( u32  logging_index)

Definition at line 133 of file cnat_logging.c.

static void send_vpp3_nfv9_pkt ( cnat_nfv9_logging_info_t nfv9_logging_info)
inlinestatic

Definition at line 542 of file cnat_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

cnat_nfv9_logging_info_t cnat_default_nfv9_logging_info

Definition at line 92 of file cnat_logging.c.

cnat_nfv9_global_info_t cnat_nfv9_global_info

Definition at line 63 of file cnat_logging.c.

cnat_nfv9_logging_info_t* cnat_nfv9_logging_info_pool

Definition at line 93 of file cnat_logging.c.

cnat_nfv9_template_t cnat_nfv9_template_info

Definition at line 65 of file cnat_logging.c.

u16 cnat_template_id[MAX_RECORDS]
Initial value:
=
}
#define CNAT_NFV9_NAT64_DEL_SESSION_TEMPLATE_ID
Definition: cnat_logging.h:191
#define CNAT_NFV9_DS_LITE_BULK_ADD_TEMPLATE_ID
Definition: cnat_logging.h:203
#define CNAT_NFV9_NAT64_DEL_BIB_TEMPLATE_ID
Definition: cnat_logging.h:189
#define CNAT_NFV9_NAT44_BULK_DEL_TEMPLATE_ID
Definition: cnat_logging.h:202
#define CNAT_NFV9_NAT44_DEL_SESSION_TEMPLATE_ID
Definition: cnat_logging.h:196
#define CNAT_NFV9_DS_LITE_ADD_SESSION_TEMPLATE_ID
Definition: cnat_logging.h:197
#define CNAT_NFV9_NAT64_ADD_SESSION_TEMPLATE_ID
Definition: cnat_logging.h:190
#define CNAT_NFV9_NAT44_ADD_SESSION_TEMPLATE_ID
Definition: cnat_logging.h:195
#define CNAT_NFV9_NAT64_ADD_BIB_TEMPLATE_ID
Definition: cnat_logging.h:188
#define CNAT_NFV9_DS_LITE_DEL_TEMPLATE_ID
Definition: cnat_logging.h:194
#define CNAT_NFV9_DS_LITE_BULK_DEL_TEMPLATE_ID
Definition: cnat_logging.h:204
#define CNAT_NFV9_ADD_TEMPLATE_ID
Definition: cnat_logging.h:186
#define CNAT_NFV9_DS_LITE_ADD_TEMPLATE_ID
Definition: cnat_logging.h:193
#define CNAT_NFV9_DS_LITE_DEL_SESSION_TEMPLATE_ID
Definition: cnat_logging.h:198
#define CNAT_NFV9_INGRESS_VRF_ID_NAME_TEMPLATE_ID
Definition: cnat_logging.h:192
#define CNAT_NFV9_DEL_TEMPLATE_ID
Definition: cnat_logging.h:187
#define CNAT_NFV9_NAT44_BULK_ADD_TEMPLATE_ID
Definition: cnat_logging.h:201

Definition at line 69 of file cnat_logging.c.

nfv9_server_info_t* nfv9_server_info_pool

Definition at line 95 of file cnat_logging.c.

u32 nfv9_src_id = 0

Definition at line 97 of file cnat_logging.c.