pim_if_new(pim_regiface, 0, 0);
}
}
+
+int
+pim_if_connected_to_source (struct interface *ifp, struct in_addr src)
+{
+ struct listnode *cnode;
+ struct connected *c;
+ struct prefix p;
+
+ p.family = AF_INET;
+ p.u.prefix4 = src;
+ p.prefixlen = IPV4_MAX_BITLEN;
+
+ for (ALL_LIST_ELEMENTS_RO (ifp->connected, cnode, c))
+ {
+ if ((c->address->family == AF_INET) &&
+ prefix_match (CONNECTED_PREFIX (c), &p))
+ {
+ return 1;
+ }
+ }
+
+ return 0;
+}
void pim_if_update_assert_tracking_desired(struct interface *ifp);
void pim_if_create_pimreg(void);
+
+int pim_if_connected_to_source (struct interface *ifp, struct in_addr src);
#endif /* PIM_IFACE_H */
return 0;
}
-static int
-pim_mroute_connected_to_source (struct interface *ifp, struct in_addr src)
-{
- struct listnode *cnode;
- struct connected *c;
- struct prefix p;
-
- p.family = AF_INET;
- p.u.prefix4 = src;
- p.prefixlen = IPV4_MAX_BITLEN;
-
- for (ALL_LIST_ELEMENTS_RO (ifp->connected, cnode, c))
- {
- if ((c->address->family == AF_INET) &&
- prefix_match (CONNECTED_PREFIX (c), &p))
- {
- return 1;
- }
- }
-
- return 0;
-}
-
static const char *igmpmsgtype2str[IGMPMSG_WRVIFWHOLE + 1] = {
"<unknown_upcall?>",
"NOCACHE",
* If we've received a multicast packet that isn't connected to
* us
*/
- if (!pim_mroute_connected_to_source (ifp, msg->im_src))
+ if (!pim_if_connected_to_source (ifp, msg->im_src))
{
if (PIM_DEBUG_MROUTE_DETAIL)
zlog_debug ("%s: Received incoming packet that doesn't originate on our seg",
return -2;
}
- if (pim_mroute_connected_to_source (ifp, sg.src))
+ if (pim_if_connected_to_source (ifp, sg.src))
up->fhr = 1;
pim_ifp = ifp->info;