platform: rename instances of Wireguard to WireGuard

Respect WireGuard canonical capitalization on identifiers.
As per discussion on:
https://github.com/NetworkManager/NetworkManager/pull/162
This commit is contained in:
Javier Arteaga 2018-07-28 14:54:33 +02:00 committed by Thomas Haller
parent aca73150ad
commit edd5cf1a3c
6 changed files with 49 additions and 49 deletions

View file

@ -35,7 +35,7 @@ typedef struct {
NMIPAddr ip; NMIPAddr ip;
guint8 family; guint8 family;
guint8 mask; guint8 mask;
} NMWireguardAllowedIP; } NMWireGuardAllowedIP;
#define NM_WG_PUBLIC_KEY_LEN 32 #define NM_WG_PUBLIC_KEY_LEN 32
#define NM_WG_SYMMETRIC_KEY_LEN 32 #define NM_WG_SYMMETRIC_KEY_LEN 32
@ -53,8 +53,8 @@ typedef struct {
guint64 rx_bytes, tx_bytes; guint64 rx_bytes, tx_bytes;
gsize allowedips_len; gsize allowedips_len;
NMWireguardAllowedIP *allowedips; NMWireGuardAllowedIP *allowedips;
} NMWireguardPeer; } NMWireGuardPeer;
#define _NM_IP_TUNNEL_FLAG_ALL_IP6TNL \ #define _NM_IP_TUNNEL_FLAG_ALL_IP6TNL \
( NM_IP_TUNNEL_FLAG_IP6_IGN_ENCAP_LIMIT \ ( NM_IP_TUNNEL_FLAG_IP6_IGN_ENCAP_LIMIT \

View file

@ -1847,7 +1847,7 @@ _parse_lnk_vxlan (const char *kind, struct nlattr *info_data)
/*****************************************************************************/ /*****************************************************************************/
/* Context to build a NMPObjectLnkWireguard instance. /* Context to build a NMPObjectLnkWireGuard instance.
* GArray wrappers are discarded after processing all netlink messages. */ * GArray wrappers are discarded after processing all netlink messages. */
struct _wireguard_device_buf { struct _wireguard_device_buf {
NMPObject *obj; NMPObject *obj;
@ -1865,9 +1865,9 @@ _wireguard_update_from_allowedips_nla (struct _wireguard_device_buf *buf,
[WGALLOWEDIP_A_CIDR_MASK] = { .type = NLA_U8 }, [WGALLOWEDIP_A_CIDR_MASK] = { .type = NLA_U8 },
}; };
struct nlattr *tba[WGALLOWEDIP_A_MAX + 1]; struct nlattr *tba[WGALLOWEDIP_A_MAX + 1];
NMWireguardPeer *peer = &g_array_index (buf->peers, NMWireguardPeer, buf->peers->len - 1); NMWireGuardPeer *peer = &g_array_index (buf->peers, NMWireGuardPeer, buf->peers->len - 1);
NMWireguardAllowedIP *allowedip; NMWireGuardAllowedIP *allowedip;
NMWireguardAllowedIP new_allowedip = {0}; NMWireGuardAllowedIP new_allowedip = {0};
int addr_len; int addr_len;
int ret; int ret;
@ -1876,7 +1876,7 @@ _wireguard_update_from_allowedips_nla (struct _wireguard_device_buf *buf,
goto errout; goto errout;
g_array_append_val (buf->allowedips, new_allowedip); g_array_append_val (buf->allowedips, new_allowedip);
allowedip = &g_array_index (buf->allowedips, NMWireguardAllowedIP, buf->allowedips->len - 1); allowedip = &g_array_index (buf->allowedips, NMWireGuardAllowedIP, buf->allowedips->len - 1);
peer->allowedips_len++; peer->allowedips_len++;
if (tba[WGALLOWEDIP_A_FAMILY]) if (tba[WGALLOWEDIP_A_FAMILY])
@ -1920,9 +1920,9 @@ _wireguard_update_from_peers_nla (struct _wireguard_device_buf *buf,
[WGPEER_A_ALLOWEDIPS] = { .type = NLA_NESTED }, [WGPEER_A_ALLOWEDIPS] = { .type = NLA_NESTED },
}; };
struct nlattr *tbp[WGPEER_A_MAX + 1]; struct nlattr *tbp[WGPEER_A_MAX + 1];
NMWireguardPeer * const last = buf->peers->len ? &g_array_index (buf->peers, NMWireguardPeer, buf->peers->len - 1) : NULL; NMWireGuardPeer * const last = buf->peers->len ? &g_array_index (buf->peers, NMWireGuardPeer, buf->peers->len - 1) : NULL;
NMWireguardPeer *peer; NMWireGuardPeer *peer;
NMWireguardPeer new_peer = {0}; NMWireGuardPeer new_peer = {0};
int ret; int ret;
if (nla_parse_nested (tbp, WGPEER_A_MAX, peer_attr, peer_policy)) { if (nla_parse_nested (tbp, WGPEER_A_MAX, peer_attr, peer_policy)) {
@ -1943,7 +1943,7 @@ _wireguard_update_from_peers_nla (struct _wireguard_device_buf *buf,
/* otherwise, start a new peer */ /* otherwise, start a new peer */
g_array_append_val (buf->peers, new_peer); g_array_append_val (buf->peers, new_peer);
peer = &g_array_index (buf->peers, NMWireguardPeer, buf->peers->len - 1); peer = &g_array_index (buf->peers, NMWireGuardPeer, buf->peers->len - 1);
nla_memcpy (&peer->public_key, tbp[WGPEER_A_PUBLIC_KEY], sizeof (peer->public_key)); nla_memcpy (&peer->public_key, tbp[WGPEER_A_PUBLIC_KEY], sizeof (peer->public_key));
@ -2000,7 +2000,7 @@ _wireguard_get_device_cb (struct nl_msg *msg, void *arg)
}; };
struct _wireguard_device_buf *buf = arg; struct _wireguard_device_buf *buf = arg;
struct nlattr *tbd[WGDEVICE_A_MAX + 1]; struct nlattr *tbd[WGDEVICE_A_MAX + 1];
NMPlatformLnkWireguard *props = &buf->obj->lnk_wireguard; NMPlatformLnkWireGuard *props = &buf->obj->lnk_wireguard;
struct nlmsghdr *nlh = nlmsg_hdr (msg); struct nlmsghdr *nlh = nlmsg_hdr (msg);
int ret; int ret;
@ -6513,8 +6513,8 @@ _wireguard_get_link_properties (NMPlatform *platform, const NMPlatformLink *link
nm_auto_nlmsg struct nl_msg *msg = NULL; nm_auto_nlmsg struct nl_msg *msg = NULL;
struct _wireguard_device_buf buf = { struct _wireguard_device_buf buf = {
.obj = obj, .obj = obj,
.peers = g_array_new (FALSE, FALSE, sizeof (NMWireguardPeer)), .peers = g_array_new (FALSE, FALSE, sizeof (NMWireGuardPeer)),
.allowedips = g_array_new (FALSE, FALSE, sizeof (NMWireguardAllowedIP)), .allowedips = g_array_new (FALSE, FALSE, sizeof (NMWireGuardAllowedIP)),
}; };
struct nl_cb cb = { struct nl_cb cb = {
.valid_cb = _wireguard_get_device_cb, .valid_cb = _wireguard_get_device_cb,
@ -6548,15 +6548,15 @@ _wireguard_get_link_properties (NMPlatform *platform, const NMPlatformLink *link
/* have each peer point to its own chunk of the allowedips buffer */ /* have each peer point to its own chunk of the allowedips buffer */
for (i = 0, j = 0; i < buf.peers->len; i++) { for (i = 0, j = 0; i < buf.peers->len; i++) {
NMWireguardPeer *p = &g_array_index (buf.peers, NMWireguardPeer, i); NMWireGuardPeer *p = &g_array_index (buf.peers, NMWireGuardPeer, i);
p->allowedips = &g_array_index (buf.allowedips, NMWireguardAllowedIP, j); p->allowedips = &g_array_index (buf.allowedips, NMWireGuardAllowedIP, j);
j += p->allowedips_len; j += p->allowedips_len;
} }
/* drop the wrapper (but also the buffer if no peer points to it) */ /* drop the wrapper (but also the buffer if no peer points to it) */
g_array_free (buf.allowedips, buf.peers->len ? FALSE : TRUE); g_array_free (buf.allowedips, buf.peers->len ? FALSE : TRUE);
obj->_lnk_wireguard.peers_len = buf.peers->len; obj->_lnk_wireguard.peers_len = buf.peers->len;
obj->_lnk_wireguard.peers = (NMWireguardPeer *) g_array_free (buf.peers, FALSE); obj->_lnk_wireguard.peers = (NMWireGuardPeer *) g_array_free (buf.peers, FALSE);
return TRUE; return TRUE;

View file

@ -1968,7 +1968,7 @@ nm_platform_link_get_lnk_vxlan (NMPlatform *self, int ifindex, const NMPlatformL
return _link_get_lnk (self, ifindex, NM_LINK_TYPE_VXLAN, out_link); return _link_get_lnk (self, ifindex, NM_LINK_TYPE_VXLAN, out_link);
} }
const NMPlatformLnkWireguard * const NMPlatformLnkWireGuard *
nm_platform_link_get_lnk_wireguard (NMPlatform *self, int ifindex, const NMPlatformLink **out_link) nm_platform_link_get_lnk_wireguard (NMPlatform *self, int ifindex, const NMPlatformLink **out_link)
{ {
return _link_get_lnk (self, ifindex, NM_LINK_TYPE_WIREGUARD, out_link); return _link_get_lnk (self, ifindex, NM_LINK_TYPE_WIREGUARD, out_link);
@ -5506,7 +5506,7 @@ nm_platform_lnk_vxlan_to_string (const NMPlatformLnkVxlan *lnk, char *buf, gsize
} }
const char * const char *
nm_platform_wireguard_peer_to_string (const NMWireguardPeer *peer, char *buf, gsize len) nm_platform_wireguard_peer_to_string (const NMWireGuardPeer *peer, char *buf, gsize len)
{ {
gs_free char *public_b64 = NULL; gs_free char *public_b64 = NULL;
char s_address[INET6_ADDRSTRLEN] = {0}; char s_address[INET6_ADDRSTRLEN] = {0};
@ -5555,7 +5555,7 @@ nm_platform_wireguard_peer_to_string (const NMWireguardPeer *peer, char *buf, gs
for (i = 0; i < peer->allowedips_len; i++) { for (i = 0; i < peer->allowedips_len; i++) {
NMWireguardAllowedIP *allowedip = &peer->allowedips[i]; NMWireGuardAllowedIP *allowedip = &peer->allowedips[i];
const char *ret; const char *ret;
ret = inet_ntop (allowedip->family, &allowedip->ip, s_address, sizeof(s_address)); ret = inet_ntop (allowedip->family, &allowedip->ip, s_address, sizeof(s_address));
@ -5571,7 +5571,7 @@ nm_platform_wireguard_peer_to_string (const NMWireguardPeer *peer, char *buf, gs
} }
const char * const char *
nm_platform_lnk_wireguard_to_string (const NMPlatformLnkWireguard *lnk, char *buf, gsize len) nm_platform_lnk_wireguard_to_string (const NMPlatformLnkWireGuard *lnk, char *buf, gsize len)
{ {
gs_free char *public_b64 = NULL; gs_free char *public_b64 = NULL;
guint8 nonzero_key = 0; guint8 nonzero_key = 0;
@ -6489,7 +6489,7 @@ nm_platform_lnk_vxlan_cmp (const NMPlatformLnkVxlan *a, const NMPlatformLnkVxlan
} }
void void
nm_platform_lnk_wireguard_hash_update (const NMPlatformLnkWireguard *obj, NMHashState *h) nm_platform_lnk_wireguard_hash_update (const NMPlatformLnkWireGuard *obj, NMHashState *h)
{ {
nm_hash_update_vals (h, nm_hash_update_vals (h,
obj->listen_port, obj->listen_port,
@ -6499,7 +6499,7 @@ nm_platform_lnk_wireguard_hash_update (const NMPlatformLnkWireguard *obj, NMHash
} }
int int
nm_platform_lnk_wireguard_cmp (const NMPlatformLnkWireguard *a, const NMPlatformLnkWireguard *b) nm_platform_lnk_wireguard_cmp (const NMPlatformLnkWireGuard *a, const NMPlatformLnkWireGuard *b)
{ {
NM_CMP_SELF (a, b); NM_CMP_SELF (a, b);
NM_CMP_FIELD (a, b, listen_port); NM_CMP_FIELD (a, b, listen_port);

View file

@ -757,7 +757,7 @@ typedef struct {
guint8 public_key[NM_WG_PUBLIC_KEY_LEN]; guint8 public_key[NM_WG_PUBLIC_KEY_LEN];
guint16 listen_port; guint16 listen_port;
guint32 fwmark; guint32 fwmark;
} NMPlatformLnkWireguard; } NMPlatformLnkWireGuard;
typedef enum { typedef enum {
NM_PLATFORM_LINK_DUPLEX_UNKNOWN, NM_PLATFORM_LINK_DUPLEX_UNKNOWN,
@ -1254,7 +1254,7 @@ const NMPlatformLnkSit *nm_platform_link_get_lnk_sit (NMPlatform *self, int ifin
const NMPlatformLnkTun *nm_platform_link_get_lnk_tun (NMPlatform *self, int ifindex, const NMPlatformLink **out_link); const NMPlatformLnkTun *nm_platform_link_get_lnk_tun (NMPlatform *self, int ifindex, const NMPlatformLink **out_link);
const NMPlatformLnkVlan *nm_platform_link_get_lnk_vlan (NMPlatform *self, int ifindex, const NMPlatformLink **out_link); const NMPlatformLnkVlan *nm_platform_link_get_lnk_vlan (NMPlatform *self, int ifindex, const NMPlatformLink **out_link);
const NMPlatformLnkVxlan *nm_platform_link_get_lnk_vxlan (NMPlatform *self, int ifindex, const NMPlatformLink **out_link); const NMPlatformLnkVxlan *nm_platform_link_get_lnk_vxlan (NMPlatform *self, int ifindex, const NMPlatformLink **out_link);
const NMPlatformLnkWireguard *nm_platform_link_get_lnk_wireguard (NMPlatform *self, int ifindex, const NMPlatformLink **out_link); const NMPlatformLnkWireGuard *nm_platform_link_get_lnk_wireguard (NMPlatform *self, int ifindex, const NMPlatformLink **out_link);
NMPlatformError nm_platform_link_vlan_add (NMPlatform *self, NMPlatformError nm_platform_link_vlan_add (NMPlatform *self,
const char *name, const char *name,
@ -1449,7 +1449,7 @@ const char *nm_platform_lnk_sit_to_string (const NMPlatformLnkSit *lnk, char *bu
const char *nm_platform_lnk_tun_to_string (const NMPlatformLnkTun *lnk, char *buf, gsize len); const char *nm_platform_lnk_tun_to_string (const NMPlatformLnkTun *lnk, char *buf, gsize len);
const char *nm_platform_lnk_vlan_to_string (const NMPlatformLnkVlan *lnk, char *buf, gsize len); const char *nm_platform_lnk_vlan_to_string (const NMPlatformLnkVlan *lnk, char *buf, gsize len);
const char *nm_platform_lnk_vxlan_to_string (const NMPlatformLnkVxlan *lnk, char *buf, gsize len); const char *nm_platform_lnk_vxlan_to_string (const NMPlatformLnkVxlan *lnk, char *buf, gsize len);
const char *nm_platform_lnk_wireguard_to_string (const NMPlatformLnkWireguard *lnk, char *buf, gsize len); const char *nm_platform_lnk_wireguard_to_string (const NMPlatformLnkWireGuard *lnk, char *buf, gsize len);
const char *nm_platform_ip4_address_to_string (const NMPlatformIP4Address *address, char *buf, gsize len); const char *nm_platform_ip4_address_to_string (const NMPlatformIP4Address *address, char *buf, gsize len);
const char *nm_platform_ip6_address_to_string (const NMPlatformIP6Address *address, char *buf, gsize len); const char *nm_platform_ip6_address_to_string (const NMPlatformIP6Address *address, char *buf, gsize len);
const char *nm_platform_ip4_route_to_string (const NMPlatformIP4Route *route, char *buf, gsize len); const char *nm_platform_ip4_route_to_string (const NMPlatformIP4Route *route, char *buf, gsize len);
@ -1464,7 +1464,7 @@ const char *nm_platform_vlan_qos_mapping_to_string (const char *name,
char *buf, char *buf,
gsize len); gsize len);
const char *nm_platform_wireguard_peer_to_string (const NMWireguardPeer *peer, const char *nm_platform_wireguard_peer_to_string (const NMWireGuardPeer *peer,
char *buf, char *buf,
gsize len); gsize len);
@ -1479,7 +1479,7 @@ int nm_platform_lnk_sit_cmp (const NMPlatformLnkSit *a, const NMPlatformLnkSit *
int nm_platform_lnk_tun_cmp (const NMPlatformLnkTun *a, const NMPlatformLnkTun *b); int nm_platform_lnk_tun_cmp (const NMPlatformLnkTun *a, const NMPlatformLnkTun *b);
int nm_platform_lnk_vlan_cmp (const NMPlatformLnkVlan *a, const NMPlatformLnkVlan *b); int nm_platform_lnk_vlan_cmp (const NMPlatformLnkVlan *a, const NMPlatformLnkVlan *b);
int nm_platform_lnk_vxlan_cmp (const NMPlatformLnkVxlan *a, const NMPlatformLnkVxlan *b); int nm_platform_lnk_vxlan_cmp (const NMPlatformLnkVxlan *a, const NMPlatformLnkVxlan *b);
int nm_platform_lnk_wireguard_cmp (const NMPlatformLnkWireguard *a, const NMPlatformLnkWireguard *b); int nm_platform_lnk_wireguard_cmp (const NMPlatformLnkWireGuard *a, const NMPlatformLnkWireGuard *b);
int nm_platform_ip4_address_cmp (const NMPlatformIP4Address *a, const NMPlatformIP4Address *b); int nm_platform_ip4_address_cmp (const NMPlatformIP4Address *a, const NMPlatformIP4Address *b);
int nm_platform_ip6_address_cmp (const NMPlatformIP6Address *a, const NMPlatformIP6Address *b); int nm_platform_ip6_address_cmp (const NMPlatformIP6Address *a, const NMPlatformIP6Address *b);
@ -1516,7 +1516,7 @@ void nm_platform_lnk_sit_hash_update (const NMPlatformLnkSit *obj, NMHashState *
void nm_platform_lnk_tun_hash_update (const NMPlatformLnkTun *obj, NMHashState *h); void nm_platform_lnk_tun_hash_update (const NMPlatformLnkTun *obj, NMHashState *h);
void nm_platform_lnk_vlan_hash_update (const NMPlatformLnkVlan *obj, NMHashState *h); void nm_platform_lnk_vlan_hash_update (const NMPlatformLnkVlan *obj, NMHashState *h);
void nm_platform_lnk_vxlan_hash_update (const NMPlatformLnkVxlan *obj, NMHashState *h); void nm_platform_lnk_vxlan_hash_update (const NMPlatformLnkVxlan *obj, NMHashState *h);
void nm_platform_lnk_wireguard_hash_update (const NMPlatformLnkWireguard *obj, NMHashState *h); void nm_platform_lnk_wireguard_hash_update (const NMPlatformLnkWireGuard *obj, NMHashState *h);
void nm_platform_qdisc_hash_update (const NMPlatformQdisc *obj, NMHashState *h); void nm_platform_qdisc_hash_update (const NMPlatformQdisc *obj, NMHashState *h);
void nm_platform_tfilter_hash_update (const NMPlatformTfilter *obj, NMHashState *h); void nm_platform_tfilter_hash_update (const NMPlatformTfilter *obj, NMHashState *h);

View file

@ -348,14 +348,14 @@ _vlan_xgress_qos_mappings_cpy (guint *dst_n_map,
static void static void
_wireguard_peers_hash_update (gsize n_peers, _wireguard_peers_hash_update (gsize n_peers,
const NMWireguardPeer *peers, const NMWireGuardPeer *peers,
NMHashState *h) NMHashState *h)
{ {
gsize i, j; gsize i, j;
nm_hash_update_val (h, n_peers); nm_hash_update_val (h, n_peers);
for (i = 0; i < n_peers; i++) { for (i = 0; i < n_peers; i++) {
const NMWireguardPeer *p = &peers[i]; const NMWireGuardPeer *p = &peers[i];
nm_hash_update (h, p->public_key, sizeof (p->public_key)); nm_hash_update (h, p->public_key, sizeof (p->public_key));
nm_hash_update (h, p->preshared_key, sizeof (p->preshared_key)); nm_hash_update (h, p->preshared_key, sizeof (p->preshared_key));
@ -376,7 +376,7 @@ _wireguard_peers_hash_update (gsize n_peers,
g_assert_not_reached (); g_assert_not_reached ();
for (j = 0; j < p->allowedips_len; j++) { for (j = 0; j < p->allowedips_len; j++) {
const NMWireguardAllowedIP *ip = &p->allowedips[j]; const NMWireGuardAllowedIP *ip = &p->allowedips[j];
nm_hash_update_vals (h, ip->family, ip->mask); nm_hash_update_vals (h, ip->family, ip->mask);
@ -392,14 +392,14 @@ _wireguard_peers_hash_update (gsize n_peers,
static int static int
_wireguard_peers_cmp (gsize n_peers, _wireguard_peers_cmp (gsize n_peers,
const NMWireguardPeer *p1, const NMWireGuardPeer *p1,
const NMWireguardPeer *p2) const NMWireGuardPeer *p2)
{ {
gsize i, j; gsize i, j;
for (i = 0; i < n_peers; i++) { for (i = 0; i < n_peers; i++) {
const NMWireguardPeer *a = &p1[i]; const NMWireGuardPeer *a = &p1[i];
const NMWireguardPeer *b = &p2[i]; const NMWireGuardPeer *b = &p2[i];
NM_CMP_FIELD (a, b, last_handshake_time.tv_sec); NM_CMP_FIELD (a, b, last_handshake_time.tv_sec);
NM_CMP_FIELD (a, b, last_handshake_time.tv_nsec); NM_CMP_FIELD (a, b, last_handshake_time.tv_nsec);
@ -419,8 +419,8 @@ _wireguard_peers_cmp (gsize n_peers,
g_assert_not_reached (); g_assert_not_reached ();
for (j = 0; j < a->allowedips_len; j++) { for (j = 0; j < a->allowedips_len; j++) {
const NMWireguardAllowedIP *aip = &a->allowedips[j]; const NMWireGuardAllowedIP *aip = &a->allowedips[j];
const NMWireguardAllowedIP *bip = &b->allowedips[j]; const NMWireGuardAllowedIP *bip = &b->allowedips[j];
NM_CMP_FIELD (aip, bip, family); NM_CMP_FIELD (aip, bip, family);
NM_CMP_FIELD (aip, bip, mask); NM_CMP_FIELD (aip, bip, mask);
@ -439,9 +439,9 @@ _wireguard_peers_cmp (gsize n_peers,
static void static void
_wireguard_peers_cpy (gsize *dst_n_peers, _wireguard_peers_cpy (gsize *dst_n_peers,
NMWireguardPeer **dst_peers, NMWireGuardPeer **dst_peers,
gsize src_n_peers, gsize src_n_peers,
const NMWireguardPeer *src_peers) const NMWireGuardPeer *src_peers)
{ {
if (src_n_peers == 0) { if (src_n_peers == 0) {
g_clear_pointer (dst_peers, g_free); g_clear_pointer (dst_peers, g_free);
@ -876,7 +876,7 @@ _vt_cmd_obj_to_string_lnk_wireguard (const NMPObject *obj, NMPObjectToStringMode
obj->_lnk_wireguard.peers_len); obj->_lnk_wireguard.peers_len);
for (i = 0; i < obj->_lnk_wireguard.peers_len; i++) { for (i = 0; i < obj->_lnk_wireguard.peers_len; i++) {
const NMWireguardPeer *peer = &obj->_lnk_wireguard.peers[i]; const NMWireGuardPeer *peer = &obj->_lnk_wireguard.peers[i];
nm_platform_wireguard_peer_to_string (peer, b, buf_size); nm_platform_wireguard_peer_to_string (peer, b, buf_size);
l = strlen (b); l = strlen (b);
b += l; b += l;
@ -3066,8 +3066,8 @@ const NMPClass _nmp_classes[NMP_OBJECT_TYPE_MAX] = {
[NMP_OBJECT_TYPE_LNK_WIREGUARD - 1] = { [NMP_OBJECT_TYPE_LNK_WIREGUARD - 1] = {
.parent = DEDUP_MULTI_OBJ_CLASS_INIT(), .parent = DEDUP_MULTI_OBJ_CLASS_INIT(),
.obj_type = NMP_OBJECT_TYPE_LNK_WIREGUARD, .obj_type = NMP_OBJECT_TYPE_LNK_WIREGUARD,
.sizeof_data = sizeof (NMPObjectLnkWireguard), .sizeof_data = sizeof (NMPObjectLnkWireGuard),
.sizeof_public = sizeof (NMPlatformLnkWireguard), .sizeof_public = sizeof (NMPlatformLnkWireGuard),
.obj_type_name = "wireguard", .obj_type_name = "wireguard",
.lnk_link_type = NM_LINK_TYPE_WIREGUARD, .lnk_link_type = NM_LINK_TYPE_WIREGUARD,
.cmd_obj_hash_update = _vt_cmd_obj_hash_update_lnk_wireguard, .cmd_obj_hash_update = _vt_cmd_obj_hash_update_lnk_wireguard,

View file

@ -219,11 +219,11 @@ typedef struct {
} NMPObjectLnkVxlan; } NMPObjectLnkVxlan;
typedef struct { typedef struct {
NMPlatformLnkWireguard _public; NMPlatformLnkWireGuard _public;
gsize peers_len; gsize peers_len;
NMWireguardPeer *peers; NMWireGuardPeer *peers;
} NMPObjectLnkWireguard; } NMPObjectLnkWireGuard;
typedef struct { typedef struct {
NMPlatformIP4Address _public; NMPlatformIP4Address _public;
@ -290,8 +290,8 @@ struct _NMPObject {
NMPlatformLnkVxlan lnk_vxlan; NMPlatformLnkVxlan lnk_vxlan;
NMPObjectLnkVxlan _lnk_vxlan; NMPObjectLnkVxlan _lnk_vxlan;
NMPlatformLnkWireguard lnk_wireguard; NMPlatformLnkWireGuard lnk_wireguard;
NMPObjectLnkWireguard _lnk_wireguard; NMPObjectLnkWireGuard _lnk_wireguard;
NMPlatformIPAddress ip_address; NMPlatformIPAddress ip_address;
NMPlatformIPXAddress ipx_address; NMPlatformIPXAddress ipx_address;