FD.io VPP
v21.01.1
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... | |
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 } |
Functions | |
u8 * | format_cnat_translation (u8 *s, va_list *args) |
u32 | cnat_translation_update (cnat_endpoint_t *vip, ip_protocol_t ip_proto, cnat_endpoint_tuple_t *backends, u8 flags) |
create or update a translation More... | |
int | cnat_translation_delete (u32 id) |
Delete a translation. More... | |
void | cnat_translation_walk (cnat_translation_walk_cb_t cb, void *ctx) |
Walk/visit each of the translations. More... | |
int | cnat_translation_purge (void) |
Purge all the trahslations. More... | |
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. More... | |
void | cnat_translation_unwatch_addr (u32 cti, cnat_addr_resol_type_t type) |
Cleanup matching addr resolution requests. More... | |
static_always_inline cnat_translation_t * | cnat_translation_get (index_t cti) |
static_always_inline cnat_translation_t * | cnat_find_translation (index_t cti, u16 port, ip_protocol_t proto) |
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 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 182 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 69 of file cnat_translation.h.
Enumerator | |
---|---|
CNAT_TRANSLATION_FLAG_ALLOCATE_PORT | |
CNAT_TRANSLATION_STACKED |
Definition at line 59 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 205 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 400 of file cnat_translation.c.
void cnat_translation_unwatch_addr | ( | u32 | cti, |
cnat_addr_resol_type_t | type | ||
) |
Cleanup matching addr resolution requests.
Definition at line 66 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 | ||
) |
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 228 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 311 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 42 of file cnat_translation.c.
Definition at line 340 of file cnat_translation.c.
vlib_combined_counter_main_t cnat_translation_counters |
Counters for each translation.
Definition at line 36 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.