From d17b6892fc26f16552050869bcdb579c4bca1eba Mon Sep 17 00:00:00 2001 From: Sai Gomathi N Date: Wed, 19 Jan 2022 05:16:55 -0800 Subject: [PATCH] pim6d: Adding show running for ipv6 mld commands Signed-off-by: Mobashshera Rasool --- pimd/pim_bfd.c | 6 +++--- pimd/pim_bsm.c | 4 ++-- pimd/pim_static.c | 4 ++-- pimd/pim_vty.c | 23 ++++++++++++----------- pimd/pim_vty.h | 2 -- 5 files changed, 19 insertions(+), 20 deletions(-) diff --git a/pimd/pim_bfd.c b/pimd/pim_bfd.c index c2fe525b2d..c1f8220db6 100644 --- a/pimd/pim_bfd.c +++ b/pimd/pim_bfd.c @@ -50,15 +50,15 @@ void pim_bfd_write_config(struct vty *vty, struct interface *ifp) if (pim_ifp->bfd_config.detection_multiplier != BFD_DEF_DETECT_MULT || pim_ifp->bfd_config.min_rx != BFD_DEF_MIN_RX || pim_ifp->bfd_config.min_tx != BFD_DEF_MIN_TX) - vty_out(vty, " ip pim bfd %d %d %d\n", + vty_out(vty, " " PIM_AF_NAME " pim bfd %d %d %d\n", pim_ifp->bfd_config.detection_multiplier, pim_ifp->bfd_config.min_rx, pim_ifp->bfd_config.min_tx); else #endif /* ! HAVE_BFDD */ - vty_out(vty, " ip pim bfd\n"); + vty_out(vty, " " PIM_AF_NAME " pim bfd\n"); if (pim_ifp->bfd_config.profile) - vty_out(vty, " ip pim bfd profile %s\n", + vty_out(vty, " " PIM_AF_NAME " pim bfd profile %s\n", pim_ifp->bfd_config.profile); } diff --git a/pimd/pim_bsm.c b/pimd/pim_bsm.c index 8d65901b57..4d1e700ab0 100644 --- a/pimd/pim_bsm.c +++ b/pimd/pim_bsm.c @@ -59,9 +59,9 @@ void pim_bsm_write_config(struct vty *vty, struct interface *ifp) if (pim_ifp) { if (!pim_ifp->bsm_enable) - vty_out(vty, " no ip pim bsm\n"); + vty_out(vty, " no " PIM_AF_NAME " pim bsm\n"); if (!pim_ifp->ucast_bsm_accept) - vty_out(vty, " no ip pim unicast-bsm\n"); + vty_out(vty, " no " PIM_AF_NAME " pim unicast-bsm\n"); } } diff --git a/pimd/pim_static.c b/pimd/pim_static.c index 45f0a194b0..d3b31771a0 100644 --- a/pimd/pim_static.c +++ b/pimd/pim_static.c @@ -305,11 +305,11 @@ int pim_static_write_mroute(struct pim_instance *pim, struct vty *vty, i); if (pim_addr_is_any(sroute->source)) vty_out(vty, - " ip mroute %s %pPA\n", + " " PIM_AF_NAME " mroute %s %pPA\n", oifp->name, &sroute->group); else vty_out(vty, - " ip mroute %s %pPA %pPA\n", + " " PIM_AF_NAME " mroute %s %pPA %pPA\n", oifp->name, &sroute->group, &sroute->source); count++; diff --git a/pimd/pim_vty.c b/pimd/pim_vty.c index 6558068895..6006755343 100644 --- a/pimd/pim_vty.c +++ b/pimd/pim_vty.c @@ -353,48 +353,49 @@ static int pim_igmp_config_write(struct vty *vty, int writes, } #endif -#if PIM_IPV == 4 int pim_config_write(struct vty *vty, int writes, struct interface *ifp, struct pim_instance *pim) { struct pim_interface *pim_ifp = ifp->info; if (PIM_IF_TEST_PIM(pim_ifp->options)) { - vty_out(vty, " ip pim\n"); + vty_out(vty, " " PIM_AF_NAME " pim\n"); ++writes; } /* IF ip pim drpriority */ if (pim_ifp->pim_dr_priority != PIM_DEFAULT_DR_PRIORITY) { - vty_out(vty, " ip pim drpriority %u\n", + vty_out(vty, " " PIM_AF_NAME " pim drpriority %u\n", pim_ifp->pim_dr_priority); ++writes; } /* IF ip pim hello */ if (pim_ifp->pim_hello_period != PIM_DEFAULT_HELLO_PERIOD) { - vty_out(vty, " ip pim hello %d", pim_ifp->pim_hello_period); + vty_out(vty, " " PIM_AF_NAME " pim hello %d", pim_ifp->pim_hello_period); if (pim_ifp->pim_default_holdtime != -1) vty_out(vty, " %d", pim_ifp->pim_default_holdtime); vty_out(vty, "\n"); ++writes; } +#if PIM_IPV == 4 writes += pim_igmp_config_write(vty, writes, pim_ifp); +#endif /* update source */ if (!pim_addr_is_any(pim_ifp->update_source)) { - vty_out(vty, " ip pim use-source %pPA\n", + vty_out(vty, " " PIM_AF_NAME " pim use-source %pPA\n", &pim_ifp->update_source); ++writes; } if (pim_ifp->activeactive) - vty_out(vty, " ip pim active-active\n"); + vty_out(vty, " " PIM_AF_NAME " pim active-active\n"); /* boundary */ if (pim_ifp->boundary_oil_plist) { - vty_out(vty, " ip multicast boundary oil %s\n", + vty_out(vty, " " PIM_AF_NAME " multicast boundary oil %s\n", pim_ifp->boundary_oil_plist); ++writes; } @@ -407,7 +408,6 @@ int pim_config_write(struct vty *vty, int writes, struct interface *ifp, return writes; } -#endif int pim_interface_config_write(struct vty *vty) { @@ -438,11 +438,12 @@ int pim_interface_config_write(struct vty *vty) vty_out(vty, " description %s\n", ifp->desc); ++writes; } -#if PIM_IPV == 4 - if (ifp->info) + + if (ifp->info) { pim_config_write(vty, writes, ifp, pim); -#endif + } if_vty_config_end(vty); + ++writes; } } diff --git a/pimd/pim_vty.h b/pimd/pim_vty.h index 0e86727fdf..c192ba3bbd 100644 --- a/pimd/pim_vty.h +++ b/pimd/pim_vty.h @@ -25,8 +25,6 @@ int pim_debug_config_write(struct vty *vty); int pim_global_config_write_worker(struct pim_instance *pim, struct vty *vty); int pim_interface_config_write(struct vty *vty); -#if PIM_IPV == 4 int pim_config_write(struct vty *vty, int writes, struct interface *ifp, struct pim_instance *pim); -#endif #endif /* PIM_VTY_H */ -- 2.39.5