Go to the source code of this file.
|
static void | cnat_tracker_release (cnat_ep_trk_t *trk) |
|
static void | cnat_tracker_track (index_t cti, const cnat_endpoint_tuple_t *path, cnat_ep_trk_t *trk) |
|
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...
|
|
static void | cnat_translation_stack (cnat_translation_t *ct) |
|
int | cnat_translation_delete (u32 id) |
| Delete a translation. More...
|
|
u32 | cnat_translation_update (const cnat_endpoint_t *vip, ip_protocol_t proto, const cnat_endpoint_tuple_t *paths, u8 flags) |
| create or update a translation More...
|
|
void | cnat_translation_walk (cnat_translation_walk_cb_t cb, void *ctx) |
| Walk/visit each of the translations. More...
|
|
static u8 * | format_cnat_ep_trk (u8 *s, va_list *args) |
|
u8 * | format_cnat_translation (u8 *s, va_list *args) |
|
static clib_error_t * | cnat_translation_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
|
int | cnat_translation_purge (void) |
| Purge all the trahslations. More...
|
|
static fib_node_t * | cnat_translation_get_node (fib_node_index_t index) |
|
static cnat_translation_t * | cnat_translation_get_from_node (fib_node_t *node) |
|
static void | cnat_translation_last_lock_gone (fib_node_t *node) |
|
static fib_node_back_walk_rc_t | cnat_translation_back_walk_notify (fib_node_t *node, fib_node_back_walk_ctx_t *ctx) |
|
static clib_error_t * | cnat_translation_cli_add_del (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
|
static clib_error_t * | cnat_translation_init (vlib_main_t *vm) |
|
◆ cnat_add_translation_to_db()
Add a translation to the bihash.
- Parameters
-
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.
◆ cnat_remove_translation_from_db()
Remove a translation from the bihash.
- Parameters
-
cci | the ID of the parent client |
port | the translation port |
proto | the translation proto |
Definition at line 82 of file cnat_translation.c.
◆ cnat_tracker_release()
◆ cnat_tracker_track()
◆ cnat_translation_back_walk_notify()
◆ cnat_translation_cli_add_del()
◆ cnat_translation_delete()
int cnat_translation_delete |
( |
u32 |
id | ) |
|
Delete a translation.
- Parameters
-
id | the ID as returned from the create |
Definition at line 117 of file cnat_translation.c.
◆ cnat_translation_get_from_node()
◆ cnat_translation_get_node()
◆ cnat_translation_init()
◆ cnat_translation_last_lock_gone()
static void cnat_translation_last_lock_gone |
( |
fib_node_t * |
node | ) |
|
|
static |
◆ cnat_translation_purge()
int cnat_translation_purge |
( |
void |
| ) |
|
◆ cnat_translation_show()
◆ cnat_translation_stack()
◆ cnat_translation_update()
create or update a translation
- Parameters
-
vip | The Virtual Endpoint |
ip_proto | The ip protocol to translate |
backends | the backends to choose from |
- Returns
- the ID of the translation. used to delete and gather stats
Definition at line 140 of file cnat_translation.c.
◆ cnat_translation_walk()
◆ format_cnat_ep_trk()
static u8* format_cnat_ep_trk |
( |
u8 * |
s, |
|
|
va_list * |
args |
|
) |
| |
|
static |
◆ format_cnat_translation()
u8* format_cnat_translation |
( |
u8 * |
s, |
|
|
va_list * |
args |
|
) |
| |
◆ cnat_translation_cli_add_del_command
Initial value:=
{
.path = "cnat translation",
.short_help = "cnat translation [add|del] proto [TCP|UDP] [vip|real] [ip] [port] [to [ip] [port]->[ip] [port]]",
}
static clib_error_t * cnat_translation_cli_add_del(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
(constructor) VLIB_CLI_COMMAND (cnat_translation_cli_add_del_command)
Definition at line 402 of file cnat_translation.c.
◆ cnat_translation_counters
Initial value:= {
.name = "cnat-translation",
.stat_segment_name = "/net/cnat-translation",
}
Counters for each translation.
Definition at line 31 of file cnat_translation.c.
◆ cnat_translation_db
clib_bihash_8_8_t cnat_translation_db |
◆ cnat_translation_fib_node_type
◆ cnat_translation_pool
◆ cnat_translation_show_cmd_node
Initial value:= {
.path = "show cnat translation",
.short_help = "show cnat translation <VIP>",
.is_mp_safe = 1,
}
static clib_error_t * cnat_translation_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
(constructor) VLIB_CLI_COMMAND (cnat_translation_show_cmd_node)
Definition at line 305 of file cnat_translation.c.
◆ cnat_translation_vft
Initial value:= {
}
static fib_node_back_walk_rc_t cnat_translation_back_walk_notify(fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
static void cnat_translation_last_lock_gone(fib_node_t *node)
static fib_node_t * cnat_translation_get_node(fib_node_index_t index)
Definition at line 353 of file cnat_translation.c.