FD.io VPP  v18.01.2-1-g9b554f3
Vector Packet Processing
udp_encap.c File Reference
+ Include dependency graph for udp_encap.c:

Go to the source code of this file.

Functions

static udp_encap_tudp_encap_get_w_id (u32 id)
 
static void udp_encap_restack (udp_encap_t *ue)
 
index_t udp_encap_add_and_lock (u32 id, fib_protocol_t proto, index_t fib_index, const ip46_address_t *src_ip, const ip46_address_t *dst_ip, u16 src_port, u16 dst_port, udp_encap_fixup_flags_t flags)
 
void udp_encap_contribute_forwarding (u32 id, dpo_proto_t proto, dpo_id_t *dpo)
 
index_t udp_encap_find (u32 id)
 
void udp_encap_lock (u32 id)
 
void udp_encap_unlock_w_index (index_t uei)
 
void udp_encap_unlock (u32 id)
 
static void udp_encap_dpo_lock (dpo_id_t *dpo)
 
static void udp_encap_dpo_unlock (dpo_id_t *dpo)
 
static u8format_udp_encap_i (u8 *s, va_list *args)
 
static u8format_udp_encap_dpo (u8 *s, va_list *args)
 
u8format_udp_encap (u8 *s, va_list *args)
 
static udp_encap_tudp_encap_from_fib_node (fib_node_t *node)
 
