diff options
author | Lou Berger <lberger@labn.net> | 2018-03-30 18:03:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-30 18:03:33 +0200 |
commit | 97610b589f6537f7c456bebcf81d0fc8b71b4778 (patch) | |
tree | f314a2c131b3b35844c6e98127dad20fe246be14 /pimd/pim_cmd.c | |
parent | Merge pull request #1997 from qlyoung/fix-doc-nits-03-30 (diff) | |
parent | pimd: Move some data tracking variables per VRF (diff) | |
download | frr-97610b589f6537f7c456bebcf81d0fc8b71b4778.tar.xz frr-97610b589f6537f7c456bebcf81d0fc8b71b4778.zip |
Merge pull request #1921 from donaldsharp/pim_stuff
Pim stuff
Diffstat (limited to 'pimd/pim_cmd.c')
-rw-r--r-- | pimd/pim_cmd.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 6432c0da7..48b85fc05 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -2566,30 +2566,30 @@ static void pim_show_upstream_rpf(struct pim_instance *pim, struct vty *vty, } } -static void show_rpf_refresh_stats(struct vty *vty, time_t now, - json_object *json) +static void show_rpf_refresh_stats(struct vty *vty, struct pim_instance *pim, + time_t now, json_object *json) { char refresh_uptime[10]; pim_time_uptime_begin(refresh_uptime, sizeof(refresh_uptime), now, - qpim_rpf_cache_refresh_last); + pim->rpf_cache_refresh_last); if (json) { json_object_int_add(json, "rpfCacheRefreshDelayMsecs", qpim_rpf_cache_refresh_delay_msec); json_object_int_add( json, "rpfCacheRefreshTimer", - pim_time_timer_remain_msec(qpim_rpf_cache_refresher)); + pim_time_timer_remain_msec(pim->rpf_cache_refresher)); json_object_int_add(json, "rpfCacheRefreshRequests", - qpim_rpf_cache_refresh_requests); + pim->rpf_cache_refresh_requests); json_object_int_add(json, "rpfCacheRefreshEvents", - qpim_rpf_cache_refresh_events); + pim->rpf_cache_refresh_events); json_object_string_add(json, "rpfCacheRefreshLast", refresh_uptime); json_object_int_add(json, "nexthopLookups", - qpim_nexthop_lookups); + pim->nexthop_lookups); json_object_int_add(json, "nexthopLookupsAvoided", - nexthop_lookups_avoided); + pim->nexthop_lookups_avoided); } else { vty_out(vty, "RPF Cache Refresh Delay: %ld msecs\n" @@ -2600,11 +2600,11 @@ static void show_rpf_refresh_stats(struct vty *vty, time_t now, "Nexthop Lookups: %lld\n" "Nexthop Lookups Avoided: %lld\n", qpim_rpf_cache_refresh_delay_msec, - pim_time_timer_remain_msec(qpim_rpf_cache_refresher), - (long long)qpim_rpf_cache_refresh_requests, - (long long)qpim_rpf_cache_refresh_events, - refresh_uptime, (long long)qpim_nexthop_lookups, - (long long)nexthop_lookups_avoided); + pim_time_timer_remain_msec(pim->rpf_cache_refresher), + (long long)pim->rpf_cache_refresh_requests, + (long long)pim->rpf_cache_refresh_events, + refresh_uptime, (long long)pim->nexthop_lookups, + (long long)pim->nexthop_lookups_avoided); } } @@ -2616,7 +2616,7 @@ static void show_scan_oil_stats(struct pim_instance *pim, struct vty *vty, char uptime_mroute_del[10]; pim_time_uptime_begin(uptime_scan_oil, sizeof(uptime_scan_oil), now, - qpim_scan_oil_last); + pim->scan_oil_last); pim_time_uptime_begin(uptime_mroute_add, sizeof(uptime_mroute_add), now, pim->mroute_add_last); pim_time_uptime_begin(uptime_mroute_del, sizeof(uptime_mroute_del), now, @@ -2626,7 +2626,7 @@ static void show_scan_oil_stats(struct pim_instance *pim, struct vty *vty, "Scan OIL - Last: %s Events: %lld\n" "MFC Add - Last: %s Events: %lld\n" "MFC Del - Last: %s Events: %lld\n", - uptime_scan_oil, (long long)qpim_scan_oil_events, + uptime_scan_oil, (long long)pim->scan_oil_events, uptime_mroute_add, (long long)pim->mroute_add_events, uptime_mroute_del, (long long)pim->mroute_del_events); } @@ -2642,9 +2642,9 @@ static void pim_show_rpf(struct pim_instance *pim, struct vty *vty, uint8_t uj) if (uj) { json = json_object_new_object(); - show_rpf_refresh_stats(vty, now, json); + show_rpf_refresh_stats(vty, pim, now, json); } else { - show_rpf_refresh_stats(vty, now, json); + show_rpf_refresh_stats(vty, pim, now, json); vty_out(vty, "\n"); vty_out(vty, "Source Group RpfIface RpfAddress RibNextHop Metric Pref\n"); @@ -4337,7 +4337,7 @@ static void pim_cmd_show_ip_multicast_helper(struct pim_instance *pim, vty_out(vty, "\n"); - show_rpf_refresh_stats(vty, now, NULL); + show_rpf_refresh_stats(vty, pim, now, NULL); vty_out(vty, "\n"); |