FD.io VPP
v20.09-64-g4f7b92f0a
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 | 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 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) } |
Functions | |
u8 * | format_cnat_translation (u8 *s, va_list *args) |
u32 | cnat_translation_update (const cnat_endpoint_t *vip, ip_protocol_t ip_proto, const cnat_endpoint_tuple_t *backends, u8 flags) |
create or update a translation More... | |
void | cnat_add_translation_to_db (index_t cci, u16 port, ip_protocol_t proto, index_t cti) |
Add a translation to the bihash. More... | |
void | cnat_remove_translation_from_db (index_t cci, u16 port, ip_protocol_t proto) |
Remove a translation from the bihash. 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... | |
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 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 155 of file cnat_translation.h.
Enumerator | |
---|---|
CNAT_TRANSLATION_FLAG_ALLOCATE_PORT |
Definition at line 54 of file cnat_translation.h.
void cnat_add_translation_to_db | ( | index_t | cci, |
u16 | port, | ||
ip_protocol_t | proto, | ||
index_t | cti | ||
) |
Add a translation to the bihash.
cci | the ID of the parent client |
port | the translation port |
proto | the translation proto |
cti | the translation index to be used as value |
Definition at line 66 of file cnat_translation.c.
static_always_inline cnat_translation_t* cnat_find_translation | ( | index_t | cti, |
u16 | port, | ||
ip_protocol_t | proto | ||
) |
void cnat_remove_translation_from_db | ( | index_t | cci, |
u16 | port, | ||
ip_protocol_t | proto | ||
) |
Remove a translation from the bihash.
cci | the ID of the parent client |
port | the translation port |
proto | the translation proto |
Definition at line 82 of file cnat_translation.c.
int cnat_translation_delete | ( | u32 | id | ) |
Delete a translation.
id | the ID as returned from the create |
Definition at line 117 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 283 of file cnat_translation.c.
u32 cnat_translation_update | ( | const cnat_endpoint_t * | vip, |
ip_protocol_t | ip_proto, | ||
const 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 140 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 194 of file cnat_translation.c.
Definition at line 223 of file cnat_translation.c.
vlib_combined_counter_main_t cnat_translation_counters |
Counters for each translation.
Definition at line 31 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.