pimd: display down ports show ip pim interface

In show ip pim interface and  show ip pim interface <intf>
display State "down" pim enabled interfaces.

Ticket:CM-16809
Reviewed By:CCR-6398
Testing Done:
show ip pim interface
Interface  State          Address  PIM Nbrs           PIM DR  FHR IfChannels
br1           up          2.0.1.1         0            local    0          0
lo            up          6.0.0.1         0            local    0          0
pimreg        up          0.0.0.0         0            local    0          0
swp1        down          6.0.1.1         0            local    0          0
swp2          up          6.0.2.1         1            local    0          0

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
This commit is contained in:
Chirag Shah 2017-06-22 12:09:02 -07:00 committed by Donald Sharp
parent cc61055f0e
commit 96ceedc7a2

View File

@ -629,7 +629,7 @@ static void igmp_show_interfaces_single(struct vty *vty,
char other_hhmmss[10];
int found_ifname = 0;
int sqi;
int mloop;
int mloop = 0;
long gmi_msec; /* Group Membership Interval */
long lmqt_msec;
long ohpi_msec;
@ -692,7 +692,11 @@ static void igmp_show_interfaces_single(struct vty *vty,
qri_msec = pim_ifp->igmp_query_max_response_time_dsec
* 100;
mloop = pim_socket_mcastloop_get(pim_ifp->pim_sock_fd);
if (pim_ifp->pim_sock_fd >= 0)
mloop = pim_socket_mcastloop_get(
pim_ifp->pim_sock_fd);
else
mloop = 0;
if (uj) {
json_row = json_object_new_object();
@ -889,7 +893,7 @@ static void pim_show_interfaces_single(struct vty *vty,
char src_str[INET_ADDRSTRLEN];
char stat_uptime[10];
char uptime[10];
int mloop;
int mloop = 0;
int found_ifname = 0;
int print_header;
json_object *json = NULL;
@ -913,9 +917,6 @@ static void pim_show_interfaces_single(struct vty *vty,
if (!pim_ifp)
continue;
if (pim_ifp->pim_sock_fd < 0)
continue;
if (strcmp(ifname, "detail") && strcmp(ifname, ifp->name))
continue;
@ -931,7 +932,10 @@ static void pim_show_interfaces_single(struct vty *vty,
pim_ifp->pim_hello_period);
pim_time_uptime(stat_uptime, sizeof(stat_uptime),
now - pim_ifp->pim_ifstat_start);
mloop = pim_socket_mcastloop_get(pim_ifp->pim_sock_fd);
if (pim_ifp->pim_sock_fd >= 0)
mloop = pim_socket_mcastloop_get(pim_ifp->pim_sock_fd);
else
mloop = 0;
if (uj) {
char pbuf[PREFIX2STR_BUFFER];
@ -1308,9 +1312,6 @@ static void pim_show_interfaces(struct vty *vty, struct pim_instance *pim,
if (!pim_ifp)
continue;
if (pim_ifp->pim_sock_fd < 0)
continue;
pim_nbrs = pim_ifp->pim_neighbor_list->count;
pim_ifchannels = pim_ifp->pim_ifchannel_list->count;
fhr = 0;