Go to the source code of this file.
|
| VNET_IP4_UNICAST_FEATURE_INIT (ip4_snat_in2out, static) |
|
| VNET_IP4_UNICAST_FEATURE_INIT (ip4_snat_out2in, static) |
|
clib_error_t * | vlib_plugin_register (vlib_main_t *vm, vnet_plugin_handoff_t *h, int from_early_init) |
|
void | snat_add_address (snat_main_t *sm, ip4_address_t *addr) |
|
static void | increment_v4_address (ip4_address_t *a) |
|
static void | vl_api_snat_add_address_range_t_handler (vl_api_snat_add_address_range_t *mp) |
|
static void * | vl_api_snat_add_address_range_t_print (vl_api_snat_add_address_range_t *mp, void *handle) |
|
static void | vl_api_snat_interface_add_del_feature_t_handler (vl_api_snat_interface_add_del_feature_t *mp) |
|
static void * | vl_api_snat_interface_add_del_feature_t_print (vl_api_snat_interface_add_del_feature_t *mp, void *handle) |
|
static clib_error_t * | snat_plugin_api_hookup (vlib_main_t *vm) |
|
static void | plugin_custom_dump_configure (snat_main_t *sm) |
|
static clib_error_t * | snat_init (vlib_main_t *vm) |
|
void | snat_free_outside_address_and_port (snat_main_t *sm, snat_session_key_t *k, u32 address_index) |
|
int | snat_alloc_outside_address_and_port (snat_main_t *sm, snat_session_key_t *k, u32 *address_indexp) |
|
static clib_error_t * | add_address_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
|
static clib_error_t * | snat_feature_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
|
static clib_error_t * | snat_config (vlib_main_t *vm, unformat_input_t *input) |
|
u8 * | format_snat_key (u8 *s, va_list *args) |
|
u8 * | format_snat_session (u8 *s, va_list *args) |
|
u8 * | format_snat_user (u8 *s, va_list *args) |
|
static clib_error_t * | show_snat_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
|
#define BAD_RX_SW_IF_INDEX_LABEL |
Value:do { \
bad_rx_sw_if_index: \
; \
} while (0);
Definition at line 142 of file snat.c.
#define BAD_SW_IF_INDEX_LABEL |
Value:do { \
bad_sw_if_index: \
; \
} while (0);
Definition at line 126 of file snat.c.
#define BAD_TX_SW_IF_INDEX_LABEL |
Value:do { \
bad_tx_sw_if_index: \
; \
} while (0);
Definition at line 158 of file snat.c.
Value: return handle;
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
#define vec_free(V)
Free vector's memory (no header).
#define vl_print(handle,...)
Definition at line 50 of file snat.c.
#define foreach_snat_plugin_api_msg |
Value:_(SNAT_ADD_ADDRESS_RANGE, snat_add_address_range) \
_(SNAT_INTERFACE_ADD_DEL_FEATURE, snat_interface_add_del_feature)
Definition at line 300 of file snat.c.
Value: if (!q) \
return; \
\
rmp->_vl_msg_id = ntohs((t)+sm->msg_id_base); \
rmp->context = mp->context; \
rmp->retval = ntohl(rv);
\} while(0);
void vl_msg_api_send_shmem(unix_shared_memory_queue_t *q, u8 *elem)
unix_shared_memory_queue_t * vl_api_client_index_to_input_queue(u32 index)
void * vl_msg_api_alloc(int nbytes)
struct _unix_shared_memory_queue unix_shared_memory_queue_t
Definition at line 64 of file snat.c.
#define VALIDATE_RX_SW_IF_INDEX |
( |
|
mp | ) |
|
Value:do {
u32 __rx_sw_if_index = ntohl(mp->rx_sw_if_index);
\ __rx_sw_if_index)) { \
rv = VNET_API_ERROR_INVALID_SW_IF_INDEX; \
goto bad_rx_sw_if_index; \
} \
} while(0);
vnet_main_t * vnet_get_main(void)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
struct vnet_main_t vnet_main_t
Definition at line 132 of file snat.c.
#define VALIDATE_SW_IF_INDEX |
( |
|
mp | ) |
|
Value:do {
u32 __sw_if_index = ntohl(mp->sw_if_index);
\ __sw_if_index)) { \
rv = VNET_API_ERROR_INVALID_SW_IF_INDEX; \
goto bad_sw_if_index; \
} \
} while(0);
vnet_main_t * vnet_get_main(void)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
struct vnet_main_t vnet_main_t
Definition at line 116 of file snat.c.
#define VALIDATE_TX_SW_IF_INDEX |
( |
|
mp | ) |
|
Value:do {
u32 __tx_sw_if_index = ntohl(mp->tx_sw_if_index);
\ __tx_sw_if_index)) { \
rv = VNET_API_ERROR_INVALID_SW_IF_INDEX; \
goto bad_tx_sw_if_index; \
} \
} while(0);
vnet_main_t * vnet_get_main(void)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
struct vnet_main_t vnet_main_t
Definition at line 148 of file snat.c.
#define vl_api_version |
( |
|
n, |
|
|
|
v |
|
) |
| static u32 api_version=(v); |
u8* format_snat_key |
( |
u8 * |
s, |
|
|
va_list * |
args |
|
) |
| |
u8* format_snat_session |
( |
u8 * |
s, |
|
|
va_list * |
args |
|
) |
| |
u8* format_snat_user |
( |
u8 * |
s, |
|
|
va_list * |
args |
|
) |
| |
static void plugin_custom_dump_configure |
( |
snat_main_t * |
sm | ) |
|
|
static |
VNET_IP4_UNICAST_FEATURE_INIT |
( |
ip4_snat_in2out |
, |
|
|
static |
|
|
) |
| |
VNET_IP4_UNICAST_FEATURE_INIT |
( |
ip4_snat_out2in |
, |
|
|
static |
|
|
) |
| |
Initial value:= {
.path = "snat add address",
.short_help = "snat add addresses <ip4-range-start> [- <ip4-range-end>]",
}
static clib_error_t * add_address_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
(constructor) VLIB_CLI_COMMAND (add_address_command)
Definition at line 459 of file snat.c.
Initial value:= {
.path = "set interface snat",
.short_help = "set interface snat in <intfc> out <intfc> [del]",
}
static clib_error_t * snat_feature_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
(constructor) VLIB_CLI_COMMAND (set_interface_snat_command)
Definition at line 545 of file snat.c.
Initial value:= {
.path = "show snat",
.short_help = "show snat",
}
static clib_error_t * show_snat_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
(constructor) VLIB_CLI_COMMAND (show_snat_command)
Definition at line 712 of file snat.c.