FD.io VPP  v18.07-rc0-415-g6c78436
Vector Packet Processing
oam.c File Reference
+ Include dependency graph for oam.c:

Go to the source code of this file.

Data Structures

struct  oam_trace_t
 

Macros

#define foreach_oam_error
 

Enumerations

enum  oam_error_t { OAM_N_ERROR }
 
enum  oam_next_t { OAM_NEXT_DROP, OAM_NEXT_PUNT, OAM_N_NEXT }
 

Functions

static void init_oam_packet_template (oam_main_t *om, oam_target_t *t)
 
int vpe_oam_add_del_target (ip4_address_t *src_address, ip4_address_t *dst_address, u32 fib_id, int is_add)
 
static clib_error_toam_add_del_target_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static uword oam_process (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f_arg)
 
static clib_error_toam_config (vlib_main_t *vm, unformat_input_t *input)
 
static clib_error_toam_init (vlib_main_t *vm)
 
static u8format_oam_target (u8 *s, va_list *args)
 
static clib_error_tshow_oam_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static u8format_swap_trace (u8 *s, va_list *args)
 
static uword oam_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 

Variables

oam_main_t oam_main
 
static vlib_node_registration_t oam_node
 (constructor) VLIB_REGISTER_NODE (oam_node) More...
 
static vlib_cli_command_t oam_add_del_target_command
 (constructor) VLIB_CLI_COMMAND (oam_add_del_target_command) More...
 
static vlib_node_registration_t oam_process_node
 (constructor) VLIB_REGISTER_NODE (oam_process_node) More...
 
static vlib_cli_command_t show_oam_command
 (constructor) VLIB_CLI_COMMAND (show_oam_command) More...
 
static char * oam_error_strings []
 

Macro Definition Documentation

#define foreach_oam_error
Value:
_(PROCESSED, "vpe icmp4 oam replies processed") \
_(DROPPED, "icmp4 replies dropped (no registration)")

Definition at line 407 of file oam.c.

Enumeration Type Documentation

Enumerator
OAM_N_ERROR 

Definition at line 411 of file oam.c.

enum oam_next_t
Enumerator
OAM_NEXT_DROP 
OAM_NEXT_PUNT 
OAM_N_NEXT 

Definition at line 440 of file oam.c.

Function Documentation

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

Definition at line 334 of file oam.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 395 of file oam.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void init_oam_packet_template ( oam_main_t om,
oam_target_t t 
)
static

Definition at line 22 of file oam.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 112 of file oam.c.

+ Here is the call graph for this function:

static clib_error_t* oam_config ( vlib_main_t vm,
unformat_input_t input 
)
static

Definition at line 292 of file oam.c.

+ Here is the call graph for this function:

static clib_error_t* oam_init ( vlib_main_t vm)
static

Definition at line 314 of file oam.c.

+ Here is the call graph for this function:

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

Definition at line 448 of file oam.c.

+ Here is the call graph for this function:

static uword oam_process ( vlib_main_t vm,
vlib_node_runtime_t rt,
vlib_frame_t f_arg 
)
static

Definition at line 161 of file oam.c.

+ Here is the call graph for this function:

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

Definition at line 356 of file oam.c.

+ Here is the call graph for this function:

int vpe_oam_add_del_target ( ip4_address_t src_address,
ip4_address_t dst_address,
u32  fib_id,
int  is_add 
)

Definition at line 60 of file oam.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_cli_command_t oam_add_del_target_command
static
Initial value:
= {
.path = "oam",
.short_help = "oam [add|del] target <ip4-address> fib <fib-id>",
}
static clib_error_t * oam_add_del_target_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: oam.c:112

(constructor) VLIB_CLI_COMMAND (oam_add_del_target_command)

Definition at line 153 of file oam.c.

char* oam_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_oam_error
Definition: oam.c:407

Definition at line 419 of file oam.c.

oam_main_t oam_main

Definition at line 17 of file oam.c.

static vlib_node_registration_t oam_node
static
Initial value:
= {
.function = oam_node_fn,
.name = "vpe-icmp4-oam",
.vector_size = sizeof (u32),
.format_trace = format_swap_trace,
.error_strings = oam_error_strings,
.n_next_nodes = OAM_N_NEXT,
.next_nodes = {
[OAM_NEXT_DROP] = "error-drop",
[OAM_NEXT_PUNT] = "error-punt",
},
}
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:59
static uword oam_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: oam.c:448
static char * oam_error_strings[]
Definition: oam.c:419
static u8 * format_swap_trace(u8 *s, va_list *args)
Definition: oam.c:395

(constructor) VLIB_REGISTER_NODE (oam_node)

Definition at line 19 of file oam.c.

vlib_node_registration_t oam_process_node
static
Initial value:
= {
.function = oam_process,
.name = "vpe-oam-process",
}
static uword oam_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f_arg)
Definition: oam.c:161

(constructor) VLIB_REGISTER_NODE (oam_process_node)

Definition at line 284 of file oam.c.

vlib_cli_command_t show_oam_command
static
Initial value:
= {
.path = "show oam",
.short_help = "show oam",
.function = show_oam_command_fn,
}
static clib_error_t * show_oam_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: oam.c:356

(constructor) VLIB_CLI_COMMAND (show_oam_command)

Definition at line 380 of file oam.c.