]> git.puffer.fish Git - mirror/frr.git/commitdiff
*: Finish off the __PRETTY_FUNCTION__ to __func__ 5924/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 6 Mar 2020 14:23:22 +0000 (09:23 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 6 Mar 2020 14:23:22 +0000 (09:23 -0500)
FINISH IT

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
37 files changed:
bgpd/bgpd.c
lib/wheel.c
ospf6d/ospf6_abr.c
ospf6d/ospf6_asbr.c
ospf6d/ospf6_flood.c
ospf6d/ospf6_intra.c
ospf6d/ospf6_spf.c
ospfd/ospf_spf.c
ospfd/ospf_vty.c
ospfd/ospf_zebra.c
ospfd/ospfd.c
pbrd/pbr_map.c
pbrd/pbr_nht.c
pimd/pim_bfd.c
pimd/pim_bsm.c
pimd/pim_cmd.c
pimd/pim_iface.c
pimd/pim_ifchannel.c
pimd/pim_igmpv3.c
pimd/pim_join.c
pimd/pim_jp_agg.c
pimd/pim_mroute.c
pimd/pim_msdp_socket.c
pimd/pim_msg.c
pimd/pim_neighbor.c
pimd/pim_rp.c
pimd/pim_sock.c
pimd/pim_static.c
pimd/pim_upstream.c
pimd/pim_zebra.c
staticd/static_vty.c
zebra/zapi_msg.c
zebra/zebra_fpm_netlink.c
zebra/zebra_nhg.c
zebra/zebra_pbr.c
zebra/zebra_rnh.c
zebra/zebra_vxlan.c

index 0e1278b1df28455de3ef94d17bfbfabad2388d38..26a22c399b3191942f9c8510239345c788ac5855 100644 (file)
@@ -3398,8 +3398,9 @@ int bgp_delete(struct bgp *bgp)
        /* 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);
        }
 
index 214e5e8167c3e148da6d6df2406473cac65381dc..f5e5cc52c31d5a87c9ed22362289170c4a143d89 100644 (file)
@@ -47,8 +47,8 @@ static int wheel_timer_thread_helper(struct thread *t)
        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,
index b0d501dab4a1ef38f731567c4d5e650886af7817..ead186b6fc0d6341fbaa8766b9dba006166fb558 100644 (file)
@@ -763,11 +763,13 @@ void ospf6_abr_old_path_update(struct ospf6_route *old_route,
                }
 
                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);
@@ -823,9 +825,10 @@ void ospf6_abr_old_route_remove(struct ospf6_lsa *lsa,
                                        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)
@@ -879,8 +882,8 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)
        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 =
@@ -899,8 +902,8 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)
        } 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 =
@@ -947,9 +950,10 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)
                                                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;
                                        }
@@ -974,8 +978,8 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)
        }
        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;
@@ -1054,21 +1058,21 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)
            || 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);
                        }
                }
@@ -1143,11 +1147,10 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)
                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
@@ -1186,14 +1189,15 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)
                                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 */
@@ -1202,10 +1206,11 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)
                }
 
                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
@@ -1222,9 +1227,10 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)
                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);
index 486e4d8d2ab762017b8a00c0096a2036858b76f7..805e411c7bb3ccb2080d6d202348044b1e34054d 100644 (file)
@@ -166,7 +166,7 @@ int ospf6_orig_as_external_lsa(struct thread *thread)
                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);
@@ -245,7 +245,7 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old,
                                           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);
                        }
 
@@ -309,7 +309,7 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old,
                                                   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);
                                }
@@ -340,8 +340,7 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old,
                                           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;
@@ -378,13 +377,11 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old,
                                                   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 {
@@ -410,9 +407,9 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old,
                                                        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;
                                }
@@ -422,12 +419,15 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old,
 
                        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 */
@@ -621,9 +621,8 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,
                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);
@@ -670,8 +669,8 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,
                                                           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);
                                        }
@@ -682,8 +681,7 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,
                                        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));
                                }
 
