path: root/src/wireguard.h
diff options
authorMatt Dunwoodie <>2019-08-22 00:51:54 +1000
committerMatt Dunwoodie <>2019-08-22 00:51:54 +1000
commit8294e15c2a7e318ea333db52e1616c21fab1ae93 (patch)
treeb6d1e03a4c63cee747708c340f9240fa898465d9 /src/wireguard.h
parentFixup TODO (diff)
Split ID removal and cleaning
I don't think there would have been any impact, as we check the handshake/session state before using it, but it is more clear to remove the ID from the hashmap and then to clean the struct. This may also come in handy if the cleaning process ends up having to free memory.
Diffstat (limited to 'src/wireguard.h')
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wireguard.h b/src/wireguard.h
index b3ecd51bb89..6f63cfbd3e4 100644
--- a/src/wireguard.h
+++ b/src/wireguard.h
@@ -209,8 +209,10 @@ enum wg_error {
void wg_handshake_init(struct wg_handshake *);
void wg_session_init(struct wg_session *);
-uint32_t wg_handshake_clean(struct wg_handshake *);
-uint32_t wg_session_clean(struct wg_session *);
+uint32_t wg_handshake_id(struct wg_handshake *);
+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_response(struct wg_handshake *, uint32_t, struct wg_msg_response *);