summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6d.h
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6d.h')
-rw-r--r--ospf6d/ospf6d.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/ospf6d/ospf6d.h b/ospf6d/ospf6d.h
index 2ac6300e..0c86386a 100644
--- a/ospf6d/ospf6d.h
+++ b/ospf6d/ospf6d.h
@@ -24,6 +24,9 @@
#define OSPF6_DAEMON_VERSION "0.9.7r"
+#include "libospf.h"
+#include "thread.h"
+
/* global variables */
extern struct thread_master *master;
@@ -98,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"