diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-28 23:34:55 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-29 00:45:13 +0200 |
commit | dcaf41a18e1bd9014d1cf3ca7a7129a1be76e811 (patch) | |
tree | 024ee42fb7f76ed8e2fb4c1a5ec66031cdcc26b6 /src/fastd.h | |
parent | 2343f5329c0d5e7d8073810e56577d944b7c518e (diff) | |
download | fastd-dcaf41a18e1bd9014d1cf3ca7a7129a1be76e811.tar fastd-dcaf41a18e1bd9014d1cf3ca7a7129a1be76e811.zip |
Simplify keepalive sending
By using a global keepalive timer, the O(n) keepalive queue purge operation on
every send operation is avoided.
Diffstat (limited to 'src/fastd.h')
-rw-r--r-- | src/fastd.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fastd.h b/src/fastd.h index c6e25cb..133e2e0 100644 --- a/src/fastd.h +++ b/src/fastd.h @@ -167,6 +167,7 @@ struct fastd_config { char *log_syslog_ident; fastd_log_file_t *log_files; + unsigned keepalive_timeout; unsigned keepalive_interval; unsigned peer_stale_time; unsigned eth_addr_stale_time; @@ -277,6 +278,7 @@ struct fastd_context { fastd_peer_t *peers; fastd_peer_t *peers_temp; fastd_queue_t task_queue; + struct timespec next_keepalives; int resolverfd; int resolvewfd; |