FD.io VPP  v21.01.1
Vector Packet Processing
bfd_api.c File Reference

BFD binary API implementation. More...

+ Include dependency graph for bfd_api.c:

Go to the source code of this file.

Macros

#define vl_typedefs   /* define message structures */
 
#define vl_endianfun   /* define message structures */
 
#define vl_print(handle, ...)   vlib_cli_output (handle, __VA_ARGS__)
 
#define vl_printfun
 
#define foreach_vpe_api_msg
 
#define BFD_UDP_API_PARAM_COMMON_CODE
 
#define BFD_UDP_API_PARAM_FROM_MP(mp)   clib_net_to_host_u32 (mp->sw_if_index), &local_addr, &peer_addr
 
#define vl_msg_name_crc_list
 

Functions

 pub_sub_handler (bfd_events, BFD_EVENTS)
 
static void vl_api_bfd_udp_add_t_handler (vl_api_bfd_udp_add_t *mp)
 
static void vl_api_bfd_udp_mod_t_handler (vl_api_bfd_udp_mod_t *mp)
 
static void vl_api_bfd_udp_del_t_handler (vl_api_bfd_udp_del_t *mp)
 
void send_bfd_udp_session_details (vl_api_registration_t *reg, u32 context, bfd_session_t *bs)
 
void bfd_event (bfd_main_t *bm, bfd_session_t *bs)
 
static void vl_api_bfd_udp_session_dump_t_handler (vl_api_bfd_udp_session_dump_t *mp)
 
static void vl_api_bfd_udp_session_set_flags_t_handler (vl_api_bfd_udp_session_set_flags_t *mp)
 
static void vl_api_bfd_auth_set_key_t_handler (vl_api_bfd_auth_set_key_t *mp)
 
static void vl_api_bfd_auth_del_key_t_handler (vl_api_bfd_auth_del_key_t *mp)
 
static void vl_api_bfd_auth_keys_dump_t_handler (vl_api_bfd_auth_keys_dump_t *mp)
 
static void vl_api_bfd_udp_auth_activate_t_handler (vl_api_bfd_udp_auth_activate_t *mp)
 
static void vl_api_bfd_udp_auth_deactivate_t_handler (vl_api_bfd_udp_auth_deactivate_t *mp)
 
static void vl_api_bfd_udp_set_echo_source_t_handler (vl_api_bfd_udp_set_echo_source_t *mp)
 
static void vl_api_bfd_udp_del_echo_source_t_handler (vl_api_bfd_udp_del_echo_source_t *mp)
 
static void vl_api_bfd_udp_get_echo_source_t_handler (vl_api_bfd_udp_get_echo_source_t *mp)
 
static void setup_message_id_table (api_main_t *am)
 
static clib_error_tbfd_api_hookup (vlib_main_t *vm)
 
 VLIB_API_INIT_FUNCTION (bfd_api_hookup)
 

Detailed Description

BFD binary API implementation.

Definition in file bfd_api.c.

Macro Definition Documentation

◆ BFD_UDP_API_PARAM_COMMON_CODE

#define BFD_UDP_API_PARAM_COMMON_CODE
Value:
ip46_address_t local_addr; \
ip46_address_t peer_addr; \
ip_address_decode(&mp->local_addr, &local_addr); \
ip_address_decode(&mp->peer_addr, &peer_addr);

Definition at line 69 of file bfd_api.c.

◆ BFD_UDP_API_PARAM_FROM_MP

#define BFD_UDP_API_PARAM_FROM_MP (   mp)    clib_net_to_host_u32 (mp->sw_if_index), &local_addr, &peer_addr

Definition at line 75 of file bfd_api.c.

◆ foreach_vpe_api_msg