static fib_node_back_walk_rc_t udp_encap_fib_back_walk (fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
 Function definition to backwalk a FIB node. More...
 
static fib_node_tudp_encap_fib_node_get (fib_node_index_t index)
 Function definition to get a FIB node from its index. More...
 
static void udp_encap_fib_last_lock_gone (fib_node_t *node)
 Function definition to inform the FIB node that its last lock has gone. More...
 
clib_error_tudp_encap_init (vlib_main_t *vm)
 
clib_error_tudp_encap_cli (vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
 
clib_error_tudp_encap_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

dpo_type_t udp_encap_dpo_types [FIB_PROTOCOL_MAX]
 Registered DPO types for the IP header encapsulated, v4 or v6. More...
 
uwordudp_encap_db
 Hash DB to map from client ID to VPP index. More...
 
udp_encap_tudp_encap_pool
 Pool of encaps. More...
 
static const char *const udp4_encap_ip4_nodes []
 
static const char *const udp4_encap_ip6_nodes []
 
static const char *const udp4_encap_mpls_nodes []
 
static const char *const udp4_encap_bier_nodes []
 
static const char *const udp6_encap_ip4_nodes []
 
static const char *const udp6_encap_ip6_nodes []
 
static const char *const udp6_encap_mpls_nodes []
 
static const char *const udp6_encap_bier_nodes []
 
static const char *const *const udp4_encap_nodes [DPO_PROTO_NUM]
 
static const char *const *const udp6_encap_nodes [DPO_PROTO_NUM]
 
static const fib_node_vft_t udp_encap_fib_vft
 
static const dpo_vft_t udp_encap_dpo_vft
 
static vlib_cli_command_t udp_encap_add_command
 (constructor) VLIB_CLI_COMMAND (udp_encap_add_command) More...
 
static vlib_cli_command_t udp_encap_show_command
 (constructor) VLIB_CLI_COMMAND (udp_encap_show_command) More...
 

Function Documentation

u8* format_udp_encap ( u8 s,
va_list *  args 
)

Definition at line 309 of file udp_encap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_udp_encap_dpo ( u8 s,
va_list *  args 
)
static

Definition at line 300 of file udp_encap.c.

+ Here is the call graph for this function:

static u8* format_udp_encap_i ( u8 s,
va_list *  args 
)
static

Definition at line 256 of file udp_encap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

index_t udp_encap_add_and_lock ( u32  id,
fib_protocol_t  proto,
index_t  fib_index,
const ip46_address_t *  src_ip,
const ip46_address_t *  dst_ip,
u16  src_port,
u16  dst_port,
udp_encap_fixup_flags_t  flags 
)

Definition at line 62 of file udp_encap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* udp_encap_cli ( vlib_main_t vm,
unformat_input_t main_input,
vlib_cli_command_t cmd 
)

Definition at line 468 of file udp_encap.c.

+ Here is the call graph for this function:

void udp_encap_contribute_forwarding ( u32  id,
dpo_proto_t  proto,
dpo_id_t dpo 
)

Definition at line 158 of file udp_encap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void udp_encap_dpo_lock ( dpo_id_t dpo)
static

Definition at line 236 of file udp_encap.c.

+ Here is the call graph for this function:

static void udp_encap_dpo_unlock ( dpo_id_t dpo)
static

Definition at line 246 of file udp_encap.c.

+ Here is the call graph for this function:

static fib_node_back_walk_rc_t udp_encap_fib_back_walk ( fib_node_t node,
fib_node_back_walk_ctx_t ctx 
)
static

Function definition to backwalk a FIB node.

Definition at line 337 of file udp_encap.c.

+ Here is the call graph for this function:

static void udp_encap_fib_last_lock_gone ( fib_node_t node)
static

Function definition to inform the FIB node that its last lock has gone.

reset the stacked DPO to unlock it

Definition at line 361 of file udp_encap.c.

+ Here is the call graph for this function:

static fib_node_t* udp_encap_fib_node_get ( fib_node_index_t  index)
static

Function definition to get a FIB node from its index.

Definition at line 348 of file udp_encap.c.

index_t udp_encap_find ( u32  id)

Definition at line 179 of file udp_encap.c.

+ Here is the caller graph for this function:

static udp_encap_t* udp_encap_from_fib_node ( fib_node_t node)
static

Definition at line 326 of file udp_encap.c.

+ Here is the caller graph for this function:

static udp_encap_t* udp_encap_get_w_id ( u32  id)
static

Definition at line 37 of file udp_encap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* udp_encap_init ( vlib_main_t vm)

Definition at line 451 of file udp_encap.c.

+ Here is the call graph for this function:

void udp_encap_lock ( u32  id)

Definition at line 192 of file udp_encap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void udp_encap_restack ( udp_encap_t ue)
static

Definition at line 53 of file udp_encap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* udp_encap_show ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)

Definition at line 572 of file udp_encap.c.

+ Here is the call graph for this function:

void udp_encap_unlock ( u32  id)

Definition at line 223 of file udp_encap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void udp_encap_unlock_w_index ( index_t  uei)

Definition at line 205 of file udp_encap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

const char* const udp4_encap_bier_nodes[]
static
Initial value:
= {
"udp4-encap",
}
#define NULL
Definition: clib.h:55

Definition at line 395 of file udp_encap.c.

const char* const udp4_encap_ip4_nodes[]
static
Initial value:
= {
"udp4-encap",
}
#define NULL
Definition: clib.h:55

Definition at line 380 of file udp_encap.c.

const char* const udp4_encap_ip6_nodes[]
static
Initial value:
= {
"udp4-encap",
}
#define NULL
Definition: clib.h:55

Definition at line 385 of file udp_encap.c.

const char* const udp4_encap_mpls_nodes[]
static
Initial value:
= {
"udp4-encap",
}
#define NULL
Definition: clib.h:55

Definition at line 390 of file udp_encap.c.

const char* const* const udp4_encap_nodes[DPO_PROTO_NUM]
static
Initial value:
= {
}
static const char *const udp4_encap_bier_nodes[]
Definition: udp_encap.c:395
static const char *const udp4_encap_ip4_nodes[]
Definition: udp_encap.c:380
static const char *const udp4_encap_mpls_nodes[]
Definition: udp_encap.c:390
static const char *const udp4_encap_ip6_nodes[]
Definition: udp_encap.c:385

Definition at line 420 of file udp_encap.c.

const char* const udp6_encap_bier_nodes[]
static
Initial value:
= {
"udp6-encap",
}
#define NULL
Definition: clib.h:55

Definition at line 415 of file udp_encap.c.

const char* const udp6_encap_ip4_nodes[]
static
Initial value:
= {
"udp6-encap",
}
#define NULL
Definition: clib.h:55

Definition at line 400 of file udp_encap.c.

const char* const udp6_encap_ip6_nodes[]
static
Initial value:
= {
"udp6-encap",
}
#define NULL
Definition: clib.h:55

Definition at line 405 of file udp_encap.c.

const char* const udp6_encap_mpls_nodes[]
static
Initial value:
= {
"udp6-encap",
}
#define NULL
Definition: clib.h:55

Definition at line 410 of file udp_encap.c.

const char* const* const udp6_encap_nodes[DPO_PROTO_NUM]
static
Initial value:
= {
}
static const char *const udp6_encap_mpls_nodes[]
Definition: udp_encap.c:410
static const char *const udp6_encap_ip6_nodes[]
Definition: udp_encap.c:405
static const char *const udp6_encap_bier_nodes[]
Definition: udp_encap.c:415
static const char *const udp6_encap_ip4_nodes[]
Definition: udp_encap.c:400

Definition at line 427 of file udp_encap.c.

vlib_cli_command_t udp_encap_add_command
static
Initial value:
= {
.path = "udp encap",
.short_help = "udp encap [add|del] <id ID> <src-ip> <dst-ip> [<src-port>] <dst-port> [src-port-is-entropy] [table-id <table>]",
.function = udp_encap_cli,
.is_mp_safe = 1,
}
clib_error_t * udp_encap_cli(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
Definition: udp_encap.c:468

(constructor) VLIB_CLI_COMMAND (udp_encap_add_command)

Definition at line 609 of file udp_encap.c.

uword* udp_encap_db

Hash DB to map from client ID to VPP index.

Definition at line 29 of file udp_encap.c.

dpo_type_t udp_encap_dpo_types[FIB_PROTOCOL_MAX]

Registered DPO types for the IP header encapsulated, v4 or v6.

Definition at line 24 of file udp_encap.c.

const dpo_vft_t udp_encap_dpo_vft
static
Initial value:
= {
.dv_lock = udp_encap_dpo_lock,
.dv_unlock = udp_encap_dpo_unlock,
.dv_format = format_udp_encap_dpo,
}
static void udp_encap_dpo_lock(dpo_id_t *dpo)
Definition: udp_encap.c:236
static void udp_encap_dpo_unlock(dpo_id_t *dpo)
Definition: udp_encap.c:246
static u8 * format_udp_encap_dpo(u8 *s, va_list *args)
Definition: udp_encap.c:300

Definition at line 444 of file udp_encap.c.

const fib_node_vft_t udp_encap_fib_vft
static
Initial value:
= {
.fnv_last_lock = udp_encap_fib_last_lock_gone,
.fnv_back_walk = udp_encap_fib_back_walk,
}
static fib_node_back_walk_rc_t udp_encap_fib_back_walk(fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
Function definition to backwalk a FIB node.
Definition: udp_encap.c:337
static fib_node_t * udp_encap_fib_node_get(fib_node_index_t index)
Function definition to get a FIB node from its index.
Definition: udp_encap.c:348
static void udp_encap_fib_last_lock_gone(fib_node_t *node)
Function definition to inform the FIB node that its last lock has gone.
Definition: udp_encap.c:361

Definition at line 438 of file udp_encap.c.

udp_encap_t* udp_encap_pool

Pool of encaps.

Definition at line 34 of file udp_encap.c.

vlib_cli_command_t udp_encap_show_command
static
Initial value:
= {
.path = "show udp encap",
.short_help = "show udp encap [ID]",
.function = udp_encap_show,
.is_mp_safe = 1,
}
clib_error_t * udp_encap_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: udp_encap.c:572

(constructor) VLIB_CLI_COMMAND (udp_encap_show_command)

Definition at line 615 of file udp_encap.c.