@@ -567,7 +567,7 @@ static void igmp_show_interfaces_single(struct pim_instance *pim,
567
567
}
568
568
569
569
static void igmp_show_interface_join (struct pim_instance * pim , struct vty * vty ,
570
- bool uj )
570
+ bool uj , enum gm_join_type join_type )
571
571
{
572
572
struct interface * ifp ;
573
573
time_t now ;
@@ -612,6 +612,10 @@ static void igmp_show_interface_join(struct pim_instance *pim, struct vty *vty,
612
612
char source_str [INET_ADDRSTRLEN ];
613
613
char uptime [10 ];
614
614
615
+ if (ij -> join_type != join_type &&
616
+ ij -> join_type != GM_JOIN_BOTH )
617
+ continue ;
618
+
615
619
pim_time_uptime (uptime , sizeof (uptime ),
616
620
now - ij -> sock_creation );
617
621
pim_inet4_dump ("< grp ?> ", ij -> group_addr , group_str ,
@@ -1784,7 +1788,7 @@ DEFUN (show_ip_igmp_join,
1784
1788
if (!vrf )
1785
1789
return CMD_WARNING ;
1786
1790
1787
- igmp_show_interface_join (vrf -> info , vty , uj );
1791
+ igmp_show_interface_join (vrf -> info , vty , uj , GM_JOIN_STATIC );
1788
1792
1789
1793
return CMD_SUCCESS ;
1790
1794
}
@@ -1822,7 +1826,61 @@ DEFUN (show_ip_igmp_join_vrf_all,
1822
1826
first = false;
1823
1827
} else
1824
1828
vty_out (vty , "VRF : %s \n ", vrf -> name );
1825
- igmp_show_interface_join (vrf -> info , vty , uj );
1829
+ igmp_show_interface_join (vrf -> info , vty , uj , GM_JOIN_STATIC );
1830
+ }
1831
+ if (uj )
1832
+ vty_out (vty , "}\n ");
1833
+
1834
+ return CMD_SUCCESS ;
1835
+ }
1836
+
1837
+ DEFUN (show_ip_igmp_proxy ,
1838
+ show_ip_igmp_proxy_cmd ,
1839
+ "show ip igmp [vrf NAME ] proxy [json ]",
1840
+ SHOW_STR
1841
+ IP_STR
1842
+ IGMP_STR
1843
+ VRF_CMD_HELP_STR
1844
+ "IGMP proxy join information \n "
1845
+ JSON_STR )
1846
+ {
1847
+ int idx = 2 ;
1848
+ bool uj = use_json (argc , argv );
1849
+ struct vrf * vrf = pim_cmd_lookup_vrf (vty , argv , argc , & idx , uj );
1850
+
1851
+ if (!vrf )
1852
+ return CMD_WARNING ;
1853
+
1854
+ igmp_show_interface_join (vrf -> info , vty , uj , GM_JOIN_PROXY );
1855
+
1856
+ return CMD_SUCCESS ;
1857
+ }
1858
+
1859
+ DEFUN (show_ip_igmp_proxy_vrf_all ,
1860
+ show_ip_igmp_proxy_vrf_all_cmd ,
1861
+ "show ip igmp vrf all proxy [json ]",
1862
+ SHOW_STR
1863
+ IP_STR
1864
+ IGMP_STR
1865
+ VRF_CMD_HELP_STR
1866
+ "IGMP proxy join information \n "
1867
+ JSON_STR )
1868
+ {
1869
+ bool uj = use_json (argc , argv );
1870
+ struct vrf * vrf ;
1871
+ bool first = true;
1872
+
1873
+ if (uj )
1874
+ vty_out (vty , "{ ");
1875
+ RB_FOREACH (vrf , vrf_name_head , & vrfs_by_name ) {
1876
+ if (uj ) {
1877
+ if (!first )
1878
+ vty_out (vty , ", ");
1879
+ vty_out (vty , " \"%s \": ", vrf -> name );
1880
+ first = false;
1881
+ } else
1882
+ vty_out (vty , "VRF : %s \n ", vrf -> name );
1883
+ igmp_show_interface_join (vrf -> info , vty , uj , GM_JOIN_PROXY );
1826
1884
}
1827
1885
if (uj )
1828
1886
vty_out (vty , "}\n ");
@@ -5764,7 +5822,7 @@ DEFPY (interface_ip_igmp_proxy,
5764
5822
IGMP_STR
5765
5823
"Proxy IGMP join /prune operations \n ")
5766
5824
{
5767
- return CMD_SUCCESS ;
5825
+ return pim_process_ip_gmp_proxy_cmd ( vty , ! no ) ;
5768
5826
}
5769
5827
5770
5828
@@ -8774,6 +8832,8 @@ void pim_cmd_init(void)
8774
8832
install_element (VIEW_NODE , & show_ip_igmp_join_group_vrf_all_cmd );
8775
8833
install_element (VIEW_NODE , & show_ip_igmp_static_group_cmd );
8776
8834
install_element (VIEW_NODE , & show_ip_igmp_static_group_vrf_all_cmd );
8835
+ install_element (VIEW_NODE , & show_ip_igmp_proxy_cmd );
8836
+ install_element (VIEW_NODE , & show_ip_igmp_proxy_vrf_all_cmd );
8777
8837
install_element (VIEW_NODE , & show_ip_igmp_groups_cmd );
8778
8838
install_element (VIEW_NODE , & show_ip_igmp_groups_vrf_all_cmd );
8779
8839
install_element (VIEW_NODE , & show_ip_igmp_groups_retransmissions_cmd );
0 commit comments