@@ -726,14 +724,15 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,
                                                   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)) {
@@ -785,8 +784,7 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,
                                        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;
@@ -802,7 +800,7 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,
                        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,
index 891421b7e8a1c898675762c4e378dc757ede7f2c..85d02c186b70bf4ebe1ddc4227dc2ce4132e9742 100644 (file)
@@ -373,7 +373,7 @@ void ospf6_flood_interface(struct ospf6_neighbor *from, struct ospf6_lsa *lsa,
                        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;
index 192e6356b1a25abd3b84c101474ad4a4909bf340..9c239b75ff2e99c3095de1121b05a80e7a612620 100644 (file)
@@ -1022,8 +1022,9 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread)
         */
        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;
@@ -1401,9 +1402,10 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,
                        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
@@ -1458,10 +1460,11 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,
                                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,
@@ -1516,13 +1519,13 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,
                                                   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);
@@ -1540,9 +1543,9 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,
                                                        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,
@@ -1559,9 +1562,9 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,
                                                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;
                                }
@@ -1587,12 +1590,13 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,
 
                        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
@@ -1784,7 +1788,7 @@ static void ospf6_intra_prefix_lsa_remove_update_route(struct ospf6_lsa *lsa,
                        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));
                }
 
@@ -1820,11 +1824,10 @@ static void ospf6_intra_prefix_lsa_remove_update_route(struct ospf6_lsa *lsa,
 
                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
index 524017a31effdbac1bd67df8341fcfdfe5ebc42a..b0fe890d33c9b06d63c284d355a86a1313589143 100644 (file)
@@ -1089,7 +1089,7 @@ void ospf6_remove_temp_router_lsa(struct ospf6_area *area)
                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);
        }
index 620691a98de246d50c7db9eb1445c3444970d1a9..8b605b3bac63dd758ec56bbb5a59b3e705321a41 100644 (file)
@@ -1345,7 +1345,7 @@ static int ospf_spf_calculate_timer(struct thread *thread)
        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);
index fb4082e50994f168ff1b98b72b8836479aa9fae6..fd2ab07261bb3fd95c6059724fedf5c22c9e1794 100644 (file)
@@ -619,8 +619,7 @@ DEFUN (ospf_network_area,
                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;
        }
index 1cea79d641dd7e41e62c06460b6a51b6548e87c1..385a7ece7bf7e3948b3493b4025288b27f2c88be 100644 (file)
@@ -957,8 +957,8 @@ static int ospf_distribute_list_update_timer(struct thread *thread)
        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. */
index 2a0f8cdc0c43a946e2af53d3f9ca6fa31ccf4300..f3fe9e17b28ee1a0c7d0240bbff0799994830bbf 100644 (file)
@@ -2060,8 +2060,8 @@ static int ospf_vrf_enable(struct vrf *vrf)
        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) {
@@ -2075,8 +2075,7 @@ static int ospf_vrf_enable(struct vrf *vrf)
                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) {
index 9f4a75fa49a0ec3f1680313328d45ae10e437802..e45e6296497d1e473ca6829d3903325704b183e7 100644 (file)
@@ -327,8 +327,7 @@ void pbr_map_vrf_update(const struct pbr_vrf *pbr_vrf)
               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);
        }
@@ -417,8 +416,7 @@ struct pbr_map_sequence *pbrms_lookup_unique(uint32_t unique, ifindex_t ifindex,
                        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;
                        }
@@ -611,8 +609,7 @@ void pbr_map_schedule_policy_from_nhg(const char *nh_group)
        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 ?
@@ -643,16 +640,15 @@ void pbr_map_policy_install(const char *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) {
index c0c417a7431e39258d38713b85e19a707838e1a5..ecd375333c97b971c00aaaa775db463055e2f5c4 100644 (file)
@@ -431,13 +431,13 @@ static afi_t pbr_nht_which_afi(struct nexthop_group nhg,
 
        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;
 }
@@ -485,7 +485,7 @@ void pbr_nht_change_group(const char *name)
        if (!pnhgc) {
                DEBUGD(&pbr_dbg_nht,
                       "%s: Could not find nexthop-group cache w/ name '%s'",
-                      __PRETTY_FUNCTION__, name);
+                      __func__, name);
                return;
        }
 
@@ -579,7 +579,7 @@ struct pbr_nexthop_group_cache *pbr_nht_add_group(const char *name)
        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;
        }
 
@@ -587,14 +587,13 @@ struct pbr_nexthop_group_cache *pbr_nht_add_group(const char *name)
 
        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;
