if (!bfd_info)
return;
+#if HAVE_BFDD == 0
if (CHECK_FLAG(bfd_info->flags, BFD_FLAG_PARAM_CFG))
vty_out(vty, " ip pim bfd %d %d %d\n", bfd_info->detect_mult,
bfd_info->required_min_rx, bfd_info->desired_min_tx);
else
+#endif /* ! HAVE_BFDD */
vty_out(vty, " ip pim bfd\n");
}
* pim_bfd_show_info - Show BFD info structure
*/
void pim_bfd_show_info(struct vty *vty, void *bfd_info, json_object *json_obj,
- u_char use_json, int param_only)
+ bool use_json, int param_only)
{
if (param_only)
bfd_show_param(vty, (struct bfd_info *)bfd_info, 1, 0, use_json,
/*
* pim_bfd_info_free - Free BFD info structure
*/
-void pim_bfd_info_free(void **bfd_info)
+void pim_bfd_info_free(struct bfd_info **bfd_info)
{
- bfd_info_free((struct bfd_info **)bfd_info);
+ bfd_info_free(bfd_info);
}
static void pim_bfd_reg_dereg_nbr(struct pim_neighbor *nbr, int command)
if (command != ZEBRA_BFD_DEST_DEREGISTER)
pim_bfd_info_nbr_create(pim_ifp, neigh);
else
- bfd_info_free((struct bfd_info **)&neigh->bfd_info);
+ pim_bfd_info_free((struct bfd_info **)&neigh->bfd_info);
pim_bfd_reg_dereg_nbr(neigh, command);
}
pim_bfd_info_nbr_create(pim_ifp, nbr);
pim_bfd_reg_dereg_nbr(nbr, ZEBRA_BFD_DEST_REGISTER);
} else {
- pim_bfd_info_free((void *)&nbr->bfd_info);
+ pim_bfd_info_free(&nbr->bfd_info);
pim_bfd_reg_dereg_nbr(nbr, ZEBRA_BFD_DEST_DEREGISTER);
}
}
* pim_bfd_if_param_set - Set the configured BFD paramter values for
* interface.
*/
-void pim_bfd_if_param_set(struct interface *ifp, u_int32_t min_rx,
- u_int32_t min_tx, u_int8_t detect_mult, int defaults)
+void pim_bfd_if_param_set(struct interface *ifp, uint32_t min_rx,
+ uint32_t min_tx, uint8_t detect_mult, int defaults)
{
struct pim_interface *pim_ifp = ifp->info;
int command = 0;
struct interface *ifp = NULL;
struct pim_interface *pim_ifp = NULL;
struct pim_neighbor *neigh = NULL;
- struct listnode *node;
struct listnode *neigh_node;
struct listnode *neigh_nextnode;
struct vrf *vrf = NULL;
/* Send the client registration */
bfd_client_sendmsg(zclient, ZEBRA_BFD_CLIENT_REGISTER);
- RB_FOREACH(vrf, vrf_name_head, &vrfs_by_name) {
- for (ALL_LIST_ELEMENTS_RO(vrf_iflist(vrf->vrf_id), node, ifp)) {
+ RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) {
+ FOR_ALL_INTERFACES (vrf, ifp) {
pim_ifp = ifp->info;
if (!pim_ifp)
char str[INET_ADDRSTRLEN];
pim_inet4_dump("<bfd_nbr?>",
- neigh->source_addr,
- str, sizeof(str));
- zlog_debug("%s: Replaying Pim Neigh %s to BFD vrf_id %u",
- __PRETTY_FUNCTION__, str,
- vrf->vrf_id);
+ neigh->source_addr, str,
+ sizeof(str));
+ zlog_debug(
+ "%s: Replaying Pim Neigh %s to BFD vrf_id %u",
+ __PRETTY_FUNCTION__, str,
+ vrf->vrf_id);
}
pim_bfd_reg_dereg_nbr(neigh,
ZEBRA_BFD_DEST_UPDATE);