FD.io VPP  v16.06
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...
 
vlib_cli_command_t oam_add_del_target_command
 (constructor) VLIB_CLI_COMMAND (oam_add_del_target_command) More...
 
vlib_node_registration_t oam_process_node
 (constructor) VLIB_REGISTER_NODE (oam_process_node) More...
 
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 389 of file oam.c.

Enumeration Type Documentation

Enumerator
OAM_N_ERROR 

Definition at line 393 of file oam.c.

enum oam_next_t
Enumerator
OAM_NEXT_DROP 
OAM_NEXT_PUNT 
OAM_N_NEXT 

Definition at line 421 of file oam.c.

Function Documentation

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

Definition at line 319 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 377 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 25 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 111 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 280 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 300 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 428 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 159 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 342 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 62 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
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:111

(constructor) VLIB_CLI_COMMAND (oam_add_del_target_command)

Definition at line 152 of file oam.c.

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

Definition at line 400 of file oam.c.

oam_main_t oam_main

Definition at line 21 of file oam.c.

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",
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
#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:428
unsigned int u32
Definition: types.h:88
static char * oam_error_strings[]
Definition: oam.c:400
static u8 * format_swap_trace(u8 *s, va_list *args)
Definition: oam.c:377

(constructor) VLIB_REGISTER_NODE (oam_node)

Definition at line 23 of file oam.c.

vlib_node_registration_t oam_process_node
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:159

(constructor) VLIB_REGISTER_NODE (oam_process_node)

Definition at line 273 of file oam.c.

vlib_cli_command_t show_oam_command
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:342

(constructor) VLIB_CLI_COMMAND (show_oam_command)

Definition at line 365 of file oam.c.