FD.io VPP  v18.01.2-1-g9b554f3
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 (unix_shared_memory_queue_t *q, 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 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

#define BFD_UDP_API_PARAM_COMMON_CODE
Value:
ip46_address_t local_addr; \
memset (&local_addr, 0, sizeof (local_addr)); \
ip46_address_t peer_addr; \
memset (&peer_addr, 0, sizeof (peer_addr)); \
if (mp->is_ipv6) \
{ \
clib_memcpy (&local_addr.ip6, mp->local_addr, sizeof (local_addr.ip6)); \
clib_memcpy (&peer_addr.ip6, mp->peer_addr, sizeof (peer_addr.ip6)); \
} \
else \
{ \
clib_memcpy (&local_addr.ip4, mp->local_addr, sizeof (local_addr.ip4)); \
clib_memcpy (&peer_addr.ip4, mp->peer_addr, sizeof (peer_addr.ip4)); \
}
#define clib_memcpy(a, b, c)
Definition: string.h:75

Definition at line 67 of file bfd_api.c.

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

Definition at line 83 of file bfd_api.c.

#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)
vnet_api_error_t bfd_auth_del_key(u32 conf_key_id)
delete existing authentication key
Definition: bfd_main.c:2014
vnet_api_error_t bfd_udp_del_echo_source()
unset echo-source interface
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:1960
vnet_api_error_t bfd_udp_session_set_flags(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:733
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:750
vnet_api_error_t bfd_udp_set_echo_source(u32 loopback_sw_if_index)
set echo-source interface
Definition: bfd_udp.c:72
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:772

Definition at line 50 of file bfd_api.c.

#define vl_endianfun   /* define message structures */

Definition at line 38 of file bfd_api.c.

#define vl_msg_name_crc_list

Definition at line 371 of file bfd_api.c.

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

Definition at line 43 of file bfd_api.c.

#define vl_printfun

Definition at line 44 of file bfd_api.c.

#define vl_typedefs   /* define message structures */

Definition at line 34 of file bfd_api.c.

Function Documentation

static clib_error_t* bfd_api_hookup ( vlib_main_t vm)
static

Definition at line 384 of file bfd_api.c.

+ Here is the call graph for this function:

void bfd_event ( bfd_main_t bm,
bfd_session_t bs 
)

Definition at line 198 of file bfd_api.c.

+ Here is the caller graph for this function:

pub_sub_handler ( bfd_events  ,
BFD_EVENTS   
)
void send_bfd_udp_session_details ( unix_shared_memory_queue_t q,
u32  context,
bfd_session_t bs 
)

Definition at line 143 of file bfd_api.c.

+ Here is the call graph for this function:

static void setup_message_id_table ( api_main_t am)
static

Definition at line 376 of file bfd_api.c.

+ Here is the caller graph for this function:

static void vl_api_bfd_auth_del_key_t_handler ( vl_api_bfd_auth_del_key_t mp)
static

Definition at line 266 of file bfd_api.c.

+ Here is the call graph for this function:

static void vl_api_bfd_auth_keys_dump_t_handler ( vl_api_bfd_auth_keys_dump_t mp)
static

Definition at line 275 of file bfd_api.c.

+ Here is the call graph for this function:

static void vl_api_bfd_auth_set_key_t_handler ( vl_api_bfd_auth_set_key_t mp)
static

Definition at line 256 of file bfd_api.c.

+ Here is the call graph for this function:

static void vl_api_bfd_udp_add_t_handler ( vl_api_bfd_udp_add_t mp)
static

Definition at line 87 of file bfd_api.c.

+ Here is the call graph for this function:

static void vl_api_bfd_udp_auth_activate_t_handler ( vl_api_bfd_udp_auth_activate_t mp)
static

Definition at line 302 of file bfd_api.c.

+ Here is the call graph for this function:

static void vl_api_bfd_udp_auth_deactivate_t_handler ( vl_api_bfd_udp_auth_deactivate_t mp)
static

Definition at line 320 of file bfd_api.c.

+ Here is the call graph for this function:

static void vl_api_bfd_udp_del_echo_source_t_handler ( vl_api_bfd_udp_del_echo_source_t mp)
static

Definition at line 353 of file bfd_api.c.

+ Here is the call graph for this function:

static void vl_api_bfd_udp_del_t_handler ( vl_api_bfd_udp_del_t mp)
static

Definition at line 127 of file bfd_api.c.

+ Here is the call graph for this function:

static void vl_api_bfd_udp_mod_t_handler ( vl_api_bfd_udp_mod_t mp)
static

Definition at line 108 of file bfd_api.c.

+ Here is the call graph for this function:

static void vl_api_bfd_udp_session_dump_t_handler ( vl_api_bfd_udp_session_dump_t mp)
static

Definition at line 221 of file bfd_api.c.

+ Here is the call graph for this function:

static void vl_api_bfd_udp_session_set_flags_t_handler ( vl_api_bfd_udp_session_set_flags_t mp)
static

Definition at line 241 of file bfd_api.c.

+ Here is the call graph for this function:

static void vl_api_bfd_udp_set_echo_source_t_handler ( vl_api_bfd_udp_set_echo_source_t mp)
static

Definition at line 338 of file bfd_api.c.

+ Here is the call graph for this function:

VLIB_API_INIT_FUNCTION ( bfd_api_hookup  )

+ Here is the caller graph for this function: