summaryrefslogtreecommitdiffstats
path: root/src/fastd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fastd.h')
-rw-r--r--src/fastd.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fastd.h b/src/fastd.h
index e4bef44..9ce15e7 100644
--- a/src/fastd.h
+++ b/src/fastd.h
@@ -68,6 +68,10 @@ struct _fastd_method {
struct _fastd_config {
fastd_loglevel loglevel;
+ unsigned peer_stale_time;
+ unsigned peer_stale_time_temp;
+ unsigned eth_addr_stale_time;
+
char *ifname;
struct sockaddr_in bind_addr_in;
@@ -147,4 +151,9 @@ static inline size_t fastd_max_packet_size(const fastd_context *ctx) {
}
}
+/* returns (tp1 - tp2) in milliseconds */
+static inline int timespec_diff(const struct timespec *tp1, const struct timespec *tp2) {
+ return ((tp1->tv_sec - tp2->tv_sec))*1000 + (tp1->tv_nsec - tp2->tv_nsec)/1e6;
+}
+
#endif /* _FASTD_FASTD_H_ */