nl-linux 0.4.2 → 0.5.0
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 +5 -0
- data/NLSPEC_VERSION +1 -1
- data/generated/nl/linux/binder.rb +103 -187
- data/generated/nl/linux/conntrack.rb +1053 -1649
- data/generated/nl/linux/dev_energymodel.rb +303 -265
- data/generated/nl/linux/devlink.rb +4904 -5576
- data/generated/nl/linux/dpll.rb +1097 -1467
- data/generated/nl/linux/drm_ras.rb +235 -195
- data/generated/nl/linux/ethtool.rb +6652 -7415
- data/generated/nl/linux/fou.rb +234 -255
- data/generated/nl/linux/handshake.rb +208 -280
- data/generated/nl/linux/lockd.rb +99 -73
- data/generated/nl/linux/mptcp_pm.rb +589 -687
- data/generated/nl/linux/net_shaper.rb +520 -615
- data/generated/nl/linux/netdev.rb +1640 -1987
- data/generated/nl/linux/nfsd.rb +1341 -1215
- data/generated/nl/linux/nftables.rb +5143 -4870
- data/generated/nl/linux/nl80211.rb +2542 -6316
- data/generated/nl/linux/nlctrl.rb +338 -483
- data/generated/nl/linux/ovpn.rb +1006 -1522
- data/generated/nl/linux/ovs_datapath.rb +291 -186
- data/generated/nl/linux/ovs_flow.rb +1393 -2065
- data/generated/nl/linux/ovs_packet.rb +186 -223
- data/generated/nl/linux/ovs_vport.rb +328 -285
- data/generated/nl/linux/psp.rb +812 -717
- data/generated/nl/linux/rt_addr.rb +513 -243
- data/generated/nl/linux/rt_link.rb +4504 -7238
- data/generated/nl/linux/rt_neigh.rb +935 -847
- data/generated/nl/linux/rt_route.rb +1198 -871
- data/generated/nl/linux/rt_rule.rb +680 -659
- data/generated/nl/linux/sunrpc_cache.rb +323 -321
- data/generated/nl/linux/tc.rb +9058 -10454
- data/generated/nl/linux/tcp_metrics.rb +258 -367
- data/generated/nl/linux/team.rb +327 -345
- data/generated/nl/linux/wireguard.rb +270 -434
- data/lib/nl/linux/nlctrl_resolver.rb +1 -1
- data/lib/nl/linux/version.rb +1 -1
- data/linux/conntrack.yaml +18 -3
- data/linux/devlink.yaml +26 -4
- data/linux/dpll.yaml +19 -0
- data/linux/netdev.yaml +21 -0
- data/linux/nfsd.yaml +111 -0
- data/linux/nl80211.yaml +2 -2
- data/linux/rt-addr.yaml +4 -0
- data/linux/rt-link.yaml +7 -0
- data/linux/rt-neigh.yaml +3 -0
- data/linux/rt-route.yaml +83 -2
- data/sig/generated/nl/linux/binder.rbs +77 -220
- data/sig/generated/nl/linux/conntrack.rbs +770 -1954
- data/sig/generated/nl/linux/dev_energymodel.rbs +207 -291
- data/sig/generated/nl/linux/devlink.rbs +3318 -6068
- data/sig/generated/nl/linux/dpll.rbs +791 -1589
- data/sig/generated/nl/linux/drm_ras.rbs +160 -208
- data/sig/generated/nl/linux/ethtool.rbs +4205 -7581
- data/sig/generated/nl/linux/fou.rbs +139 -254
- data/sig/generated/nl/linux/handshake.rbs +144 -319
- data/sig/generated/nl/linux/lockd.rbs +64 -74
- data/sig/generated/nl/linux/mptcp_pm.rbs +426 -835
- data/sig/generated/nl/linux/net_shaper.rbs +351 -644
- data/sig/generated/nl/linux/netdev.rbs +1151 -2146
- data/sig/generated/nl/linux/nfsd.rbs +1047 -1409
- data/sig/generated/nl/linux/nftables.rbs +2907 -5030
- data/sig/generated/nl/linux/nl80211.rbs +1807 -7964
- data/sig/generated/nl/linux/nlctrl.rbs +220 -544
- data/sig/generated/nl/linux/ovpn.rbs +835 -1859
- data/sig/generated/nl/linux/ovs_datapath.rbs +141 -181
- data/sig/generated/nl/linux/ovs_flow.rbs +817 -2332
- data/sig/generated/nl/linux/ovs_packet.rbs +110 -237
- data/sig/generated/nl/linux/ovs_vport.rbs +174 -294
- data/sig/generated/nl/linux/psp.rbs +550 -741
- data/sig/generated/nl/linux/rt_addr.rbs +188 -226
- data/sig/generated/nl/linux/rt_link.rbs +2687 -8370
- data/sig/generated/nl/linux/rt_neigh.rbs +471 -1005
- data/sig/generated/nl/linux/rt_route.rbs +632 -862
- data/sig/generated/nl/linux/rt_rule.rbs +217 -639
- data/sig/generated/nl/linux/sunrpc_cache.rbs +233 -369
- data/sig/generated/nl/linux/tc.rbs +6199 -13391
- data/sig/generated/nl/linux/tcp_metrics.rbs +179 -421
- data/sig/generated/nl/linux/team.rbs +232 -391
- data/sig/generated/nl/linux/wireguard.rbs +197 -502
- metadata +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
|
2
2
|
#
|
|
3
|
-
# This file is based on Documentation/netlink/specs/nlctrl.yaml from Linux v7.
|
|
3
|
+
# This file is based on Documentation/netlink/specs/nlctrl.yaml from Linux v7.3.
|
|
4
4
|
#--
|
|
5
5
|
# frozen_string_literal: true
|
|
6
6
|
# This code is generated by Ynl::Generator. DO NOT EDIT.
|
|
@@ -28,7 +28,7 @@ class Nlctrl < ::Nl::Genl::Family
|
|
|
28
28
|
super
|
|
29
29
|
end
|
|
30
30
|
# @private
|
|
31
|
-
MCAST_GROUPS =
|
|
31
|
+
MCAST_GROUPS = {}.freeze #: Hash[::Symbol, ::Nl::McastGroup]
|
|
32
32
|
module Enums
|
|
33
33
|
module AttrType
|
|
34
34
|
Invalid = 0
|
|
@@ -64,589 +64,444 @@ class Nlctrl < ::Nl::Genl::Family
|
|
|
64
64
|
end
|
|
65
65
|
module AttributeSets
|
|
66
66
|
class CtrlAttrs < ::Nl::AttributeSet
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
# @
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
# @
|
|
82
|
-
|
|
83
|
-
# @
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
# @
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
NAME = :"maxattr"
|
|
105
|
-
# @private
|
|
106
|
-
ORDER = 4
|
|
107
|
-
# @private
|
|
108
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
109
|
-
end
|
|
110
|
-
class Ops < Attribute
|
|
111
|
-
TYPE = 6
|
|
112
|
-
NAME = :"ops"
|
|
113
|
-
# @private
|
|
114
|
-
ORDER = 5
|
|
115
|
-
end
|
|
116
|
-
class McastGroups < Attribute
|
|
117
|
-
TYPE = 7
|
|
118
|
-
NAME = :"mcast_groups"
|
|
119
|
-
# @private
|
|
120
|
-
ORDER = 6
|
|
121
|
-
end
|
|
122
|
-
class Policy < Attribute
|
|
123
|
-
TYPE = 8
|
|
124
|
-
NAME = :"policy"
|
|
125
|
-
# @private
|
|
126
|
-
ORDER = 7
|
|
127
|
-
end
|
|
128
|
-
class OpPolicy < Attribute
|
|
129
|
-
TYPE = 9
|
|
130
|
-
NAME = :"op_policy"
|
|
131
|
-
# @private
|
|
132
|
-
ORDER = 8
|
|
133
|
-
end
|
|
134
|
-
class Op < Attribute
|
|
135
|
-
TYPE = 10
|
|
136
|
-
NAME = :"op"
|
|
137
|
-
# @private
|
|
138
|
-
ORDER = 9
|
|
139
|
-
# @private
|
|
140
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
141
|
-
end
|
|
142
|
-
# @private
|
|
143
|
-
BY_NAME = Ractor.make_shareable({:"family_id" => FamilyId, :"family_name" => FamilyName, :"version" => Version, :"hdrsize" => Hdrsize, :"maxattr" => Maxattr, :"ops" => Ops, :"mcast_groups" => McastGroups, :"policy" => Policy, :"op_policy" => OpPolicy, :"op" => Op}) #: Hash[::Symbol, Attribute]
|
|
144
|
-
# @private
|
|
145
|
-
BY_TYPE = Ractor.make_shareable({1 => FamilyId, 2 => FamilyName, 3 => Version, 4 => Hdrsize, 5 => Maxattr, 6 => Ops, 7 => McastGroups, 8 => Policy, 9 => OpPolicy, 10 => Op}) #: Hash[::Integer, Attribute]
|
|
146
|
-
# @rbs return: ::Integer
|
|
147
|
-
# @return [Integer]
|
|
148
|
-
# @see FamilyId
|
|
149
|
-
def family_id; self[:"family_id"]&.value; end
|
|
150
|
-
# @rbs return: ::String
|
|
151
|
-
# @return [String]
|
|
152
|
-
# @see FamilyName
|
|
153
|
-
def family_name; self[:"family_name"]&.value; end
|
|
154
|
-
# @rbs return: ::Integer
|
|
155
|
-
# @return [Integer]
|
|
156
|
-
# @see Version
|
|
157
|
-
def version; self[:"version"]&.value; end
|
|
158
|
-
# @rbs return: ::Integer
|
|
159
|
-
# @return [Integer]
|
|
160
|
-
# @see Hdrsize
|
|
161
|
-
def hdrsize; self[:"hdrsize"]&.value; end
|
|
162
|
-
# @rbs return: ::Integer
|
|
163
|
-
# @return [Integer]
|
|
164
|
-
# @see Maxattr
|
|
165
|
-
def maxattr; self[:"maxattr"]&.value; end
|
|
166
|
-
# @rbs return: ::Array[AttributeSets::OpAttrs]
|
|
167
|
-
# @return [Array<AttributeSets::OpAttrs>]
|
|
168
|
-
# @see Ops
|
|
169
|
-
def ops; self[:"ops"]&.value; end
|
|
170
|
-
# @rbs return: ::Array[AttributeSets::McastGroupAttrs]
|
|
171
|
-
# @return [Array<AttributeSets::McastGroupAttrs>]
|
|
172
|
-
# @see McastGroups
|
|
173
|
-
def mcast_groups; self[:"mcast_groups"]&.value; end
|
|
174
|
-
# @rbs return: ::Hash[::Integer, ::Hash[::Integer, AttributeSets::PolicyAttrs]]
|
|
175
|
-
# @return [Hash<Integer, Hash<Integer, AttributeSets::PolicyAttrs>>]
|
|
176
|
-
# @see Policy
|
|
177
|
-
def policy; self[:"policy"]&.value; end
|
|
178
|
-
# @rbs return: ::Hash[::Integer, AttributeSets::OpPolicyAttrs]
|
|
179
|
-
# @return [Hash<Integer, AttributeSets::OpPolicyAttrs>]
|
|
180
|
-
# @see OpPolicy
|
|
181
|
-
def op_policy; self[:"op_policy"]&.value; end
|
|
182
|
-
# @rbs return: ::Integer
|
|
183
|
-
# @return [Integer]
|
|
184
|
-
# @see Op
|
|
185
|
-
def op; self[:"op"]&.value; end
|
|
186
|
-
class << self
|
|
187
|
-
# Looks up Attribute class by name.
|
|
188
|
-
# @rbs name: Symbol
|
|
189
|
-
# @rbs return: Attribute
|
|
190
|
-
# @param [Symbol] name
|
|
191
|
-
# @return [Attribute]
|
|
192
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
193
|
-
# Looks up Attribute class by type value.
|
|
194
|
-
# @rbs type: Integer
|
|
195
|
-
# @rbs return: Attribute
|
|
196
|
-
# @param [Integer] type
|
|
197
|
-
# @return [Attribute]
|
|
198
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
67
|
+
module Definitions
|
|
68
|
+
# @rbs return: ::Integer
|
|
69
|
+
# @return [Integer]
|
|
70
|
+
def family_id; self[:"family_id"]; end
|
|
71
|
+
# @rbs return: ::String
|
|
72
|
+
# @return [String]
|
|
73
|
+
def family_name; self[:"family_name"]; end
|
|
74
|
+
# @rbs return: ::Integer
|
|
75
|
+
# @return [Integer]
|
|
76
|
+
def version; self[:"version"]; end
|
|
77
|
+
# @rbs return: ::Integer
|
|
78
|
+
# @return [Integer]
|
|
79
|
+
def hdrsize; self[:"hdrsize"]; end
|
|
80
|
+
# @rbs return: ::Integer
|
|
81
|
+
# @return [Integer]
|
|
82
|
+
def maxattr; self[:"maxattr"]; end
|
|
83
|
+
# @rbs return: ::Array[AttributeSets::OpAttrs]
|
|
84
|
+
# @return [Array<AttributeSets::OpAttrs>]
|
|
85
|
+
def ops; self[:"ops"]; end
|
|
86
|
+
# @rbs return: ::Array[AttributeSets::McastGroupAttrs]
|
|
87
|
+
# @return [Array<AttributeSets::McastGroupAttrs>]
|
|
88
|
+
def mcast_groups; self[:"mcast_groups"]; end
|
|
89
|
+
# @rbs return: ::Hash[::Integer, ::Hash[::Integer, AttributeSets::PolicyAttrs]]
|
|
90
|
+
# @return [Hash<Integer, Hash<Integer, AttributeSets::PolicyAttrs>>]
|
|
91
|
+
def policy; self[:"policy"]; end
|
|
92
|
+
# @rbs return: ::Hash[::Integer, AttributeSets::OpPolicyAttrs]
|
|
93
|
+
# @return [Hash<Integer, AttributeSets::OpPolicyAttrs>]
|
|
94
|
+
def op_policy; self[:"op_policy"]; end
|
|
95
|
+
# @rbs return: ::Integer
|
|
96
|
+
# @return [Integer]
|
|
97
|
+
def op; self[:"op"]; end
|
|
98
|
+
end
|
|
99
|
+
include Definitions
|
|
100
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
101
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
102
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
103
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
199
104
|
end
|
|
200
105
|
end
|
|
201
106
|
class McastGroupAttrs < ::Nl::AttributeSet
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
NAME = :"id"
|
|
216
|
-
# @private
|
|
217
|
-
ORDER = 1
|
|
218
|
-
# @private
|
|
219
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
220
|
-
end
|
|
221
|
-
# @private
|
|
222
|
-
BY_NAME = Ractor.make_shareable({:"name" => Name, :"id" => Id}) #: Hash[::Symbol, Attribute]
|
|
223
|
-
# @private
|
|
224
|
-
BY_TYPE = Ractor.make_shareable({1 => Name, 2 => Id}) #: Hash[::Integer, Attribute]
|
|
225
|
-
# @rbs return: ::String
|
|
226
|
-
# @return [String]
|
|
227
|
-
# @see Name
|
|
228
|
-
def name; self[:"name"]&.value; end
|
|
229
|
-
# @rbs return: ::Integer
|
|
230
|
-
# @return [Integer]
|
|
231
|
-
# @see Id
|
|
232
|
-
def id; self[:"id"]&.value; end
|
|
233
|
-
class << self
|
|
234
|
-
# Looks up Attribute class by name.
|
|
235
|
-
# @rbs name: Symbol
|
|
236
|
-
# @rbs return: Attribute
|
|
237
|
-
# @param [Symbol] name
|
|
238
|
-
# @return [Attribute]
|
|
239
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
240
|
-
# Looks up Attribute class by type value.
|
|
241
|
-
# @rbs type: Integer
|
|
242
|
-
# @rbs return: Attribute
|
|
243
|
-
# @param [Integer] type
|
|
244
|
-
# @return [Attribute]
|
|
245
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
107
|
+
module Definitions
|
|
108
|
+
# @rbs return: ::String
|
|
109
|
+
# @return [String]
|
|
110
|
+
def name; self[:"name"]; end
|
|
111
|
+
# @rbs return: ::Integer
|
|
112
|
+
# @return [Integer]
|
|
113
|
+
def id; self[:"id"]; end
|
|
114
|
+
end
|
|
115
|
+
include Definitions
|
|
116
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
117
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
118
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
119
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
246
120
|
end
|
|
247
121
|
end
|
|
248
122
|
class OpAttrs < ::Nl::AttributeSet
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
# @
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
#
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
NAME = :"flags"
|
|
264
|
-
# @private
|
|
265
|
-
ORDER = 1
|
|
266
|
-
# @private
|
|
267
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
268
|
-
end
|
|
269
|
-
# @private
|
|
270
|
-
BY_NAME = Ractor.make_shareable({:"id" => Id, :"flags" => Flags}) #: Hash[::Symbol, Attribute]
|
|
271
|
-
# @private
|
|
272
|
-
BY_TYPE = Ractor.make_shareable({1 => Id, 2 => Flags}) #: Hash[::Integer, Attribute]
|
|
273
|
-
# @rbs return: ::Integer
|
|
274
|
-
# @return [Integer]
|
|
275
|
-
# @see Id
|
|
276
|
-
def id; self[:"id"]&.value; end
|
|
277
|
-
# Known flags are defined in {Flags::OpFlags}.
|
|
278
|
-
# @rbs return: ::Integer
|
|
279
|
-
# @return [Integer]
|
|
280
|
-
# @see Flags
|
|
281
|
-
def flags; self[:"flags"]&.value; end
|
|
282
|
-
class << self
|
|
283
|
-
# Looks up Attribute class by name.
|
|
284
|
-
# @rbs name: Symbol
|
|
285
|
-
# @rbs return: Attribute
|
|
286
|
-
# @param [Symbol] name
|
|
287
|
-
# @return [Attribute]
|
|
288
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
289
|
-
# Looks up Attribute class by type value.
|
|
290
|
-
# @rbs type: Integer
|
|
291
|
-
# @rbs return: Attribute
|
|
292
|
-
# @param [Integer] type
|
|
293
|
-
# @return [Attribute]
|
|
294
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
123
|
+
module Definitions
|
|
124
|
+
# @rbs return: ::Integer
|
|
125
|
+
# @return [Integer]
|
|
126
|
+
def id; self[:"id"]; end
|
|
127
|
+
# Known flags are defined in {Flags::OpFlags}.
|
|
128
|
+
# @rbs return: ::Integer
|
|
129
|
+
# @return [Integer]
|
|
130
|
+
def flags; self[:"flags"]; end
|
|
131
|
+
end
|
|
132
|
+
include Definitions
|
|
133
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
134
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
135
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
136
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
295
137
|
end
|
|
296
138
|
end
|
|
297
139
|
class PolicyAttrs < ::Nl::AttributeSet
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
# @
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
# @
|
|
314
|
-
|
|
315
|
-
# @
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
# @
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
140
|
+
module Definitions
|
|
141
|
+
# Known enum values are defined in {Enums::AttrType}.
|
|
142
|
+
# @rbs return: ::Integer
|
|
143
|
+
# @return [Integer]
|
|
144
|
+
def type; self[:"type"]; end
|
|
145
|
+
# @rbs return: ::Integer
|
|
146
|
+
# @return [Integer]
|
|
147
|
+
def min_value_s; self[:"min_value_s"]; end
|
|
148
|
+
# @rbs return: ::Integer
|
|
149
|
+
# @return [Integer]
|
|
150
|
+
def max_value_s; self[:"max_value_s"]; end
|
|
151
|
+
# @rbs return: ::Integer
|
|
152
|
+
# @return [Integer]
|
|
153
|
+
def min_value_u; self[:"min_value_u"]; end
|
|
154
|
+
# @rbs return: ::Integer
|
|
155
|
+
# @return [Integer]
|
|
156
|
+
def max_value_u; self[:"max_value_u"]; end
|
|
157
|
+
# @rbs return: ::Integer
|
|
158
|
+
# @return [Integer]
|
|
159
|
+
def min_length; self[:"min_length"]; end
|
|
160
|
+
# @rbs return: ::Integer
|
|
161
|
+
# @return [Integer]
|
|
162
|
+
def max_length; self[:"max_length"]; end
|
|
163
|
+
# @rbs return: ::Integer
|
|
164
|
+
# @return [Integer]
|
|
165
|
+
def policy_idx; self[:"policy_idx"]; end
|
|
166
|
+
# @rbs return: ::Integer
|
|
167
|
+
# @return [Integer]
|
|
168
|
+
def policy_maxtype; self[:"policy_maxtype"]; end
|
|
169
|
+
# @rbs return: ::Integer
|
|
170
|
+
# @return [Integer]
|
|
171
|
+
def bitfield32_mask; self[:"bitfield32_mask"]; end
|
|
172
|
+
# @rbs return: ::Integer
|
|
173
|
+
# @return [Integer]
|
|
174
|
+
def mask; self[:"mask"]; end
|
|
175
|
+
end
|
|
176
|
+
include Definitions
|
|
177
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
178
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
179
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
180
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
325
181
|
end
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
# @
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
end
|
|
342
|
-
class MinLength < Attribute
|
|
343
|
-
TYPE = 6
|
|
344
|
-
NAME = :"min_length"
|
|
345
|
-
# @private
|
|
346
|
-
ORDER = 5
|
|
347
|
-
# @private
|
|
348
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
349
|
-
end
|
|
350
|
-
class MaxLength < Attribute
|
|
351
|
-
TYPE = 7
|
|
352
|
-
NAME = :"max_length"
|
|
353
|
-
# @private
|
|
354
|
-
ORDER = 6
|
|
355
|
-
# @private
|
|
356
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
357
|
-
end
|
|
358
|
-
class PolicyIdx < Attribute
|
|
359
|
-
TYPE = 8
|
|
360
|
-
NAME = :"policy_idx"
|
|
361
|
-
# @private
|
|
362
|
-
ORDER = 7
|
|
363
|
-
# @private
|
|
364
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
365
|
-
end
|
|
366
|
-
class PolicyMaxtype < Attribute
|
|
367
|
-
TYPE = 9
|
|
368
|
-
NAME = :"policy_maxtype"
|
|
369
|
-
# @private
|
|
370
|
-
ORDER = 8
|
|
371
|
-
# @private
|
|
372
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
182
|
+
end
|
|
183
|
+
class OpPolicyAttrs < ::Nl::AttributeSet
|
|
184
|
+
module Definitions
|
|
185
|
+
# @rbs return: ::Integer
|
|
186
|
+
# @return [Integer]
|
|
187
|
+
def do; self[:"do"]; end
|
|
188
|
+
# @rbs return: ::Integer
|
|
189
|
+
# @return [Integer]
|
|
190
|
+
def dump; self[:"dump"]; end
|
|
191
|
+
end
|
|
192
|
+
include Definitions
|
|
193
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
194
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
195
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
196
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
373
197
|
end
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
# @private
|
|
380
|
-
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
module AttributeSets
|
|
201
|
+
class CtrlAttrs
|
|
202
|
+
module Definitions
|
|
203
|
+
# @private
|
|
204
|
+
BY_TYPE = ::Array.new(11).tap do |definitions|
|
|
205
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"family_id", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U16].new, multi: false, order: 0, selector_slot: nil)
|
|
206
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"family_name", datatype: ::Nl::DataTypes::String.new, multi: false, order: 1, selector_slot: nil)
|
|
207
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"version", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 2, selector_slot: nil)
|
|
208
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"hdrsize", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 3, selector_slot: nil)
|
|
209
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"maxattr", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 4, selector_slot: nil)
|
|
210
|
+
definitions[6] = ::Nl::AttributeSet::Definition.new(id: 6, name: :"ops", datatype: ::Nl::DataTypes::IndexedArray.new(::Nl::DataTypes::NestedAttributes.new(AttributeSets::OpAttrs, selector_bindings: [])), multi: false, order: 5, selector_slot: nil)
|
|
211
|
+
definitions[7] = ::Nl::AttributeSet::Definition.new(id: 7, name: :"mcast_groups", datatype: ::Nl::DataTypes::IndexedArray.new(::Nl::DataTypes::NestedAttributes.new(AttributeSets::McastGroupAttrs, selector_bindings: [])), multi: false, order: 6, selector_slot: nil)
|
|
212
|
+
definitions[8] = ::Nl::AttributeSet::Definition.new(id: 8, name: :"policy", datatype: ::Nl::DataTypes::NestTypeValue.new(AttributeSets::PolicyAttrs, 2, selector_bindings: []), multi: false, order: 7, selector_slot: nil)
|
|
213
|
+
definitions[9] = ::Nl::AttributeSet::Definition.new(id: 9, name: :"op_policy", datatype: ::Nl::DataTypes::NestTypeValue.new(AttributeSets::OpPolicyAttrs, 1, selector_bindings: []), multi: false, order: 8, selector_slot: nil)
|
|
214
|
+
definitions[10] = ::Nl::AttributeSet::Definition.new(id: 10, name: :"op", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 9, selector_slot: nil)
|
|
215
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
216
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
217
|
+
# @private
|
|
218
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
381
219
|
end
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
220
|
+
end
|
|
221
|
+
class McastGroupAttrs
|
|
222
|
+
module Definitions
|
|
385
223
|
# @private
|
|
386
|
-
|
|
224
|
+
BY_TYPE = ::Array.new(3).tap do |definitions|
|
|
225
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"name", datatype: ::Nl::DataTypes::String.new, multi: false, order: 0, selector_slot: nil)
|
|
226
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"id", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 1, selector_slot: nil)
|
|
227
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
228
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
387
229
|
# @private
|
|
388
|
-
|
|
230
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
389
231
|
end
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
232
|
+
end
|
|
233
|
+
class OpAttrs
|
|
234
|
+
module Definitions
|
|
393
235
|
# @private
|
|
394
|
-
|
|
236
|
+
BY_TYPE = ::Array.new(3).tap do |definitions|
|
|
237
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"id", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 0, selector_slot: nil)
|
|
238
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"flags", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 1, selector_slot: nil)
|
|
239
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
240
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
395
241
|
# @private
|
|
396
|
-
|
|
397
|
-
end
|
|
398
|
-
# @private
|
|
399
|
-
BY_NAME = Ractor.make_shareable({:"type" => Type, :"min_value_s" => MinValueS, :"max_value_s" => MaxValueS, :"min_value_u" => MinValueU, :"max_value_u" => MaxValueU, :"min_length" => MinLength, :"max_length" => MaxLength, :"policy_idx" => PolicyIdx, :"policy_maxtype" => PolicyMaxtype, :"bitfield32_mask" => Bitfield32Mask, :"mask" => Mask, :"pad" => Pad}) #: Hash[::Symbol, Attribute]
|
|
400
|
-
# @private
|
|
401
|
-
BY_TYPE = Ractor.make_shareable({1 => Type, 2 => MinValueS, 3 => MaxValueS, 4 => MinValueU, 5 => MaxValueU, 6 => MinLength, 7 => MaxLength, 8 => PolicyIdx, 9 => PolicyMaxtype, 10 => Bitfield32Mask, 11 => Mask, 12 => Pad}) #: Hash[::Integer, Attribute]
|
|
402
|
-
# Known enum values are defined in {Enums::AttrType}.
|
|
403
|
-
# @rbs return: ::Integer
|
|
404
|
-
# @return [Integer]
|
|
405
|
-
# @see Type
|
|
406
|
-
def type; self[:"type"]&.value; end
|
|
407
|
-
# @rbs return: ::Integer
|
|
408
|
-
# @return [Integer]
|
|
409
|
-
# @see MinValueS
|
|
410
|
-
def min_value_s; self[:"min_value_s"]&.value; end
|
|
411
|
-
# @rbs return: ::Integer
|
|
412
|
-
# @return [Integer]
|
|
413
|
-
# @see MaxValueS
|
|
414
|
-
def max_value_s; self[:"max_value_s"]&.value; end
|
|
415
|
-
# @rbs return: ::Integer
|
|
416
|
-
# @return [Integer]
|
|
417
|
-
# @see MinValueU
|
|
418
|
-
def min_value_u; self[:"min_value_u"]&.value; end
|
|
419
|
-
# @rbs return: ::Integer
|
|
420
|
-
# @return [Integer]
|
|
421
|
-
# @see MaxValueU
|
|
422
|
-
def max_value_u; self[:"max_value_u"]&.value; end
|
|
423
|
-
# @rbs return: ::Integer
|
|
424
|
-
# @return [Integer]
|
|
425
|
-
# @see MinLength
|
|
426
|
-
def min_length; self[:"min_length"]&.value; end
|
|
427
|
-
# @rbs return: ::Integer
|
|
428
|
-
# @return [Integer]
|
|
429
|
-
# @see MaxLength
|
|
430
|
-
def max_length; self[:"max_length"]&.value; end
|
|
431
|
-
# @rbs return: ::Integer
|
|
432
|
-
# @return [Integer]
|
|
433
|
-
# @see PolicyIdx
|
|
434
|
-
def policy_idx; self[:"policy_idx"]&.value; end
|
|
435
|
-
# @rbs return: ::Integer
|
|
436
|
-
# @return [Integer]
|
|
437
|
-
# @see PolicyMaxtype
|
|
438
|
-
def policy_maxtype; self[:"policy_maxtype"]&.value; end
|
|
439
|
-
# @rbs return: ::Integer
|
|
440
|
-
# @return [Integer]
|
|
441
|
-
# @see Bitfield32Mask
|
|
442
|
-
def bitfield32_mask; self[:"bitfield32_mask"]&.value; end
|
|
443
|
-
# @rbs return: ::Integer
|
|
444
|
-
# @return [Integer]
|
|
445
|
-
# @see Mask
|
|
446
|
-
def mask; self[:"mask"]&.value; end
|
|
447
|
-
class << self
|
|
448
|
-
# Looks up Attribute class by name.
|
|
449
|
-
# @rbs name: Symbol
|
|
450
|
-
# @rbs return: Attribute
|
|
451
|
-
# @param [Symbol] name
|
|
452
|
-
# @return [Attribute]
|
|
453
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
454
|
-
# Looks up Attribute class by type value.
|
|
455
|
-
# @rbs type: Integer
|
|
456
|
-
# @rbs return: Attribute
|
|
457
|
-
# @param [Integer] type
|
|
458
|
-
# @return [Attribute]
|
|
459
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
242
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
460
243
|
end
|
|
461
244
|
end
|
|
462
|
-
class
|
|
463
|
-
|
|
464
|
-
|
|
245
|
+
class PolicyAttrs
|
|
246
|
+
module Definitions
|
|
247
|
+
# @private
|
|
248
|
+
BY_TYPE = ::Array.new(13).tap do |definitions|
|
|
249
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"type", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 0, selector_slot: nil)
|
|
250
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"min_value_s", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::S64].new, multi: false, order: 1, selector_slot: nil)
|
|
251
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"max_value_s", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::S64].new, multi: false, order: 2, selector_slot: nil)
|
|
252
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"min_value_u", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U64].new, multi: false, order: 3, selector_slot: nil)
|
|
253
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"max_value_u", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U64].new, multi: false, order: 4, selector_slot: nil)
|
|
254
|
+
definitions[6] = ::Nl::AttributeSet::Definition.new(id: 6, name: :"min_length", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 5, selector_slot: nil)
|
|
255
|
+
definitions[7] = ::Nl::AttributeSet::Definition.new(id: 7, name: :"max_length", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 6, selector_slot: nil)
|
|
256
|
+
definitions[8] = ::Nl::AttributeSet::Definition.new(id: 8, name: :"policy_idx", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 7, selector_slot: nil)
|
|
257
|
+
definitions[9] = ::Nl::AttributeSet::Definition.new(id: 9, name: :"policy_maxtype", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 8, selector_slot: nil)
|
|
258
|
+
definitions[10] = ::Nl::AttributeSet::Definition.new(id: 10, name: :"bitfield32_mask", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 9, selector_slot: nil)
|
|
259
|
+
definitions[11] = ::Nl::AttributeSet::Definition.new(id: 11, name: :"mask", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U64].new, multi: false, order: 10, selector_slot: nil)
|
|
260
|
+
definitions[12] = ::Nl::AttributeSet::Definition.new(id: 12, name: :"pad", datatype: ::Nl::DataTypes::Pad.new(), multi: false, order: 11, selector_slot: nil)
|
|
261
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
262
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
263
|
+
# @private
|
|
264
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
465
265
|
end
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
# @private
|
|
470
|
-
ORDER = 0
|
|
471
|
-
# @private
|
|
472
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
473
|
-
end
|
|
474
|
-
class Dump < Attribute
|
|
475
|
-
TYPE = 2
|
|
476
|
-
NAME = :"dump"
|
|
266
|
+
end
|
|
267
|
+
class OpPolicyAttrs
|
|
268
|
+
module Definitions
|
|
477
269
|
# @private
|
|
478
|
-
|
|
270
|
+
BY_TYPE = ::Array.new(3).tap do |definitions|
|
|
271
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"do", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 0, selector_slot: nil)
|
|
272
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"dump", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 1, selector_slot: nil)
|
|
273
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
274
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
479
275
|
# @private
|
|
480
|
-
|
|
481
|
-
end
|
|
482
|
-
# @private
|
|
483
|
-
BY_NAME = Ractor.make_shareable({:"do" => Do, :"dump" => Dump}) #: Hash[::Symbol, Attribute]
|
|
484
|
-
# @private
|
|
485
|
-
BY_TYPE = Ractor.make_shareable({1 => Do, 2 => Dump}) #: Hash[::Integer, Attribute]
|
|
486
|
-
# @rbs return: ::Integer
|
|
487
|
-
# @return [Integer]
|
|
488
|
-
# @see Do
|
|
489
|
-
def do; self[:"do"]&.value; end
|
|
490
|
-
# @rbs return: ::Integer
|
|
491
|
-
# @return [Integer]
|
|
492
|
-
# @see Dump
|
|
493
|
-
def dump; self[:"dump"]&.value; end
|
|
494
|
-
class << self
|
|
495
|
-
# Looks up Attribute class by name.
|
|
496
|
-
# @rbs name: Symbol
|
|
497
|
-
# @rbs return: Attribute
|
|
498
|
-
# @param [Symbol] name
|
|
499
|
-
# @return [Attribute]
|
|
500
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
501
|
-
# Looks up Attribute class by type value.
|
|
502
|
-
# @rbs type: Integer
|
|
503
|
-
# @rbs return: Attribute
|
|
504
|
-
# @param [Integer] type
|
|
505
|
-
# @return [Attribute]
|
|
506
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
276
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
507
277
|
end
|
|
508
278
|
end
|
|
509
|
-
# @private
|
|
510
|
-
CtrlAttrs::Ops::DATATYPE = ::Nl::DataTypes::IndexedArray.new(::Nl::DataTypes::NestedAttributes.new(AttributeSets::OpAttrs, selector_bindings: Ractor.make_shareable([])))
|
|
511
|
-
# @private
|
|
512
|
-
CtrlAttrs::McastGroups::DATATYPE = ::Nl::DataTypes::IndexedArray.new(::Nl::DataTypes::NestedAttributes.new(AttributeSets::McastGroupAttrs, selector_bindings: Ractor.make_shareable([])))
|
|
513
|
-
# @private
|
|
514
|
-
CtrlAttrs::Policy::DATATYPE = ::Nl::DataTypes::NestTypeValue.new(AttributeSets::PolicyAttrs, 2, selector_bindings: Ractor.make_shareable([]))
|
|
515
|
-
# @private
|
|
516
|
-
CtrlAttrs::OpPolicy::DATATYPE = ::Nl::DataTypes::NestTypeValue.new(AttributeSets::OpPolicyAttrs, 1, selector_bindings: Ractor.make_shareable([]))
|
|
517
279
|
end
|
|
518
280
|
module Messages
|
|
519
281
|
# Get / dump genetlink families
|
|
520
|
-
class DoGetfamilyRequest < ::Nl::
|
|
282
|
+
class DoGetfamilyRequest < ::Nl::Message
|
|
521
283
|
TYPE = 3
|
|
522
284
|
FIXED_HEADER = nil
|
|
523
285
|
ATTRIBUTE_SET = AttributeSets::CtrlAttrs
|
|
524
|
-
ATTRIBUTES =
|
|
286
|
+
ATTRIBUTES = %i[family_name].freeze
|
|
287
|
+
include ATTRIBUTE_SET::Definitions
|
|
288
|
+
def initialize(attributes = [])
|
|
289
|
+
@attributes = attributes
|
|
290
|
+
end
|
|
291
|
+
# @private
|
|
292
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
293
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
294
|
+
new(
|
|
295
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
296
|
+
)
|
|
297
|
+
end
|
|
298
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
299
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
300
|
+
def self.decode(decoder)
|
|
301
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
302
|
+
end
|
|
303
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
304
|
+
encode_attributes(encoder, external_selectors:)
|
|
305
|
+
end
|
|
525
306
|
# @rbs return: ::String
|
|
526
307
|
# @return [String]
|
|
527
|
-
|
|
528
|
-
def family_name; attributes[:"family_name"]&.value; end
|
|
308
|
+
def family_name; self[:"family_name"]; end
|
|
529
309
|
end
|
|
530
310
|
# Get / dump genetlink families
|
|
531
|
-
class DoGetfamilyReply < ::Nl::
|
|
311
|
+
class DoGetfamilyReply < ::Nl::Message
|
|
532
312
|
TYPE = 1
|
|
533
313
|
FIXED_HEADER = nil
|
|
534
314
|
ATTRIBUTE_SET = AttributeSets::CtrlAttrs
|
|
535
|
-
ATTRIBUTES =
|
|
315
|
+
ATTRIBUTES = %i[family_id family_name version hdrsize maxattr ops mcast_groups].freeze
|
|
316
|
+
include ATTRIBUTE_SET::Definitions
|
|
317
|
+
def initialize(attributes = [])
|
|
318
|
+
@attributes = attributes
|
|
319
|
+
end
|
|
320
|
+
# @private
|
|
321
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
322
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
323
|
+
new(
|
|
324
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
325
|
+
)
|
|
326
|
+
end
|
|
327
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
328
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
329
|
+
def self.decode(decoder)
|
|
330
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
331
|
+
end
|
|
332
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
333
|
+
encode_attributes(encoder, external_selectors:)
|
|
334
|
+
end
|
|
536
335
|
# @rbs return: ::Integer
|
|
537
336
|
# @return [Integer]
|
|
538
|
-
|
|
539
|
-
def family_id; attributes[:"family_id"]&.value; end
|
|
337
|
+
def family_id; self[:"family_id"]; end
|
|
540
338
|
# @rbs return: ::String
|
|
541
339
|
# @return [String]
|
|
542
|
-
|
|
543
|
-
def family_name; attributes[:"family_name"]&.value; end
|
|
340
|
+
def family_name; self[:"family_name"]; end
|
|
544
341
|
# @rbs return: ::Integer
|
|
545
342
|
# @return [Integer]
|
|
546
|
-
|
|
547
|
-
def version; attributes[:"version"]&.value; end
|
|
343
|
+
def version; self[:"version"]; end
|
|
548
344
|
# @rbs return: ::Integer
|
|
549
345
|
# @return [Integer]
|
|
550
|
-
|
|
551
|
-
def hdrsize; attributes[:"hdrsize"]&.value; end
|
|
346
|
+
def hdrsize; self[:"hdrsize"]; end
|
|
552
347
|
# @rbs return: ::Integer
|
|
553
348
|
# @return [Integer]
|
|
554
|
-
|
|
555
|
-
def maxattr; attributes[:"maxattr"]&.value; end
|
|
349
|
+
def maxattr; self[:"maxattr"]; end
|
|
556
350
|
# @rbs return: ::Array[AttributeSets::OpAttrs]
|
|
557
351
|
# @return [Array<AttributeSets::OpAttrs>]
|
|
558
|
-
|
|
559
|
-
def ops; attributes[:"ops"]&.value; end
|
|
352
|
+
def ops; self[:"ops"]; end
|
|
560
353
|
# @rbs return: ::Array[AttributeSets::McastGroupAttrs]
|
|
561
354
|
# @return [Array<AttributeSets::McastGroupAttrs>]
|
|
562
|
-
|
|
563
|
-
def mcast_groups; attributes[:"mcast_groups"]&.value; end
|
|
355
|
+
def mcast_groups; self[:"mcast_groups"]; end
|
|
564
356
|
end
|
|
565
357
|
# Get / dump genetlink families
|
|
566
|
-
class DumpGetfamilyRequest < ::Nl::
|
|
358
|
+
class DumpGetfamilyRequest < ::Nl::Message
|
|
567
359
|
TYPE = 3
|
|
568
360
|
FIXED_HEADER = nil
|
|
569
361
|
ATTRIBUTE_SET = AttributeSets::CtrlAttrs
|
|
570
|
-
ATTRIBUTES =
|
|
362
|
+
ATTRIBUTES = %i[].freeze
|
|
363
|
+
include ATTRIBUTE_SET::Definitions
|
|
364
|
+
def initialize(attributes = [])
|
|
365
|
+
@attributes = attributes
|
|
366
|
+
end
|
|
367
|
+
# @private
|
|
368
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
369
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
370
|
+
new(
|
|
371
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
372
|
+
)
|
|
373
|
+
end
|
|
374
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
375
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
376
|
+
def self.decode(decoder)
|
|
377
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
378
|
+
end
|
|
379
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
380
|
+
encode_attributes(encoder, external_selectors:)
|
|
381
|
+
end
|
|
571
382
|
end
|
|
572
383
|
# Get / dump genetlink families
|
|
573
|
-
class DumpGetfamilyReply < ::Nl::
|
|
384
|
+
class DumpGetfamilyReply < ::Nl::Message
|
|
574
385
|
TYPE = 1
|
|
575
386
|
FIXED_HEADER = nil
|
|
576
387
|
ATTRIBUTE_SET = AttributeSets::CtrlAttrs
|
|
577
|
-
ATTRIBUTES =
|
|
388
|
+
ATTRIBUTES = %i[family_id family_name version hdrsize maxattr ops mcast_groups].freeze
|
|
389
|
+
include ATTRIBUTE_SET::Definitions
|
|
390
|
+
def initialize(attributes = [])
|
|
391
|
+
@attributes = attributes
|
|
392
|
+
end
|
|
393
|
+
# @private
|
|
394
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
395
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
396
|
+
new(
|
|
397
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
398
|
+
)
|
|
399
|
+
end
|
|
400
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
401
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
402
|
+
def self.decode(decoder)
|
|
403
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
404
|
+
end
|
|
405
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
406
|
+
encode_attributes(encoder, external_selectors:)
|
|
407
|
+
end
|
|
578
408
|
# @rbs return: ::Integer
|
|
579
409
|
# @return [Integer]
|
|
580
|
-
|
|
581
|
-
def family_id; attributes[:"family_id"]&.value; end
|
|
410
|
+
def family_id; self[:"family_id"]; end
|
|
582
411
|
# @rbs return: ::String
|
|
583
412
|
# @return [String]
|
|
584
|
-
|
|
585
|
-
def family_name; attributes[:"family_name"]&.value; end
|
|
413
|
+
def family_name; self[:"family_name"]; end
|
|
586
414
|
# @rbs return: ::Integer
|
|
587
415
|
# @return [Integer]
|
|
588
|
-
|
|
589
|
-
def version; attributes[:"version"]&.value; end
|
|
416
|
+
def version; self[:"version"]; end
|
|
590
417
|
# @rbs return: ::Integer
|
|
591
418
|
# @return [Integer]
|
|
592
|
-
|
|
593
|
-
def hdrsize; attributes[:"hdrsize"]&.value; end
|
|
419
|
+
def hdrsize; self[:"hdrsize"]; end
|
|
594
420
|
# @rbs return: ::Integer
|
|
595
421
|
# @return [Integer]
|
|
596
|
-
|
|
597
|
-
def maxattr; attributes[:"maxattr"]&.value; end
|
|
422
|
+
def maxattr; self[:"maxattr"]; end
|
|
598
423
|
# @rbs return: ::Array[AttributeSets::OpAttrs]
|
|
599
424
|
# @return [Array<AttributeSets::OpAttrs>]
|
|
600
|
-
|
|
601
|
-
def ops; attributes[:"ops"]&.value; end
|
|
425
|
+
def ops; self[:"ops"]; end
|
|
602
426
|
# @rbs return: ::Array[AttributeSets::McastGroupAttrs]
|
|
603
427
|
# @return [Array<AttributeSets::McastGroupAttrs>]
|
|
604
|
-
|
|
605
|
-
def mcast_groups; attributes[:"mcast_groups"]&.value; end
|
|
428
|
+
def mcast_groups; self[:"mcast_groups"]; end
|
|
606
429
|
end
|
|
607
430
|
# Get / dump genetlink policies
|
|
608
|
-
class DumpGetpolicyRequest < ::Nl::
|
|
431
|
+
class DumpGetpolicyRequest < ::Nl::Message
|
|
609
432
|
TYPE = 10
|
|
610
433
|
FIXED_HEADER = nil
|
|
611
434
|
ATTRIBUTE_SET = AttributeSets::CtrlAttrs
|
|
612
|
-
ATTRIBUTES =
|
|
435
|
+
ATTRIBUTES = %i[family_id family_name op].freeze
|
|
436
|
+
include ATTRIBUTE_SET::Definitions
|
|
437
|
+
def initialize(attributes = [])
|
|
438
|
+
@attributes = attributes
|
|
439
|
+
end
|
|
440
|
+
# @private
|
|
441
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
442
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
443
|
+
new(
|
|
444
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
445
|
+
)
|
|
446
|
+
end
|
|
447
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
448
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
449
|
+
def self.decode(decoder)
|
|
450
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
451
|
+
end
|
|
452
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
453
|
+
encode_attributes(encoder, external_selectors:)
|
|
454
|
+
end
|
|
613
455
|
# @rbs return: ::Integer
|
|
614
456
|
# @return [Integer]
|
|
615
|
-
|
|
616
|
-
def family_id; attributes[:"family_id"]&.value; end
|
|
457
|
+
def family_id; self[:"family_id"]; end
|
|
617
458
|
# @rbs return: ::String
|
|
618
459
|
# @return [String]
|
|
619
|
-
|
|
620
|
-
def family_name; attributes[:"family_name"]&.value; end
|
|
460
|
+
def family_name; self[:"family_name"]; end
|
|
621
461
|
# @rbs return: ::Integer
|
|
622
462
|
# @return [Integer]
|
|
623
|
-
|
|
624
|
-
def op; attributes[:"op"]&.value; end
|
|
463
|
+
def op; self[:"op"]; end
|
|
625
464
|
end
|
|
626
465
|
# Get / dump genetlink policies
|
|
627
|
-
class DumpGetpolicyReply < ::Nl::
|
|
466
|
+
class DumpGetpolicyReply < ::Nl::Message
|
|
628
467
|
TYPE = 10
|
|
629
468
|
FIXED_HEADER = nil
|
|
630
469
|
ATTRIBUTE_SET = AttributeSets::CtrlAttrs
|
|
631
|
-
ATTRIBUTES =
|
|
470
|
+
ATTRIBUTES = %i[family_id policy op_policy].freeze
|
|
471
|
+
include ATTRIBUTE_SET::Definitions
|
|
472
|
+
def initialize(attributes = [])
|
|
473
|
+
@attributes = attributes
|
|
474
|
+
end
|
|
475
|
+
# @private
|
|
476
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
477
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
478
|
+
new(
|
|
479
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
480
|
+
)
|
|
481
|
+
end
|
|
482
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
483
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
484
|
+
def self.decode(decoder)
|
|
485
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
486
|
+
end
|
|
487
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
488
|
+
encode_attributes(encoder, external_selectors:)
|
|
489
|
+
end
|
|
632
490
|
# @rbs return: ::Integer
|
|
633
491
|
# @return [Integer]
|
|
634
|
-
|
|
635
|
-
def family_id; attributes[:"family_id"]&.value; end
|
|
492
|
+
def family_id; self[:"family_id"]; end
|
|
636
493
|
# @rbs return: ::Hash[::Integer, ::Hash[::Integer, AttributeSets::PolicyAttrs]]
|
|
637
494
|
# @return [Hash<Integer, Hash<Integer, AttributeSets::PolicyAttrs>>]
|
|
638
|
-
|
|
639
|
-
def policy; attributes[:"policy"]&.value; end
|
|
495
|
+
def policy; self[:"policy"]; end
|
|
640
496
|
# @rbs return: ::Hash[::Integer, AttributeSets::OpPolicyAttrs]
|
|
641
497
|
# @return [Hash<Integer, AttributeSets::OpPolicyAttrs>]
|
|
642
|
-
|
|
643
|
-
def op_policy; attributes[:"op_policy"]&.value; end
|
|
498
|
+
def op_policy; self[:"op_policy"]; end
|
|
644
499
|
end
|
|
645
500
|
end
|
|
646
501
|
module Notifications
|
|
647
502
|
end
|
|
648
503
|
# @private
|
|
649
|
-
NOTIFICATIONS =
|
|
504
|
+
NOTIFICATIONS = {}.freeze #: Hash[::Integer, ::Class]
|
|
650
505
|
# Get / dump genetlink families
|
|
651
506
|
# @rbs (?family_name: ::String) -> Messages::DoGetfamilyReply
|
|
652
507
|
# @param [Hash] args
|