nl-linux 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/Rakefile +31 -5
  4. data/generated/nl/linux/binder.rb +96 -0
  5. data/generated/nl/linux/conntrack.rb +1227 -0
  6. data/generated/nl/linux/dev_energymodel.rb +235 -0
  7. data/generated/nl/linux/devlink.rb +5177 -0
  8. data/generated/nl/linux/dpll.rb +944 -0
  9. data/generated/nl/linux/ethtool.rb +7121 -0
  10. data/generated/nl/linux/fou.rb +332 -0
  11. data/generated/nl/linux/handshake.rb +238 -0
  12. data/generated/nl/linux/lockd.rb +99 -0
  13. data/generated/nl/linux/mptcp_pm.rb +607 -0
  14. data/generated/nl/linux/net_shaper.rb +731 -0
  15. data/generated/nl/linux/netdev.rb +1450 -0
  16. data/generated/nl/linux/nfsd.rb +500 -0
  17. data/generated/nl/linux/nftables.rb +2924 -0
  18. data/generated/nl/linux/nl80211.rb +3393 -0
  19. data/generated/nl/linux/nlctrl.rb +397 -0
  20. data/generated/nl/linux/ovpn.rb +964 -0
  21. data/generated/nl/linux/ovs_datapath.rb +321 -0
  22. data/generated/nl/linux/ovs_flow.rb +1447 -0
  23. data/generated/nl/linux/ovs_vport.rb +391 -0
  24. data/generated/nl/linux/psp.rb +463 -0
  25. data/generated/nl/linux/rt_addr.rb +448 -0
  26. data/generated/nl/linux/rt_link.rb +4613 -0
  27. data/generated/nl/linux/rt_neigh.rb +897 -0
  28. data/generated/nl/linux/rt_route.rb +1126 -0
  29. data/generated/nl/linux/rt_rule.rb +708 -0
  30. data/generated/nl/linux/tc.rb +7066 -0
  31. data/generated/nl/linux/tcp_metrics.rb +317 -0
  32. data/generated/nl/linux/team.rb +339 -0
  33. data/generated/nl/linux/wireguard.rb +430 -0
  34. data/generated/nl/linux.rb +35 -0
  35. data/lib/nl/linux/version.rb +1 -1
  36. data/lib/nl-linux.rb +1 -1
  37. metadata +37 -7
  38. data/lib/nl/linux.rb +0 -3
@@ -0,0 +1,731 @@
1
+ # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
2
+ #--
3
+ # frozen_string_literal: true
4
+ # rbs_inline: enabled
5
+ # This code is generated by Ynl::Generator. DO NOT EDIT.
6
+ require 'nl'
7
+ module Nl; module Linux
8
+ # Networking HW rate limiting configuration.
9
+ #
10
+ # This API allows configuring HW shapers available on the network
11
+ # devices at different levels (queues, network device) and allows
12
+ # arbitrary manipulation of the scheduling tree of the involved
13
+ # shapers.
14
+ #
15
+ # Each `shaper` is identified within the given device, by a `handle`,
16
+ # comprising both a `scope` and an `id.`
17
+ #
18
+ # Depending on the `scope` value, the shapers are attached to specific
19
+ # HW objects (queues, devices) or, for `node` scope, represent a
20
+ # scheduling group, that can be placed in an arbitrary location of
21
+ # the scheduling tree.
22
+ #
23
+ # Shapers can be created with two different operations: the `set`
24
+ # operation, to create and update a single "attached" shaper, and
25
+ # the `group` operation, to create and update a scheduling
26
+ # group. Only the `group` operation can create `node` scope shapers.
27
+ #
28
+ # Existing shapers can be deleted/reset via the `delete` operation.
29
+ #
30
+ # The user can query the running configuration via the `get` operation.
31
+ #
32
+ # Different devices can provide different feature sets, e.g. with no
33
+ # support for complex scheduling hierarchy, or for some shaping
34
+ # parameters. The user can introspect the HW capabilities via the
35
+ # `cap-get` operation.
36
+ class NetShaper < ::Nl::Family
37
+ NAME = "net-shaper"
38
+ PROTOCOL = Ractor.make_shareable(::Nl::Protocols::Genl.new("net-shaper"))
39
+ module Structs
40
+ end
41
+ module AttributeSets
42
+ class NetShaper < ::Nl::Protocols::Genl::AttributeSet
43
+ # Abstract class
44
+ class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
45
+ end
46
+ class Handle < Attribute
47
+ TYPE = 1
48
+ NAME = :"handle"
49
+ end
50
+ class Metric < Attribute
51
+ TYPE = 2
52
+ NAME = :"metric"
53
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
54
+ end
55
+ class BwMin < Attribute
56
+ TYPE = 3
57
+ NAME = :"bw_min"
58
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::UINT, check: nil)
59
+ end
60
+ class BwMax < Attribute
61
+ TYPE = 4
62
+ NAME = :"bw_max"
63
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::UINT, check: nil)
64
+ end
65
+ class Burst < Attribute
66
+ TYPE = 5
67
+ NAME = :"burst"
68
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::UINT, check: nil)
69
+ end
70
+ class Priority < Attribute
71
+ TYPE = 6
72
+ NAME = :"priority"
73
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
74
+ end
75
+ class Weight < Attribute
76
+ TYPE = 7
77
+ NAME = :"weight"
78
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
79
+ end
80
+ class Ifindex < Attribute
81
+ TYPE = 8
82
+ NAME = :"ifindex"
83
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
84
+ end
85
+ class Parent < Attribute
86
+ TYPE = 9
87
+ NAME = :"parent"
88
+ end
89
+ class Leaves < Attribute
90
+ TYPE = 10
91
+ NAME = :"leaves"
92
+ end
93
+ # :nodoc:
94
+ BY_NAME = Ractor.make_shareable({:"handle" => Handle, :"metric" => Metric, :"bw_min" => BwMin, :"bw_max" => BwMax, :"burst" => Burst, :"priority" => Priority, :"weight" => Weight, :"ifindex" => Ifindex, :"parent" => Parent, :"leaves" => Leaves}) #: Hash[::Symbol, Attribute]
95
+ # :nodoc:
96
+ BY_TYPE = Ractor.make_shareable({1 => Handle, 2 => Metric, 3 => BwMin, 4 => BwMax, 5 => Burst, 6 => Priority, 7 => Weight, 8 => Ifindex, 9 => Parent, 10 => Leaves}) #: Hash[::Integer, Attribute]
97
+ class << self
98
+ # Looks up Attribute class by name.
99
+ #--
100
+ # @rbs name: Symbol
101
+ # @rbs return: Attribute
102
+ def by_name(name); BY_NAME.fetch(name); end
103
+ # Looks up Attribute class by type value.
104
+ #--
105
+ # @rbs type: Integer
106
+ # @rbs return: Attribute
107
+ def by_type(type); BY_TYPE.fetch(type); end
108
+ end
109
+ end
110
+ class Handle < ::Nl::Protocols::Genl::AttributeSet
111
+ # Abstract class
112
+ class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
113
+ end
114
+ class Scope < Attribute
115
+ TYPE = 1
116
+ NAME = :"scope"
117
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
118
+ end
119
+ class Id < Attribute
120
+ TYPE = 2
121
+ NAME = :"id"
122
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
123
+ end
124
+ # :nodoc:
125
+ BY_NAME = Ractor.make_shareable({:"scope" => Scope, :"id" => Id}) #: Hash[::Symbol, Attribute]
126
+ # :nodoc:
127
+ BY_TYPE = Ractor.make_shareable({1 => Scope, 2 => Id}) #: Hash[::Integer, Attribute]
128
+ class << self
129
+ # Looks up Attribute class by name.
130
+ #--
131
+ # @rbs name: Symbol
132
+ # @rbs return: Attribute
133
+ def by_name(name); BY_NAME.fetch(name); end
134
+ # Looks up Attribute class by type value.
135
+ #--
136
+ # @rbs type: Integer
137
+ # @rbs return: Attribute
138
+ def by_type(type); BY_TYPE.fetch(type); end
139
+ end
140
+ end
141
+ class LeafInfo < ::Nl::Protocols::Genl::AttributeSet
142
+ # Abstract class
143
+ class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
144
+ end
145
+ class Handle < Attribute
146
+ TYPE = 1
147
+ NAME = :"handle"
148
+ end
149
+ class Priority < Attribute
150
+ TYPE = 6
151
+ NAME = :"priority"
152
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
153
+ end
154
+ class Weight < Attribute
155
+ TYPE = 7
156
+ NAME = :"weight"
157
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
158
+ end
159
+ # :nodoc:
160
+ BY_NAME = Ractor.make_shareable({:"handle" => Handle, :"priority" => Priority, :"weight" => Weight}) #: Hash[::Symbol, Attribute]
161
+ # :nodoc:
162
+ BY_TYPE = Ractor.make_shareable({1 => Handle, 6 => Priority, 7 => Weight}) #: Hash[::Integer, Attribute]
163
+ class << self
164
+ # Looks up Attribute class by name.
165
+ #--
166
+ # @rbs name: Symbol
167
+ # @rbs return: Attribute
168
+ def by_name(name); BY_NAME.fetch(name); end
169
+ # Looks up Attribute class by type value.
170
+ #--
171
+ # @rbs type: Integer
172
+ # @rbs return: Attribute
173
+ def by_type(type); BY_TYPE.fetch(type); end
174
+ end
175
+ end
176
+ class Caps < ::Nl::Protocols::Genl::AttributeSet
177
+ # Abstract class
178
+ class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
179
+ end
180
+ class Ifindex < Attribute
181
+ TYPE = 1
182
+ NAME = :"ifindex"
183
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
184
+ end
185
+ class Scope < Attribute
186
+ TYPE = 2
187
+ NAME = :"scope"
188
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
189
+ end
190
+ class SupportMetricBps < Attribute
191
+ TYPE = 3
192
+ NAME = :"support_metric_bps"
193
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
194
+ end
195
+ class SupportMetricPps < Attribute
196
+ TYPE = 4
197
+ NAME = :"support_metric_pps"
198
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
199
+ end
200
+ class SupportNesting < Attribute
201
+ TYPE = 5
202
+ NAME = :"support_nesting"
203
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
204
+ end
205
+ class SupportBwMin < Attribute
206
+ TYPE = 6
207
+ NAME = :"support_bw_min"
208
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
209
+ end
210
+ class SupportBwMax < Attribute
211
+ TYPE = 7
212
+ NAME = :"support_bw_max"
213
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
214
+ end
215
+ class SupportBurst < Attribute
216
+ TYPE = 8
217
+ NAME = :"support_burst"
218
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
219
+ end
220
+ class SupportPriority < Attribute
221
+ TYPE = 9
222
+ NAME = :"support_priority"
223
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
224
+ end
225
+ class SupportWeight < Attribute
226
+ TYPE = 10
227
+ NAME = :"support_weight"
228
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
229
+ end
230
+ # :nodoc:
231
+ BY_NAME = Ractor.make_shareable({:"ifindex" => Ifindex, :"scope" => Scope, :"support_metric_bps" => SupportMetricBps, :"support_metric_pps" => SupportMetricPps, :"support_nesting" => SupportNesting, :"support_bw_min" => SupportBwMin, :"support_bw_max" => SupportBwMax, :"support_burst" => SupportBurst, :"support_priority" => SupportPriority, :"support_weight" => SupportWeight}) #: Hash[::Symbol, Attribute]
232
+ # :nodoc:
233
+ BY_TYPE = Ractor.make_shareable({1 => Ifindex, 2 => Scope, 3 => SupportMetricBps, 4 => SupportMetricPps, 5 => SupportNesting, 6 => SupportBwMin, 7 => SupportBwMax, 8 => SupportBurst, 9 => SupportPriority, 10 => SupportWeight}) #: Hash[::Integer, Attribute]
234
+ class << self
235
+ # Looks up Attribute class by name.
236
+ #--
237
+ # @rbs name: Symbol
238
+ # @rbs return: Attribute
239
+ def by_name(name); BY_NAME.fetch(name); end
240
+ # Looks up Attribute class by type value.
241
+ #--
242
+ # @rbs type: Integer
243
+ # @rbs return: Attribute
244
+ def by_type(type); BY_TYPE.fetch(type); end
245
+ end
246
+ end
247
+ NetShaper::Handle::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(Handle)
248
+ NetShaper::Parent::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(Handle)
249
+ NetShaper::Leaves::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(LeafInfo)
250
+ LeafInfo::Handle::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(Handle)
251
+ end
252
+ module Messages
253
+ # Get information about a shaper for a given device.
254
+ class DoGetRequest < ::Nl::Protocols::Genl::Message
255
+ TYPE = 1
256
+ FIXED_HEADER = nil
257
+ ATTRIBUTE_SET = AttributeSets::NetShaper
258
+ ATTRIBUTES = Ractor.make_shareable(%i[handle ifindex])
259
+ # Gets the value of `handle` attribute in the message.
260
+ #--
261
+ # @rbs return: AttributeSets::Handle
262
+ def handle; attributes[:"handle"]&.value; end
263
+ # Gets the value of `ifindex` attribute in the message.
264
+ #--
265
+ # @rbs return: ::Integer
266
+ def ifindex; attributes[:"ifindex"]&.value; end
267
+ end
268
+ # Get information about a shaper for a given device.
269
+ class DoGetReply < ::Nl::Protocols::Genl::Message
270
+ TYPE = 1
271
+ FIXED_HEADER = nil
272
+ ATTRIBUTE_SET = AttributeSets::NetShaper
273
+ ATTRIBUTES = Ractor.make_shareable(%i[handle metric bw_min bw_max burst priority weight ifindex parent])
274
+ # Gets the value of `handle` attribute in the message.
275
+ #--
276
+ # @rbs return: AttributeSets::Handle
277
+ def handle; attributes[:"handle"]&.value; end
278
+ # Gets the value of `metric` attribute in the message.
279
+ #--
280
+ # @rbs return: ::Integer
281
+ def metric; attributes[:"metric"]&.value; end
282
+ # Gets the value of `bw-min` attribute in the message.
283
+ #--
284
+ # @rbs return: ::Integer
285
+ def bw_min; attributes[:"bw_min"]&.value; end
286
+ # Gets the value of `bw-max` attribute in the message.
287
+ #--
288
+ # @rbs return: ::Integer
289
+ def bw_max; attributes[:"bw_max"]&.value; end
290
+ # Gets the value of `burst` attribute in the message.
291
+ #--
292
+ # @rbs return: ::Integer
293
+ def burst; attributes[:"burst"]&.value; end
294
+ # Gets the value of `priority` attribute in the message.
295
+ #--
296
+ # @rbs return: ::Integer
297
+ def priority; attributes[:"priority"]&.value; end
298
+ # Gets the value of `weight` attribute in the message.
299
+ #--
300
+ # @rbs return: ::Integer
301
+ def weight; attributes[:"weight"]&.value; end
302
+ # Gets the value of `ifindex` attribute in the message.
303
+ #--
304
+ # @rbs return: ::Integer
305
+ def ifindex; attributes[:"ifindex"]&.value; end
306
+ # Gets the value of `parent` attribute in the message.
307
+ #--
308
+ # @rbs return: AttributeSets::Handle
309
+ def parent; attributes[:"parent"]&.value; end
310
+ end
311
+ # Get information about a shaper for a given device.
312
+ class DumpGetRequest < ::Nl::Protocols::Genl::Message
313
+ TYPE = 1
314
+ FIXED_HEADER = nil
315
+ ATTRIBUTE_SET = AttributeSets::NetShaper
316
+ ATTRIBUTES = Ractor.make_shareable(%i[ifindex])
317
+ # Gets the value of `ifindex` attribute in the message.
318
+ #--
319
+ # @rbs return: ::Integer
320
+ def ifindex; attributes[:"ifindex"]&.value; end
321
+ end
322
+ # Get information about a shaper for a given device.
323
+ class DumpGetReply < ::Nl::Protocols::Genl::Message
324
+ TYPE = 1
325
+ FIXED_HEADER = nil
326
+ ATTRIBUTE_SET = AttributeSets::NetShaper
327
+ ATTRIBUTES = Ractor.make_shareable(%i[handle metric bw_min bw_max burst priority weight ifindex parent])
328
+ # Gets the value of `handle` attribute in the message.
329
+ #--
330
+ # @rbs return: AttributeSets::Handle
331
+ def handle; attributes[:"handle"]&.value; end
332
+ # Gets the value of `metric` attribute in the message.
333
+ #--
334
+ # @rbs return: ::Integer
335
+ def metric; attributes[:"metric"]&.value; end
336
+ # Gets the value of `bw-min` attribute in the message.
337
+ #--
338
+ # @rbs return: ::Integer
339
+ def bw_min; attributes[:"bw_min"]&.value; end
340
+ # Gets the value of `bw-max` attribute in the message.
341
+ #--
342
+ # @rbs return: ::Integer
343
+ def bw_max; attributes[:"bw_max"]&.value; end
344
+ # Gets the value of `burst` attribute in the message.
345
+ #--
346
+ # @rbs return: ::Integer
347
+ def burst; attributes[:"burst"]&.value; end
348
+ # Gets the value of `priority` attribute in the message.
349
+ #--
350
+ # @rbs return: ::Integer
351
+ def priority; attributes[:"priority"]&.value; end
352
+ # Gets the value of `weight` attribute in the message.
353
+ #--
354
+ # @rbs return: ::Integer
355
+ def weight; attributes[:"weight"]&.value; end
356
+ # Gets the value of `ifindex` attribute in the message.
357
+ #--
358
+ # @rbs return: ::Integer
359
+ def ifindex; attributes[:"ifindex"]&.value; end
360
+ # Gets the value of `parent` attribute in the message.
361
+ #--
362
+ # @rbs return: AttributeSets::Handle
363
+ def parent; attributes[:"parent"]&.value; end
364
+ end
365
+ # Create or update the specified shaper.
366
+ # The set operation can't be used to create a `node` scope shaper,
367
+ # use the `group` operation instead.
368
+ class DoSetRequest < ::Nl::Protocols::Genl::Message
369
+ TYPE = 2
370
+ FIXED_HEADER = nil
371
+ ATTRIBUTE_SET = AttributeSets::NetShaper
372
+ ATTRIBUTES = Ractor.make_shareable(%i[handle metric bw_min bw_max burst priority weight ifindex])
373
+ # Gets the value of `handle` attribute in the message.
374
+ #--
375
+ # @rbs return: AttributeSets::Handle
376
+ def handle; attributes[:"handle"]&.value; end
377
+ # Gets the value of `metric` attribute in the message.
378
+ #--
379
+ # @rbs return: ::Integer
380
+ def metric; attributes[:"metric"]&.value; end
381
+ # Gets the value of `bw-min` attribute in the message.
382
+ #--
383
+ # @rbs return: ::Integer
384
+ def bw_min; attributes[:"bw_min"]&.value; end
385
+ # Gets the value of `bw-max` attribute in the message.
386
+ #--
387
+ # @rbs return: ::Integer
388
+ def bw_max; attributes[:"bw_max"]&.value; end
389
+ # Gets the value of `burst` attribute in the message.
390
+ #--
391
+ # @rbs return: ::Integer
392
+ def burst; attributes[:"burst"]&.value; end
393
+ # Gets the value of `priority` attribute in the message.
394
+ #--
395
+ # @rbs return: ::Integer
396
+ def priority; attributes[:"priority"]&.value; end
397
+ # Gets the value of `weight` attribute in the message.
398
+ #--
399
+ # @rbs return: ::Integer
400
+ def weight; attributes[:"weight"]&.value; end
401
+ # Gets the value of `ifindex` attribute in the message.
402
+ #--
403
+ # @rbs return: ::Integer
404
+ def ifindex; attributes[:"ifindex"]&.value; end
405
+ end
406
+ # Clear (remove) the specified shaper. When deleting
407
+ # a `node` shaper, reattach all the node's leaves to the
408
+ # deleted node's parent.
409
+ # If, after the removal, the parent shaper has no more
410
+ # leaves and the parent shaper scope is `node`, the parent
411
+ # node is deleted, recursively.
412
+ # When deleting a `queue` shaper or a `netdev` shaper,
413
+ # the shaper disappears from the hierarchy, but the
414
+ # queue/device can still send traffic: it has an implicit
415
+ # node with infinite bandwidth. The queue's implicit node
416
+ # feeds an implicit RR node at the root of the hierarchy.
417
+ class DoDeleteRequest < ::Nl::Protocols::Genl::Message
418
+ TYPE = 3
419
+ FIXED_HEADER = nil
420
+ ATTRIBUTE_SET = AttributeSets::NetShaper
421
+ ATTRIBUTES = Ractor.make_shareable(%i[handle ifindex])
422
+ # Gets the value of `handle` attribute in the message.
423
+ #--
424
+ # @rbs return: AttributeSets::Handle
425
+ def handle; attributes[:"handle"]&.value; end
426
+ # Gets the value of `ifindex` attribute in the message.
427
+ #--
428
+ # @rbs return: ::Integer
429
+ def ifindex; attributes[:"ifindex"]&.value; end
430
+ end
431
+ # Create or update a scheduling group, attaching the specified
432
+ # `leaves` shapers under the specified node identified by `handle.`
433
+ # The `leaves` shapers scope must be `queue` and the node shaper
434
+ # scope must be either `node` or `netdev.`
435
+ # When the node shaper has `node` scope, if the `handle` `id` is not
436
+ # specified, a new shaper of such scope is created, otherwise the
437
+ # specified node must already exist.
438
+ # When updating an existing node shaper, the specified `leaves` are
439
+ # added to the existing node; such node will also retain any preexisting
440
+ # leave.
441
+ # The `parent` handle for a new node shaper defaults to the parent
442
+ # of all the leaves, provided all the leaves share the same parent.
443
+ # Otherwise `parent` handle must be specified.
444
+ # The user can optionally provide shaping attributes for the node
445
+ # shaper.
446
+ # The operation is atomic, on failure no change is applied to
447
+ # the device shaping configuration, otherwise the `node` shaper
448
+ # full identifier, comprising `binding` and `handle`, is provided
449
+ # as the reply.
450
+ class DoGroupRequest < ::Nl::Protocols::Genl::Message
451
+ TYPE = 4
452
+ FIXED_HEADER = nil
453
+ ATTRIBUTE_SET = AttributeSets::NetShaper
454
+ ATTRIBUTES = Ractor.make_shareable(%i[handle metric bw_min bw_max burst priority weight ifindex parent leaves])
455
+ # Gets the value of `handle` attribute in the message.
456
+ #--
457
+ # @rbs return: AttributeSets::Handle
458
+ def handle; attributes[:"handle"]&.value; end
459
+ # Gets the value of `metric` attribute in the message.
460
+ #--
461
+ # @rbs return: ::Integer
462
+ def metric; attributes[:"metric"]&.value; end
463
+ # Gets the value of `bw-min` attribute in the message.
464
+ #--
465
+ # @rbs return: ::Integer
466
+ def bw_min; attributes[:"bw_min"]&.value; end
467
+ # Gets the value of `bw-max` attribute in the message.
468
+ #--
469
+ # @rbs return: ::Integer
470
+ def bw_max; attributes[:"bw_max"]&.value; end
471
+ # Gets the value of `burst` attribute in the message.
472
+ #--
473
+ # @rbs return: ::Integer
474
+ def burst; attributes[:"burst"]&.value; end
475
+ # Gets the value of `priority` attribute in the message.
476
+ #--
477
+ # @rbs return: ::Integer
478
+ def priority; attributes[:"priority"]&.value; end
479
+ # Gets the value of `weight` attribute in the message.
480
+ #--
481
+ # @rbs return: ::Integer
482
+ def weight; attributes[:"weight"]&.value; end
483
+ # Gets the value of `ifindex` attribute in the message.
484
+ #--
485
+ # @rbs return: ::Integer
486
+ def ifindex; attributes[:"ifindex"]&.value; end
487
+ # Gets the value of `parent` attribute in the message.
488
+ #--
489
+ # @rbs return: AttributeSets::Handle
490
+ def parent; attributes[:"parent"]&.value; end
491
+ # Gets the value of `leaves` attribute in the message.
492
+ #--
493
+ # @rbs return: AttributeSets::LeafInfo
494
+ def leaves; attributes[:"leaves"]&.value; end
495
+ end
496
+ # Create or update a scheduling group, attaching the specified
497
+ # `leaves` shapers under the specified node identified by `handle.`
498
+ # The `leaves` shapers scope must be `queue` and the node shaper
499
+ # scope must be either `node` or `netdev.`
500
+ # When the node shaper has `node` scope, if the `handle` `id` is not
501
+ # specified, a new shaper of such scope is created, otherwise the
502
+ # specified node must already exist.
503
+ # When updating an existing node shaper, the specified `leaves` are
504
+ # added to the existing node; such node will also retain any preexisting
505
+ # leave.
506
+ # The `parent` handle for a new node shaper defaults to the parent
507
+ # of all the leaves, provided all the leaves share the same parent.
508
+ # Otherwise `parent` handle must be specified.
509
+ # The user can optionally provide shaping attributes for the node
510
+ # shaper.
511
+ # The operation is atomic, on failure no change is applied to
512
+ # the device shaping configuration, otherwise the `node` shaper
513
+ # full identifier, comprising `binding` and `handle`, is provided
514
+ # as the reply.
515
+ class DoGroupReply < ::Nl::Protocols::Genl::Message
516
+ TYPE = 4
517
+ FIXED_HEADER = nil
518
+ ATTRIBUTE_SET = AttributeSets::NetShaper
519
+ ATTRIBUTES = Ractor.make_shareable(%i[handle ifindex])
520
+ # Gets the value of `handle` attribute in the message.
521
+ #--
522
+ # @rbs return: AttributeSets::Handle
523
+ def handle; attributes[:"handle"]&.value; end
524
+ # Gets the value of `ifindex` attribute in the message.
525
+ #--
526
+ # @rbs return: ::Integer
527
+ def ifindex; attributes[:"ifindex"]&.value; end
528
+ end
529
+ # Get the shaper capabilities supported by the given device
530
+ # for the specified scope.
531
+ class DoCapGetRequest < ::Nl::Protocols::Genl::Message
532
+ TYPE = 5
533
+ FIXED_HEADER = nil
534
+ ATTRIBUTE_SET = AttributeSets::Caps
535
+ ATTRIBUTES = Ractor.make_shareable(%i[ifindex scope])
536
+ # Gets the value of `ifindex` attribute in the message.
537
+ #--
538
+ # @rbs return: ::Integer
539
+ def ifindex; attributes[:"ifindex"]&.value; end
540
+ # Gets the value of `scope` attribute in the message.
541
+ #--
542
+ # @rbs return: ::Integer
543
+ def scope; attributes[:"scope"]&.value; end
544
+ end
545
+ # Get the shaper capabilities supported by the given device
546
+ # for the specified scope.
547
+ class DoCapGetReply < ::Nl::Protocols::Genl::Message
548
+ TYPE = 5
549
+ FIXED_HEADER = nil
550
+ ATTRIBUTE_SET = AttributeSets::Caps
551
+ ATTRIBUTES = Ractor.make_shareable(%i[ifindex scope support_metric_bps support_metric_pps support_nesting support_bw_min support_bw_max support_burst support_priority support_weight])
552
+ # Gets the value of `ifindex` attribute in the message.
553
+ #--
554
+ # @rbs return: ::Integer
555
+ def ifindex; attributes[:"ifindex"]&.value; end
556
+ # Gets the value of `scope` attribute in the message.
557
+ #--
558
+ # @rbs return: ::Integer
559
+ def scope; attributes[:"scope"]&.value; end
560
+ # Gets the value of `support-metric-bps` attribute in the message.
561
+ #--
562
+ # @rbs return: ::Integer
563
+ def support_metric_bps; attributes[:"support_metric_bps"]&.value; end
564
+ # Gets the value of `support-metric-pps` attribute in the message.
565
+ #--
566
+ # @rbs return: ::Integer
567
+ def support_metric_pps; attributes[:"support_metric_pps"]&.value; end
568
+ # Gets the value of `support-nesting` attribute in the message.
569
+ #--
570
+ # @rbs return: ::Integer
571
+ def support_nesting; attributes[:"support_nesting"]&.value; end
572
+ # Gets the value of `support-bw-min` attribute in the message.
573
+ #--
574
+ # @rbs return: ::Integer
575
+ def support_bw_min; attributes[:"support_bw_min"]&.value; end
576
+ # Gets the value of `support-bw-max` attribute in the message.
577
+ #--
578
+ # @rbs return: ::Integer
579
+ def support_bw_max; attributes[:"support_bw_max"]&.value; end
580
+ # Gets the value of `support-burst` attribute in the message.
581
+ #--
582
+ # @rbs return: ::Integer
583
+ def support_burst; attributes[:"support_burst"]&.value; end
584
+ # Gets the value of `support-priority` attribute in the message.
585
+ #--
586
+ # @rbs return: ::Integer
587
+ def support_priority; attributes[:"support_priority"]&.value; end
588
+ # Gets the value of `support-weight` attribute in the message.
589
+ #--
590
+ # @rbs return: ::Integer
591
+ def support_weight; attributes[:"support_weight"]&.value; end
592
+ end
593
+ # Get the shaper capabilities supported by the given device
594
+ # for the specified scope.
595
+ class DumpCapGetRequest < ::Nl::Protocols::Genl::Message
596
+ TYPE = 5
597
+ FIXED_HEADER = nil
598
+ ATTRIBUTE_SET = AttributeSets::Caps
599
+ ATTRIBUTES = Ractor.make_shareable(%i[ifindex])
600
+ # Gets the value of `ifindex` attribute in the message.
601
+ #--
602
+ # @rbs return: ::Integer
603
+ def ifindex; attributes[:"ifindex"]&.value; end
604
+ end
605
+ # Get the shaper capabilities supported by the given device
606
+ # for the specified scope.
607
+ class DumpCapGetReply < ::Nl::Protocols::Genl::Message
608
+ TYPE = 5
609
+ FIXED_HEADER = nil
610
+ ATTRIBUTE_SET = AttributeSets::Caps
611
+ ATTRIBUTES = Ractor.make_shareable(%i[ifindex scope support_metric_bps support_metric_pps support_nesting support_bw_min support_bw_max support_burst support_priority support_weight])
612
+ # Gets the value of `ifindex` attribute in the message.
613
+ #--
614
+ # @rbs return: ::Integer
615
+ def ifindex; attributes[:"ifindex"]&.value; end
616
+ # Gets the value of `scope` attribute in the message.
617
+ #--
618
+ # @rbs return: ::Integer
619
+ def scope; attributes[:"scope"]&.value; end
620
+ # Gets the value of `support-metric-bps` attribute in the message.
621
+ #--
622
+ # @rbs return: ::Integer
623
+ def support_metric_bps; attributes[:"support_metric_bps"]&.value; end
624
+ # Gets the value of `support-metric-pps` attribute in the message.
625
+ #--
626
+ # @rbs return: ::Integer
627
+ def support_metric_pps; attributes[:"support_metric_pps"]&.value; end
628
+ # Gets the value of `support-nesting` attribute in the message.
629
+ #--
630
+ # @rbs return: ::Integer
631
+ def support_nesting; attributes[:"support_nesting"]&.value; end
632
+ # Gets the value of `support-bw-min` attribute in the message.
633
+ #--
634
+ # @rbs return: ::Integer
635
+ def support_bw_min; attributes[:"support_bw_min"]&.value; end
636
+ # Gets the value of `support-bw-max` attribute in the message.
637
+ #--
638
+ # @rbs return: ::Integer
639
+ def support_bw_max; attributes[:"support_bw_max"]&.value; end
640
+ # Gets the value of `support-burst` attribute in the message.
641
+ #--
642
+ # @rbs return: ::Integer
643
+ def support_burst; attributes[:"support_burst"]&.value; end
644
+ # Gets the value of `support-priority` attribute in the message.
645
+ #--
646
+ # @rbs return: ::Integer
647
+ def support_priority; attributes[:"support_priority"]&.value; end
648
+ # Gets the value of `support-weight` attribute in the message.
649
+ #--
650
+ # @rbs return: ::Integer
651
+ def support_weight; attributes[:"support_weight"]&.value; end
652
+ end
653
+ end
654
+ # Get information about a shaper for a given device.
655
+ #--
656
+ # @rbs (?handle: AttributeSets::Handle, ?ifindex: ::Integer) -> Messages::DoGetReply
657
+ def do_get(**args)
658
+ exchange_message(:"do", Messages::DoGetRequest, Messages::DoGetReply, args)
659
+ end
660
+ # Get information about a shaper for a given device.
661
+ #--
662
+ # @rbs (?ifindex: ::Integer) -> Enumerable[Messages::DumpGetReply]
663
+ # | (?ifindex: ::Integer) { (Messages::DumpGetReply) -> void } -> void
664
+ def dump_get(**args, &block)
665
+ exchange_message(:"dump", Messages::DumpGetRequest, Messages::DumpGetReply, args, &block)
666
+ end
667
+ # Create or update the specified shaper.
668
+ # The set operation can't be used to create a `node` scope shaper,
669
+ # use the `group` operation instead.
670
+ #--
671
+ # @rbs (?handle: AttributeSets::Handle, ?metric: ::Integer, ?bw_min: ::Integer, ?bw_max: ::Integer, ?burst: ::Integer, ?priority: ::Integer, ?weight: ::Integer, ?ifindex: ::Integer) -> void
672
+ def do_set(**args)
673
+ exchange_message(:"do", Messages::DoSetRequest, nil, args)
674
+ end
675
+ # Clear (remove) the specified shaper. When deleting
676
+ # a `node` shaper, reattach all the node's leaves to the
677
+ # deleted node's parent.
678
+ # If, after the removal, the parent shaper has no more
679
+ # leaves and the parent shaper scope is `node`, the parent
680
+ # node is deleted, recursively.
681
+ # When deleting a `queue` shaper or a `netdev` shaper,
682
+ # the shaper disappears from the hierarchy, but the
683
+ # queue/device can still send traffic: it has an implicit
684
+ # node with infinite bandwidth. The queue's implicit node
685
+ # feeds an implicit RR node at the root of the hierarchy.
686
+ #--
687
+ # @rbs (?handle: AttributeSets::Handle, ?ifindex: ::Integer) -> void
688
+ def do_delete(**args)
689
+ exchange_message(:"do", Messages::DoDeleteRequest, nil, args)
690
+ end
691
+ # Create or update a scheduling group, attaching the specified
692
+ # `leaves` shapers under the specified node identified by `handle.`
693
+ # The `leaves` shapers scope must be `queue` and the node shaper
694
+ # scope must be either `node` or `netdev.`
695
+ # When the node shaper has `node` scope, if the `handle` `id` is not
696
+ # specified, a new shaper of such scope is created, otherwise the
697
+ # specified node must already exist.
698
+ # When updating an existing node shaper, the specified `leaves` are
699
+ # added to the existing node; such node will also retain any preexisting
700
+ # leave.
701
+ # The `parent` handle for a new node shaper defaults to the parent
702
+ # of all the leaves, provided all the leaves share the same parent.
703
+ # Otherwise `parent` handle must be specified.
704
+ # The user can optionally provide shaping attributes for the node
705
+ # shaper.
706
+ # The operation is atomic, on failure no change is applied to
707
+ # the device shaping configuration, otherwise the `node` shaper
708
+ # full identifier, comprising `binding` and `handle`, is provided
709
+ # as the reply.
710
+ #--
711
+ # @rbs (?handle: AttributeSets::Handle, ?metric: ::Integer, ?bw_min: ::Integer, ?bw_max: ::Integer, ?burst: ::Integer, ?priority: ::Integer, ?weight: ::Integer, ?ifindex: ::Integer, ?parent: AttributeSets::Handle, ?leaves: AttributeSets::LeafInfo) -> Messages::DoGroupReply
712
+ def do_group(**args)
713
+ exchange_message(:"do", Messages::DoGroupRequest, Messages::DoGroupReply, args)
714
+ end
715
+ # Get the shaper capabilities supported by the given device
716
+ # for the specified scope.
717
+ #--
718
+ # @rbs (?ifindex: ::Integer, ?scope: ::Integer) -> Messages::DoCapGetReply
719
+ def do_cap_get(**args)
720
+ exchange_message(:"do", Messages::DoCapGetRequest, Messages::DoCapGetReply, args)
721
+ end
722
+ # Get the shaper capabilities supported by the given device
723
+ # for the specified scope.
724
+ #--
725
+ # @rbs (?ifindex: ::Integer) -> Enumerable[Messages::DumpCapGetReply]
726
+ # | (?ifindex: ::Integer) { (Messages::DumpCapGetReply) -> void } -> void
727
+ def dump_cap_get(**args, &block)
728
+ exchange_message(:"dump", Messages::DumpCapGetRequest, Messages::DumpCapGetReply, args, &block)
729
+ end
730
+ end
731
+ end; end