NMDeviceWireGuard
NMDeviceWireGuard
Functions
nm_device_wireguard_get_public_key ()
GBytes *
nm_device_wireguard_get_public_key (NMDeviceWireGuard *device);
Gets the public key for this interface
Returns
the GBytes containing the 32-byte public key.
[transfer none]
Since: 1.14
nm_device_wireguard_get_listen_port ()
guint16
nm_device_wireguard_get_listen_port (NMDeviceWireGuard *device);
Gets the local UDP port this interface listens on
Since: 1.14
nm_device_wireguard_get_fwmark ()
guint32
nm_device_wireguard_get_fwmark (NMDeviceWireGuard *device);
Gets the fwmark (firewall mark) for this interface.
It can be used to set routing policy for outgoing encrypted packets.
See: ip-rule(8)
Returns
0 if fwmark not in use, 32-bit fwmark value otherwise
Since: 1.14
Types and Values
NM_DEVICE_WIREGUARD_PUBLIC_KEY
#define NM_DEVICE_WIREGUARD_PUBLIC_KEY "public-key"
NM_DEVICE_WIREGUARD_LISTEN_PORT
#define NM_DEVICE_WIREGUARD_LISTEN_PORT "listen-port"
NM_DEVICE_WIREGUARD_FWMARK
#define NM_DEVICE_WIREGUARD_FWMARK "fwmark"
NMDeviceWireGuard
typedef struct _NMDeviceWireGuard NMDeviceWireGuard;
Since: 1.14
Property Details
The “fwmark” property
“fwmark” guint
Optional firewall mark - see ip-rule(8).
Used when setting routing policy for outgoing encrypted packets.
Set to 0 to disable the mark (default).
Owner: NMDeviceWireGuard
Flags: Read
Default value: 0
Since: 1.14
The “listen-port” property
“listen-port” guint
Local UDP listen port.
Set to 0 to allow a random port to be chosen (default).
Owner: NMDeviceWireGuard
Flags: Read
Allowed values: <= 65535
Default value: 0
Since: 1.14
The “public-key” property
“public-key” GBytes *
32-byte public key, derived from the current private key.
Owner: NMDeviceWireGuard
Flags: Read
Since: 1.14