19 #include <vpp/app/version.h> 38 u32 translation_buckets = 1024;
39 u32 translation_memory_size = 128 << 20;
41 u32 b4_memory_size = 64 << 20;
80 clib_bihash_init_24_8 (&td->
in2out,
"in2out", translation_buckets,
81 translation_memory_size);
83 clib_bihash_init_8_8 (&td->
out2in,
"out2in", translation_buckets,
84 translation_memory_size);
86 clib_bihash_init_16_8 (&td->
b4_hash,
"b4s", b4_buckets, b4_memory_size);
114 dm->
is_ce = (
set != 0);
143 .fp_addr.ip4.as_u32 = 0,
154 .fp_addr.ip6.as_u64[0] = addr->as_u64[0],
155 .fp_addr.ip6.as_u64[1] = addr->as_u64[1],
186 .fp_addr.ip6.as_u64[0] = addr->as_u64[0],
187 .fp_addr.ip6.as_u64[1] = addr->as_u64[1],
199 return VNET_API_ERROR_FEATURE_DISABLED;
214 return VNET_API_ERROR_FEATURE_DISABLED;
227 .fp_addr.ip4.as_u32 = addr.
as_u32,
273 .version = VPP_BUILD_VER,
274 .description =
"Dual-Stack Lite",
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
void dslite_set_ce(dslite_main_t *dm, u8 set)
fib_protocol_t fp_proto
protocol type
enum fib_source_t_ fib_source_t
The different sources that can create a route.
void dslite_dpo_create(dpo_proto_t dproto, u32 aftr_index, dpo_id_t *dpo)
int nat_alloc_ip4_addr_and_port_cb_default(nat_ip4_pool_t *pool, u32 fib_index, u32 thread_index, u32 nat_thread_index, u16 port_per_thread, u16 protocol, nat_ip4_addr_port_t *out)
u8 * format_dslite_trace(u8 *s, va_list *args)
clib_error_t * dslite_api_hookup(vlib_main_t *vm)
ip4_address_t aftr_ip4_addr
add paths without path extensions
clib_bihash_16_8_t b4_hash
static clib_error_t * dslite_config(vlib_main_t *vm, unformat_input_t *input)
#define VLIB_INIT_FUNCTION(x)
void fib_table_entry_special_remove(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source)
Remove a 'special' entry from the FIB.
nat_alloc_ip4_addr_and_port_cb_t * alloc_addr_and_port_cb
ip6_address_t b4_ip6_addr
Aggregate type for a prefix.
void add_del_dslite_pool_addr_cb(ip4_address_t addr, u8 is_add, void *opaque)
fib_source_t fib_source_allocate(const char *name, fib_source_priority_t prio, fib_source_behaviour_t bh)
char * name
The counter collection's name.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
#define FIB_SOURCE_PRIORITY_HI
Some priority values that plugins might use when they are not to concerned where in the list they'll ...
u32 dslite_in2out_slowpath_node_index
#define VLIB_CONFIG_FUNCTION(x, n,...)
int dslite_set_b4_ip4_addr(dslite_main_t *dm, ip4_address_t *addr)
nat_add_del_ip4_pool_addr_cb_t * add_del_pool_addr_cb
void dslite_dpo_module_init(void)
ip6_address_t aftr_ip6_addr
ip4_address_t b4_ip4_addr
dslite_main_t dslite_main
vlib_main_t vlib_node_runtime_t * node
fib_node_index_t fib_table_entry_special_dpo_add(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
Add a 'special' entry to the FIB that links to the DPO passed A special entry is an entry that the FI...
void vlib_validate_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
validate a simple counter
fib_source_t nat_fib_src_hi
static void vlib_zero_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
Clear a simple counter Clears the set of per-thread u16 counters, and the u64 counter.
uword * thread_registrations_by_name
vlib_simple_counter_main_t total_b4s
dslite_per_thread_data_t * per_thread_data
int dslite_set_aftr_ip4_addr(dslite_main_t *dm, ip4_address_t *addr)
char * stat_segment_name
Name in stat segment directory.
int dslite_set_b4_ip6_addr(dslite_main_t *dm, ip6_address_t *addr)
vlib_simple_counter_main_t total_sessions
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
#define hash_get_mem(h, key)
void dslite_ce_dpo_create(dpo_proto_t dproto, u32 b4_index, dpo_id_t *dpo)
static vlib_thread_main_t * vlib_get_thread_main()
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.
#define vec_foreach(var, vec)
Vector iterator.
u8 * format_dslite_ce_trace(u8 *s, va_list *args)
clib_bihash_24_8_t in2out
static clib_error_t * dslite_init(vlib_main_t *vm)
u32 dslite_out2in_node_index
int dslite_set_aftr_ip6_addr(dslite_main_t *dm, ip6_address_t *addr)
u32 dslite_in2out_node_index