FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
urpf.c File Reference
+ Include dependency graph for urpf.c:

Go to the source code of this file.

Functions

u8format_urpf_mode (u8 *s, va_list *a)
 
static uword unformat_urpf_mode (unformat_input_t *input, va_list *args)
 
void urpf_update (urpf_mode_t mode, u32 sw_if_index, ip_address_family_t af, vlib_dir_t dir)
 
static clib_error_turpf_cli_update (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_turpf_cli_accept (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

static const char * urpf_feat_arcs [N_AF][VLIB_N_DIR]
 
static const char * urpf_feats [N_AF][VLIB_N_DIR][URPF_N_MODES]
 
static urpf_mode_turpf_cfgs [N_AF][VLIB_N_DIR]
 Per-af, per-direction, per-interface uRPF configs. 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 urpf_accept_command
 (constructor) VLIB_CLI_COMMAND (urpf_accept_command) More...
 

Function Documentation

◆ format_urpf_mode()

u8* format_urpf_mode ( u8 s,
va_list *  a 
)

Definition at line 64 of file urpf.c.

◆ unformat_urpf_mode()

static uword unformat_urpf_mode ( unformat_input_t input,
va_list *  args 
)
static

Definition at line 81 of file urpf.c.

+ Here is the caller graph for this function:

◆ urpf_cli_accept()

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

Definition at line 241 of file urpf.c.

+ Here is the call graph for this function:

◆ urpf_cli_update()

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

Definition at line 127 of file urpf.c.

+ Here is the call graph for this function:

◆ urpf_update()

void urpf_update ( urpf_mode_t  mode,
u32  sw_if_index,
ip_address_family_t  af,
vlib_dir_t  dir 
)

Definition at line 99 of file urpf.c.

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

Variable Documentation

◆ set_interface_ip_source_check_command

vlib_cli_command_t set_interface_ip_source_check_command
static
Initial value:
= {
.path = "set urpf",
.function = urpf_cli_update,
.short_help = "set urpf [ip4|ip6] [rx|tx] [off|strict|loose] <INTERFACE>",
}

(constructor) VLIB_CLI_COMMAND (set_interface_ip_source_check_command)

Definition at line 233 of file urpf.c.

◆ urpf_accept_command

vlib_cli_command_t urpf_accept_command
static
Initial value:
= {
.path = "set urpf-accept",
.function = urpf_cli_accept,
.short_help = "urpf-accept [table <table-id>] [add|del] <PREFIX>",
}

(constructor) VLIB_CLI_COMMAND (urpf_accept_command)

Definition at line 310 of file urpf.c.

◆ urpf_cfgs

urpf_mode_t* urpf_cfgs[N_AF][VLIB_N_DIR]
static

Per-af, per-direction, per-interface uRPF configs.

Definition at line 61 of file urpf.c.

◆ urpf_feat_arcs

const char* urpf_feat_arcs[N_AF][VLIB_N_DIR]
static
Initial value:
=
{
[AF_IP4] = {
[VLIB_RX] = "ip4-unicast",
[VLIB_TX] = "ip4-output",
},
[AF_IP6] = {
[VLIB_RX] = "ip6-unicast",
[VLIB_TX] = "ip6-output",
},
}

Definition at line 21 of file urpf.c.

◆ urpf_feats

const char* urpf_feats[N_AF][VLIB_N_DIR][URPF_N_MODES]
static
Initial value:
=
{
[AF_IP4] = {
[VLIB_RX] = {
[URPF_MODE_STRICT] = "ip4-rx-urpf-strict",
[URPF_MODE_LOOSE] = "ip4-rx-urpf-loose",
},
[VLIB_TX] = {
[URPF_MODE_STRICT] = "ip4-tx-urpf-strict",
[URPF_MODE_LOOSE] = "ip4-tx-urpf-loose",
},
},
[AF_IP6] = {
[VLIB_RX] = {
[URPF_MODE_STRICT] = "ip6-rx-urpf-strict",
[URPF_MODE_LOOSE] = "ip6-rx-urpf-loose",
},
[VLIB_TX] = {
[URPF_MODE_STRICT] = "ip6-tx-urpf-strict",
[URPF_MODE_LOOSE] = "ip6-tx-urpf-loose",
},
},
}

Definition at line 33 of file urpf.c.

AF_IP4
@ AF_IP4
Definition: ip_types.h:23
VLIB_RX
@ VLIB_RX
Definition: defs.h:46
urpf_cli_accept
static clib_error_t * urpf_cli_accept(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: urpf.c:241
urpf_cli_update
static clib_error_t * urpf_cli_update(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: urpf.c:127
AF_IP6
@ AF_IP6
Definition: ip_types.h:24
VLIB_TX
@ VLIB_TX
Definition: defs.h:47