mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 18:04:03 +00:00
pimd: display changes to indicate if a SG entry is still on the RPT
Sample output - root@leaf-12:~# net show pim state Codes: J -> Pim Join, I -> IGMP Report, S -> Source, * -> Inherited from (*,G), V -> VxLAN, M -> Muted Active Source Group RPT IIF OIL 1 * 239.1.1.111 y swp1 swp3( J ) 1 6.0.0.28 239.1.1.111 y swp1 1 * 239.1.1.112 y swp1 swp3( J ) 1 6.0.0.28 239.1.1.112 y swp1 1 * 239.1.1.113 y swp1 swp3( J ) 1 6.0.0.28 239.1.1.113 y swp1 1 * 239.1.1.114 y swp1 swp3( J ) 1 6.0.0.28 239.1.1.114 y swp1 root@leaf-12:~# Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
This commit is contained in:
parent
70c86421c9
commit
9929a2a9af
@ -1990,7 +1990,7 @@ static void pim_show_state(struct pim_instance *pim, struct vty *vty,
|
|||||||
vty_out(vty,
|
vty_out(vty,
|
||||||
"Codes: J -> Pim Join, I -> IGMP Report, S -> Source, * -> Inherited from (*,G), V -> VxLAN, M -> Muted");
|
"Codes: J -> Pim Join, I -> IGMP Report, S -> Source, * -> Inherited from (*,G), V -> VxLAN, M -> Muted");
|
||||||
vty_out(vty,
|
vty_out(vty,
|
||||||
"\nInstalled Source Group IIF OIL\n");
|
"\nActive Source Group RPT IIF OIL\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS_RO(pim->channel_oil_list, node, c_oil)) {
|
for (ALL_LIST_ELEMENTS_RO(pim->channel_oil_list, node, c_oil)) {
|
||||||
@ -2000,8 +2000,16 @@ static void pim_show_state(struct pim_instance *pim, struct vty *vty,
|
|||||||
char out_ifname[INTERFACE_NAMSIZ + 1];
|
char out_ifname[INTERFACE_NAMSIZ + 1];
|
||||||
int oif_vif_index;
|
int oif_vif_index;
|
||||||
struct interface *ifp_in;
|
struct interface *ifp_in;
|
||||||
|
bool isRpt;
|
||||||
first_oif = 1;
|
first_oif = 1;
|
||||||
|
|
||||||
|
if ((c_oil->up &&
|
||||||
|
PIM_UPSTREAM_FLAG_TEST_USE_RPT(c_oil->up->flags)) ||
|
||||||
|
c_oil->oil.mfcc_origin.s_addr == INADDR_ANY)
|
||||||
|
isRpt = true;
|
||||||
|
else
|
||||||
|
isRpt = false;
|
||||||
|
|
||||||
pim_inet4_dump("<group?>", c_oil->oil.mfcc_mcastgrp, grp_str,
|
pim_inet4_dump("<group?>", c_oil->oil.mfcc_mcastgrp, grp_str,
|
||||||
sizeof(grp_str));
|
sizeof(grp_str));
|
||||||
pim_inet4_dump("<source?>", c_oil->oil.mfcc_origin, src_str,
|
pim_inet4_dump("<source?>", c_oil->oil.mfcc_origin, src_str,
|
||||||
@ -2055,6 +2063,12 @@ static void pim_show_state(struct pim_instance *pim, struct vty *vty,
|
|||||||
json_ifp_in);
|
json_ifp_in);
|
||||||
json_object_int_add(json_source, "Installed",
|
json_object_int_add(json_source, "Installed",
|
||||||
c_oil->installed);
|
c_oil->installed);
|
||||||
|
if (isRpt)
|
||||||
|
json_object_boolean_true_add(
|
||||||
|
json_source, "isRpt");
|
||||||
|
else
|
||||||
|
json_object_boolean_false_add(
|
||||||
|
json_source, "isRpt");
|
||||||
json_object_int_add(json_source, "RefCount",
|
json_object_int_add(json_source, "RefCount",
|
||||||
c_oil->oil_ref_count);
|
c_oil->oil_ref_count);
|
||||||
json_object_int_add(json_source, "OilListSize",
|
json_object_int_add(json_source, "OilListSize",
|
||||||
@ -2073,8 +2087,9 @@ static void pim_show_state(struct pim_instance *pim, struct vty *vty,
|
|||||||
c_oil->cc.wrong_if);
|
c_oil->cc.wrong_if);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
vty_out(vty, "%-9d %-15s %-15s %-16s ",
|
vty_out(vty, "%-6d %-15s %-15s %-3s %-16s ",
|
||||||
c_oil->installed, src_str, grp_str, in_ifname);
|
c_oil->installed, src_str, grp_str,
|
||||||
|
isRpt? "y" : "n", in_ifname);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (oif_vif_index = 0; oif_vif_index < MAXVIFS;
|
for (oif_vif_index = 0; oif_vif_index < MAXVIFS;
|
||||||
|
Loading…
Reference in New Issue
Block a user