Class: Nl::Linux::NetShaper::AttributeSets::NetShaper

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

Defined Under Namespace

Classes: Attribute, Burst, BwMax, BwMin, Handle, Ifindex, Leaves, Metric, Parent, Priority, Weight

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:



255
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 255

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

.by_type(type) ⇒ Attribute

Looks up Attribute class by type value.

Parameters:

  • type (Integer)

Returns:



261
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 261

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

Instance Method Details

#burst ⇒ Integer

Maximum burst-size for shaping. Should not be interpreted as a quantum.

Returns:

  • (Integer)

See Also:



218
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 218

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

#bw_max ⇒ Integer

Maximum bandwidth for the given shaper or 0 when unlimited.

Returns:

  • (Integer)

See Also:



212
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 212

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

#bw_min ⇒ Integer

Guaranteed bandwidth for the given shaper.

Returns:

  • (Integer)

See Also:



207
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 207

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

#handle ⇒ AttributeSets::Handle

Unique identifier for the given shaper inside the owning device.

Returns:

See Also:



195
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 195

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

#ifindex ⇒ Integer

Interface index owning the specified shaper.

Returns:

  • (Integer)

See Also:



237
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 237

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

#leaves ⇒ Array<AttributeSets::LeafInfo>

Describes a set of leaves shapers for a group operation.

Returns:

See Also:



248
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 248

def leaves; self[:"leaves"].map(&:value); end

#metric ⇒ Integer

Metric used by the given shaper for bw-min, bw-max and burst.

Known enum values are defined in Enums::Metric.

Returns:

  • (Integer)

See Also:



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

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

#parent ⇒ AttributeSets::Handle

Identifier for the parent of the affected shaper. Only needed for group operation.

Returns:

See Also:



243
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 243

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

#priority ⇒ Integer

Scheduling priority for the given shaper. The priority scheduling is applied to sibling shapers.

Returns:

  • (Integer)

See Also:



224
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 224

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

#weight ⇒ Integer

Relative weight for round robin scheduling of the given shaper. The scheduling is applied to all sibling shapers with the same priority.

Returns:

  • (Integer)

See Also:



232
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 232

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