vpe_client_registration_t *reg;
vl_api_registration_t *vl_reg;
/* *INDENT-OFF* */
- pool_foreach (reg, vam->bfd_events_registrations, ({
+ pool_foreach (reg, vam->bfd_events_registrations) {
vl_reg = vl_api_client_index_to_registration (reg->client_index);
if (vl_reg)
{
send_bfd_udp_session_details (vl_reg, 0, bs);
}
}
- }));
+ }
/* *INDENT-ON* */
}
bfd_session_t *bs = NULL;
/* *INDENT-OFF* */
- pool_foreach (bs, bfd_main.sessions, ({
+ pool_foreach (bs, bfd_main.sessions) {
if (bs->transport == BFD_TRANSPORT_UDP4 ||
bs->transport == BFD_TRANSPORT_UDP6)
send_bfd_udp_session_details (reg, mp->context, bs);
- }));
+ }
/* *INDENT-ON* */
}
BFD_UDP_API_PARAM_COMMON_CODE;
- rv = bfd_udp_session_set_flags (BFD_UDP_API_PARAM_FROM_MP (mp),
+ rv = bfd_udp_session_set_flags (vlib_get_main (),
+ BFD_UDP_API_PARAM_FROM_MP (mp),
clib_net_to_host_u32 (mp->flags) &
IF_STATUS_API_FLAG_ADMIN_UP);
vl_api_bfd_auth_keys_details_t *rmp = NULL;
/* *INDENT-OFF* */
- pool_foreach (key, bfd_main.auth_keys, ({
+ pool_foreach (key, bfd_main.auth_keys) {
rmp = vl_msg_api_alloc (sizeof (*rmp));
clib_memset (rmp, 0, sizeof (*rmp));
rmp->_vl_msg_id = ntohs (VL_API_BFD_AUTH_KEYS_DETAILS);
rmp->auth_type = key->auth_type;
rmp->use_count = clib_host_to_net_u32 (key->use_count);
vl_api_send_msg (reg, (u8 *)rmp);
- }));
+ }
/* *INDENT-ON* */
}
static clib_error_t *
bfd_api_hookup (vlib_main_t * vm)
{
- api_main_t *am = &api_main;
+ api_main_t *am = vlibapi_get_main ();
#define _(N, n) \
vl_msg_api_set_handlers (VL_API_##N, #n, vl_api_##n##_t_handler, \