FD.io VPP  v19.04-6-g6f05f72
Vector Packet Processing
stn.c File Reference
+ Include dependency graph for stn.c:

Go to the source code of this file.

Data Structures

struct  stn_ip46_punt_trace_t
 

Macros

#define foreach_stn_ip_punt_error   _(NONE, "no error")
 

Enumerations

enum  stn_ip_punt_next_t { STN_IP_PUNT_DROP, STN_IP_PUNT_N_NEXT }
 
enum  ila_error_t { ILA_N_ERROR, STN_IP_PUNT_N_ERROR }
 

Functions

static u8format_stn_rule (u8 *s, va_list *args)
 
static_always_inline u8format_stn_ip46_punt_trace (u8 *s, va_list *args, u8 is_ipv4)
 
static_always_inline uword stn_ip46_punt_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 is_ipv4)
 
u8format_stn_ip6_punt_trace (u8 *s, va_list *args)
 
static uword stn_ip6_punt_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_FEATURE_INIT (stn_ip6_punt_feat_node, static)
 
u8format_stn_ip4_punt_trace (u8 *s, va_list *args)
 INDENT-ON More...
 
static uword stn_ip4_punt_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_FEATURE_INIT (stn_ip4_punt_feat_node, static)
 
clib_error_tstn_init (vlib_main_t *vm)
 INDENT-ON More...
 
 VLIB_PLUGIN_REGISTER ()
 
int stn_rule_add_del (stn_rule_add_del_args_t *args)
 Add or delete an stn rule. More...
 
static clib_error_tshow_stn_rules_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tstn_rule_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

stn_main_t stn_main
 
static vlib_node_registration_t stn_ip4_punt
 INDENT-OFF More...
 
static vlib_node_registration_t stn_ip6_punt
 INDENT-OFF More...
 
static u8 stn_hw_addr_local [6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x01}
 
static u8 stn_hw_addr_dst [6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x02}
 
static ethernet_header_t stn_ip4_ethernet_header = {}
 
static ethernet_header_t stn_ip6_ethernet_header = {}
 
static char * stn_ip_punt_error_strings []
 
static vlib_cli_command_t show_stn_rules_command
 (constructor) VLIB_CLI_COMMAND (show_stn_rules_command) More...
 
static vlib_cli_command_t stn_rule_command
 (constructor) VLIB_CLI_COMMAND (stn_rule_command) More...
 

Macro Definition Documentation

#define foreach_stn_ip_punt_error   _(NONE, "no error")

Definition at line 170 of file stn.c.

Enumeration Type Documentation

Enumerator
ILA_N_ERROR 
STN_IP_PUNT_N_ERROR 

Definition at line 173 of file stn.c.

Enumerator
STN_IP_PUNT_DROP 
STN_IP_PUNT_N_NEXT 

Definition at line 82 of file stn.c.

Function Documentation

static_always_inline u8* format_stn_ip46_punt_trace ( u8 s,
va_list *  args,
u8  is_ipv4 
)

Definition at line 59 of file stn.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_stn_ip4_punt_trace ( u8 s,
va_list *  args 
)

INDENT-ON

Definition at line 222 of file stn.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_stn_ip6_punt_trace ( u8 s,
va_list *  args 
)

Definition at line 187 of file stn.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 40 of file stn.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 363 of file stn.c.

+ Here is the call graph for this function:

clib_error_t* stn_init ( vlib_main_t vm)

INDENT-ON

Definition at line 257 of file stn.c.

+ Here is the call graph for this function:

static_always_inline uword stn_ip46_punt_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
u8  is_ipv4 
)

Definition at line 89 of file stn.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword stn_ip4_punt_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 228 of file stn.c.

+ Here is the call graph for this function:

static uword stn_ip6_punt_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 193 of file stn.c.

+ Here is the call graph for this function:

int stn_rule_add_del ( stn_rule_add_del_args_t args)

Add or delete an stn rule.

Definition at line 286 of file stn.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 387 of file stn.c.

+ Here is the call graph for this function:

VLIB_PLUGIN_REGISTER ( )

+ Here is the caller graph for this function:

VNET_FEATURE_INIT ( stn_ip6_punt_feat_node  ,
static   
)

+ Here is the caller graph for this function:

VNET_FEATURE_INIT ( stn_ip4_punt_feat_node  ,
static   
)

Variable Documentation

vlib_cli_command_t show_stn_rules_command
static
Initial value:
=
{
.path = "show stn rules",
.short_help = "",
.function = show_stn_rules_fn,
}
static clib_error_t * show_stn_rules_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: stn.c:363

(constructor) VLIB_CLI_COMMAND (show_stn_rules_command)

Definition at line 379 of file stn.c.

u8 stn_hw_addr_dst[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x02}
static

Definition at line 30 of file stn.c.

u8 stn_hw_addr_local[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x01}
static

Definition at line 29 of file stn.c.

ethernet_header_t stn_ip4_ethernet_header = {}
static

Definition at line 32 of file stn.c.

static vlib_node_registration_t stn_ip4_punt
static
Initial value:
=
{
.function = stn_ip4_punt_fn,
.name = "stn-ip4-punt",
.vector_size = sizeof (u32),
.format_trace = format_stn_ip4_punt_trace,
.n_errors = STN_IP_PUNT_N_ERROR,
.error_strings = stn_ip_punt_error_strings,
.n_next_nodes = STN_IP_PUNT_N_NEXT,
.next_nodes =
{
[STN_IP_PUNT_DROP] = "error-drop",
},
}
static uword stn_ip4_punt_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: stn.c:228
static char * stn_ip_punt_error_strings[]
Definition: stn.c:180
unsigned int u32
Definition: types.h:88
u8 * format_stn_ip4_punt_trace(u8 *s, va_list *args)
INDENT-ON
Definition: stn.c:222

INDENT-OFF

(constructor) VLIB_REGISTER_NODE (stn_ip4_punt)

Definition at line 26 of file stn.c.

ethernet_header_t stn_ip6_ethernet_header = {}
static

Definition at line 33 of file stn.c.

static vlib_node_registration_t stn_ip6_punt
static
Initial value:
=
{
.function = stn_ip6_punt_fn,
.name = "stn-ip6-punt",
.vector_size = sizeof (u32),
.format_trace = format_stn_ip6_punt_trace,
.n_errors = STN_IP_PUNT_N_ERROR,
.error_strings = stn_ip_punt_error_strings,
.n_next_nodes = STN_IP_PUNT_N_NEXT,
.next_nodes =
{
[STN_IP_PUNT_DROP] = "error-drop"
},
}
static char * stn_ip_punt_error_strings[]
Definition: stn.c:180
static uword stn_ip6_punt_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: stn.c:193
unsigned int u32
Definition: types.h:88
u8 * format_stn_ip6_punt_trace(u8 *s, va_list *args)
Definition: stn.c:187

INDENT-OFF

(constructor) VLIB_REGISTER_NODE (stn_ip6_punt)

Definition at line 27 of file stn.c.

char* stn_ip_punt_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_stn_ip_punt_error
Definition: stn.c:170

Definition at line 180 of file stn.c.

stn_main_t stn_main

Definition at line 25 of file stn.c.

vlib_cli_command_t stn_rule_command
static
Initial value:
=
{
.path = "stn rule",
.short_help = "address <addr> interface <iface> [del]",
.function = stn_rule_fn,
}
static clib_error_t * stn_rule_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: stn.c:387

(constructor) VLIB_CLI_COMMAND (stn_rule_command)

Definition at line 442 of file stn.c.