Class: Nl::Linux::Wireguard::AttributeSets::Wgdevice
- Inherits:
-
AttributeSet
- Object
- AttributeSet
- Nl::Linux::Wireguard::AttributeSets::Wgdevice
- 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
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
-
#flags ⇒ Integer
0orWGDEVICE_F_REPLACE_PEERSif all current peers should be removed prior to adding the list below. -
#fwmark ⇒ Integer
Set as
0to disable. - #ifindex ⇒ Integer
- #ifname ⇒ String
-
#listen_port ⇒ Integer
Set as
0to choose randomly. -
#peers ⇒ Array<AttributeSets::Wgpeer>
The index/type parameter is unused on
SET_DEVICEoperations and is zero onGET_DEVICEoperations. -
#private_key ⇒ String
Set to all zeros to remove.
- #public_key ⇒ String
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.
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.
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.
192 |
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 192 def flags; self[:"flags"]&.value; end |
#fwmark ⇒ Integer
Set as 0 to disable.
202 |
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 202 def fwmark; self[:"fwmark"]&.value; end |
#ifindex ⇒ Integer
170 |
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 170 def ifindex; self[:"ifindex"]&.value; end |
#ifname ⇒ String
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.
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.
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.
179 |
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 179 def private_key; self[:"private_key"]&.value; end |
#public_key ⇒ String
183 |
# File 'nl-linux/generated/nl/linux/wireguard.rb', line 183 def public_key; self[:"public_key"]&.value; end |