summaryrefslogtreecommitdiffstats
path: root/src/wireguard.h
diff options
context:
space:
mode:
authorMatt Dunwoodie <ncon@mail.noconroy.net>2019-08-22 01:14:22 +1000
committerMatt Dunwoodie <ncon@mail.noconroy.net>2019-08-22 01:15:10 +1000
commitf0b1be5aa62f4ccb8a081ed02b04b7cceab2e610 (patch)
tree443da8bfa26d12042b0be8872c3fe4d82cfdf1f1 /src/wireguard.h
parentAdd ID checks for incoming messages (diff)
downloadwireguard-openbsd-f0b1be5aa62f4ccb8a081ed02b04b7cceab2e610.tar.xz
wireguard-openbsd-f0b1be5aa62f4ccb8a081ed02b04b7cceab2e610.zip
Separate timers from crypto
Actually, these probably belong in if_wg.c, but will leave them here for now because it's still neat.
Diffstat (limited to 'src/wireguard.h')
-rw-r--r--src/wireguard.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/wireguard.h b/src/wireguard.h
index 4b7ad038282..44872b49c37 100644
--- a/src/wireguard.h
+++ b/src/wireguard.h
@@ -215,7 +215,7 @@ uint32_t wg_session_id(struct wg_session *);
void wg_handshake_clean(struct wg_handshake *);
void wg_session_clean(struct wg_session *);
-enum wg_error wg_handshake_make_initiation(struct wg_handshake *, uint32_t, struct wg_msg_initiation *, struct wg_timers *);
+enum wg_error wg_handshake_make_initiation(struct wg_handshake *, uint32_t, struct wg_msg_initiation *);
enum wg_error wg_handshake_make_response(struct wg_handshake *, uint32_t, struct wg_msg_response *);
enum wg_error wg_handshake_make_cookie(struct wg_keypair *kp, struct wg_cookie *, uint32_t, uint8_t mac[WG_MAC_SIZE], struct wg_msg_cookie *);
enum wg_error wg_handshake_make_cookie(struct wg_keypair *, struct wg_cookie *, uint32_t sender, uint8_t mac[WG_MAC_SIZE], struct wg_msg_cookie *m);
@@ -230,7 +230,7 @@ enum wg_error wg_handshake_merge(struct wg_handshake *, struct wg_handshake *);
enum wg_error wg_session_encrypt(struct wg_session *, struct wg_msg_transport *, size_t);
enum wg_error wg_session_decrypt(struct wg_session *, struct wg_msg_transport *, size_t);
-enum wg_error wg_session_from_handshake(struct wg_session *, struct wg_handshake *, struct wg_timers *);
+enum wg_error wg_session_from_handshake(struct wg_session *, struct wg_handshake *);
void wg_keypair_from_bytes(struct wg_keypair *, const uint8_t [WG_KEY_SIZE]);
void wg_keypair_generate(struct wg_keypair *);
@@ -251,7 +251,9 @@ void wg_timer_broken_flag(struct wg_timers *);
void wg_timer_broken_unflag(struct wg_timers *);
void wg_timer_reinit_flag(struct wg_timers *);
void wg_timer_reinit_unflag(struct wg_timers *);
-struct timespec wg_timer_last_handshake(struct wg_timers *);
-int wg_timer_limit_initiation(struct wg_timers *);
+void wg_timer_initiation_made(struct wg_timers *);
+int wg_timer_initiation_ok(struct wg_timers *);
+void wg_timer_session_made(struct wg_timers *);
+struct timespec wg_timer_session_last(struct wg_timers *);
#endif /* _LIBWG_H_ */