nl-linux 0.2.0 → 0.2.1

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.
@@ -0,0 +1,1124 @@
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
+ # Route configuration over rtnetlink.
8
+ class Nl::Linux::RtRoute < ::Nl::Family
9
+ NAME = "rt-route"
10
+ PROTOCOL = Ractor.make_shareable(::Nl::Protocols::Raw.new("rt-route", 0))
11
+ module Structs
12
+ Rtmsg = Struct.new(
13
+ :"rtm_family", #: ::Integer
14
+ :"rtm_dst_len", #: ::Integer
15
+ :"rtm_src_len", #: ::Integer
16
+ :"rtm_tos", #: ::Integer
17
+ :"rtm_table", #: ::Integer
18
+ :"rtm_protocol", #: ::Integer
19
+ :"rtm_scope", #: ::Integer
20
+ :"rtm_type", #: ::Integer
21
+ :"rtm_flags", #: ::Integer
22
+ )
23
+ class Rtmsg
24
+ # :nodoc:
25
+ MEMBERS = Ractor.make_shareable({rtm_family: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), rtm_dst_len: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), rtm_src_len: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), rtm_tos: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), rtm_table: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), rtm_protocol: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), rtm_scope: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), rtm_type: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), rtm_flags: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
26
+ # Decodes the struct.
27
+ #--
28
+ # @rbs decoder: ::Nl::Decoder
29
+ # @rbs return: instance
30
+ def self.decode(decoder)
31
+ self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
32
+ end
33
+ # Encodes the struct.
34
+ #--
35
+ # @rbs encoder: ::Nl::Encoder
36
+ # @rbs return: void
37
+ def encode(encoder)
38
+ MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
39
+ end
40
+ end
41
+ RtaCacheinfo = Struct.new(
42
+ :"rta_clntref", #: ::Integer
43
+ :"rta_lastuse", #: ::Integer
44
+ :"rta_expires", #: ::Integer
45
+ :"rta_error", #: ::Integer
46
+ :"rta_used", #: ::Integer
47
+ )
48
+ class RtaCacheinfo
49
+ # :nodoc:
50
+ MEMBERS = Ractor.make_shareable({rta_clntref: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil), rta_lastuse: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil), rta_expires: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil), rta_error: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil), rta_used: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
51
+ # Decodes the struct.
52
+ #--
53
+ # @rbs decoder: ::Nl::Decoder
54
+ # @rbs return: instance
55
+ def self.decode(decoder)
56
+ self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
57
+ end
58
+ # Encodes the struct.
59
+ #--
60
+ # @rbs encoder: ::Nl::Encoder
61
+ # @rbs return: void
62
+ def encode(encoder)
63
+ MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
64
+ end
65
+ end
66
+ end
67
+ module AttributeSets
68
+ class RouteAttrs < ::Nl::Protocols::Raw::AttributeSet
69
+ # Abstract class
70
+ class Attribute < ::Nl::Protocols::Raw::AttributeSet::Attribute
71
+ end
72
+ class Dst < Attribute
73
+ TYPE = 1
74
+ NAME = :"dst"
75
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
76
+ end
77
+ class Src < Attribute
78
+ TYPE = 2
79
+ NAME = :"src"
80
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
81
+ end
82
+ class Iif < Attribute
83
+ TYPE = 3
84
+ NAME = :"iif"
85
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
86
+ end
87
+ class Oif < Attribute
88
+ TYPE = 4
89
+ NAME = :"oif"
90
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
91
+ end
92
+ class Gateway < Attribute
93
+ TYPE = 5
94
+ NAME = :"gateway"
95
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
96
+ end
97
+ class Priority < Attribute
98
+ TYPE = 6
99
+ NAME = :"priority"
100
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
101
+ end
102
+ class Prefsrc < Attribute
103
+ TYPE = 7
104
+ NAME = :"prefsrc"
105
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
106
+ end
107
+ class Metrics < Attribute
108
+ TYPE = 8
109
+ NAME = :"metrics"
110
+ end
111
+ class Multipath < Attribute
112
+ TYPE = 9
113
+ NAME = :"multipath"
114
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
115
+ end
116
+ class Protoinfo < Attribute
117
+ TYPE = 10
118
+ NAME = :"protoinfo"
119
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
120
+ end
121
+ class Flow < Attribute
122
+ TYPE = 11
123
+ NAME = :"flow"
124
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
125
+ end
126
+ class Cacheinfo < Attribute
127
+ TYPE = 12
128
+ NAME = :"cacheinfo"
129
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
130
+ end
131
+ class Session < Attribute
132
+ TYPE = 13
133
+ NAME = :"session"
134
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
135
+ end
136
+ class MpAlgo < Attribute
137
+ TYPE = 14
138
+ NAME = :"mp_algo"
139
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
140
+ end
141
+ class Table < Attribute
142
+ TYPE = 15
143
+ NAME = :"table"
144
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
145
+ end
146
+ class Mark < Attribute
147
+ TYPE = 16
148
+ NAME = :"mark"
149
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
150
+ end
151
+ class MfcStats < Attribute
152
+ TYPE = 17
153
+ NAME = :"mfc_stats"
154
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
155
+ end
156
+ class Via < Attribute
157
+ TYPE = 18
158
+ NAME = :"via"
159
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
160
+ end
161
+ class Newdst < Attribute
162
+ TYPE = 19
163
+ NAME = :"newdst"
164
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
165
+ end
166
+ class Pref < Attribute
167
+ TYPE = 20
168
+ NAME = :"pref"
169
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
170
+ end
171
+ class EncapType < Attribute
172
+ TYPE = 21
173
+ NAME = :"encap_type"
174
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
175
+ end
176
+ class Encap < Attribute
177
+ TYPE = 22
178
+ NAME = :"encap"
179
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
180
+ end
181
+ class Expires < Attribute
182
+ TYPE = 23
183
+ NAME = :"expires"
184
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
185
+ end
186
+ class Pad < Attribute
187
+ TYPE = 24
188
+ NAME = :"pad"
189
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
190
+ end
191
+ class Uid < Attribute
192
+ TYPE = 25
193
+ NAME = :"uid"
194
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
195
+ end
196
+ class TtlPropagate < Attribute
197
+ TYPE = 26
198
+ NAME = :"ttl_propagate"
199
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
200
+ end
201
+ class IpProto < Attribute
202
+ TYPE = 27
203
+ NAME = :"ip_proto"
204
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
205
+ end
206
+ class Sport < Attribute
207
+ TYPE = 28
208
+ NAME = :"sport"
209
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
210
+ end
211
+ class Dport < Attribute
212
+ TYPE = 29
213
+ NAME = :"dport"
214
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
215
+ end
216
+ class NhId < Attribute
217
+ TYPE = 30
218
+ NAME = :"nh_id"
219
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
220
+ end
221
+ class Flowlabel < Attribute
222
+ TYPE = 31
223
+ NAME = :"flowlabel"
224
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)
225
+ end
226
+ # :nodoc:
227
+ BY_NAME = Ractor.make_shareable({:"dst" => Dst, :"src" => Src, :"iif" => Iif, :"oif" => Oif, :"gateway" => Gateway, :"priority" => Priority, :"prefsrc" => Prefsrc, :"metrics" => Metrics, :"multipath" => Multipath, :"protoinfo" => Protoinfo, :"flow" => Flow, :"cacheinfo" => Cacheinfo, :"session" => Session, :"mp_algo" => MpAlgo, :"table" => Table, :"mark" => Mark, :"mfc_stats" => MfcStats, :"via" => Via, :"newdst" => Newdst, :"pref" => Pref, :"encap_type" => EncapType, :"encap" => Encap, :"expires" => Expires, :"pad" => Pad, :"uid" => Uid, :"ttl_propagate" => TtlPropagate, :"ip_proto" => IpProto, :"sport" => Sport, :"dport" => Dport, :"nh_id" => NhId, :"flowlabel" => Flowlabel}) #: Hash[::Symbol, Attribute]
228
+ # :nodoc:
229
+ BY_TYPE = Ractor.make_shareable({1 => Dst, 2 => Src, 3 => Iif, 4 => Oif, 5 => Gateway, 6 => Priority, 7 => Prefsrc, 8 => Metrics, 9 => Multipath, 10 => Protoinfo, 11 => Flow, 12 => Cacheinfo, 13 => Session, 14 => MpAlgo, 15 => Table, 16 => Mark, 17 => MfcStats, 18 => Via, 19 => Newdst, 20 => Pref, 21 => EncapType, 22 => Encap, 23 => Expires, 24 => Pad, 25 => Uid, 26 => TtlPropagate, 27 => IpProto, 28 => Sport, 29 => Dport, 30 => NhId, 31 => Flowlabel}) #: Hash[::Integer, Attribute]
230
+ class << self
231
+ # Looks up Attribute class by name.
232
+ #--
233
+ # @rbs name: Symbol
234
+ # @rbs return: Attribute
235
+ def by_name(name); BY_NAME.fetch(name); end
236
+ # Looks up Attribute class by type value.
237
+ #--
238
+ # @rbs type: Integer
239
+ # @rbs return: Attribute
240
+ def by_type(type); BY_TYPE.fetch(type); end
241
+ end
242
+ end
243
+ class Metrics < ::Nl::Protocols::Raw::AttributeSet
244
+ # Abstract class
245
+ class Attribute < ::Nl::Protocols::Raw::AttributeSet::Attribute
246
+ end
247
+ class Lock < Attribute
248
+ TYPE = 1
249
+ NAME = :"lock"
250
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
251
+ end
252
+ class Mtu < Attribute
253
+ TYPE = 2
254
+ NAME = :"mtu"
255
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
256
+ end
257
+ class Window < Attribute
258
+ TYPE = 3
259
+ NAME = :"window"
260
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
261
+ end
262
+ class Rtt < Attribute
263
+ TYPE = 4
264
+ NAME = :"rtt"
265
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
266
+ end
267
+ class Rttvar < Attribute
268
+ TYPE = 5
269
+ NAME = :"rttvar"
270
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
271
+ end
272
+ class Ssthresh < Attribute
273
+ TYPE = 6
274
+ NAME = :"ssthresh"
275
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
276
+ end
277
+ class Cwnd < Attribute
278
+ TYPE = 7
279
+ NAME = :"cwnd"
280
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
281
+ end
282
+ class Advmss < Attribute
283
+ TYPE = 8
284
+ NAME = :"advmss"
285
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
286
+ end
287
+ class Reordering < Attribute
288
+ TYPE = 9
289
+ NAME = :"reordering"
290
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
291
+ end
292
+ class Hoplimit < Attribute
293
+ TYPE = 10
294
+ NAME = :"hoplimit"
295
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
296
+ end
297
+ class Initcwnd < Attribute
298
+ TYPE = 11
299
+ NAME = :"initcwnd"
300
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
301
+ end
302
+ class Features < Attribute
303
+ TYPE = 12
304
+ NAME = :"features"
305
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
306
+ end
307
+ class RtoMin < Attribute
308
+ TYPE = 13
309
+ NAME = :"rto_min"
310
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
311
+ end
312
+ class Initrwnd < Attribute
313
+ TYPE = 14
314
+ NAME = :"initrwnd"
315
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
316
+ end
317
+ class Quickack < Attribute
318
+ TYPE = 15
319
+ NAME = :"quickack"
320
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
321
+ end
322
+ class CcAlgo < Attribute
323
+ TYPE = 16
324
+ NAME = :"cc_algo"
325
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::String.new(check: nil)
326
+ end
327
+ class FastopenNoCookie < Attribute
328
+ TYPE = 17
329
+ NAME = :"fastopen_no_cookie"
330
+ DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
331
+ end
332
+ # :nodoc:
333
+ BY_NAME = Ractor.make_shareable({:"lock" => Lock, :"mtu" => Mtu, :"window" => Window, :"rtt" => Rtt, :"rttvar" => Rttvar, :"ssthresh" => Ssthresh, :"cwnd" => Cwnd, :"advmss" => Advmss, :"reordering" => Reordering, :"hoplimit" => Hoplimit, :"initcwnd" => Initcwnd, :"features" => Features, :"rto_min" => RtoMin, :"initrwnd" => Initrwnd, :"quickack" => Quickack, :"cc_algo" => CcAlgo, :"fastopen_no_cookie" => FastopenNoCookie}) #: Hash[::Symbol, Attribute]
334
+ # :nodoc:
335
+ BY_TYPE = Ractor.make_shareable({1 => Lock, 2 => Mtu, 3 => Window, 4 => Rtt, 5 => Rttvar, 6 => Ssthresh, 7 => Cwnd, 8 => Advmss, 9 => Reordering, 10 => Hoplimit, 11 => Initcwnd, 12 => Features, 13 => RtoMin, 14 => Initrwnd, 15 => Quickack, 16 => CcAlgo, 17 => FastopenNoCookie}) #: Hash[::Integer, Attribute]
336
+ class << self
337
+ # Looks up Attribute class by name.
338
+ #--
339
+ # @rbs name: Symbol
340
+ # @rbs return: Attribute
341
+ def by_name(name); BY_NAME.fetch(name); end
342
+ # Looks up Attribute class by type value.
343
+ #--
344
+ # @rbs type: Integer
345
+ # @rbs return: Attribute
346
+ def by_type(type); BY_TYPE.fetch(type); end
347
+ end
348
+ end
349
+ RouteAttrs::Metrics::DATATYPE = ::Nl::Protocols::Raw::DataTypes::NestedAttributes.new(Metrics)
350
+ end
351
+ module Messages
352
+ # Dump route information.
353
+ class DoGetrouteRequest < ::Nl::Protocols::Raw::Message
354
+ TYPE = 26
355
+ FIXED_HEADER = Structs::Rtmsg
356
+ ATTRIBUTE_SET = AttributeSets::RouteAttrs
357
+ ATTRIBUTES = Ractor.make_shareable(%i[dst src iif oif mark uid ip_proto sport dport flowlabel])
358
+ # Gets the value of `rtm-family` field in the message's fixed header.
359
+ #--
360
+ # @rbs return: ::Integer
361
+ def rtm_family; fixed_header.rtm_family; end
362
+ # Gets the value of `rtm-dst-len` field in the message's fixed header.
363
+ #--
364
+ # @rbs return: ::Integer
365
+ def rtm_dst_len; fixed_header.rtm_dst_len; end
366
+ # Gets the value of `rtm-src-len` field in the message's fixed header.
367
+ #--
368
+ # @rbs return: ::Integer
369
+ def rtm_src_len; fixed_header.rtm_src_len; end
370
+ # Gets the value of `rtm-tos` field in the message's fixed header.
371
+ #--
372
+ # @rbs return: ::Integer
373
+ def rtm_tos; fixed_header.rtm_tos; end
374
+ # Gets the value of `rtm-table` field in the message's fixed header.
375
+ #--
376
+ # @rbs return: ::Integer
377
+ def rtm_table; fixed_header.rtm_table; end
378
+ # Gets the value of `rtm-protocol` field in the message's fixed header.
379
+ #--
380
+ # @rbs return: ::Integer
381
+ def rtm_protocol; fixed_header.rtm_protocol; end
382
+ # Gets the value of `rtm-scope` field in the message's fixed header.
383
+ #--
384
+ # @rbs return: ::Integer
385
+ def rtm_scope; fixed_header.rtm_scope; end
386
+ # Gets the value of `rtm-type` field in the message's fixed header.
387
+ #--
388
+ # @rbs return: ::Integer
389
+ def rtm_type; fixed_header.rtm_type; end
390
+ # Gets the value of `rtm-flags` field in the message's fixed header.
391
+ #--
392
+ # @rbs return: ::Integer
393
+ def rtm_flags; fixed_header.rtm_flags; end
394
+ # Gets the value of `dst` attribute in the message.
395
+ #--
396
+ # @rbs return: untyped
397
+ def dst; attributes[:"dst"]&.value; end
398
+ # Gets the value of `src` attribute in the message.
399
+ #--
400
+ # @rbs return: untyped
401
+ def src; attributes[:"src"]&.value; end
402
+ # Gets the value of `iif` attribute in the message.
403
+ #--
404
+ # @rbs return: ::Integer
405
+ def iif; attributes[:"iif"]&.value; end
406
+ # Gets the value of `oif` attribute in the message.
407
+ #--
408
+ # @rbs return: ::Integer
409
+ def oif; attributes[:"oif"]&.value; end
410
+ # Gets the value of `mark` attribute in the message.
411
+ #--
412
+ # @rbs return: ::Integer
413
+ def mark; attributes[:"mark"]&.value; end
414
+ # Gets the value of `uid` attribute in the message.
415
+ #--
416
+ # @rbs return: ::Integer
417
+ def uid; attributes[:"uid"]&.value; end
418
+ # Gets the value of `ip-proto` attribute in the message.
419
+ #--
420
+ # @rbs return: ::Integer
421
+ def ip_proto; attributes[:"ip_proto"]&.value; end
422
+ # Gets the value of `sport` attribute in the message.
423
+ #--
424
+ # @rbs return: ::Integer
425
+ def sport; attributes[:"sport"]&.value; end
426
+ # Gets the value of `dport` attribute in the message.
427
+ #--
428
+ # @rbs return: ::Integer
429
+ def dport; attributes[:"dport"]&.value; end
430
+ # Gets the value of `flowlabel` attribute in the message.
431
+ #--
432
+ # @rbs return: ::Integer
433
+ def flowlabel; attributes[:"flowlabel"]&.value; end
434
+ end
435
+ # Dump route information.
436
+ class DoGetrouteReply < ::Nl::Protocols::Raw::Message
437
+ TYPE = 24
438
+ FIXED_HEADER = Structs::Rtmsg
439
+ ATTRIBUTE_SET = AttributeSets::RouteAttrs
440
+ ATTRIBUTES = Ractor.make_shareable(%i[dst src iif oif gateway priority prefsrc metrics multipath flow cacheinfo table mark mfc_stats via newdst pref encap_type encap expires pad uid ttl_propagate ip_proto sport dport nh_id flowlabel])
441
+ # Gets the value of `rtm-family` field in the message's fixed header.
442
+ #--
443
+ # @rbs return: ::Integer
444
+ def rtm_family; fixed_header.rtm_family; end
445
+ # Gets the value of `rtm-dst-len` field in the message's fixed header.
446
+ #--
447
+ # @rbs return: ::Integer
448
+ def rtm_dst_len; fixed_header.rtm_dst_len; end
449
+ # Gets the value of `rtm-src-len` field in the message's fixed header.
450
+ #--
451
+ # @rbs return: ::Integer
452
+ def rtm_src_len; fixed_header.rtm_src_len; end
453
+ # Gets the value of `rtm-tos` field in the message's fixed header.
454
+ #--
455
+ # @rbs return: ::Integer
456
+ def rtm_tos; fixed_header.rtm_tos; end
457
+ # Gets the value of `rtm-table` field in the message's fixed header.
458
+ #--
459
+ # @rbs return: ::Integer
460
+ def rtm_table; fixed_header.rtm_table; end
461
+ # Gets the value of `rtm-protocol` field in the message's fixed header.
462
+ #--
463
+ # @rbs return: ::Integer
464
+ def rtm_protocol; fixed_header.rtm_protocol; end
465
+ # Gets the value of `rtm-scope` field in the message's fixed header.
466
+ #--
467
+ # @rbs return: ::Integer
468
+ def rtm_scope; fixed_header.rtm_scope; end
469
+ # Gets the value of `rtm-type` field in the message's fixed header.
470
+ #--
471
+ # @rbs return: ::Integer
472
+ def rtm_type; fixed_header.rtm_type; end
473
+ # Gets the value of `rtm-flags` field in the message's fixed header.
474
+ #--
475
+ # @rbs return: ::Integer
476
+ def rtm_flags; fixed_header.rtm_flags; end
477
+ # Gets the value of `dst` attribute in the message.
478
+ #--
479
+ # @rbs return: untyped
480
+ def dst; attributes[:"dst"]&.value; end
481
+ # Gets the value of `src` attribute in the message.
482
+ #--
483
+ # @rbs return: untyped
484
+ def src; attributes[:"src"]&.value; end
485
+ # Gets the value of `iif` attribute in the message.
486
+ #--
487
+ # @rbs return: ::Integer
488
+ def iif; attributes[:"iif"]&.value; end
489
+ # Gets the value of `oif` attribute in the message.
490
+ #--
491
+ # @rbs return: ::Integer
492
+ def oif; attributes[:"oif"]&.value; end
493
+ # Gets the value of `gateway` attribute in the message.
494
+ #--
495
+ # @rbs return: untyped
496
+ def gateway; attributes[:"gateway"]&.value; end
497
+ # Gets the value of `priority` attribute in the message.
498
+ #--
499
+ # @rbs return: ::Integer
500
+ def priority; attributes[:"priority"]&.value; end
501
+ # Gets the value of `prefsrc` attribute in the message.
502
+ #--
503
+ # @rbs return: untyped
504
+ def prefsrc; attributes[:"prefsrc"]&.value; end
505
+ # Gets the value of `metrics` attribute in the message.
506
+ #--
507
+ # @rbs return: AttributeSets::Metrics
508
+ def metrics; attributes[:"metrics"]&.value; end
509
+ # Gets the value of `multipath` attribute in the message.
510
+ #--
511
+ # @rbs return: untyped
512
+ def multipath; attributes[:"multipath"]&.value; end
513
+ # Gets the value of `flow` attribute in the message.
514
+ #--
515
+ # @rbs return: ::Integer
516
+ def flow; attributes[:"flow"]&.value; end
517
+ # Gets the value of `cacheinfo` attribute in the message.
518
+ #--
519
+ # @rbs return: untyped
520
+ def cacheinfo; attributes[:"cacheinfo"]&.value; end
521
+ # Gets the value of `table` attribute in the message.
522
+ #--
523
+ # @rbs return: ::Integer
524
+ def table; attributes[:"table"]&.value; end
525
+ # Gets the value of `mark` attribute in the message.
526
+ #--
527
+ # @rbs return: ::Integer
528
+ def mark; attributes[:"mark"]&.value; end
529
+ # Gets the value of `mfc-stats` attribute in the message.
530
+ #--
531
+ # @rbs return: untyped
532
+ def mfc_stats; attributes[:"mfc_stats"]&.value; end
533
+ # Gets the value of `via` attribute in the message.
534
+ #--
535
+ # @rbs return: untyped
536
+ def via; attributes[:"via"]&.value; end
537
+ # Gets the value of `newdst` attribute in the message.
538
+ #--
539
+ # @rbs return: untyped
540
+ def newdst; attributes[:"newdst"]&.value; end
541
+ # Gets the value of `pref` attribute in the message.
542
+ #--
543
+ # @rbs return: ::Integer
544
+ def pref; attributes[:"pref"]&.value; end
545
+ # Gets the value of `encap-type` attribute in the message.
546
+ #--
547
+ # @rbs return: ::Integer
548
+ def encap_type; attributes[:"encap_type"]&.value; end
549
+ # Gets the value of `encap` attribute in the message.
550
+ #--
551
+ # @rbs return: untyped
552
+ def encap; attributes[:"encap"]&.value; end
553
+ # Gets the value of `expires` attribute in the message.
554
+ #--
555
+ # @rbs return: ::Integer
556
+ def expires; attributes[:"expires"]&.value; end
557
+ # Gets the value of `pad` attribute in the message.
558
+ #--
559
+ # @rbs return: untyped
560
+ def pad; attributes[:"pad"]&.value; end
561
+ # Gets the value of `uid` attribute in the message.
562
+ #--
563
+ # @rbs return: ::Integer
564
+ def uid; attributes[:"uid"]&.value; end
565
+ # Gets the value of `ttl-propagate` attribute in the message.
566
+ #--
567
+ # @rbs return: ::Integer
568
+ def ttl_propagate; attributes[:"ttl_propagate"]&.value; end
569
+ # Gets the value of `ip-proto` attribute in the message.
570
+ #--
571
+ # @rbs return: ::Integer
572
+ def ip_proto; attributes[:"ip_proto"]&.value; end
573
+ # Gets the value of `sport` attribute in the message.
574
+ #--
575
+ # @rbs return: ::Integer
576
+ def sport; attributes[:"sport"]&.value; end
577
+ # Gets the value of `dport` attribute in the message.
578
+ #--
579
+ # @rbs return: ::Integer
580
+ def dport; attributes[:"dport"]&.value; end
581
+ # Gets the value of `nh-id` attribute in the message.
582
+ #--
583
+ # @rbs return: ::Integer
584
+ def nh_id; attributes[:"nh_id"]&.value; end
585
+ # Gets the value of `flowlabel` attribute in the message.
586
+ #--
587
+ # @rbs return: ::Integer
588
+ def flowlabel; attributes[:"flowlabel"]&.value; end
589
+ end
590
+ # Dump route information.
591
+ class DumpGetrouteRequest < ::Nl::Protocols::Raw::Message
592
+ TYPE = 26
593
+ FIXED_HEADER = Structs::Rtmsg
594
+ ATTRIBUTE_SET = AttributeSets::RouteAttrs
595
+ ATTRIBUTES = Ractor.make_shareable(%i[])
596
+ # Gets the value of `rtm-family` field in the message's fixed header.
597
+ #--
598
+ # @rbs return: ::Integer
599
+ def rtm_family; fixed_header.rtm_family; end
600
+ # Gets the value of `rtm-dst-len` field in the message's fixed header.
601
+ #--
602
+ # @rbs return: ::Integer
603
+ def rtm_dst_len; fixed_header.rtm_dst_len; end
604
+ # Gets the value of `rtm-src-len` field in the message's fixed header.
605
+ #--
606
+ # @rbs return: ::Integer
607
+ def rtm_src_len; fixed_header.rtm_src_len; end
608
+ # Gets the value of `rtm-tos` field in the message's fixed header.
609
+ #--
610
+ # @rbs return: ::Integer
611
+ def rtm_tos; fixed_header.rtm_tos; end
612
+ # Gets the value of `rtm-table` field in the message's fixed header.
613
+ #--
614
+ # @rbs return: ::Integer
615
+ def rtm_table; fixed_header.rtm_table; end
616
+ # Gets the value of `rtm-protocol` field in the message's fixed header.
617
+ #--
618
+ # @rbs return: ::Integer
619
+ def rtm_protocol; fixed_header.rtm_protocol; end
620
+ # Gets the value of `rtm-scope` field in the message's fixed header.
621
+ #--
622
+ # @rbs return: ::Integer
623
+ def rtm_scope; fixed_header.rtm_scope; end
624
+ # Gets the value of `rtm-type` field in the message's fixed header.
625
+ #--
626
+ # @rbs return: ::Integer
627
+ def rtm_type; fixed_header.rtm_type; end
628
+ # Gets the value of `rtm-flags` field in the message's fixed header.
629
+ #--
630
+ # @rbs return: ::Integer
631
+ def rtm_flags; fixed_header.rtm_flags; end
632
+ end
633
+ # Dump route information.
634
+ class DumpGetrouteReply < ::Nl::Protocols::Raw::Message
635
+ TYPE = 24
636
+ FIXED_HEADER = Structs::Rtmsg
637
+ ATTRIBUTE_SET = AttributeSets::RouteAttrs
638
+ ATTRIBUTES = Ractor.make_shareable(%i[dst src iif oif gateway priority prefsrc metrics multipath flow cacheinfo table mark mfc_stats via newdst pref encap_type encap expires pad uid ttl_propagate ip_proto sport dport nh_id flowlabel])
639
+ # Gets the value of `rtm-family` field in the message's fixed header.
640
+ #--
641
+ # @rbs return: ::Integer
642
+ def rtm_family; fixed_header.rtm_family; end
643
+ # Gets the value of `rtm-dst-len` field in the message's fixed header.
644
+ #--
645
+ # @rbs return: ::Integer
646
+ def rtm_dst_len; fixed_header.rtm_dst_len; end
647
+ # Gets the value of `rtm-src-len` field in the message's fixed header.
648
+ #--
649
+ # @rbs return: ::Integer
650
+ def rtm_src_len; fixed_header.rtm_src_len; end
651
+ # Gets the value of `rtm-tos` field in the message's fixed header.
652
+ #--
653
+ # @rbs return: ::Integer
654
+ def rtm_tos; fixed_header.rtm_tos; end
655
+ # Gets the value of `rtm-table` field in the message's fixed header.
656
+ #--
657
+ # @rbs return: ::Integer
658
+ def rtm_table; fixed_header.rtm_table; end
659
+ # Gets the value of `rtm-protocol` field in the message's fixed header.
660
+ #--
661
+ # @rbs return: ::Integer
662
+ def rtm_protocol; fixed_header.rtm_protocol; end
663
+ # Gets the value of `rtm-scope` field in the message's fixed header.
664
+ #--
665
+ # @rbs return: ::Integer
666
+ def rtm_scope; fixed_header.rtm_scope; end
667
+ # Gets the value of `rtm-type` field in the message's fixed header.
668
+ #--
669
+ # @rbs return: ::Integer
670
+ def rtm_type; fixed_header.rtm_type; end
671
+ # Gets the value of `rtm-flags` field in the message's fixed header.
672
+ #--
673
+ # @rbs return: ::Integer
674
+ def rtm_flags; fixed_header.rtm_flags; end
675
+ # Gets the value of `dst` attribute in the message.
676
+ #--
677
+ # @rbs return: untyped
678
+ def dst; attributes[:"dst"]&.value; end
679
+ # Gets the value of `src` attribute in the message.
680
+ #--
681
+ # @rbs return: untyped
682
+ def src; attributes[:"src"]&.value; end
683
+ # Gets the value of `iif` attribute in the message.
684
+ #--
685
+ # @rbs return: ::Integer
686
+ def iif; attributes[:"iif"]&.value; end
687
+ # Gets the value of `oif` attribute in the message.
688
+ #--
689
+ # @rbs return: ::Integer
690
+ def oif; attributes[:"oif"]&.value; end
691
+ # Gets the value of `gateway` attribute in the message.
692
+ #--
693
+ # @rbs return: untyped
694
+ def gateway; attributes[:"gateway"]&.value; end
695
+ # Gets the value of `priority` attribute in the message.
696
+ #--
697
+ # @rbs return: ::Integer
698
+ def priority; attributes[:"priority"]&.value; end
699
+ # Gets the value of `prefsrc` attribute in the message.
700
+ #--
701
+ # @rbs return: untyped
702
+ def prefsrc; attributes[:"prefsrc"]&.value; end
703
+ # Gets the value of `metrics` attribute in the message.
704
+ #--
705
+ # @rbs return: AttributeSets::Metrics
706
+ def metrics; attributes[:"metrics"]&.value; end
707
+ # Gets the value of `multipath` attribute in the message.
708
+ #--
709
+ # @rbs return: untyped
710
+ def multipath; attributes[:"multipath"]&.value; end
711
+ # Gets the value of `flow` attribute in the message.
712
+ #--
713
+ # @rbs return: ::Integer
714
+ def flow; attributes[:"flow"]&.value; end
715
+ # Gets the value of `cacheinfo` attribute in the message.
716
+ #--
717
+ # @rbs return: untyped
718
+ def cacheinfo; attributes[:"cacheinfo"]&.value; end
719
+ # Gets the value of `table` attribute in the message.
720
+ #--
721
+ # @rbs return: ::Integer
722
+ def table; attributes[:"table"]&.value; end
723
+ # Gets the value of `mark` attribute in the message.
724
+ #--
725
+ # @rbs return: ::Integer
726
+ def mark; attributes[:"mark"]&.value; end
727
+ # Gets the value of `mfc-stats` attribute in the message.
728
+ #--
729
+ # @rbs return: untyped
730
+ def mfc_stats; attributes[:"mfc_stats"]&.value; end
731
+ # Gets the value of `via` attribute in the message.
732
+ #--
733
+ # @rbs return: untyped
734
+ def via; attributes[:"via"]&.value; end
735
+ # Gets the value of `newdst` attribute in the message.
736
+ #--
737
+ # @rbs return: untyped
738
+ def newdst; attributes[:"newdst"]&.value; end
739
+ # Gets the value of `pref` attribute in the message.
740
+ #--
741
+ # @rbs return: ::Integer
742
+ def pref; attributes[:"pref"]&.value; end
743
+ # Gets the value of `encap-type` attribute in the message.
744
+ #--
745
+ # @rbs return: ::Integer
746
+ def encap_type; attributes[:"encap_type"]&.value; end
747
+ # Gets the value of `encap` attribute in the message.
748
+ #--
749
+ # @rbs return: untyped
750
+ def encap; attributes[:"encap"]&.value; end
751
+ # Gets the value of `expires` attribute in the message.
752
+ #--
753
+ # @rbs return: ::Integer
754
+ def expires; attributes[:"expires"]&.value; end
755
+ # Gets the value of `pad` attribute in the message.
756
+ #--
757
+ # @rbs return: untyped
758
+ def pad; attributes[:"pad"]&.value; end
759
+ # Gets the value of `uid` attribute in the message.
760
+ #--
761
+ # @rbs return: ::Integer
762
+ def uid; attributes[:"uid"]&.value; end
763
+ # Gets the value of `ttl-propagate` attribute in the message.
764
+ #--
765
+ # @rbs return: ::Integer
766
+ def ttl_propagate; attributes[:"ttl_propagate"]&.value; end
767
+ # Gets the value of `ip-proto` attribute in the message.
768
+ #--
769
+ # @rbs return: ::Integer
770
+ def ip_proto; attributes[:"ip_proto"]&.value; end
771
+ # Gets the value of `sport` attribute in the message.
772
+ #--
773
+ # @rbs return: ::Integer
774
+ def sport; attributes[:"sport"]&.value; end
775
+ # Gets the value of `dport` attribute in the message.
776
+ #--
777
+ # @rbs return: ::Integer
778
+ def dport; attributes[:"dport"]&.value; end
779
+ # Gets the value of `nh-id` attribute in the message.
780
+ #--
781
+ # @rbs return: ::Integer
782
+ def nh_id; attributes[:"nh_id"]&.value; end
783
+ # Gets the value of `flowlabel` attribute in the message.
784
+ #--
785
+ # @rbs return: ::Integer
786
+ def flowlabel; attributes[:"flowlabel"]&.value; end
787
+ end
788
+ # Create a new route
789
+ class DoNewrouteRequest < ::Nl::Protocols::Raw::Message
790
+ TYPE = 24
791
+ FIXED_HEADER = Structs::Rtmsg
792
+ ATTRIBUTE_SET = AttributeSets::RouteAttrs
793
+ ATTRIBUTES = Ractor.make_shareable(%i[dst src iif oif gateway priority prefsrc metrics multipath flow cacheinfo table mark mfc_stats via newdst pref encap_type encap expires pad uid ttl_propagate ip_proto sport dport nh_id flowlabel])
794
+ # Gets the value of `rtm-family` field in the message's fixed header.
795
+ #--
796
+ # @rbs return: ::Integer
797
+ def rtm_family; fixed_header.rtm_family; end
798
+ # Gets the value of `rtm-dst-len` field in the message's fixed header.
799
+ #--
800
+ # @rbs return: ::Integer
801
+ def rtm_dst_len; fixed_header.rtm_dst_len; end
802
+ # Gets the value of `rtm-src-len` field in the message's fixed header.
803
+ #--
804
+ # @rbs return: ::Integer
805
+ def rtm_src_len; fixed_header.rtm_src_len; end
806
+ # Gets the value of `rtm-tos` field in the message's fixed header.
807
+ #--
808
+ # @rbs return: ::Integer
809
+ def rtm_tos; fixed_header.rtm_tos; end
810
+ # Gets the value of `rtm-table` field in the message's fixed header.
811
+ #--
812
+ # @rbs return: ::Integer
813
+ def rtm_table; fixed_header.rtm_table; end
814
+ # Gets the value of `rtm-protocol` field in the message's fixed header.
815
+ #--
816
+ # @rbs return: ::Integer
817
+ def rtm_protocol; fixed_header.rtm_protocol; end
818
+ # Gets the value of `rtm-scope` field in the message's fixed header.
819
+ #--
820
+ # @rbs return: ::Integer
821
+ def rtm_scope; fixed_header.rtm_scope; end
822
+ # Gets the value of `rtm-type` field in the message's fixed header.
823
+ #--
824
+ # @rbs return: ::Integer
825
+ def rtm_type; fixed_header.rtm_type; end
826
+ # Gets the value of `rtm-flags` field in the message's fixed header.
827
+ #--
828
+ # @rbs return: ::Integer
829
+ def rtm_flags; fixed_header.rtm_flags; end
830
+ # Gets the value of `dst` attribute in the message.
831
+ #--
832
+ # @rbs return: untyped
833
+ def dst; attributes[:"dst"]&.value; end
834
+ # Gets the value of `src` attribute in the message.
835
+ #--
836
+ # @rbs return: untyped
837
+ def src; attributes[:"src"]&.value; end
838
+ # Gets the value of `iif` attribute in the message.
839
+ #--
840
+ # @rbs return: ::Integer
841
+ def iif; attributes[:"iif"]&.value; end
842
+ # Gets the value of `oif` attribute in the message.
843
+ #--
844
+ # @rbs return: ::Integer
845
+ def oif; attributes[:"oif"]&.value; end
846
+ # Gets the value of `gateway` attribute in the message.
847
+ #--
848
+ # @rbs return: untyped
849
+ def gateway; attributes[:"gateway"]&.value; end
850
+ # Gets the value of `priority` attribute in the message.
851
+ #--
852
+ # @rbs return: ::Integer
853
+ def priority; attributes[:"priority"]&.value; end
854
+ # Gets the value of `prefsrc` attribute in the message.
855
+ #--
856
+ # @rbs return: untyped
857
+ def prefsrc; attributes[:"prefsrc"]&.value; end
858
+ # Gets the value of `metrics` attribute in the message.
859
+ #--
860
+ # @rbs return: AttributeSets::Metrics
861
+ def metrics; attributes[:"metrics"]&.value; end
862
+ # Gets the value of `multipath` attribute in the message.
863
+ #--
864
+ # @rbs return: untyped
865
+ def multipath; attributes[:"multipath"]&.value; end
866
+ # Gets the value of `flow` attribute in the message.
867
+ #--
868
+ # @rbs return: ::Integer
869
+ def flow; attributes[:"flow"]&.value; end
870
+ # Gets the value of `cacheinfo` attribute in the message.
871
+ #--
872
+ # @rbs return: untyped
873
+ def cacheinfo; attributes[:"cacheinfo"]&.value; end
874
+ # Gets the value of `table` attribute in the message.
875
+ #--
876
+ # @rbs return: ::Integer
877
+ def table; attributes[:"table"]&.value; end
878
+ # Gets the value of `mark` attribute in the message.
879
+ #--
880
+ # @rbs return: ::Integer
881
+ def mark; attributes[:"mark"]&.value; end
882
+ # Gets the value of `mfc-stats` attribute in the message.
883
+ #--
884
+ # @rbs return: untyped
885
+ def mfc_stats; attributes[:"mfc_stats"]&.value; end
886
+ # Gets the value of `via` attribute in the message.
887
+ #--
888
+ # @rbs return: untyped
889
+ def via; attributes[:"via"]&.value; end
890
+ # Gets the value of `newdst` attribute in the message.
891
+ #--
892
+ # @rbs return: untyped
893
+ def newdst; attributes[:"newdst"]&.value; end
894
+ # Gets the value of `pref` attribute in the message.
895
+ #--
896
+ # @rbs return: ::Integer
897
+ def pref; attributes[:"pref"]&.value; end
898
+ # Gets the value of `encap-type` attribute in the message.
899
+ #--
900
+ # @rbs return: ::Integer
901
+ def encap_type; attributes[:"encap_type"]&.value; end
902
+ # Gets the value of `encap` attribute in the message.
903
+ #--
904
+ # @rbs return: untyped
905
+ def encap; attributes[:"encap"]&.value; end
906
+ # Gets the value of `expires` attribute in the message.
907
+ #--
908
+ # @rbs return: ::Integer
909
+ def expires; attributes[:"expires"]&.value; end
910
+ # Gets the value of `pad` attribute in the message.
911
+ #--
912
+ # @rbs return: untyped
913
+ def pad; attributes[:"pad"]&.value; end
914
+ # Gets the value of `uid` attribute in the message.
915
+ #--
916
+ # @rbs return: ::Integer
917
+ def uid; attributes[:"uid"]&.value; end
918
+ # Gets the value of `ttl-propagate` attribute in the message.
919
+ #--
920
+ # @rbs return: ::Integer
921
+ def ttl_propagate; attributes[:"ttl_propagate"]&.value; end
922
+ # Gets the value of `ip-proto` attribute in the message.
923
+ #--
924
+ # @rbs return: ::Integer
925
+ def ip_proto; attributes[:"ip_proto"]&.value; end
926
+ # Gets the value of `sport` attribute in the message.
927
+ #--
928
+ # @rbs return: ::Integer
929
+ def sport; attributes[:"sport"]&.value; end
930
+ # Gets the value of `dport` attribute in the message.
931
+ #--
932
+ # @rbs return: ::Integer
933
+ def dport; attributes[:"dport"]&.value; end
934
+ # Gets the value of `nh-id` attribute in the message.
935
+ #--
936
+ # @rbs return: ::Integer
937
+ def nh_id; attributes[:"nh_id"]&.value; end
938
+ # Gets the value of `flowlabel` attribute in the message.
939
+ #--
940
+ # @rbs return: ::Integer
941
+ def flowlabel; attributes[:"flowlabel"]&.value; end
942
+ end
943
+ # Delete an existing route
944
+ class DoDelrouteRequest < ::Nl::Protocols::Raw::Message
945
+ TYPE = 25
946
+ FIXED_HEADER = Structs::Rtmsg
947
+ ATTRIBUTE_SET = AttributeSets::RouteAttrs
948
+ ATTRIBUTES = Ractor.make_shareable(%i[dst src iif oif gateway priority prefsrc metrics multipath flow cacheinfo table mark mfc_stats via newdst pref encap_type encap expires pad uid ttl_propagate ip_proto sport dport nh_id flowlabel])
949
+ # Gets the value of `rtm-family` field in the message's fixed header.
950
+ #--
951
+ # @rbs return: ::Integer
952
+ def rtm_family; fixed_header.rtm_family; end
953
+ # Gets the value of `rtm-dst-len` field in the message's fixed header.
954
+ #--
955
+ # @rbs return: ::Integer
956
+ def rtm_dst_len; fixed_header.rtm_dst_len; end
957
+ # Gets the value of `rtm-src-len` field in the message's fixed header.
958
+ #--
959
+ # @rbs return: ::Integer
960
+ def rtm_src_len; fixed_header.rtm_src_len; end
961
+ # Gets the value of `rtm-tos` field in the message's fixed header.
962
+ #--
963
+ # @rbs return: ::Integer
964
+ def rtm_tos; fixed_header.rtm_tos; end
965
+ # Gets the value of `rtm-table` field in the message's fixed header.
966
+ #--
967
+ # @rbs return: ::Integer
968
+ def rtm_table; fixed_header.rtm_table; end
969
+ # Gets the value of `rtm-protocol` field in the message's fixed header.
970
+ #--
971
+ # @rbs return: ::Integer
972
+ def rtm_protocol; fixed_header.rtm_protocol; end
973
+ # Gets the value of `rtm-scope` field in the message's fixed header.
974
+ #--
975
+ # @rbs return: ::Integer
976
+ def rtm_scope; fixed_header.rtm_scope; end
977
+ # Gets the value of `rtm-type` field in the message's fixed header.
978
+ #--
979
+ # @rbs return: ::Integer
980
+ def rtm_type; fixed_header.rtm_type; end
981
+ # Gets the value of `rtm-flags` field in the message's fixed header.
982
+ #--
983
+ # @rbs return: ::Integer
984
+ def rtm_flags; fixed_header.rtm_flags; end
985
+ # Gets the value of `dst` attribute in the message.
986
+ #--
987
+ # @rbs return: untyped
988
+ def dst; attributes[:"dst"]&.value; end
989
+ # Gets the value of `src` attribute in the message.
990
+ #--
991
+ # @rbs return: untyped
992
+ def src; attributes[:"src"]&.value; end
993
+ # Gets the value of `iif` attribute in the message.
994
+ #--
995
+ # @rbs return: ::Integer
996
+ def iif; attributes[:"iif"]&.value; end
997
+ # Gets the value of `oif` attribute in the message.
998
+ #--
999
+ # @rbs return: ::Integer
1000
+ def oif; attributes[:"oif"]&.value; end
1001
+ # Gets the value of `gateway` attribute in the message.
1002
+ #--
1003
+ # @rbs return: untyped
1004
+ def gateway; attributes[:"gateway"]&.value; end
1005
+ # Gets the value of `priority` attribute in the message.
1006
+ #--
1007
+ # @rbs return: ::Integer
1008
+ def priority; attributes[:"priority"]&.value; end
1009
+ # Gets the value of `prefsrc` attribute in the message.
1010
+ #--
1011
+ # @rbs return: untyped
1012
+ def prefsrc; attributes[:"prefsrc"]&.value; end
1013
+ # Gets the value of `metrics` attribute in the message.
1014
+ #--
1015
+ # @rbs return: AttributeSets::Metrics
1016
+ def metrics; attributes[:"metrics"]&.value; end
1017
+ # Gets the value of `multipath` attribute in the message.
1018
+ #--
1019
+ # @rbs return: untyped
1020
+ def multipath; attributes[:"multipath"]&.value; end
1021
+ # Gets the value of `flow` attribute in the message.
1022
+ #--
1023
+ # @rbs return: ::Integer
1024
+ def flow; attributes[:"flow"]&.value; end
1025
+ # Gets the value of `cacheinfo` attribute in the message.
1026
+ #--
1027
+ # @rbs return: untyped
1028
+ def cacheinfo; attributes[:"cacheinfo"]&.value; end
1029
+ # Gets the value of `table` attribute in the message.
1030
+ #--
1031
+ # @rbs return: ::Integer
1032
+ def table; attributes[:"table"]&.value; end
1033
+ # Gets the value of `mark` attribute in the message.
1034
+ #--
1035
+ # @rbs return: ::Integer
1036
+ def mark; attributes[:"mark"]&.value; end
1037
+ # Gets the value of `mfc-stats` attribute in the message.
1038
+ #--
1039
+ # @rbs return: untyped
1040
+ def mfc_stats; attributes[:"mfc_stats"]&.value; end
1041
+ # Gets the value of `via` attribute in the message.
1042
+ #--
1043
+ # @rbs return: untyped
1044
+ def via; attributes[:"via"]&.value; end
1045
+ # Gets the value of `newdst` attribute in the message.
1046
+ #--
1047
+ # @rbs return: untyped
1048
+ def newdst; attributes[:"newdst"]&.value; end
1049
+ # Gets the value of `pref` attribute in the message.
1050
+ #--
1051
+ # @rbs return: ::Integer
1052
+ def pref; attributes[:"pref"]&.value; end
1053
+ # Gets the value of `encap-type` attribute in the message.
1054
+ #--
1055
+ # @rbs return: ::Integer
1056
+ def encap_type; attributes[:"encap_type"]&.value; end
1057
+ # Gets the value of `encap` attribute in the message.
1058
+ #--
1059
+ # @rbs return: untyped
1060
+ def encap; attributes[:"encap"]&.value; end
1061
+ # Gets the value of `expires` attribute in the message.
1062
+ #--
1063
+ # @rbs return: ::Integer
1064
+ def expires; attributes[:"expires"]&.value; end
1065
+ # Gets the value of `pad` attribute in the message.
1066
+ #--
1067
+ # @rbs return: untyped
1068
+ def pad; attributes[:"pad"]&.value; end
1069
+ # Gets the value of `uid` attribute in the message.
1070
+ #--
1071
+ # @rbs return: ::Integer
1072
+ def uid; attributes[:"uid"]&.value; end
1073
+ # Gets the value of `ttl-propagate` attribute in the message.
1074
+ #--
1075
+ # @rbs return: ::Integer
1076
+ def ttl_propagate; attributes[:"ttl_propagate"]&.value; end
1077
+ # Gets the value of `ip-proto` attribute in the message.
1078
+ #--
1079
+ # @rbs return: ::Integer
1080
+ def ip_proto; attributes[:"ip_proto"]&.value; end
1081
+ # Gets the value of `sport` attribute in the message.
1082
+ #--
1083
+ # @rbs return: ::Integer
1084
+ def sport; attributes[:"sport"]&.value; end
1085
+ # Gets the value of `dport` attribute in the message.
1086
+ #--
1087
+ # @rbs return: ::Integer
1088
+ def dport; attributes[:"dport"]&.value; end
1089
+ # Gets the value of `nh-id` attribute in the message.
1090
+ #--
1091
+ # @rbs return: ::Integer
1092
+ def nh_id; attributes[:"nh_id"]&.value; end
1093
+ # Gets the value of `flowlabel` attribute in the message.
1094
+ #--
1095
+ # @rbs return: ::Integer
1096
+ def flowlabel; attributes[:"flowlabel"]&.value; end
1097
+ end
1098
+ end
1099
+ # Dump route information.
1100
+ #--
1101
+ # @rbs (?rtm_family: ::Integer, ?rtm_dst_len: ::Integer, ?rtm_src_len: ::Integer, ?rtm_tos: ::Integer, ?rtm_table: ::Integer, ?rtm_protocol: ::Integer, ?rtm_scope: ::Integer, ?rtm_type: ::Integer, ?rtm_flags: ::Integer, ?dst: untyped, ?src: untyped, ?iif: ::Integer, ?oif: ::Integer, ?mark: ::Integer, ?uid: ::Integer, ?ip_proto: ::Integer, ?sport: ::Integer, ?dport: ::Integer, ?flowlabel: ::Integer) -> Messages::DoGetrouteReply
1102
+ def do_getroute(**args)
1103
+ exchange_message(:"do", Messages::DoGetrouteRequest, Messages::DoGetrouteReply, args)
1104
+ end
1105
+ # Dump route information.
1106
+ #--
1107
+ # @rbs (?rtm_family: ::Integer, ?rtm_dst_len: ::Integer, ?rtm_src_len: ::Integer, ?rtm_tos: ::Integer, ?rtm_table: ::Integer, ?rtm_protocol: ::Integer, ?rtm_scope: ::Integer, ?rtm_type: ::Integer, ?rtm_flags: ::Integer) -> Enumerable[Messages::DumpGetrouteReply]
1108
+ # | (?rtm_family: ::Integer, ?rtm_dst_len: ::Integer, ?rtm_src_len: ::Integer, ?rtm_tos: ::Integer, ?rtm_table: ::Integer, ?rtm_protocol: ::Integer, ?rtm_scope: ::Integer, ?rtm_type: ::Integer, ?rtm_flags: ::Integer) { (Messages::DumpGetrouteReply) -> void } -> void
1109
+ def dump_getroute(**args, &block)
1110
+ exchange_message(:"dump", Messages::DumpGetrouteRequest, Messages::DumpGetrouteReply, args, &block)
1111
+ end
1112
+ # Create a new route
1113
+ #--
1114
+ # @rbs (?rtm_family: ::Integer, ?rtm_dst_len: ::Integer, ?rtm_src_len: ::Integer, ?rtm_tos: ::Integer, ?rtm_table: ::Integer, ?rtm_protocol: ::Integer, ?rtm_scope: ::Integer, ?rtm_type: ::Integer, ?rtm_flags: ::Integer, ?dst: untyped, ?src: untyped, ?iif: ::Integer, ?oif: ::Integer, ?gateway: untyped, ?priority: ::Integer, ?prefsrc: untyped, ?metrics: AttributeSets::Metrics, ?multipath: untyped, ?flow: ::Integer, ?cacheinfo: untyped, ?table: ::Integer, ?mark: ::Integer, ?mfc_stats: untyped, ?via: untyped, ?newdst: untyped, ?pref: ::Integer, ?encap_type: ::Integer, ?encap: untyped, ?expires: ::Integer, ?pad: untyped, ?uid: ::Integer, ?ttl_propagate: ::Integer, ?ip_proto: ::Integer, ?sport: ::Integer, ?dport: ::Integer, ?nh_id: ::Integer, ?flowlabel: ::Integer) -> void
1115
+ def do_newroute(**args)
1116
+ exchange_message(:"do", Messages::DoNewrouteRequest, nil, args)
1117
+ end
1118
+ # Delete an existing route
1119
+ #--
1120
+ # @rbs (?rtm_family: ::Integer, ?rtm_dst_len: ::Integer, ?rtm_src_len: ::Integer, ?rtm_tos: ::Integer, ?rtm_table: ::Integer, ?rtm_protocol: ::Integer, ?rtm_scope: ::Integer, ?rtm_type: ::Integer, ?rtm_flags: ::Integer, ?dst: untyped, ?src: untyped, ?iif: ::Integer, ?oif: ::Integer, ?gateway: untyped, ?priority: ::Integer, ?prefsrc: untyped, ?metrics: AttributeSets::Metrics, ?multipath: untyped, ?flow: ::Integer, ?cacheinfo: untyped, ?table: ::Integer, ?mark: ::Integer, ?mfc_stats: untyped, ?via: untyped, ?newdst: untyped, ?pref: ::Integer, ?encap_type: ::Integer, ?encap: untyped, ?expires: ::Integer, ?pad: untyped, ?uid: ::Integer, ?ttl_propagate: ::Integer, ?ip_proto: ::Integer, ?sport: ::Integer, ?dport: ::Integer, ?nh_id: ::Integer, ?flowlabel: ::Integer) -> void
1121
+ def do_delroute(**args)
1122
+ exchange_message(:"do", Messages::DoDelrouteRequest, nil, args)
1123
+ end
1124
+ end