NMDeviceWireGuard

NMDeviceWireGuard

Functions

Types and Values

Description

Functions

nm_device_wireguard_get_public_key ()

GBytes *
nm_device_wireguard_get_public_key (NMDeviceWireGuard *device);

Gets the public key for this interface

Parameters

device

a NMDeviceWireGuard

 

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

Parameters

device

a NMDeviceWireGuard

 

Returns

UDP listen port

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)

Parameters

device

a NMDeviceWireGuard

 

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"