Class: Nl::Linux::Wireguard::AttributeSets::Wgpeer
- Inherits:
-
AttributeSet
- Object
- AttributeSet
- Nl::Linux::Wireguard::AttributeSets::Wgpeer
- Defined in:
- nl-linux/generated/nl/linux/wireguard.rb
Defined Under Namespace
Classes: Allowedips, Attribute, Endpoint, Flags, LastHandshakeTime, PersistentKeepaliveInterval, PresharedKey, ProtocolVersion, PublicKey, RxBytes, TxBytes
Constant Summary
Constants inherited from AttributeSet
Class Method Summary collapse
-
.by_name(name) ⇒ Attribute
Looks up Attribute class by name.
-
.by_type(type) ⇒ Attribute
Looks up Attribute class by type value.
Instance Method Summary collapse
-
#allowedips ⇒ Array<AttributeSets::Wgallowedip>
The index/type parameter is unused on
SET_DEVICEoperations and is zero onGET_DEVICEoperations. -
#endpoint ⇒ String
struct sockaddr_in or struct sockaddr_in6.
-
#flags ⇒ Integer
0and/orWGPEER_F_REMOVE_MEif the specified peer should not exist at the end of the operation, rather than added/updated and/orWGPEER_F_REPLACE_ALLOWEDIPSif all current allowed IPs of this peer should be removed prior to adding the list below and/orWGPEER_F_UPDATE_ONLYif the peer should only be set if it already exists. - #last_handshake_time ⇒ Structs::KernelTimespec
-
#persistent_keepalive_interval ⇒ Integer
Set as
0to disable. -
#preshared_key ⇒ String
Set as all zeros to remove.
-
#protocol_version ⇒ Integer
Should not be set or used at all by most users of this API, as the most recent protocol will be used when this is unset.
- #public_key ⇒ String
- #rx_bytes ⇒ Integer
- #tx_bytes ⇒ Integer
Methods inherited from AttributeSet
#<<, #[], build_attributes, decode, #encode, #initialize
Constructor Details
This class inherits a constructor from Nl::AttributeSet
Class Method Details
.by_name(name) ⇒ Attribute
Looks up Attribute class by name.
390 |
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 390 def by_name(name); BY_NAME.fetch(name); end |
.by_type(type) ⇒ Attribute
Looks up Attribute class by type value.
396 |
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 396 def by_type(type); BY_TYPE.fetch(type); end |
Instance Method Details
#allowedips ⇒ Array<AttributeSets::Wgallowedip>
The index/type parameter is unused on SET_DEVICE operations and is
zero on GET_DEVICE operations.
376 |
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 376 def allowedips; self[:"allowedips"]&.value; end |
#endpoint ⇒ String
struct sockaddr_in or struct sockaddr_in6
353 |
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 353 def endpoint; self[:"endpoint"]&.value; end |
#flags ⇒ Integer
0 and/or WGPEER_F_REMOVE_ME if the specified peer should not
exist at the end of the operation, rather than added/updated and/or
WGPEER_F_REPLACE_ALLOWEDIPS if all current allowed IPs of this
peer should be removed prior to adding the list below and/or
WGPEER_F_UPDATE_ONLY if the peer should only be set if it already
exists.
Known flags are defined in Flags::WgpeerFlags.
348 |
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 348 def flags; self[:"flags"]&.value; end |
#last_handshake_time ⇒ Structs::KernelTimespec
362 |
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 362 def last_handshake_time; self[:"last_handshake_time"]&.value; end |
#persistent_keepalive_interval ⇒ Integer
Set as 0 to disable.
358 |
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 358 def persistent_keepalive_interval; self[:"persistent_keepalive_interval"]&.value; end |
#preshared_key ⇒ String
Set as all zeros to remove.
335 |
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 335 def preshared_key; self[:"preshared_key"]&.value; end |
#protocol_version ⇒ Integer
Should not be set or used at all by most users of this API, as the
most recent protocol will be used when this is unset. Otherwise,
must be set to 1.
383 |
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 383 def protocol_version; self[:"protocol_version"]&.value; end |
#public_key ⇒ String
330 |
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 330 def public_key; self[:"public_key"]&.value; end |
#rx_bytes ⇒ Integer
366 |
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 366 def rx_bytes; self[:"rx_bytes"]&.value; end |
#tx_bytes ⇒ Integer
370 |
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 370 def tx_bytes; self[:"tx_bytes"]&.value; end |