diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-08-17 16:31:08 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-08-17 16:31:08 +0200 |
commit | 78ab1a93e6d519bf404fbe61fc7ec3c3ab35a72a (patch) | |
tree | 75106e1ff89a03a6869184994b902a70315dfc30 /src/constants.rs | |
parent | Begin drafting cross-platform interface (diff) | |
download | wireguard-rs-78ab1a93e6d519bf404fbe61fc7ec3c3ab35a72a.tar.xz wireguard-rs-78ab1a93e6d519bf404fbe61fc7ec3c3ab35a72a.zip |
Remove peer from cryptkey router on drop
Diffstat (limited to 'src/constants.rs')
-rw-r--r-- | src/constants.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/constants.rs b/src/constants.rs new file mode 100644 index 0000000..829deac --- /dev/null +++ b/src/constants.rs @@ -0,0 +1,11 @@ +use std::time::Duration; +use std::u64; + +pub const REKEY_AFTER_MESSAGES: u64 = u64::MAX - (1 << 16); +pub const REJECT_AFTER_MESSAGES: u64 = u64::MAX - (1 << 4); + +pub const REKEY_AFTER_TIME: Duration = Duration::from_secs(120); +pub const REJECT_AFTER_TIME: Duration = Duration::from_secs(180); +pub const REKEY_ATTEMPT_TIME: Duration = Duration::from_secs(90); +pub const REKEY_TIMEOUT: Duration = Duration::from_secs(5); +pub const KEEPALIVE_TIMEOUT: Duration = Duration::from_secs(10); |