FD.io VPP  v19.01.3-6-g70449b9b9
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

◆ ip4_source_check_next_t

Enumerator
IP4_SOURCE_CHECK_NEXT_DROP 
IP4_SOURCE_CHECK_N_NEXT 

Definition at line 72 of file ip4_source_check.c.

◆ ip4_source_check_type_t

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

◆ format_ip4_source_check_trace()

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:

◆ ip4_source_check_init()

clib_error_t* ip4_source_check_init ( vlib_main_t vm)

Definition at line 540 of file ip4_source_check.c.

+ Here is the caller graph for this function:

◆ ip4_source_check_inline()

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:

◆ ip4_source_check_reachable_via_any()

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 278 of file ip4_source_check.c.

+ Here is the call graph for this function:

◆ ip4_source_check_reachable_via_rx()

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 287 of file ip4_source_check.c.

+ Here is the call graph for this function:

◆ ip_source_check_accept()

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 449 of file ip4_source_check.c.

+ Here is the call graph for this function:

◆ set_ip_source_check()

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 334 of file ip4_source_check.c.

+ Here is the call graph for this function:

◆ VLIB_NODE_FUNCTION_MULTIARCH() [1/2]

◆ VLIB_NODE_FUNCTION_MULTIARCH() [2/2]

VLIB_NODE_FUNCTION_MULTIARCH ( ip4_check_source_reachable_via_rx  ,
ip4_source_check_reachable_via_rx   
)

Variable Documentation

◆ ip4_check_source_reachable_via_any

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 = {
},
.format_buffer = format_ip4_header,
}
format_function_t format_ip4_header
Definition: format.h:83
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 296 of file ip4_source_check.c.

◆ ip4_check_source_reachable_via_rx

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 = {
},
.format_buffer = format_ip4_header,
}
format_function_t format_ip4_header
Definition: format.h:83
unsigned int u32
Definition: types.h:88
static uword ip4_source_check_reachable_via_rx(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_rx)

Definition at line 315 of file ip4_source_check.c.

◆ ip_source_check_accept_command

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 530 of file ip4_source_check.c.

◆ set_interface_ip_source_check_command

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 441 of file ip4_source_check.c.