FD.io VPP  v18.01.2-1-g9b554f3
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 void stn_punt_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
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)
 
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)
 
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 220 of file stn.c.

Enumeration Type Documentation

Enumerator
ILA_N_ERROR 
STN_IP_PUNT_N_ERROR 

Definition at line 223 of file stn.c.

Enumerator
STN_IP_PUNT_DROP 
STN_IP_PUNT_N_NEXT 

Definition at line 137 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 267 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 237 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 412 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 297 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 144 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 273 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 243 of file stn.c.

+ Here is the call graph for this function:

static void stn_punt_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 83 of file stn.c.

+ Here is the call graph for this function:

+ Here is the caller 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 332 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 436 of file stn.c.

+ Here is the call graph for this function:

VLIB_PLUGIN_REGISTER ( )

+ Here is the caller graph for this function:

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:412

(constructor) VLIB_CLI_COMMAND (show_stn_rules_command)

Definition at line 428 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:273
static char * stn_ip_punt_error_strings[]
Definition: stn.c:230
unsigned int u32
Definition: types.h:88
u8 * format_stn_ip4_punt_trace(u8 *s, va_list *args)
INDENT-ON
Definition: stn.c:267

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:230
static uword stn_ip6_punt_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: stn.c:243
u8 * format_stn_ip6_punt_trace(u8 *s, va_list *args)
Definition: stn.c:237
unsigned int u32
Definition: types.h:88

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:220

Definition at line 230 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:436

(constructor) VLIB_CLI_COMMAND (stn_rule_command)

Definition at line 491 of file stn.c.