FD.io VPP  v18.10-34-gcce845e
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

#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 106 of file dslite.h.

Enumeration Type Documentation

Enumerator
DSLITE_N_ERROR 

Definition at line 118 of file dslite.h.

Function Documentation

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;}  )
int dslite_add_del_pool_addr ( dslite_main_t dm,
ip4_address_t addr,
u8  is_add 
)

Definition at line 168 of file dslite.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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:

int dslite_set_aftr_ip4_addr ( dslite_main_t dm,
ip4_address_t addr 
)

Definition at line 116 of file dslite.c.

+ Here is the caller graph for this function:

int dslite_set_aftr_ip6_addr ( dslite_main_t dm,
ip6_address_t addr 
)

Definition at line 80 of file dslite.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int dslite_set_b4_ip4_addr ( dslite_main_t dm,
ip4_address_t addr 
)

Definition at line 153 of file dslite.c.

+ Here is the caller graph for this function:

int dslite_set_b4_ip6_addr ( dslite_main_t dm,
ip6_address_t addr 
)

Definition at line 123 of file dslite.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void dslite_set_ce ( dslite_main_t dm,
u8  set 
)

Definition at line 74 of file dslite.c.

+ Here is the caller graph for this function:

u8* format_dslite_ce_trace ( u8 s,
va_list *  args 
)

Definition at line 234 of file dslite.c.

+ Here is the call graph for this function:

u8* format_dslite_trace ( u8 s,
va_list *  args 
)

Definition at line 221 of file dslite.c.

+ Here is the call graph for this function:

Variable Documentation

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:61
u8 * format_dslite_ce_trace(u8 *s, va_list *args)
Definition: dslite.c:234

(constructor) VLIB_REGISTER_NODE (dslite_ce_decap_node)

Definition at line 121 of file dslite_ce_decap.c.

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:61
static char * dslite_ce_encap_error_strings[]
u8 * format_dslite_ce_trace(u8 *s, va_list *args)
Definition: dslite.c:234

(constructor) VLIB_REGISTER_NODE (dslite_ce_encap_node)

Definition at line 114 of file dslite_ce_encap.c.

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:221
unsigned int u32
Definition: types.h:88
static char * dslite_in2out_error_strings[]
Definition: dslite_in2out.c:30
#define ARRAY_LEN(x)
Definition: clib.h:61
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 436 of file dslite_in2out.c.

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:221
unsigned int u32
Definition: types.h:88
static char * dslite_in2out_error_strings[]
Definition: dslite_in2out.c:30
#define ARRAY_LEN(x)
Definition: clib.h:61
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 465 of file dslite_in2out.c.

dslite_main_t dslite_main

Definition at line 19 of file dslite.c.

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:221
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:61
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.