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
data/generated/nl/linux/team.rb
CHANGED
|
@@ -3,15 +3,35 @@
|
|
|
3
3
|
# This file is based on Documentation/netlink/specs/team.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
|
# Network team device driver.
|
|
11
|
-
class Team < ::Nl::Family
|
|
10
|
+
class Team < ::Nl::Genl::Family
|
|
12
11
|
NAME = "team"
|
|
13
|
-
|
|
12
|
+
VERSION = 1
|
|
13
|
+
# @rbs (?resolver: ^(::Nl::Genl::Client, ::String) -> ::Nl::Genl::FamilyInfo, ?executor: executor?, ?notification_capacity: ::Integer?) -> (::Nl::Family::Session & instance)
|
|
14
|
+
# @rbs | [R] (?resolver: ^(::Nl::Genl::Client, ::String) -> ::Nl::Genl::FamilyInfo, ?executor: executor?, ?notification_capacity: ::Integer?) { (instance) -> R } -> R
|
|
15
|
+
# @overload open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
|
|
16
|
+
# @param [#call] resolver
|
|
17
|
+
# @param [Symbol, nil] executor
|
|
18
|
+
# @param [Integer, nil] notification_capacity
|
|
19
|
+
# @return [Team]
|
|
20
|
+
# @overload open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY, &block)
|
|
21
|
+
# @param [#call] resolver
|
|
22
|
+
# @param [Symbol, nil] executor
|
|
23
|
+
# @param [Integer, nil] notification_capacity
|
|
24
|
+
# @yieldparam [Team] family
|
|
25
|
+
# @return [Object] the result of the block
|
|
26
|
+
def self.open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
|
|
27
|
+
super
|
|
28
|
+
end
|
|
29
|
+
# @private
|
|
14
30
|
MCAST_GROUPS = Ractor.make_shareable({}) #: Hash[::Symbol, ::Nl::McastGroup]
|
|
31
|
+
module Constants
|
|
32
|
+
STRING_MAX_LEN = 32
|
|
33
|
+
GENL_CHANGE_EVENT_MC_GRP_NAME = "change_event"
|
|
34
|
+
end
|
|
15
35
|
module Structs
|
|
16
36
|
end
|
|
17
37
|
module AttributeSets
|
|
@@ -29,388 +49,554 @@ class Team < ::Nl::Family
|
|
|
29
49
|
# [TEAM_ATTR_ITEM_PORT]
|
|
30
50
|
# [TEAM_ATTR_PORT_*], ...
|
|
31
51
|
# ...
|
|
32
|
-
class Team < ::Nl::
|
|
52
|
+
class Team < ::Nl::AttributeSet
|
|
33
53
|
# Abstract class
|
|
34
|
-
class Attribute < ::Nl::
|
|
54
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
35
55
|
end
|
|
36
56
|
class TeamIfindex < Attribute
|
|
37
57
|
TYPE = 1
|
|
38
58
|
NAME = :"team_ifindex"
|
|
39
|
-
|
|
59
|
+
# @private
|
|
60
|
+
ORDER = 0
|
|
61
|
+
# @private
|
|
62
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
40
63
|
end
|
|
41
64
|
class ListOption < Attribute
|
|
42
65
|
TYPE = 2
|
|
43
66
|
NAME = :"list_option"
|
|
67
|
+
# @private
|
|
68
|
+
ORDER = 1
|
|
44
69
|
end
|
|
45
70
|
class ListPort < Attribute
|
|
46
71
|
TYPE = 3
|
|
47
72
|
NAME = :"list_port"
|
|
73
|
+
# @private
|
|
74
|
+
ORDER = 2
|
|
48
75
|
end
|
|
49
|
-
#
|
|
76
|
+
# @private
|
|
50
77
|
BY_NAME = Ractor.make_shareable({:"team_ifindex" => TeamIfindex, :"list_option" => ListOption, :"list_port" => ListPort}) #: Hash[::Symbol, Attribute]
|
|
51
|
-
#
|
|
78
|
+
# @private
|
|
52
79
|
BY_TYPE = Ractor.make_shareable({1 => TeamIfindex, 2 => ListOption, 3 => ListPort}) #: Hash[::Integer, Attribute]
|
|
80
|
+
# @rbs return: ::Integer
|
|
81
|
+
# @return [Integer]
|
|
82
|
+
# @see TeamIfindex
|
|
83
|
+
def team_ifindex; self[:"team_ifindex"]&.value; end
|
|
84
|
+
# @rbs return: AttributeSets::ItemOption
|
|
85
|
+
# @return [AttributeSets::ItemOption]
|
|
86
|
+
# @see ListOption
|
|
87
|
+
def list_option; self[:"list_option"]&.value; end
|
|
88
|
+
# @rbs return: AttributeSets::ItemPort
|
|
89
|
+
# @return [AttributeSets::ItemPort]
|
|
90
|
+
# @see ListPort
|
|
91
|
+
def list_port; self[:"list_port"]&.value; end
|
|
53
92
|
class << self
|
|
54
93
|
# Looks up Attribute class by name.
|
|
55
|
-
#--
|
|
56
94
|
# @rbs name: Symbol
|
|
57
95
|
# @rbs return: Attribute
|
|
96
|
+
# @param [Symbol] name
|
|
97
|
+
# @return [Attribute]
|
|
58
98
|
def by_name(name); BY_NAME.fetch(name); end
|
|
59
99
|
# Looks up Attribute class by type value.
|
|
60
|
-
#--
|
|
61
100
|
# @rbs type: Integer
|
|
62
101
|
# @rbs return: Attribute
|
|
102
|
+
# @param [Integer] type
|
|
103
|
+
# @return [Attribute]
|
|
63
104
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
64
105
|
end
|
|
65
106
|
end
|
|
66
|
-
class ItemOption < ::Nl::
|
|
107
|
+
class ItemOption < ::Nl::AttributeSet
|
|
67
108
|
# Abstract class
|
|
68
|
-
class Attribute < ::Nl::
|
|
109
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
69
110
|
end
|
|
70
111
|
class Option < Attribute
|
|
71
112
|
TYPE = 1
|
|
72
113
|
NAME = :"option"
|
|
114
|
+
# @private
|
|
115
|
+
ORDER = 0
|
|
73
116
|
end
|
|
74
|
-
#
|
|
117
|
+
# @private
|
|
75
118
|
BY_NAME = Ractor.make_shareable({:"option" => Option}) #: Hash[::Symbol, Attribute]
|
|
76
|
-
#
|
|
119
|
+
# @private
|
|
77
120
|
BY_TYPE = Ractor.make_shareable({1 => Option}) #: Hash[::Integer, Attribute]
|
|
121
|
+
# @rbs return: AttributeSets::AttrOption
|
|
122
|
+
# @return [AttributeSets::AttrOption]
|
|
123
|
+
# @see Option
|
|
124
|
+
def option; self[:"option"]&.value; end
|
|
78
125
|
class << self
|
|
79
126
|
# Looks up Attribute class by name.
|
|
80
|
-
#--
|
|
81
127
|
# @rbs name: Symbol
|
|
82
128
|
# @rbs return: Attribute
|
|
129
|
+
# @param [Symbol] name
|
|
130
|
+
# @return [Attribute]
|
|
83
131
|
def by_name(name); BY_NAME.fetch(name); end
|
|
84
132
|
# Looks up Attribute class by type value.
|
|
85
|
-
#--
|
|
86
133
|
# @rbs type: Integer
|
|
87
134
|
# @rbs return: Attribute
|
|
135
|
+
# @param [Integer] type
|
|
136
|
+
# @return [Attribute]
|
|
88
137
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
89
138
|
end
|
|
90
139
|
end
|
|
91
|
-
class AttrOption < ::Nl::
|
|
140
|
+
class AttrOption < ::Nl::AttributeSet
|
|
92
141
|
# Abstract class
|
|
93
|
-
class Attribute < ::Nl::
|
|
142
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
94
143
|
end
|
|
95
144
|
class Name < Attribute
|
|
96
145
|
TYPE = 1
|
|
97
146
|
NAME = :"name"
|
|
98
|
-
|
|
147
|
+
# @private
|
|
148
|
+
ORDER = 0
|
|
149
|
+
# @private
|
|
150
|
+
DATATYPE = ::Nl::DataTypes::String.new(check: -> { raise ArgumentError, "Value #{it.inspect} is longer than maximum length #{Constants::STRING_MAX_LEN}" unless it.bytesize <= Constants::STRING_MAX_LEN })
|
|
99
151
|
end
|
|
100
152
|
class Changed < Attribute
|
|
101
153
|
TYPE = 2
|
|
102
154
|
NAME = :"changed"
|
|
103
|
-
|
|
155
|
+
# @private
|
|
156
|
+
ORDER = 1
|
|
157
|
+
# @private
|
|
158
|
+
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
104
159
|
end
|
|
105
160
|
class Type < Attribute
|
|
106
161
|
TYPE = 3
|
|
107
162
|
NAME = :"type"
|
|
108
|
-
|
|
163
|
+
# @private
|
|
164
|
+
ORDER = 2
|
|
165
|
+
# @private
|
|
166
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
109
167
|
end
|
|
110
168
|
class Data < Attribute
|
|
111
169
|
TYPE = 4
|
|
112
170
|
NAME = :"data"
|
|
113
|
-
|
|
171
|
+
# @private
|
|
172
|
+
ORDER = 3
|
|
173
|
+
# @private
|
|
174
|
+
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
114
175
|
end
|
|
115
176
|
class Removed < Attribute
|
|
116
177
|
TYPE = 5
|
|
117
178
|
NAME = :"removed"
|
|
118
|
-
|
|
179
|
+
# @private
|
|
180
|
+
ORDER = 4
|
|
181
|
+
# @private
|
|
182
|
+
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
119
183
|
end
|
|
184
|
+
# for per-port options
|
|
120
185
|
class PortIfindex < Attribute
|
|
121
186
|
TYPE = 6
|
|
122
187
|
NAME = :"port_ifindex"
|
|
123
|
-
|
|
188
|
+
# @private
|
|
189
|
+
ORDER = 5
|
|
190
|
+
# @private
|
|
191
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
124
192
|
end
|
|
193
|
+
# for array options
|
|
125
194
|
class ArrayIndex < Attribute
|
|
126
195
|
TYPE = 7
|
|
127
196
|
NAME = :"array_index"
|
|
128
|
-
|
|
197
|
+
# @private
|
|
198
|
+
ORDER = 6
|
|
199
|
+
# @private
|
|
200
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
129
201
|
end
|
|
130
|
-
#
|
|
202
|
+
# @private
|
|
131
203
|
BY_NAME = Ractor.make_shareable({:"name" => Name, :"changed" => Changed, :"type" => Type, :"data" => Data, :"removed" => Removed, :"port_ifindex" => PortIfindex, :"array_index" => ArrayIndex}) #: Hash[::Symbol, Attribute]
|
|
132
|
-
#
|
|
204
|
+
# @private
|
|
133
205
|
BY_TYPE = Ractor.make_shareable({1 => Name, 2 => Changed, 3 => Type, 4 => Data, 5 => Removed, 6 => PortIfindex, 7 => ArrayIndex}) #: Hash[::Integer, Attribute]
|
|
206
|
+
# @rbs return: ::String
|
|
207
|
+
# @return [String]
|
|
208
|
+
# @see Name
|
|
209
|
+
def name; self[:"name"]&.value; end
|
|
210
|
+
# @rbs return: ::Integer
|
|
211
|
+
# @return [Integer]
|
|
212
|
+
# @see Changed
|
|
213
|
+
def changed; self[:"changed"]&.value; end
|
|
214
|
+
# @rbs return: ::Integer
|
|
215
|
+
# @return [Integer]
|
|
216
|
+
# @see Type
|
|
217
|
+
def type; self[:"type"]&.value; end
|
|
218
|
+
# @rbs return: ::String
|
|
219
|
+
# @return [String]
|
|
220
|
+
# @see Data
|
|
221
|
+
def data; self[:"data"]&.value; end
|
|
222
|
+
# @rbs return: ::Integer
|
|
223
|
+
# @return [Integer]
|
|
224
|
+
# @see Removed
|
|
225
|
+
def removed; self[:"removed"]&.value; end
|
|
226
|
+
# for per-port options
|
|
227
|
+
# @rbs return: ::Integer
|
|
228
|
+
# @return [Integer]
|
|
229
|
+
# @see PortIfindex
|
|
230
|
+
def port_ifindex; self[:"port_ifindex"]&.value; end
|
|
231
|
+
# for array options
|
|
232
|
+
# @rbs return: ::Integer
|
|
233
|
+
# @return [Integer]
|
|
234
|
+
# @see ArrayIndex
|
|
235
|
+
def array_index; self[:"array_index"]&.value; end
|
|
134
236
|
class << self
|
|
135
237
|
# Looks up Attribute class by name.
|
|
136
|
-
#--
|
|
137
238
|
# @rbs name: Symbol
|
|
138
239
|
# @rbs return: Attribute
|
|
240
|
+
# @param [Symbol] name
|
|
241
|
+
# @return [Attribute]
|
|
139
242
|
def by_name(name); BY_NAME.fetch(name); end
|
|
140
243
|
# Looks up Attribute class by type value.
|
|
141
|
-
#--
|
|
142
244
|
# @rbs type: Integer
|
|
143
245
|
# @rbs return: Attribute
|
|
246
|
+
# @param [Integer] type
|
|
247
|
+
# @return [Attribute]
|
|
144
248
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
145
249
|
end
|
|
146
250
|
end
|
|
147
|
-
class ItemPort < ::Nl::
|
|
251
|
+
class ItemPort < ::Nl::AttributeSet
|
|
148
252
|
# Abstract class
|
|
149
|
-
class Attribute < ::Nl::
|
|
253
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
150
254
|
end
|
|
151
255
|
class Port < Attribute
|
|
152
256
|
TYPE = 1
|
|
153
257
|
NAME = :"port"
|
|
258
|
+
# @private
|
|
259
|
+
ORDER = 0
|
|
154
260
|
end
|
|
155
|
-
#
|
|
261
|
+
# @private
|
|
156
262
|
BY_NAME = Ractor.make_shareable({:"port" => Port}) #: Hash[::Symbol, Attribute]
|
|
157
|
-
#
|
|
263
|
+
# @private
|
|
158
264
|
BY_TYPE = Ractor.make_shareable({1 => Port}) #: Hash[::Integer, Attribute]
|
|
265
|
+
# @rbs return: AttributeSets::AttrPort
|
|
266
|
+
# @return [AttributeSets::AttrPort]
|
|
267
|
+
# @see Port
|
|
268
|
+
def port; self[:"port"]&.value; end
|
|
159
269
|
class << self
|
|
160
270
|
# Looks up Attribute class by name.
|
|
161
|
-
#--
|
|
162
271
|
# @rbs name: Symbol
|
|
163
272
|
# @rbs return: Attribute
|
|
273
|
+
# @param [Symbol] name
|
|
274
|
+
# @return [Attribute]
|
|
164
275
|
def by_name(name); BY_NAME.fetch(name); end
|
|
165
276
|
# Looks up Attribute class by type value.
|
|
166
|
-
#--
|
|
167
277
|
# @rbs type: Integer
|
|
168
278
|
# @rbs return: Attribute
|
|
279
|
+
# @param [Integer] type
|
|
280
|
+
# @return [Attribute]
|
|
169
281
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
170
282
|
end
|
|
171
283
|
end
|
|
172
|
-
class AttrPort < ::Nl::
|
|
284
|
+
class AttrPort < ::Nl::AttributeSet
|
|
173
285
|
# Abstract class
|
|
174
|
-
class Attribute < ::Nl::
|
|
286
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
175
287
|
end
|
|
176
288
|
class Ifindex < Attribute
|
|
177
289
|
TYPE = 1
|
|
178
290
|
NAME = :"ifindex"
|
|
179
|
-
|
|
291
|
+
# @private
|
|
292
|
+
ORDER = 0
|
|
293
|
+
# @private
|
|
294
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
180
295
|
end
|
|
181
296
|
class Changed < Attribute
|
|
182
297
|
TYPE = 2
|
|
183
298
|
NAME = :"changed"
|
|
184
|
-
|
|
299
|
+
# @private
|
|
300
|
+
ORDER = 1
|
|
301
|
+
# @private
|
|
302
|
+
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
185
303
|
end
|
|
186
304
|
class Linkup < Attribute
|
|
187
305
|
TYPE = 3
|
|
188
306
|
NAME = :"linkup"
|
|
189
|
-
|
|
307
|
+
# @private
|
|
308
|
+
ORDER = 2
|
|
309
|
+
# @private
|
|
310
|
+
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
190
311
|
end
|
|
191
312
|
class Speed < Attribute
|
|
192
313
|
TYPE = 4
|
|
193
314
|
NAME = :"speed"
|
|
194
|
-
|
|
315
|
+
# @private
|
|
316
|
+
ORDER = 3
|
|
317
|
+
# @private
|
|
318
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
195
319
|
end
|
|
196
320
|
class Duplex < Attribute
|
|
197
321
|
TYPE = 5
|
|
198
322
|
NAME = :"duplex"
|
|
199
|
-
|
|
323
|
+
# @private
|
|
324
|
+
ORDER = 4
|
|
325
|
+
# @private
|
|
326
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
200
327
|
end
|
|
201
328
|
class Removed < Attribute
|
|
202
329
|
TYPE = 6
|
|
203
330
|
NAME = :"removed"
|
|
204
|
-
|
|
331
|
+
# @private
|
|
332
|
+
ORDER = 5
|
|
333
|
+
# @private
|
|
334
|
+
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
205
335
|
end
|
|
206
|
-
#
|
|
336
|
+
# @private
|
|
207
337
|
BY_NAME = Ractor.make_shareable({:"ifindex" => Ifindex, :"changed" => Changed, :"linkup" => Linkup, :"speed" => Speed, :"duplex" => Duplex, :"removed" => Removed}) #: Hash[::Symbol, Attribute]
|
|
208
|
-
#
|
|
338
|
+
# @private
|
|
209
339
|
BY_TYPE = Ractor.make_shareable({1 => Ifindex, 2 => Changed, 3 => Linkup, 4 => Speed, 5 => Duplex, 6 => Removed}) #: Hash[::Integer, Attribute]
|
|
340
|
+
# @rbs return: ::Integer
|
|
341
|
+
# @return [Integer]
|
|
342
|
+
# @see Ifindex
|
|
343
|
+
def ifindex; self[:"ifindex"]&.value; end
|
|
344
|
+
# @rbs return: ::Integer
|
|
345
|
+
# @return [Integer]
|
|
346
|
+
# @see Changed
|
|
347
|
+
def changed; self[:"changed"]&.value; end
|
|
348
|
+
# @rbs return: ::Integer
|
|
349
|
+
# @return [Integer]
|
|
350
|
+
# @see Linkup
|
|
351
|
+
def linkup; self[:"linkup"]&.value; end
|
|
352
|
+
# @rbs return: ::Integer
|
|
353
|
+
# @return [Integer]
|
|
354
|
+
# @see Speed
|
|
355
|
+
def speed; self[:"speed"]&.value; end
|
|
356
|
+
# @rbs return: ::Integer
|
|
357
|
+
# @return [Integer]
|
|
358
|
+
# @see Duplex
|
|
359
|
+
def duplex; self[:"duplex"]&.value; end
|
|
360
|
+
# @rbs return: ::Integer
|
|
361
|
+
# @return [Integer]
|
|
362
|
+
# @see Removed
|
|
363
|
+
def removed; self[:"removed"]&.value; end
|
|
210
364
|
class << self
|
|
211
365
|
# Looks up Attribute class by name.
|
|
212
|
-
#--
|
|
213
366
|
# @rbs name: Symbol
|
|
214
367
|
# @rbs return: Attribute
|
|
368
|
+
# @param [Symbol] name
|
|
369
|
+
# @return [Attribute]
|
|
215
370
|
def by_name(name); BY_NAME.fetch(name); end
|
|
216
371
|
# Looks up Attribute class by type value.
|
|
217
|
-
#--
|
|
218
372
|
# @rbs type: Integer
|
|
219
373
|
# @rbs return: Attribute
|
|
374
|
+
# @param [Integer] type
|
|
375
|
+
# @return [Attribute]
|
|
220
376
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
221
377
|
end
|
|
222
378
|
end
|
|
223
|
-
|
|
224
|
-
Team::
|
|
225
|
-
|
|
226
|
-
|
|
379
|
+
# @private
|
|
380
|
+
Team::ListOption::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::ItemOption, selector_bindings: Ractor.make_shareable([]))
|
|
381
|
+
# @private
|
|
382
|
+
Team::ListPort::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::ItemPort, selector_bindings: Ractor.make_shareable([]))
|
|
383
|
+
# @private
|
|
384
|
+
ItemOption::Option::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::AttrOption, selector_bindings: Ractor.make_shareable([]))
|
|
385
|
+
# @private
|
|
386
|
+
ItemPort::Port::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::AttrPort, selector_bindings: Ractor.make_shareable([]))
|
|
227
387
|
end
|
|
228
388
|
module Messages
|
|
229
389
|
# No operation
|
|
230
|
-
class DoNoopRequest < ::Nl::
|
|
390
|
+
class DoNoopRequest < ::Nl::Genl::Message
|
|
231
391
|
TYPE = 0
|
|
232
392
|
FIXED_HEADER = nil
|
|
233
393
|
ATTRIBUTE_SET = AttributeSets::Team
|
|
234
394
|
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
235
395
|
end
|
|
236
396
|
# No operation
|
|
237
|
-
class DoNoopReply < ::Nl::
|
|
397
|
+
class DoNoopReply < ::Nl::Genl::Message
|
|
238
398
|
TYPE = 0
|
|
239
399
|
FIXED_HEADER = nil
|
|
240
400
|
ATTRIBUTE_SET = AttributeSets::Team
|
|
241
401
|
ATTRIBUTES = Ractor.make_shareable(%i[team_ifindex])
|
|
242
|
-
# Gets the value of `team-ifindex` attribute in the message.
|
|
243
|
-
#--
|
|
244
402
|
# @rbs return: ::Integer
|
|
403
|
+
# @return [Integer]
|
|
404
|
+
# @see AttributeSets::Team::TeamIfindex
|
|
245
405
|
def team_ifindex; attributes[:"team_ifindex"]&.value; end
|
|
246
406
|
end
|
|
247
407
|
# Set team options
|
|
248
408
|
#
|
|
249
409
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
250
|
-
class DoOptionsSetRequest < ::Nl::
|
|
410
|
+
class DoOptionsSetRequest < ::Nl::Genl::Message
|
|
251
411
|
TYPE = 1
|
|
252
412
|
FIXED_HEADER = nil
|
|
253
413
|
ATTRIBUTE_SET = AttributeSets::Team
|
|
254
414
|
ATTRIBUTES = Ractor.make_shareable(%i[team_ifindex list_option])
|
|
255
|
-
# Gets the value of `team-ifindex` attribute in the message.
|
|
256
|
-
#--
|
|
257
415
|
# @rbs return: ::Integer
|
|
416
|
+
# @return [Integer]
|
|
417
|
+
# @see AttributeSets::Team::TeamIfindex
|
|
258
418
|
def team_ifindex; attributes[:"team_ifindex"]&.value; end
|
|
259
|
-
# Gets the value of `list-option` attribute in the message.
|
|
260
|
-
#--
|
|
261
419
|
# @rbs return: AttributeSets::ItemOption
|
|
420
|
+
# @return [AttributeSets::ItemOption]
|
|
421
|
+
# @see AttributeSets::Team::ListOption
|
|
262
422
|
def list_option; attributes[:"list_option"]&.value; end
|
|
263
423
|
end
|
|
264
424
|
# Set team options
|
|
265
425
|
#
|
|
266
426
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
267
|
-
class DoOptionsSetReply < ::Nl::
|
|
427
|
+
class DoOptionsSetReply < ::Nl::Genl::Message
|
|
268
428
|
TYPE = 1
|
|
269
429
|
FIXED_HEADER = nil
|
|
270
430
|
ATTRIBUTE_SET = AttributeSets::Team
|
|
271
431
|
ATTRIBUTES = Ractor.make_shareable(%i[team_ifindex list_option])
|
|
272
|
-
# Gets the value of `team-ifindex` attribute in the message.
|
|
273
|
-
#--
|
|
274
432
|
# @rbs return: ::Integer
|
|
433
|
+
# @return [Integer]
|
|
434
|
+
# @see AttributeSets::Team::TeamIfindex
|
|
275
435
|
def team_ifindex; attributes[:"team_ifindex"]&.value; end
|
|
276
|
-
# Gets the value of `list-option` attribute in the message.
|
|
277
|
-
#--
|
|
278
436
|
# @rbs return: AttributeSets::ItemOption
|
|
437
|
+
# @return [AttributeSets::ItemOption]
|
|
438
|
+
# @see AttributeSets::Team::ListOption
|
|
279
439
|
def list_option; attributes[:"list_option"]&.value; end
|
|
280
440
|
end
|
|
281
441
|
# Get team options info
|
|
282
442
|
#
|
|
283
443
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
284
|
-
class DoOptionsGetRequest < ::Nl::
|
|
444
|
+
class DoOptionsGetRequest < ::Nl::Genl::Message
|
|
285
445
|
TYPE = 2
|
|
286
446
|
FIXED_HEADER = nil
|
|
287
447
|
ATTRIBUTE_SET = AttributeSets::Team
|
|
288
448
|
ATTRIBUTES = Ractor.make_shareable(%i[team_ifindex])
|
|
289
|
-
# Gets the value of `team-ifindex` attribute in the message.
|
|
290
|
-
#--
|
|
291
449
|
# @rbs return: ::Integer
|
|
450
|
+
# @return [Integer]
|
|
451
|
+
# @see AttributeSets::Team::TeamIfindex
|
|
292
452
|
def team_ifindex; attributes[:"team_ifindex"]&.value; end
|
|
293
453
|
end
|
|
294
454
|
# Get team options info
|
|
295
455
|
#
|
|
296
456
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
297
|
-
class DoOptionsGetReply < ::Nl::
|
|
457
|
+
class DoOptionsGetReply < ::Nl::Genl::Message
|
|
298
458
|
TYPE = 2
|
|
299
459
|
FIXED_HEADER = nil
|
|
300
460
|
ATTRIBUTE_SET = AttributeSets::Team
|
|
301
461
|
ATTRIBUTES = Ractor.make_shareable(%i[team_ifindex list_option])
|
|
302
|
-
# Gets the value of `team-ifindex` attribute in the message.
|
|
303
|
-
#--
|
|
304
462
|
# @rbs return: ::Integer
|
|
463
|
+
# @return [Integer]
|
|
464
|
+
# @see AttributeSets::Team::TeamIfindex
|
|
305
465
|
def team_ifindex; attributes[:"team_ifindex"]&.value; end
|
|
306
|
-
# Gets the value of `list-option` attribute in the message.
|
|
307
|
-
#--
|
|
308
466
|
# @rbs return: AttributeSets::ItemOption
|
|
467
|
+
# @return [AttributeSets::ItemOption]
|
|
468
|
+
# @see AttributeSets::Team::ListOption
|
|
309
469
|
def list_option; attributes[:"list_option"]&.value; end
|
|
310
470
|
end
|
|
311
471
|
# Get team ports info
|
|
312
472
|
#
|
|
313
473
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
314
|
-
class DoPortListGetRequest < ::Nl::
|
|
474
|
+
class DoPortListGetRequest < ::Nl::Genl::Message
|
|
315
475
|
TYPE = 3
|
|
316
476
|
FIXED_HEADER = nil
|
|
317
477
|
ATTRIBUTE_SET = AttributeSets::Team
|
|
318
478
|
ATTRIBUTES = Ractor.make_shareable(%i[team_ifindex])
|
|
319
|
-
# Gets the value of `team-ifindex` attribute in the message.
|
|
320
|
-
#--
|
|
321
479
|
# @rbs return: ::Integer
|
|
480
|
+
# @return [Integer]
|
|
481
|
+
# @see AttributeSets::Team::TeamIfindex
|
|
322
482
|
def team_ifindex; attributes[:"team_ifindex"]&.value; end
|
|
323
483
|
end
|
|
324
484
|
# Get team ports info
|
|
325
485
|
#
|
|
326
486
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
327
|
-
class DoPortListGetReply < ::Nl::
|
|
487
|
+
class DoPortListGetReply < ::Nl::Genl::Message
|
|
328
488
|
TYPE = 3
|
|
329
489
|
FIXED_HEADER = nil
|
|
330
490
|
ATTRIBUTE_SET = AttributeSets::Team
|
|
331
491
|
ATTRIBUTES = Ractor.make_shareable(%i[team_ifindex list_port])
|
|
332
|
-
# Gets the value of `team-ifindex` attribute in the message.
|
|
333
|
-
#--
|
|
334
492
|
# @rbs return: ::Integer
|
|
493
|
+
# @return [Integer]
|
|
494
|
+
# @see AttributeSets::Team::TeamIfindex
|
|
335
495
|
def team_ifindex; attributes[:"team_ifindex"]&.value; end
|
|
336
|
-
# Gets the value of `list-port` attribute in the message.
|
|
337
|
-
#--
|
|
338
496
|
# @rbs return: AttributeSets::ItemPort
|
|
497
|
+
# @return [AttributeSets::ItemPort]
|
|
498
|
+
# @see AttributeSets::Team::ListPort
|
|
339
499
|
def list_port; attributes[:"list_port"]&.value; end
|
|
340
500
|
end
|
|
341
501
|
end
|
|
342
502
|
module Notifications
|
|
343
503
|
end
|
|
504
|
+
# @private
|
|
344
505
|
NOTIFICATIONS = Ractor.make_shareable({}) #: Hash[::Integer, ::Class]
|
|
345
506
|
# No operation
|
|
346
|
-
#--
|
|
347
507
|
# @rbs () -> Messages::DoNoopReply
|
|
508
|
+
# @param [Hash] args
|
|
509
|
+
# @return [Messages::DoNoopReply]
|
|
510
|
+
# @see Messages::DoNoopRequest
|
|
348
511
|
def do_noop(**args)
|
|
349
512
|
exchange_message(:"do", Messages::DoNoopRequest, Messages::DoNoopReply, args)
|
|
350
513
|
end
|
|
351
514
|
# Set team options
|
|
352
515
|
#
|
|
353
516
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
354
|
-
|
|
355
|
-
# @
|
|
517
|
+
# @rbs (?team_ifindex: ::Integer, ?list_option: (AttributeSets::ItemOption | ::Hash[::Symbol, untyped])) -> Messages::DoOptionsSetReply
|
|
518
|
+
# @param [Hash] args
|
|
519
|
+
# @option args [Integer] team_ifindex
|
|
520
|
+
# @option args [AttributeSets::ItemOption, Hash<Symbol, Object>] list_option
|
|
521
|
+
# @return [Messages::DoOptionsSetReply]
|
|
522
|
+
# @see Messages::DoOptionsSetRequest
|
|
356
523
|
def do_options_set(**args)
|
|
357
524
|
exchange_message(:"do", Messages::DoOptionsSetRequest, Messages::DoOptionsSetReply, args)
|
|
358
525
|
end
|
|
359
526
|
# Get team options info
|
|
360
527
|
#
|
|
361
528
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
362
|
-
#--
|
|
363
529
|
# @rbs (?team_ifindex: ::Integer) -> Messages::DoOptionsGetReply
|
|
530
|
+
# @param [Hash] args
|
|
531
|
+
# @option args [Integer] team_ifindex
|
|
532
|
+
# @return [Messages::DoOptionsGetReply]
|
|
533
|
+
# @see Messages::DoOptionsGetRequest
|
|
364
534
|
def do_options_get(**args)
|
|
365
535
|
exchange_message(:"do", Messages::DoOptionsGetRequest, Messages::DoOptionsGetReply, args)
|
|
366
536
|
end
|
|
367
537
|
# Get team ports info
|
|
368
538
|
#
|
|
369
539
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
370
|
-
#--
|
|
371
540
|
# @rbs (?team_ifindex: ::Integer) -> Messages::DoPortListGetReply
|
|
541
|
+
# @param [Hash] args
|
|
542
|
+
# @option args [Integer] team_ifindex
|
|
543
|
+
# @return [Messages::DoPortListGetReply]
|
|
544
|
+
# @see Messages::DoPortListGetRequest
|
|
372
545
|
def do_port_list_get(**args)
|
|
373
546
|
exchange_message(:"do", Messages::DoPortListGetRequest, Messages::DoPortListGetReply, args)
|
|
374
547
|
end
|
|
375
548
|
class AsyncOperations
|
|
376
|
-
#
|
|
549
|
+
# @private
|
|
377
550
|
def initialize(&exchange)
|
|
378
551
|
@exchange = exchange
|
|
379
552
|
end
|
|
380
553
|
# No operation
|
|
381
|
-
#--
|
|
382
554
|
# @rbs () -> ::Nl::Async::Future[Messages::DoNoopReply]
|
|
555
|
+
# @param [Hash] args
|
|
556
|
+
# @return [Nl::Async::Future<Messages::DoNoopReply>]
|
|
557
|
+
# @see Messages::DoNoopRequest
|
|
383
558
|
def do_noop(**args)
|
|
384
559
|
@exchange.call(:"do", Messages::DoNoopRequest, Messages::DoNoopReply, args)
|
|
385
560
|
end
|
|
386
561
|
# Set team options
|
|
387
562
|
#
|
|
388
563
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
389
|
-
|
|
390
|
-
# @
|
|
564
|
+
# @rbs (?team_ifindex: ::Integer, ?list_option: (AttributeSets::ItemOption | ::Hash[::Symbol, untyped])) -> ::Nl::Async::Future[Messages::DoOptionsSetReply]
|
|
565
|
+
# @param [Hash] args
|
|
566
|
+
# @option args [Integer] team_ifindex
|
|
567
|
+
# @option args [AttributeSets::ItemOption, Hash<Symbol, Object>] list_option
|
|
568
|
+
# @return [Nl::Async::Future<Messages::DoOptionsSetReply>]
|
|
569
|
+
# @see Messages::DoOptionsSetRequest
|
|
391
570
|
def do_options_set(**args)
|
|
392
571
|
@exchange.call(:"do", Messages::DoOptionsSetRequest, Messages::DoOptionsSetReply, args)
|
|
393
572
|
end
|
|
394
573
|
# Get team options info
|
|
395
574
|
#
|
|
396
575
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
397
|
-
#--
|
|
398
576
|
# @rbs (?team_ifindex: ::Integer) -> ::Nl::Async::Future[Messages::DoOptionsGetReply]
|
|
577
|
+
# @param [Hash] args
|
|
578
|
+
# @option args [Integer] team_ifindex
|
|
579
|
+
# @return [Nl::Async::Future<Messages::DoOptionsGetReply>]
|
|
580
|
+
# @see Messages::DoOptionsGetRequest
|
|
399
581
|
def do_options_get(**args)
|
|
400
582
|
@exchange.call(:"do", Messages::DoOptionsGetRequest, Messages::DoOptionsGetReply, args)
|
|
401
583
|
end
|
|
402
584
|
# Get team ports info
|
|
403
585
|
#
|
|
404
586
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
405
|
-
#--
|
|
406
587
|
# @rbs (?team_ifindex: ::Integer) -> ::Nl::Async::Future[Messages::DoPortListGetReply]
|
|
588
|
+
# @param [Hash] args
|
|
589
|
+
# @option args [Integer] team_ifindex
|
|
590
|
+
# @return [Nl::Async::Future<Messages::DoPortListGetReply>]
|
|
591
|
+
# @see Messages::DoPortListGetRequest
|
|
407
592
|
def do_port_list_get(**args)
|
|
408
593
|
@exchange.call(:"do", Messages::DoPortListGetRequest, Messages::DoPortListGetReply, args)
|
|
409
594
|
end
|
|
410
595
|
end
|
|
411
596
|
# Returns the asynchronous operation facade for this family.
|
|
412
|
-
#--
|
|
413
597
|
# @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
|
|
598
|
+
# @param [::Integer, nil] stream_capacity
|
|
599
|
+
# @return [AsyncOperations]
|
|
414
600
|
def async(stream_capacity: nil)
|
|
415
601
|
return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
|
|
416
602
|
build_async_facade(AsyncOperations, stream_capacity:)
|