FD.io VPP
v16.12-rc0-308-g931be3a
Vector Packet Processing
|
Go to the source code of this file.
Macros | |
#define | vl_typedefs |
#define | vl_endianfun |
#define | vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) |
#define | vl_api_version(n, v) static u32 api_version=(v); |
#define | FINISH |
#define | REPLY_MACRO(t) |
#define | REPLY_MACRO2(t, body) |
#define | VALIDATE_SW_IF_INDEX(mp) |
#define | BAD_SW_IF_INDEX_LABEL |
#define | VALIDATE_RX_SW_IF_INDEX(mp) |
#define | BAD_RX_SW_IF_INDEX_LABEL |
#define | VALIDATE_TX_SW_IF_INDEX(mp) |
#define | BAD_TX_SW_IF_INDEX_LABEL |
#define | foreach_snat_plugin_api_msg |
Variables | |
snat_main_t | snat_main |
static vlib_cli_command_t | add_address_command |
(constructor) VLIB_CLI_COMMAND (add_address_command) More... | |
static vlib_cli_command_t | set_interface_snat_command |
(constructor) VLIB_CLI_COMMAND (set_interface_snat_command) More... | |
static vlib_cli_command_t | add_static_mapping_command |
(constructor) VLIB_CLI_COMMAND (add_static_mapping_command) More... | |
static vlib_cli_command_t | show_snat_command |
(constructor) VLIB_CLI_COMMAND (show_snat_command) More... | |
#define BAD_RX_SW_IF_INDEX_LABEL |
#define BAD_SW_IF_INDEX_LABEL |
#define BAD_TX_SW_IF_INDEX_LABEL |
#define FINISH |
#define foreach_snat_plugin_api_msg |
#define REPLY_MACRO | ( | t | ) |
#define REPLY_MACRO2 | ( | t, | |
body | |||
) |
#define VALIDATE_RX_SW_IF_INDEX | ( | mp | ) |
#define VALIDATE_SW_IF_INDEX | ( | mp | ) |
#define VALIDATE_TX_SW_IF_INDEX | ( | mp | ) |
#define vl_print | ( | handle, | |
... | |||
) | vlib_cli_output (handle, __VA_ARGS__) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
void snat_add_address | ( | snat_main_t * | sm, |
ip4_address_t * | addr | ||
) |
int snat_add_static_mapping | ( | ip4_address_t | l_addr, |
ip4_address_t | e_addr, | ||
u16 | l_port, | ||
u16 | e_port, | ||
u32 | vrf_id, | ||
int | addr_only, | ||
int | is_add | ||
) |
Add static mapping.
Create static mapping between local addr+port and external addr+port.
l_addr | Local IPv4 address. |
e_addr | External IPv4 address. |
l_port | Local port number. |
e_port | External port number. |
vrf_id | VRF ID. |
addr_only | If 0 address port and pair mapping, otherwise address only. |
is_add | If 0 delete static mapping, otherwise add. |
Definition at line 318 of file snat.c.
int snat_alloc_outside_address_and_port | ( | snat_main_t * | sm, |
snat_session_key_t * | k, | ||
u32 * | address_indexp | ||
) |
|
static |
int snat_del_address | ( | snat_main_t * | sm, |
ip4_address_t | addr | ||
) |
|
static |
void snat_free_outside_address_and_port | ( | snat_main_t * | sm, |
snat_session_key_t * | k, | ||
u32 | address_index | ||
) |
|
static |
|
static |
int snat_static_mapping_match | ( | snat_main_t * | sm, |
snat_session_key_t | match, | ||
snat_session_key_t * | mapping, | ||
u8 | by_external | ||
) |
Match SNAT static mapping.
sm | SNAT main. |
match | Address and port to match. |
mapping | External or local address and port of the matched mapping. |
by_external | If 0 match by local address otherwise match by external address. |
Definition at line 1039 of file snat.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
clib_error_t* vlib_plugin_register | ( | vlib_main_t * | vm, |
vnet_plugin_handoff_t * | h, | ||
int | from_early_init | ||
) |
VNET_IP4_UNICAST_FEATURE_INIT | ( | ip4_snat_in2out | , |
static | |||
) |
VNET_IP4_UNICAST_FEATURE_INIT | ( | ip4_snat_out2in | , |
static | |||
) |
VNET_IP4_UNICAST_FEATURE_INIT | ( | ip4_snat_in2out_fast | , |
static | |||
) |
VNET_IP4_UNICAST_FEATURE_INIT | ( | ip4_snat_out2in_fast | , |
static | |||
) |
|
static |
(constructor) VLIB_CLI_COMMAND (add_address_command)
|
static |
(constructor) VLIB_CLI_COMMAND (add_static_mapping_command)
|
static |
(constructor) VLIB_CLI_COMMAND (set_interface_snat_command)
|
static |
(constructor) VLIB_CLI_COMMAND (show_snat_command)
snat_main_t snat_main |