/* Deregister from Zebra, if needed */
if (IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) {
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: deregistering this bgp %s instance from zebra",
- __PRETTY_FUNCTION__, bgp->name);
+ zlog_debug(
+ "%s: deregistering this bgp %s instance from zebra",
+ __func__, bgp->name);
bgp_zebra_instance_deregister(bgp);
}
curr_slot = wheel->curr_slot % wheel->slots;
if (debug_timer_wheel)
- zlog_debug("%s: Wheel Slot: %lld(%lld) count: %d",
- __PRETTY_FUNCTION__, wheel->curr_slot, curr_slot,
+ zlog_debug("%s: Wheel Slot: %lld(%lld) count: %d", __func__,
+ wheel->curr_slot, curr_slot,
listcount(wheel->wheel_slot_lists[curr_slot]));
for (ALL_LIST_ELEMENTS(wheel->wheel_slot_lists[curr_slot], node,
}
if (IS_OSPF6_DEBUG_ABR || IS_OSPF6_DEBUG_EXAMIN(INTER_PREFIX))
- zlog_debug("%s: paths %u nh %u", __PRETTY_FUNCTION__,
- old_route->paths ?
- listcount(old_route->paths) : 0,
- old_route->nh_list ?
- listcount(old_route->nh_list) : 0);
+ zlog_debug("%s: paths %u nh %u", __func__,
+ old_route->paths
+ ? listcount(old_route->paths)
+ : 0,
+ old_route->nh_list
+ ? listcount(old_route->nh_list)
+ : 0);
if (table->hook_add)
(*table->hook_add)(old_route);
prefix2str(&old->prefix, buf,
sizeof(buf));
zlog_debug("%s: old %s updated nh %u",
- __PRETTY_FUNCTION__, buf,
- old->nh_list ?
- listcount(old->nh_list) : 0);
+ __func__, buf,
+ old->nh_list ? listcount(
+ old->nh_list)
+ : 0);
}
if (table->hook_add)
if (lsa->header->type == htons(OSPF6_LSTYPE_INTER_PREFIX)) {
if (IS_OSPF6_DEBUG_EXAMIN(INTER_PREFIX)) {
is_debug++;
- zlog_debug("%s: Examin %s in area %s",
- __PRETTY_FUNCTION__, lsa->name, oa->name);
+ zlog_debug("%s: Examin %s in area %s", __func__,
+ lsa->name, oa->name);
}
prefix_lsa =
} else if (lsa->header->type == htons(OSPF6_LSTYPE_INTER_ROUTER)) {
if (IS_OSPF6_DEBUG_EXAMIN(INTER_ROUTER)) {
is_debug++;
- zlog_debug("%s: Examin %s in area %s",
- __PRETTY_FUNCTION__, lsa->name, oa->name);
+ zlog_debug("%s: Examin %s in area %s", __func__,
+ lsa->name, oa->name);
}
router_lsa =
old = route;
if (is_debug)
- zlog_debug("%s: old entry found in paths, adv_router %s",
- __PRETTY_FUNCTION__,
- adv_router);
+ zlog_debug(
+ "%s: old entry found in paths, adv_router %s",
+ __func__,
+ adv_router);
break;
}
}
if (OSPF6_LSA_IS_MAXAGE(lsa)) {
if (is_debug)
- zlog_debug("%s: LSA %s is MaxAge, ignore",
- __PRETTY_FUNCTION__, lsa->name);
+ zlog_debug("%s: LSA %s is MaxAge, ignore", __func__,
+ lsa->name);
if (old)
ospf6_abr_old_route_remove(lsa, old, table);
return;
|| CHECK_FLAG(abr_entry->flag, OSPF6_ROUTE_REMOVE)
|| !CHECK_FLAG(abr_entry->path.router_bits, OSPF6_ROUTER_BIT_B)) {
if (is_debug)
- zlog_debug("%s: ABR router entry does not exist, ignore",
- __PRETTY_FUNCTION__);
+ zlog_debug(
+ "%s: ABR router entry does not exist, ignore",
+ __func__);
if (old) {
if (old->type == OSPF6_DEST_TYPE_ROUTER &&
oa->intra_brouter_calc) {
if (is_debug)
zlog_debug(
- "%s: intra_brouter_calc is on, skip brouter remove: %s (%p)",
- __PRETTY_FUNCTION__, buf,
- (void *)old);
+ "%s: intra_brouter_calc is on, skip brouter remove: %s (%p)",
+ __func__, buf, (void *)old);
} else {
if (is_debug)
- zlog_debug("%s: remove old entry: %s %p ",
- __PRETTY_FUNCTION__, buf,
- (void *)old);
+ zlog_debug(
+ "%s: remove old entry: %s %p ",
+ __func__, buf, (void *)old);
ospf6_route_remove(old, table);
}
}
if ((ospf6_route_cmp(route, old_route) != 0)) {
if (is_debug) {
prefix2str(&prefix, buf, sizeof(buf));
- zlog_debug("%s: old %p %s cost %u new route cost %u are not same",
- __PRETTY_FUNCTION__,
- (void *)old_route, buf,
- old_route->path.cost,
- route->path.cost);
+ zlog_debug(
+ "%s: old %p %s cost %u new route cost %u are not same",
+ __func__, (void *)old_route, buf,
+ old_route->path.cost, route->path.cost);
}
/* Check new route's adv. router is same in one of
inet_ntop(AF_INET,
&ecmp_path->origin.adv_router,
adv_router, sizeof(adv_router));
- zlog_debug("%s: route %s cost %u another path %s added with nh %u, effective paths %u nh %u",
- __PRETTY_FUNCTION__, buf,
- old_route->path.cost,
- adv_router,
- listcount(ecmp_path->nh_list),
- old_route->paths ?
- listcount(old_route->paths) : 0,
- listcount(old_route->nh_list));
+ zlog_debug(
+ "%s: route %s cost %u another path %s added with nh %u, effective paths %u nh %u",
+ __func__, buf, old_route->path.cost,
+ adv_router,
+ listcount(ecmp_path->nh_list),
+ old_route->paths
+ ? listcount(old_route->paths)
+ : 0,
+ listcount(old_route->nh_list));
}
} else {
/* adv. router exists in the list, update the nhs */
}
if (is_debug)
- zlog_debug("%s: Update route: %s %p old cost %u new cost %u nh %u",
- __PRETTY_FUNCTION__, buf, (void *)old_route,
- old_route->path.cost, route->path.cost,
- listcount(route->nh_list));
+ zlog_debug(
+ "%s: Update route: %s %p old cost %u new cost %u nh %u",
+ __func__, buf, (void *)old_route,
+ old_route->path.cost, route->path.cost,
+ listcount(route->nh_list));
/* For Inter-Prefix route: Update RIB/FIB,
* For Inter-Router trigger summary update
if (is_debug) {
inet_ntop(AF_INET, &route->path.origin.adv_router,
adv_router, sizeof(adv_router));
- zlog_debug("%s: Install route: %s cost %u nh %u adv_router %s ",
- __PRETTY_FUNCTION__, buf, route->path.cost,
- listcount(route->nh_list), adv_router);
+ zlog_debug(
+ "%s: Install route: %s cost %u nh %u adv_router %s ",
+ __func__, buf, route->path.cost,
+ listcount(route->nh_list), adv_router);
}
path = ospf6_path_dup(&route->path);
if (IS_OSPF6_DEBUG_ASBR)
zlog_debug(
"%s: Send update of AS-External LSA %s seq 0x%x",
- __PRETTY_FUNCTION__, lsa->name,
+ __func__, lsa->name,
ntohl(lsa->header->seqnum));
ospf6_flood_interface(NULL, lsa, oi);
sizeof(buf));
zlog_debug(
"%s: route %s cost old %u new %u is not same, replace route",
- __PRETTY_FUNCTION__, buf, o_path->cost,
+ __func__, buf, o_path->cost,
route->path.cost);
}
sizeof(buf));
zlog_debug(
"%s: route %s old cost %u new cost %u, delete old entry.",
- __PRETTY_FUNCTION__, buf,
+ __func__, buf,
old_route->path.cost,
route->path.cost);
}
sizeof(buf));
zlog_debug(
"%s: old route %s path cost %u e2 %u",
- __PRETTY_FUNCTION__, buf,
- old_route->path.cost,
+ __func__, buf, old_route->path.cost,
old_route->path.u.cost_e2);
}
route_found = true;
sizeof(buf));
zlog_debug(
"%s: route %s another path added with nh %u, effective paths %u nh %u",
- __PRETTY_FUNCTION__, buf,
+ __func__, buf,
listcount(ecmp_path->nh_list),
- old_route->paths
- ? listcount(
- old_route
- ->paths)
- : 0,
+ old_route->paths ? listcount(
+ old_route->paths)
+ : 0,
listcount(old_route->nh_list));
}
} else {
AS_EXTERNAL)) {
prefix2str(&old_route->prefix,
buf, sizeof(buf));
- zlog_debug("%s: ls_prfix %s asbr_entry not found.",
- __PRETTY_FUNCTION__,
- buf);
+ zlog_debug(
+ "%s: ls_prfix %s asbr_entry not found.",
+ __func__, buf);
}
continue;
}
if (IS_OSPF6_DEBUG_EXAMIN(AS_EXTERNAL)) {
prefix2str(&route->prefix, buf, sizeof(buf));
- zlog_debug("%s: route %s with effective paths %u nh %u",
- __PRETTY_FUNCTION__, buf,
- old_route->paths ?
- listcount(old_route->paths) : 0,
- old_route->nh_list ?
- listcount(old_route->nh_list) : 0);
+ zlog_debug(
+ "%s: route %s with effective paths %u nh %u",
+ __func__, buf,
+ old_route->paths
+ ? listcount(old_route->paths)
+ : 0,
+ old_route->nh_list
+ ? listcount(old_route->nh_list)
+ : 0);
}
/* Update RIB/FIB */
prefix2str(&prefix, buf, sizeof(buf));
zlog_debug(
"%s: Current route %s cost %u e2 %u, route to del cost %u e2 %u",
- __PRETTY_FUNCTION__, buf, route->path.cost,
- route->path.u.cost_e2, route_to_del->path.cost,
- route_to_del->path.u.cost_e2);
+ __func__, buf, route->path.cost, route->path.u.cost_e2,
+ route_to_del->path.cost, route_to_del->path.u.cost_e2);
}
for (ospf6_route_lock(route);
sizeof(buf));
zlog_debug(
"%s: route %s to delete is not same, cost %u del cost %u. skip",
- __PRETTY_FUNCTION__,
- buf, route->path.cost,
+ __func__, buf,
+ route->path.cost,
route_to_del->path
.cost);
}
prefix2str(&prefix, buf, sizeof(buf));
zlog_debug(
"%s: route %s path found with cost %u nh %u to remove.",
- __PRETTY_FUNCTION__, buf,
- route->path.cost,
+ __func__, buf, route->path.cost,
listcount(o_path->nh_list));
}
sizeof(buf));
zlog_debug(
"%s: AS-External %u route %s update paths %u nh %u",
- __PRETTY_FUNCTION__,
+ __func__,
(route->path.type
== OSPF6_PATH_TYPE_EXTERNAL1)
? 1
: 2,
buf, listcount(route->paths),
- route->nh_list ?
- listcount(route->nh_list) : 0);
+ route->nh_list ? listcount(
+ route->nh_list)
+ : 0);
}
if (listcount(route->paths)) {
prefix2str(&prefix, buf, sizeof(buf));
zlog_debug(
"%s: route %s to delete is not same, cost %u del cost %u. skip",
- __PRETTY_FUNCTION__, buf,
- route->path.cost,
+ __func__, buf, route->path.cost,
route_to_del->path.cost);
}
continue;
prefix2str(&route->prefix, buf, sizeof(buf));
zlog_debug(
"%s: AS-External %u route remove %s cost %u(%u) nh %u",
- __PRETTY_FUNCTION__,
+ __func__,
route->path.type == OSPF6_PATH_TYPE_EXTERNAL1
? 1
: 2,
if (is_debug)
zlog_debug(
"%s: Send LSA %s (age %d) update now",
- __PRETTY_FUNCTION__, lsa->name,
+ __func__, lsa->name,
ntohs(lsa->header->age));
ospf6_lsupdate_send_neighbor_now(on, lsa);
continue;
*/
if (oa->intra_prefix_originate) {
if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX))
- zlog_debug("%s: Re-originate intra prefix LSA, Current full nbrs %u",
- __PRETTY_FUNCTION__, oa->full_nbrs);
+ zlog_debug(
+ "%s: Re-originate intra prefix LSA, Current full nbrs %u",
+ __func__, oa->full_nbrs);
if (old)
ospf6_lsa_purge_multi_ls_id(oa, old);
oa->intra_prefix_originate = 0;
if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) {
prefix2str(&old_route->prefix, buf,
sizeof(buf));
- zlog_debug("%s: route %s cost old %u new %u is not same, replace route",
- __PRETTY_FUNCTION__, buf,
- o_path->cost, route->path.cost);
+ zlog_debug(
+ "%s: route %s cost old %u new %u is not same, replace route",
+ __func__, buf, o_path->cost,
+ route->path.cost);
}
/* Remove selected current path's nh from
if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) {
prefix2str(&old_route->prefix, buf,
sizeof(buf));
- zlog_debug("%s: route %s old cost %u new cost %u, delete old entry.",
- __PRETTY_FUNCTION__, buf,
- old_route->path.cost,
- route->path.cost);
+ zlog_debug(
+ "%s: route %s old cost %u new cost %u, delete old entry.",
+ __func__, buf,
+ old_route->path.cost,
+ route->path.cost);
}
if (oa->route_table->hook_remove)
ospf6_route_remove(old_route,
sizeof(buf));
zlog_debug(
"%s: route %s %p another path added with nh %u, effective paths %u nh %u",
- __PRETTY_FUNCTION__, buf,
+ __func__, buf,
(void *)old_route,
listcount(ecmp_path->nh_list),
- old_route->paths ?
- listcount(old_route->paths) : 0,
+ old_route->paths ? listcount(
+ old_route->paths)
+ : 0,
listcount(old_route->nh_list));
-
}
} else {
list_delete_all_node(o_path->nh_list);
oa->spf_table);
if (ls_entry == NULL) {
if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX))
- zlog_debug("%s: ls_prfix %s ls_entry not found.",
- __PRETTY_FUNCTION__,
- buf);
+ zlog_debug(
+ "%s: ls_prfix %s ls_entry not found.",
+ __func__, buf);
continue;
}
lsa = ospf6_lsdb_lookup(o_path->origin.type,
o_path->origin.id, &adv_prefix);
prefix2str(&adv_prefix, buf,
sizeof(buf));
- zlog_debug("%s: adv_router %s lsa not found",
- __PRETTY_FUNCTION__,
- buf);
+ zlog_debug(
+ "%s: adv_router %s lsa not found",
+ __func__, buf);
}
continue;
}
if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) {
prefix2str(&route->prefix, buf, sizeof(buf));
- zlog_debug("%s: route %s %p with final effective paths %u nh%u",
- __PRETTY_FUNCTION__, buf,
- (void *)old_route,
- old_route->paths ?
- listcount(old_route->paths) : 0,
- listcount(old_route->nh_list));
+ zlog_debug(
+ "%s: route %s %p with final effective paths %u nh%u",
+ __func__, buf, (void *)old_route,
+ old_route->paths
+ ? listcount(old_route->paths)
+ : 0,
+ listcount(old_route->nh_list));
}
/* used in intra_route_calculation() to add to
prefix2str(&route->prefix, buf, sizeof(buf));
zlog_debug(
"%s: route %s path found with cost %u nh %u to remove.",
- __PRETTY_FUNCTION__, buf, o_path->cost,
+ __func__, buf, o_path->cost,
listcount(o_path->nh_list));
}
if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) {
prefix2str(&route->prefix, buf, sizeof(buf));
- zlog_debug("%s: route %s update paths %u nh %u",
- __PRETTY_FUNCTION__, buf,
- route->paths ? listcount(route->paths) : 0,
- route->nh_list ? listcount(route->nh_list)
- : 0);
+ zlog_debug(
+ "%s: route %s update paths %u nh %u", __func__,
+ buf, route->paths ? listcount(route->paths) : 0,
+ route->nh_list ? listcount(route->nh_list) : 0);
}
/* Update Global Route table and
if (IS_OSPF6_DEBUG_SPF(PROCESS))
zlog_debug(
"%s Remove LSA %s lsa->lock %u lsdb count %u",
- __PRETTY_FUNCTION__, lsa->name, lsa->lock,
+ __func__, lsa->name, lsa->lock,
area->temp_router_lsa_lsdb->count);
ospf6_lsdb_remove(lsa, area->temp_router_lsa_lsdb);
}
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
"%s: ospf install new route, vrf %s id %u new_table count %lu",
- __PRETTY_FUNCTION__, ospf_vrf_id_to_name(ospf->vrf_id),
+ __func__, ospf_vrf_id_to_name(ospf->vrf_id),
ospf->vrf_id, new_table->count);
/* Update routing table. */
monotime(&start_time);
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
"%s ospf vrf %s num of %u ip osp area x config",
- __PRETTY_FUNCTION__,
- ospf->name ? ospf->name : "NIL",
+ __func__, ospf->name ? ospf->name : "NIL",
ospf->if_ospf_cli_count);
return CMD_WARNING_CONFIG_FAILED;
}
if (IS_DEBUG_OSPF_EVENT) {
zlog_debug(
"%s: ospf distribute-list update arg_type %d vrf %s id %d",
- __PRETTY_FUNCTION__, arg_type,
- ospf_vrf_id_to_name(ospf->vrf_id), ospf->vrf_id);
+ __func__, arg_type, ospf_vrf_id_to_name(ospf->vrf_id),
+ ospf->vrf_id);
}
/* foreach all external info. */
int ret = 0;
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug("%s: VRF %s id %u enabled", __PRETTY_FUNCTION__,
- vrf->name, vrf->vrf_id);
+ zlog_debug("%s: VRF %s id %u enabled", __func__, vrf->name,
+ vrf->vrf_id);
ospf = ospf_lookup_by_name(vrf->name);
if (ospf) {
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
"%s: ospf linked to vrf %s vrf_id %u (old id %u)",
- __PRETTY_FUNCTION__, vrf->name, ospf->vrf_id,
- old_vrf_id);
+ __func__, vrf->name, ospf->vrf_id, old_vrf_id);
if (old_vrf_id != ospf->vrf_id) {
frr_with_privs(&ospfd_privs) {
enabled ? "enabled" : "disabled");
RB_FOREACH (pbrm, pbr_map_entry_head, &pbr_maps) {
- DEBUGD(&pbr_dbg_map, "%s: Looking at %s", __PRETTY_FUNCTION__,
- pbrm->name);
+ DEBUGD(&pbr_dbg_map, "%s: Looking at %s", __func__, pbrm->name);
for (ALL_LIST_ELEMENTS_RO(pbrm->seqnumbers, node, pbrms))
pbrms_vrf_update(pbrms, pbr_vrf);
}
for (ALL_LIST_ELEMENTS_RO(pbrm->seqnumbers, snode,
pbrms)) {
DEBUGD(&pbr_dbg_map, "%s: Comparing %u to %u",
- __PRETTY_FUNCTION__, pbrms->unique,
- unique);
+ __func__, pbrms->unique, unique);
if (pbrms->unique == unique)
return pbrms;
}
struct listnode *node;
RB_FOREACH (pbrm, pbr_map_entry_head, &pbr_maps) {
- DEBUGD(&pbr_dbg_map, "%s: Looking at %s", __PRETTY_FUNCTION__,
- pbrm->name);
+ DEBUGD(&pbr_dbg_map, "%s: Looking at %s", __func__, pbrm->name);
for (ALL_LIST_ELEMENTS_RO(pbrm->seqnumbers, node, pbrms)) {
DEBUGD(&pbr_dbg_map, "\tNH Grp name: %s",
pbrms->nhgrp_name ?
struct listnode *node, *inode;
struct pbr_map_interface *pmi;
- DEBUGD(&pbr_dbg_map, "%s: for %s", __PRETTY_FUNCTION__, name);
+ DEBUGD(&pbr_dbg_map, "%s: for %s", __func__, name);
pbrm = pbrm_find(name);
if (!pbrm)
return;
for (ALL_LIST_ELEMENTS_RO(pbrm->seqnumbers, node, pbrms)) {
DEBUGD(&pbr_dbg_map,
- "%s: Looking at what to install %s(%u) %d %d",
- __PRETTY_FUNCTION__, name, pbrms->seqno, pbrm->valid,
- pbrms->nhs_installed);
+ "%s: Looking at what to install %s(%u) %d %d", __func__,
+ name, pbrms->seqno, pbrm->valid, pbrms->nhs_installed);
if (pbrm->valid && pbrms->nhs_installed
&& pbrm->incoming->count) {
if (!bh && v6 && v4)
DEBUGD(&pbr_dbg_nht,
- "%s: Saw both V6 and V4 nexthops...using %s",
- __PRETTY_FUNCTION__, afi2str(install_afi));
+ "%s: Saw both V6 and V4 nexthops...using %s", __func__,
+ afi2str(install_afi));
if (bh && (v6 || v4))
DEBUGD(&pbr_dbg_nht,
"%s: Saw blackhole nexthop(s) with %s%s%s nexthop(s), using AFI_MAX.",
- __PRETTY_FUNCTION__, v4 ? "v4" : "",
- (v4 && v6) ? " and " : "", v6 ? "v6" : "");
+ __func__, v4 ? "v4" : "", (v4 && v6) ? " and " : "",
+ v6 ? "v6" : "");
return install_afi;
}
if (!pnhgc) {
DEBUGD(&pbr_dbg_nht,
"%s: Could not find nexthop-group cache w/ name '%s'",
- __PRETTY_FUNCTION__, name);
+ __func__, name);
return;
}
if (!pbr_nht_get_next_tableid(true)) {
zlog_warn(
"%s: Exhausted all table identifiers; cannot create nexthop-group cache for nexthop-group '%s'",
- __PRETTY_FUNCTION__, name);
+ __func__, name);
return NULL;
}
if (!nhgc) {
DEBUGD(&pbr_dbg_nht, "%s: Could not find nhgc with name: %s\n",
- __PRETTY_FUNCTION__, name);
+ __func__, name);
return NULL;
}
snprintf(lookup.name, sizeof(lookup.name), "%s", name);
pnhgc = hash_get(pbr_nhg_hash, &lookup, pbr_nhgc_alloc);
- DEBUGD(&pbr_dbg_nht, "%s: Retrieved NHGC @ %p", __PRETTY_FUNCTION__,
- pnhgc);
+ DEBUGD(&pbr_dbg_nht, "%s: Retrieved NHGC @ %p", __func__, pnhgc);
for (ALL_NEXTHOPS(nhgc->nhg, nhop)) {
struct pbr_nexthop_cache lookupc;
if (!pim_ifp->bfd_info) {
if (PIM_DEBUG_PIM_TRACE)
zlog_debug("%s: pim interface %s BFD is disabled ",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
return 0;
}
if (PIM_DEBUG_PIM_TRACE) {
char buf[PREFIX2STR_BUFFER];
prefix2str(&p, buf, sizeof(buf));
- zlog_debug("%s: interface %s bfd destination %s %s",
- __PRETTY_FUNCTION__, ifp->name, buf,
- bfd_get_status_str(status));
+ zlog_debug("%s: interface %s bfd destination %s %s", __func__,
+ ifp->name, buf, bfd_get_status_str(status));
}
for (ALL_LIST_ELEMENTS(pim_ifp->pim_neighbor_list, neigh_node,
pim_inet4_dump("<nht_nbr?>", neigh->source_addr,
str, sizeof(str));
zlog_debug("%s: bfd status is same for nbr %s",
- __PRETTY_FUNCTION__, str);
+ __func__, str);
}
continue;
}
bfd_info->last_update = tv.tv_sec;
if (PIM_DEBUG_PIM_TRACE) {
- zlog_debug("%s: status %s old_status %s",
- __PRETTY_FUNCTION__,
+ zlog_debug("%s: status %s old_status %s", __func__,
bfd_get_status_str(status),
bfd_get_status_str(old_status));
}
sizeof(str));
zlog_debug(
"%s: Replaying Pim Neigh %s to BFD vrf_id %u",
- __PRETTY_FUNCTION__, str,
- vrf->vrf_id);
+ __func__, str, vrf->vrf_id);
}
pim_bfd_reg_dereg_nbr(neigh,
ZEBRA_BFD_DEST_UPDATE);
rn = route_node_lookup(pim->rp_table, &bsgrp_node->group);
if (!rn) {
- zlog_warn("%s: Route node doesn't exist", __PRETTY_FUNCTION__);
+ zlog_warn("%s: Route node doesn't exist", __func__);
return 0;
}
if (PIM_DEBUG_BSM) {
pim_inet4_dump("<src?>", neigh->source_addr, neigh_src_str,
sizeof(neigh_src_str));
- zlog_debug("%s: New neighbor %s seen on %s",
- __PRETTY_FUNCTION__, neigh_src_str, ifp->name);
+ zlog_debug("%s: New neighbor %s seen on %s", __func__,
+ neigh_src_str, ifp->name);
}
pim_ifp = ifp->info;
if (PIM_DEBUG_BSM)
zlog_debug(
"%s: It is not DR, so don't forward BSM packet",
- __PRETTY_FUNCTION__);
+ __func__);
}
if (!pim_ifp->bsm_enable) {
if (PIM_DEBUG_BSM)
- zlog_debug("%s: BSM proc not enabled on %s",
- __PRETTY_FUNCTION__, ifp->name);
+ zlog_debug("%s: BSM proc not enabled on %s", __func__,
+ ifp->name);
return ret;
}
if (!scope->bsm_list->count) {
if (PIM_DEBUG_BSM)
zlog_debug("%s: BSM list for the scope is empty",
- __PRETTY_FUNCTION__);
+ __func__);
return ret;
}
if (!pim_ifp->ucast_bsm_accept) {
dst_addr = qpim_all_pim_routers_addr;
if (PIM_DEBUG_BSM)
- zlog_debug("%s: Sending BSM mcast to %s",
- __PRETTY_FUNCTION__, neigh_src_str);
+ zlog_debug("%s: Sending BSM mcast to %s", __func__,
+ neigh_src_str);
} else {
dst_addr = neigh->source_addr;
if (PIM_DEBUG_BSM)
- zlog_debug("%s: Sending BSM ucast to %s",
- __PRETTY_FUNCTION__, neigh_src_str);
+ zlog_debug("%s: Sending BSM ucast to %s", __func__,
+ neigh_src_str);
}
pim_mtu = ifp->mtu - MAX_IP_HDR_LEN;
pim_hello_require(ifp);
if (PIM_DEBUG_BSM)
zlog_debug(
"%s: pim_bsm_frag_send failed",
- __PRETTY_FUNCTION__);
+ __func__);
}
} else {
/* Pim header needs to be constructed */
if (PIM_DEBUG_BSM)
zlog_debug(
"%s: pim_bsm_frag_send failed",
- __PRETTY_FUNCTION__);
+ __func__);
}
}
}
/* clean up all upstreams*/
while ((up = rb_pim_upstream_first(&pim->upstream_head))) {
- pim_upstream_del(pim, up, __PRETTY_FUNCTION__);
+ pim_upstream_del(pim, up, __func__);
}
}
char buf[BUFSIZ];
prefix2str(ifc->address, buf, BUFSIZ);
zlog_debug("%s: %s ifindex=%d connected IP address %s %s",
- __PRETTY_FUNCTION__, ifp->name, ifp->ifindex, buf,
+ __func__, ifp->name, ifp->ifindex, buf,
CHECK_FLAG(ifc->flags, ZEBRA_IFA_SECONDARY)
? "secondary"
: "primary");
ifaddr = ifc->address->u.prefix4;
- detect_address_change(ifp, 0, __PRETTY_FUNCTION__);
+ detect_address_change(ifp, 0, __func__);
// if (ifc->address->family != AF_INET)
// return;
source_str, sizeof(source_str));
zlog_warn(
"%s: igmp_join_sock() failure for IGMP group %s source %s on interface %s",
- __PRETTY_FUNCTION__, group_str,
- source_str, ifp->name);
+ __func__, group_str, source_str,
+ ifp->name);
/* warning only */
} else
ij->sock_fd = join_fd;
if (PIM_INADDR_IS_ANY(p->u.prefix4)) {
zlog_warn(
"%s: null IPv4 address connected to interface %s",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
continue;
}
pim_ifp = ifp->info;
if (!pim_ifp) {
- zlog_warn("%s: multicast not enabled on interface %s",
- __PRETTY_FUNCTION__, ifp->name);
+ zlog_warn("%s: multicast not enabled on interface %s", __func__,
+ ifp->name);
return 0;
}
pim_inet4_dump("<addr?>", addr, addr_str, sizeof(addr_str));
zlog_debug(
"%s: neighbor not found for address %s on interface %s",
- __PRETTY_FUNCTION__, addr_str, ifp->name);
+ __func__, addr_str, ifp->name);
}
return NULL;
pim_ifp = ifp->info;
if (!pim_ifp) {
- zlog_warn("%s: multicast not enabled on interface %s",
- __PRETTY_FUNCTION__, ifp->name);
+ zlog_warn("%s: multicast not enabled on interface %s", __func__,
+ ifp->name);
return;
}
ref count will take care of it.
*/
if (ch->upstream->ref_count > 0)
- pim_upstream_del(pim_ifp->pim, ch->upstream,
- __PRETTY_FUNCTION__);
+ pim_upstream_del(pim_ifp->pim, ch->upstream, __func__);
else {
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: Avoiding deletion of upstream with ref_count %d "
- "from ifchannel(%s): %s", __PRETTY_FUNCTION__,
- ch->upstream->ref_count, ch->interface->name,
- ch->sg_str);
+ zlog_debug(
+ "%s: Avoiding deletion of upstream with ref_count %d "
+ "from ifchannel(%s): %s",
+ __func__, ch->upstream->ref_count,
+ ch->interface->name, ch->sg_str);
}
ch->upstream = NULL;
RB_REMOVE(pim_ifchannel_rb, &pim_ifp->ifchannel_rb, ch);
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: ifchannel entry %s is deleted ",
- __PRETTY_FUNCTION__, ch->sg_str);
+ zlog_debug("%s: ifchannel entry %s is deleted ", __func__,
+ ch->sg_str);
XFREE(MTYPE_PIM_IFCHANNEL, ch);
}
if (PIM_DEBUG_PIM_EVENTS) {
zlog_debug(
"%s calledby %s: non-transition on state %d (%s)",
- __PRETTY_FUNCTION__, caller, new_state,
+ __func__, caller, new_state,
pim_ifchannel_ifjoin_name(new_state, 0));
}
return;
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s %s: Prune(S,G)=%s from %s",
- __FILE__,
- __PRETTY_FUNCTION__,
+ __FILE__, __func__,
child->sg_str,
up->sg_str);
if (!c_oil)
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s %s: Join(S,G)=%s from %s",
- __FILE__,
- __PRETTY_FUNCTION__,
+ __FILE__, __func__,
child->sg_str,
up->sg_str);
if (!pim_ifp) {
if (PIM_DEBUG_EVENTS)
zlog_debug("%s:%s Expected pim interface setup for %s",
- __PRETTY_FUNCTION__,
- pim_str_sg_dump(sg), ifp->name);
+ __func__, pim_str_sg_dump(sg), ifp->name);
return 0;
}
if (!PIM_IF_TEST_PIM(pim_ifp->options)) {
if (PIM_DEBUG_EVENTS)
- zlog_debug("%s:%s PIM is not configured on this interface %s",
- __PRETTY_FUNCTION__,
- pim_str_sg_dump(sg), ifp->name);
+ zlog_debug(
+ "%s:%s PIM is not configured on this interface %s",
+ __func__, pim_str_sg_dump(sg), ifp->name);
return 0;
}
if (PIM_DEBUG_PIM_EVENTS)
zlog_debug(
"%s: local membership (S,G)=%s ignored as group is SSM",
- __PRETTY_FUNCTION__,
- pim_str_sg_dump(sg));
+ __func__, pim_str_sg_dump(sg));
return 1;
}
}
for (ALL_LIST_ELEMENTS_RO(up->sources, up_node, child)) {
if (PIM_DEBUG_EVENTS)
zlog_debug("%s %s: IGMP (S,G)=%s(%s) from %s",
- __FILE__, __PRETTY_FUNCTION__,
- child->sg_str, ifp->name,
- up->sg_str);
+ __FILE__, __func__, child->sg_str,
+ ifp->name, up->sg_str);
ch = pim_ifchannel_find(ifp, &child->sg);
if (pim_upstream_evaluate_join_desired_interface(
if (PIM_DEBUG_EVENTS)
zlog_debug("%s %s: Prune(S,G)=%s(%s) from %s",
- __FILE__, __PRETTY_FUNCTION__,
- up->sg_str, ifp->name,
- child->sg_str);
+ __FILE__, __func__, up->sg_str,
+ ifp->name, child->sg_str);
ch = pim_ifchannel_find(ifp, &child->sg);
/*
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
- "%s: %s %s eom: %d join %u", __PRETTY_FUNCTION__,
+ "%s: %s %s eom: %d join %u", __func__,
pim_ifchannel_ifjoin_name(ch->ifjoin_state, ch->flags),
ch->sg_str, eom, join);
if (!ch->sources)
group_str, sizeof(group_str));
zlog_warn(
"%s: group %s on %s: s_flag=1 unable to fit %d sources into buf_size=%zu (max_sources=%d)",
- __PRETTY_FUNCTION__, group_str,
+ __func__, group_str,
igmp->interface->name,
num_sources_tosend1, sizeof(query_buf1),
query_buf1_max_sources);
sizeof(group_str));
zlog_warn(
"%s: group %s on %s: s_flag=0 unable to fit %d sources into buf_size=%zu (max_sources=%d)",
- __PRETTY_FUNCTION__, group_str,
- igmp->interface->name, num_sources_tosend2,
- sizeof(query_buf2), query_buf2_max_sources);
+ __func__, group_str, igmp->interface->name,
+ num_sources_tosend2, sizeof(query_buf2),
+ query_buf2_max_sources);
} else {
/*
RFC3376: 4.1.12. IP Destination Addresses for Queries
if (rpf->source_nexthop.interface)
pim_ifp = rpf->source_nexthop.interface->info;
else {
- zlog_warn("%s: RPF interface is not present",
- __PRETTY_FUNCTION__);
+ zlog_warn("%s: RPF interface is not present", __func__);
return -1;
}
- on_trace(__PRETTY_FUNCTION__, rpf->source_nexthop.interface,
- rpf->rpf_addr.u.prefix4);
+ on_trace(__func__, rpf->source_nexthop.interface,
+ rpf->rpf_addr.u.prefix4);
if (!pim_ifp) {
- zlog_warn("%s: multicast not enabled on interface %s",
- __PRETTY_FUNCTION__,
+ zlog_warn("%s: multicast not enabled on interface %s", __func__,
rpf->source_nexthop.interface->name);
return -1;
}
pim_inet4_dump("<dst?>", rpf->rpf_addr.u.prefix4,
dst_str, sizeof(dst_str));
zlog_debug("%s: upstream=%s is myself on interface %s",
- __PRETTY_FUNCTION__, dst_str,
+ __func__, dst_str,
rpf->source_nexthop.interface->name);
}
return 0;
sizeof(grp_str));
zlog_debug(
"%s: sending (G)=%s to upstream=%s on interface %s",
- __PRETTY_FUNCTION__, grp_str, dst_str,
+ __func__, grp_str, dst_str,
rpf->source_nexthop.interface->name);
}
rpf->source_nexthop.interface->name)) {
zlog_warn(
"%s: could not send PIM message on interface %s",
- __PRETTY_FUNCTION__,
+ __func__,
rpf->source_nexthop.interface->name);
}
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: interface %s num_joins %u num_prunes %u",
- __PRETTY_FUNCTION__,
- rpf->source_nexthop.interface->name,
+ __func__, rpf->source_nexthop.interface->name,
ntohs(grp->joins), ntohs(grp->prunes));
grp = (struct pim_jp_groups *)curr_ptr;
rpf->source_nexthop.interface->name)) {
zlog_warn(
"%s: could not send PIM message on interface %s",
- __PRETTY_FUNCTION__,
+ __func__,
rpf->source_nexthop.interface->name);
}
rpf->source_nexthop.interface->name)) {
zlog_warn(
"%s: could not send PIM message on interface %s",
- __PRETTY_FUNCTION__,
- rpf->source_nexthop.interface->name);
+ __func__, rpf->source_nexthop.interface->name);
}
}
return 0;
if (!up->rpf.source_nexthop.interface) {
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: up %s RPF is not present",
- __PRETTY_FUNCTION__, up->sg_str);
+ zlog_debug("%s: up %s RPF is not present", __func__,
+ up->sg_str);
return;
}
&data, data_len);
if (err) {
zlog_warn(
- "%s %s: failure: setsockopt(fd=%d,IPPROTO_IP, MRT_TABLE=%d): errno=%d: %s",
- __FILE__, __PRETTY_FUNCTION__,
- pim->mroute_socket, data, errno,
- safe_strerror(errno));
+ "%s %s: failure: setsockopt(fd=%d,IPPROTO_IP, MRT_TABLE=%d): errno=%d: %s",
+ __FILE__, __func__, pim->mroute_socket,
+ data, errno, safe_strerror(errno));
return -1;
}
opt, &data, data_len);
if (err) {
zlog_warn(
- "%s %s: failure: setsockopt(fd=%d,IPPROTO_IP,%s=%d): errno=%d: %s",
- __FILE__, __PRETTY_FUNCTION__,
- pim->mroute_socket,
- enable ? "MRT_INIT" : "MRT_DONE", data, errno,
- safe_strerror(errno));
+ "%s %s: failure: setsockopt(fd=%d,IPPROTO_IP,%s=%d): errno=%d: %s",
+ __FILE__, __func__, pim->mroute_socket,
+ enable ? "MRT_INIT" : "MRT_DONE", data, errno,
+ safe_strerror(errno));
return -1;
}
}
if (!ifp) {
flog_err(EC_LIB_INTERFACE,
"%s: Unable to lookup vrf interface: %s",
- __PRETTY_FUNCTION__, pim->vrf->name);
+ __func__, pim->vrf->name);
close(sock);
return -1;
}
if (pim_socket_bind(sock, ifp)) {
flog_err_sys(EC_LIB_SOCKET,
"%s: Unable to bind to socket: %s",
- __PRETTY_FUNCTION__, safe_strerror(errno));
+ __func__, safe_strerror(errno));
close(sock);
return -1;
}
if (PIM_DEBUG_PIM_PACKETS)
zlog_debug(
"%s: Considering (%s) children for (S,G,rpt) prune",
- __PRETTY_FUNCTION__, up->sg_str);
+ __func__, up->sg_str);
for (ALL_LIST_ELEMENTS_RO(up->sources, up_node, child)) {
if (!PIM_UPSTREAM_FLAG_TEST_USE_RPT(child->flags)) {
if (PIM_DEBUG_PIM_PACKETS)
zlog_debug(
"%s: SPT Bit and RPF'(%s) != RPF'(S,G): Add Prune (%s,rpt) to compound message",
- __PRETTY_FUNCTION__,
- up->sg_str,
+ __func__, up->sg_str,
child->sg_str);
} else if (PIM_DEBUG_PIM_PACKETS)
zlog_debug(
"%s: SPT Bit and RPF'(%s) == RPF'(S,G): Not adding Prune for (%s,rpt)",
- __PRETTY_FUNCTION__, up->sg_str,
+ __func__, up->sg_str,
child->sg_str);
} else if (pim_upstream_empty_inherited_olist(child)) {
/* S is supposed to be forwarded along the RPT
child->flags);
if (PIM_DEBUG_PIM_PACKETS)
zlog_debug(
- "%s: inherited_olist(%s,rpt) is NULL, Add Prune to compound message",
- __PRETTY_FUNCTION__,
- child->sg_str);
+ "%s: inherited_olist(%s,rpt) is NULL, Add Prune to compound message",
+ __func__, child->sg_str);
} else if (PIM_DEBUG_PIM_PACKETS)
zlog_debug(
- "%s: Do not add Prune %s to compound message %s",
- __PRETTY_FUNCTION__, child->sg_str,
- up->sg_str);
+ "%s: Do not add Prune %s to compound message %s",
+ __func__, child->sg_str, up->sg_str);
}
}
return size;
pim_ifp->pim_dr_addr = pim_ifp->primary_address;
if (PIM_DEBUG_PIM_TRACE) {
- zlog_debug("%s: on interface %s", __PRETTY_FUNCTION__,
- ifp->name);
+ zlog_debug("%s: on interface %s", __func__, ifp->name);
}
for (ALL_LIST_ELEMENTS_RO(pim_ifp->pim_neighbor_list, node, neigh)) {
dr_pri = pim_ifp->pim_dr_priority;
if (PIM_DEBUG_PIM_TRACE) {
- zlog_debug("%s: dr pri %u on interface %s", __PRETTY_FUNCTION__,
- dr_pri, ifp->name);
+ zlog_debug("%s: dr pri %u on interface %s", __func__, dr_pri,
+ ifp->name);
}
for (ALL_LIST_ELEMENTS_RO(pim_ifp->pim_neighbor_list, node, neigh)) {
if (PIM_DEBUG_PIM_TRACE) {
zlog_info("%s: neigh pri %u addr %x if dr addr %x",
- __PRETTY_FUNCTION__, neigh->dr_priority,
+ __func__, neigh->dr_priority,
ntohl(neigh->source_addr.s_addr),
ntohl(pim_ifp->pim_dr_addr.s_addr));
}
sizeof(addr_str));
zlog_debug(
"%s: DUMP_PREFIX_LIST neigh=%x prefix_list=%x prefix=%x addr=%s [%d/%d]",
- __PRETTY_FUNCTION__, (unsigned)neigh,
+ __func__, (unsigned)neigh,
(unsigned)neigh->prefix_list, (unsigned)p,
addr_str, i, list_size);
++i;
flog_err(
EC_LIB_DEVELOPMENT,
"%s: BUG We should have found default group information\n",
- __PRETTY_FUNCTION__);
+ __func__);
return best;
}
prefix2str(&rp_all->group, buf1, sizeof(buf1));
zlog_debug(
"%s: NHT Register rp_all addr %s grp %s ",
- __PRETTY_FUNCTION__, buf, buf1);
+ __func__, buf, buf1);
}
frr_each (rb_pim_upstream, &pim->upstream_head, up) {
prefix2str(&nht_p, buf, sizeof(buf));
prefix2str(&rp_info->group, buf1, sizeof(buf1));
zlog_debug("%s: NHT Register RP addr %s grp %s with Zebra ",
- __PRETTY_FUNCTION__, buf, buf1);
+ __func__, buf, buf1);
}
pim_find_or_track_nexthop(pim, &nht_p, NULL, rp_info, false, NULL);
if (!pim_ecmp_nexthop_lookup(pim, &rp_info->rp.source_nexthop, &nht_p,
sizeof(str));
zlog_debug(
"%s: addr %s new nexthop addr %s interface %s",
- __PRETTY_FUNCTION__, str, str1,
- ifp1->name);
+ __func__, str, str1, ifp1->name);
}
}
}
if (setsockopt(fd, IPPROTO_IP, IP_HDRINCL, &on, sizeof(on)))
zlog_err("%s: Could not turn on IP_HDRINCL option: %s",
- __PRETTY_FUNCTION__, safe_strerror(errno));
-
+ __func__, safe_strerror(errno));
}
}
if (!iif_index || !oif_index || iif_index == -1 || oif_index == -1) {
zlog_warn(
"%s %s: Unable to add static route: Invalid interface index(iif=%d,oif=%d)",
- __FILE__, __PRETTY_FUNCTION__, iif_index, oif_index);
+ __FILE__, __func__, iif_index, oif_index);
return -2;
}
/* looped MFC entry */
zlog_warn(
"%s %s: Unable to add static route: Looped MFC entry(iif=%d,oif=%d)",
- __FILE__, __PRETTY_FUNCTION__, iif_index, oif_index);
+ __FILE__, __func__, iif_index, oif_index);
return -4;
}
#endif
sizeof(sifaddr_str));
zlog_warn(
"%s %s: Unable to add static route: Route already exists (iif=%d,oif=%d,group=%s,source=%s)",
- __FILE__, __PRETTY_FUNCTION__,
- iif_index, oif_index, gifaddr_str,
- sifaddr_str);
+ __FILE__, __func__, iif_index,
+ oif_index, gifaddr_str, sifaddr_str);
return -3;
}
} else {
/* input interface changed */
s_route->iif = iif_index;
- pim_static_mroute_iif_update(&s_route->c_oil,
- iif_index,
- __PRETTY_FUNCTION__);
+ pim_static_mroute_iif_update(
+ &s_route->c_oil, iif_index, __func__);
#ifdef PIM_ENFORCE_LOOPFREE_MFC
/* check to make sure the new input was not an
s_route->c_oil.pim = pim;
- if (pim_static_mroute_add(&s_route->c_oil, __PRETTY_FUNCTION__)) {
+ if (pim_static_mroute_add(&s_route->c_oil, __func__)) {
char gifaddr_str[INET_ADDRSTRLEN];
char sifaddr_str[INET_ADDRSTRLEN];
pim_inet4_dump("<ifaddr?>", group, gifaddr_str,
sizeof(sifaddr_str));
zlog_warn(
"%s %s: Unable to add static route(iif=%d,oif=%d,group=%s,source=%s)",
- __FILE__, __PRETTY_FUNCTION__, iif_index, oif_index,
- gifaddr_str, sifaddr_str);
+ __FILE__, __func__, iif_index, oif_index, gifaddr_str,
+ sifaddr_str);
/* Need to put s_route back to the way it was */
if (original_s_route) {
sizeof(sifaddr_str));
zlog_debug(
"%s: Static route added(iif=%d,oif=%d,group=%s,source=%s)",
- __PRETTY_FUNCTION__, iif_index, oif_index, gifaddr_str,
+ __func__, iif_index, oif_index, gifaddr_str,
sifaddr_str);
}
if (!iif_index || !oif_index) {
zlog_warn(
"%s %s: Unable to remove static route: Invalid interface index(iif=%d,oif=%d)",
- __FILE__, __PRETTY_FUNCTION__, iif_index, oif_index);
+ __FILE__, __func__, iif_index, oif_index);
return -2;
}
* route, otherwise set the route with the new outputs
*/
if (s_route->c_oil.oil_ref_count <= 0
- ? pim_mroute_del(&s_route->c_oil,
- __PRETTY_FUNCTION__)
+ ? pim_mroute_del(&s_route->c_oil, __func__)
: pim_static_mroute_add(&s_route->c_oil,
- __PRETTY_FUNCTION__)) {
+ __func__)) {
char gifaddr_str[INET_ADDRSTRLEN];
char sifaddr_str[INET_ADDRSTRLEN];
pim_inet4_dump("<ifaddr?>", group, gifaddr_str,
sizeof(sifaddr_str));
zlog_warn(
"%s %s: Unable to remove static route(iif=%d,oif=%d,group=%s,source=%s)",
- __FILE__, __PRETTY_FUNCTION__,
- iif_index, oif_index, gifaddr_str,
- sifaddr_str);
+ __FILE__, __func__, iif_index,
+ oif_index, gifaddr_str, sifaddr_str);
s_route->oif_ttls[oif_index] = 1;
s_route->c_oil.oil.mfcc_ttls[oif_index] = 1;
sizeof(sifaddr_str));
zlog_debug(
"%s: Static route removed(iif=%d,oif=%d,group=%s,source=%s)",
- __PRETTY_FUNCTION__, iif_index,
- oif_index, gifaddr_str, sifaddr_str);
+ __func__, iif_index, oif_index,
+ gifaddr_str, sifaddr_str);
}
break;
sizeof(sifaddr_str));
zlog_warn(
"%s %s: Unable to remove static route: Route does not exist(iif=%d,oif=%d,group=%s,source=%s)",
- __FILE__, __PRETTY_FUNCTION__, iif_index, oif_index,
- gifaddr_str, sifaddr_str);
+ __FILE__, __func__, iif_index, oif_index, gifaddr_str,
+ sifaddr_str);
return -3;
}
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s(%s): Delete %s[%s] ref count: %d , flags: %d c_oil ref count %d (Pre decrement)",
- __PRETTY_FUNCTION__, name, up->sg_str, pim->vrf->name,
+ __func__, name, up->sg_str, pim->vrf->name,
up->ref_count, up->flags,
up->channel_oil->oil_ref_count);
notify_msdp = true;
}
- pim_mroute_del(up->channel_oil, __PRETTY_FUNCTION__);
+ pim_mroute_del(up->channel_oil, __func__);
upstream_channel_oil_detach(up);
for (ALL_LIST_ELEMENTS(up->ifchannels, node, nnode, ch))
if (PIM_DEBUG_PIM_TRACE) {
char buf[PREFIX2STR_BUFFER];
prefix2str(&nht_p, buf, sizeof(buf));
- zlog_debug("%s: Deregister upstream %s addr %s with Zebra NHT",
- __PRETTY_FUNCTION__, up->sg_str, buf);
+ zlog_debug(
+ "%s: Deregister upstream %s addr %s with Zebra NHT",
+ __func__, up->sg_str, buf);
}
pim_delete_tracked_nexthop(pim, &nht_p, up, NULL, false);
}
struct connected *ifc;
struct listnode *node;
- zlog_debug("%s %s: interface %s addresses:", __FILE__,
- __PRETTY_FUNCTION__, ifp->name);
+ zlog_debug("%s %s: interface %s addresses:", __FILE__, __func__,
+ ifp->name);
for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, ifc)) {
struct prefix *p = ifc->address;
continue;
zlog_debug("%s %s: interface %s address %s %s", __FILE__,
- __PRETTY_FUNCTION__, ifp->name,
- inet_ntoa(p->u.prefix4),
+ __func__, ifp->name, inet_ntoa(p->u.prefix4),
CHECK_FLAG(ifc->flags, ZEBRA_IFA_SECONDARY)
? "secondary"
: "primary");
if (installed != CMD_SUCCESS)
zlog_debug(
"%s: Attempt to install %s as a route and it was rejected",
- __PRETTY_FUNCTION__, shr->dest_str);
+ __func__, shr->dest_str);
listnode_delete(static_list, shr);
static_list_delete(shr);
}
struct stream *s;
if (IS_ZEBRA_DEBUG_PACKET)
- zlog_debug("%s: Notifying %u", __PRETTY_FUNCTION__,
- rule->rule.unique);
+ zlog_debug("%s: Notifying %u", __func__, rule->rule.unique);
for (ALL_LIST_ELEMENTS_RO(zrouter.client_list, node, client)) {
if (rule->sock == client->sock)
struct stream *s;
if (IS_ZEBRA_DEBUG_PACKET)
- zlog_debug("%s: Notifying %u", __PRETTY_FUNCTION__,
- ipset->unique);
+ zlog_debug("%s: Notifying %u", __func__, ipset->unique);
for (ALL_LIST_ELEMENTS_RO(zrouter.client_list, node, client)) {
if (ipset->sock == client->sock)
struct stream *s;
if (IS_ZEBRA_DEBUG_PACKET)
- zlog_debug("%s: Notifying %u", __PRETTY_FUNCTION__,
- ipset->unique);
+ zlog_debug("%s: Notifying %u", __func__, ipset->unique);
for (ALL_LIST_ELEMENTS_RO(zrouter.client_list, node, client)) {
if (ipset->sock == client->sock)
struct stream *s;
if (IS_ZEBRA_DEBUG_PACKET)
- zlog_debug("%s: Notifying %u", __PRETTY_FUNCTION__,
- iptable->unique);
+ zlog_debug("%s: Notifying %u", __func__, iptable->unique);
for (ALL_LIST_ELEMENTS_RO(zrouter.client_list, node, client)) {
if (iptable->sock == client->sock)
return 1;
if (!re) {
- zfpm_debug("%s: Expected non-NULL re pointer",
- __PRETTY_FUNCTION__);
+ zfpm_debug("%s: Expected non-NULL re pointer", __func__);
return 0;
}
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug(
"\t%s: Onlink and interface: %u[%u] does not exist",
- __PRETTY_FUNCTION__, nexthop->ifindex,
+ __func__, nexthop->ifindex,
nexthop->vrf_id);
return 0;
}
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug(
"\t%s: Onlink and interface %s is not operative",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
return 0;
}
if (!if_is_operative(ifp)) {
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug(
"\t%s: Interface %s is not unnumbered",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
return 0;
}
}
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug(
"\t:%s: Attempting to install a max prefixlength route through itself",
- __PRETTY_FUNCTION__);
+ __func__);
return 0;
}
zvrf = zebra_vrf_lookup_by_id(nexthop->vrf_id);
if (!table || !zvrf) {
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
- zlog_debug("\t%s: Table not found",
- __PRETTY_FUNCTION__);
+ zlog_debug("\t%s: Table not found", __func__);
return 0;
}
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug(
"\t%s: Matched against ourself and prefix length is not max bit length",
- __PRETTY_FUNCTION__);
+ __func__);
return 0;
}
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug(
"\t:%s: Resolved against default route",
- __PRETTY_FUNCTION__);
+ __func__);
return 0;
}
if (!resolved && IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug("\t%s: Recursion failed to find",
- __PRETTY_FUNCTION__);
+ __func__);
return resolved;
} else if (re->type == ZEBRA_ROUTE_STATIC) {
resolved = 0;
if (!resolved && IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug(
"\t%s: Static route unable to resolve",
- __PRETTY_FUNCTION__);
+ __func__);
return resolved;
} else {
if (IS_ZEBRA_DEBUG_RIB_DETAILED) {
zlog_debug(
"\t%s: Route Type %s has not turned on recursion",
- __PRETTY_FUNCTION__,
- zebra_route_string(re->type));
+ __func__, zebra_route_string(re->type));
if (re->type == ZEBRA_ROUTE_BGP
&& !CHECK_FLAG(re->flags, ZEBRA_FLAG_IBGP))
zlog_debug(
}
}
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
- zlog_debug("\t%s: Nexthop did not lookup in table",
- __PRETTY_FUNCTION__);
+ zlog_debug("\t%s: Nexthop did not lookup in table", __func__);
return 0;
}
XFREE(MTYPE_TMP, lookup);
} else
zlog_debug("%s: IPTable being deleted we know nothing about",
- __PRETTY_FUNCTION__);
+ __func__);
}
/*
char buf[PREFIX_STRLEN];
char buf1[PREFIX_STRLEN];
- zlog_debug("%s: %u:%s Possible Match to %s",
- __PRETTY_FUNCTION__, rnh->vrf_id,
+ zlog_debug("%s: %u:%s Possible Match to %s", __func__,
+ rnh->vrf_id,
prefix2str(&rnh->node->p, buf, sizeof(buf)),
srcdest_rnode2str(rn, buf1, sizeof(buf)));
}
if (CHECK_FLAG(mac->flags, ZEBRA_MAC_DUPLICATE)) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "%s: duplicate addr MAC %s flags 0x%x skip update to client, learn count %u recover time %u",
- __PRETTY_FUNCTION__,
- prefix_mac2str(&mac->macaddr, buf,
- sizeof(buf)),
- mac->flags, mac->dad_count,
- zvrf->dad_freeze_time);
+ "%s: duplicate addr MAC %s flags 0x%x skip update to client, learn count %u recover time %u",
+ __func__,
+ prefix_mac2str(&mac->macaddr, buf, sizeof(buf)),
+ mac->flags, mac->dad_count,
+ zvrf->dad_freeze_time);
/* For duplicate MAC do not update
* client but update neigh due to
if (reset_params) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "%s: duplicate addr MAC %s flags 0x%x detection time passed, reset learn count %u"
- , __PRETTY_FUNCTION__,
- prefix_mac2str(&mac->macaddr, buf,
- sizeof(buf)),
- mac->flags, mac->dad_count);
+ "%s: duplicate addr MAC %s flags 0x%x detection time passed, reset learn count %u",
+ __func__,
+ prefix_mac2str(&mac->macaddr, buf, sizeof(buf)),
+ mac->flags, mac->dad_count);
mac->dad_count = 0;
/* Start dup. addr detection (DAD) start time,
if (zvrf->dad_freeze && zvrf->dad_freeze_time) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "%s: duplicate addr MAC %s flags 0x%x auto recovery time %u start"
- , __PRETTY_FUNCTION__,
+ "%s: duplicate addr MAC %s flags 0x%x auto recovery time %u start",
+ __func__,
prefix_mac2str(&mac->macaddr, buf,
sizeof(buf)),
mac->flags, zvrf->dad_freeze_time);
return 0;
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("%s: duplicate addr mac %s flags 0x%x learn count %u host count %u auto recovery expired",
- __PRETTY_FUNCTION__,
- prefix_mac2str(&mac->macaddr, buf, sizeof(buf)),
- mac->flags,
- mac->dad_count,
- listcount(mac->neigh_list));
+ zlog_debug(
+ "%s: duplicate addr mac %s flags 0x%x learn count %u host count %u auto recovery expired",
+ __func__,
+ prefix_mac2str(&mac->macaddr, buf, sizeof(buf)),
+ mac->flags, mac->dad_count, listcount(mac->neigh_list));
/* Remove all IPs as duplicate associcated with this MAC */
for (ALL_LIST_ELEMENTS_RO(mac->neigh_list, node, nbr)) {