FD.io VPP  v17.01-9-ge7dcee4
Vector Packet Processing
cnat_ports.c File Reference
+ Include dependency graph for cnat_ports.c:

Go to the source code of this file.

Data Structures

struct  cnat_ports_main_t
 

Macros

#define msg_spp_err(s)
 
#define PM_90_PERCENT_USE   58980
 

Functions

void cnat_db_dump_portmap_for_vrf (u32 vrfmap_index)
 
void cnat_db_dump_portmaps ()
 
static int check_if_stat_alloc_ok_for_bulk (cnat_portmap_v2_t *pm, u16 i_port, bulk_alloc_size_t bulk_size, u16 static_port_range)
 
cnat_errno_t cnat_static_port_alloc_v2 (cnat_portmap_v2_t *pm, port_alloc_t atype, port_pair_t pair_type, u32 i_ipv4_address, u16 i_port, u32 *index, u32 *o_ipv4_address, u16 *o_port, u16 static_port_range, bulk_alloc_size_t bulk_size, int *nfv9_log_req, u16 ip_n_to_1)
 
cnat_portmap_v2_tcnat_dynamic_addr_alloc_from_pm (cnat_portmap_v2_t *pm, port_alloc_t atype, u32 *index, cnat_errno_t *err, u16 ip_n_to_1, u32 *rseed_ip)
 
cnat_errno_t cnat_dynamic_port_alloc_v2 (cnat_portmap_v2_t *pm, port_alloc_t atype, port_pair_t pair_type, u32 *index, u32 *o_ipv4_address, u16 *o_port, u16 static_port_range, bulk_alloc_size_t bulk_size, int *nfv9_log_req, u16 ip_n_to_1, u32 *rseed_ip)
 
cnat_errno_t cnat_dynamic_port_alloc_rtsp (cnat_portmap_v2_t *pm, port_alloc_t atype, port_pair_t pair_type, u16 start_range, u16 end_range, u32 *index, u32 *o_ipv4_address, u16 *o_port, bulk_alloc_size_t bulk_size, int *nfv9_log_req, u32 *rseed_ip)
 
cnat_errno_t cnat_mapped_static_port_alloc_v2 (cnat_portmap_v2_t *pm, port_alloc_t atype, u32 *index, u32 ipv4_address, u16 port, int *nfv9_log_req, bulk_alloc_size_t bulk_size, u16 ip_n_to_1)
 
void cnat_port_free_v2 (cnat_portmap_v2_t *pm, int index, port_pair_t pair_type, u16 base_port, u16 static_port_range)
 
void cnat_portmap_dump_v2 (cnat_portmap_v2_t *pm, u16 print_limit)
 
clib_error_tcnat_ports_init (vlib_main_t *vm)
 

Variables

u8 my_instance_number = 0
 
cnat_ports_main_t cnat_ports_main
 
static u32 rseed_port
 

Macro Definition Documentation

#define msg_spp_err (   s)
Value:
do { \
fprintf(stderr,(i8 *)s); \
fputs("\n", stderr); \
} while(0);
char i8
Definition: types.h:45

Definition at line 39 of file cnat_ports.c.

#define PM_90_PERCENT_USE   58980

Definition at line 47 of file cnat_ports.c.

Function Documentation

static int check_if_stat_alloc_ok_for_bulk ( cnat_portmap_v2_t pm,
u16  i_port,
bulk_alloc_size_t  bulk_size,
u16  static_port_range 
)
static

Definition at line 108 of file cnat_ports.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_db_dump_portmap_for_vrf ( u32  vrfmap_index)

Definition at line 67 of file cnat_ports.c.

+ Here is the caller graph for this function:

void cnat_db_dump_portmaps ( )

Definition at line 91 of file cnat_ports.c.

+ Here is the call graph for this function:

cnat_portmap_v2_t* cnat_dynamic_addr_alloc_from_pm ( cnat_portmap_v2_t pm,
port_alloc_t  atype,
u32 index,
cnat_errno_t err,
u16  ip_n_to_1,
u32 rseed_ip 
)

Definition at line 415 of file cnat_ports.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

cnat_errno_t cnat_dynamic_port_alloc_rtsp ( cnat_portmap_v2_t pm,
port_alloc_t  atype,
port_pair_t  pair_type,
u16  start_range,
u16  end_range,
u32 index,
u32 o_ipv4_address,
u16 o_port,
bulk_alloc_size_t  bulk_size,
int *  nfv9_log_req,
u32 rseed_ip 
)

Definition at line 906 of file cnat_ports.c.

+ Here is the caller graph for this function:

cnat_errno_t cnat_dynamic_port_alloc_v2 ( cnat_portmap_v2_t pm,
port_alloc_t  atype,
port_pair_t  pair_type,
u32 index,
u32 o_ipv4_address,
u16 o_port,
u16  static_port_range,
bulk_alloc_size_t  bulk_size,
int *  nfv9_log_req,
u16  ip_n_to_1,
u32 rseed_ip 
)

Definition at line 554 of file cnat_ports.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

cnat_errno_t cnat_mapped_static_port_alloc_v2 ( cnat_portmap_v2_t pm,
port_alloc_t  atype,
u32 index,
u32  ipv4_address,
u16  port,
int *  nfv9_log_req,
bulk_alloc_size_t  bulk_size,
u16  ip_n_to_1 
)

Definition at line 932 of file cnat_ports.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_port_free_v2 ( cnat_portmap_v2_t pm,
int  index,
port_pair_t  pair_type,
u16  base_port,
u16  static_port_range 
)

Definition at line 1037 of file cnat_ports.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_portmap_dump_v2 ( cnat_portmap_v2_t pm,
u16  print_limit 
)

Definition at line 1072 of file cnat_ports.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* cnat_ports_init ( vlib_main_t vm)

Definition at line 1096 of file cnat_ports.c.

+ Here is the call graph for this function:

cnat_errno_t cnat_static_port_alloc_v2 ( cnat_portmap_v2_t pm,
port_alloc_t  atype,
port_pair_t  pair_type,
u32  i_ipv4_address,
u16  i_port,
u32 index,
u32 o_ipv4_address,
u16 o_port,
u16  static_port_range,
bulk_alloc_size_t  bulk_size,
int *  nfv9_log_req,
u16  ip_n_to_1 
)

Definition at line 135 of file cnat_ports.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

cnat_ports_main_t cnat_ports_main

Definition at line 62 of file cnat_ports.c.

u8 my_instance_number = 0

Definition at line 51 of file cnat_ports.c.

u32 rseed_port
static

Definition at line 64 of file cnat_ports.c.