summaryrefslogtreecommitdiffstats
path: root/pimd
diff options
context:
space:
mode:
Diffstat (limited to 'pimd')
-rw-r--r--pimd/pim_bfd.c15
-rw-r--r--pimd/pim_bsm.c26
-rw-r--r--pimd/pim_cmd.c2
-rw-r--r--pimd/pim_iface.c20
-rw-r--r--pimd/pim_ifchannel.c48
-rw-r--r--pimd/pim_igmpv3.c8
-rw-r--r--pimd/pim_join.c24
-rw-r--r--pimd/pim_jp_agg.c4
-rw-r--r--pimd/pim_mroute.c16
-rw-r--r--pimd/pim_msdp_socket.c4
-rw-r--r--pimd/pim_msg.c17
-rw-r--r--pimd/pim_neighbor.c11
-rw-r--r--pimd/pim_rp.c9
-rw-r--r--pimd/pim_sock.c3
-rw-r--r--pimd/pim_static.c42
-rw-r--r--pimd/pim_upstream.c9
-rw-r--r--pimd/pim_zebra.c7
17 files changed, 120 insertions, 145 deletions
diff --git a/pimd/pim_bfd.c b/pimd/pim_bfd.c
index f5fc1eebf..84f6733ea 100644
--- a/pimd/pim_bfd.c
+++ b/pimd/pim_bfd.c
@@ -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);
diff --git a/pimd/pim_bsm.c b/pimd/pim_bsm.c
index 91fbddf93..bcf11aedb 100644
--- a/pimd/pim_bsm.c
+++ b/pimd/pim_bsm.c
@@ -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__);
}
}
}
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 85ce41ef3..a3e5151a7 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -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__);
}
}
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c
index 16eea1d6d..cb31878e0 100644
--- a/pimd/pim_iface.c
+++ b/pimd/pim_iface.c
@@ -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;
}
diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c
index f3975a387..ead9d6dbc 100644
--- a/pimd/pim_ifchannel.c
+++ b/pimd/pim_ifchannel.c
@@ -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)
diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c
index d63269da9..ffd872ce0 100644
--- a/pimd/pim_igmpv3.c
+++ b/pimd/pim_igmpv3.c
@@ -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
diff --git a/pimd/pim_join.c b/pimd/pim_join.c
index f2cd04e45..62bd2360c 100644
--- a/pimd/pim_join.c
+++ b/pimd/pim_join.c
@@ -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;
diff --git a/pimd/pim_jp_agg.c b/pimd/pim_jp_agg.c
index 2662c9eae..5279a0085 100644
--- a/pimd/pim_jp_agg.c
+++ b/pimd/pim_jp_agg.c
@@ -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;
}
diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c
index 36b066735..14f8a8312 100644
--- a/pimd/pim_mroute.c
+++ b/pimd/pim_mroute.c
@@ -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;
}
}
diff --git a/pimd/pim_msdp_socket.c b/pimd/pim_msdp_socket.c
index 50489ca88..7620cd579 100644
--- a/pimd/pim_msdp_socket.c
+++ b/pimd/pim_msdp_socket.c
@@ -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;
}
diff --git a/pimd/pim_msg.c b/pimd/pim_msg.c
index fba76d84d..65b6405c8 100644
--- a/pimd/pim_msg.c
+++ b/pimd/pim_msg.c
@@ -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;
diff --git a/pimd/pim_neighbor.c b/pimd/pim_neighbor.c
index ec40beec7..ca7ca1140 100644
--- a/pimd/pim_neighbor.c
+++ b/pimd/pim_neighbor.c
@@ -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;
diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c
index 55b7db6a5..8799134ed 100644
--- a/pimd/pim_rp.c
+++ b/pimd/pim_rp.c
@@ -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);
}
}
}
diff --git a/pimd/pim_sock.c b/pimd/pim_sock.c
index 177dab05c..ae5781f0c 100644
--- a/pimd/pim_sock.c
+++ b/pimd/pim_sock.c
@@ -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));
}
}
diff --git a/pimd/pim_static.c b/pimd/pim_static.c
index 7b121c913..91c9b5b93 100644
--- a/pimd/pim_static.c
+++ b/pimd/pim_static.c
@@ -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;
}
diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c
index ef65f097a..cf333ffcc 100644
--- a/pimd/pim_upstream.c
+++ b/pimd/pim_upstream.c
@@ -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);
}
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c
index 13d6a2eea..e791500ed 100644
--- a/pimd/pim_zebra.c
+++ b/pimd/pim_zebra.c
@@ -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");