Struct SYN_WG¶
WireGuard client context — caller-owned. More...
#include <syn_wg.h>
Public Attributes¶
| Type | Name |
|---|---|
| SYN_WgConfig | config |
| uint8_t | hs_chaining_key |
| uint8_t | hs_ephemeral_priv |
| uint8_t | hs_hash |
| uint32_t | last_handshake_ms |
| uint32_t | last_recv_ms |
| uint32_t | last_sent_ms |
| void(* | on_recv Callback for decrypted IP packets received from the tunnel. |
| uint8_t | public_key |
| uint8_t * | rx_buf |
| size_t | rx_buf_size |
| SYN_WgSession | session |
| SYN_SNTP * | sntp |
| SYN_WgState | state |
| uint8_t * | tx_buf |
| size_t | tx_buf_size |
| SYN_Socket | udp_sock |
| void * | user_ctx |
Detailed Description¶
Contains config, session state, handshake scratch, timers, and buffer pointers. Approximately ~350 bytes + buffer pointers.
Public Attributes Documentation¶
variable config¶
Peer configuration
variable hs_chaining_key¶
Noise chaining key (CK)
variable hs_ephemeral_priv¶
Ephemeral private key
variable hs_hash¶
Noise handshake hash (H)
variable last_handshake_ms¶
Tick of last handshake initiation
variable last_recv_ms¶
Tick of last data received
variable last_sent_ms¶
Tick of last data sent
variable on_recv¶
Callback for decrypted IP packets received from the tunnel.
Parameters:
ip_packetRaw IP packet data.lenPacket length.ctxUser context pointer.
variable public_key¶
Our public key (from private)
variable rx_buf¶
Receive buffer
variable rx_buf_size¶
Receive buffer capacity
variable session¶
Currently active transport session
variable sntp¶
NTP time source (for TAI64N)
variable state¶
Connection state
variable tx_buf¶
Transmit buffer
variable tx_buf_size¶
Transmit buffer capacity
variable udp_sock¶
UDP socket to the server
variable user_ctx¶
User context for on_recv
The documentation for this class was generated from the following file src/syntropic/net/syn_wg.h