Class: Nl::Linux::Wireguard::AttributeSets::Wgpeer

Inherits:
AttributeSet
  • Object
show all
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

AttributeSet::SELECTOR_NAMES

Class Method Summary collapse

Instance Method Summary collapse

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.

Parameters:

  • name (Symbol)

Returns:



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.

Parameters:

  • type (Integer)

Returns:



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.

Returns:

See Also:



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

Returns:

  • (String)

See Also:



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.

Returns:

  • (Integer)

See Also:



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.

Returns:

  • (Integer)

See Also:



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.

Returns:

  • (String)

See Also:



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.

Returns:

  • (Integer)

See Also:



383
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 383

def protocol_version; self[:"protocol_version"]&.value; end

#public_key ⇒ String

Returns:

  • (String)

See Also:



330
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 330

def public_key; self[:"public_key"]&.value; end

#rx_bytes ⇒ Integer

Returns:

  • (Integer)

See Also:



366
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 366

def rx_bytes; self[:"rx_bytes"]&.value; end

#tx_bytes ⇒ Integer

Returns:

  • (Integer)

See Also:



370
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 370

def tx_bytes; self[:"tx_bytes"]&.value; end