aboutsummaryrefslogtreecommitdiffstats
path: root/src/constants.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-06-27 17:33:06 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-06-27 17:33:06 +0200
commit8236f3afa2eca0aae6c5da9560301c04d882c81b (patch)
tree5babaff66d6709f7f1fcdba69847ac684d1ef3de /src/constants.go
parentBegin implementation of outbound work queue (diff)
downloadwireguard-go-8236f3afa2eca0aae6c5da9560301c04d882c81b.tar.xz
wireguard-go-8236f3afa2eca0aae6c5da9560301c04d882c81b.zip
Implemented MAC1/2 calculation
Diffstat (limited to 'src/constants.go')
-rw-r--r--src/constants.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/constants.go b/src/constants.go
new file mode 100644
index 0000000..dc95379
--- /dev/null
+++ b/src/constants.go
@@ -0,0 +1,16 @@
+package main
+
+import (
+ "time"
+)
+
+const (
+ RekeyAfterMessage = (1 << 64) - (1 << 16) - 1
+ RekeyAfterTime = time.Second * 120
+ RekeyAttemptTime = time.Second * 90
+ RekeyTimeout = time.Second * 5
+ RejectAfterTime = time.Second * 180
+ RejectAfterMessage = (1 << 64) - (1 << 4) - 1
+ KeepaliveTimeout = time.Second * 10
+ CookieRefreshTime = time.Second * 2
+)