From a0edf6740e8203abec1ee3efa344a417c16fec7b Mon Sep 17 00:00:00 2001 From: Dinesh Dutt Date: Mon, 26 Aug 2013 03:40:23 +0000 Subject: ospf6d: add SPF logs, statistics, and display of SPF parameters Signed-off-by: Pradosh Mohapatra Reviewed-by: Scott Feldman [DL: adapted to rebase / readded randomly lost line] [DL: killed timeval_subtract] Signed-off-by: David Lamparter --- ospf6d/ospf6d.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ospf6d/ospf6d.h') diff --git a/ospf6d/ospf6d.h b/ospf6d/ospf6d.h index 13699d61..0c86386a 100644 --- a/ospf6d/ospf6d.h +++ b/ospf6d/ospf6d.h @@ -101,6 +101,17 @@ extern struct thread_master *master; zlog_warn ("strftime error"); \ } while (0) +#define threadtimer_string(now, t, buf, size) \ + do { \ + struct timeval result; \ + if (!t) \ + snprintf(buf, size, "inactive"); \ + else { \ + timersub(&t->u.sands, &now, &result); \ + timerstring(&result, buf, size); \ + } \ +} while (0) + /* for commands */ #define OSPF6_AREA_STR "Area information\n" #define OSPF6_AREA_ID_STR "Area ID (as an IPv4 notation)\n" -- cgit v1.2.3