summaryrefslogtreecommitdiff
path: root/pimd/pim_join.c
diff options
context:
space:
mode:
Diffstat (limited to 'pimd/pim_join.c')
-rw-r--r--pimd/pim_join.c64
1 files changed, 30 insertions, 34 deletions
diff --git a/pimd/pim_join.c b/pimd/pim_join.c
index fbb547c80e..62bd2360c3 100644
--- a/pimd/pim_join.c
+++ b/pimd/pim_join.c
@@ -64,7 +64,7 @@ static void recv_join(struct interface *ifp, struct pim_neighbor *neigh,
sizeof(neigh_str));
zlog_debug(
"%s: join (S,G)=%s rpt=%d wc=%d upstream=%s holdtime=%d from %s on %s",
- __PRETTY_FUNCTION__, pim_str_sg_dump(sg),
+ __func__, pim_str_sg_dump(sg),
!!(source_flags & PIM_RPT_BIT_MASK),
!!(source_flags & PIM_WILDCARD_BIT_MASK), up_str,
holdtime, neigh_str, ifp->name);
@@ -84,8 +84,8 @@ static void recv_join(struct interface *ifp, struct pim_neighbor *neigh,
struct pim_rpf *rp = RP(pim_ifp->pim, sg->grp);
if (!rp) {
- zlog_warn("%s: Lookup of RP failed for %pSG4",
- __PRETTY_FUNCTION__, sg);
+ zlog_warn("%s: Lookup of RP failed for %pSG4", __func__,
+ sg);
return;
}
/*
@@ -99,8 +99,9 @@ static void recv_join(struct interface *ifp, struct pim_neighbor *neigh,
sizeof(received_rp));
pim_inet4_dump("<local?>", rp->rpf_addr.u.prefix4,
local_rp, sizeof(local_rp));
- zlog_warn("%s: Specified RP(%s) in join is different than our configured RP(%s)",
- __PRETTY_FUNCTION__, received_rp, local_rp);
+ zlog_warn(
+ "%s: Specified RP(%s) in join is different than our configured RP(%s)",
+ __func__, received_rp, local_rp);
return;
}
@@ -126,7 +127,7 @@ static void recv_prune(struct interface *ifp, struct pim_neighbor *neigh,
sizeof(neigh_str));
zlog_debug(
"%s: prune (S,G)=%s rpt=%d wc=%d upstream=%s holdtime=%d from %s on %s",
- __PRETTY_FUNCTION__, pim_str_sg_dump(sg),
+ __func__, pim_str_sg_dump(sg),
source_flags & PIM_RPT_BIT_MASK,
source_flags & PIM_WILDCARD_BIT_MASK, up_str, holdtime,
neigh_str, ifp->name);
@@ -143,8 +144,9 @@ static void recv_prune(struct interface *ifp, struct pim_neighbor *neigh,
if (!rp) {
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: RP for %pSG4 completely failed lookup",
- __PRETTY_FUNCTION__, sg);
+ zlog_debug(
+ "%s: RP for %pSG4 completely failed lookup",
+ __func__, sg);
return;
}
// Ignoring Prune *,G's at the moment.
@@ -184,7 +186,7 @@ int pim_joinprune_recv(struct interface *ifp, struct pim_neighbor *neigh,
char src_str[INET_ADDRSTRLEN];
pim_inet4_dump("<src?>", src_addr, src_str, sizeof(src_str));
zlog_warn("%s: pim_parse_addr_ucast() failure: from %s on %s",
- __PRETTY_FUNCTION__, src_str, ifp->name);
+ __func__, src_str, ifp->name);
return -1;
}
buf += addr_offset;
@@ -195,9 +197,9 @@ int pim_joinprune_recv(struct interface *ifp, struct pim_neighbor *neigh,
if (msg_upstream_addr.family != AF_INET) {
char src_str[INET_ADDRSTRLEN];
pim_inet4_dump("<src?>", src_addr, src_str, sizeof(src_str));
- zlog_warn("%s: ignoring join/prune directed to unexpected addr family=%d from %s on %s",
- __PRETTY_FUNCTION__, msg_upstream_addr.family,
- src_str, ifp->name);
+ zlog_warn(
+ "%s: ignoring join/prune directed to unexpected addr family=%d from %s on %s",
+ __func__, msg_upstream_addr.family, src_str, ifp->name);
return -2;
}
@@ -207,7 +209,7 @@ int pim_joinprune_recv(struct interface *ifp, struct pim_neighbor *neigh,
pim_inet4_dump("<src?>", src_addr, src_str, sizeof(src_str));
zlog_warn(
"%s: short join/prune message buffer for group list: size=%d minimum=%d from %s on %s",
- __PRETTY_FUNCTION__, remain, 4, src_str, ifp->name);
+ __func__, remain, 4, src_str, ifp->name);
return -4;
}
@@ -226,8 +228,8 @@ int pim_joinprune_recv(struct interface *ifp, struct pim_neighbor *neigh,
upstream_str, sizeof(upstream_str));
zlog_debug(
"%s: join/prune upstream=%s groups=%d holdtime=%d from %s on %s",
- __PRETTY_FUNCTION__, upstream_str, msg_num_groups,
- msg_holdtime, src_str, ifp->name);
+ __func__, upstream_str, msg_num_groups, msg_holdtime,
+ src_str, ifp->name);
}
/* Scan groups */
@@ -254,8 +256,7 @@ int pim_joinprune_recv(struct interface *ifp, struct pim_neighbor *neigh,
sizeof(src_str));
zlog_warn(
"%s: short join/prune buffer for source list: size=%d minimum=%d from %s on %s",
- __PRETTY_FUNCTION__, remain, 4, src_str,
- ifp->name);
+ __func__, remain, 4, src_str, ifp->name);
return -6;
}
@@ -276,7 +277,7 @@ int pim_joinprune_recv(struct interface *ifp, struct pim_neighbor *neigh,
sizeof(group_str));
zlog_debug(
"%s: join/prune upstream=%s group=%s/32 join_src=%d prune_src=%d from %s on %s",
- __PRETTY_FUNCTION__, upstream_str, group_str,
+ __func__, upstream_str, group_str,
msg_num_joined_sources, msg_num_pruned_sources,
src_str, ifp->name);
}
@@ -345,8 +346,7 @@ int pim_joinprune_recv(struct interface *ifp, struct pim_neighbor *neigh,
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: SGRpt flag is set, del inherit oif from up %s",
- __PRETTY_FUNCTION__,
- up->sg_str);
+ __func__, up->sg_str);
pim_channel_del_inherited_oif(
up->channel_oil,
starg_ch->interface,
@@ -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;