summaryrefslogtreecommitdiffstats
path: root/src/plugins/igmp/cli.c
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2018-04-23 14:40:59 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2018-04-25 07:18:14 +0000
commitb1d2aa8bca3a6e1811fb67dde9c8862e13216824 (patch)
tree5a0831c74ce54c0d57e82be88a12f4495ba5027f /src/plugins/igmp/cli.c
parentde02414c3d74efd71cbc1594b19e07027191a3d0 (diff)
igmp: data structure refactoring
Improve igmp membership report performance, introduce group and source specific timers. (side effect compatible with Group-specific query). Change-Id: Ie3dd2c0dabe5f7138c2f8029e6bbbbfcb5e4904f Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'src/plugins/igmp/cli.c')
-rw-r--r--src/plugins/igmp/cli.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/plugins/igmp/cli.c b/src/plugins/igmp/cli.c
index a69070f23ce..6ed5c5ed900 100644
--- a/src/plugins/igmp/cli.c
+++ b/src/plugins/igmp/cli.c
@@ -166,19 +166,21 @@ igmp_show_command_fn (vlib_main_t * vm, unformat_input_t * input,
igmp_main_t *im = &igmp_main;
vnet_main_t *vnm = vnet_get_main ();
igmp_config_t *config;
- igmp_sg_t *sg;
+ igmp_group_t *group;
+ igmp_src_t *src;
/* *INDENT-OFF* */
pool_foreach (config, im->configs, (
{
vlib_cli_output (vm, "interface: %U", format_vnet_sw_if_index_name,
vnm, config->sw_if_index);
- pool_foreach (sg, config->sg, (
+ pool_foreach (group, config->groups, (
{
- vlib_cli_output (vm, "\t(S,G): %U:%U:%U", format_ip46_address,
- &sg->saddr, ip46_address_is_ip4 (&sg->saddr),
- format_ip46_address, &sg->gaddr, ip46_address_is_ip4
- (&sg->gaddr), format_igmp_report_type, sg->group_type);
+ vlib_cli_output (vm, "\t%U:%U", format_igmp_report_type, group->type, format_ip46_address, &group->addr, ip46_address_is_ip4 (&group->addr));
+ pool_foreach (src, group->srcs, (
+ {
+ vlib_cli_output (vm, "\t\t%U", format_ip46_address, &src->addr, ip46_address_is_ip4 (&src->addr));
+ }));
}));
}));
/* *INDENT-ON* */