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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Rakefile +31 -5
- data/generated/nl/linux/binder.rb +96 -0
- data/generated/nl/linux/conntrack.rb +1227 -0
- data/generated/nl/linux/dev_energymodel.rb +235 -0
- data/generated/nl/linux/devlink.rb +5177 -0
- data/generated/nl/linux/dpll.rb +944 -0
- data/generated/nl/linux/ethtool.rb +7121 -0
- data/generated/nl/linux/fou.rb +332 -0
- data/generated/nl/linux/handshake.rb +238 -0
- data/generated/nl/linux/lockd.rb +99 -0
- data/generated/nl/linux/mptcp_pm.rb +607 -0
- data/generated/nl/linux/net_shaper.rb +731 -0
- data/generated/nl/linux/netdev.rb +1450 -0
- data/generated/nl/linux/nfsd.rb +500 -0
- data/generated/nl/linux/nftables.rb +2924 -0
- data/generated/nl/linux/nl80211.rb +3393 -0
- data/generated/nl/linux/nlctrl.rb +397 -0
- data/generated/nl/linux/ovpn.rb +964 -0
- data/generated/nl/linux/ovs_datapath.rb +321 -0
- data/generated/nl/linux/ovs_flow.rb +1447 -0
- data/generated/nl/linux/ovs_vport.rb +391 -0
- data/generated/nl/linux/psp.rb +463 -0
- data/generated/nl/linux/rt_addr.rb +448 -0
- data/generated/nl/linux/rt_link.rb +4613 -0
- data/generated/nl/linux/rt_neigh.rb +897 -0
- data/generated/nl/linux/rt_route.rb +1126 -0
- data/generated/nl/linux/rt_rule.rb +708 -0
- data/generated/nl/linux/tc.rb +7066 -0
- data/generated/nl/linux/tcp_metrics.rb +317 -0
- data/generated/nl/linux/team.rb +339 -0
- data/generated/nl/linux/wireguard.rb +430 -0
- data/generated/nl/linux.rb +35 -0
- data/lib/nl/linux/version.rb +1 -1
- data/lib/nl-linux.rb +1 -1
- metadata +37 -7
- data/lib/nl/linux.rb +0 -3
|
@@ -0,0 +1,448 @@
|
|
|
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
|
+
# Address configuration over rtnetlink.
|
|
9
|
+
class RtAddr < ::Nl::Family
|
|
10
|
+
NAME = "rt-addr"
|
|
11
|
+
PROTOCOL = Ractor.make_shareable(::Nl::Protocols::Raw.new("rt-addr", 0))
|
|
12
|
+
module Structs
|
|
13
|
+
Ifaddrmsg = Struct.new(
|
|
14
|
+
:"ifa_family", #: ::Integer
|
|
15
|
+
:"ifa_prefixlen", #: ::Integer
|
|
16
|
+
:"ifa_flags", #: ::Integer
|
|
17
|
+
:"ifa_scope", #: ::Integer
|
|
18
|
+
:"ifa_index", #: ::Integer
|
|
19
|
+
)
|
|
20
|
+
class Ifaddrmsg
|
|
21
|
+
# :nodoc:
|
|
22
|
+
MEMBERS = Ractor.make_shareable({ifa_family: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), ifa_prefixlen: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), ifa_flags: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), ifa_scope: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), ifa_index: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
|
|
23
|
+
# Decodes the struct.
|
|
24
|
+
#--
|
|
25
|
+
# @rbs decoder: ::Nl::Decoder
|
|
26
|
+
# @rbs return: instance
|
|
27
|
+
def self.decode(decoder)
|
|
28
|
+
self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
|
|
29
|
+
end
|
|
30
|
+
# Encodes the struct.
|
|
31
|
+
#--
|
|
32
|
+
# @rbs encoder: ::Nl::Encoder
|
|
33
|
+
# @rbs return: void
|
|
34
|
+
def encode(encoder)
|
|
35
|
+
MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
IfaCacheinfo = Struct.new(
|
|
39
|
+
:"ifa_prefered", #: ::Integer
|
|
40
|
+
:"ifa_valid", #: ::Integer
|
|
41
|
+
:"cstamp", #: ::Integer
|
|
42
|
+
:"tstamp", #: ::Integer
|
|
43
|
+
)
|
|
44
|
+
class IfaCacheinfo
|
|
45
|
+
# :nodoc:
|
|
46
|
+
MEMBERS = Ractor.make_shareable({ifa_prefered: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil), ifa_valid: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil), cstamp: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil), tstamp: ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
|
|
47
|
+
# Decodes the struct.
|
|
48
|
+
#--
|
|
49
|
+
# @rbs decoder: ::Nl::Decoder
|
|
50
|
+
# @rbs return: instance
|
|
51
|
+
def self.decode(decoder)
|
|
52
|
+
self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
|
|
53
|
+
end
|
|
54
|
+
# Encodes the struct.
|
|
55
|
+
#--
|
|
56
|
+
# @rbs encoder: ::Nl::Encoder
|
|
57
|
+
# @rbs return: void
|
|
58
|
+
def encode(encoder)
|
|
59
|
+
MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
module AttributeSets
|
|
64
|
+
class AddrAttrs < ::Nl::Protocols::Raw::AttributeSet
|
|
65
|
+
# Abstract class
|
|
66
|
+
class Attribute < ::Nl::Protocols::Raw::AttributeSet::Attribute
|
|
67
|
+
end
|
|
68
|
+
class Address < Attribute
|
|
69
|
+
TYPE = 1
|
|
70
|
+
NAME = :"address"
|
|
71
|
+
DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
|
|
72
|
+
end
|
|
73
|
+
class Local < Attribute
|
|
74
|
+
TYPE = 2
|
|
75
|
+
NAME = :"local"
|
|
76
|
+
DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
|
|
77
|
+
end
|
|
78
|
+
class Label < Attribute
|
|
79
|
+
TYPE = 3
|
|
80
|
+
NAME = :"label"
|
|
81
|
+
DATATYPE = ::Nl::Protocols::Raw::DataTypes::String.new(check: nil)
|
|
82
|
+
end
|
|
83
|
+
class Broadcast < Attribute
|
|
84
|
+
TYPE = 4
|
|
85
|
+
NAME = :"broadcast"
|
|
86
|
+
DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)
|
|
87
|
+
end
|
|
88
|
+
class Anycast < Attribute
|
|
89
|
+
TYPE = 5
|
|
90
|
+
NAME = :"anycast"
|
|
91
|
+
DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
|
|
92
|
+
end
|
|
93
|
+
class Cacheinfo < Attribute
|
|
94
|
+
TYPE = 6
|
|
95
|
+
NAME = :"cacheinfo"
|
|
96
|
+
DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
|
|
97
|
+
end
|
|
98
|
+
class Multicast < Attribute
|
|
99
|
+
TYPE = 7
|
|
100
|
+
NAME = :"multicast"
|
|
101
|
+
DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
|
|
102
|
+
end
|
|
103
|
+
class Flags < Attribute
|
|
104
|
+
TYPE = 8
|
|
105
|
+
NAME = :"flags"
|
|
106
|
+
DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
107
|
+
end
|
|
108
|
+
class RtPriority < Attribute
|
|
109
|
+
TYPE = 9
|
|
110
|
+
NAME = :"rt_priority"
|
|
111
|
+
DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
112
|
+
end
|
|
113
|
+
class TargetNetnsid < Attribute
|
|
114
|
+
TYPE = 10
|
|
115
|
+
NAME = :"target_netnsid"
|
|
116
|
+
DATATYPE = ::Nl::Protocols::Raw::DataTypes::Binary.new(check: nil)
|
|
117
|
+
end
|
|
118
|
+
class Proto < Attribute
|
|
119
|
+
TYPE = 11
|
|
120
|
+
NAME = :"proto"
|
|
121
|
+
DATATYPE = ::Nl::Protocols::Raw::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
122
|
+
end
|
|
123
|
+
# :nodoc:
|
|
124
|
+
BY_NAME = Ractor.make_shareable({:"address" => Address, :"local" => Local, :"label" => Label, :"broadcast" => Broadcast, :"anycast" => Anycast, :"cacheinfo" => Cacheinfo, :"multicast" => Multicast, :"flags" => Flags, :"rt_priority" => RtPriority, :"target_netnsid" => TargetNetnsid, :"proto" => Proto}) #: Hash[::Symbol, Attribute]
|
|
125
|
+
# :nodoc:
|
|
126
|
+
BY_TYPE = Ractor.make_shareable({1 => Address, 2 => Local, 3 => Label, 4 => Broadcast, 5 => Anycast, 6 => Cacheinfo, 7 => Multicast, 8 => Flags, 9 => RtPriority, 10 => TargetNetnsid, 11 => Proto}) #: Hash[::Integer, Attribute]
|
|
127
|
+
class << self
|
|
128
|
+
# Looks up Attribute class by name.
|
|
129
|
+
#--
|
|
130
|
+
# @rbs name: Symbol
|
|
131
|
+
# @rbs return: Attribute
|
|
132
|
+
def by_name(name); BY_NAME.fetch(name); end
|
|
133
|
+
# Looks up Attribute class by type value.
|
|
134
|
+
#--
|
|
135
|
+
# @rbs type: Integer
|
|
136
|
+
# @rbs return: Attribute
|
|
137
|
+
def by_type(type); BY_TYPE.fetch(type); end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
module Messages
|
|
142
|
+
# Add new address
|
|
143
|
+
class DoNewaddrRequest < ::Nl::Protocols::Raw::Message
|
|
144
|
+
TYPE = 20
|
|
145
|
+
FIXED_HEADER = Structs::Ifaddrmsg
|
|
146
|
+
ATTRIBUTE_SET = AttributeSets::AddrAttrs
|
|
147
|
+
ATTRIBUTES = Ractor.make_shareable(%i[address local label cacheinfo])
|
|
148
|
+
# Gets the value of `ifa-family` field in the message's fixed header.
|
|
149
|
+
#--
|
|
150
|
+
# @rbs return: ::Integer
|
|
151
|
+
def ifa_family; fixed_header.ifa_family; end
|
|
152
|
+
# Gets the value of `ifa-prefixlen` field in the message's fixed header.
|
|
153
|
+
#--
|
|
154
|
+
# @rbs return: ::Integer
|
|
155
|
+
def ifa_prefixlen; fixed_header.ifa_prefixlen; end
|
|
156
|
+
# Gets the value of `ifa-flags` field in the message's fixed header.
|
|
157
|
+
#--
|
|
158
|
+
# @rbs return: ::Integer
|
|
159
|
+
def ifa_flags; fixed_header.ifa_flags; end
|
|
160
|
+
# Gets the value of `ifa-scope` field in the message's fixed header.
|
|
161
|
+
#--
|
|
162
|
+
# @rbs return: ::Integer
|
|
163
|
+
def ifa_scope; fixed_header.ifa_scope; end
|
|
164
|
+
# Gets the value of `ifa-index` field in the message's fixed header.
|
|
165
|
+
#--
|
|
166
|
+
# @rbs return: ::Integer
|
|
167
|
+
def ifa_index; fixed_header.ifa_index; end
|
|
168
|
+
# Gets the value of `address` attribute in the message.
|
|
169
|
+
#--
|
|
170
|
+
# @rbs return: untyped
|
|
171
|
+
def address; attributes[:"address"]&.value; end
|
|
172
|
+
# Gets the value of `local` attribute in the message.
|
|
173
|
+
#--
|
|
174
|
+
# @rbs return: untyped
|
|
175
|
+
def local; attributes[:"local"]&.value; end
|
|
176
|
+
# Gets the value of `label` attribute in the message.
|
|
177
|
+
#--
|
|
178
|
+
# @rbs return: ::String
|
|
179
|
+
def label; attributes[:"label"]&.value; end
|
|
180
|
+
# Gets the value of `cacheinfo` attribute in the message.
|
|
181
|
+
#--
|
|
182
|
+
# @rbs return: untyped
|
|
183
|
+
def cacheinfo; attributes[:"cacheinfo"]&.value; end
|
|
184
|
+
end
|
|
185
|
+
# Remove address
|
|
186
|
+
class DoDeladdrRequest < ::Nl::Protocols::Raw::Message
|
|
187
|
+
TYPE = 21
|
|
188
|
+
FIXED_HEADER = Structs::Ifaddrmsg
|
|
189
|
+
ATTRIBUTE_SET = AttributeSets::AddrAttrs
|
|
190
|
+
ATTRIBUTES = Ractor.make_shareable(%i[address local])
|
|
191
|
+
# Gets the value of `ifa-family` field in the message's fixed header.
|
|
192
|
+
#--
|
|
193
|
+
# @rbs return: ::Integer
|
|
194
|
+
def ifa_family; fixed_header.ifa_family; end
|
|
195
|
+
# Gets the value of `ifa-prefixlen` field in the message's fixed header.
|
|
196
|
+
#--
|
|
197
|
+
# @rbs return: ::Integer
|
|
198
|
+
def ifa_prefixlen; fixed_header.ifa_prefixlen; end
|
|
199
|
+
# Gets the value of `ifa-flags` field in the message's fixed header.
|
|
200
|
+
#--
|
|
201
|
+
# @rbs return: ::Integer
|
|
202
|
+
def ifa_flags; fixed_header.ifa_flags; end
|
|
203
|
+
# Gets the value of `ifa-scope` field in the message's fixed header.
|
|
204
|
+
#--
|
|
205
|
+
# @rbs return: ::Integer
|
|
206
|
+
def ifa_scope; fixed_header.ifa_scope; end
|
|
207
|
+
# Gets the value of `ifa-index` field in the message's fixed header.
|
|
208
|
+
#--
|
|
209
|
+
# @rbs return: ::Integer
|
|
210
|
+
def ifa_index; fixed_header.ifa_index; end
|
|
211
|
+
# Gets the value of `address` attribute in the message.
|
|
212
|
+
#--
|
|
213
|
+
# @rbs return: untyped
|
|
214
|
+
def address; attributes[:"address"]&.value; end
|
|
215
|
+
# Gets the value of `local` attribute in the message.
|
|
216
|
+
#--
|
|
217
|
+
# @rbs return: untyped
|
|
218
|
+
def local; attributes[:"local"]&.value; end
|
|
219
|
+
end
|
|
220
|
+
# Dump address information.
|
|
221
|
+
class DumpGetaddrRequest < ::Nl::Protocols::Raw::Message
|
|
222
|
+
TYPE = 22
|
|
223
|
+
FIXED_HEADER = Structs::Ifaddrmsg
|
|
224
|
+
ATTRIBUTE_SET = AttributeSets::AddrAttrs
|
|
225
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
226
|
+
# Gets the value of `ifa-family` field in the message's fixed header.
|
|
227
|
+
#--
|
|
228
|
+
# @rbs return: ::Integer
|
|
229
|
+
def ifa_family; fixed_header.ifa_family; end
|
|
230
|
+
# Gets the value of `ifa-prefixlen` field in the message's fixed header.
|
|
231
|
+
#--
|
|
232
|
+
# @rbs return: ::Integer
|
|
233
|
+
def ifa_prefixlen; fixed_header.ifa_prefixlen; end
|
|
234
|
+
# Gets the value of `ifa-flags` field in the message's fixed header.
|
|
235
|
+
#--
|
|
236
|
+
# @rbs return: ::Integer
|
|
237
|
+
def ifa_flags; fixed_header.ifa_flags; end
|
|
238
|
+
# Gets the value of `ifa-scope` field in the message's fixed header.
|
|
239
|
+
#--
|
|
240
|
+
# @rbs return: ::Integer
|
|
241
|
+
def ifa_scope; fixed_header.ifa_scope; end
|
|
242
|
+
# Gets the value of `ifa-index` field in the message's fixed header.
|
|
243
|
+
#--
|
|
244
|
+
# @rbs return: ::Integer
|
|
245
|
+
def ifa_index; fixed_header.ifa_index; end
|
|
246
|
+
end
|
|
247
|
+
# Dump address information.
|
|
248
|
+
class DumpGetaddrReply < ::Nl::Protocols::Raw::Message
|
|
249
|
+
TYPE = 20
|
|
250
|
+
FIXED_HEADER = Structs::Ifaddrmsg
|
|
251
|
+
ATTRIBUTE_SET = AttributeSets::AddrAttrs
|
|
252
|
+
ATTRIBUTES = Ractor.make_shareable(%i[address local label cacheinfo])
|
|
253
|
+
# Gets the value of `ifa-family` field in the message's fixed header.
|
|
254
|
+
#--
|
|
255
|
+
# @rbs return: ::Integer
|
|
256
|
+
def ifa_family; fixed_header.ifa_family; end
|
|
257
|
+
# Gets the value of `ifa-prefixlen` field in the message's fixed header.
|
|
258
|
+
#--
|
|
259
|
+
# @rbs return: ::Integer
|
|
260
|
+
def ifa_prefixlen; fixed_header.ifa_prefixlen; end
|
|
261
|
+
# Gets the value of `ifa-flags` field in the message's fixed header.
|
|
262
|
+
#--
|
|
263
|
+
# @rbs return: ::Integer
|
|
264
|
+
def ifa_flags; fixed_header.ifa_flags; end
|
|
265
|
+
# Gets the value of `ifa-scope` field in the message's fixed header.
|
|
266
|
+
#--
|
|
267
|
+
# @rbs return: ::Integer
|
|
268
|
+
def ifa_scope; fixed_header.ifa_scope; end
|
|
269
|
+
# Gets the value of `ifa-index` field in the message's fixed header.
|
|
270
|
+
#--
|
|
271
|
+
# @rbs return: ::Integer
|
|
272
|
+
def ifa_index; fixed_header.ifa_index; end
|
|
273
|
+
# Gets the value of `address` attribute in the message.
|
|
274
|
+
#--
|
|
275
|
+
# @rbs return: untyped
|
|
276
|
+
def address; attributes[:"address"]&.value; end
|
|
277
|
+
# Gets the value of `local` attribute in the message.
|
|
278
|
+
#--
|
|
279
|
+
# @rbs return: untyped
|
|
280
|
+
def local; attributes[:"local"]&.value; end
|
|
281
|
+
# Gets the value of `label` attribute in the message.
|
|
282
|
+
#--
|
|
283
|
+
# @rbs return: ::String
|
|
284
|
+
def label; attributes[:"label"]&.value; end
|
|
285
|
+
# Gets the value of `cacheinfo` attribute in the message.
|
|
286
|
+
#--
|
|
287
|
+
# @rbs return: untyped
|
|
288
|
+
def cacheinfo; attributes[:"cacheinfo"]&.value; end
|
|
289
|
+
end
|
|
290
|
+
# Get / dump IPv4/IPv6 multicast addresses.
|
|
291
|
+
class DoGetmulticastRequest < ::Nl::Protocols::Raw::Message
|
|
292
|
+
TYPE = 58
|
|
293
|
+
FIXED_HEADER = Structs::Ifaddrmsg
|
|
294
|
+
ATTRIBUTE_SET = AttributeSets::AddrAttrs
|
|
295
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
296
|
+
# Gets the value of `ifa-family` field in the message's fixed header.
|
|
297
|
+
#--
|
|
298
|
+
# @rbs return: ::Integer
|
|
299
|
+
def ifa_family; fixed_header.ifa_family; end
|
|
300
|
+
# Gets the value of `ifa-prefixlen` field in the message's fixed header.
|
|
301
|
+
#--
|
|
302
|
+
# @rbs return: ::Integer
|
|
303
|
+
def ifa_prefixlen; fixed_header.ifa_prefixlen; end
|
|
304
|
+
# Gets the value of `ifa-flags` field in the message's fixed header.
|
|
305
|
+
#--
|
|
306
|
+
# @rbs return: ::Integer
|
|
307
|
+
def ifa_flags; fixed_header.ifa_flags; end
|
|
308
|
+
# Gets the value of `ifa-scope` field in the message's fixed header.
|
|
309
|
+
#--
|
|
310
|
+
# @rbs return: ::Integer
|
|
311
|
+
def ifa_scope; fixed_header.ifa_scope; end
|
|
312
|
+
# Gets the value of `ifa-index` field in the message's fixed header.
|
|
313
|
+
#--
|
|
314
|
+
# @rbs return: ::Integer
|
|
315
|
+
def ifa_index; fixed_header.ifa_index; end
|
|
316
|
+
end
|
|
317
|
+
# Get / dump IPv4/IPv6 multicast addresses.
|
|
318
|
+
class DoGetmulticastReply < ::Nl::Protocols::Raw::Message
|
|
319
|
+
TYPE = 58
|
|
320
|
+
FIXED_HEADER = Structs::Ifaddrmsg
|
|
321
|
+
ATTRIBUTE_SET = AttributeSets::AddrAttrs
|
|
322
|
+
ATTRIBUTES = Ractor.make_shareable(%i[cacheinfo multicast])
|
|
323
|
+
# Gets the value of `ifa-family` field in the message's fixed header.
|
|
324
|
+
#--
|
|
325
|
+
# @rbs return: ::Integer
|
|
326
|
+
def ifa_family; fixed_header.ifa_family; end
|
|
327
|
+
# Gets the value of `ifa-prefixlen` field in the message's fixed header.
|
|
328
|
+
#--
|
|
329
|
+
# @rbs return: ::Integer
|
|
330
|
+
def ifa_prefixlen; fixed_header.ifa_prefixlen; end
|
|
331
|
+
# Gets the value of `ifa-flags` field in the message's fixed header.
|
|
332
|
+
#--
|
|
333
|
+
# @rbs return: ::Integer
|
|
334
|
+
def ifa_flags; fixed_header.ifa_flags; end
|
|
335
|
+
# Gets the value of `ifa-scope` field in the message's fixed header.
|
|
336
|
+
#--
|
|
337
|
+
# @rbs return: ::Integer
|
|
338
|
+
def ifa_scope; fixed_header.ifa_scope; end
|
|
339
|
+
# Gets the value of `ifa-index` field in the message's fixed header.
|
|
340
|
+
#--
|
|
341
|
+
# @rbs return: ::Integer
|
|
342
|
+
def ifa_index; fixed_header.ifa_index; end
|
|
343
|
+
# Gets the value of `cacheinfo` attribute in the message.
|
|
344
|
+
#--
|
|
345
|
+
# @rbs return: untyped
|
|
346
|
+
def cacheinfo; attributes[:"cacheinfo"]&.value; end
|
|
347
|
+
# Gets the value of `multicast` attribute in the message.
|
|
348
|
+
#--
|
|
349
|
+
# @rbs return: untyped
|
|
350
|
+
def multicast; attributes[:"multicast"]&.value; end
|
|
351
|
+
end
|
|
352
|
+
# Get / dump IPv4/IPv6 multicast addresses.
|
|
353
|
+
class DumpGetmulticastRequest < ::Nl::Protocols::Raw::Message
|
|
354
|
+
TYPE = 58
|
|
355
|
+
FIXED_HEADER = Structs::Ifaddrmsg
|
|
356
|
+
ATTRIBUTE_SET = AttributeSets::AddrAttrs
|
|
357
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
358
|
+
# Gets the value of `ifa-family` field in the message's fixed header.
|
|
359
|
+
#--
|
|
360
|
+
# @rbs return: ::Integer
|
|
361
|
+
def ifa_family; fixed_header.ifa_family; end
|
|
362
|
+
# Gets the value of `ifa-prefixlen` field in the message's fixed header.
|
|
363
|
+
#--
|
|
364
|
+
# @rbs return: ::Integer
|
|
365
|
+
def ifa_prefixlen; fixed_header.ifa_prefixlen; end
|
|
366
|
+
# Gets the value of `ifa-flags` field in the message's fixed header.
|
|
367
|
+
#--
|
|
368
|
+
# @rbs return: ::Integer
|
|
369
|
+
def ifa_flags; fixed_header.ifa_flags; end
|
|
370
|
+
# Gets the value of `ifa-scope` field in the message's fixed header.
|
|
371
|
+
#--
|
|
372
|
+
# @rbs return: ::Integer
|
|
373
|
+
def ifa_scope; fixed_header.ifa_scope; end
|
|
374
|
+
# Gets the value of `ifa-index` field in the message's fixed header.
|
|
375
|
+
#--
|
|
376
|
+
# @rbs return: ::Integer
|
|
377
|
+
def ifa_index; fixed_header.ifa_index; end
|
|
378
|
+
end
|
|
379
|
+
# Get / dump IPv4/IPv6 multicast addresses.
|
|
380
|
+
class DumpGetmulticastReply < ::Nl::Protocols::Raw::Message
|
|
381
|
+
TYPE = 58
|
|
382
|
+
FIXED_HEADER = Structs::Ifaddrmsg
|
|
383
|
+
ATTRIBUTE_SET = AttributeSets::AddrAttrs
|
|
384
|
+
ATTRIBUTES = Ractor.make_shareable(%i[cacheinfo multicast])
|
|
385
|
+
# Gets the value of `ifa-family` field in the message's fixed header.
|
|
386
|
+
#--
|
|
387
|
+
# @rbs return: ::Integer
|
|
388
|
+
def ifa_family; fixed_header.ifa_family; end
|
|
389
|
+
# Gets the value of `ifa-prefixlen` field in the message's fixed header.
|
|
390
|
+
#--
|
|
391
|
+
# @rbs return: ::Integer
|
|
392
|
+
def ifa_prefixlen; fixed_header.ifa_prefixlen; end
|
|
393
|
+
# Gets the value of `ifa-flags` field in the message's fixed header.
|
|
394
|
+
#--
|
|
395
|
+
# @rbs return: ::Integer
|
|
396
|
+
def ifa_flags; fixed_header.ifa_flags; end
|
|
397
|
+
# Gets the value of `ifa-scope` field in the message's fixed header.
|
|
398
|
+
#--
|
|
399
|
+
# @rbs return: ::Integer
|
|
400
|
+
def ifa_scope; fixed_header.ifa_scope; end
|
|
401
|
+
# Gets the value of `ifa-index` field in the message's fixed header.
|
|
402
|
+
#--
|
|
403
|
+
# @rbs return: ::Integer
|
|
404
|
+
def ifa_index; fixed_header.ifa_index; end
|
|
405
|
+
# Gets the value of `cacheinfo` attribute in the message.
|
|
406
|
+
#--
|
|
407
|
+
# @rbs return: untyped
|
|
408
|
+
def cacheinfo; attributes[:"cacheinfo"]&.value; end
|
|
409
|
+
# Gets the value of `multicast` attribute in the message.
|
|
410
|
+
#--
|
|
411
|
+
# @rbs return: untyped
|
|
412
|
+
def multicast; attributes[:"multicast"]&.value; end
|
|
413
|
+
end
|
|
414
|
+
end
|
|
415
|
+
# Add new address
|
|
416
|
+
#--
|
|
417
|
+
# @rbs (?ifa_family: ::Integer, ?ifa_prefixlen: ::Integer, ?ifa_flags: ::Integer, ?ifa_scope: ::Integer, ?ifa_index: ::Integer, ?address: untyped, ?local: untyped, ?label: ::String, ?cacheinfo: untyped) -> void
|
|
418
|
+
def do_newaddr(**args)
|
|
419
|
+
exchange_message(:"do", Messages::DoNewaddrRequest, nil, args)
|
|
420
|
+
end
|
|
421
|
+
# Remove address
|
|
422
|
+
#--
|
|
423
|
+
# @rbs (?ifa_family: ::Integer, ?ifa_prefixlen: ::Integer, ?ifa_flags: ::Integer, ?ifa_scope: ::Integer, ?ifa_index: ::Integer, ?address: untyped, ?local: untyped) -> void
|
|
424
|
+
def do_deladdr(**args)
|
|
425
|
+
exchange_message(:"do", Messages::DoDeladdrRequest, nil, args)
|
|
426
|
+
end
|
|
427
|
+
# Dump address information.
|
|
428
|
+
#--
|
|
429
|
+
# @rbs (?ifa_family: ::Integer, ?ifa_prefixlen: ::Integer, ?ifa_flags: ::Integer, ?ifa_scope: ::Integer, ?ifa_index: ::Integer) -> Enumerable[Messages::DumpGetaddrReply]
|
|
430
|
+
# | (?ifa_family: ::Integer, ?ifa_prefixlen: ::Integer, ?ifa_flags: ::Integer, ?ifa_scope: ::Integer, ?ifa_index: ::Integer) { (Messages::DumpGetaddrReply) -> void } -> void
|
|
431
|
+
def dump_getaddr(**args, &block)
|
|
432
|
+
exchange_message(:"dump", Messages::DumpGetaddrRequest, Messages::DumpGetaddrReply, args, &block)
|
|
433
|
+
end
|
|
434
|
+
# Get / dump IPv4/IPv6 multicast addresses.
|
|
435
|
+
#--
|
|
436
|
+
# @rbs (?ifa_family: ::Integer, ?ifa_prefixlen: ::Integer, ?ifa_flags: ::Integer, ?ifa_scope: ::Integer, ?ifa_index: ::Integer) -> Messages::DoGetmulticastReply
|
|
437
|
+
def do_getmulticast(**args)
|
|
438
|
+
exchange_message(:"do", Messages::DoGetmulticastRequest, Messages::DoGetmulticastReply, args)
|
|
439
|
+
end
|
|
440
|
+
# Get / dump IPv4/IPv6 multicast addresses.
|
|
441
|
+
#--
|
|
442
|
+
# @rbs (?ifa_family: ::Integer, ?ifa_prefixlen: ::Integer, ?ifa_flags: ::Integer, ?ifa_scope: ::Integer, ?ifa_index: ::Integer) -> Enumerable[Messages::DumpGetmulticastReply]
|
|
443
|
+
# | (?ifa_family: ::Integer, ?ifa_prefixlen: ::Integer, ?ifa_flags: ::Integer, ?ifa_scope: ::Integer, ?ifa_index: ::Integer) { (Messages::DumpGetmulticastReply) -> void } -> void
|
|
444
|
+
def dump_getmulticast(**args, &block)
|
|
445
|
+
exchange_message(:"dump", Messages::DumpGetmulticastRequest, Messages::DumpGetmulticastReply, args, &block)
|
|
446
|
+
end
|
|
447
|
+
end
|
|
448
|
+
end; end
|