|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
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_cookie message_handshake_cookie_t
enum message_type message_type_t
u8 encrypted_cookie[noise_encrypted_len(COOKIE_MAC_SIZE)]
u8 encrypted_nothing[noise_encrypted_len(0)]
struct message_data message_data_t
u8 nonce[COOKIE_NONCE_SIZE]
u8 unencrypted_ephemeral[NOISE_PUBLIC_KEY_LEN]
#define WHZ
WG tick frequency.
#define COOKIE_NONCE_SIZE
u8 encrypted_static[noise_encrypted_len(NOISE_PUBLIC_KEY_LEN)]
u8 unencrypted_ephemeral[NOISE_PUBLIC_KEY_LEN]
#define NOISE_PUBLIC_KEY_LEN
struct message_handshake_initiation message_handshake_initiation_t
#define noise_encrypted_len(plain_len)
u8 encrypted_timestamp[noise_encrypted_len(NOISE_TIMESTAMP_LEN)]
#define NOISE_TIMESTAMP_LEN
#define foreach_wg_message_type
struct message_header message_header_t
struct message_handshake_response message_handshake_response_t