FD.io VPP  v16.09
Vector Packet Processing
ip4_source_and_port_range_check.c File Reference
+ Include dependency graph for ip4_source_and_port_range_check.c:

Go to the source code of this file.

Data Structures

struct  ip4_source_and_port_range_check_trace_t
 

Macros

#define foreach_ip4_source_and_port_range_check_error
 

Enumerations

enum  ip4_source_and_port_range_check_error_t { IP4_SOURCE_AND_PORT_RANGE_CHECK_N_ERROR }
 
enum  ip4_source_and_port_range_check_next_t { IP4_SOURCE_AND_PORT_RANGE_CHECK_NEXT_DROP, IP4_SOURCE_AND_PORT_RANGE_CHECK_N_NEXT }
 

Functions

static u8format_ip4_source_and_port_range_check_trace (u8 *s, va_list *va)
 
static u32 check_adj_port_range_x1 (ip_adjacency_t *adj, u16 dst_port, u32 next)
 
static uword ip4_source_and_port_range_check_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword ip4_source_and_port_range_check (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
int set_ip_source_and_port_range_check (vlib_main_t *vm, u32 *fib_index, u32 sw_if_index, u32 is_add)
 
static clib_error_tset_ip_source_and_port_range_check_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
 VLIB_CLI_COMMAND (set_interface_ip_source_and_port_range_check_command, static)
 
static u8format_source_and_port_rc_adjacency (u8 *s, va_list *args)
 
clib_error_tip4_source_and_port_range_check_init (vlib_main_t *vm)
 
int add_port_range_adjacency (ip4_address_t *address, u32 length, u32 adj_index, u16 *low_ports, u16 *high_ports, u32 fib_index)
 
int remove_port_range_adjacency (ip4_address_t *address, u32 length, u32 adj_index, u16 *low_ports, u16 *high_ports, u32 fib_index)
 
int ip6_source_and_port_range_check_add_del (ip6_address_t *address, u32 length, u32 vrf_id, u16 *low_ports, u16 *high_ports, int is_add)
 
int ip4_source_and_port_range_check_add_del (ip4_address_t *address, u32 length, u32 vrf_id, u16 *low_ports, u16 *high_ports, int is_add)
 
static clib_error_tip_source_and_port_range_check_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_source_and_port_range_check_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

vlib_node_registration_t ip4_source_port_and_range_check
 (constructor) VLIB_REGISTER_NODE (ip4_source_port_and_range_check) More...
 
static char * ip4_source_and_port_range_check_error_strings []
 
static vlib_cli_command_t ip_source_and_port_range_check_command
 (constructor) VLIB_CLI_COMMAND (ip_source_and_port_range_check_command) More...
 
static vlib_cli_command_t show_source_and_port_range_check
 (constructor) VLIB_CLI_COMMAND (show_source_and_port_range_check) More...
 

Macro Definition Documentation

#define foreach_ip4_source_and_port_range_check_error
Value:
_(CHECK_FAIL, "ip4 source and port range check bad packets") \
_(CHECK_OK, "ip4 source and port range check good packets")

Definition at line 21 of file ip4_source_and_port_range_check.c.

Enumeration Type Documentation

Enumerator
IP4_SOURCE_AND_PORT_RANGE_CHECK_N_ERROR 

Definition at line 25 of file ip4_source_and_port_range_check.c.

Enumerator
IP4_SOURCE_AND_PORT_RANGE_CHECK_NEXT_DROP 
IP4_SOURCE_AND_PORT_RANGE_CHECK_N_NEXT 

Definition at line 67 of file ip4_source_and_port_range_check.c.

Function Documentation

int add_port_range_adjacency ( ip4_address_t address,
u32  length,
u32  adj_index,
u16 low_ports,
u16 high_ports,
u32  fib_index 
)

Definition at line 706 of file ip4_source_and_port_range_check.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 check_adj_port_range_x1 ( ip_adjacency_t adj,
u16  dst_port,
u32  next 
)
inlinestatic

Definition at line 75 of file ip4_source_and_port_range_check.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 50 of file ip4_source_and_port_range_check.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 646 of file ip4_source_and_port_range_check.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 481 of file ip4_source_and_port_range_check.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ip4_source_and_port_range_check_add_del ( ip4_address_t address,
u32  length,
u32  vrf_id,
u16 low_ports,
u16 high_ports,
int  is_add 
)

Definition at line 864 of file ip4_source_and_port_range_check.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* ip4_source_and_port_range_check_init ( vlib_main_t vm)

Definition at line 684 of file ip4_source_and_port_range_check.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword ip4_source_and_port_range_check_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
inlinestatic

Definition at line 131 of file ip4_source_and_port_range_check.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ip6_source_and_port_range_check_add_del ( ip6_address_t address,
u32  length,
u32  vrf_id,
u16 low_ports,
u16 high_ports,
int  is_add 
)

Definition at line 854 of file ip4_source_and_port_range_check.c.

+ Here is the caller graph for this function:

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

Definition at line 905 of file ip4_source_and_port_range_check.c.

+ Here is the call graph for this function:

int remove_port_range_adjacency ( ip4_address_t address,
u32  length,
u32  adj_index,
u16 low_ports,
u16 high_ports,
u32  fib_index 
)

Definition at line 785 of file ip4_source_and_port_range_check.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int set_ip_source_and_port_range_check ( vlib_main_t vm,
u32 fib_index,
u32  sw_if_index,
u32  is_add 
)

Definition at line 508 of file ip4_source_and_port_range_check.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 541 of file ip4_source_and_port_range_check.c.

+ Here is the call graph for this function:

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

Definition at line 1015 of file ip4_source_and_port_range_check.c.

+ Here is the call graph for this function:

VLIB_CLI_COMMAND ( set_interface_ip_source_and_port_range_check_command  ,
static   
)

+ Here is the caller graph for this function:

Variable Documentation

char* ip4_source_and_port_range_check_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_ip4_source_and_port_range_check_error

Definition at line 33 of file ip4_source_and_port_range_check.c.

vlib_node_registration_t ip4_source_port_and_range_check
Initial value:
= {
.name = "ip4-source-and-port-range-check",
.vector_size = sizeof (u32),
.next_nodes = {
},
.format_buffer = format_ip4_header,
}
static u8 * format_ip4_source_and_port_range_check_trace(u8 *s, va_list *va)
#define ARRAY_LEN(x)
Definition: clib.h:59
format_function_t format_ip4_header
Definition: format.h:78
unsigned int u32
Definition: types.h:88
static uword ip4_source_and_port_range_check(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static char * ip4_source_and_port_range_check_error_strings[]

(constructor) VLIB_REGISTER_NODE (ip4_source_port_and_range_check)

Definition at line 19 of file ip4_source_and_port_range_check.c.

vlib_cli_command_t ip_source_and_port_range_check_command
static
Initial value:
= {
.path = "set ip source-and-port-range-check",
.short_help =
"set ip source-and-port-range-check <ip-addr>/<mask> [range <nn>-<nn> tcp-vrf <id>] [vrf <id>] [del]",
}
static clib_error_t * ip_source_and_port_range_check_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (ip_source_and_port_range_check_command)

Definition at line 1005 of file ip4_source_and_port_range_check.c.

vlib_cli_command_t show_source_and_port_range_check
static
Initial value:
= {
.path = "show ip source-and-port-range-check",
.short_help =
"show ip source-and-port-range-check vrf <nn> <ip-addr> <port>",
}
static clib_error_t * show_source_and_port_range_check_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (show_source_and_port_range_check)

Definition at line 1106 of file ip4_source_and_port_range_check.c.