#define foreach_vpe_api_msg
Value:
_ (BFD_UDP_ADD, bfd_udp_add) \
_ (BFD_UDP_MOD, bfd_udp_mod) \
_ (BFD_UDP_DEL, bfd_udp_del) \
_ (BFD_UDP_SESSION_DUMP, bfd_udp_session_dump) \
_ (BFD_UDP_SESSION_SET_FLAGS, bfd_udp_session_set_flags) \
_ (WANT_BFD_EVENTS, want_bfd_events) \
_ (BFD_AUTH_SET_KEY, bfd_auth_set_key) \
_ (BFD_AUTH_DEL_KEY, bfd_auth_del_key) \
_ (BFD_AUTH_KEYS_DUMP, bfd_auth_keys_dump) \
_ (BFD_UDP_AUTH_ACTIVATE, bfd_udp_auth_activate) \
_ (BFD_UDP_AUTH_DEACTIVATE, bfd_udp_auth_deactivate) \
_ (BFD_UDP_SET_ECHO_SOURCE, bfd_udp_set_echo_source) \
_ (BFD_UDP_DEL_ECHO_SOURCE, bfd_udp_del_echo_source) \
_ (BFD_UDP_GET_ECHO_SOURCE, bfd_udp_get_echo_source)
vnet_api_error_t bfd_auth_del_key(u32 conf_key_id)
delete existing authentication key
Definition: bfd_main.c:2244
vnet_api_error_t bfd_udp_del_echo_source()
unset echo-source interface
void bfd_udp_get_echo_source(int *is_set, u32 *sw_if_index, int *have_usable_ip4, ip4_address_t *ip4, int *have_usable_ip6, ip6_address_t *ip6)
get echo source information - used by CLI
Definition: bfd_udp.c:235
vnet_api_error_t bfd_auth_set_key(u32 conf_key_id, u8 auth_type, u8 key_len, const u8 *key)
create or modify bfd authentication key
Definition: bfd_main.c:2188
vnet_api_error_t bfd_udp_auth_activate(u32 sw_if_index, const ip46_address_t *local_addr, const ip46_address_t *peer_addr, u32 conf_key_id, u8 bfd_key_id, u8 is_delayed)
activate authentication for existing session
Definition: bfd_udp.c:858
vnet_api_error_t bfd_udp_session_set_flags(vlib_main_t *vm, u32 sw_if_index, const ip46_address_t *local_addr, const ip46_address_t *peer_addr, u8 admin_up_down)
set session admin down/up
Definition: bfd_udp.c:837
vnet_api_error_t bfd_udp_set_echo_source(u32 loopback_sw_if_index)
set echo-source interface
Definition: bfd_udp.c:83
vnet_api_error_t bfd_udp_auth_deactivate(u32 sw_if_index, const ip46_address_t *local_addr, const ip46_address_t *peer_addr, u8 is_delayed)
deactivate authentication for existing session
Definition: bfd_udp.c:889

Definition at line 51 of file bfd_api.c.

◆ vl_endianfun

#define vl_endianfun   /* define message structures */

Definition at line 39 of file bfd_api.c.

◆ vl_msg_name_crc_list

#define vl_msg_name_crc_list

Definition at line 404 of file bfd_api.c.

◆ vl_print

#define vl_print (   handle,
  ... 
)    vlib_cli_output (handle, __VA_ARGS__)

Definition at line 44 of file bfd_api.c.

◆ vl_printfun

#define vl_printfun

Definition at line 45 of file bfd_api.c.

◆ vl_typedefs

#define vl_typedefs   /* define message structures */

Definition at line 35 of file bfd_api.c.

Function Documentation

◆ bfd_api_hookup()

static clib_error_t* bfd_api_hookup ( vlib_main_t vm)
static

Definition at line 417 of file bfd_api.c.

+ Here is the call graph for this function:

◆ bfd_event()

void bfd_event ( bfd_main_t bm,
bfd_session_t bs 
)

Definition at line 178 of file bfd_api.c.

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

◆ pub_sub_handler()

pub_sub_handler ( bfd_events  ,
BFD_EVENTS   
)

◆ send_bfd_udp_session_details()

void send_bfd_udp_session_details ( vl_api_registration_t reg,
u32  context,
bfd_session_t bs 
)

