FD.io VPP  v17.01-9-ge7dcee4
Vector Packet Processing
ip4_source_check.c File Reference

IPv4 Unicast Source Check. More...

+ Include dependency graph for ip4_source_check.c:

Go to the source code of this file.

Data Structures

struct  ip4_source_check_trace_t
 
union  ip4_source_check_config_t
 

Enumerations

enum  ip4_source_check_next_t { IP4_SOURCE_CHECK_NEXT_DROP, IP4_SOURCE_CHECK_N_NEXT }
 
enum  ip4_source_check_type_t { IP4_SOURCE_CHECK_REACHABLE_VIA_RX, IP4_SOURCE_CHECK_REACHABLE_VIA_ANY }
 

Functions

static u8format_ip4_source_check_trace (u8 *s, va_list *va)
 
static uword ip4_source_check_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, ip4_source_check_type_t source_check_type)
 
static uword ip4_source_check_reachable_via_any (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword ip4_source_check_reachable_via_rx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (ip4_check_source_reachable_via_any, ip4_source_check_reachable_via_any)
 
 VLIB_NODE_FUNCTION_MULTIARCH (ip4_check_source_reachable_via_rx, ip4_source_check_reachable_via_rx)
 
static clib_error_tset_ip_source_check (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tip_source_check_accept (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
clib_error_tip4_source_check_init (vlib_main_t *vm)
 

Variables

vlib_node_registration_t ip4_check_source_reachable_via_any
 (constructor) VLIB_REGISTER_NODE (ip4_check_source_reachable_via_any) More...
 
vlib_node_registration_t ip4_check_source_reachable_via_rx
 (constructor) VLIB_REGISTER_NODE (ip4_check_source_reachable_via_rx) More...
 
static vlib_cli_command_t set_interface_ip_source_check_command
 (constructor) VLIB_CLI_COMMAND (set_interface_ip_source_check_command) More...
 
static vlib_cli_command_t ip_source_check_accept_command
 (constructor) VLIB_CLI_COMMAND (ip_source_check_accept_command) More...
 

Detailed Description

IPv4 Unicast Source Check.

This file contains the IPv4 interface unicast source check.

Definition in file ip4_source_check.c.

Enumeration Type Documentation

Enumerator
IP4_SOURCE_CHECK_NEXT_DROP 
IP4_SOURCE_CHECK_N_NEXT 

Definition at line 72 of file ip4_source_check.c.

Enumerator
IP4_SOURCE_CHECK_REACHABLE_VIA_RX 
IP4_SOURCE_CHECK_REACHABLE_VIA_ANY 

Definition at line 78 of file ip4_source_check.c.

Function Documentation

static u8* format_ip4_source_check_trace ( u8 s,
va_list *  va 
)
static

Definition at line 60 of file ip4_source_check.c.

+ Here is the call graph for this function:

clib_error_t* ip4_source_check_init ( vlib_main_t vm)

Definition at line 560 of file ip4_source_check.c.

+ Here is the caller graph for this function:

static uword ip4_source_check_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
ip4_source_check_type_t  source_check_type 
)
inlinestatic

Definition at line 90 of file ip4_source_check.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 302 of file ip4_source_check.c.

+ Here is the call graph for this function:

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

Definition at line 311 of file ip4_source_check.c.

+ Here is the call graph for this function:

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

Definition at line 471 of file ip4_source_check.c.

+ Here is the call graph for this function:

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

Definition at line 358 of file ip4_source_check.c.

+ Here is the call graph for this function:

VLIB_NODE_FUNCTION_MULTIARCH ( ip4_check_source_reachable_via_rx  ,
ip4_source_check_reachable_via_rx   
)

Variable Documentation

vlib_node_registration_t ip4_check_source_reachable_via_any
Initial value:
= {
.name = "ip4-source-check-via-any",
.vector_size = sizeof (u32),
.n_next_nodes = IP4_SOURCE_CHECK_N_NEXT,
.next_nodes = {
[IP4_SOURCE_CHECK_NEXT_DROP] = "error-drop",
},
.format_buffer = format_ip4_header,
}
format_function_t format_ip4_header
Definition: format.h:86
unsigned int u32
Definition: types.h:88
static uword ip4_source_check_reachable_via_any(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static u8 * format_ip4_source_check_trace(u8 *s, va_list *va)

(constructor) VLIB_REGISTER_NODE (ip4_check_source_reachable_via_any)

Definition at line 320 of file ip4_source_check.c.

vlib_node_registration_t ip4_check_source_reachable_via_rx
Initial value:
= {
.name = "ip4-source-check-via-rx",
.vector_size = sizeof (u32),
.n_next_nodes = IP4_SOURCE_CHECK_N_NEXT,
.next_nodes = {
[IP4_SOURCE_CHECK_NEXT_DROP] = "error-drop",
},
.format_buffer = format_ip4_header,
}
static uword ip4_source_check_reachable_via_rx(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
format_function_t format_ip4_header
Definition: format.h:86
unsigned int u32
Definition: types.h:88
static u8 * format_ip4_source_check_trace(u8 *s, va_list *va)

(constructor) VLIB_REGISTER_NODE (ip4_check_source_reachable_via_rx)

Definition at line 339 of file ip4_source_check.c.

vlib_cli_command_t ip_source_check_accept_command
static
Initial value:
= {
.path = "ip urpf-accept",
.short_help = "ip urpf-accept [table <table-id>] [add|del]",
}
static clib_error_t * ip_source_check_accept(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (ip_source_check_accept_command)

Definition at line 550 of file ip4_source_check.c.

vlib_cli_command_t set_interface_ip_source_check_command
static
Initial value:
= {
.path = "set interface ip source-check",
.function = set_ip_source_check,
.short_help = "set interface ip source-check <interface> [strict|loose] [del]",
}
static clib_error_t * set_ip_source_check(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (set_interface_ip_source_check_command)

Definition at line 463 of file ip4_source_check.c.