FD.io VPP  v20.05.1-6-gf53edbc3b
Vector Packet Processing
l2tp.c File Reference
+ Include dependency graph for l2tp.c:

Go to the source code of this file.

Functions

u8format_l2t_trace (u8 *s, va_list *args)
 
u8format_l2t_session (u8 *s, va_list *args)
 
static clib_error_tshow_l2tp_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_ttest_counters_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tclear_counters_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static u8format_l2tpv3_name (u8 *s, va_list *args)
 
static int l2tpv3_name_renumber (vnet_hw_interface_t *hi, u32 new_dev_instance)
 
 VNET_DEVICE_CLASS (l2tpv3_device_class, static)
 
static u8format_l2tp_header_with_length (u8 *s, va_list *args)
 
 VNET_HW_INTERFACE_CLASS (l2tpv3_hw_class)
 
int create_l2tpv3_ipv6_tunnel (l2t_main_t *lm, ip6_address_t *client_address, ip6_address_t *our_address, u32 local_session_id, u32 remote_session_id, u64 local_cookie, u64 remote_cookie, int l2_sublayer_present, u32 encap_fib_index, u32 *sw_if_index)
 
static clib_error_tcreate_l2tpv3_tunnel_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
int l2tpv3_set_tunnel_cookies (l2t_main_t *lm, u32 sw_if_index, u64 new_local_cookie, u64 new_remote_cookie)
 
static clib_error_tset_l2tp_tunnel_cookie_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
int l2tpv3_interface_enable_disable (vnet_main_t *vnm, u32 sw_if_index, int enable_disable)
 
