Class: Nl::Linux::Nftables::AttributeSets::ExprBitwiseAttrs

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

Overview

The bitwise expression supports boolean and shift operations. It implements the boolean operations by performing the following

operation
dreg = (sreg & mask) ^ xor

with these mask and xor values:

op      mask    xor
----    ----    ---
NOT:     1       1
OR:     ~x       x
XOR:     1       x
AND:     x       0

Defined Under Namespace

Classes: Attribute, Data, Dreg, Len, Mask, Op, Sreg, Xor

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:



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

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

.by_type(type) ⇒ Attribute

Looks up Attribute class by type value.

Parameters:

  • type (Integer)

Returns:



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

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

Instance Method Details

#data ⇒ AttributeSets::DataAttrs

Returns:

See Also:



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

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

#dreg ⇒ Integer

Returns:

  • (Integer)

See Also:



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

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

#len ⇒ Integer

Returns:

  • (Integer)

See Also:



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

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

#mask ⇒ AttributeSets::DataAttrs

Returns:

See Also:



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

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

#op ⇒ Integer

Known enum values are defined in Enums::BitwiseOps.

Returns:

  • (Integer)

See Also:



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

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

#sreg ⇒ Integer

Returns:

  • (Integer)

See Also:



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

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

#xor ⇒ AttributeSets::DataAttrs

Returns:

See Also:



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

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