16 #ifndef __included_wg_messages_h__ 17 #define __included_wg_messages_h__ 24 #define WHZ (u32) (1/WG_TICK) 26 #define NOISE_KEY_LEN_BASE64 ((((NOISE_PUBLIC_KEY_LEN) + 2) / 3) * 4 + 1) 27 #define noise_encrypted_len(plain_len) ((plain_len) + NOISE_AUTHTAG_LEN) 38 #define foreach_wg_message_type \ 39 _(INVALID, "Invalid") \ 40 _(HANDSHAKE_INITIATION, "Handshake initiation") \ 41 _(HANDSHAKE_RESPONSE, "Handshake response") \ 42 _(HANDSHAKE_COOKIE, "Handshake cookie") \ 47 #define _(v,s) MESSAGE_##v, 93 #define message_data_len(plain_len) \ 94 (noise_encrypted_len(plain_len) + sizeof(message_data_t))
struct message_handshake_initiation message_handshake_initiation_t
#define NOISE_TIMESTAMP_LEN
#define NOISE_PUBLIC_KEY_LEN
struct message_handshake_response message_handshake_response_t
#define WHZ
WG tick frequency.
#define COOKIE_NONCE_SIZE
struct message_header message_header_t
struct message_data message_data_t
struct message_handshake_cookie message_handshake_cookie_t
#define noise_encrypted_len(plain_len)
enum message_type message_type_t
#define foreach_wg_message_type