FD.io VPP  v21.01.1
Vector Packet Processing
cnat_src_policy.h File Reference
+ Include dependency graph for cnat_src_policy.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cnat_src_port_allocator_
 
struct  cnat_src_policy_main_
 

Typedefs

typedef enum cnat_source_policy_errors_ cnat_source_policy_errors_t
 
typedef struct cnat_src_port_allocator_ cnat_src_port_allocator_t
 
typedef cnat_source_policy_errors_t(* cnat_vip_source_policy_t) (vlib_main_t *vm, vlib_buffer_t *b, cnat_session_t *session, u32 *rsession_flags, const cnat_translation_t *ct, cnat_node_ctx_t *ctx)
 
typedef struct cnat_src_policy_main_ cnat_src_policy_main_t
 

Enumerations

enum  cnat_sport_proto_t {
  CNAT_SPORT_PROTO_TCP, CNAT_SPORT_PROTO_UDP, CNAT_SPORT_PROTO_ICMP, CNAT_SPORT_PROTO_ICMP6,
  CNAT_N_SPORT_PROTO
}
 
enum  cnat_source_policy_errors_ { CNAT_SOURCE_ERROR_EXHAUSTED_PORTS = 1, CNAT_SOURCE_ERROR_USE_DEFAULT = 2 }
 

Functions

void cnat_register_vip_src_policy (cnat_vip_source_policy_t fp)
 
int cnat_allocate_port (u16 *port, ip_protocol_t iproto)
 
void cnat_free_port (u16 port, ip_protocol_t iproto)
 

Variables

cnat_src_policy_main_t cnat_src_policy_main
 

Typedef Documentation

◆ cnat_source_policy_errors_t

◆ cnat_src_policy_main_t

◆ cnat_src_port_allocator_t

◆ cnat_vip_source_policy_t

typedef cnat_source_policy_errors_t(* cnat_vip_source_policy_t) (vlib_main_t *vm, vlib_buffer_t *b, cnat_session_t *session, u32 *rsession_flags, const cnat_translation_t *ct, cnat_node_ctx_t *ctx)

Definition at line 50 of file cnat_src_policy.h.

Enumeration Type Documentation

◆ cnat_source_policy_errors_

Enumerator
CNAT_SOURCE_ERROR_EXHAUSTED_PORTS 
CNAT_SOURCE_ERROR_USE_DEFAULT 

Definition at line 33 of file cnat_src_policy.h.

◆ cnat_sport_proto_t

Enumerator
CNAT_SPORT_PROTO_TCP 
CNAT_SPORT_PROTO_UDP 
CNAT_SPORT_PROTO_ICMP 
CNAT_SPORT_PROTO_ICMP6 
CNAT_N_SPORT_PROTO 

Definition at line 24 of file cnat_src_policy.h.

Function Documentation

◆ cnat_allocate_port()

int cnat_allocate_port ( u16 port,
ip_protocol_t  iproto 
)

Definition at line 109 of file cnat_src_policy.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cnat_free_port()

void cnat_free_port ( u16  port,
ip_protocol_t  iproto 
)

Definition at line 97 of file cnat_src_policy.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cnat_register_vip_src_policy()

void cnat_register_vip_src_policy ( cnat_vip_source_policy_t  fp)

Definition at line 25 of file cnat_src_policy.c.

Variable Documentation

◆ cnat_src_policy_main

cnat_src_policy_main_t cnat_src_policy_main

Definition at line 22 of file cnat_src_policy.c.