FD.io VPP  v17.01.1-3-gc6833f8
Vector Packet Processing
bfd_udp.c File Reference
+ Include dependency graph for bfd_udp.c:

Go to the source code of this file.

Data Structures

struct  bfd_udp_main_t
 
struct  bfd_rpc_update_t
 

Macros

#define foreach_bfd_udp_error(F)
 
#define F(sym, string)   static char BFD_UDP_ERR_##sym##_STR[] = string;
 
#define F(sym, string)   BFD_UDP_ERR_##sym##_STR,
 
#define F(sym, str)   BFD_UDP_ERROR_##sym,
 

Enumerations

enum  bfd_udp_input_next_t { BFD_UDP_INPUT_NEXT_NORMAL, BFD_UDP_INPUT_NEXT_REPLY, BFD_UDP_INPUT_N_NEXT }
 
enum  bfd_udp_error_t { foreach_bfd_udp_error }
 

Functions

void bfd_udp_transport_to_buffer (vlib_main_t *vm, vlib_buffer_t *b, bfd_udp_session_t *bus)
 
void bfd_add_udp_transport (vlib_main_t *vm, vlib_buffer_t *b, bfd_udp_session_t *bus)
 
static bfd_session_tbfd_lookup_session (bfd_udp_main_t *bum, const bfd_udp_key_t *key)
 
static vnet_api_error_t bfd_udp_add_session_internal (bfd_udp_main_t *bum, u32 sw_if_index, u32 desired_min_tx_us, u32 required_min_rx_us, u8 detect_mult, const ip46_address_t *local_addr, const ip46_address_t *peer_addr)
 
static vnet_api_error_t bfd_udp_validate_api_input (u32 sw_if_index, const ip46_address_t *local_addr, const ip46_address_t *peer_addr)
 
vnet_api_error_t bfd_udp_add_session (u32 sw_if_index, u32 desired_min_tx_us, u32 required_min_rx_us, u8 detect_mult, const ip46_address_t *local_addr, const ip46_address_t *peer_addr)
 
vnet_api_error_t bfd_udp_del_session (u32 sw_if_index, const ip46_address_t *local_addr, const ip46_address_t *peer_addr)
 
static void bfd_udp4_find_headers (vlib_buffer_t *b, const ip4_header_t **ip4, const udp_header_t **udp)
 
static bfd_udp_error_t bfd_udp4_verify_transport (const ip4_header_t *ip4, const udp_header_t *udp, const bfd_session_t *bs)
 
static void bfd_rpc_update_session_cb (const bfd_rpc_update_t *a)
 
static void bfd_rpc_update_session (u32 bs_idx, const bfd_pkt_t *pkt)
 
static bfd_udp_error_t bfd_udp4_scan (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_buffer_t *b, bfd_session_t **bs_out)
 
static bfd_udp_error_t bfd_udp6_scan (vlib_main_t *vm, vlib_buffer_t *b)
 
static uword bfd_udp_input (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f, int is_ipv6)
 
static uword bfd_udp4_input (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
 
static uword bfd_udp6_input (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
 
static clib_error_tbfd_sw_interface_up_down (vnet_main_t *vnm, u32 sw_if_index, u32 flags)
 
 VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION (bfd_sw_interface_up_down)
 
static clib_error_tbfd_hw_interface_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 
 VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION (bfd_hw_interface_up_down)
 
static clib_error_tbfd_udp_init (vlib_main_t *vm)
 

Variables

static vlib_node_registration_t bfd_udp4_input_node
 (constructor) VLIB_REGISTER_NODE (bfd_udp4_input_node) More...
 
static vlib_node_registration_t bfd_udp6_input_node
 (constructor) VLIB_REGISTER_NODE (bfd_udp6_input_node) More...
 
bfd_udp_main_t bfd_udp_main
 
static char * bfd_udp_error_strings []
 

Macro Definition Documentation

#define F (   sym,
  string 
)    static char BFD_UDP_ERR_##sym##_STR[] = string;

Definition at line 308 of file bfd_udp.c.

#define F (   sym,
  string 
)    BFD_UDP_ERR_##sym##_STR,

Definition at line 308 of file bfd_udp.c.

#define F (   sym,
  str 
)    BFD_UDP_ERROR_##sym,

Definition at line 308 of file bfd_udp.c.

foreach_bfd_udp_error (   F)
Value:
F (NONE, "good bfd packets (processed)") \
F (BAD, "invalid bfd packets") \
F (DISABLED, "bfd packets received on disabled interfaces")
#define F(sym, string)
Definition: bfd_udp.c:308

Definition at line 292 of file bfd_udp.c.

Enumeration Type Documentation

Enumerator
foreach_bfd_udp_error 

Definition at line 307 of file bfd_udp.c.

Enumerator
BFD_UDP_INPUT_NEXT_NORMAL 
BFD_UDP_INPUT_NEXT_REPLY 
BFD_UDP_INPUT_N_NEXT 

Definition at line 285 of file bfd_udp.c.

Function Documentation

void bfd_add_udp_transport ( vlib_main_t vm,
vlib_buffer_t b,
bfd_udp_session_t bus 
)

Definition at line 75 of file bfd_udp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* bfd_hw_interface_up_down ( vnet_main_t vnm,
u32  hw_if_index,
u32  flags 
)
static

Definition at line 614 of file bfd_udp.c.

+ Here is the call graph for this function:

static bfd_session_t* bfd_lookup_session ( bfd_udp_main_t bum,
const bfd_udp_key_t *  key 
)
static

Definition at line 83 of file bfd_udp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void bfd_rpc_update_session ( u32  bs_idx,
const bfd_pkt_t *  pkt 
)
static

Definition at line 384 of file bfd_udp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void bfd_rpc_update_session_cb ( const bfd_rpc_update_t a)
static

