summaryrefslogtreecommitdiffstats
path: root/src/plugins/igmp/igmp_format.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-08-27 05:45:07 -0700
committerDamjan Marion <dmarion@me.com>2018-08-27 17:11:13 +0000
commitfe0a2c5a45e69eeff318e4419afe651eacfaea21 (patch)
tree261a48b926466f19a8a2e847a3bcd4dc9c542439 /src/plugins/igmp/igmp_format.c
parent9514fab0423725fddcb0a4f5ec070ac8d2764ac8 (diff)
IGMP: enable command on cli
Change-Id: I1f741b66ab8e3ecbb5c0d248b72e52c56545d5f3 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins/igmp/igmp_format.c')
-rw-r--r--src/plugins/igmp/igmp_format.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/igmp/igmp_format.c b/src/plugins/igmp/igmp_format.c
index 1ae04788a97..08b5f68a74d 100644
--- a/src/plugins/igmp/igmp_format.c
+++ b/src/plugins/igmp/igmp_format.c
@@ -62,6 +62,21 @@ format_igmp_filter_mode (u8 * s, va_list * args)
}
u8 *
+format_igmp_mode (u8 * s, va_list * args)
+{
+ igmp_mode_t mode = va_arg (*args, igmp_mode_t);
+
+ switch (mode)
+ {
+#define _(n,f) case IGMP_MODE_##f: return (format (s, "%s", #f));
+ foreach_igmp_mode
+#undef _
+ }
+ return (format (s, "unknown:%d", mode));
+
+}
+
+u8 *
format_igmp_header (u8 * s, va_list * args)
{
igmp_header_t *hdr = va_arg (*args, igmp_header_t *);