FD.io VPP  v19.01.3-6-g70449b9b9
Vector Packet Processing
dslite.h File Reference
+ Include dependency graph for dslite.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dslite_session_key_t
 
struct  dslite_b4_t
 
struct  dslite_per_thread_data_t
 
struct  dslite_main_t
 
struct  dslite_trace_t
 
struct  dslite_ce_trace_t
 

Macros

#define foreach_dslite_error
 

Enumerations

enum  dslite_error_t { DSLITE_N_ERROR }
 

Functions

typedef CLIB_PACKED (struct { snat_session_key_t out2in;dslite_session_key_t in2out;u32 per_b4_index;u32 per_b4_list_head_index;f64 last_heard;u64 total_bytes;u32 total_pkts;}) dslite_session_t
 
void dslite_init (vlib_main_t *vm)
 
void dslite_set_ce (dslite_main_t *dm, u8 set)
 
int dslite_set_aftr_ip6_addr (dslite_main_t *dm, ip6_address_t *addr)
 
int dslite_set_b4_ip6_addr (dslite_main_t *dm, ip6_address_t *addr)
 
int dslite_set_aftr_ip4_addr (dslite_main_t *dm, ip4_address_t *addr)
 
int dslite_set_b4_ip4_addr (dslite_main_t *dm, ip4_address_t *addr)
 
int dslite_add_del_pool_addr (dslite_main_t *dm, ip4_address_t *addr, u8 is_add)
 
u8format_dslite_trace (u8 *s, va_list *args)
 
u8format_dslite_ce_trace (u8 *s, va_list *args)
 

Variables

dslite_main_t dslite_main
 
vlib_node_registration_t dslite_in2out_node
 (constructor) VLIB_REGISTER_NODE (dslite_in2out_node) More...
 
vlib_node_registration_t dslite_in2out_slowpath_node
 (constructor) VLIB_REGISTER_NODE (dslite_in2out_slowpath_node) More...
 
vlib_node_registration_t dslite_out2in_node
 (constructor) VLIB_REGISTER_NODE (dslite_out2in_node) More...
 
vlib_node_registration_t dslite_ce_encap_node
 (constructor) VLIB_REGISTER_NODE (dslite_ce_encap_node) More...
 
vlib_node_registration_t dslite_ce_decap_node
 (constructor) VLIB_REGISTER_NODE (dslite_ce_decap_node) More...
 

Macro Definition Documentation

◆ foreach_dslite_error

#define foreach_dslite_error
Value:
_(IN2OUT, "valid in2out DS-Lite packets") \
_(OUT2IN, "valid out2in DS-Lite packets") \
_(CE_ENCAP, "valid CE encap DS-Lite packets") \
_(CE_DECAP, "valid CE decap DS-Lite packets") \
_(NO_TRANSLATION, "no translation") \
_(BAD_IP6_PROTOCOL, "bad ip6 protocol") \
_(OUT_OF_PORTS, "out of ports") \
_(UNSUPPORTED_PROTOCOL, "unsupported protocol") \
_(BAD_ICMP_TYPE, "unsupported icmp type") \
_(UNKNOWN, "unknown")

Definition at line 110 of file dslite.h.

Enumeration Type Documentation

◆ dslite_error_t

Enumerator
DSLITE_N_ERROR 

Definition at line 122 of file dslite.h.

Function Documentation

◆ CLIB_PACKED()

typedef CLIB_PACKED ( struct { snat_session_key_t out2in;dslite_session_key_t in2out;u32 per_b4_index;u32 per_b4_list_head_index;f64 last_heard;u64 total_bytes;u32 total_pkts;}  )

◆ dslite_add_del_pool_addr()

int dslite_add_del_pool_addr ( dslite_main_t dm,
ip4_address_t addr,
u8  is_add 
)

Definition at line 178 of file dslite.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dslite_init()

void dslite_init ( vlib_main_t vm)

Definition at line 22 of file dslite.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dslite_set_aftr_ip4_addr()

int dslite_set_aftr_ip4_addr ( dslite_main_t dm,
ip4_address_t addr 
)

Definition at line 126 of file dslite.c.

+ Here is the caller graph for this function:

◆ dslite_set_aftr_ip6_addr()

int dslite_set_aftr_ip6_addr ( dslite_main_t dm,
ip6_address_t addr 
)

Definition at line 90 of file dslite.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dslite_set_b4_ip4_addr()

int dslite_set_b4_ip4_addr ( dslite_main_t dm,
ip4_address_t addr 
)

Definition at line 163 of file dslite.c.

+ Here is the caller graph for this function:

◆ dslite_set_b4_ip6_addr()

int dslite_set_b4_ip6_addr ( dslite_main_t dm,
ip6_address_t addr 
)

Definition at line 133 of file dslite.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dslite_set_ce()

void dslite_set_ce ( dslite_main_t dm,
u8  set 
)

Definition at line 84 of file dslite.c.

+ Here is the caller graph for this function:

◆ format_dslite_ce_trace()

u8* format_dslite_ce_trace ( u8 s,
va_list *  args 
)

Definition at line 244 of file dslite.c.

+ Here is the call graph for this function:

◆ format_dslite_trace()

u8* format_dslite_trace ( u8 s,
va_list *  args 
)