static clib_error_tset_ip6_l2tpv3 (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tl2tp_config (vlib_main_t *vm, unformat_input_t *input)
 
clib_error_tl2tp_sw_interface_up_down (vnet_main_t *vnm, u32 sw_if_index, u32 flags)
 
 VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION (l2tp_sw_interface_up_down)
 
clib_error_tl2tp_init (vlib_main_t *vm)
 
clib_error_tl2tp_worker_init (vlib_main_t *vm)
 
 VLIB_WORKER_INIT_FUNCTION (l2tp_worker_init)
 

Variables

l2t_main_t l2t_main
 
static vlib_cli_command_t show_session_detail_command
 (constructor) VLIB_CLI_COMMAND (show_session_detail_command) More...
 
static vlib_cli_command_t test_counters_command
 (constructor) VLIB_CLI_COMMAND (test_counters_command) More...
 
static vlib_cli_command_t clear_counters_command
 (constructor) VLIB_CLI_COMMAND (clear_counters_command) More...
 
static vlib_cli_command_t create_l2tpv3_tunnel_command
 (constructor) VLIB_CLI_COMMAND (create_l2tpv3_tunnel_command) More...
 
static vlib_cli_command_t set_l2tp_tunnel_cookie_command
 (constructor) VLIB_CLI_COMMAND (set_l2tp_tunnel_cookie_command) More...
 
static vlib_cli_command_t set_interface_ip6_l2tpv3
 (constructor) VLIB_CLI_COMMAND (set_interface_ip6_l2tpv3) More...
 

Function Documentation

◆ clear_counters_command_fn()

static clib_error_t* clear_counters_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 195 of file l2tp.c.

+ Here is the call graph for this function:

◆ create_l2tpv3_ipv6_tunnel()

int create_l2tpv3_ipv6_tunnel ( l2t_main_t lm,
ip6_address_t *  client_address,
ip6_address_t *  our_address,
u32  local_session_id,
u32  remote_session_id,
u64  local_cookie,
u64  remote_cookie,
int  l2_sublayer_present,
u32  encap_fib_index,
u32 sw_if_index 
)

Definition at line 283 of file l2tp.c.

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

◆ create_l2tpv3_tunnel_command_fn()

static clib_error_t* create_l2tpv3_tunnel_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 412 of file l2tp.c.

+ Here is the call graph for this function:

◆ format_l2t_session()

u8* format_l2t_session ( u8 s,
va_list *  args 
)

Definition at line 48 of file l2tp.c.

+ Here is the call graph for this function:

◆ format_l2t_trace()

u8* format_l2t_trace ( u8 s,
va_list *  args 
)

Definition at line 30 of file l2tp.c.

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

◆ format_l2tp_header_with_length()

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

Definition at line 266 of file l2tp.c.

+ Here is the call graph for this function:

◆ format_l2tpv3_name()

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

Definition at line 230 of file l2tp.c.

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

◆ l2tp_config()

static clib_error_t* l2tp_config ( vlib_main_t vm,
unformat_input_t input 
)
static

Definition at line 678 of file l2tp.c.

+ Here is the call graph for this function:

◆ l2tp_init()

clib_error_t* l2tp_init ( vlib_main_t vm)

Definition at line 717 of file l2tp.c.

+ Here is the call graph for this function:

◆ l2tp_sw_interface_up_down()

clib_error_t* l2tp_sw_interface_up_down ( vnet_main_t vnm,
u32  sw_if_index,
u32  flags 
)

Definition at line 701 of file l2tp.c.

+ Here is the call graph for this function:

◆ l2tp_worker_init()

clib_error_t* l2tp_worker_init ( vlib_main_t vm)

Definition at line 749 of file l2tp.c.

+ Here is the call graph for this function:

◆ l2tpv3_interface_enable_disable()

int l2tpv3_interface_enable_disable ( vnet_main_t vnm,
u32  sw_if_index,
int  enable_disable 
)

Definition at line 614 of file l2tp.c.

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

◆ l2tpv3_name_renumber()

static int l2tpv3_name_renumber ( vnet_hw_interface_t hi,
u32  new_dev_instance 
)
static

Definition at line 246 of file l2tp.c.

+ Here is the call graph for this function:

◆ l2tpv3_set_tunnel_cookies()

int l2tpv3_set_tunnel_cookies ( l2t_main_t lm,
u32  sw_if_index,
u64  new_local_cookie,
u64  new_remote_cookie 
)

Definition at line 531 of file l2tp.c.

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

◆ set_ip6_l2tpv3()

static clib_error_t* set_ip6_l2tpv3 ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 628 of file l2tp.c.

+ Here is the call graph for this function:

◆ set_l2tp_tunnel_cookie_command_fn()

static clib_error_t* set_l2tp_tunnel_cookie_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 554 of file l2tp.c.

+ Here is the call graph for this function:

◆ show_l2tp_command_fn()

static clib_error_t* show_l2tp_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 93 of file l2tp.c.

+ Here is the call graph for this function:

◆ test_counters_command_fn()

static clib_error_t* test_counters_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 152 of file l2tp.c.

+ Here is the call graph for this function:

◆ VLIB_WORKER_INIT_FUNCTION()

VLIB_WORKER_INIT_FUNCTION ( l2tp_worker_init  )
+ Here is the caller graph for this function:

◆ VNET_DEVICE_CLASS()

VNET_DEVICE_CLASS ( l2tpv3_device_class  ,
static   
)
+ Here is the caller graph for this function:

◆ VNET_HW_INTERFACE_CLASS()

VNET_HW_INTERFACE_CLASS ( l2tpv3_hw_class  )
+ Here is the caller graph for this function:

◆ VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION()

VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION ( l2tp_sw_interface_up_down  )
+ Here is the caller graph for this function:

Variable Documentation

◆ clear_counters_command

vlib_cli_command_t clear_counters_command
static
Initial value:
= {
.path = "clear counters",
.short_help = "clear all active counters",
}
static clib_error_t * clear_counters_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2tp.c:195

(constructor) VLIB_CLI_COMMAND (clear_counters_command)

Definition at line 222 of file l2tp.c.

◆ create_l2tpv3_tunnel_command

vlib_cli_command_t create_l2tpv3_tunnel_command
static
Initial value:
=
{
.path = "create l2tpv3 tunnel",
.short_help =
"create l2tpv3 tunnel client <ip6> our <ip6> local-cookie <hex> remote-cookie <hex> local-session <dec> remote-session <dec>",
}
static clib_error_t * create_l2tpv3_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2tp.c:412

(constructor) VLIB_CLI_COMMAND (create_l2tpv3_tunnel_command)

Definition at line 521 of file l2tp.c.

◆ l2t_main

l2t_main_t l2t_main

Definition at line 26 of file l2tp.c.

◆ set_interface_ip6_l2tpv3

vlib_cli_command_t set_interface_ip6_l2tpv3
static
Initial value:
=
{
.path = "set interface ip6 l2tpv3",
.function = set_ip6_l2tpv3,
.short_help = "set interface ip6 l2tpv3 <intfc> [del]",
}
static clib_error_t * set_ip6_l2tpv3(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2tp.c:628

(constructor) VLIB_CLI_COMMAND (set_interface_ip6_l2tpv3)

Definition at line 669 of file l2tp.c.

◆ set_l2tp_tunnel_cookie_command

vlib_cli_command_t set_l2tp_tunnel_cookie_command
static
Initial value:
=
{
.path = "set l2tpv3 tunnel cookie",
.short_help =
"set l2tpv3 tunnel cookie <intfc> local <hex> remote <hex>",
}
static clib_error_t * set_l2tp_tunnel_cookie_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2tp.c:554

(constructor) VLIB_CLI_COMMAND (set_l2tp_tunnel_cookie_command)

Definition at line 604 of file l2tp.c.

◆ show_session_detail_command

vlib_cli_command_t show_session_detail_command
static
Initial value:
= {
.path = "show l2tpv3",
.short_help = "show l2tpv3 [verbose]",
.function = show_l2tp_command_fn,
}
static clib_error_t * show_l2tp_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2tp.c:93

(constructor) VLIB_CLI_COMMAND (show_session_detail_command)

Definition at line 144 of file l2tp.c.

◆ test_counters_command

vlib_cli_command_t test_counters_command
static
Initial value:
= {
.path = "test counters",
.short_help = "increment all active counters",
}
static clib_error_t * test_counters_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2tp.c:152

(constructor) VLIB_CLI_COMMAND (test_counters_command)

Definition at line 187 of file l2tp.c.