Class: Nl::Linux::Wireguard::AttributeSets::Wgallowedip

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

Defined Under Namespace

Classes: Attribute, CidrMask, Family, Flags, Ipaddr

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:



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

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

.by_type(type) ⇒ Attribute

Looks up Attribute class by type value.

Parameters:

  • type (Integer)

Returns:



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

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

Instance Method Details

#cidr_mask ⇒ Integer

Returns:

  • (Integer)

See Also:



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

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

#family ⇒ Integer

IP family, either AF_INET or AF_INET6.

Returns:

  • (Integer)

See Also:



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

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

#flags ⇒ Integer

WGALLOWEDIP_F_REMOVE_ME if the specified IP should be removed; otherwise, this IP will be added if it is not already present.

Known flags are defined in Flags::WgallowedipFlags.

Returns:

  • (Integer)

See Also:



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

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

#ipaddr ⇒ String

Either struct in_addr or struct in6_addr.

Returns:

  • (String)

See Also:



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

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