/* scan interfaces */
FOR_ALL_INTERFACES (pim->vrf, ifp) {
struct pim_interface *pim_ifp = ifp->info;
- struct gm_group *grp;
struct pim_ifchannel *ch;
if (!pim_ifp)
pim_ifchannel_delete(ch);
}
+#if PIM_IPV == 4
/* clean up all igmp groups */
+ struct gm_group *grp;
if (pim_ifp->gm_group_list) {
while (pim_ifp->gm_group_list->count) {
igmp_group_delete(grp);
}
}
+#endif
}
/* clean up all upstreams*/
"IGMP version\n"
"IGMP version number\n")
{
+#if PIM_IPV == 4
VTY_DECLVAR_CONTEXT(interface, ifp);
int igmp_version = 2;
igmp_version = atoi(argv[4]->arg);
igmp_send_query_on_intf(ifp, igmp_version);
-
+#endif
return CMD_SUCCESS;
}
#include "pim_igmp_join.h"
#include "pim_vxlan.h"
+#if PIM_IPV == 4
static void pim_if_igmp_join_del_all(struct interface *ifp);
static int igmp_join_sock(const char *ifname, ifindex_t ifindex,
struct in_addr group_addr,
struct in_addr source_addr);
+#endif
void pim_if_init(struct pim_instance *pim)
{
return t_suppressed_msec;
}
+#if PIM_IPV == 4
static void igmp_join_free(struct gm_join *ij)
{
XFREE(MTYPE_PIM_IGMP_JOIN, ij);
for (ALL_LIST_ELEMENTS(pim_ifp->gm_join_list, node, nextnode, ij))
pim_if_igmp_join_del(ifp, ij->group_addr, ij->source_addr);
}
+#else /* PIM_IPV != 4 */
+ferr_r pim_if_igmp_join_add(struct interface *ifp, struct in_addr group_addr,
+ struct in_addr source_addr)
+{
+ return ferr_ok();
+}
+
+int pim_if_igmp_join_del(struct interface *ifp, struct in_addr group_addr,
+ struct in_addr source_addr)
+{
+ return 0;
+}
+#endif /* PIM_IPV != 4 */
/*
RFC 4601
struct pim_interface;
+#if PIM_IPV == 4
void pim_igmp_if_init(struct pim_interface *pim_ifp, struct interface *ifp);
void pim_igmp_if_reset(struct pim_interface *pim_ifp);
void pim_igmp_if_fini(struct pim_interface *pim_ifp);
int igmp_validate_checksum(char *igmp_msg, int igmp_msg_len);
+#else /* PIM_IPV != 4 */
+static inline void pim_igmp_general_query_on(struct gm_sock *igmp)
+{
+}
+
+static inline void pim_igmp_general_query_off(struct gm_sock *igmp)
+{
+}
+
+static inline void pim_igmp_other_querier_timer_on(struct gm_sock *igmp)
+{
+}
+
+static inline void pim_igmp_other_querier_timer_off(struct gm_sock *igmp)
+{
+}
+#endif /* PIM_IPV == 4 */
+
#define IGMP_SOURCE_MASK_FORWARDING (1 << 0)
#define IGMP_SOURCE_MASK_DELETE (1 << 1)
#define IGMP_SOURCE_MASK_SEND (1 << 2)
int64_t last_igmp_v2_report_dsec;
};
+#if PIM_IPV == 4
struct gm_group *find_group_by_addr(struct gm_sock *igmp,
struct in_addr group_addr);
struct gm_group *igmp_add_group_by_addr(struct gm_sock *igmp,
void igmp_group_delete(struct gm_group *group);
void igmp_send_query_on_intf(struct interface *ifp, int igmp_ver);
+
+#else /* PIM_IPV != 4 */
+static inline void igmp_startup_mode_on(struct gm_sock *igmp)
+{
+}
+#endif /* PIM_IPV != 4 */
+
#endif /* PIM_IGMP_H */
};
#endif
-static int pim_igmp_join_source(int fd, ifindex_t ifindex,
- struct in_addr group_addr,
- struct in_addr source_addr)
+static inline int pim_igmp_join_source(int fd, ifindex_t ifindex,
+ struct in_addr group_addr,
+ struct in_addr source_addr)
{
struct group_source_req req;
struct sockaddr_in group;
uint32_t unsupported;
};
+#if PIM_IPV == 4
void igmp_stats_init(struct igmp_stats *stats);
void igmp_stats_add(struct igmp_stats *a, struct igmp_stats *b);
+#else
+static inline void igmp_stats_init(struct igmp_stats *stats)
+{
+}
+
+static inline void igmp_stats_add(struct igmp_stats *a, struct igmp_stats *b)
+{
+}
+#endif
#endif /* PIM_IGMP_STATS_H */
/* OHPI: Older Host Present Interval */
#define PIM_IGMP_OHPI_DSEC(qrv,qqi,qri_dsec) ((qrv) * (10 * (qqi)) + (qri_dsec))
+#if PIM_IPV == 4
void igmp_group_reset_gmi(struct gm_group *group);
void igmp_source_reset_gmi(struct gm_group *group, struct gm_source *source);
int igmp_v3_recv_report(struct gm_sock *igmp, struct in_addr from,
const char *from_str, char *igmp_msg, int igmp_msg_len);
+#else /* PIM_IPV != 4 */
+static inline void igmp_group_reset_gmi(struct gm_group *group)
+{
+}
+
+
+static inline void igmp_source_reset_gmi(struct gm_group *group,
+ struct gm_source *source)
+{
+}
+#endif
+
#endif /* PIM_IGMPV3_H */
++writes;
}
+#if PIM_IPV == 4
/* IF ip igmp join */
if (pim_ifp->gm_join_list) {
struct listnode *node;
++writes;
}
}
+#endif /* PIM_IPV == 4 */
if (pim_ifp->activeactive)
vty_out(vty, " ip pim active-active\n");
zclient_lookup_new();
}
+#if PIM_IPV == 4
void igmp_anysource_forward_start(struct pim_instance *pim,
struct gm_group *group)
{
IGMP_SOURCE_DONT_FORWARDING(source->source_flags);
}
+#endif /* PIM_IPV == 4 */
void pim_forward_start(struct pim_ifchannel *ch)
{
pimd/pim_hello.c \
pimd/pim_iface.c \
pimd/pim_ifchannel.c \
- pimd/pim_igmp.c \
- pimd/pim_igmp_mtrace.c \
- pimd/pim_igmp_stats.c \
- pimd/pim_igmpv2.c \
- pimd/pim_igmpv3.c \
pimd/pim_instance.c \
pimd/pim_int.c \
pimd/pim_join.c \
pimd_pimd_SOURCES = \
$(pim_common) \
+ pimd/pim_igmp.c \
+ pimd/pim_igmp_mtrace.c \
+ pimd/pim_igmp_stats.c \
+ pimd/pim_igmpv2.c \
+ pimd/pim_igmpv3.c \
pimd/pim_main.c \
pimd/pim_msdp.c \
pimd/pim_msdp_packet.c \