nl-linux 0.3.0 → 0.4.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.
- checksums.yaml +4 -4
- data/.yardopts +5 -0
- data/CHANGELOG.md +6 -0
- data/Rakefile +14 -2
- data/generated/nl/linux/binder.rb +172 -44
- data/generated/nl/linux/conntrack.rb +1293 -370
- data/generated/nl/linux/dev_energymodel.rb +278 -93
- data/generated/nl/linux/devlink.rb +5654 -1954
- data/generated/nl/linux/dpll.rb +1838 -669
- data/generated/nl/linux/drm_ras.rb +234 -72
- data/generated/nl/linux/ethtool.rb +6683 -2885
- data/generated/nl/linux/fou.rb +308 -129
- data/generated/nl/linux/handshake.rb +277 -99
- data/generated/nl/linux/lockd.rb +88 -33
- data/generated/nl/linux/mptcp_pm.rb +639 -186
- data/generated/nl/linux/net_shaper.rb +782 -224
- data/generated/nl/linux/netdev.rb +2105 -631
- data/generated/nl/linux/nfsd.rb +1030 -358
- data/generated/nl/linux/nftables.rb +5041 -1612
- data/generated/nl/linux/nl80211.rb +4531 -871
- data/generated/nl/linux/nlctrl.rb +411 -119
- data/generated/nl/linux/ovpn.rb +1211 -293
- data/generated/nl/linux/ovs_datapath.rb +271 -106
- data/generated/nl/linux/ovs_flow.rb +1819 -354
- data/generated/nl/linux/ovs_packet.rb +257 -82
- data/generated/nl/linux/ovs_vport.rb +334 -132
- data/generated/nl/linux/psp.rb +916 -281
- data/generated/nl/linux/rt_addr.rb +369 -166
- data/generated/nl/linux/rt_link.rb +6708 -1450
- data/generated/nl/linux/rt_neigh.rb +919 -364
- data/generated/nl/linux/rt_route.rb +1034 -448
- data/generated/nl/linux/rt_rule.rb +775 -395
- data/generated/nl/linux/sunrpc_cache.rb +297 -102
- data/generated/nl/linux/tc.rb +9989 -1780
- data/generated/nl/linux/tcp_metrics.rb +327 -105
- data/generated/nl/linux/team.rb +279 -93
- data/generated/nl/linux/wireguard.rb +432 -95
- data/generated/nl/linux.rb +1 -0
- data/lib/nl/linux/nlctrl_resolver.rb +31 -0
- data/lib/nl/linux/version.rb +1 -1
- data/sig/generated/nl/linux/binder.rbs +366 -0
- data/sig/generated/nl/linux/conntrack.rbs +2787 -0
- data/sig/generated/nl/linux/dev_energymodel.rbs +636 -0
- data/sig/generated/nl/linux/devlink.rbs +12496 -0
- data/sig/generated/nl/linux/dpll.rbs +3461 -0
- data/sig/generated/nl/linux/drm_ras.rbs +553 -0
- data/sig/generated/nl/linux/ethtool.rbs +15291 -0
- data/sig/generated/nl/linux/fou.rbs +702 -0
- data/sig/generated/nl/linux/handshake.rbs +622 -0
- data/sig/generated/nl/linux/lockd.rbs +234 -0
- data/sig/generated/nl/linux/mptcp_pm.rbs +1511 -0
- data/sig/generated/nl/linux/net_shaper.rbs +1645 -0
- data/sig/generated/nl/linux/netdev.rbs +4187 -0
- data/sig/generated/nl/linux/nfsd.rbs +2520 -0
- data/sig/generated/nl/linux/nftables.rbs +10304 -0
- data/sig/generated/nl/linux/nl80211.rbs +9786 -0
- data/sig/generated/nl/linux/nlctrl.rbs +944 -0
- data/sig/generated/nl/linux/nlctrl_resolver.rbs +20 -0
- data/sig/generated/nl/linux/ovpn.rbs +2564 -0
- data/sig/generated/nl/linux/ovs_datapath.rbs +640 -0
- data/sig/generated/nl/linux/ovs_flow.rbs +3659 -0
- data/sig/generated/nl/linux/ovs_packet.rbs +540 -0
- data/sig/generated/nl/linux/ovs_vport.rbs +777 -0
- data/sig/generated/nl/linux/psp.rbs +1846 -0
- data/sig/generated/nl/linux/rt_addr.rbs +866 -0
- data/sig/generated/nl/linux/rt_link.rbs +13438 -0
- data/sig/generated/nl/linux/rt_neigh.rbs +2124 -0
- data/sig/generated/nl/linux/rt_route.rbs +2218 -0
- data/sig/generated/nl/linux/rt_rule.rbs +1726 -0
- data/sig/generated/nl/linux/sunrpc_cache.rbs +739 -0
- data/sig/generated/nl/linux/tc.rbs +19931 -0
- data/sig/generated/nl/linux/tcp_metrics.rbs +740 -0
- data/sig/generated/nl/linux/team.rbs +733 -0
- data/sig/generated/nl/linux/version.rbs +7 -0
- data/sig/generated/nl/linux/wireguard.rbs +1006 -0
- data/sig/generated/nl/linux.rbs +6 -0
- data/sig/generated/nl-linux.rbs +2 -0
- metadata +46 -7
|
@@ -3,443 +3,735 @@
|
|
|
3
3
|
# This file is based on Documentation/netlink/specs/nlctrl.yaml from Linux v7.2.
|
|
4
4
|
#--
|
|
5
5
|
# frozen_string_literal: true
|
|
6
|
-
# rbs_inline: enabled
|
|
7
6
|
# This code is generated by Ynl::Generator. DO NOT EDIT.
|
|
8
7
|
require 'nl'
|
|
9
8
|
module Nl; module Linux
|
|
10
9
|
# genetlink meta-family that exposes information about all genetlink
|
|
11
10
|
# families registered in the kernel (including itself).
|
|
12
|
-
class Nlctrl < ::Nl::Family
|
|
11
|
+
class Nlctrl < ::Nl::Genl::Family
|
|
13
12
|
NAME = "nlctrl"
|
|
14
|
-
|
|
13
|
+
VERSION = 1
|
|
14
|
+
# @rbs (?resolver: ^(::Nl::Genl::Client, ::String) -> ::Nl::Genl::FamilyInfo, ?executor: executor?, ?notification_capacity: ::Integer?) -> (::Nl::Family::Session & instance)
|
|
15
|
+
# @rbs | [R] (?resolver: ^(::Nl::Genl::Client, ::String) -> ::Nl::Genl::FamilyInfo, ?executor: executor?, ?notification_capacity: ::Integer?) { (instance) -> R } -> R
|
|
16
|
+
# @overload open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
|
|
17
|
+
# @param [#call] resolver
|
|
18
|
+
# @param [Symbol, nil] executor
|
|
19
|
+
# @param [Integer, nil] notification_capacity
|
|
20
|
+
# @return [Nlctrl]
|
|
21
|
+
# @overload open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY, &block)
|
|
22
|
+
# @param [#call] resolver
|
|
23
|
+
# @param [Symbol, nil] executor
|
|
24
|
+
# @param [Integer, nil] notification_capacity
|
|
25
|
+
# @yieldparam [Nlctrl] family
|
|
26
|
+
# @return [Object] the result of the block
|
|
27
|
+
def self.open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
|
|
28
|
+
super
|
|
29
|
+
end
|
|
30
|
+
# @private
|
|
15
31
|
MCAST_GROUPS = Ractor.make_shareable({}) #: Hash[::Symbol, ::Nl::McastGroup]
|
|
32
|
+
module Enums
|
|
33
|
+
module AttrType
|
|
34
|
+
Invalid = 0
|
|
35
|
+
Flag = 1
|
|
36
|
+
U8 = 2
|
|
37
|
+
U16 = 3
|
|
38
|
+
U32 = 4
|
|
39
|
+
U64 = 5
|
|
40
|
+
S8 = 6
|
|
41
|
+
S16 = 7
|
|
42
|
+
S32 = 8
|
|
43
|
+
S64 = 9
|
|
44
|
+
Binary = 10
|
|
45
|
+
String = 11
|
|
46
|
+
NulString = 12
|
|
47
|
+
Nested = 13
|
|
48
|
+
NestedArray = 14
|
|
49
|
+
Bitfield32 = 15
|
|
50
|
+
Sint = 16
|
|
51
|
+
Uint = 17
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
module Flags
|
|
55
|
+
module OpFlags
|
|
56
|
+
AdminPerm = 1
|
|
57
|
+
CmdCapDo = 2
|
|
58
|
+
CmdCapDump = 4
|
|
59
|
+
CmdCapHaspol = 8
|
|
60
|
+
UnsAdminPerm = 16
|
|
61
|
+
end
|
|
62
|
+
end
|
|
16
63
|
module Structs
|
|
17
64
|
end
|
|
18
65
|
module AttributeSets
|
|
19
|
-
class CtrlAttrs < ::Nl::
|
|
66
|
+
class CtrlAttrs < ::Nl::AttributeSet
|
|
20
67
|
# Abstract class
|
|
21
|
-
class Attribute < ::Nl::
|
|
68
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
22
69
|
end
|
|
23
70
|
class FamilyId < Attribute
|
|
24
71
|
TYPE = 1
|
|
25
72
|
NAME = :"family_id"
|
|
26
|
-
|
|
73
|
+
# @private
|
|
74
|
+
ORDER = 0
|
|
75
|
+
# @private
|
|
76
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
|
|
27
77
|
end
|
|
28
78
|
class FamilyName < Attribute
|
|
29
79
|
TYPE = 2
|
|
30
80
|
NAME = :"family_name"
|
|
31
|
-
|
|
81
|
+
# @private
|
|
82
|
+
ORDER = 1
|
|
83
|
+
# @private
|
|
84
|
+
DATATYPE = ::Nl::DataTypes::String.new(check: nil)
|
|
32
85
|
end
|
|
33
86
|
class Version < Attribute
|
|
34
87
|
TYPE = 3
|
|
35
88
|
NAME = :"version"
|
|
36
|
-
|
|
89
|
+
# @private
|
|
90
|
+
ORDER = 2
|
|
91
|
+
# @private
|
|
92
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
37
93
|
end
|
|
38
94
|
class Hdrsize < Attribute
|
|
39
95
|
TYPE = 4
|
|
40
96
|
NAME = :"hdrsize"
|
|
41
|
-
|
|
97
|
+
# @private
|
|
98
|
+
ORDER = 3
|
|
99
|
+
# @private
|
|
100
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
42
101
|
end
|
|
43
102
|
class Maxattr < Attribute
|
|
44
103
|
TYPE = 5
|
|
45
104
|
NAME = :"maxattr"
|
|
46
|
-
|
|
105
|
+
# @private
|
|
106
|
+
ORDER = 4
|
|
107
|
+
# @private
|
|
108
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
47
109
|
end
|
|
48
110
|
class Ops < Attribute
|
|
49
111
|
TYPE = 6
|
|
50
112
|
NAME = :"ops"
|
|
113
|
+
# @private
|
|
114
|
+
ORDER = 5
|
|
51
115
|
end
|
|
52
116
|
class McastGroups < Attribute
|
|
53
117
|
TYPE = 7
|
|
54
118
|
NAME = :"mcast_groups"
|
|
119
|
+
# @private
|
|
120
|
+
ORDER = 6
|
|
55
121
|
end
|
|
56
122
|
class Policy < Attribute
|
|
57
123
|
TYPE = 8
|
|
58
124
|
NAME = :"policy"
|
|
125
|
+
# @private
|
|
126
|
+
ORDER = 7
|
|
59
127
|
end
|
|
60
128
|
class OpPolicy < Attribute
|
|
61
129
|
TYPE = 9
|
|
62
130
|
NAME = :"op_policy"
|
|
131
|
+
# @private
|
|
132
|
+
ORDER = 8
|
|
63
133
|
end
|
|
64
134
|
class Op < Attribute
|
|
65
135
|
TYPE = 10
|
|
66
136
|
NAME = :"op"
|
|
67
|
-
|
|
137
|
+
# @private
|
|
138
|
+
ORDER = 9
|
|
139
|
+
# @private
|
|
140
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
68
141
|
end
|
|
69
|
-
#
|
|
142
|
+
# @private
|
|
70
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]
|
|
71
|
-
#
|
|
144
|
+
# @private
|
|
72
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
|
|
73
186
|
class << self
|
|
74
187
|
# Looks up Attribute class by name.
|
|
75
|
-
#--
|
|
76
188
|
# @rbs name: Symbol
|
|
77
189
|
# @rbs return: Attribute
|
|
190
|
+
# @param [Symbol] name
|
|
191
|
+
# @return [Attribute]
|
|
78
192
|
def by_name(name); BY_NAME.fetch(name); end
|
|
79
193
|
# Looks up Attribute class by type value.
|
|
80
|
-
#--
|
|
81
194
|
# @rbs type: Integer
|
|
82
195
|
# @rbs return: Attribute
|
|
196
|
+
# @param [Integer] type
|
|
197
|
+
# @return [Attribute]
|
|
83
198
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
84
199
|
end
|
|
85
200
|
end
|
|
86
|
-
class McastGroupAttrs < ::Nl::
|
|
201
|
+
class McastGroupAttrs < ::Nl::AttributeSet
|
|
87
202
|
# Abstract class
|
|
88
|
-
class Attribute < ::Nl::
|
|
203
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
89
204
|
end
|
|
90
205
|
class Name < Attribute
|
|
91
206
|
TYPE = 1
|
|
92
207
|
NAME = :"name"
|
|
93
|
-
|
|
208
|
+
# @private
|
|
209
|
+
ORDER = 0
|
|
210
|
+
# @private
|
|
211
|
+
DATATYPE = ::Nl::DataTypes::String.new(check: nil)
|
|
94
212
|
end
|
|
95
213
|
class Id < Attribute
|
|
96
214
|
TYPE = 2
|
|
97
215
|
NAME = :"id"
|
|
98
|
-
|
|
216
|
+
# @private
|
|
217
|
+
ORDER = 1
|
|
218
|
+
# @private
|
|
219
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
99
220
|
end
|
|
100
|
-
#
|
|
221
|
+
# @private
|
|
101
222
|
BY_NAME = Ractor.make_shareable({:"name" => Name, :"id" => Id}) #: Hash[::Symbol, Attribute]
|
|
102
|
-
#
|
|
223
|
+
# @private
|
|
103
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
|
|
104
233
|
class << self
|
|
105
234
|
# Looks up Attribute class by name.
|
|
106
|
-
#--
|
|
107
235
|
# @rbs name: Symbol
|
|
108
236
|
# @rbs return: Attribute
|
|
237
|
+
# @param [Symbol] name
|
|
238
|
+
# @return [Attribute]
|
|
109
239
|
def by_name(name); BY_NAME.fetch(name); end
|
|
110
240
|
# Looks up Attribute class by type value.
|
|
111
|
-
#--
|
|
112
241
|
# @rbs type: Integer
|
|
113
242
|
# @rbs return: Attribute
|
|
243
|
+
# @param [Integer] type
|
|
244
|
+
# @return [Attribute]
|
|
114
245
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
115
246
|
end
|
|
116
247
|
end
|
|
117
|
-
class OpAttrs < ::Nl::
|
|
248
|
+
class OpAttrs < ::Nl::AttributeSet
|
|
118
249
|
# Abstract class
|
|
119
|
-
class Attribute < ::Nl::
|
|
250
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
120
251
|
end
|
|
121
252
|
class Id < Attribute
|
|
122
253
|
TYPE = 1
|
|
123
254
|
NAME = :"id"
|
|
124
|
-
|
|
255
|
+
# @private
|
|
256
|
+
ORDER = 0
|
|
257
|
+
# @private
|
|
258
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
125
259
|
end
|
|
260
|
+
# Known flags are defined in {Flags::OpFlags}.
|
|
126
261
|
class Flags < Attribute
|
|
127
262
|
TYPE = 2
|
|
128
263
|
NAME = :"flags"
|
|
129
|
-
|
|
264
|
+
# @private
|
|
265
|
+
ORDER = 1
|
|
266
|
+
# @private
|
|
267
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
130
268
|
end
|
|
131
|
-
#
|
|
269
|
+
# @private
|
|
132
270
|
BY_NAME = Ractor.make_shareable({:"id" => Id, :"flags" => Flags}) #: Hash[::Symbol, Attribute]
|
|
133
|
-
#
|
|
271
|
+
# @private
|
|
134
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
|
|
135
282
|
class << self
|
|
136
283
|
# Looks up Attribute class by name.
|
|
137
|
-
#--
|
|
138
284
|
# @rbs name: Symbol
|
|
139
285
|
# @rbs return: Attribute
|
|
286
|
+
# @param [Symbol] name
|
|
287
|
+
# @return [Attribute]
|
|
140
288
|
def by_name(name); BY_NAME.fetch(name); end
|
|
141
289
|
# Looks up Attribute class by type value.
|
|
142
|
-
#--
|
|
143
290
|
# @rbs type: Integer
|
|
144
291
|
# @rbs return: Attribute
|
|
292
|
+
# @param [Integer] type
|
|
293
|
+
# @return [Attribute]
|
|
145
294
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
146
295
|
end
|
|
147
296
|
end
|
|
148
|
-
class PolicyAttrs < ::Nl::
|
|
297
|
+
class PolicyAttrs < ::Nl::AttributeSet
|
|
149
298
|
# Abstract class
|
|
150
|
-
class Attribute < ::Nl::
|
|
299
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
151
300
|
end
|
|
301
|
+
# Known enum values are defined in {Enums::AttrType}.
|
|
152
302
|
class Type < Attribute
|
|
153
303
|
TYPE = 1
|
|
154
304
|
NAME = :"type"
|
|
155
|
-
|
|
305
|
+
# @private
|
|
306
|
+
ORDER = 0
|
|
307
|
+
# @private
|
|
308
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
156
309
|
end
|
|
157
310
|
class MinValueS < Attribute
|
|
158
311
|
TYPE = 2
|
|
159
312
|
NAME = :"min_value_s"
|
|
160
|
-
|
|
313
|
+
# @private
|
|
314
|
+
ORDER = 1
|
|
315
|
+
# @private
|
|
316
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::S64, check: nil)
|
|
161
317
|
end
|
|
162
318
|
class MaxValueS < Attribute
|
|
163
319
|
TYPE = 3
|
|
164
320
|
NAME = :"max_value_s"
|
|
165
|
-
|
|
321
|
+
# @private
|
|
322
|
+
ORDER = 2
|
|
323
|
+
# @private
|
|
324
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::S64, check: nil)
|
|
166
325
|
end
|
|
167
326
|
class MinValueU < Attribute
|
|
168
327
|
TYPE = 4
|
|
169
328
|
NAME = :"min_value_u"
|
|
170
|
-
|
|
329
|
+
# @private
|
|
330
|
+
ORDER = 3
|
|
331
|
+
# @private
|
|
332
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
171
333
|
end
|
|
172
334
|
class MaxValueU < Attribute
|
|
173
335
|
TYPE = 5
|
|
174
336
|
NAME = :"max_value_u"
|
|
175
|
-
|
|
337
|
+
# @private
|
|
338
|
+
ORDER = 4
|
|
339
|
+
# @private
|
|
340
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
176
341
|
end
|
|
177
342
|
class MinLength < Attribute
|
|
178
343
|
TYPE = 6
|
|
179
344
|
NAME = :"min_length"
|
|
180
|
-
|
|
345
|
+
# @private
|
|
346
|
+
ORDER = 5
|
|
347
|
+
# @private
|
|
348
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
181
349
|
end
|
|
182
350
|
class MaxLength < Attribute
|
|
183
351
|
TYPE = 7
|
|
184
352
|
NAME = :"max_length"
|
|
185
|
-
|
|
353
|
+
# @private
|
|
354
|
+
ORDER = 6
|
|
355
|
+
# @private
|
|
356
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
186
357
|
end
|
|
187
358
|
class PolicyIdx < Attribute
|
|
188
359
|
TYPE = 8
|
|
189
360
|
NAME = :"policy_idx"
|
|
190
|
-
|
|
361
|
+
# @private
|
|
362
|
+
ORDER = 7
|
|
363
|
+
# @private
|
|
364
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
191
365
|
end
|
|
192
366
|
class PolicyMaxtype < Attribute
|
|
193
367
|
TYPE = 9
|
|
194
368
|
NAME = :"policy_maxtype"
|
|
195
|
-
|
|
369
|
+
# @private
|
|
370
|
+
ORDER = 8
|
|
371
|
+
# @private
|
|
372
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
196
373
|
end
|
|
197
374
|
class Bitfield32Mask < Attribute
|
|
198
375
|
TYPE = 10
|
|
199
376
|
NAME = :"bitfield32_mask"
|
|
200
|
-
|
|
377
|
+
# @private
|
|
378
|
+
ORDER = 9
|
|
379
|
+
# @private
|
|
380
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
201
381
|
end
|
|
202
382
|
class Mask < Attribute
|
|
203
383
|
TYPE = 11
|
|
204
384
|
NAME = :"mask"
|
|
205
|
-
|
|
385
|
+
# @private
|
|
386
|
+
ORDER = 10
|
|
387
|
+
# @private
|
|
388
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
206
389
|
end
|
|
207
390
|
class Pad < Attribute
|
|
208
391
|
TYPE = 12
|
|
209
392
|
NAME = :"pad"
|
|
210
|
-
|
|
393
|
+
# @private
|
|
394
|
+
ORDER = 11
|
|
395
|
+
# @private
|
|
396
|
+
DATATYPE = ::Nl::DataTypes::Pad.new()
|
|
211
397
|
end
|
|
212
|
-
#
|
|
398
|
+
# @private
|
|
213
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]
|
|
214
|
-
#
|
|
400
|
+
# @private
|
|
215
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
|
|
216
447
|
class << self
|
|
217
448
|
# Looks up Attribute class by name.
|
|
218
|
-
#--
|
|
219
449
|
# @rbs name: Symbol
|
|
220
450
|
# @rbs return: Attribute
|
|
451
|
+
# @param [Symbol] name
|
|
452
|
+
# @return [Attribute]
|
|
221
453
|
def by_name(name); BY_NAME.fetch(name); end
|
|
222
454
|
# Looks up Attribute class by type value.
|
|
223
|
-
#--
|
|
224
455
|
# @rbs type: Integer
|
|
225
456
|
# @rbs return: Attribute
|
|
457
|
+
# @param [Integer] type
|
|
458
|
+
# @return [Attribute]
|
|
226
459
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
227
460
|
end
|
|
228
461
|
end
|
|
229
|
-
class OpPolicyAttrs < ::Nl::
|
|
462
|
+
class OpPolicyAttrs < ::Nl::AttributeSet
|
|
230
463
|
# Abstract class
|
|
231
|
-
class Attribute < ::Nl::
|
|
464
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
232
465
|
end
|
|
233
466
|
class Do < Attribute
|
|
234
467
|
TYPE = 1
|
|
235
468
|
NAME = :"do"
|
|
236
|
-
|
|
469
|
+
# @private
|
|
470
|
+
ORDER = 0
|
|
471
|
+
# @private
|
|
472
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
237
473
|
end
|
|
238
474
|
class Dump < Attribute
|
|
239
475
|
TYPE = 2
|
|
240
476
|
NAME = :"dump"
|
|
241
|
-
|
|
477
|
+
# @private
|
|
478
|
+
ORDER = 1
|
|
479
|
+
# @private
|
|
480
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
242
481
|
end
|
|
243
|
-
#
|
|
482
|
+
# @private
|
|
244
483
|
BY_NAME = Ractor.make_shareable({:"do" => Do, :"dump" => Dump}) #: Hash[::Symbol, Attribute]
|
|
245
|
-
#
|
|
484
|
+
# @private
|
|
246
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
|
|
247
494
|
class << self
|
|
248
495
|
# Looks up Attribute class by name.
|
|
249
|
-
#--
|
|
250
496
|
# @rbs name: Symbol
|
|
251
497
|
# @rbs return: Attribute
|
|
498
|
+
# @param [Symbol] name
|
|
499
|
+
# @return [Attribute]
|
|
252
500
|
def by_name(name); BY_NAME.fetch(name); end
|
|
253
501
|
# Looks up Attribute class by type value.
|
|
254
|
-
#--
|
|
255
502
|
# @rbs type: Integer
|
|
256
503
|
# @rbs return: Attribute
|
|
504
|
+
# @param [Integer] type
|
|
505
|
+
# @return [Attribute]
|
|
257
506
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
258
507
|
end
|
|
259
508
|
end
|
|
260
|
-
|
|
261
|
-
CtrlAttrs::
|
|
262
|
-
|
|
263
|
-
CtrlAttrs::
|
|
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([]))
|
|
264
517
|
end
|
|
265
518
|
module Messages
|
|
266
519
|
# Get / dump genetlink families
|
|
267
|
-
class DoGetfamilyRequest < ::Nl::
|
|
520
|
+
class DoGetfamilyRequest < ::Nl::Genl::Message
|
|
268
521
|
TYPE = 3
|
|
269
522
|
FIXED_HEADER = nil
|
|
270
523
|
ATTRIBUTE_SET = AttributeSets::CtrlAttrs
|
|
271
524
|
ATTRIBUTES = Ractor.make_shareable(%i[family_name])
|
|
272
|
-
# Gets the value of `family-name` attribute in the message.
|
|
273
|
-
#--
|
|
274
525
|
# @rbs return: ::String
|
|
526
|
+
# @return [String]
|
|
527
|
+
# @see AttributeSets::CtrlAttrs::FamilyName
|
|
275
528
|
def family_name; attributes[:"family_name"]&.value; end
|
|
276
529
|
end
|
|
277
530
|
# Get / dump genetlink families
|
|
278
|
-
class DoGetfamilyReply < ::Nl::
|
|
531
|
+
class DoGetfamilyReply < ::Nl::Genl::Message
|
|
279
532
|
TYPE = 1
|
|
280
533
|
FIXED_HEADER = nil
|
|
281
534
|
ATTRIBUTE_SET = AttributeSets::CtrlAttrs
|
|
282
535
|
ATTRIBUTES = Ractor.make_shareable(%i[family_id family_name version hdrsize maxattr ops mcast_groups])
|
|
283
|
-
# Gets the value of `family-id` attribute in the message.
|
|
284
|
-
#--
|
|
285
536
|
# @rbs return: ::Integer
|
|
537
|
+
# @return [Integer]
|
|
538
|
+
# @see AttributeSets::CtrlAttrs::FamilyId
|
|
286
539
|
def family_id; attributes[:"family_id"]&.value; end
|
|
287
|
-
# Gets the value of `family-name` attribute in the message.
|
|
288
|
-
#--
|
|
289
540
|
# @rbs return: ::String
|
|
541
|
+
# @return [String]
|
|
542
|
+
# @see AttributeSets::CtrlAttrs::FamilyName
|
|
290
543
|
def family_name; attributes[:"family_name"]&.value; end
|
|
291
|
-
# Gets the value of `version` attribute in the message.
|
|
292
|
-
#--
|
|
293
544
|
# @rbs return: ::Integer
|
|
545
|
+
# @return [Integer]
|
|
546
|
+
# @see AttributeSets::CtrlAttrs::Version
|
|
294
547
|
def version; attributes[:"version"]&.value; end
|
|
295
|
-
# Gets the value of `hdrsize` attribute in the message.
|
|
296
|
-
#--
|
|
297
548
|
# @rbs return: ::Integer
|
|
549
|
+
# @return [Integer]
|
|
550
|
+
# @see AttributeSets::CtrlAttrs::Hdrsize
|
|
298
551
|
def hdrsize; attributes[:"hdrsize"]&.value; end
|
|
299
|
-
# Gets the value of `maxattr` attribute in the message.
|
|
300
|
-
#--
|
|
301
552
|
# @rbs return: ::Integer
|
|
553
|
+
# @return [Integer]
|
|
554
|
+
# @see AttributeSets::CtrlAttrs::Maxattr
|
|
302
555
|
def maxattr; attributes[:"maxattr"]&.value; end
|
|
303
|
-
# Gets the value of `ops` attribute in the message.
|
|
304
|
-
#--
|
|
305
556
|
# @rbs return: ::Array[AttributeSets::OpAttrs]
|
|
557
|
+
# @return [Array<AttributeSets::OpAttrs>]
|
|
558
|
+
# @see AttributeSets::CtrlAttrs::Ops
|
|
306
559
|
def ops; attributes[:"ops"]&.value; end
|
|
307
|
-
# Gets the value of `mcast-groups` attribute in the message.
|
|
308
|
-
#--
|
|
309
560
|
# @rbs return: ::Array[AttributeSets::McastGroupAttrs]
|
|
561
|
+
# @return [Array<AttributeSets::McastGroupAttrs>]
|
|
562
|
+
# @see AttributeSets::CtrlAttrs::McastGroups
|
|
310
563
|
def mcast_groups; attributes[:"mcast_groups"]&.value; end
|
|
311
564
|
end
|
|
312
565
|
# Get / dump genetlink families
|
|
313
|
-
class DumpGetfamilyRequest < ::Nl::
|
|
566
|
+
class DumpGetfamilyRequest < ::Nl::Genl::Message
|
|
314
567
|
TYPE = 3
|
|
315
568
|
FIXED_HEADER = nil
|
|
316
569
|
ATTRIBUTE_SET = AttributeSets::CtrlAttrs
|
|
317
570
|
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
318
571
|
end
|
|
319
572
|
# Get / dump genetlink families
|
|
320
|
-
class DumpGetfamilyReply < ::Nl::
|
|
573
|
+
class DumpGetfamilyReply < ::Nl::Genl::Message
|
|
321
574
|
TYPE = 1
|
|
322
575
|
FIXED_HEADER = nil
|
|
323
576
|
ATTRIBUTE_SET = AttributeSets::CtrlAttrs
|
|
324
577
|
ATTRIBUTES = Ractor.make_shareable(%i[family_id family_name version hdrsize maxattr ops mcast_groups])
|
|
325
|
-
# Gets the value of `family-id` attribute in the message.
|
|
326
|
-
#--
|
|
327
578
|
# @rbs return: ::Integer
|
|
579
|
+
# @return [Integer]
|
|
580
|
+
# @see AttributeSets::CtrlAttrs::FamilyId
|
|
328
581
|
def family_id; attributes[:"family_id"]&.value; end
|
|
329
|
-
# Gets the value of `family-name` attribute in the message.
|
|
330
|
-
#--
|
|
331
582
|
# @rbs return: ::String
|
|
583
|
+
# @return [String]
|
|
584
|
+
# @see AttributeSets::CtrlAttrs::FamilyName
|
|
332
585
|
def family_name; attributes[:"family_name"]&.value; end
|
|
333
|
-
# Gets the value of `version` attribute in the message.
|
|
334
|
-
#--
|
|
335
586
|
# @rbs return: ::Integer
|
|
587
|
+
# @return [Integer]
|
|
588
|
+
# @see AttributeSets::CtrlAttrs::Version
|
|
336
589
|
def version; attributes[:"version"]&.value; end
|
|
337
|
-
# Gets the value of `hdrsize` attribute in the message.
|
|
338
|
-
#--
|
|
339
590
|
# @rbs return: ::Integer
|
|
591
|
+
# @return [Integer]
|
|
592
|
+
# @see AttributeSets::CtrlAttrs::Hdrsize
|
|
340
593
|
def hdrsize; attributes[:"hdrsize"]&.value; end
|
|
341
|
-
# Gets the value of `maxattr` attribute in the message.
|
|
342
|
-
#--
|
|
343
594
|
# @rbs return: ::Integer
|
|
595
|
+
# @return [Integer]
|
|
596
|
+
# @see AttributeSets::CtrlAttrs::Maxattr
|
|
344
597
|
def maxattr; attributes[:"maxattr"]&.value; end
|
|
345
|
-
# Gets the value of `ops` attribute in the message.
|
|
346
|
-
#--
|
|
347
598
|
# @rbs return: ::Array[AttributeSets::OpAttrs]
|
|
599
|
+
# @return [Array<AttributeSets::OpAttrs>]
|
|
600
|
+
# @see AttributeSets::CtrlAttrs::Ops
|
|
348
601
|
def ops; attributes[:"ops"]&.value; end
|
|
349
|
-
# Gets the value of `mcast-groups` attribute in the message.
|
|
350
|
-
#--
|
|
351
602
|
# @rbs return: ::Array[AttributeSets::McastGroupAttrs]
|
|
603
|
+
# @return [Array<AttributeSets::McastGroupAttrs>]
|
|
604
|
+
# @see AttributeSets::CtrlAttrs::McastGroups
|
|
352
605
|
def mcast_groups; attributes[:"mcast_groups"]&.value; end
|
|
353
606
|
end
|
|
354
607
|
# Get / dump genetlink policies
|
|
355
|
-
class DumpGetpolicyRequest < ::Nl::
|
|
608
|
+
class DumpGetpolicyRequest < ::Nl::Genl::Message
|
|
356
609
|
TYPE = 10
|
|
357
610
|
FIXED_HEADER = nil
|
|
358
611
|
ATTRIBUTE_SET = AttributeSets::CtrlAttrs
|
|
359
612
|
ATTRIBUTES = Ractor.make_shareable(%i[family_id family_name op])
|
|
360
|
-
# Gets the value of `family-id` attribute in the message.
|
|
361
|
-
#--
|
|
362
613
|
# @rbs return: ::Integer
|
|
614
|
+
# @return [Integer]
|
|
615
|
+
# @see AttributeSets::CtrlAttrs::FamilyId
|
|
363
616
|
def family_id; attributes[:"family_id"]&.value; end
|
|
364
|
-
# Gets the value of `family-name` attribute in the message.
|
|
365
|
-
#--
|
|
366
617
|
# @rbs return: ::String
|
|
618
|
+
# @return [String]
|
|
619
|
+
# @see AttributeSets::CtrlAttrs::FamilyName
|
|
367
620
|
def family_name; attributes[:"family_name"]&.value; end
|
|
368
|
-
# Gets the value of `op` attribute in the message.
|
|
369
|
-
#--
|
|
370
621
|
# @rbs return: ::Integer
|
|
622
|
+
# @return [Integer]
|
|
623
|
+
# @see AttributeSets::CtrlAttrs::Op
|
|
371
624
|
def op; attributes[:"op"]&.value; end
|
|
372
625
|
end
|
|
373
626
|
# Get / dump genetlink policies
|
|
374
|
-
class DumpGetpolicyReply < ::Nl::
|
|
627
|
+
class DumpGetpolicyReply < ::Nl::Genl::Message
|
|
375
628
|
TYPE = 10
|
|
376
629
|
FIXED_HEADER = nil
|
|
377
630
|
ATTRIBUTE_SET = AttributeSets::CtrlAttrs
|
|
378
631
|
ATTRIBUTES = Ractor.make_shareable(%i[family_id policy op_policy])
|
|
379
|
-
# Gets the value of `family-id` attribute in the message.
|
|
380
|
-
#--
|
|
381
632
|
# @rbs return: ::Integer
|
|
633
|
+
# @return [Integer]
|
|
634
|
+
# @see AttributeSets::CtrlAttrs::FamilyId
|
|
382
635
|
def family_id; attributes[:"family_id"]&.value; end
|
|
383
|
-
# Gets the value of `policy` attribute in the message.
|
|
384
|
-
#--
|
|
385
636
|
# @rbs return: ::Hash[::Integer, ::Hash[::Integer, AttributeSets::PolicyAttrs]]
|
|
637
|
+
# @return [Hash<Integer, Hash<Integer, AttributeSets::PolicyAttrs>>]
|
|
638
|
+
# @see AttributeSets::CtrlAttrs::Policy
|
|
386
639
|
def policy; attributes[:"policy"]&.value; end
|
|
387
|
-
# Gets the value of `op-policy` attribute in the message.
|
|
388
|
-
#--
|
|
389
640
|
# @rbs return: ::Hash[::Integer, AttributeSets::OpPolicyAttrs]
|
|
641
|
+
# @return [Hash<Integer, AttributeSets::OpPolicyAttrs>]
|
|
642
|
+
# @see AttributeSets::CtrlAttrs::OpPolicy
|
|
390
643
|
def op_policy; attributes[:"op_policy"]&.value; end
|
|
391
644
|
end
|
|
392
645
|
end
|
|
393
646
|
module Notifications
|
|
394
647
|
end
|
|
648
|
+
# @private
|
|
395
649
|
NOTIFICATIONS = Ractor.make_shareable({}) #: Hash[::Integer, ::Class]
|
|
396
650
|
# Get / dump genetlink families
|
|
397
|
-
#--
|
|
398
651
|
# @rbs (?family_name: ::String) -> Messages::DoGetfamilyReply
|
|
652
|
+
# @param [Hash] args
|
|
653
|
+
# @option args [String] family_name
|
|
654
|
+
# @return [Messages::DoGetfamilyReply]
|
|
655
|
+
# @see Messages::DoGetfamilyRequest
|
|
399
656
|
def do_getfamily(**args)
|
|
400
657
|
exchange_message(:"do", Messages::DoGetfamilyRequest, Messages::DoGetfamilyReply, args)
|
|
401
658
|
end
|
|
402
659
|
# Get / dump genetlink families
|
|
403
|
-
|
|
404
|
-
# @rbs () -> Enumerable[Messages::DumpGetfamilyReply]
|
|
660
|
+
# @rbs () -> Array[Messages::DumpGetfamilyReply]
|
|
405
661
|
# | () { (Messages::DumpGetfamilyReply) -> void } -> void
|
|
662
|
+
# @overload dump_getfamily(**args)
|
|
663
|
+
# Returns an array when no block is given.
|
|
664
|
+
# @param [Hash] args
|
|
665
|
+
# @return [Array<Messages::DumpGetfamilyReply>]
|
|
666
|
+
# @overload dump_getfamily(**args, &block)
|
|
667
|
+
# Yields each reply when a block is given.
|
|
668
|
+
# @param [Hash] args
|
|
669
|
+
# @yieldparam [Messages::DumpGetfamilyReply] reply
|
|
670
|
+
# @return [void]
|
|
671
|
+
# @see Messages::DumpGetfamilyRequest
|
|
406
672
|
def dump_getfamily(**args, &block)
|
|
407
673
|
exchange_message(:"dump", Messages::DumpGetfamilyRequest, Messages::DumpGetfamilyReply, args, &block)
|
|
408
674
|
end
|
|
409
675
|
# Get / dump genetlink policies
|
|
410
|
-
|
|
411
|
-
# @rbs (?family_id: ::Integer, ?family_name: ::String, ?op: ::Integer) -> Enumerable[Messages::DumpGetpolicyReply]
|
|
676
|
+
# @rbs (?family_id: ::Integer, ?family_name: ::String, ?op: ::Integer) -> Array[Messages::DumpGetpolicyReply]
|
|
412
677
|
# | (?family_id: ::Integer, ?family_name: ::String, ?op: ::Integer) { (Messages::DumpGetpolicyReply) -> void } -> void
|
|
678
|
+
# @overload dump_getpolicy(**args)
|
|
679
|
+
# Returns an array when no block is given.
|
|
680
|
+
# @param [Hash] args
|
|
681
|
+
# @option args [Integer] family_id
|
|
682
|
+
# @option args [String] family_name
|
|
683
|
+
# @option args [Integer] op
|
|
684
|
+
# @return [Array<Messages::DumpGetpolicyReply>]
|
|
685
|
+
# @overload dump_getpolicy(**args, &block)
|
|
686
|
+
# Yields each reply when a block is given.
|
|
687
|
+
# @param [Hash] args
|
|
688
|
+
# @option args [Integer] family_id
|
|
689
|
+
# @option args [String] family_name
|
|
690
|
+
# @option args [Integer] op
|
|
691
|
+
# @yieldparam [Messages::DumpGetpolicyReply] reply
|
|
692
|
+
# @return [void]
|
|
693
|
+
# @see Messages::DumpGetpolicyRequest
|
|
413
694
|
def dump_getpolicy(**args, &block)
|
|
414
695
|
exchange_message(:"dump", Messages::DumpGetpolicyRequest, Messages::DumpGetpolicyReply, args, &block)
|
|
415
696
|
end
|
|
416
697
|
class AsyncOperations
|
|
417
|
-
#
|
|
698
|
+
# @private
|
|
418
699
|
def initialize(&exchange)
|
|
419
700
|
@exchange = exchange
|
|
420
701
|
end
|
|
421
702
|
# Get / dump genetlink families
|
|
422
|
-
#--
|
|
423
703
|
# @rbs (?family_name: ::String) -> ::Nl::Async::Future[Messages::DoGetfamilyReply]
|
|
704
|
+
# @param [Hash] args
|
|
705
|
+
# @option args [String] family_name
|
|
706
|
+
# @return [Nl::Async::Future<Messages::DoGetfamilyReply>]
|
|
707
|
+
# @see Messages::DoGetfamilyRequest
|
|
424
708
|
def do_getfamily(**args)
|
|
425
709
|
@exchange.call(:"do", Messages::DoGetfamilyRequest, Messages::DoGetfamilyReply, args)
|
|
426
710
|
end
|
|
427
711
|
# Get / dump genetlink families
|
|
428
|
-
#--
|
|
429
712
|
# @rbs () -> ::Nl::Async::Stream[Messages::DumpGetfamilyReply]
|
|
713
|
+
# @param [Hash] args
|
|
714
|
+
# @return [Nl::Async::Stream<Messages::DumpGetfamilyReply>]
|
|
715
|
+
# @see Messages::DumpGetfamilyRequest
|
|
430
716
|
def dump_getfamily(**args)
|
|
431
717
|
@exchange.call(:"dump", Messages::DumpGetfamilyRequest, Messages::DumpGetfamilyReply, args)
|
|
432
718
|
end
|
|
433
719
|
# Get / dump genetlink policies
|
|
434
|
-
#--
|
|
435
720
|
# @rbs (?family_id: ::Integer, ?family_name: ::String, ?op: ::Integer) -> ::Nl::Async::Stream[Messages::DumpGetpolicyReply]
|
|
721
|
+
# @param [Hash] args
|
|
722
|
+
# @option args [Integer] family_id
|
|
723
|
+
# @option args [String] family_name
|
|
724
|
+
# @option args [Integer] op
|
|
725
|
+
# @return [Nl::Async::Stream<Messages::DumpGetpolicyReply>]
|
|
726
|
+
# @see Messages::DumpGetpolicyRequest
|
|
436
727
|
def dump_getpolicy(**args)
|
|
437
728
|
@exchange.call(:"dump", Messages::DumpGetpolicyRequest, Messages::DumpGetpolicyReply, args)
|
|
438
729
|
end
|
|
439
730
|
end
|
|
440
731
|
# Returns the asynchronous operation facade for this family.
|
|
441
|
-
#--
|
|
442
732
|
# @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
|
|
733
|
+
# @param [::Integer, nil] stream_capacity
|
|
734
|
+
# @return [AsyncOperations]
|
|
443
735
|
def async(stream_capacity: nil)
|
|
444
736
|
return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
|
|
445
737
|
build_async_facade(AsyncOperations, stream_capacity:)
|