pim6d: Adding show running for ipv6 mld commands

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
This commit is contained in:
Sai Gomathi N 2022-01-19 05:16:55 -08:00 committed by Mobashshera Rasool
parent 078c5867a1
commit d17b6892fc
5 changed files with 19 additions and 20 deletions

View File

@ -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 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_rx != BFD_DEF_MIN_RX
|| pim_ifp->bfd_config.min_tx != BFD_DEF_MIN_TX) || 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.detection_multiplier,
pim_ifp->bfd_config.min_rx, pim_ifp->bfd_config.min_tx); pim_ifp->bfd_config.min_rx, pim_ifp->bfd_config.min_tx);
else else
#endif /* ! HAVE_BFDD */ #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) 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); pim_ifp->bfd_config.profile);
} }

View File

@ -59,9 +59,9 @@ void pim_bsm_write_config(struct vty *vty, struct interface *ifp)
if (pim_ifp) { if (pim_ifp) {
if (!pim_ifp->bsm_enable) 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) 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");
} }
} }

View File

@ -305,11 +305,11 @@ int pim_static_write_mroute(struct pim_instance *pim, struct vty *vty,
i); i);
if (pim_addr_is_any(sroute->source)) if (pim_addr_is_any(sroute->source))
vty_out(vty, vty_out(vty,
" ip mroute %s %pPA\n", " " PIM_AF_NAME " mroute %s %pPA\n",
oifp->name, &sroute->group); oifp->name, &sroute->group);
else else
vty_out(vty, vty_out(vty,
" ip mroute %s %pPA %pPA\n", " " PIM_AF_NAME " mroute %s %pPA %pPA\n",
oifp->name, &sroute->group, oifp->name, &sroute->group,
&sroute->source); &sroute->source);
count++; count++;

View File

@ -353,48 +353,49 @@ static int pim_igmp_config_write(struct vty *vty, int writes,
} }
#endif #endif
#if PIM_IPV == 4
int pim_config_write(struct vty *vty, int writes, struct interface *ifp, int pim_config_write(struct vty *vty, int writes, struct interface *ifp,
struct pim_instance *pim) struct pim_instance *pim)
{ {
struct pim_interface *pim_ifp = ifp->info; struct pim_interface *pim_ifp = ifp->info;
if (PIM_IF_TEST_PIM(pim_ifp->options)) { if (PIM_IF_TEST_PIM(pim_ifp->options)) {
vty_out(vty, " ip pim\n"); vty_out(vty, " " PIM_AF_NAME " pim\n");
++writes; ++writes;
} }
/* IF ip pim drpriority */ /* IF ip pim drpriority */
if (pim_ifp->pim_dr_priority != PIM_DEFAULT_DR_PRIORITY) { 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); pim_ifp->pim_dr_priority);
++writes; ++writes;
} }
/* IF ip pim hello */ /* IF ip pim hello */
if (pim_ifp->pim_hello_period != PIM_DEFAULT_HELLO_PERIOD) { 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) if (pim_ifp->pim_default_holdtime != -1)
vty_out(vty, " %d", pim_ifp->pim_default_holdtime); vty_out(vty, " %d", pim_ifp->pim_default_holdtime);
vty_out(vty, "\n"); vty_out(vty, "\n");
++writes; ++writes;
} }
#if PIM_IPV == 4
writes += pim_igmp_config_write(vty, writes, pim_ifp); writes += pim_igmp_config_write(vty, writes, pim_ifp);
#endif
/* update source */ /* update source */
if (!pim_addr_is_any(pim_ifp->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); &pim_ifp->update_source);
++writes; ++writes;
} }
if (pim_ifp->activeactive) if (pim_ifp->activeactive)
vty_out(vty, " ip pim active-active\n"); vty_out(vty, " " PIM_AF_NAME " pim active-active\n");
/* boundary */ /* boundary */
if (pim_ifp->boundary_oil_plist) { 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); pim_ifp->boundary_oil_plist);
++writes; ++writes;
} }
@ -407,7 +408,6 @@ int pim_config_write(struct vty *vty, int writes, struct interface *ifp,
return writes; return writes;
} }
#endif
int pim_interface_config_write(struct vty *vty) 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); vty_out(vty, " description %s\n", ifp->desc);
++writes; ++writes;
} }
#if PIM_IPV == 4
if (ifp->info) if (ifp->info) {
pim_config_write(vty, writes, ifp, pim); pim_config_write(vty, writes, ifp, pim);
#endif }
if_vty_config_end(vty); if_vty_config_end(vty);
++writes; ++writes;
} }
} }

View File

@ -25,8 +25,6 @@
int pim_debug_config_write(struct vty *vty); int pim_debug_config_write(struct vty *vty);
int pim_global_config_write_worker(struct pim_instance *pim, struct vty *vty); int pim_global_config_write_worker(struct pim_instance *pim, struct vty *vty);
int pim_interface_config_write(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, int pim_config_write(struct vty *vty, int writes, struct interface *ifp,
struct pim_instance *pim); struct pim_instance *pim);
#endif
#endif /* PIM_VTY_H */ #endif /* PIM_VTY_H */