FD.io VPP  v19.04.1-1-ge4a0f9f
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

#define BFD_UDP_API_PARAM_COMMON_CODE
Value:
ip46_address_t local_addr; \
clib_memset (&local_addr, 0, sizeof (local_addr)); \
ip46_address_t peer_addr; \
clib_memset (&peer_addr, 0, sizeof (peer_addr)); \
if (mp->is_ipv6) \
{ \
clib_memcpy_fast (&local_addr.ip6, mp->local_addr, sizeof (local_addr.ip6)); \
clib_memcpy_fast (&peer_addr.ip6, mp->peer_addr, sizeof (peer_addr.ip6)); \
} \
else \
{ \
clib_memcpy_fast (&local_addr.ip4, mp->local_addr, sizeof (local_addr.ip4)); \
clib_memcpy_fast (&peer_addr.ip4, mp->peer_addr, sizeof (peer_addr.ip4)); \
}
#define clib_memcpy_fast(a, b, c)
Definition: string.h:81
clib_memset(h->entries, 0, sizeof(h->entries[0])*entries)

Definition at line 68 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 84 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) \
_ (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:2219
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:230
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:2163
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:801
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:822
vnet_api_error_t bfd_udp_set_echo_source(u32 loopback_sw_if_index)
set echo-source interface
Definition: bfd_udp.c:78
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:853

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 424 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 437 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 200 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 ( vl_api_registration_t reg,
u32  context,
bfd_session_t bs 
)

Definition at line 144 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 429 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 267 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 276 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 257 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 88 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 128 of file bfd_api.c.

+ Here is the call graph for this function:

static void vl_api_bfd_udp_get_echo_source_t_handler ( vl_api_bfd_udp_get_echo_source_t mp)
static

Definition at line 365 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 109 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 223 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 242 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: