Class: Nl::Linux::NetShaper::Messages::DoSetRequest

Inherits:
Genl::Message show all
Defined in:
nl-linux/generated/nl/linux/net_shaper.rb

Overview

Create or update the specified shaper. The set operation can't be used to create a node scope shaper, use the group operation instead.

Requires CAP_NET_ADMIN in the initial user namespace.

Constant Summary collapse

TYPE =
2
FIXED_HEADER =
nil
ATTRIBUTE_SET =
AttributeSets::NetShaper
ATTRIBUTES =
Ractor.make_shareable(%i[handle metric bw_min bw_max burst priority weight ifindex])

Instance Attribute Summary

Attributes included from StructuredPayload

#attributes, #fixed_header

Instance Method Summary collapse

Methods inherited from Genl::Message

decode

Methods inherited from Raw::Message

#append_attribute, decode, #initialize

Methods included from StructuredPayload

#encode, #initialize

Constructor Details

This class inherits a constructor from Nl::Raw::Message

Instance Method Details

#burst ⇒ Integer

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

Returns:

  • (Integer)

See Also:



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

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

#bw_max ⇒ Integer

Maximum bandwidth for the given shaper or 0 when unlimited.

Returns:

  • (Integer)

See Also:



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

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

#bw_min ⇒ Integer

Guaranteed bandwidth for the given shaper.

Returns:

  • (Integer)

See Also:



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

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

#handle ⇒ AttributeSets::Handle

Unique identifier for the given shaper inside the owning device.



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

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

#ifindex ⇒ Integer

Interface index owning the specified shaper.

Returns:

  • (Integer)

See Also:



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

def ifindex; attributes[:"ifindex"]&.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:



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

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

#priority ⇒ Integer

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

Returns:

  • (Integer)

See Also:



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

def priority; attributes[:"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:



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

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