Optionalproperties: Partial<{}>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 NM.WireGuardPeer 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.
true if the value is a valid allowed-ips value, false otherwise. Depending on accept_invalid, also invalid values are added.
Removes all allowed-ip entries.
It is a bug trying to modify a sealed NM.WireGuardPeer instance.
the other NM.WireGuardPeer to compare.
NM.SettingCompareFlags to affect the comparison.
zero of the two instances are equivalent or a non-zero integer otherwise. This defines a total ordering over the peers. Whether a peer is sealed or not, does not affect the comparison.
the index from zero to (allowed-ips-len - 1) to retrieve.
Optionalout_is_valid: booleantrue if the returned value is a valid allowed-ip setting. This parameter is wrongly not marked as (out) argument, it is thus not accessible via introspection. This cannot be fixed without breaking API for introspection users.
the allowed-ip setting at index idx. If idx is out of range, null will be returned.
the number of allowed-ips entries.
the endpoint or null if none was set.
get the persistent-keepalive setting in seconds. Set to zero to disable keep-alive.
the preshared key or null if unset.
get the secret flags for the preshared-key.
the public key or null if unset.
whether self is sealed or not.
if true, secret properties are validated. Otherwise, they are ignored for this purpose.
if true, non-secret properties are validated. Otherwise, they are ignored for this purpose.
true if the peer is valid or fails with an error reason.
if true, the preshared-key secrets are copied as well. Otherwise, they will be removed.
a clone of self. This instance is always unsealed.
returns the input argument self after incrementing the reference count. Since 1.42, ref-counting of NM.WireGuardPeer is 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 NM.WireGuardPeer 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.
true if idx was valid and the allowed-ip was removed. false otherwise, and the peer will not be changed.
Seal the NM.WireGuardPeer 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 NM.WireGuardPeer 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.
true if the endpoint is null or valid. For an invalid endpoint argument, false is returned. Depending on allow_invalid, the instance will be modified.
It is a bug trying to modify a sealed NM.WireGuardPeer 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 NM.WireGuardPeer 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.
true if the preshared-key is valid, otherwise false. null is considered a valid value. If the key is invalid, it depends on accept_invalid whether the previous value was reset.
It is a bug trying to modify a sealed NM.WireGuardPeer 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 NM.WireGuardPeer 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.
true if the key was valid or null. Returns false for invalid keys. Depending on accept_invalid will an invalid key be set or not.
Drop a reference to self. If the last reference is dropped,
the instance is freed and all associate data released.
Since 1.42, ref-counting of NM.WireGuardPeer is thread-safe.
Staticnew
The settings of one WireGuard peer.
Since
1.16