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,708 @@
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
+ # FIB rule management over rtnetlink.
9
+ class RtRule < ::Nl::Family
10
+ NAME = "rt-rule"
11
+ PROTOCOL = Ractor.make_shareable(::Nl::Protocols::Raw.new("rt-rule", 0))
12
+ module Structs
13
+ Rtgenmsg = Struct.new(
14
+ :"family", #: ::Integer
15
+ :"pad", #: nil
16
+ )
17
+ class Rtgenmsg
18
+ # :nodoc:
19
+ MEMBERS = Ractor.make_shareable({family: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), pad: ::Nl::Protocols::Raw::DataTypes::Pad.new(3)}) #: Hash[::Symbol, ::Nl::_DataType]
20
+ # Decodes the struct.
21
+ #--
22
+ # @rbs decoder: ::Nl::Decoder
23
+ # @rbs return: instance
24
+ def self.decode(decoder)
25
+ self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
26
+ end
27
+ # Encodes the struct.
28
+ #--
29
+ # @rbs encoder: ::Nl::Encoder
30
+ # @rbs return: void
31
+ def encode(encoder)
32
+ MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
33
+ end
34
+ end
35
+ FibRuleHdr = Struct.new(
36
+ :"family", #: ::Integer
37
+ :"dst_len", #: ::Integer
38
+ :"src_len", #: ::Integer
39
+ :"tos", #: ::Integer
40
+ :"table", #: ::Integer
41
+ :"res1", #: nil
42
+ :"res2", #: nil
43
+ :"action", #: ::Integer
44
+ :"flags", #: ::Integer
45
+ )
46
+ class FibRuleHdr
47
+ # :nodoc:
48
+ MEMBERS = Ractor.make_shareable({family: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), dst_len: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), src_len: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), tos: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), table: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), res1: ::Nl::Protocols::Raw::DataTypes::Pad.new(1), res2: ::Nl::Protocols::Raw::DataTypes::Pad.new(1), action: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), flags: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
49
+ # Decodes the struct.
50
+ #--
51
+ # @rbs decoder: ::Nl::Decoder
52
+ # @rbs return: instance
53
+ def self.decode(decoder)
54
+ self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
55
+ end
56
+ # Encodes the struct.
57
+ #--
58
+ # @rbs encoder: ::Nl::Encoder
59
+ # @rbs return: void
60
+ def encode(encoder)
61
+ MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
62
+ end
63
+ end
64
+ FibRulePortRange = Struct.new(
65
+ :"start", #: ::Integer
66
+ :"end", #: ::Integer
67
+ )
68
+ class FibRulePortRange
69
+ # :nodoc:
70
+ MEMBERS = Ractor.make_shareable({start: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil), end: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
71
+ # Decodes the struct.
72
+ #--
73
+ # @rbs decoder: ::Nl::Decoder
74
+ # @rbs return: instance
75
+ def self.decode(decoder)
76
+ self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
77
+ end
78
+ # Encodes the struct.
79
+ #--
80
+ # @rbs encoder: ::Nl::Encoder
81
+ # @rbs return: void
82
+ def encode(encoder)
83
+ MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
84
+ end
85
+ end
86
+ FibRuleUidRange = Struct.new(
87
+ :"start", #: ::Integer
88
+ :"end", #: ::Integer
89
+ )
90
+ class FibRuleUidRange
91
+ # :nodoc:
92
+ MEMBERS = Ractor.make_shareable({start: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil), end: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
93
+ # Decodes the struct.
94
+ #--
95
+ # @rbs decoder: ::Nl::Decoder
96
+ # @rbs return: instance
97
+ def self.decode(decoder)
98
+ self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
99
+ end
100
+ # Encodes the struct.
101
+ #--
102
+ # @rbs encoder: ::Nl::Encoder
103
+ # @rbs return: void
104
+ def encode(encoder)
105
+ MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
106
+ end
107
+ end
108
+ end
109
+ module AttributeSets
110
+ class FibRuleAttrs < ::Nl::Protocols::Raw::AttributeSet
111
+ # Abstract class
112
+ class Attribute < ::Nl::Protocols::Raw::AttributeSet::Attribute
113
+ end
114
+ class Dst < Attribute
115
+ TYPE = 1
116
+ NAME = :"dst"
117
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
118
+ end
119
+ class Src < Attribute
120
+ TYPE = 2
121
+ NAME = :"src"
122
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
123
+ end
124
+ class Iifname < Attribute
125
+ TYPE = 3
126
+ NAME = :"iifname"
127
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::String.new(check: nil)
128
+ end
129
+ class Goto < Attribute
130
+ TYPE = 4
131
+ NAME = :"goto"
132
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
133
+ end
134
+ class Unused2 < Attribute
135
+ TYPE = 5
136
+ NAME = :"unused2"
137
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Pad.new()
138
+ end
139
+ class Priority < Attribute
140
+ TYPE = 6
141
+ NAME = :"priority"
142
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
143
+ end
144
+ class Unused3 < Attribute
145
+ TYPE = 7
146
+ NAME = :"unused3"
147
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Pad.new()
148
+ end
149
+ class Unused4 < Attribute
150
+ TYPE = 8
151
+ NAME = :"unused4"
152
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Pad.new()
153
+ end
154
+ class Unused5 < Attribute
155
+ TYPE = 9
156
+ NAME = :"unused5"
157
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Pad.new()
158
+ end
159
+ class Fwmark < Attribute
160
+ TYPE = 10
161
+ NAME = :"fwmark"
162
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
163
+ end
164
+ class Flow < Attribute
165
+ TYPE = 11
166
+ NAME = :"flow"
167
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
168
+ end
169
+ class TunId < Attribute
170
+ TYPE = 12
171
+ NAME = :"tun_id"
172
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
173
+ end
174
+ class SuppressIfgroup < Attribute
175
+ TYPE = 13
176
+ NAME = :"suppress_ifgroup"
177
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
178
+ end
179
+ class SuppressPrefixlen < Attribute
180
+ TYPE = 14
181
+ NAME = :"suppress_prefixlen"
182
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
183
+ end
184
+ class Table < Attribute
185
+ TYPE = 15
186
+ NAME = :"table"
187
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
188
+ end
189
+ class Fwmask < Attribute
190
+ TYPE = 16
191
+ NAME = :"fwmask"
192
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
193
+ end
194
+ class Oifname < Attribute
195
+ TYPE = 17
196
+ NAME = :"oifname"
197
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::String.new(check: nil)
198
+ end
199
+ class Pad < Attribute
200
+ TYPE = 18
201
+ NAME = :"pad"
202
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Pad.new()
203
+ end
204
+ class L3mdev < Attribute
205
+ TYPE = 19
206
+ NAME = :"l3mdev"
207
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
208
+ end
209
+ class UidRange < Attribute
210
+ TYPE = 20
211
+ NAME = :"uid_range"
212
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
213
+ end
214
+ class Protocol < Attribute
215
+ TYPE = 21
216
+ NAME = :"protocol"
217
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
218
+ end
219
+ class IpProto < Attribute
220
+ TYPE = 22
221
+ NAME = :"ip_proto"
222
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
223
+ end
224
+ class SportRange < Attribute
225
+ TYPE = 23
226
+ NAME = :"sport_range"
227
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
228
+ end
229
+ class DportRange < Attribute
230
+ TYPE = 24
231
+ NAME = :"dport_range"
232
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
233
+ end
234
+ class Dscp < Attribute
235
+ TYPE = 25
236
+ NAME = :"dscp"
237
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
238
+ end
239
+ class Flowlabel < Attribute
240
+ TYPE = 26
241
+ NAME = :"flowlabel"
242
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)
243
+ end
244
+ class FlowlabelMask < Attribute
245
+ TYPE = 27
246
+ NAME = :"flowlabel_mask"
247
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)
248
+ end
249
+ class SportMask < Attribute
250
+ TYPE = 28
251
+ NAME = :"sport_mask"
252
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
253
+ end
254
+ class DportMask < Attribute
255
+ TYPE = 29
256
+ NAME = :"dport_mask"
257
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
258
+ end
259
+ class DscpMask < Attribute
260
+ TYPE = 30
261
+ NAME = :"dscp_mask"
262
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
263
+ end
264
+ # :nodoc:
265
+ BY_NAME = Ractor.make_shareable({:"dst" => Dst, :"src" => Src, :"iifname" => Iifname, :"goto" => Goto, :"unused2" => Unused2, :"priority" => Priority, :"unused3" => Unused3, :"unused4" => Unused4, :"unused5" => Unused5, :"fwmark" => Fwmark, :"flow" => Flow, :"tun_id" => TunId, :"suppress_ifgroup" => SuppressIfgroup, :"suppress_prefixlen" => SuppressPrefixlen, :"table" => Table, :"fwmask" => Fwmask, :"oifname" => Oifname, :"pad" => Pad, :"l3mdev" => L3mdev, :"uid_range" => UidRange, :"protocol" => Protocol, :"ip_proto" => IpProto, :"sport_range" => SportRange, :"dport_range" => DportRange, :"dscp" => Dscp, :"flowlabel" => Flowlabel, :"flowlabel_mask" => FlowlabelMask, :"sport_mask" => SportMask, :"dport_mask" => DportMask, :"dscp_mask" => DscpMask}) #: Hash[::Symbol, Attribute]
266
+ # :nodoc:
267
+ BY_TYPE = Ractor.make_shareable({1 => Dst, 2 => Src, 3 => Iifname, 4 => Goto, 5 => Unused2, 6 => Priority, 7 => Unused3, 8 => Unused4, 9 => Unused5, 10 => Fwmark, 11 => Flow, 12 => TunId, 13 => SuppressIfgroup, 14 => SuppressPrefixlen, 15 => Table, 16 => Fwmask, 17 => Oifname, 18 => Pad, 19 => L3mdev, 20 => UidRange, 21 => Protocol, 22 => IpProto, 23 => SportRange, 24 => DportRange, 25 => Dscp, 26 => Flowlabel, 27 => FlowlabelMask, 28 => SportMask, 29 => DportMask, 30 => DscpMask}) #: Hash[::Integer, Attribute]
268
+ class << self
269
+ # Looks up Attribute class by name.
270
+ #--
271
+ # @rbs name: Symbol
272
+ # @rbs return: Attribute
273
+ def by_name(name); BY_NAME.fetch(name); end
274
+ # Looks up Attribute class by type value.
275
+ #--
276
+ # @rbs type: Integer
277
+ # @rbs return: Attribute
278
+ def by_type(type); BY_TYPE.fetch(type); end
279
+ end
280
+ end
281
+ end
282
+ module Messages
283
+ # Add new FIB rule
284
+ class DoNewruleRequest < ::Nl::Protocols::Raw::Message
285
+ TYPE = 32
286
+ FIXED_HEADER = Structs::FibRuleHdr
287
+ ATTRIBUTE_SET = AttributeSets::FibRuleAttrs
288
+ ATTRIBUTES = Ractor.make_shareable(%i[iifname goto priority fwmark flow tun_id suppress_ifgroup suppress_prefixlen table fwmask oifname l3mdev uid_range protocol ip_proto sport_range dport_range dscp flowlabel flowlabel_mask sport_mask dport_mask dscp_mask])
289
+ # Gets the value of `family` field in the message's fixed header.
290
+ #--
291
+ # @rbs return: ::Integer
292
+ def family; fixed_header.family; end
293
+ # Gets the value of `dst-len` field in the message's fixed header.
294
+ #--
295
+ # @rbs return: ::Integer
296
+ def dst_len; fixed_header.dst_len; end
297
+ # Gets the value of `src-len` field in the message's fixed header.
298
+ #--
299
+ # @rbs return: ::Integer
300
+ def src_len; fixed_header.src_len; end
301
+ # Gets the value of `tos` field in the message's fixed header.
302
+ #--
303
+ # @rbs return: ::Integer
304
+ def tos; fixed_header.tos; end
305
+ # Gets the value of `action` field in the message's fixed header.
306
+ #--
307
+ # @rbs return: ::Integer
308
+ def action; fixed_header.action; end
309
+ # Gets the value of `flags` field in the message's fixed header.
310
+ #--
311
+ # @rbs return: ::Integer
312
+ def flags; fixed_header.flags; end
313
+ # Gets the value of `iifname` attribute in the message.
314
+ #--
315
+ # @rbs return: ::String
316
+ def iifname; attributes[:"iifname"]&.value; end
317
+ # Gets the value of `goto` attribute in the message.
318
+ #--
319
+ # @rbs return: ::Integer
320
+ def goto; attributes[:"goto"]&.value; end
321
+ # Gets the value of `priority` attribute in the message.
322
+ #--
323
+ # @rbs return: ::Integer
324
+ def priority; attributes[:"priority"]&.value; end
325
+ # Gets the value of `fwmark` attribute in the message.
326
+ #--
327
+ # @rbs return: ::Integer
328
+ def fwmark; attributes[:"fwmark"]&.value; end
329
+ # Gets the value of `flow` attribute in the message.
330
+ #--
331
+ # @rbs return: ::Integer
332
+ def flow; attributes[:"flow"]&.value; end
333
+ # Gets the value of `tun-id` attribute in the message.
334
+ #--
335
+ # @rbs return: ::Integer
336
+ def tun_id; attributes[:"tun_id"]&.value; end
337
+ # Gets the value of `suppress-ifgroup` attribute in the message.
338
+ #--
339
+ # @rbs return: ::Integer
340
+ def suppress_ifgroup; attributes[:"suppress_ifgroup"]&.value; end
341
+ # Gets the value of `suppress-prefixlen` attribute in the message.
342
+ #--
343
+ # @rbs return: ::Integer
344
+ def suppress_prefixlen; attributes[:"suppress_prefixlen"]&.value; end
345
+ # Gets the value of `table` attribute or fixed header in the message.
346
+ #--
347
+ # @rbs return: ::Integer
348
+ def table; attributes[:"table"]&.value || fixed_header.table; end
349
+ # Gets the value of `fwmask` attribute in the message.
350
+ #--
351
+ # @rbs return: ::Integer
352
+ def fwmask; attributes[:"fwmask"]&.value; end
353
+ # Gets the value of `oifname` attribute in the message.
354
+ #--
355
+ # @rbs return: ::String
356
+ def oifname; attributes[:"oifname"]&.value; end
357
+ # Gets the value of `l3mdev` attribute in the message.
358
+ #--
359
+ # @rbs return: ::Integer
360
+ def l3mdev; attributes[:"l3mdev"]&.value; end
361
+ # Gets the value of `uid-range` attribute in the message.
362
+ #--
363
+ # @rbs return: untyped
364
+ def uid_range; attributes[:"uid_range"]&.value; end
365
+ # Gets the value of `protocol` attribute in the message.
366
+ #--
367
+ # @rbs return: ::Integer
368
+ def protocol; attributes[:"protocol"]&.value; end
369
+ # Gets the value of `ip-proto` attribute in the message.
370
+ #--
371
+ # @rbs return: ::Integer
372
+ def ip_proto; attributes[:"ip_proto"]&.value; end
373
+ # Gets the value of `sport-range` attribute in the message.
374
+ #--
375
+ # @rbs return: untyped
376
+ def sport_range; attributes[:"sport_range"]&.value; end
377
+ # Gets the value of `dport-range` attribute in the message.
378
+ #--
379
+ # @rbs return: untyped
380
+ def dport_range; attributes[:"dport_range"]&.value; end
381
+ # Gets the value of `dscp` attribute in the message.
382
+ #--
383
+ # @rbs return: ::Integer
384
+ def dscp; attributes[:"dscp"]&.value; end
385
+ # Gets the value of `flowlabel` attribute in the message.
386
+ #--
387
+ # @rbs return: ::Integer
388
+ def flowlabel; attributes[:"flowlabel"]&.value; end
389
+ # Gets the value of `flowlabel-mask` attribute in the message.
390
+ #--
391
+ # @rbs return: ::Integer
392
+ def flowlabel_mask; attributes[:"flowlabel_mask"]&.value; end
393
+ # Gets the value of `sport-mask` attribute in the message.
394
+ #--
395
+ # @rbs return: ::Integer
396
+ def sport_mask; attributes[:"sport_mask"]&.value; end
397
+ # Gets the value of `dport-mask` attribute in the message.
398
+ #--
399
+ # @rbs return: ::Integer
400
+ def dport_mask; attributes[:"dport_mask"]&.value; end
401
+ # Gets the value of `dscp-mask` attribute in the message.
402
+ #--
403
+ # @rbs return: ::Integer
404
+ def dscp_mask; attributes[:"dscp_mask"]&.value; end
405
+ end
406
+ # Remove an existing FIB rule
407
+ class DoDelruleRequest < ::Nl::Protocols::Raw::Message
408
+ TYPE = 33
409
+ FIXED_HEADER = Structs::FibRuleHdr
410
+ ATTRIBUTE_SET = AttributeSets::FibRuleAttrs
411
+ ATTRIBUTES = Ractor.make_shareable(%i[iifname goto priority fwmark flow tun_id suppress_ifgroup suppress_prefixlen table fwmask oifname l3mdev uid_range protocol ip_proto sport_range dport_range dscp flowlabel flowlabel_mask sport_mask dport_mask dscp_mask])
412
+ # Gets the value of `family` field in the message's fixed header.
413
+ #--
414
+ # @rbs return: ::Integer
415
+ def family; fixed_header.family; end
416
+ # Gets the value of `dst-len` field in the message's fixed header.
417
+ #--
418
+ # @rbs return: ::Integer
419
+ def dst_len; fixed_header.dst_len; end
420
+ # Gets the value of `src-len` field in the message's fixed header.
421
+ #--
422
+ # @rbs return: ::Integer
423
+ def src_len; fixed_header.src_len; end
424
+ # Gets the value of `tos` field in the message's fixed header.
425
+ #--
426
+ # @rbs return: ::Integer
427
+ def tos; fixed_header.tos; end
428
+ # Gets the value of `action` field in the message's fixed header.
429
+ #--
430
+ # @rbs return: ::Integer
431
+ def action; fixed_header.action; end
432
+ # Gets the value of `flags` field in the message's fixed header.
433
+ #--
434
+ # @rbs return: ::Integer
435
+ def flags; fixed_header.flags; end
436
+ # Gets the value of `iifname` attribute in the message.
437
+ #--
438
+ # @rbs return: ::String
439
+ def iifname; attributes[:"iifname"]&.value; end
440
+ # Gets the value of `goto` attribute in the message.
441
+ #--
442
+ # @rbs return: ::Integer
443
+ def goto; attributes[:"goto"]&.value; end
444
+ # Gets the value of `priority` attribute in the message.
445
+ #--
446
+ # @rbs return: ::Integer
447
+ def priority; attributes[:"priority"]&.value; end
448
+ # Gets the value of `fwmark` attribute in the message.
449
+ #--
450
+ # @rbs return: ::Integer
451
+ def fwmark; attributes[:"fwmark"]&.value; end
452
+ # Gets the value of `flow` attribute in the message.
453
+ #--
454
+ # @rbs return: ::Integer
455
+ def flow; attributes[:"flow"]&.value; end
456
+ # Gets the value of `tun-id` attribute in the message.
457
+ #--
458
+ # @rbs return: ::Integer
459
+ def tun_id; attributes[:"tun_id"]&.value; end
460
+ # Gets the value of `suppress-ifgroup` attribute in the message.
461
+ #--
462
+ # @rbs return: ::Integer
463
+ def suppress_ifgroup; attributes[:"suppress_ifgroup"]&.value; end
464
+ # Gets the value of `suppress-prefixlen` attribute in the message.
465
+ #--
466
+ # @rbs return: ::Integer
467
+ def suppress_prefixlen; attributes[:"suppress_prefixlen"]&.value; end
468
+ # Gets the value of `table` attribute or fixed header in the message.
469
+ #--
470
+ # @rbs return: ::Integer
471
+ def table; attributes[:"table"]&.value || fixed_header.table; end
472
+ # Gets the value of `fwmask` attribute in the message.
473
+ #--
474
+ # @rbs return: ::Integer
475
+ def fwmask; attributes[:"fwmask"]&.value; end
476
+ # Gets the value of `oifname` attribute in the message.
477
+ #--
478
+ # @rbs return: ::String
479
+ def oifname; attributes[:"oifname"]&.value; end
480
+ # Gets the value of `l3mdev` attribute in the message.
481
+ #--
482
+ # @rbs return: ::Integer
483
+ def l3mdev; attributes[:"l3mdev"]&.value; end
484
+ # Gets the value of `uid-range` attribute in the message.
485
+ #--
486
+ # @rbs return: untyped
487
+ def uid_range; attributes[:"uid_range"]&.value; end
488
+ # Gets the value of `protocol` attribute in the message.
489
+ #--
490
+ # @rbs return: ::Integer
491
+ def protocol; attributes[:"protocol"]&.value; end
492
+ # Gets the value of `ip-proto` attribute in the message.
493
+ #--
494
+ # @rbs return: ::Integer
495
+ def ip_proto; attributes[:"ip_proto"]&.value; end
496
+ # Gets the value of `sport-range` attribute in the message.
497
+ #--
498
+ # @rbs return: untyped
499
+ def sport_range; attributes[:"sport_range"]&.value; end
500
+ # Gets the value of `dport-range` attribute in the message.
501
+ #--
502
+ # @rbs return: untyped
503
+ def dport_range; attributes[:"dport_range"]&.value; end
504
+ # Gets the value of `dscp` attribute in the message.
505
+ #--
506
+ # @rbs return: ::Integer
507
+ def dscp; attributes[:"dscp"]&.value; end
508
+ # Gets the value of `flowlabel` attribute in the message.
509
+ #--
510
+ # @rbs return: ::Integer
511
+ def flowlabel; attributes[:"flowlabel"]&.value; end
512
+ # Gets the value of `flowlabel-mask` attribute in the message.
513
+ #--
514
+ # @rbs return: ::Integer
515
+ def flowlabel_mask; attributes[:"flowlabel_mask"]&.value; end
516
+ # Gets the value of `sport-mask` attribute in the message.
517
+ #--
518
+ # @rbs return: ::Integer
519
+ def sport_mask; attributes[:"sport_mask"]&.value; end
520
+ # Gets the value of `dport-mask` attribute in the message.
521
+ #--
522
+ # @rbs return: ::Integer
523
+ def dport_mask; attributes[:"dport_mask"]&.value; end
524
+ # Gets the value of `dscp-mask` attribute in the message.
525
+ #--
526
+ # @rbs return: ::Integer
527
+ def dscp_mask; attributes[:"dscp_mask"]&.value; end
528
+ end
529
+ # Dump all FIB rules
530
+ class DumpGetruleRequest < ::Nl::Protocols::Raw::Message
531
+ TYPE = 34
532
+ FIXED_HEADER = Structs::FibRuleHdr
533
+ ATTRIBUTE_SET = AttributeSets::FibRuleAttrs
534
+ ATTRIBUTES = Ractor.make_shareable(%i[])
535
+ # Gets the value of `family` field in the message's fixed header.
536
+ #--
537
+ # @rbs return: ::Integer
538
+ def family; fixed_header.family; end
539
+ # Gets the value of `dst-len` field in the message's fixed header.
540
+ #--
541
+ # @rbs return: ::Integer
542
+ def dst_len; fixed_header.dst_len; end
543
+ # Gets the value of `src-len` field in the message's fixed header.
544
+ #--
545
+ # @rbs return: ::Integer
546
+ def src_len; fixed_header.src_len; end
547
+ # Gets the value of `tos` field in the message's fixed header.
548
+ #--
549
+ # @rbs return: ::Integer
550
+ def tos; fixed_header.tos; end
551
+ # Gets the value of `table` field in the message's fixed header.
552
+ #--
553
+ # @rbs return: ::Integer
554
+ def table; fixed_header.table; end
555
+ # Gets the value of `action` field in the message's fixed header.
556
+ #--
557
+ # @rbs return: ::Integer
558
+ def action; fixed_header.action; end
559
+ # Gets the value of `flags` field in the message's fixed header.
560
+ #--
561
+ # @rbs return: ::Integer
562
+ def flags; fixed_header.flags; end
563
+ end
564
+ # Dump all FIB rules
565
+ class DumpGetruleReply < ::Nl::Protocols::Raw::Message
566
+ TYPE = 32
567
+ FIXED_HEADER = Structs::FibRuleHdr
568
+ ATTRIBUTE_SET = AttributeSets::FibRuleAttrs
569
+ ATTRIBUTES = Ractor.make_shareable(%i[iifname goto priority fwmark flow tun_id suppress_ifgroup suppress_prefixlen table fwmask oifname l3mdev uid_range protocol ip_proto sport_range dport_range dscp flowlabel flowlabel_mask sport_mask dport_mask dscp_mask])
570
+ # Gets the value of `family` field in the message's fixed header.
571
+ #--
572
+ # @rbs return: ::Integer
573
+ def family; fixed_header.family; end
574
+ # Gets the value of `dst-len` field in the message's fixed header.
575
+ #--
576
+ # @rbs return: ::Integer
577
+ def dst_len; fixed_header.dst_len; end
578
+ # Gets the value of `src-len` field in the message's fixed header.
579
+ #--
580
+ # @rbs return: ::Integer
581
+ def src_len; fixed_header.src_len; end
582
+ # Gets the value of `tos` field in the message's fixed header.
583
+ #--
584
+ # @rbs return: ::Integer
585
+ def tos; fixed_header.tos; end
586
+ # Gets the value of `action` field in the message's fixed header.
587
+ #--
588
+ # @rbs return: ::Integer
589
+ def action; fixed_header.action; end
590
+ # Gets the value of `flags` field in the message's fixed header.
591
+ #--
592
+ # @rbs return: ::Integer
593
+ def flags; fixed_header.flags; end
594
+ # Gets the value of `iifname` attribute in the message.
595
+ #--
596
+ # @rbs return: ::String
597
+ def iifname; attributes[:"iifname"]&.value; end
598
+ # Gets the value of `goto` attribute in the message.
599
+ #--
600
+ # @rbs return: ::Integer
601
+ def goto; attributes[:"goto"]&.value; end
602
+ # Gets the value of `priority` attribute in the message.
603
+ #--
604
+ # @rbs return: ::Integer
605
+ def priority; attributes[:"priority"]&.value; end
606
+ # Gets the value of `fwmark` attribute in the message.
607
+ #--
608
+ # @rbs return: ::Integer
609
+ def fwmark; attributes[:"fwmark"]&.value; end
610
+ # Gets the value of `flow` attribute in the message.
611
+ #--
612
+ # @rbs return: ::Integer
613
+ def flow; attributes[:"flow"]&.value; end
614
+ # Gets the value of `tun-id` attribute in the message.
615
+ #--
616
+ # @rbs return: ::Integer
617
+ def tun_id; attributes[:"tun_id"]&.value; end
618
+ # Gets the value of `suppress-ifgroup` attribute in the message.
619
+ #--
620
+ # @rbs return: ::Integer
621
+ def suppress_ifgroup; attributes[:"suppress_ifgroup"]&.value; end
622
+ # Gets the value of `suppress-prefixlen` attribute in the message.
623
+ #--
624
+ # @rbs return: ::Integer
625
+ def suppress_prefixlen; attributes[:"suppress_prefixlen"]&.value; end
626
+ # Gets the value of `table` attribute or fixed header in the message.
627
+ #--
628
+ # @rbs return: ::Integer
629
+ def table; attributes[:"table"]&.value || fixed_header.table; end
630
+ # Gets the value of `fwmask` attribute in the message.
631
+ #--
632
+ # @rbs return: ::Integer
633
+ def fwmask; attributes[:"fwmask"]&.value; end
634
+ # Gets the value of `oifname` attribute in the message.
635
+ #--
636
+ # @rbs return: ::String
637
+ def oifname; attributes[:"oifname"]&.value; end
638
+ # Gets the value of `l3mdev` attribute in the message.
639
+ #--
640
+ # @rbs return: ::Integer
641
+ def l3mdev; attributes[:"l3mdev"]&.value; end
642
+ # Gets the value of `uid-range` attribute in the message.
643
+ #--
644
+ # @rbs return: untyped
645
+ def uid_range; attributes[:"uid_range"]&.value; end
646
+ # Gets the value of `protocol` attribute in the message.
647
+ #--
648
+ # @rbs return: ::Integer
649
+ def protocol; attributes[:"protocol"]&.value; end
650
+ # Gets the value of `ip-proto` attribute in the message.
651
+ #--
652
+ # @rbs return: ::Integer
653
+ def ip_proto; attributes[:"ip_proto"]&.value; end
654
+ # Gets the value of `sport-range` attribute in the message.
655
+ #--
656
+ # @rbs return: untyped
657
+ def sport_range; attributes[:"sport_range"]&.value; end
658
+ # Gets the value of `dport-range` attribute in the message.
659
+ #--
660
+ # @rbs return: untyped
661
+ def dport_range; attributes[:"dport_range"]&.value; end
662
+ # Gets the value of `dscp` attribute in the message.
663
+ #--
664
+ # @rbs return: ::Integer
665
+ def dscp; attributes[:"dscp"]&.value; end
666
+ # Gets the value of `flowlabel` attribute in the message.
667
+ #--
668
+ # @rbs return: ::Integer
669
+ def flowlabel; attributes[:"flowlabel"]&.value; end
670
+ # Gets the value of `flowlabel-mask` attribute in the message.
671
+ #--
672
+ # @rbs return: ::Integer
673
+ def flowlabel_mask; attributes[:"flowlabel_mask"]&.value; end
674
+ # Gets the value of `sport-mask` attribute in the message.
675
+ #--
676
+ # @rbs return: ::Integer
677
+ def sport_mask; attributes[:"sport_mask"]&.value; end
678
+ # Gets the value of `dport-mask` attribute in the message.
679
+ #--
680
+ # @rbs return: ::Integer
681
+ def dport_mask; attributes[:"dport_mask"]&.value; end
682
+ # Gets the value of `dscp-mask` attribute in the message.
683
+ #--
684
+ # @rbs return: ::Integer
685
+ def dscp_mask; attributes[:"dscp_mask"]&.value; end
686
+ end
687
+ end
688
+ # Add new FIB rule
689
+ #--
690
+ # @rbs (?family: ::Integer, ?dst_len: ::Integer, ?src_len: ::Integer, ?tos: ::Integer, ?table: ::Integer, ?action: ::Integer, ?flags: ::Integer, ?iifname: ::String, ?goto: ::Integer, ?priority: ::Integer, ?fwmark: ::Integer, ?flow: ::Integer, ?tun_id: ::Integer, ?suppress_ifgroup: ::Integer, ?suppress_prefixlen: ::Integer, ?fwmask: ::Integer, ?oifname: ::String, ?l3mdev: ::Integer, ?uid_range: untyped, ?protocol: ::Integer, ?ip_proto: ::Integer, ?sport_range: untyped, ?dport_range: untyped, ?dscp: ::Integer, ?flowlabel: ::Integer, ?flowlabel_mask: ::Integer, ?sport_mask: ::Integer, ?dport_mask: ::Integer, ?dscp_mask: ::Integer) -> void
691
+ def do_newrule(**args)
692
+ exchange_message(:"do", Messages::DoNewruleRequest, nil, args)
693
+ end
694
+ # Remove an existing FIB rule
695
+ #--
696
+ # @rbs (?family: ::Integer, ?dst_len: ::Integer, ?src_len: ::Integer, ?tos: ::Integer, ?table: ::Integer, ?action: ::Integer, ?flags: ::Integer, ?iifname: ::String, ?goto: ::Integer, ?priority: ::Integer, ?fwmark: ::Integer, ?flow: ::Integer, ?tun_id: ::Integer, ?suppress_ifgroup: ::Integer, ?suppress_prefixlen: ::Integer, ?fwmask: ::Integer, ?oifname: ::String, ?l3mdev: ::Integer, ?uid_range: untyped, ?protocol: ::Integer, ?ip_proto: ::Integer, ?sport_range: untyped, ?dport_range: untyped, ?dscp: ::Integer, ?flowlabel: ::Integer, ?flowlabel_mask: ::Integer, ?sport_mask: ::Integer, ?dport_mask: ::Integer, ?dscp_mask: ::Integer) -> void
697
+ def do_delrule(**args)
698
+ exchange_message(:"do", Messages::DoDelruleRequest, nil, args)
699
+ end
700
+ # Dump all FIB rules
701
+ #--
702
+ # @rbs (?family: ::Integer, ?dst_len: ::Integer, ?src_len: ::Integer, ?tos: ::Integer, ?table: ::Integer, ?action: ::Integer, ?flags: ::Integer) -> Enumerable[Messages::DumpGetruleReply]
703
+ # | (?family: ::Integer, ?dst_len: ::Integer, ?src_len: ::Integer, ?tos: ::Integer, ?table: ::Integer, ?action: ::Integer, ?flags: ::Integer) { (Messages::DumpGetruleReply) -> void } -> void
704
+ def dump_getrule(**args, &block)
705
+ exchange_message(:"dump", Messages::DumpGetruleRequest, Messages::DumpGetruleReply, args, &block)
706
+ end
707
+ end
708
+ end; end