aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/igmp/igmp_group.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-11-13 13:27:18 +0000
committerOle Trøan <otroan@employees.org>2018-11-13 14:45:40 +0000
commite82eb635b1377c2b14d28127a121eabd10b3b83d (patch)
treec152b97a71b8e44a3a5b7918f69cfe492bdfb06d /src/plugins/igmp/igmp_group.h
parent5d9df1db07969fea8f391bd48ba14cceb840da1e (diff)
IGMP: improve CLI debug output
Change-Id: If88fc3acdba1f73b3e8be94d8014556c5239596c Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins/igmp/igmp_group.h')
-rw-r--r--src/plugins/igmp/igmp_group.h39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/plugins/igmp/igmp_group.h b/src/plugins/igmp/igmp_group.h
index 6c363de6515..7d4dfb6d243 100644
--- a/src/plugins/igmp/igmp_group.h
+++ b/src/plugins/igmp/igmp_group.h
@@ -22,32 +22,33 @@
#include <igmp/igmp_src.h>
/**
+ * QUERY_REPLY = Timer running to reply to a G/SG specific query
+ * QUERY_SENT = wait for response from a sent G/SG specific query.
+ * Sent when a host leaves a group
+ * RESEND_REPORT = Timer running to resend report
+ * FILTER_MODE_CHANGE = to check if the group can swap to
+ * INCLUDE mode (section 6.2.2)
+ */
+#define foreach_igmp_group_timer \
+ _(QUERY_REPLY, "query-reply") \
+ _(QUERY_SENT, "query-sent") \
+ _(RESEND_REPORT, "resend-report") \
+ _(FILTER_MODE_CHANGE, "filter-mode-change")
+
+/**
* Types of timers maintained for each group
*/
typedef enum igmp_group_timer_type_t_
{
- /**
- * Timer running to reply to a G/SG specific query
- */
- IGMP_GROUP_TIMER_QUERY_REPLY,
- /**
- * wait for response from a sent G/SG specific query.
- * Sent when a host leaves a group
- */
- IGMP_GROUP_TIMER_QUERY_SENT,
- /**
- * Timer running to resend report
- */
- IGMP_GROUP_TIMER_RESEND_REPORT,
- /**
- * filter-mode change timer, to check if the group can swap to
- * INCLUDE mode (section 6.2.2)
- */
- IGMP_GROUP_TIMER_FILTER_MODE_CHANGE,
+#define _(v,s) IGMP_GROUP_TIMER_##v,
+ foreach_igmp_group_timer
+#undef _
} igmp_group_timer_type_t;
#define IGMP_GROUP_N_TIMERS (IGMP_GROUP_TIMER_FILTER_MODE_CHANGE + 1)
+extern u8 *format_igmp_group_timer_type (u8 * s, va_list * args);
+
/**
* @brief IGMP group
* A multicast group address for which reception has been requested.
@@ -114,6 +115,8 @@ extern igmp_src_t *igmp_group_src_update (igmp_group_t * group,
igmp_mode_t mode);
extern void igmp_group_src_remove (igmp_group_t * group, igmp_src_t * src);
+extern u8 *format_igmp_group (u8 * s, va_list * args);
+
extern ip46_address_t *igmp_group_present_minus_new (igmp_group_t * group,
igmp_filter_mode_t mode,