Definition at line 379 of file bfd_udp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* bfd_sw_interface_up_down ( vnet_main_t vnm,
u32  sw_if_index,
u32  flags 
)
static

Definition at line 601 of file bfd_udp.c.

+ Here is the call graph for this function:

static void bfd_udp4_find_headers ( vlib_buffer_t b,
const ip4_header_t **  ip4,
const udp_header_t **  udp 
)
static

Definition at line 314 of file bfd_udp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword bfd_udp4_input ( vlib_main_t vm,
vlib_node_runtime_t rt,
vlib_frame_t f 
)
static

Definition at line 544 of file bfd_udp.c.

+ Here is the call graph for this function:

static bfd_udp_error_t bfd_udp4_scan ( vlib_main_t vm,
vlib_node_runtime_t rt,
vlib_buffer_t b,
bfd_session_t **  bs_out 
)
static

Definition at line 397 of file bfd_udp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static bfd_udp_error_t bfd_udp4_verify_transport ( const ip4_header_t ip4,
const udp_header_t udp,
const bfd_session_t bs 
)
static

Definition at line 337 of file bfd_udp.c.

+ Here is the caller graph for this function:

static uword bfd_udp6_input ( vlib_main_t vm,
vlib_node_runtime_t rt,
vlib_frame_t f 
)
static

Definition at line 574 of file bfd_udp.c.

+ Here is the call graph for this function:

static bfd_udp_error_t bfd_udp6_scan ( vlib_main_t vm,
vlib_buffer_t b 
)
static

Definition at line 460 of file bfd_udp.c.

+ Here is the caller graph for this function:

vnet_api_error_t bfd_udp_add_session ( u32  sw_if_index,
u32  desired_min_tx_us,
u32  required_min_rx_us,
u8  detect_mult,
const ip46_address_t *  local_addr,
const ip46_address_t *  peer_addr 
)

Definition at line 223 of file bfd_udp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static vnet_api_error_t bfd_udp_add_session_internal ( bfd_udp_main_t bum,
u32  sw_if_index,
u32  desired_min_tx_us,
u32  required_min_rx_us,
u8  detect_mult,
const ip46_address_t *  local_addr,
const ip46_address_t *  peer_addr 
)
static

Definition at line 95 of file bfd_udp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

vnet_api_error_t bfd_udp_del_session ( u32  sw_if_index,
const ip46_address_t *  local_addr,
const ip46_address_t *  peer_addr 
)

Definition at line 249 of file bfd_udp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* bfd_udp_init ( vlib_main_t vm)
static

Definition at line 629 of file bfd_udp.c.

+ Here is the call graph for this function:

static uword bfd_udp_input ( vlib_main_t vm,
vlib_node_runtime_t rt,
vlib_frame_t f,
int  is_ipv6 
)
static

Definition at line 470 of file bfd_udp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bfd_udp_transport_to_buffer ( vlib_main_t vm,
vlib_buffer_t b,
bfd_udp_session_t bus 
)

Definition at line 34 of file bfd_udp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static vnet_api_error_t bfd_udp_validate_api_input ( u32  sw_if_index,
const ip46_address_t *  local_addr,
const ip46_address_t *  peer_addr 
)
static

Definition at line 155 of file bfd_udp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION ( bfd_hw_interface_up_down  )

+ Here is the caller graph for this function:

VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION ( bfd_sw_interface_up_down  )

+ Here is the caller graph for this function:

Variable Documentation

static vlib_node_registration_t bfd_udp4_input_node
static
Initial value:
= {
.function = bfd_udp4_input,
.name = "bfd-udp4-input",
.vector_size = sizeof (u32),
.n_errors = BFD_UDP_N_ERROR,
.error_strings = bfd_udp_error_strings,
.format_trace = bfd_input_format_trace,
.n_next_nodes = BFD_UDP_INPUT_N_NEXT,
.next_nodes =
{
[BFD_UDP_INPUT_NEXT_NORMAL] = "error-drop",
[BFD_UDP_INPUT_NEXT_REPLY] = "ip4-lookup",
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static uword bfd_udp4_input(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
Definition: bfd_udp.c:544
static char * bfd_udp_error_strings[]
Definition: bfd_udp.c:301
u8 * bfd_input_format_trace(u8 *s, va_list *args)
Definition: bfd_main.c:354
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (bfd_udp4_input_node)

Definition at line 29 of file bfd_udp.c.

static vlib_node_registration_t bfd_udp6_input_node
static
Initial value:
= {
.function = bfd_udp6_input,
.name = "bfd-udp6-input",
.vector_size = sizeof (u32),
.n_errors = BFD_UDP_N_ERROR,
.error_strings = bfd_udp_error_strings,
.format_trace = bfd_input_format_trace,
.n_next_nodes = BFD_UDP_INPUT_N_NEXT,
.next_nodes =
{
[BFD_UDP_INPUT_NEXT_NORMAL] = "error-drop",
[BFD_UDP_INPUT_NEXT_REPLY] = "ip6-lookup",
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static char * bfd_udp_error_strings[]
Definition: bfd_udp.c:301
static uword bfd_udp6_input(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
Definition: bfd_udp.c:574
u8 * bfd_input_format_trace(u8 *s, va_list *args)
Definition: bfd_main.c:354
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (bfd_udp6_input_node)

Definition at line 30 of file bfd_udp.c.

char* bfd_udp_error_strings[]
static
Initial value:
= {
#define F(sym, string)
}
#define foreach_bfd_udp_error(F)
Definition: bfd_udp.c:292
#define F(sym, string)
Definition: bfd_udp.c:308

Definition at line 301 of file bfd_udp.c.

bfd_udp_main_t bfd_udp_main

Definition at line 32 of file bfd_udp.c.