Definition at line 135 of file bfd_api.c.

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

◆ setup_message_id_table()

static void setup_message_id_table ( api_main_t am)
static

Definition at line 409 of file bfd_api.c.

◆ vl_api_bfd_auth_del_key_t_handler()

static void vl_api_bfd_auth_del_key_t_handler ( vl_api_bfd_auth_del_key_t mp)
static

Definition at line 247 of file bfd_api.c.

+ Here is the call graph for this function:

◆ vl_api_bfd_auth_keys_dump_t_handler()

static void vl_api_bfd_auth_keys_dump_t_handler ( vl_api_bfd_auth_keys_dump_t mp)
static

Definition at line 256 of file bfd_api.c.

+ Here is the call graph for this function:

◆ vl_api_bfd_auth_set_key_t_handler()

static void vl_api_bfd_auth_set_key_t_handler ( vl_api_bfd_auth_set_key_t mp)
static

Definition at line 237 of file bfd_api.c.

+ Here is the call graph for this function:

◆ vl_api_bfd_udp_add_t_handler()

static void vl_api_bfd_udp_add_t_handler ( vl_api_bfd_udp_add_t mp)
static

Definition at line 79 of file bfd_api.c.

+ Here is the call graph for this function:

◆ vl_api_bfd_udp_auth_activate_t_handler()

static void vl_api_bfd_udp_auth_activate_t_handler ( vl_api_bfd_udp_auth_activate_t mp)
static

Definition at line 282 of file bfd_api.c.

+ Here is the call graph for this function:

◆ vl_api_bfd_udp_auth_deactivate_t_handler()

static void vl_api_bfd_udp_auth_deactivate_t_handler ( vl_api_bfd_udp_auth_deactivate_t mp)
static

Definition at line 300 of file bfd_api.c.

+ Here is the call graph for this function:

◆ vl_api_bfd_udp_del_echo_source_t_handler()

static void vl_api_bfd_udp_del_echo_source_t_handler ( vl_api_bfd_udp_del_echo_source_t mp)
static

Definition at line 333 of file bfd_api.c.

+ Here is the call graph for this function:

◆ vl_api_bfd_udp_del_t_handler()

static void vl_api_bfd_udp_del_t_handler ( vl_api_bfd_udp_del_t mp)
static

Definition at line 119 of file bfd_api.c.

+ Here is the call graph for this function:

◆ vl_api_bfd_udp_get_echo_source_t_handler()

static void vl_api_bfd_udp_get_echo_source_t_handler ( vl_api_bfd_udp_get_echo_source_t mp)
static

Definition at line 345 of file bfd_api.c.

+ Here is the call graph for this function:

◆ vl_api_bfd_udp_mod_t_handler()

static void vl_api_bfd_udp_mod_t_handler ( vl_api_bfd_udp_mod_t mp)
static

Definition at line 100 of file bfd_api.c.

+ Here is the call graph for this function:

◆ vl_api_bfd_udp_session_dump_t_handler()

static void vl_api_bfd_udp_session_dump_t_handler ( vl_api_bfd_udp_session_dump_t mp)
static

Definition at line 201 of file bfd_api.c.

+ Here is the call graph for this function:

◆ vl_api_bfd_udp_session_set_flags_t_handler()

static void vl_api_bfd_udp_session_set_flags_t_handler ( vl_api_bfd_udp_session_set_flags_t mp)
static

Definition at line 220 of file bfd_api.c.

+ Here is the call graph for this function:

◆ vl_api_bfd_udp_set_echo_source_t_handler()

static void vl_api_bfd_udp_set_echo_source_t_handler ( vl_api_bfd_udp_set_echo_source_t mp)
static

Definition at line 318 of file bfd_api.c.

+ Here is the call graph for this function:

◆ VLIB_API_INIT_FUNCTION()

VLIB_API_INIT_FUNCTION ( bfd_api_hookup  )
+ Here is the caller graph for this function: