aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/contrib
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-01-22 13:38:52 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-01-23 14:29:44 +0100
commita6e4ec487debf11785b3f82a8c821ae9b7356024 (patch)
tree225b287e2a8d242e0676bcf433e54a347b7536d6 /contrib
parentcontrib: introduce simple highlighter library (diff)
downloadwireguard-tools-a6e4ec487debf11785b3f82a8c821ae9b7356024.tar.xz
wireguard-tools-a6e4ec487debf11785b3f82a8c821ae9b7356024.zip
netlink: use __kernel_timespec for handshake time
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/embeddable-wg-library/wireguard.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/embeddable-wg-library/wireguard.h b/contrib/embeddable-wg-library/wireguard.h
index 9ebe47c..e7a1bbf 100644
--- a/contrib/embeddable-wg-library/wireguard.h
+++ b/contrib/embeddable-wg-library/wireguard.h
@@ -16,6 +16,12 @@
typedef uint8_t wg_key[32];
typedef char wg_key_b64_string[((sizeof(wg_key) + 2) / 3) * 4 + 1];
+/* Cross platform __kernel_timespec */
+struct timespec64 {
+ int64_t tv_sec;
+ int64_t tv_nsec;
+};
+
typedef struct wg_allowedip {
uint16_t family;
union {
@@ -46,7 +52,7 @@ typedef struct wg_peer {
struct sockaddr_in6 addr6;
} endpoint;
- struct timespec last_handshake_time;
+ struct timespec64 last_handshake_time;
uint64_t rx_bytes, tx_bytes;
uint16_t persistent_keepalive_interval;