Class: Nl::Linux::Nftables::AttributeSets::NumgenAttrs

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

Overview

nf_tables number generator expression netlink attributes

Defined Under Namespace

Classes: Attribute, Dreg, Modulus, Offset, Type

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:



519
# File 'nl-linux/generated/nl/linux/nftables.rb', line 519

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

.by_type(type) ⇒ Attribute

Looks up Attribute class by type value.

Parameters:

  • type (Integer)

Returns:



525
# File 'nl-linux/generated/nl/linux/nftables.rb', line 525

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

Instance Method Details

#dreg ⇒ Integer

destination register

Known enum values are defined in Enums::Registers.

Returns:

  • (Integer)

See Also:



495
# File 'nl-linux/generated/nl/linux/nftables.rb', line 495

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

#modulus ⇒ Integer

maximum counter value

Returns:

  • (Integer)

See Also:



500
# File 'nl-linux/generated/nl/linux/nftables.rb', line 500

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

#offset ⇒ Integer

offset to be added to the counter

Returns:

  • (Integer)

See Also:



512
# File 'nl-linux/generated/nl/linux/nftables.rb', line 512

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

#type ⇒ Integer

operation type

Known enum values are defined in Enums::NumgenTypes.

Returns:

  • (Integer)

See Also:



507
# File 'nl-linux/generated/nl/linux/nftables.rb', line 507

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