diff options
Diffstat (limited to 'ospf6d/ospf6d.h')
-rw-r--r-- | ospf6d/ospf6d.h | 11 |
1 files changed, 11 insertions, 0 deletions
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" |