Appends allowed_ip
setting to the list. This does not check
for duplicates and always appends allowed_ip
to the end of the
list. If allowed_ip
is valid, it will be normalized and a modified
for might be appended. If allowed_ip
is invalid, it will still be
appended, but later verification will fail.
It is a bug trying to modify a sealed #NMWireGuardPeer instance.
the allowed-ip entry to set.
if %TRUE, also invalid allowed_ip
value will be appended. Otherwise, the function does nothing in face of invalid values and returns %FALSE.
Removes all allowed-ip entries.
It is a bug trying to modify a sealed #NMWireGuardPeer instance.
This is not thread-safe.
Removes the allowed-ip at the given idx
. This shifts all
following entries one index down.
It is a bug trying to modify a sealed #NMWireGuardPeer instance.
the index from zero to (allowed-ips-len - 1) to retrieve. If the index is out of range, %FALSE is returned and nothing is done.
Seal the #NMWireGuardPeer instance. Afterwards, it is a bug to call all functions that modify the instance (except ref/unref). A sealed instance cannot be unsealed again, but you can create an unsealed copy with nm_wireguard_peer_new_clone().
Sets or clears the endpoint of self
.
It is a bug trying to modify a sealed #NMWireGuardPeer instance.
the socket address endpoint to set or %NULL.
if %TRUE, also invalid values are set. If %FALSE, the function does nothing for invalid endpoint
arguments.
It is a bug trying to modify a sealed #NMWireGuardPeer instance.
the keep-alive value to set.
Reset the preshared key. Note that if the preshared key is valid, it will be normalized (which may or may not modify the set value).
Note that the preshared-key is a secret and consequently has corresponding preshared-key-flags property. This is so that secrets can be optional and requested on demand from a secret-agent. Also, an invalid preshared-key may optionally cause nm_wireguard_peer_is_valid() to fail or it may be accepted.
It is a bug trying to modify a sealed #NMWireGuardPeer instance.
the new preshared key or %NULL to clear the preshared key.
whether to allow setting the key to an invalid value. If %FALSE, self
is unchanged if the key is invalid and if %FALSE is returned.
It is a bug trying to modify a sealed #NMWireGuardPeer instance.
the secret flags to set.
Reset the public key. Note that if the public key is valid, it will be normalized (which may or may not modify the set value).
It is a bug trying to modify a sealed #NMWireGuardPeer instance.
the new public key or %NULL to clear the public key.
if %TRUE and public_key
is not %NULL and invalid, then do not modify the instance.
Drop a reference to self
. If the last reference is dropped,
the instance is freed and all associate data released.
This is not thread-safe.
The settings of one WireGuard peer.