|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
23 #define cnat_error(n,s) s,
38 ip6_address_t *
ip6 = 0;
86 vnm, &
a->ce_sw_if_index, &
port))
89 vnm, &
a->ce_sw_if_index))
92 vnm, &
a->ce_sw_if_index, &
port))
95 vnm, &
a->ce_sw_if_index))
108 int *
a = va_arg (*args,
int *);
179 if (
cm->lazy_init_done)
182 cm->lazy_init_done = 1;
202 cm->lazy_init_done = 0;
207 (input,
"session-db-buckets %u", &
cm->session_hash_buckets))
209 else if (
unformat (input,
"session-db-memory %U",
212 else if (
unformat (input,
"translation-db-buckets %u",
213 &
cm->translation_hash_buckets))
215 else if (
unformat (input,
"translation-db-memory %U",
218 else if (
unformat (input,
"snat-db-buckets %u", &
cm->snat_hash_buckets))
220 else if (
unformat (input,
"snat-if-map-len %u", &
cm->snat_if_map_length))
222 else if (
unformat (input,
"snat-db-memory %U",
225 else if (
unformat (input,
"session-cleanup-timeout %f",
226 &
cm->scanner_timeout))
228 else if (
unformat (input,
"scanner off"))
230 else if (
unformat (input,
"scanner on"))
232 else if (
unformat (input,
"session-max-age %u", &
cm->session_max_age))
234 else if (
unformat (input,
"tcp-max-age %u", &
cm->tcp_max_age))
236 else if (
unformat (input,
"maglev-len %u", &
cm->maglev_len))
#define CNAT_FIB_SOURCE_PRIORITY
#define CNAT_DEFAULT_SESSION_BUCKETS
u8 cnat_resolve_ep(cnat_endpoint_t *ep)
Resolve endpoint address.
ip4_main_t ip4_main
Global ip4 main structure.
#define clib_error_return(e, args...)
char * cnat_error_strings[]
#define CNAT_DEFAULT_SNAT_MEMORY
cnat_main_t * cnat_get_main()
cnat_timestamp_t * cnat_timestamps
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
#define CNAT_DEFAULT_SESSION_MAX_AGE
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
#define VLIB_EARLY_CONFIG_FUNCTION(x, n,...)
uword unformat_ip_address(unformat_input_t *input, va_list *args)
#define CNAT_DEFAULT_SNAT_IF_MAP_LEN
uword unformat_cnat_ep_tuple(unformat_input_t *input, va_list *args)
u8 * format_ip_address_family(u8 *s, va_list *args)
ip_address_family_t version
vnet_main_t * vnet_get_main(void)
#define CNAT_DEFAULT_TCP_MAX_AGE
u8 * format_ip_address(u8 *s, va_list *args)
#define CNAT_DEFAULT_TRANSLATION_MEMORY
#define CNAT_DEFAULT_TRANSLATION_BUCKETS
vnet_feature_config_main_t * cm
void ip_address_set(ip_address_t *dst, const void *src, ip_address_family_t af)
fib_source_t fib_source_allocate(const char *name, fib_source_priority_t prio, fib_source_behaviour_t bh)
static void clib_rwlock_init(clib_rwlock_t *p)
ip6_address_t * ip6_interface_first_address(ip6_main_t *im, u32 sw_if_index)
get first IPv6 interface address
format_function_t format_vnet_sw_if_index_name
unformat_function_t unformat_vnet_sw_interface
description fragment has unexpected format
static clib_error_t * cnat_types_init(vlib_main_t *vm)
fib_source_t cnat_fib_source
#define VLIB_INIT_FUNCTION(x)
vl_api_address_family_t af
void cnat_lazy_init()
Lazy initialization when first adding a translation or using snat.
uword unformat_cnat_ep_flags(unformat_input_t *input, va_list *args)
enum cnat_scanner_cmd_t_ cnat_scanner_cmd_t
#define CNAT_DEFAULT_SCANNER_TIMEOUT
void cnat_enable_disable_scanner(cnat_scanner_cmd_t event_type)
Enable/Disable session cleanup.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
u8 * format_cnat_endpoint(u8 *s, va_list *args)
static clib_error_t * cnat_config(vlib_main_t *vm, unformat_input_t *input)
static vlib_main_t * vlib_get_main(void)
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
@ FIB_SOURCE_BH_SIMPLE
add paths without path extensions
u8 cnat_resolve_addr(u32 sw_if_index, ip_address_family_t af, ip_address_t *addr)
enum fib_source_t_ fib_source_t
The different sources that can create a route.
ip4_address_t * ip4_interface_first_address(ip4_main_t *im, u32 sw_if_index, ip_interface_address_t **result_ia)
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
#define CNAT_DEFAULT_MAGLEV_LEN
#define CNAT_DEFAULT_SESSION_MEMORY
vl_api_interface_index_t sw_if_index
#define CNAT_DEFAULT_SNAT_BUCKETS
uword unformat_cnat_ep(unformat_input_t *input, va_list *args)
enum ip_address_family_t_ ip_address_family_t