summaryrefslogtreecommitdiffstats
path: root/isisd/isisd.c
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2017-08-03 11:45:58 +0200
committerChristian Franke <chris@opensourcerouting.org>2017-08-03 11:45:58 +0200
commit02cd317ea0cc7d39ff7ae121468c9cd68a24f9ae (patch)
tree6ca76fd27fec008166d9e9cee06f71e39de33117 /isisd/isisd.c
parentisisd: purge LSP correctly on confusion (diff)
downloadfrr-02cd317ea0cc7d39ff7ae121468c9cd68a24f9ae.tar.xz
frr-02cd317ea0cc7d39ff7ae121468c9cd68a24f9ae.zip
isisd: make isis_spftree non-public
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to '')
-rw-r--r--isisd/isisd.c45
1 files changed, 2 insertions, 43 deletions
diff --git a/isisd/isisd.c b/isisd/isisd.c
index 05797fb73..60b9367da 100644
--- a/isisd/isisd.c
+++ b/isisd/isisd.c
@@ -1231,27 +1231,6 @@ DEFUN (show_hostname,
return CMD_SUCCESS;
}
-static void vty_out_timestr(struct vty *vty, time_t uptime)
-{
- struct tm *tm;
- time_t difftime = time(NULL);
- difftime -= uptime;
- tm = gmtime(&difftime);
-
-#define ONE_DAY_SECOND 60*60*24
-#define ONE_WEEK_SECOND 60*60*24*7
- if (difftime < ONE_DAY_SECOND)
- vty_out(vty, "%02d:%02d:%02d", tm->tm_hour, tm->tm_min,
- tm->tm_sec);
- else if (difftime < ONE_WEEK_SECOND)
- vty_out(vty, "%dd%02dh%02dm", tm->tm_yday, tm->tm_hour,
- tm->tm_min);
- else
- vty_out(vty, "%02dw%dd%02dh", tm->tm_yday / 7,
- tm->tm_yday - ((tm->tm_yday / 7) * 7), tm->tm_hour);
- vty_out(vty, " ago");
-}
-
DEFUN (show_isis_spf_ietf,
show_isis_spf_ietf_cmd,
"show isis spf-delay-ietf",
@@ -1308,7 +1287,6 @@ DEFUN (show_isis_summary,
{
struct listnode *node, *node2;
struct isis_area *area;
- struct isis_spftree *spftree;
int level;
if (isis == NULL) {
@@ -1349,7 +1327,6 @@ DEFUN (show_isis_summary,
continue;
vty_out(vty, " Level-%d:\n", level);
- spftree = area->spftree[level - 1];
if (area->spf_timer[level - 1])
vty_out(vty, " SPF: (pending)\n");
else
@@ -1363,28 +1340,10 @@ DEFUN (show_isis_summary,
vty_out(vty, "\n");
vty_out(vty, " IPv4 route computation:\n");
- vty_out(vty, " last run elapsed : ");
- vty_out_timestr(vty, spftree->last_run_timestamp);
- vty_out(vty, "\n");
-
- vty_out(vty, " last run duration : %u usec\n",
- (u_int32_t)spftree->last_run_duration);
+ isis_spf_print(area->spftree[level - 1], vty);
- vty_out(vty, " run count : %d\n",
- spftree->runcount);
-
- spftree = area->spftree6[level - 1];
vty_out(vty, " IPv6 route computation:\n");
-
- vty_out(vty, " last run elapsed : ");
- vty_out_timestr(vty, spftree->last_run_timestamp);
- vty_out(vty, "\n");
-
- vty_out(vty, " last run duration : %llu msec\n",
- (unsigned long long)spftree->last_run_duration);
-
- vty_out(vty, " run count : %d\n",
- spftree->runcount);
+ isis_spf_print(area->spftree6[level - 1], vty);
}
}
vty_out(vty, "\n");