index f5fc1eebf602260e83c5b594d3c5652138564299..84f6733eafdf0535f56fa0d07a9d57b2b792ba19 100644 (file)
@@ -240,16 +240,15 @@ static int pim_bfd_interface_dest_update(ZAPI_CALLBACK_ARGS)
        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,
@@ -265,7 +264,7 @@ static int pim_bfd_interface_dest_update(ZAPI_CALLBACK_ARGS)
                                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;
                }
@@ -275,8 +274,7 @@ static int pim_bfd_interface_dest_update(ZAPI_CALLBACK_ARGS)
                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));
                }
@@ -328,8 +326,7 @@ static int pim_bfd_nbr_replay(ZAPI_CALLBACK_ARGS)
                                                       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);
index 91fbddf939af6870a18dac763cf2358f1961d130..bcf11aedbd94d543eb0fd00ff8a64a02d3c4a0ab 100644 (file)
@@ -335,7 +335,7 @@ static int pim_on_g2rp_timer(struct thread *t)
        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;
        }
 
@@ -910,8 +910,8 @@ bool pim_bsm_new_nbr_fwd(struct pim_neighbor *neigh, struct interface *ifp)
        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;
@@ -921,13 +921,13 @@ bool pim_bsm_new_nbr_fwd(struct pim_neighbor *neigh, struct interface *ifp)
                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;
        }
 
@@ -936,20 +936,20 @@ bool pim_bsm_new_nbr_fwd(struct pim_neighbor *neigh, struct interface *ifp)
        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);
@@ -962,7 +962,7 @@ bool pim_bsm_new_nbr_fwd(struct pim_neighbor *neigh, struct interface *ifp)
                                if (PIM_DEBUG_BSM)
                                        zlog_debug(
                                                "%s: pim_bsm_frag_send failed",
-                                               __PRETTY_FUNCTION__);
+                                               __func__);
                        }
                } else {
                        /* Pim header needs to be constructed */
@@ -974,7 +974,7 @@ bool pim_bsm_new_nbr_fwd(struct pim_neighbor *neigh, struct interface *ifp)
                                if (PIM_DEBUG_BSM)
                                        zlog_debug(
                                                "%s: pim_bsm_frag_send failed",
-                                               __PRETTY_FUNCTION__);
+                                               __func__);
                        }
                }
        }
