void pim_ifchannel_prune(struct interface *ifp,
struct in_addr upstream,
- struct in_addr source_addr,
- struct in_addr group_addr,
+ struct prefix *sg,
uint8_t source_flags,
uint16_t holdtime)
{
struct pim_ifchannel *ch;
int jp_override_interval_msec;
- struct prefix sg;
-
- memset (&sg, 0, sizeof (struct prefix));
- sg.u.sg.src = source_addr;
- sg.u.sg.grp = group_addr;
if (nonlocal_upstream(0 /* prune */, ifp, upstream,
- source_addr, group_addr, source_flags, holdtime)) {
+ sg->u.sg.src, sg->u.sg.grp, source_flags, holdtime)) {
return;
}
- ch = pim_ifchannel_add(ifp, &sg);
+ ch = pim_ifchannel_add(ifp, sg);
if (!ch)
return;
uint16_t holdtime);
void pim_ifchannel_prune(struct interface *ifp,
struct in_addr upstream,
- struct in_addr source_addr,
- struct in_addr group_addr,
+ struct prefix *sg,
uint8_t source_flags,
uint16_t holdtime);
void pim_ifchannel_local_membership_add(struct interface *ifp,
struct in_addr source,
uint8_t source_flags)
{
+ struct prefix sg;
+
+ memset (&sg, 0, sizeof (struct prefix));
+ sg.u.sg.src = source;
+ sg.u.sg.grp = group;
+
if (PIM_DEBUG_PIM_TRACE) {
char up_str[100];
- char src_str[100];
- char grp_str[100];
char neigh_str[100];
pim_inet4_dump("<upstream?>", upstream, up_str, sizeof(up_str));
- pim_inet4_dump("<src?>", source, src_str, sizeof(src_str));
- pim_inet4_dump("<grp?>", group, grp_str, sizeof(grp_str));
pim_inet4_dump("<neigh?>", neigh->source_addr, neigh_str, sizeof(neigh_str));
- zlog_warn("%s: prune (S,G)=(%s,%s) rpt=%d wc=%d upstream=%s holdtime=%d from %s on %s",
+ zlog_warn("%s: prune (S,G)=%s rpt=%d wc=%d upstream=%s holdtime=%d from %s on %s",
__PRETTY_FUNCTION__,
- src_str, grp_str,
+ pim_str_sg_dump (&sg),
source_flags & PIM_RPT_BIT_MASK,
source_flags & PIM_WILDCARD_BIT_MASK,
up_str, holdtime, neigh_str, ifp->name);
}
- pim_ifchannel_prune(ifp, upstream, source, group, source_flags, holdtime);
+ pim_ifchannel_prune(ifp, upstream, &sg, source_flags, holdtime);
}
int pim_joinprune_recv(struct interface *ifp,