FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the source code of this file.
Data Structures | |
struct | cnat_ep_trk_t_ |
Data used to track an EP in the FIB. More... | |
struct | addr_resolution_t_ |
Entry used to account for a translation's backend waiting for address resolution. More... | |
struct | cnat_translation_t_ |
A Translation represents the translation of a VEP to one of a set of real server addresses. More... | |
Typedefs | |
typedef struct cnat_ep_trk_t_ | cnat_ep_trk_t |
Data used to track an EP in the FIB. More... | |
typedef enum cnat_translation_flag_t_ | cnat_translation_flag_t |
typedef struct addr_resolution_t_ | addr_resolution_t |
Entry used to account for a translation's backend waiting for address resolution. More... | |
typedef struct cnat_translation_t_ | cnat_translation_t |
A Translation represents the translation of a VEP to one of a set of real server addresses. More... | |
typedef walk_rc_t(* | cnat_translation_walk_cb_t) (index_t index, void *ctx) |
Callback function invoked during a walk of all translations. More... | |
typedef void(* | cnat_if_addr_add_cb_t) (addr_resolution_t *ar, ip_address_t *address, u8 is_del) |
Register a call back for endpoint->address resolution. More... | |
Enumerations | |
enum | cnat_translation_flag_t_ { CNAT_TRANSLATION_FLAG_ALLOCATE_PORT = (1 << 0), CNAT_TRANSLATION_STACKED = (1 << 1) } |
enum | cnat_addr_resol_type_t { CNAT_RESOLV_ADDR_ANY, CNAT_RESOLV_ADDR_BACKEND, CNAT_RESOLV_ADDR_SNAT, CNAT_RESOLV_ADDR_TRANSLATION, CNAT_ADDR_N_RESOLUTIONS } |
enum | cnat_lb_type_t { CNAT_LB_DEFAULT, CNAT_LB_MAGLEV } |
Variables | |
vlib_combined_counter_main_t | cnat_translation_counters |
Counters for each translation. More... | |
cnat_translation_t * | cnat_translation_pool |
clib_bihash_8_8_t | cnat_translation_db |
typedef struct addr_resolution_t_ addr_resolution_t |
Entry used to account for a translation's backend waiting for address resolution.
typedef struct cnat_ep_trk_t_ cnat_ep_trk_t |
Data used to track an EP in the FIB.
typedef void(* cnat_if_addr_add_cb_t) (addr_resolution_t *ar, ip_address_t *address, u8 is_del) |
Register a call back for endpoint->address resolution.
Definition at line 232 of file cnat_translation.h.
typedef enum cnat_translation_flag_t_ cnat_translation_flag_t |
typedef struct cnat_translation_t_ cnat_translation_t |
A Translation represents the translation of a VEP to one of a set of real server addresses.
Callback function invoked during a walk of all translations.
Definition at line 204 of file cnat_translation.h.
Enumerator | |
---|---|
CNAT_RESOLV_ADDR_ANY | |
CNAT_RESOLV_ADDR_BACKEND | |
CNAT_RESOLV_ADDR_SNAT | |
CNAT_RESOLV_ADDR_TRANSLATION | |
CNAT_ADDR_N_RESOLUTIONS |
Definition at line 70 of file cnat_translation.h.
enum cnat_lb_type_t |
Enumerator | |
---|---|
CNAT_LB_DEFAULT | |
CNAT_LB_MAGLEV |
Definition at line 79 of file cnat_translation.h.
Enumerator | |
---|---|
CNAT_TRANSLATION_FLAG_ALLOCATE_PORT | |
CNAT_TRANSLATION_STACKED |
Definition at line 60 of file cnat_translation.h.
static_always_inline cnat_translation_t* cnat_find_translation | ( | index_t | cti, |
u16 | port, | ||
ip_protocol_t | proto | ||
) |
int cnat_translation_delete | ( | u32 | id | ) |
Delete a translation.
id | the ID as returned from the create |
Definition at line 342 of file cnat_translation.c.
static_always_inline cnat_translation_t* cnat_translation_get | ( | index_t | cti | ) |
int cnat_translation_purge | ( | void | ) |
Purge all the trahslations.
Definition at line 557 of file cnat_translation.c.
void cnat_translation_register_addr_add_cb | ( | cnat_addr_resol_type_t | typ, |
cnat_if_addr_add_cb_t | fn | ||
) |
void cnat_translation_unwatch_addr | ( | u32 | cti, |
cnat_addr_resol_type_t | type | ||
) |
Cleanup matching addr resolution requests.
Definition at line 63 of file cnat_translation.c.
u32 cnat_translation_update | ( | cnat_endpoint_t * | vip, |
ip_protocol_t | ip_proto, | ||
cnat_endpoint_tuple_t * | backends, | ||
u8 | flags, | ||
cnat_lb_type_t | lb_type | ||
) |
create or update a translation
vip | The Virtual Endpoint |
ip_proto | The ip protocol to translate |
backends | the backends to choose from |
Definition at line 366 of file cnat_translation.c.
void cnat_translation_walk | ( | cnat_translation_walk_cb_t | cb, |
void * | ctx | ||
) |
Walk/visit each of the translations.
Definition at line 451 of file cnat_translation.c.
void cnat_translation_watch_addr | ( | index_t | cti, |
u64 | opaque, | ||
cnat_endpoint_t * | ep, | ||
cnat_addr_resol_type_t | type | ||
) |
Add an address resolution request.
Definition at line 39 of file cnat_translation.c.
Definition at line 478 of file cnat_translation.c.
vlib_combined_counter_main_t cnat_translation_counters |
Counters for each translation.
Definition at line 33 of file cnat_translation.c.
clib_bihash_8_8_t cnat_translation_db |
Definition at line 27 of file cnat_translation.c.
cnat_translation_t* cnat_translation_pool |
Definition at line 26 of file cnat_translation.c.