mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-01-27 20:52:55 +00:00
pimd: Add ability to know if ifchannel is (S,G,rpt)
Add ability to track (S,G,rpt) ifchannel prunes. Add ability to display this data in json. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
11757d7b98
commit
637a61fa2b
@ -1142,6 +1142,8 @@ static void pim_show_join(struct vty *vty, u_char uj)
|
||||
json_object_string_add(json_row, "expire", expire);
|
||||
json_object_string_add(json_row, "prune", prune);
|
||||
json_object_string_add(json_row, "channelJoinName", pim_ifchannel_ifjoin_name(ch->ifjoin_state));
|
||||
if (PIM_IF_FLAG_TEST_S_G_RPT(ch->flags))
|
||||
json_object_int_add(json_row, "SGRpt", 1);
|
||||
json_object_object_add(json_iface, ch_src_str, json_row);
|
||||
|
||||
} else {
|
||||
|
||||
@ -71,6 +71,14 @@ struct pim_assert_metric {
|
||||
#define PIM_IF_FLAG_SET_ASSERT_TRACKING_DESIRED(flags) ((flags) |= PIM_IF_FLAG_MASK_ASSERT_TRACKING_DESIRED)
|
||||
#define PIM_IF_FLAG_UNSET_ASSERT_TRACKING_DESIRED(flags) ((flags) &= ~PIM_IF_FLAG_MASK_ASSERT_TRACKING_DESIRED)
|
||||
|
||||
/*
|
||||
* Flat to tell us if the ifchannel is (S,G,rpt)
|
||||
*/
|
||||
#define PIM_IF_FLAG_MASK_S_G_RPT (1 << 2)
|
||||
#define PIM_IF_FLAG_TEST_S_G_RPT(flags) ((flags) & PIM_IF_FLAG_MASK_S_G_RPT)
|
||||
#define PIM_IF_FLAG_SET_S_G_RPT(flags) ((flags) |= PIM_IF_FLAG_MASK_S_G_RPT)
|
||||
#define PIM_IF_FLAG_UNSET_S_G_RPT(flags) ((flags) &= ~PIM_IF_FLAG_MASK_S_G_RPT)
|
||||
|
||||
/*
|
||||
Per-interface (S,G) state
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user