Go to the source code of this file.
|  | 
| static u16 | bit2port (u32 bit) | 
|  | 
| static uword | port2bit (u16 port) | 
|  | 
| static u32 | randq1 (u32 prev) | 
|  | 
| 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_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) | 
|  | 
| 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) | 
|  | 
| void | cnat_port_free_v2 (cnat_portmap_v2_t *pm, int index, port_pair_t ptype, u16 base_port, u16 static_port_range) | 
|  | 
| void | cnat_portmap_dump_v2 (cnat_portmap_v2_t *pm, u16 print_limit) | 
|  | 
| cnat_errno_t | nat64_static_port_alloc (cnat_portmap_v2_t *pm, port_alloc_t atype, port_pair_t pair_type, u32 *i_ipv6_address, u16 i_port, u32 *index, u32 *o_ipv4_address, u16 *o_port) | 
|  | 
      
        
          | #define MIN_STATIC_PORT_RANGE_FOR_RTSP   (9900) | 
      
 
 
      
        
          | #define PORT_PROBE_LIMIT   20 | 
      
 
 
      
        
          | #define PORTS_PER_ADDR   65536 | 
      
 
 
| Enumerator | 
|---|
| PORT_ALLOC_ANY |  | 
| PORT_ALLOC_DIRECTED |  | 
Definition at line 96 of file cnat_ports.h.
 
 
| Enumerator | 
|---|
| PORT_SINGLE |  | 
| PORT_PAIR |  | 
| PORT_S_EVEN |  | 
| PORT_S_ODD |  | 
Definition at line 82 of file cnat_ports.h.
 
 
| Enumerator | 
|---|
| PORT_TYPE_DYNAMIC |  | 
| PORT_TYPE_STATIC |  | 
| PORT_TYPE_RTSP |  | 
Definition at line 89 of file cnat_ports.h.
 
 
  
  | 
        
          | static u16 bit2port | ( | u32 | bit | ) |  |  | inlinestatic | 
 
 
      
        
          | 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_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_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 | 
        
          |  | ) |  |  |