Definition at line 231 of file dslite.c.

+ Here is the call graph for this function:

Variable Documentation

◆ dslite_ce_decap_node

vlib_node_registration_t dslite_ce_decap_node
Initial value:
= {
.name = "dslite-ce-decap",
.vector_size = sizeof (u32),
.format_trace = format_dslite_ce_trace,
.n_next_nodes = DSLITE_CE_DECAP_N_NEXT,
.next_nodes = {
[DSLITE_CE_DECAP_NEXT_DROP] = "error-drop",
[DSLITE_IN2OUT_NEXT_IP6_ICMP] = "ip6-icmp-input",
},
}
static char * dslite_ce_decap_error_strings[]
unsigned int u32
Definition: types.h:88
static uword dslite_ce_decap_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
#define ARRAY_LEN(x)
Definition: clib.h:62
u8 * format_dslite_ce_trace(u8 *s, va_list *args)
Definition: dslite.c:244

(constructor) VLIB_REGISTER_NODE (dslite_ce_decap_node)

Definition at line 121 of file dslite_ce_decap.c.

◆ dslite_ce_encap_node

vlib_node_registration_t dslite_ce_encap_node
Initial value:
= {
.name = "dslite-ce-encap",
.vector_size = sizeof (u32),
.format_trace = format_dslite_ce_trace,
.n_next_nodes = DSLITE_CE_ENCAP_N_NEXT,
.next_nodes = {
[DSLITE_CE_ENCAP_NEXT_DROP] = "error-drop",
},
}
static uword dslite_ce_encap_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:62
static char * dslite_ce_encap_error_strings[]
u8 * format_dslite_ce_trace(u8 *s, va_list *args)
Definition: dslite.c:244

(constructor) VLIB_REGISTER_NODE (dslite_ce_encap_node)

Definition at line 114 of file dslite_ce_encap.c.

◆ dslite_in2out_node

vlib_node_registration_t dslite_in2out_node
Initial value:
= {
.function = dslite_in2out_node_fn,
.name = "dslite-in2out",
.vector_size = sizeof (u32),
.format_trace = format_dslite_trace,
.error_strings = dslite_in2out_error_strings,
.n_next_nodes = DSLITE_IN2OUT_N_NEXT,
.next_nodes = {
[DSLITE_IN2OUT_NEXT_DROP] = "error-drop",
[DSLITE_IN2OUT_NEXT_IP6_ICMP] = "ip6-icmp-input",
[DSLITE_IN2OUT_NEXT_SLOWPATH] = "dslite-in2out-slowpath",
},
}
u8 * format_dslite_trace(u8 *s, va_list *args)
Definition: dslite.c:231
unsigned int u32
Definition: types.h:88
static char * dslite_in2out_error_strings[]
Definition: dslite_in2out.c:31
#define ARRAY_LEN(x)
Definition: clib.h:62
static uword dslite_in2out_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)

(constructor) VLIB_REGISTER_NODE (dslite_in2out_node)

Definition at line 456 of file dslite_in2out.c.

◆ dslite_in2out_slowpath_node

vlib_node_registration_t dslite_in2out_slowpath_node
Initial value:
= {
.name = "dslite-in2out-slowpath",
.vector_size = sizeof (u32),
.format_trace = format_dslite_trace,
.error_strings = dslite_in2out_error_strings,
.n_next_nodes = DSLITE_IN2OUT_N_NEXT,
.next_nodes = {
[DSLITE_IN2OUT_NEXT_DROP] = "error-drop",
[DSLITE_IN2OUT_NEXT_IP6_ICMP] = "ip6-lookup",
[DSLITE_IN2OUT_NEXT_SLOWPATH] = "dslite-in2out-slowpath",
},
}
u8 * format_dslite_trace(u8 *s, va_list *args)
Definition: dslite.c:231
unsigned int u32
Definition: types.h:88
static char * dslite_in2out_error_strings[]
Definition: dslite_in2out.c:31
#define ARRAY_LEN(x)
Definition: clib.h:62
static uword dslite_in2out_slowpath_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)

(constructor) VLIB_REGISTER_NODE (dslite_in2out_slowpath_node)

Definition at line 485 of file dslite_in2out.c.

◆ dslite_main

dslite_main_t dslite_main

Definition at line 19 of file dslite.c.

◆ dslite_out2in_node

vlib_node_registration_t dslite_out2in_node
Initial value:
= {
.function = dslite_out2in_node_fn,
.name = "dslite-out2in",
.vector_size = sizeof (u32),
.format_trace = format_dslite_trace,
.error_strings = dslite_out2in_error_strings,
.n_next_nodes = DSLITE_OUT2IN_N_NEXT,
.next_nodes = {
[DSLITE_OUT2IN_NEXT_DROP] = "error-drop",
},
}
u8 * format_dslite_trace(u8 *s, va_list *args)
Definition: dslite.c:231
unsigned int u32
Definition: types.h:88
static uword dslite_out2in_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: dslite_out2in.c:98
#define ARRAY_LEN(x)
Definition: clib.h:62
static char * dslite_out2in_error_strings[]
Definition: dslite_out2in.c:28

(constructor) VLIB_REGISTER_NODE (dslite_out2in_node)

Definition at line 272 of file dslite_out2in.c.