index 85ce41ef35a6ffd384b76c83fe48d740f8375e7f..a3e5151a7830354316a6e38b0f05df38e4f04fda 100644 (file)
@@ -3927,7 +3927,7 @@ static void clear_mroute(struct pim_instance *pim)
 
        /* 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__);
        }
 }
 
index 16eea1d6dfc8473444f9bf7dd449e31ba0a35546..cb31878e01516d08e47a89ab58076179c177a2ff 100644 (file)
@@ -514,7 +514,7 @@ void pim_if_addr_add(struct connected *ifc)
                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");
@@ -522,7 +522,7 @@ void pim_if_addr_add(struct connected *ifc)
 
        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;
@@ -570,8 +570,8 @@ void pim_if_addr_add(struct connected *ifc)
                                                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;
@@ -876,7 +876,7 @@ struct in_addr pim_find_primary_addr(struct interface *ifp)
                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;
                }
 
@@ -1128,8 +1128,8 @@ struct pim_neighbor *pim_if_find_neighbor(struct interface *ifp,
 
        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;
        }
 
@@ -1154,7 +1154,7 @@ struct pim_neighbor *pim_if_find_neighbor(struct interface *ifp,
                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;
@@ -1379,8 +1379,8 @@ static void pim_if_igmp_join_del_all(struct interface *ifp)
 
        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;
        }
 
index f3975a38792411b4fbd784f9567e33520acaf000..ead9d6dbcc4d68c052c724774139acd6a28cdf2a 100644 (file)
@@ -188,15 +188,15 @@ void pim_ifchannel_delete(struct pim_ifchannel *ch)
           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;
@@ -213,8 +213,8 @@ void pim_ifchannel_delete(struct pim_ifchannel *ch)
        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);
 }
@@ -263,7 +263,7 @@ void pim_ifchannel_ifjoin_switch(const char *caller, struct 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;
@@ -286,8 +286,7 @@ void pim_ifchannel_ifjoin_switch(const char *caller, struct pim_ifchannel *ch,
                                        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)
@@ -313,8 +312,7 @@ void pim_ifchannel_ifjoin_switch(const char *caller, struct pim_ifchannel *ch,
                                        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);
 
@@ -1050,16 +1048,15 @@ int pim_ifchannel_local_membership_add(struct interface *ifp,
        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;
        }
 
@@ -1071,8 +1068,7 @@ int pim_ifchannel_local_membership_add(struct interface *ifp,
                        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;
                }
        }
@@ -1093,9 +1089,8 @@ int pim_ifchannel_local_membership_add(struct interface *ifp,
                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(
@@ -1167,9 +1162,8 @@ void pim_ifchannel_local_membership_del(struct interface *ifp,
 
                        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);
                        /*
@@ -1361,7 +1355,7 @@ void pim_ifchannel_set_star_g_join_state(struct pim_ifchannel *ch, int eom,
 
        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)
index d63269da9f952122402341816bd2374e8260f90a..ffd872ce033ba213777ac6de3227929150bc788b 100644 (file)
@@ -1133,7 +1133,7 @@ static int group_retransmit_sources(struct igmp_group *group,
                                               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);
@@ -1177,9 +1177,9 @@ static int group_retransmit_sources(struct igmp_group *group,
                                       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
index f2cd04e4537a19239aef039bf23346f1a6013550..62bd2360c3e7f30c6fe2eaef9eaf86eccc3a8d52 100644 (file)
@@ -445,17 +445,15 @@ int pim_joinprune_send(struct pim_rpf *rpf, struct list *groups)
        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;
        }
@@ -466,7 +464,7 @@ int pim_joinprune_send(struct pim_rpf *rpf, struct list *groups)
                        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;
@@ -515,7 +513,7 @@ int pim_joinprune_send(struct pim_rpf *rpf, struct list *groups)
                                       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);
                }
 
@@ -530,7 +528,7 @@ int pim_joinprune_send(struct pim_rpf *rpf, struct list *groups)
                                         rpf->source_nexthop.interface->name)) {
                                zlog_warn(
                                        "%s: could not send PIM message on interface %s",
-                                       __PRETTY_FUNCTION__,
+                                       __func__,
                                        rpf->source_nexthop.interface->name);
                        }
 
@@ -571,8 +569,7 @@ int pim_joinprune_send(struct pim_rpf *rpf, struct list *groups)
                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;
@@ -587,7 +584,7 @@ int pim_joinprune_send(struct pim_rpf *rpf, struct list *groups)
                                         rpf->source_nexthop.interface->name)) {
                                zlog_warn(
                                        "%s: could not send PIM message on interface %s",
-                                       __PRETTY_FUNCTION__,
+                                       __func__,
                                        rpf->source_nexthop.interface->name);
                        }
 
@@ -606,8 +603,7 @@ int pim_joinprune_send(struct pim_rpf *rpf, struct list *groups)
                                 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;
index 2662c9eae68d2b2aaba910c65555ab00ea7d006e..5279a008556f5ea2ccea142a21923bd366ccfcaf 100644 (file)
@@ -239,8 +239,8 @@ void pim_jp_agg_upstream_verification(struct pim_upstream *up, bool ignore)
 
        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;
        }
 
index 36b066735c6e6c756abb0f61760d633448651074..14f8a8312b32b6c014fb85e3697ec4161892107e 100644 (file)
@@ -65,10 +65,9 @@ static int pim_mroute_set(struct pim_instance *pim, int enable)
                                         &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;
                        }
 
@@ -86,11 +85,10 @@ static int pim_mroute_set(struct pim_instance *pim, int enable)
                                 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;
                }
        }
index 50489ca88c9e839a1c3279ea4de23d301ed4f25a..7620cd5792316c96528a80a3017538e3969e557f 100644 (file)
@@ -162,14 +162,14 @@ int pim_msdp_sock_listen(struct pim_instance *pim)
                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;
                }
index fba76d84dd4f0a99eaa7e63233d0def5b1e281b3..65b6405c81faa0c6cc442558e4df01fcacd4bca4 100644 (file)
@@ -123,7 +123,7 @@ size_t pim_msg_get_jp_group_size(struct list *sources)
                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)) {
@@ -144,13 +144,12 @@ size_t pim_msg_get_jp_group_size(struct list *sources)
                                        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
@@ -163,14 +162,12 @@ size_t pim_msg_get_jp_group_size(struct list *sources)
                                                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;
index ec40beec7f280dcae3b093620c92305f500f18fb..ca7ca114022b1d2c1252f56196126c8e5b862f5c 100644 (file)
@@ -53,8 +53,7 @@ static void dr_election_by_addr(struct interface *ifp)
        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)) {
@@ -79,14 +78,14 @@ static void dr_election_by_pri(struct interface *ifp)
        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));
                }
@@ -389,7 +388,7 @@ static void delete_prefix_list(struct pim_neighbor *neigh)
                                       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;
index 55b7db6a5cfde7ae12e18a4251c40117d4f8ae24..8799134edd6054100234f443769cab97cfb88272 100644 (file)
@@ -240,7 +240,7 @@ struct rp_info *pim_rp_find_match_group(struct pim_instance *pim,
                flog_err(
                        EC_LIB_DEVELOPMENT,
                        "%s: BUG We should have found default group information\n",
-                       __PRETTY_FUNCTION__);
+                       __func__);
                return best;
        }
 
@@ -550,7 +550,7 @@ int pim_rp_new(struct pim_instance *pim, struct in_addr rp_addr,
                                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) {
@@ -676,7 +676,7 @@ int pim_rp_new(struct pim_instance *pim, struct in_addr rp_addr,
                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,
@@ -1394,8 +1394,7 @@ void pim_resolve_rp_nh(struct pim_instance *pim, struct pim_neighbor *nbr)
                                              sizeof(str));
                                zlog_debug(
                                        "%s: addr %s new nexthop addr %s interface %s",
-                                       __PRETTY_FUNCTION__, str, str1,
-                                       ifp1->name);
+                                       __func__, str, str1, ifp1->name);
                        }
                }
        }
index 177dab05caa1269e55b24697be48b5708d06b167..ae5781f0cc8d71b72e243e764628f01d53055991 100644 (file)
@@ -69,8 +69,7 @@ void pim_socket_ip_hdr(int fd)
 
                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));
        }
 }
 
index 7b121c9136bbc2708251ab1609c145f6ef1d5c18..91c9b5b9337ec48a35d6ce97a6d8bae41919e745 100644 (file)
@@ -79,7 +79,7 @@ int pim_static_add(struct pim_instance *pim, struct interface *iif,
        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;
        }
 
@@ -88,7 +88,7 @@ int pim_static_add(struct pim_instance *pim, struct interface *iif,
                /* 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
@@ -109,9 +109,8 @@ int pim_static_add(struct pim_instance *pim, struct interface *iif,
                                               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;
                        }
 
@@ -138,9 +137,8 @@ int pim_static_add(struct pim_instance *pim, struct interface *iif,
                        } 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
@@ -179,7 +177,7 @@ int pim_static_add(struct pim_instance *pim, struct interface *iif,
 
        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,
@@ -188,8 +186,8 @@ int pim_static_add(struct pim_instance *pim, struct interface *iif,
                               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) {
@@ -223,7 +221,7 @@ int pim_static_add(struct pim_instance *pim, struct interface *iif,
                               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);
        }
 
@@ -245,7 +243,7 @@ int pim_static_del(struct pim_instance *pim, struct interface *iif,
        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;
        }
 
@@ -262,10 +260,9 @@ int pim_static_del(struct pim_instance *pim, struct interface *iif,
                         * 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,
@@ -274,9 +271,8 @@ int pim_static_del(struct pim_instance *pim, struct interface *iif,
                                               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;
@@ -301,8 +297,8 @@ int pim_static_del(struct pim_instance *pim, struct interface *iif,
                                               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;
@@ -318,8 +314,8 @@ int pim_static_del(struct pim_instance *pim, struct interface *iif,
                               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;
        }
 
index ef65f097ad573204888f7a06a42abdde959ba622..cf333ffccf152f06de4d816c92895676710ed266 100644 (file)
@@ -178,7 +178,7 @@ struct pim_upstream *pim_upstream_del(struct pim_instance *pim,
        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);
 
@@ -221,7 +221,7 @@ struct pim_upstream *pim_upstream_del(struct pim_instance *pim,
                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))
@@ -256,8 +256,9 @@ struct pim_upstream *pim_upstream_del(struct pim_instance *pim,
                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);
        }
index 13d6a2eea85232ff09342f616c3f48870a381c40..e791500ede49f29a047756f70d7b03d8fd92c025 100644 (file)
@@ -89,8 +89,8 @@ static void dump_if_address(struct interface *ifp)
        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;
@@ -99,8 +99,7 @@ static void dump_if_address(struct interface *ifp)
                        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");
index 3903a5a5c5c6fea876b9f871f43814349f2aa1cb..40bcf2b5d3de622622b5aa4185530b87aba4a289 100644 (file)
@@ -591,7 +591,7 @@ void static_config_install_delayed_routes(struct static_vrf *svrf)
                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);
        }
index 509c0e10197503aec9d4b851f0fce51690b81ccc..f372b548fce048553c0fccc052128ac6965f06aa 100644 (file)
@@ -790,8 +790,7 @@ void zsend_rule_notify_owner(struct zebra_pbr_rule *rule,
        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)
@@ -823,8 +822,7 @@ void zsend_ipset_notify_owner(struct zebra_pbr_ipset *ipset,
        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)
@@ -853,8 +851,7 @@ void zsend_ipset_entry_notify_owner(struct zebra_pbr_ipset_entry *ipset,
        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)
@@ -883,8 +880,7 @@ void zsend_iptable_notify_owner(struct zebra_pbr_iptable *iptable,
        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)
index d60da336fd5b5588a926d3f6d17466a6e17fe997..0d6428026a2e634fa307c39c69bce578b39d5d86 100644 (file)
@@ -300,8 +300,7 @@ static int netlink_route_info_fill(netlink_route_info_t *ri, int cmd,
                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;
        }
 
index 097dd7f024299bfe3cff6aae4ff403e0d9dbeb65..ee90b83ebe647558390e4083e9c6c9c85cfe7645 100644 (file)
@@ -1418,7 +1418,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
                        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;
                }
@@ -1429,14 +1429,14 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
                        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;
                }
        }
@@ -1448,7 +1448,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
                if (IS_ZEBRA_DEBUG_RIB_DETAILED)
                        zlog_debug(
                                "\t:%s: Attempting to install a max prefixlength route through itself",
-                               __PRETTY_FUNCTION__);
+                               __func__);
                return 0;
        }
 
@@ -1475,8 +1475,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
        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;
        }
 
@@ -1495,7 +1494,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
                                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;
                        }
 
@@ -1508,7 +1507,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
                        if (IS_ZEBRA_DEBUG_RIB_DETAILED)
                                zlog_debug(
                                        "\t:%s: Resolved against default route",
-                                       __PRETTY_FUNCTION__);
+                                       __func__);
                        return 0;
                }
 
@@ -1560,7 +1559,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
 
                        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;
@@ -1582,14 +1581,13 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
                        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(
@@ -1599,8 +1597,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
                }
        }
        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;
 }
 
index a11f428b57b559897afe7727be6b2c787e9ebf15..6728567e6edce45ab35cdae536ce15fc0cbc9e4a 100644 (file)
@@ -710,7 +710,7 @@ void zebra_pbr_del_iptable(struct zebra_pbr_iptable *iptable)
                XFREE(MTYPE_TMP, lookup);
        } else
                zlog_debug("%s: IPTable being deleted we know nothing about",
-                          __PRETTY_FUNCTION__);
+                          __func__);
 }
 
 /*
index 35a4db306453a4189c728cbf1787916da9c32375..6cfc68eb74721c4d54c69a6d1c197707bb67691f 100644 (file)
@@ -643,8 +643,8 @@ zebra_rnh_resolve_nexthop_entry(struct zebra_vrf *zvrf, afi_t afi,
                        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)));
                }
index caff99dbe20dc2866f4502e7922ac307d11666cd..dce48d39bd9445705bbacdf9e8eb3d2c230d515a 100644 (file)
@@ -443,12 +443,11 @@ static void zebra_vxlan_dup_addr_detect_for_mac(struct zebra_vrf *zvrf,
        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
@@ -479,11 +478,10 @@ static void zebra_vxlan_dup_addr_detect_for_mac(struct zebra_vrf *zvrf,
        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,
@@ -547,8 +545,8 @@ static void zebra_vxlan_dup_addr_detect_for_mac(struct zebra_vrf *zvrf,
                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);
@@ -9787,12 +9785,11 @@ static int zebra_vxlan_dad_mac_auto_recovery_exp(struct thread *t)
                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)) {