FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
pppoe.c File Reference
+ Include dependency graph for pppoe.c:

Go to the source code of this file.

Data Structures

struct  pppoe_show_walk_ctx_t_
 

Macros

#define foreach_copy_field
 

Typedefs

typedef struct pppoe_show_walk_ctx_t_ pppoe_show_walk_ctx_t
 

Functions

u8format_pppoe_session (u8 *s, va_list *args)
 
static u8format_pppoe_name (u8 *s, va_list *args)
 
static clib_error_tpppoe_interface_admin_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 
 VNET_DEVICE_CLASS (pppoe_device_class, static)
 
static u8format_pppoe_header_with_length (u8 *s, va_list *args)
 
static u8pppoe_build_rewrite (vnet_main_t *vnm, u32 sw_if_index, vnet_link_t link_type, const void *dst_address)
 
static void pppoe_fixup (vlib_main_t *vm, const ip_adjacency_t *adj, vlib_buffer_t *b0, const void *data)
 Fixup the adj rewrite post encap. More...
 
static void pppoe_update_adj (vnet_main_t *vnm, u32 sw_if_index, adj_index_t ai)
 
 VNET_HW_INTERFACE_CLASS (pppoe_hw_class)
 
static bool pppoe_decap_next_is_valid (pppoe_main_t *pem, u32 is_ip6, u32 decap_fib_index)
 
int vnet_pppoe_add_del_session (vnet_pppoe_add_del_session_args_t *a, u32 *sw_if_indexp)
 
static clib_error_tpppoe_add_del_session_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_pppoe_session_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static int pppoe_show_walk_cb (BVT(clib_bihash_kv) *kvp, void *arg)
 
static clib_error_tshow_pppoe_fib_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 Display the contents of the PPPoE Fib. More...
 
clib_error_tpppoe_init (vlib_main_t *vm)
 
 VLIB_PLUGIN_REGISTER ()
 

Variables

pppoe_main_t pppoe_main
 
static fib_source_t pppoe_fib_src
 
static vlib_cli_command_t create_pppoe_session_command
 (constructor) VLIB_CLI_COMMAND (create_pppoe_session_command) More...
 
static vlib_cli_command_t show_pppoe_session_command
 (constructor) VLIB_CLI_COMMAND (show_pppoe_session_command) More...
 
static vlib_cli_command_t show_pppoe_fib_command
 (constructor) VLIB_CLI_COMMAND (show_pppoe_fib_command) More...
 

Macro Definition Documentation

◆ foreach_copy_field

#define foreach_copy_field
Value:
_(encap_if_index) \
_(decap_fib_index) \
_(client_ip)
u32 session_id
Definition: flow_types.api:131

Definition at line 232 of file pppoe.c.

Typedef Documentation

◆ pppoe_show_walk_ctx_t

Function Documentation

◆ format_pppoe_header_with_length()

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

Definition at line 89 of file pppoe.c.

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

◆ format_pppoe_name()

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

Definition at line 64 of file pppoe.c.

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

◆ format_pppoe_session()

u8* format_pppoe_session ( u8 s,
va_list *  args 
)

Definition at line 43 of file pppoe.c.

+ Here is the call graph for this function:

◆ pppoe_add_del_session_command_fn()

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

Definition at line 429 of file pppoe.c.

+ Here is the call graph for this function:

◆ pppoe_build_rewrite()

static u8* pppoe_build_rewrite ( vnet_main_t vnm,
u32  sw_if_index,
vnet_link_t  link_type,
const void *  dst_address 
)
static

Definition at line 97 of file pppoe.c.

+ Here is the caller graph for this function:

◆ pppoe_decap_next_is_valid()

static bool pppoe_decap_next_is_valid ( pppoe_main_t pem,
u32  is_ip6,
u32  decap_fib_index 
)
static

Definition at line 239 of file pppoe.c.

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

◆ pppoe_fixup()

static void pppoe_fixup ( vlib_main_t vm,
const ip_adjacency_t adj,
vlib_buffer_t b0,
const void *  data 
)
static

Fixup the adj rewrite post encap.

Insert the packet's length

Definition at line 142 of file pppoe.c.

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

◆ pppoe_init()

clib_error_t* pppoe_init ( vlib_main_t vm)

Definition at line 708 of file pppoe.c.

+ Here is the call graph for this function:

◆ pppoe_interface_admin_up_down()

static clib_error_t* pppoe_interface_admin_up_down ( vnet_main_t vnm,
u32  hw_if_index,
u32  flags 
)
static

Definition at line 71 of file pppoe.c.

+ Here is the call graph for this function:

◆ pppoe_show_walk_cb()

static int pppoe_show_walk_cb ( BVT(clib_bihash_kv) *  kvp,
void *  arg 
)
static

Definition at line 632 of file pppoe.c.

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

◆ pppoe_update_adj()

static void pppoe_update_adj ( vnet_main_t vnm,
u32  sw_if_index,
adj_index_t  ai 
)
static

Definition at line 162 of file pppoe.c.

+ Here is the call graph for this function:

◆ show_pppoe_fib_command_fn()

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

Display the contents of the PPPoE Fib.

Definition at line 665 of file pppoe.c.

+ Here is the call graph for this function:

◆ show_pppoe_session_command_fn()

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

Definition at line 587 of file pppoe.c.

+ Here is the call graph for this function:

◆ VLIB_PLUGIN_REGISTER()

VLIB_PLUGIN_REGISTER ( )

◆ VNET_DEVICE_CLASS()

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

◆ VNET_HW_INTERFACE_CLASS()

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

◆ vnet_pppoe_add_del_session()

int vnet_pppoe_add_del_session ( vnet_pppoe_add_del_session_args_t a,
u32 sw_if_indexp 
)

Definition at line 250 of file pppoe.c.

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

Variable Documentation

◆ create_pppoe_session_command

vlib_cli_command_t create_pppoe_session_command
static
Initial value:
= {
.path = "create pppoe session",
.short_help =
"create pppoe session client-ip <client-ip> session-id <nn>"
" client-mac <client-mac> [decap-vrf-id <nn>] [del]",
}
static clib_error_t * pppoe_add_del_session_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: pppoe.c:429

(constructor) VLIB_CLI_COMMAND (create_pppoe_session_command)

Definition at line 576 of file pppoe.c.

◆ pppoe_fib_src

fib_source_t pppoe_fib_src
static

Definition at line 40 of file pppoe.c.

◆ pppoe_main

pppoe_main_t pppoe_main

Definition at line 38 of file pppoe.c.

◆ show_pppoe_fib_command

vlib_cli_command_t show_pppoe_fib_command
static
Initial value:
= {
.path = "show pppoe fib",
.short_help = "show pppoe fib",
}
static clib_error_t * show_pppoe_fib_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Display the contents of the PPPoE Fib.
Definition: pppoe.c:665

(constructor) VLIB_CLI_COMMAND (show_pppoe_fib_command)

Definition at line 700 of file pppoe.c.

◆ show_pppoe_session_command

vlib_cli_command_t show_pppoe_session_command
static
Initial value:
= {
.path = "show pppoe session",
.short_help = "show pppoe session",
}
static clib_error_t * show_pppoe_session_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: pppoe.c:587

(constructor) VLIB_CLI_COMMAND (show_pppoe_session_command)

Definition at line 617 of file pppoe.c.