Class: Nl::Linux::Wireguard::AttributeSets::Wgdevice

Inherits:
AttributeSet
  • Object
show all
Defined in:
nl-linux/generated/nl/linux/wireguard.rb

Defined Under Namespace

Classes: Attribute, Flags, Fwmark, Ifindex, Ifname, ListenPort, Peers, PrivateKey, PublicKey

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:



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

def by_name(name); BY_NAME.fetch(name); end

.by_type(type) ⇒ Attribute

Looks up Attribute class by type value.

Parameters:

  • type (Integer)

Returns:



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

def by_type(type); BY_TYPE.fetch(type); end

Instance Method Details

#flags ⇒ Integer

0 or WGDEVICE_F_REPLACE_PEERS if all current peers should be removed prior to adding the list below.

Known flags are defined in Flags::WgdeviceFlags.

Returns:

  • (Integer)

See Also:



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

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

#fwmark ⇒ Integer

Set as 0 to disable.

Returns:

  • (Integer)

See Also:



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

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

#ifindex ⇒ Integer

Returns:

  • (Integer)

See Also:



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

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

#ifname ⇒ String

Returns:

  • (String)

See Also:



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

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

#listen_port ⇒ Integer

Set as 0 to choose randomly.

Returns:

  • (Integer)

See Also:



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

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

#peers ⇒ Array<AttributeSets::Wgpeer>

The index/type parameter is unused on SET_DEVICE operations and is zero on GET_DEVICE operations.

Returns:

See Also:



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

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

#private_key ⇒ String

Set to all zeros to remove.

Returns:

  • (String)

See Also:



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

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

#public_key ⇒ String

Returns:

  • (String)

See Also:



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

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