24 #define cnat_error(n,s) s, 39 ip6_address_t *
ip6 = 0;
98 else if (
unformat (input,
"%d", &port))
199 else if (
unformat (input,
"session-db-memory %U",
202 else if (
unformat (input,
"translation-db-buckets %u",
205 else if (
unformat (input,
"translation-db-memory %U",
210 else if (
unformat (input,
"snat-db-memory %U",
213 else if (
unformat (input,
"session-cleanup-timeout %f",
216 else if (
unformat (input,
"scanner off"))
218 else if (
unformat (input,
"scanner on"))
enum fib_source_t_ fib_source_t
The different sources that can create a route.
#define CNAT_DEFAULT_TRANSLATION_MEMORY
enum cnat_scanner_cmd_t_ cnat_scanner_cmd_t
void ip_address_set(ip_address_t *dst, const void *src, u8 version)
vnet_main_t * vnet_get_main(void)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
ip4_address_t * ip4_interface_first_address(ip4_main_t *im, u32 sw_if_index, ip_interface_address_t **result_ia)
add paths without path extensions
void throttle_init(throttle_t *t, u32 n_threads, f64 time)
ip6_address_t * ip6_interface_first_address(ip6_main_t *im, u32 sw_if_index)
get first IPv6 interface address
unformat_function_t unformat_vnet_sw_interface
format_function_t format_vnet_sw_if_index_name
uword unformat_cnat_ep(unformat_input_t *input, va_list *args)
#define VLIB_INIT_FUNCTION(x)
description fragment has unexpected format
cnat_main_t * cnat_get_main()
#define clib_error_return(e, args...)
#define CNAT_DEFAULT_SESSION_MAX_AGE
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)
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
fib_source_t cnat_fib_source
cnat_timestamp_t * cnat_timestamps
u8 * format_cnat_endpoint(u8 *s, va_list *args)
#define CNAT_FIB_SOURCE_PRIORITY
static clib_error_t * cnat_config(vlib_main_t *vm, unformat_input_t *input)
uword unformat_ip_address(unformat_input_t *input, va_list *args)
u8 * format_ip_address_family(u8 *s, va_list *args)
A throttle Used in the data plane to decide if a given hash should be throttled, i.e.
vlib_thread_main_t vlib_thread_main
void cnat_enable_disable_scanner(cnat_scanner_cmd_t event_type)
Enable/Disable session cleanup.
#define VLIB_EARLY_CONFIG_FUNCTION(x, n,...)
#define CNAT_DEFAULT_TCP_MAX_AGE
u8 * format_ip_address(u8 *s, va_list *args)
#define CNAT_DEFAULT_SNAT_MEMORY
#define CNAT_DEFAULT_SNAT_BUCKETS
ip_address_family_t version
uword session_hash_memory
u8 cnat_resolve_addr(u32 sw_if_index, ip_address_family_t af, ip_address_t *addr)
#define CNAT_DEFAULT_SESSION_BUCKETS
static vlib_main_t * vlib_get_main(void)
enum ip_address_family_t_ ip_address_family_t
u32 translation_hash_buckets
#define CNAT_DEFAULT_TRANSLATION_BUCKETS
#define CNAT_DEFAULT_SESSION_MEMORY
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
uword unformat_cnat_ep_tuple(unformat_input_t *input, va_list *args)
uword translation_hash_memory
ip4_main_t ip4_main
Global ip4 main structure.
static clib_error_t * cnat_types_init(vlib_main_t *vm)
char * cnat_error_strings[]
u8 cnat_resolve_ep(cnat_endpoint_t *ep)
Resolve endpoint address.
void cnat_lazy_init()
Lazy initialization when first adding a translation or using snat.
vl_api_interface_index_t sw_if_index
#define CNAT_DEFAULT_SCANNER_TIMEOUT