summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSai Gomathi N <nsaigomathi@vmware.com>2022-06-17 04:39:59 -0700
committerSai Gomathi N <nsaigomathi@vmware.com>2022-06-26 23:42:47 -0700
commit68a7caf4bfdbbb0fc4605ff3eaa19cd40c5d8cac (patch)
tree4a3090f2e855efc45729a8da13fdbc07fd0b9ae0
parent437e7e77d6a834d805c83b26dfd33235f1f08721 (diff)
pimd,pim6d: Change the show running commands based on address family
Change the show running commands for pimv4 and pimv6 debug commands based on the address family. Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
-rw-r--r--pimd/pim_addr.h2
-rw-r--r--pimd/pim_vty.c24
2 files changed, 14 insertions, 12 deletions
diff --git a/pimd/pim_addr.h b/pimd/pim_addr.h
index cb868bc7e1..2f0743b570 100644
--- a/pimd/pim_addr.h
+++ b/pimd/pim_addr.h
@@ -35,6 +35,7 @@ typedef struct in_addr pim_addr;
#define ipaddr_pim ipaddr_v4
#define PIM_MAX_BITLEN IPV4_MAX_BITLEN
#define PIM_AF_NAME "ip"
+#define PIM_AF_DBG "pim"
#define PIMREG "pimreg"
#define PIM_ADDR_FUNCNAME(name) ipv4_##name
@@ -59,6 +60,7 @@ typedef struct in6_addr pim_addr;
#define ipaddr_pim ipaddr_v6
#define PIM_MAX_BITLEN IPV6_MAX_BITLEN
#define PIM_AF_NAME "ipv6"
+#define PIM_AF_DBG "pimv6"
#define PIMREG "pim6reg"
#define PIM_ADDR_FUNCNAME(name) ipv6_##name
diff --git a/pimd/pim_vty.c b/pimd/pim_vty.c
index 8507749522..6bfb620fc8 100644
--- a/pimd/pim_vty.c
+++ b/pimd/pim_vty.c
@@ -92,34 +92,34 @@ int pim_debug_config_write(struct vty *vty)
}
if (PIM_DEBUG_PIM_EVENTS) {
- vty_out(vty, "debug pim events\n");
+ vty_out(vty, "debug " PIM_AF_DBG " events\n");
++writes;
}
if (PIM_DEBUG_PIM_PACKETS) {
- vty_out(vty, "debug pim packets\n");
+ vty_out(vty, "debug " PIM_AF_DBG " packets\n");
++writes;
}
if (PIM_DEBUG_PIM_PACKETDUMP_SEND) {
- vty_out(vty, "debug pim packet-dump send\n");
+ vty_out(vty, "debug " PIM_AF_DBG " packet-dump send\n");
++writes;
}
if (PIM_DEBUG_PIM_PACKETDUMP_RECV) {
- vty_out(vty, "debug pim packet-dump receive\n");
+ vty_out(vty, "debug " PIM_AF_DBG " packet-dump receive\n");
++writes;
}
/* PIM_DEBUG_PIM_TRACE catches _DETAIL too */
if (router->debugs & PIM_MASK_PIM_TRACE) {
- vty_out(vty, "debug pim trace\n");
+ vty_out(vty, "debug " PIM_AF_DBG " trace\n");
++writes;
}
if (PIM_DEBUG_PIM_TRACE_DETAIL) {
- vty_out(vty, "debug pim trace detail\n");
+ vty_out(vty, "debug " PIM_AF_DBG " trace detail\n");
++writes;
}
if (PIM_DEBUG_ZEBRA) {
- vty_out(vty, "debug pim zebra\n");
+ vty_out(vty, "debug " PIM_AF_DBG " zebra\n");
++writes;
}
@@ -144,17 +144,17 @@ int pim_debug_config_write(struct vty *vty)
}
if (PIM_DEBUG_PIM_HELLO) {
- vty_out(vty, "debug pim packets hello\n");
+ vty_out(vty, "debug " PIM_AF_DBG " packets hello\n");
++writes;
}
if (PIM_DEBUG_PIM_J_P) {
- vty_out(vty, "debug pim packets joins\n");
+ vty_out(vty, "debug " PIM_AF_DBG " packets joins\n");
++writes;
}
if (PIM_DEBUG_PIM_REG) {
- vty_out(vty, "debug pim packets register\n");
+ vty_out(vty, "debug " PIM_AF_DBG " packets register\n");
++writes;
}
@@ -164,7 +164,7 @@ int pim_debug_config_write(struct vty *vty)
}
if (PIM_DEBUG_PIM_NHT) {
- vty_out(vty, "debug pim nht\n");
+ vty_out(vty, "debug " PIM_AF_DBG " nht\n");
++writes;
}
@@ -174,7 +174,7 @@ int pim_debug_config_write(struct vty *vty)
}
if (PIM_DEBUG_PIM_NHT_DETAIL) {
- vty_out(vty, "debug pim nht detail\n");
+ vty_out(vty, "debug " PIM_AF_DBG " nht detail\n");
++writes;
}