nl-linux 0.4.1 → 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 +7 -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/mptcp_pm.yaml from Linux v7.
|
|
3
|
+
# This file is based on Documentation/netlink/specs/mptcp_pm.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.
|
|
@@ -27,7 +27,7 @@ class MptcpPm < ::Nl::Genl::Family
|
|
|
27
27
|
super
|
|
28
28
|
end
|
|
29
29
|
# @private
|
|
30
|
-
MCAST_GROUPS =
|
|
30
|
+
MCAST_GROUPS = {}.freeze #: Hash[::Symbol, ::Nl::McastGroup]
|
|
31
31
|
module Enums
|
|
32
32
|
# Netlink MPTCP event types
|
|
33
33
|
module EventType
|
|
@@ -59,868 +59,770 @@ class MptcpPm < ::Nl::Genl::Family
|
|
|
59
59
|
end
|
|
60
60
|
module AttributeSets
|
|
61
61
|
class Address < ::Nl::AttributeSet
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
module Definitions
|
|
63
|
+
# @rbs return: ::Integer
|
|
64
|
+
# @return [Integer]
|
|
65
|
+
def family; self[:"family"]; end
|
|
66
|
+
# @rbs return: ::Integer
|
|
67
|
+
# @return [Integer]
|
|
68
|
+
def id; self[:"id"]; end
|
|
69
|
+
# @rbs return: ::Integer
|
|
70
|
+
# @return [Integer]
|
|
71
|
+
def addr4; self[:"addr4"]; end
|
|
72
|
+
# @rbs return: ::String
|
|
73
|
+
# @return [String]
|
|
74
|
+
def addr6; self[:"addr6"]; end
|
|
75
|
+
# @rbs return: ::Integer
|
|
76
|
+
# @return [Integer]
|
|
77
|
+
def port; self[:"port"]; end
|
|
78
|
+
# @rbs return: ::Integer
|
|
79
|
+
# @return [Integer]
|
|
80
|
+
def flags; self[:"flags"]; end
|
|
81
|
+
# @rbs return: ::Integer
|
|
82
|
+
# @return [Integer]
|
|
83
|
+
def if_idx; self[:"if_idx"]; end
|
|
64
84
|
end
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
# @private
|
|
71
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
|
|
72
|
-
end
|
|
73
|
-
class Id < Attribute
|
|
74
|
-
TYPE = 2
|
|
75
|
-
NAME = :"id"
|
|
76
|
-
# @private
|
|
77
|
-
ORDER = 1
|
|
78
|
-
# @private
|
|
79
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
80
|
-
end
|
|
81
|
-
class Addr4 < Attribute
|
|
82
|
-
TYPE = 3
|
|
83
|
-
NAME = :"addr4"
|
|
84
|
-
# @private
|
|
85
|
-
ORDER = 2
|
|
86
|
-
# @private
|
|
87
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)
|
|
88
|
-
end
|
|
89
|
-
class Addr6 < Attribute
|
|
90
|
-
TYPE = 4
|
|
91
|
-
NAME = :"addr6"
|
|
92
|
-
# @private
|
|
93
|
-
ORDER = 3
|
|
94
|
-
# @private
|
|
95
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: -> { raise ArgumentError, "Value #{it.inspect} is not equal to length 16" unless it.bytesize == 16 })
|
|
96
|
-
end
|
|
97
|
-
class Port < Attribute
|
|
98
|
-
TYPE = 5
|
|
99
|
-
NAME = :"port"
|
|
100
|
-
# @private
|
|
101
|
-
ORDER = 4
|
|
102
|
-
# @private
|
|
103
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
|
|
104
|
-
end
|
|
105
|
-
class Flags < Attribute
|
|
106
|
-
TYPE = 6
|
|
107
|
-
NAME = :"flags"
|
|
108
|
-
# @private
|
|
109
|
-
ORDER = 5
|
|
110
|
-
# @private
|
|
111
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
112
|
-
end
|
|
113
|
-
class IfIdx < Attribute
|
|
114
|
-
TYPE = 7
|
|
115
|
-
NAME = :"if_idx"
|
|
116
|
-
# @private
|
|
117
|
-
ORDER = 6
|
|
118
|
-
# @private
|
|
119
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::S32, check: nil)
|
|
120
|
-
end
|
|
121
|
-
# @private
|
|
122
|
-
BY_NAME = Ractor.make_shareable({:"family" => Family, :"id" => Id, :"addr4" => Addr4, :"addr6" => Addr6, :"port" => Port, :"flags" => Flags, :"if_idx" => IfIdx}) #: Hash[::Symbol, Attribute]
|
|
123
|
-
# @private
|
|
124
|
-
BY_TYPE = Ractor.make_shareable({1 => Family, 2 => Id, 3 => Addr4, 4 => Addr6, 5 => Port, 6 => Flags, 7 => IfIdx}) #: Hash[::Integer, Attribute]
|
|
125
|
-
# @rbs return: ::Integer
|
|
126
|
-
# @return [Integer]
|
|
127
|
-
# @see Family
|
|
128
|
-
def family; self[:"family"]&.value; end
|
|
129
|
-
# @rbs return: ::Integer
|
|
130
|
-
# @return [Integer]
|
|
131
|
-
# @see Id
|
|
132
|
-
def id; self[:"id"]&.value; end
|
|
133
|
-
# @rbs return: ::Integer
|
|
134
|
-
# @return [Integer]
|
|
135
|
-
# @see Addr4
|
|
136
|
-
def addr4; self[:"addr4"]&.value; end
|
|
137
|
-
# @rbs return: ::String
|
|
138
|
-
# @return [String]
|
|
139
|
-
# @see Addr6
|
|
140
|
-
def addr6; self[:"addr6"]&.value; end
|
|
141
|
-
# @rbs return: ::Integer
|
|
142
|
-
# @return [Integer]
|
|
143
|
-
# @see Port
|
|
144
|
-
def port; self[:"port"]&.value; end
|
|
145
|
-
# @rbs return: ::Integer
|
|
146
|
-
# @return [Integer]
|
|
147
|
-
# @see Flags
|
|
148
|
-
def flags; self[:"flags"]&.value; end
|
|
149
|
-
# @rbs return: ::Integer
|
|
150
|
-
# @return [Integer]
|
|
151
|
-
# @see IfIdx
|
|
152
|
-
def if_idx; self[:"if_idx"]&.value; end
|
|
153
|
-
class << self
|
|
154
|
-
# Looks up Attribute class by name.
|
|
155
|
-
# @rbs name: Symbol
|
|
156
|
-
# @rbs return: Attribute
|
|
157
|
-
# @param [Symbol] name
|
|
158
|
-
# @return [Attribute]
|
|
159
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
160
|
-
# Looks up Attribute class by type value.
|
|
161
|
-
# @rbs type: Integer
|
|
162
|
-
# @rbs return: Attribute
|
|
163
|
-
# @param [Integer] type
|
|
164
|
-
# @return [Attribute]
|
|
165
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
85
|
+
include Definitions
|
|
86
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
87
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
88
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
89
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
166
90
|
end
|
|
167
91
|
end
|
|
168
92
|
class SubflowAttribute < ::Nl::AttributeSet
|
|
169
|
-
|
|
170
|
-
|
|
93
|
+
module Definitions
|
|
94
|
+
# @rbs return: ::Integer
|
|
95
|
+
# @return [Integer]
|
|
96
|
+
def token_rem; self[:"token_rem"]; end
|
|
97
|
+
# @rbs return: ::Integer
|
|
98
|
+
# @return [Integer]
|
|
99
|
+
def token_loc; self[:"token_loc"]; end
|
|
100
|
+
# @rbs return: ::Integer
|
|
101
|
+
# @return [Integer]
|
|
102
|
+
def relwrite_seq; self[:"relwrite_seq"]; end
|
|
103
|
+
# @rbs return: ::Integer
|
|
104
|
+
# @return [Integer]
|
|
105
|
+
def map_seq; self[:"map_seq"]; end
|
|
106
|
+
# @rbs return: ::Integer
|
|
107
|
+
# @return [Integer]
|
|
108
|
+
def map_sfseq; self[:"map_sfseq"]; end
|
|
109
|
+
# @rbs return: ::Integer
|
|
110
|
+
# @return [Integer]
|
|
111
|
+
def ssn_offset; self[:"ssn_offset"]; end
|
|
112
|
+
# @rbs return: ::Integer
|
|
113
|
+
# @return [Integer]
|
|
114
|
+
def map_datalen; self[:"map_datalen"]; end
|
|
115
|
+
# @rbs return: ::Integer
|
|
116
|
+
# @return [Integer]
|
|
117
|
+
def flags; self[:"flags"]; end
|
|
118
|
+
# @rbs return: ::Integer
|
|
119
|
+
# @return [Integer]
|
|
120
|
+
def id_rem; self[:"id_rem"]; end
|
|
121
|
+
# @rbs return: ::Integer
|
|
122
|
+
# @return [Integer]
|
|
123
|
+
def id_loc; self[:"id_loc"]; end
|
|
171
124
|
end
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
# @private
|
|
178
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
179
|
-
end
|
|
180
|
-
class TokenLoc < Attribute
|
|
181
|
-
TYPE = 2
|
|
182
|
-
NAME = :"token_loc"
|
|
183
|
-
# @private
|
|
184
|
-
ORDER = 1
|
|
185
|
-
# @private
|
|
186
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
187
|
-
end
|
|
188
|
-
class RelwriteSeq < Attribute
|
|
189
|
-
TYPE = 3
|
|
190
|
-
NAME = :"relwrite_seq"
|
|
191
|
-
# @private
|
|
192
|
-
ORDER = 2
|
|
193
|
-
# @private
|
|
194
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
195
|
-
end
|
|
196
|
-
class MapSeq < Attribute
|
|
197
|
-
TYPE = 4
|
|
198
|
-
NAME = :"map_seq"
|
|
199
|
-
# @private
|
|
200
|
-
ORDER = 3
|
|
201
|
-
# @private
|
|
202
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
203
|
-
end
|
|
204
|
-
class MapSfseq < Attribute
|
|
205
|
-
TYPE = 5
|
|
206
|
-
NAME = :"map_sfseq"
|
|
207
|
-
# @private
|
|
208
|
-
ORDER = 4
|
|
209
|
-
# @private
|
|
210
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
211
|
-
end
|
|
212
|
-
class SsnOffset < Attribute
|
|
213
|
-
TYPE = 6
|
|
214
|
-
NAME = :"ssn_offset"
|
|
215
|
-
# @private
|
|
216
|
-
ORDER = 5
|
|
217
|
-
# @private
|
|
218
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
219
|
-
end
|
|
220
|
-
class MapDatalen < Attribute
|
|
221
|
-
TYPE = 7
|
|
222
|
-
NAME = :"map_datalen"
|
|
223
|
-
# @private
|
|
224
|
-
ORDER = 6
|
|
225
|
-
# @private
|
|
226
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
|
|
227
|
-
end
|
|
228
|
-
class Flags < Attribute
|
|
229
|
-
TYPE = 8
|
|
230
|
-
NAME = :"flags"
|
|
231
|
-
# @private
|
|
232
|
-
ORDER = 7
|
|
233
|
-
# @private
|
|
234
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
235
|
-
end
|
|
236
|
-
class IdRem < Attribute
|
|
237
|
-
TYPE = 9
|
|
238
|
-
NAME = :"id_rem"
|
|
239
|
-
# @private
|
|
240
|
-
ORDER = 8
|
|
241
|
-
# @private
|
|
242
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
243
|
-
end
|
|
244
|
-
class IdLoc < Attribute
|
|
245
|
-
TYPE = 10
|
|
246
|
-
NAME = :"id_loc"
|
|
247
|
-
# @private
|
|
248
|
-
ORDER = 9
|
|
249
|
-
# @private
|
|
250
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
251
|
-
end
|
|
252
|
-
class Pad < Attribute
|
|
253
|
-
TYPE = 11
|
|
254
|
-
NAME = :"pad"
|
|
255
|
-
# @private
|
|
256
|
-
ORDER = 10
|
|
257
|
-
# @private
|
|
258
|
-
DATATYPE = ::Nl::DataTypes::Pad.new()
|
|
259
|
-
end
|
|
260
|
-
# @private
|
|
261
|
-
BY_NAME = Ractor.make_shareable({:"token_rem" => TokenRem, :"token_loc" => TokenLoc, :"relwrite_seq" => RelwriteSeq, :"map_seq" => MapSeq, :"map_sfseq" => MapSfseq, :"ssn_offset" => SsnOffset, :"map_datalen" => MapDatalen, :"flags" => Flags, :"id_rem" => IdRem, :"id_loc" => IdLoc, :"pad" => Pad}) #: Hash[::Symbol, Attribute]
|
|
262
|
-
# @private
|
|
263
|
-
BY_TYPE = Ractor.make_shareable({1 => TokenRem, 2 => TokenLoc, 3 => RelwriteSeq, 4 => MapSeq, 5 => MapSfseq, 6 => SsnOffset, 7 => MapDatalen, 8 => Flags, 9 => IdRem, 10 => IdLoc, 11 => Pad}) #: Hash[::Integer, Attribute]
|
|
264
|
-
# @rbs return: ::Integer
|
|
265
|
-
# @return [Integer]
|
|
266
|
-
# @see TokenRem
|
|
267
|
-
def token_rem; self[:"token_rem"]&.value; end
|
|
268
|
-
# @rbs return: ::Integer
|
|
269
|
-
# @return [Integer]
|
|
270
|
-
# @see TokenLoc
|
|
271
|
-
def token_loc; self[:"token_loc"]&.value; end
|
|
272
|
-
# @rbs return: ::Integer
|
|
273
|
-
# @return [Integer]
|
|
274
|
-
# @see RelwriteSeq
|
|
275
|
-
def relwrite_seq; self[:"relwrite_seq"]&.value; end
|
|
276
|
-
# @rbs return: ::Integer
|
|
277
|
-
# @return [Integer]
|
|
278
|
-
# @see MapSeq
|
|
279
|
-
def map_seq; self[:"map_seq"]&.value; end
|
|
280
|
-
# @rbs return: ::Integer
|
|
281
|
-
# @return [Integer]
|
|
282
|
-
# @see MapSfseq
|
|
283
|
-
def map_sfseq; self[:"map_sfseq"]&.value; end
|
|
284
|
-
# @rbs return: ::Integer
|
|
285
|
-
# @return [Integer]
|
|
286
|
-
# @see SsnOffset
|
|
287
|
-
def ssn_offset; self[:"ssn_offset"]&.value; end
|
|
288
|
-
# @rbs return: ::Integer
|
|
289
|
-
# @return [Integer]
|
|
290
|
-
# @see MapDatalen
|
|
291
|
-
def map_datalen; self[:"map_datalen"]&.value; end
|
|
292
|
-
# @rbs return: ::Integer
|
|
293
|
-
# @return [Integer]
|
|
294
|
-
# @see Flags
|
|
295
|
-
def flags; self[:"flags"]&.value; end
|
|
296
|
-
# @rbs return: ::Integer
|
|
297
|
-
# @return [Integer]
|
|
298
|
-
# @see IdRem
|
|
299
|
-
def id_rem; self[:"id_rem"]&.value; end
|
|
300
|
-
# @rbs return: ::Integer
|
|
301
|
-
# @return [Integer]
|
|
302
|
-
# @see IdLoc
|
|
303
|
-
def id_loc; self[:"id_loc"]&.value; end
|
|
304
|
-
class << self
|
|
305
|
-
# Looks up Attribute class by name.
|
|
306
|
-
# @rbs name: Symbol
|
|
307
|
-
# @rbs return: Attribute
|
|
308
|
-
# @param [Symbol] name
|
|
309
|
-
# @return [Attribute]
|
|
310
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
311
|
-
# Looks up Attribute class by type value.
|
|
312
|
-
# @rbs type: Integer
|
|
313
|
-
# @rbs return: Attribute
|
|
314
|
-
# @param [Integer] type
|
|
315
|
-
# @return [Attribute]
|
|
316
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
125
|
+
include Definitions
|
|
126
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
127
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
128
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
129
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
317
130
|
end
|
|
318
131
|
end
|
|
319
132
|
class Endpoint < ::Nl::AttributeSet
|
|
320
|
-
|
|
321
|
-
|
|
133
|
+
module Definitions
|
|
134
|
+
# @rbs return: AttributeSets::Address
|
|
135
|
+
# @return [AttributeSets::Address]
|
|
136
|
+
def addr; self[:"addr"]; end
|
|
322
137
|
end
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
end
|
|
329
|
-
# @private
|
|
330
|
-
BY_NAME = Ractor.make_shareable({:"addr" => Addr}) #: Hash[::Symbol, Attribute]
|
|
331
|
-
# @private
|
|
332
|
-
BY_TYPE = Ractor.make_shareable({1 => Addr}) #: Hash[::Integer, Attribute]
|
|
333
|
-
# @rbs return: AttributeSets::Address
|
|
334
|
-
# @return [AttributeSets::Address]
|
|
335
|
-
# @see Addr
|
|
336
|
-
def addr; self[:"addr"]&.value; end
|
|
337
|
-
class << self
|
|
338
|
-
# Looks up Attribute class by name.
|
|
339
|
-
# @rbs name: Symbol
|
|
340
|
-
# @rbs return: Attribute
|
|
341
|
-
# @param [Symbol] name
|
|
342
|
-
# @return [Attribute]
|
|
343
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
344
|
-
# Looks up Attribute class by type value.
|
|
345
|
-
# @rbs type: Integer
|
|
346
|
-
# @rbs return: Attribute
|
|
347
|
-
# @param [Integer] type
|
|
348
|
-
# @return [Attribute]
|
|
349
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
138
|
+
include Definitions
|
|
139
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
140
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
141
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
142
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
350
143
|
end
|
|
351
144
|
end
|
|
352
145
|
class Attr < ::Nl::AttributeSet
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
# @
|
|
368
|
-
|
|
146
|
+
module Definitions
|
|
147
|
+
# @rbs return: AttributeSets::Address
|
|
148
|
+
# @return [AttributeSets::Address]
|
|
149
|
+
def addr; self[:"addr"]; end
|
|
150
|
+
# @rbs return: ::Integer
|
|
151
|
+
# @return [Integer]
|
|
152
|
+
def rcv_add_addrs; self[:"rcv_add_addrs"]; end
|
|
153
|
+
# @rbs return: ::Integer
|
|
154
|
+
# @return [Integer]
|
|
155
|
+
def subflows; self[:"subflows"]; end
|
|
156
|
+
# @rbs return: ::Integer
|
|
157
|
+
# @return [Integer]
|
|
158
|
+
def token; self[:"token"]; end
|
|
159
|
+
# @rbs return: ::Integer
|
|
160
|
+
# @return [Integer]
|
|
161
|
+
def loc_id; self[:"loc_id"]; end
|
|
162
|
+
# @rbs return: AttributeSets::Address
|
|
163
|
+
# @return [AttributeSets::Address]
|
|
164
|
+
def addr_remote; self[:"addr_remote"]; end
|
|
369
165
|
end
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
# @private
|
|
376
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
377
|
-
end
|
|
378
|
-
class Token < Attribute
|
|
379
|
-
TYPE = 4
|
|
380
|
-
NAME = :"token"
|
|
381
|
-
# @private
|
|
382
|
-
ORDER = 3
|
|
383
|
-
# @private
|
|
384
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
385
|
-
end
|
|
386
|
-
class LocId < Attribute
|
|
387
|
-
TYPE = 5
|
|
388
|
-
NAME = :"loc_id"
|
|
389
|
-
# @private
|
|
390
|
-
ORDER = 4
|
|
391
|
-
# @private
|
|
392
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
393
|
-
end
|
|
394
|
-
class AddrRemote < Attribute
|
|
395
|
-
TYPE = 6
|
|
396
|
-
NAME = :"addr_remote"
|
|
397
|
-
# @private
|
|
398
|
-
ORDER = 5
|
|
399
|
-
end
|
|
400
|
-
# @private
|
|
401
|
-
BY_NAME = Ractor.make_shareable({:"addr" => Addr, :"rcv_add_addrs" => RcvAddAddrs, :"subflows" => Subflows, :"token" => Token, :"loc_id" => LocId, :"addr_remote" => AddrRemote}) #: Hash[::Symbol, Attribute]
|
|
402
|
-
# @private
|
|
403
|
-
BY_TYPE = Ractor.make_shareable({1 => Addr, 2 => RcvAddAddrs, 3 => Subflows, 4 => Token, 5 => LocId, 6 => AddrRemote}) #: Hash[::Integer, Attribute]
|
|
404
|
-
# @rbs return: AttributeSets::Address
|
|
405
|
-
# @return [AttributeSets::Address]
|
|
406
|
-
# @see Addr
|
|
407
|
-
def addr; self[:"addr"]&.value; end
|
|
408
|
-
# @rbs return: ::Integer
|
|
409
|
-
# @return [Integer]
|
|
410
|
-
# @see RcvAddAddrs
|
|
411
|
-
def rcv_add_addrs; self[:"rcv_add_addrs"]&.value; end
|
|
412
|
-
# @rbs return: ::Integer
|
|
413
|
-
# @return [Integer]
|
|
414
|
-
# @see Subflows
|
|
415
|
-
def subflows; self[:"subflows"]&.value; end
|
|
416
|
-
# @rbs return: ::Integer
|
|
417
|
-
# @return [Integer]
|
|
418
|
-
# @see Token
|
|
419
|
-
def token; self[:"token"]&.value; end
|
|
420
|
-
# @rbs return: ::Integer
|
|
421
|
-
# @return [Integer]
|
|
422
|
-
# @see LocId
|
|
423
|
-
def loc_id; self[:"loc_id"]&.value; end
|
|
424
|
-
# @rbs return: AttributeSets::Address
|
|
425
|
-
# @return [AttributeSets::Address]
|
|
426
|
-
# @see AddrRemote
|
|
427
|
-
def addr_remote; self[:"addr_remote"]&.value; end
|
|
428
|
-
class << self
|
|
429
|
-
# Looks up Attribute class by name.
|
|
430
|
-
# @rbs name: Symbol
|
|
431
|
-
# @rbs return: Attribute
|
|
432
|
-
# @param [Symbol] name
|
|
433
|
-
# @return [Attribute]
|
|
434
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
435
|
-
# Looks up Attribute class by type value.
|
|
436
|
-
# @rbs type: Integer
|
|
437
|
-
# @rbs return: Attribute
|
|
438
|
-
# @param [Integer] type
|
|
439
|
-
# @return [Attribute]
|
|
440
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
166
|
+
include Definitions
|
|
167
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
168
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
169
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
170
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
441
171
|
end
|
|
442
172
|
end
|
|
443
173
|
class EventAttr < ::Nl::AttributeSet
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
# @
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
# @
|
|
459
|
-
|
|
460
|
-
# @
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
# @
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
# @
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
# @
|
|
483
|
-
|
|
484
|
-
# @
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
# @
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
# @
|
|
499
|
-
|
|
500
|
-
# @private
|
|
501
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)
|
|
502
|
-
end
|
|
503
|
-
class Daddr6 < Attribute
|
|
504
|
-
TYPE = 8
|
|
505
|
-
NAME = :"daddr6"
|
|
506
|
-
# @private
|
|
507
|
-
ORDER = 7
|
|
508
|
-
# @private
|
|
509
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: -> { raise ArgumentError, "Value #{it.inspect} is shorter than minimum length 16" unless it.bytesize >= 16 })
|
|
510
|
-
end
|
|
511
|
-
class Sport < Attribute
|
|
512
|
-
TYPE = 9
|
|
513
|
-
NAME = :"sport"
|
|
514
|
-
# @private
|
|
515
|
-
ORDER = 8
|
|
516
|
-
# @private
|
|
517
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
|
|
174
|
+
module Definitions
|
|
175
|
+
# @rbs return: ::Integer
|
|
176
|
+
# @return [Integer]
|
|
177
|
+
def token; self[:"token"]; end
|
|
178
|
+
# @rbs return: ::Integer
|
|
179
|
+
# @return [Integer]
|
|
180
|
+
def family; self[:"family"]; end
|
|
181
|
+
# @rbs return: ::Integer
|
|
182
|
+
# @return [Integer]
|
|
183
|
+
def loc_id; self[:"loc_id"]; end
|
|
184
|
+
# @rbs return: ::Integer
|
|
185
|
+
# @return [Integer]
|
|
186
|
+
def rem_id; self[:"rem_id"]; end
|
|
187
|
+
# @rbs return: ::Integer
|
|
188
|
+
# @return [Integer]
|
|
189
|
+
def saddr4; self[:"saddr4"]; end
|
|
190
|
+
# @rbs return: ::String
|
|
191
|
+
# @return [String]
|
|
192
|
+
def saddr6; self[:"saddr6"]; end
|
|
193
|
+
# @rbs return: ::Integer
|
|
194
|
+
# @return [Integer]
|
|
195
|
+
def daddr4; self[:"daddr4"]; end
|
|
196
|
+
# @rbs return: ::String
|
|
197
|
+
# @return [String]
|
|
198
|
+
def daddr6; self[:"daddr6"]; end
|
|
199
|
+
# @rbs return: ::Integer
|
|
200
|
+
# @return [Integer]
|
|
201
|
+
def sport; self[:"sport"]; end
|
|
202
|
+
# @rbs return: ::Integer
|
|
203
|
+
# @return [Integer]
|
|
204
|
+
def dport; self[:"dport"]; end
|
|
205
|
+
# @rbs return: ::Integer
|
|
206
|
+
# @return [Integer]
|
|
207
|
+
def backup; self[:"backup"]; end
|
|
208
|
+
# @rbs return: ::Integer
|
|
209
|
+
# @return [Integer]
|
|
210
|
+
def error; self[:"error"]; end
|
|
211
|
+
# @rbs return: ::Integer
|
|
212
|
+
# @return [Integer]
|
|
213
|
+
def flags; self[:"flags"]; end
|
|
214
|
+
# @rbs return: ::Integer
|
|
215
|
+
# @return [Integer]
|
|
216
|
+
def timeout; self[:"timeout"]; end
|
|
217
|
+
# @rbs return: ::Integer
|
|
218
|
+
# @return [Integer]
|
|
219
|
+
def if_idx; self[:"if_idx"]; end
|
|
220
|
+
# @rbs return: ::Integer
|
|
221
|
+
# @return [Integer]
|
|
222
|
+
def reset_reason; self[:"reset_reason"]; end
|
|
223
|
+
# @rbs return: ::Integer
|
|
224
|
+
# @return [Integer]
|
|
225
|
+
def reset_flags; self[:"reset_flags"]; end
|
|
226
|
+
# Deprecated: use 'flags'
|
|
227
|
+
# @rbs return: ::Integer
|
|
228
|
+
# @return [Integer]
|
|
229
|
+
def server_side; self[:"server_side"]; end
|
|
518
230
|
end
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
# @private
|
|
525
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
|
|
231
|
+
include Definitions
|
|
232
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
233
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
234
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
235
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
526
236
|
end
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
# @private
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
NAME = :"flags"
|
|
546
|
-
# @private
|
|
547
|
-
ORDER = 12
|
|
548
|
-
# @private
|
|
549
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
|
|
550
|
-
end
|
|
551
|
-
class Timeout < Attribute
|
|
552
|
-
TYPE = 14
|
|
553
|
-
NAME = :"timeout"
|
|
554
|
-
# @private
|
|
555
|
-
ORDER = 13
|
|
556
|
-
# @private
|
|
557
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
558
|
-
end
|
|
559
|
-
class IfIdx < Attribute
|
|
560
|
-
TYPE = 15
|
|
561
|
-
NAME = :"if_idx"
|
|
562
|
-
# @private
|
|
563
|
-
ORDER = 14
|
|
564
|
-
# @private
|
|
565
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::S32, check: nil)
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
module AttributeSets
|
|
240
|
+
class Address
|
|
241
|
+
module Definitions
|
|
242
|
+
# @private
|
|
243
|
+
BY_TYPE = ::Array.new(8).tap do |definitions|
|
|
244
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"family", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U16].new, multi: false, order: 0, selector_slot: nil)
|
|
245
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"id", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, multi: false, order: 1, selector_slot: nil)
|
|
246
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"addr4", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U32].new, multi: false, order: 2, selector_slot: nil)
|
|
247
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"addr6", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Binary.new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is not equal to length 16" unless it.bytesize == 16 } }), multi: false, order: 3, selector_slot: nil)
|
|
248
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"port", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U16].new, multi: false, order: 4, selector_slot: nil)
|
|
249
|
+
definitions[6] = ::Nl::AttributeSet::Definition.new(id: 6, name: :"flags", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 5, selector_slot: nil)
|
|
250
|
+
definitions[7] = ::Nl::AttributeSet::Definition.new(id: 7, name: :"if_idx", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::S32].new, multi: false, order: 6, selector_slot: nil)
|
|
251
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
252
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
253
|
+
# @private
|
|
254
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
566
255
|
end
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
# @private
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
256
|
+
end
|
|
257
|
+
class SubflowAttribute
|
|
258
|
+
module Definitions
|
|
259
|
+
# @private
|
|
260
|
+
BY_TYPE = ::Array.new(12).tap do |definitions|
|
|
261
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"token_rem", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 0, selector_slot: nil)
|
|
262
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"token_loc", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 1, selector_slot: nil)
|
|
263
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"relwrite_seq", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 2, selector_slot: nil)
|
|
264
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"map_seq", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U64].new, multi: false, order: 3, selector_slot: nil)
|
|
265
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"map_sfseq", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 4, selector_slot: nil)
|
|
266
|
+
definitions[6] = ::Nl::AttributeSet::Definition.new(id: 6, name: :"ssn_offset", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 5, selector_slot: nil)
|
|
267
|
+
definitions[7] = ::Nl::AttributeSet::Definition.new(id: 7, name: :"map_datalen", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U16].new, multi: false, order: 6, selector_slot: nil)
|
|
268
|
+
definitions[8] = ::Nl::AttributeSet::Definition.new(id: 8, name: :"flags", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 7, selector_slot: nil)
|
|
269
|
+
definitions[9] = ::Nl::AttributeSet::Definition.new(id: 9, name: :"id_rem", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, multi: false, order: 8, selector_slot: nil)
|
|
270
|
+
definitions[10] = ::Nl::AttributeSet::Definition.new(id: 10, name: :"id_loc", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, multi: false, order: 9, selector_slot: nil)
|
|
271
|
+
definitions[11] = ::Nl::AttributeSet::Definition.new(id: 11, name: :"pad", datatype: ::Nl::DataTypes::Pad.new(), multi: false, order: 10, selector_slot: nil)
|
|
272
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
273
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
274
|
+
# @private
|
|
275
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
574
276
|
end
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
277
|
+
end
|
|
278
|
+
class Endpoint
|
|
279
|
+
module Definitions
|
|
578
280
|
# @private
|
|
579
|
-
|
|
281
|
+
BY_TYPE = ::Array.new(2).tap do |definitions|
|
|
282
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"addr", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::Address, selector_bindings: []), multi: false, order: 0, selector_slot: nil)
|
|
283
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
284
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
580
285
|
# @private
|
|
581
|
-
|
|
286
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
582
287
|
end
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
288
|
+
end
|
|
289
|
+
class Attr
|
|
290
|
+
module Definitions
|
|
291
|
+
# @private
|
|
292
|
+
BY_TYPE = ::Array.new(7).tap do |definitions|
|
|
293
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"addr", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::Address, selector_bindings: []), multi: false, order: 0, selector_slot: nil)
|
|
294
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"rcv_add_addrs", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 1, selector_slot: nil)
|
|
295
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"subflows", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 2, selector_slot: nil)
|
|
296
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"token", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 3, selector_slot: nil)
|
|
297
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"loc_id", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, multi: false, order: 4, selector_slot: nil)
|
|
298
|
+
definitions[6] = ::Nl::AttributeSet::Definition.new(id: 6, name: :"addr_remote", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::Address, selector_bindings: []), multi: false, order: 5, selector_slot: nil)
|
|
299
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
300
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
301
|
+
# @private
|
|
302
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
591
303
|
end
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
def saddr6; self[:"saddr6"]&.value; end
|
|
620
|
-
# @rbs return: ::Integer
|
|
621
|
-
# @return [Integer]
|
|
622
|
-
# @see Daddr4
|
|
623
|
-
def daddr4; self[:"daddr4"]&.value; end
|
|
624
|
-
# @rbs return: ::String
|
|
625
|
-
# @return [String]
|
|
626
|
-
# @see Daddr6
|
|
627
|
-
def daddr6; self[:"daddr6"]&.value; end
|
|
628
|
-
# @rbs return: ::Integer
|
|
629
|
-
# @return [Integer]
|
|
630
|
-
# @see Sport
|
|
631
|
-
def sport; self[:"sport"]&.value; end
|
|
632
|
-
# @rbs return: ::Integer
|
|
633
|
-
# @return [Integer]
|
|
634
|
-
# @see Dport
|
|
635
|
-
def dport; self[:"dport"]&.value; end
|
|
636
|
-
# @rbs return: ::Integer
|
|
637
|
-
# @return [Integer]
|
|
638
|
-
# @see Backup
|
|
639
|
-
def backup; self[:"backup"]&.value; end
|
|
640
|
-
# @rbs return: ::Integer
|
|
641
|
-
# @return [Integer]
|
|
642
|
-
# @see Error
|
|
643
|
-
def error; self[:"error"]&.value; end
|
|
644
|
-
# @rbs return: ::Integer
|
|
645
|
-
# @return [Integer]
|
|
646
|
-
# @see Flags
|
|
647
|
-
def flags; self[:"flags"]&.value; end
|
|
648
|
-
# @rbs return: ::Integer
|
|
649
|
-
# @return [Integer]
|
|
650
|
-
# @see Timeout
|
|
651
|
-
def timeout; self[:"timeout"]&.value; end
|
|
652
|
-
# @rbs return: ::Integer
|
|
653
|
-
# @return [Integer]
|
|
654
|
-
# @see IfIdx
|
|
655
|
-
def if_idx; self[:"if_idx"]&.value; end
|
|
656
|
-
# @rbs return: ::Integer
|
|
657
|
-
# @return [Integer]
|
|
658
|
-
# @see ResetReason
|
|
659
|
-
def reset_reason; self[:"reset_reason"]&.value; end
|
|
660
|
-
# @rbs return: ::Integer
|
|
661
|
-
# @return [Integer]
|
|
662
|
-
# @see ResetFlags
|
|
663
|
-
def reset_flags; self[:"reset_flags"]&.value; end
|
|
664
|
-
# Deprecated: use 'flags'
|
|
665
|
-
# @rbs return: ::Integer
|
|
666
|
-
# @return [Integer]
|
|
667
|
-
# @see ServerSide
|
|
668
|
-
def server_side; self[:"server_side"]&.value; end
|
|
669
|
-
class << self
|
|
670
|
-
# Looks up Attribute class by name.
|
|
671
|
-
# @rbs name: Symbol
|
|
672
|
-
# @rbs return: Attribute
|
|
673
|
-
# @param [Symbol] name
|
|
674
|
-
# @return [Attribute]
|
|
675
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
676
|
-
# Looks up Attribute class by type value.
|
|
677
|
-
# @rbs type: Integer
|
|
678
|
-
# @rbs return: Attribute
|
|
679
|
-
# @param [Integer] type
|
|
680
|
-
# @return [Attribute]
|
|
681
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
304
|
+
end
|
|
305
|
+
class EventAttr
|
|
306
|
+
module Definitions
|
|
307
|
+
# @private
|
|
308
|
+
BY_TYPE = ::Array.new(19).tap do |definitions|
|
|
309
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"token", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 0, selector_slot: nil)
|
|
310
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"family", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U16].new, multi: false, order: 1, selector_slot: nil)
|
|
311
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"loc_id", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, multi: false, order: 2, selector_slot: nil)
|
|
312
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"rem_id", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, multi: false, order: 3, selector_slot: nil)
|
|
313
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"saddr4", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U32].new, multi: false, order: 4, selector_slot: nil)
|
|
314
|
+
definitions[6] = ::Nl::AttributeSet::Definition.new(id: 6, name: :"saddr6", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Binary.new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is shorter than minimum length 16" unless it.bytesize >= 16 } }), multi: false, order: 5, selector_slot: nil)
|
|
315
|
+
definitions[7] = ::Nl::AttributeSet::Definition.new(id: 7, name: :"daddr4", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U32].new, multi: false, order: 6, selector_slot: nil)
|
|
316
|
+
definitions[8] = ::Nl::AttributeSet::Definition.new(id: 8, name: :"daddr6", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Binary.new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is shorter than minimum length 16" unless it.bytesize >= 16 } }), multi: false, order: 7, selector_slot: nil)
|
|
317
|
+
definitions[9] = ::Nl::AttributeSet::Definition.new(id: 9, name: :"sport", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new, multi: false, order: 8, selector_slot: nil)
|
|
318
|
+
definitions[10] = ::Nl::AttributeSet::Definition.new(id: 10, name: :"dport", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new, multi: false, order: 9, selector_slot: nil)
|
|
319
|
+
definitions[11] = ::Nl::AttributeSet::Definition.new(id: 11, name: :"backup", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, multi: false, order: 10, selector_slot: nil)
|
|
320
|
+
definitions[12] = ::Nl::AttributeSet::Definition.new(id: 12, name: :"error", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, multi: false, order: 11, selector_slot: nil)
|
|
321
|
+
definitions[13] = ::Nl::AttributeSet::Definition.new(id: 13, name: :"flags", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U16].new, multi: false, order: 12, selector_slot: nil)
|
|
322
|
+
definitions[14] = ::Nl::AttributeSet::Definition.new(id: 14, name: :"timeout", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 13, selector_slot: nil)
|
|
323
|
+
definitions[15] = ::Nl::AttributeSet::Definition.new(id: 15, name: :"if_idx", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::S32].new, multi: false, order: 14, selector_slot: nil)
|
|
324
|
+
definitions[16] = ::Nl::AttributeSet::Definition.new(id: 16, name: :"reset_reason", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 15, selector_slot: nil)
|
|
325
|
+
definitions[17] = ::Nl::AttributeSet::Definition.new(id: 17, name: :"reset_flags", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 16, selector_slot: nil)
|
|
326
|
+
definitions[18] = ::Nl::AttributeSet::Definition.new(id: 18, name: :"server_side", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, multi: false, order: 17, selector_slot: nil)
|
|
327
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
328
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
329
|
+
# @private
|
|
330
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
682
331
|
end
|
|
683
332
|
end
|
|
684
|
-
# @private
|
|
685
|
-
Endpoint::Addr::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::Address, selector_bindings: Ractor.make_shareable([]))
|
|
686
|
-
# @private
|
|
687
|
-
Attr::Addr::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::Address, selector_bindings: Ractor.make_shareable([]))
|
|
688
|
-
# @private
|
|
689
|
-
Attr::AddrRemote::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::Address, selector_bindings: Ractor.make_shareable([]))
|
|
690
333
|
end
|
|
691
334
|
module Messages
|
|
692
335
|
# Add endpoint
|
|
693
336
|
#
|
|
694
337
|
# Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
|
|
695
|
-
class DoAddAddrRequest < ::Nl::
|
|
338
|
+
class DoAddAddrRequest < ::Nl::Message
|
|
696
339
|
TYPE = 1
|
|
697
340
|
FIXED_HEADER = nil
|
|
698
341
|
ATTRIBUTE_SET = AttributeSets::Endpoint
|
|
699
|
-
ATTRIBUTES =
|
|
342
|
+
ATTRIBUTES = %i[addr].freeze
|
|
343
|
+
include ATTRIBUTE_SET::Definitions
|
|
344
|
+
def initialize(attributes = [])
|
|
345
|
+
@attributes = attributes
|
|
346
|
+
end
|
|
347
|
+
# @private
|
|
348
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
349
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
350
|
+
new(
|
|
351
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
352
|
+
)
|
|
353
|
+
end
|
|
354
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
355
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
356
|
+
def self.decode(decoder)
|
|
357
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
358
|
+
end
|
|
359
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
360
|
+
encode_attributes(encoder, external_selectors:)
|
|
361
|
+
end
|
|
700
362
|
# @rbs return: AttributeSets::Address
|
|
701
363
|
# @return [AttributeSets::Address]
|
|
702
|
-
|
|
703
|
-
def addr; attributes[:"addr"]&.value; end
|
|
364
|
+
def addr; self[:"addr"]; end
|
|
704
365
|
end
|
|
705
366
|
# Delete endpoint
|
|
706
367
|
#
|
|
707
368
|
# Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
|
|
708
|
-
class DoDelAddrRequest < ::Nl::
|
|
369
|
+
class DoDelAddrRequest < ::Nl::Message
|
|
709
370
|
TYPE = 2
|
|
710
371
|
FIXED_HEADER = nil
|
|
711
372
|
ATTRIBUTE_SET = AttributeSets::Endpoint
|
|
712
|
-
ATTRIBUTES =
|
|
373
|
+
ATTRIBUTES = %i[addr].freeze
|
|
374
|
+
include ATTRIBUTE_SET::Definitions
|
|
375
|
+
def initialize(attributes = [])
|
|
376
|
+
@attributes = attributes
|
|
377
|
+
end
|
|
378
|
+
# @private
|
|
379
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
380
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
381
|
+
new(
|
|
382
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
383
|
+
)
|
|
384
|
+
end
|
|
385
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
386
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
387
|
+
def self.decode(decoder)
|
|
388
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
389
|
+
end
|
|
390
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
391
|
+
encode_attributes(encoder, external_selectors:)
|
|
392
|
+
end
|
|
713
393
|
# @rbs return: AttributeSets::Address
|
|
714
394
|
# @return [AttributeSets::Address]
|
|
715
|
-
|
|
716
|
-
def addr; attributes[:"addr"]&.value; end
|
|
395
|
+
def addr; self[:"addr"]; end
|
|
717
396
|
end
|
|
718
397
|
# Get endpoint information
|
|
719
|
-
class DoGetAddrRequest < ::Nl::
|
|
398
|
+
class DoGetAddrRequest < ::Nl::Message
|
|
720
399
|
TYPE = 3
|
|
721
400
|
FIXED_HEADER = nil
|
|
722
401
|
ATTRIBUTE_SET = AttributeSets::Attr
|
|
723
|
-
ATTRIBUTES =
|
|
402
|
+
ATTRIBUTES = %i[addr token].freeze
|
|
403
|
+
include ATTRIBUTE_SET::Definitions
|
|
404
|
+
def initialize(attributes = [])
|
|
405
|
+
@attributes = attributes
|
|
406
|
+
end
|
|
407
|
+
# @private
|
|
408
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
409
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
410
|
+
new(
|
|
411
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
412
|
+
)
|
|
413
|
+
end
|
|
414
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
415
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
416
|
+
def self.decode(decoder)
|
|
417
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
418
|
+
end
|
|
419
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
420
|
+
encode_attributes(encoder, external_selectors:)
|
|
421
|
+
end
|
|
724
422
|
# @rbs return: AttributeSets::Address
|
|
725
423
|
# @return [AttributeSets::Address]
|
|
726
|
-
|
|
727
|
-
def addr; attributes[:"addr"]&.value; end
|
|
424
|
+
def addr; self[:"addr"]; end
|
|
728
425
|
# @rbs return: ::Integer
|
|
729
426
|
# @return [Integer]
|
|
730
|
-
|
|
731
|
-
def token; attributes[:"token"]&.value; end
|
|
427
|
+
def token; self[:"token"]; end
|
|
732
428
|
end
|
|
733
429
|
# Get endpoint information
|
|
734
|
-
class DoGetAddrReply < ::Nl::
|
|
430
|
+
class DoGetAddrReply < ::Nl::Message
|
|
735
431
|
TYPE = 3
|
|
736
432
|
FIXED_HEADER = nil
|
|
737
433
|
ATTRIBUTE_SET = AttributeSets::Attr
|
|
738
|
-
ATTRIBUTES =
|
|
434
|
+
ATTRIBUTES = %i[addr].freeze
|
|
435
|
+
include ATTRIBUTE_SET::Definitions
|
|
436
|
+
def initialize(attributes = [])
|
|
437
|
+
@attributes = attributes
|
|
438
|
+
end
|
|
439
|
+
# @private
|
|
440
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
441
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
442
|
+
new(
|
|
443
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
444
|
+
)
|
|
445
|
+
end
|
|
446
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
447
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
448
|
+
def self.decode(decoder)
|
|
449
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
450
|
+
end
|
|
451
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
452
|
+
encode_attributes(encoder, external_selectors:)
|
|
453
|
+
end
|
|
739
454
|
# @rbs return: AttributeSets::Address
|
|
740
455
|
# @return [AttributeSets::Address]
|
|
741
|
-
|
|
742
|
-
def addr; attributes[:"addr"]&.value; end
|
|
456
|
+
def addr; self[:"addr"]; end
|
|
743
457
|
end
|
|
744
458
|
# Get endpoint information
|
|
745
|
-
class DumpGetAddrRequest < ::Nl::
|
|
459
|
+
class DumpGetAddrRequest < ::Nl::Message
|
|
746
460
|
TYPE = 3
|
|
747
461
|
FIXED_HEADER = nil
|
|
748
462
|
ATTRIBUTE_SET = AttributeSets::Attr
|
|
749
|
-
ATTRIBUTES =
|
|
463
|
+
ATTRIBUTES = %i[].freeze
|
|
464
|
+
include ATTRIBUTE_SET::Definitions
|
|
465
|
+
def initialize(attributes = [])
|
|
466
|
+
@attributes = attributes
|
|
467
|
+
end
|
|
468
|
+
# @private
|
|
469
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
470
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
471
|
+
new(
|
|
472
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
473
|
+
)
|
|
474
|
+
end
|
|
475
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
476
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
477
|
+
def self.decode(decoder)
|
|
478
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
479
|
+
end
|
|
480
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
481
|
+
encode_attributes(encoder, external_selectors:)
|
|
482
|
+
end
|
|
750
483
|
end
|
|
751
484
|
# Get endpoint information
|
|
752
|
-
class DumpGetAddrReply < ::Nl::
|
|
485
|
+
class DumpGetAddrReply < ::Nl::Message
|
|
753
486
|
TYPE = 3
|
|
754
487
|
FIXED_HEADER = nil
|
|
755
488
|
ATTRIBUTE_SET = AttributeSets::Attr
|
|
756
|
-
ATTRIBUTES =
|
|
489
|
+
ATTRIBUTES = %i[addr].freeze
|
|
490
|
+
include ATTRIBUTE_SET::Definitions
|
|
491
|
+
def initialize(attributes = [])
|
|
492
|
+
@attributes = attributes
|
|
493
|
+
end
|
|
494
|
+
# @private
|
|
495
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
496
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
497
|
+
new(
|
|
498
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
499
|
+
)
|
|
500
|
+
end
|
|
501
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
502
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
503
|
+
def self.decode(decoder)
|
|
504
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
505
|
+
end
|
|
506
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
507
|
+
encode_attributes(encoder, external_selectors:)
|
|
508
|
+
end
|
|
757
509
|
# @rbs return: AttributeSets::Address
|
|
758
510
|
# @return [AttributeSets::Address]
|
|
759
|
-
|
|
760
|
-
def addr; attributes[:"addr"]&.value; end
|
|
511
|
+
def addr; self[:"addr"]; end
|
|
761
512
|
end
|
|
762
513
|
# Flush addresses
|
|
763
514
|
#
|
|
764
515
|
# Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
|
|
765
|
-
class DoFlushAddrsRequest < ::Nl::
|
|
516
|
+
class DoFlushAddrsRequest < ::Nl::Message
|
|
766
517
|
TYPE = 4
|
|
767
518
|
FIXED_HEADER = nil
|
|
768
519
|
ATTRIBUTE_SET = AttributeSets::Endpoint
|
|
769
|
-
ATTRIBUTES =
|
|
520
|
+
ATTRIBUTES = %i[addr].freeze
|
|
521
|
+
include ATTRIBUTE_SET::Definitions
|
|
522
|
+
def initialize(attributes = [])
|
|
523
|
+
@attributes = attributes
|
|
524
|
+
end
|
|
525
|
+
# @private
|
|
526
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
527
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
528
|
+
new(
|
|
529
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
530
|
+
)
|
|
531
|
+
end
|
|
532
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
533
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
534
|
+
def self.decode(decoder)
|
|
535
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
536
|
+
end
|
|
537
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
538
|
+
encode_attributes(encoder, external_selectors:)
|
|
539
|
+
end
|
|
770
540
|
# @rbs return: AttributeSets::Address
|
|
771
541
|
# @return [AttributeSets::Address]
|
|
772
|
-
|
|
773
|
-
def addr; attributes[:"addr"]&.value; end
|
|
542
|
+
def addr; self[:"addr"]; end
|
|
774
543
|
end
|
|
775
544
|
# Set protocol limits
|
|
776
545
|
#
|
|
777
546
|
# Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
|
|
778
|
-
class DoSetLimitsRequest < ::Nl::
|
|
547
|
+
class DoSetLimitsRequest < ::Nl::Message
|
|
779
548
|
TYPE = 5
|
|
780
549
|
FIXED_HEADER = nil
|
|
781
550
|
ATTRIBUTE_SET = AttributeSets::Attr
|
|
782
|
-
ATTRIBUTES =
|
|
551
|
+
ATTRIBUTES = %i[rcv_add_addrs subflows].freeze
|
|
552
|
+
include ATTRIBUTE_SET::Definitions
|
|
553
|
+
def initialize(attributes = [])
|
|
554
|
+
@attributes = attributes
|
|
555
|
+
end
|
|
556
|
+
# @private
|
|
557
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
558
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
559
|
+
new(
|
|
560
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
561
|
+
)
|
|
562
|
+
end
|
|
563
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
564
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
565
|
+
def self.decode(decoder)
|
|
566
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
567
|
+
end
|
|
568
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
569
|
+
encode_attributes(encoder, external_selectors:)
|
|
570
|
+
end
|
|
783
571
|
# @rbs return: ::Integer
|
|
784
572
|
# @return [Integer]
|
|
785
|
-
|
|
786
|
-
def rcv_add_addrs; attributes[:"rcv_add_addrs"]&.value; end
|
|
573
|
+
def rcv_add_addrs; self[:"rcv_add_addrs"]; end
|
|
787
574
|
# @rbs return: ::Integer
|
|
788
575
|
# @return [Integer]
|
|
789
|
-
|
|
790
|
-
def subflows; attributes[:"subflows"]&.value; end
|
|
576
|
+
def subflows; self[:"subflows"]; end
|
|
791
577
|
end
|
|
792
578
|
# Get protocol limits
|
|
793
|
-
class DoGetLimitsRequest < ::Nl::
|
|
579
|
+
class DoGetLimitsRequest < ::Nl::Message
|
|
794
580
|
TYPE = 6
|
|
795
581
|
FIXED_HEADER = nil
|
|
796
582
|
ATTRIBUTE_SET = AttributeSets::Attr
|
|
797
|
-
ATTRIBUTES =
|
|
583
|
+
ATTRIBUTES = %i[rcv_add_addrs subflows].freeze
|
|
584
|
+
include ATTRIBUTE_SET::Definitions
|
|
585
|
+
def initialize(attributes = [])
|
|
586
|
+
@attributes = attributes
|
|
587
|
+
end
|
|
588
|
+
# @private
|
|
589
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
590
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
591
|
+
new(
|
|
592
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
593
|
+
)
|
|
594
|
+
end
|
|
595
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
596
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
597
|
+
def self.decode(decoder)
|
|
598
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
599
|
+
end
|
|
600
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
601
|
+
encode_attributes(encoder, external_selectors:)
|
|
602
|
+
end
|
|
798
603
|
# @rbs return: ::Integer
|
|
799
604
|
# @return [Integer]
|
|
800
|
-
|
|
801
|
-
def rcv_add_addrs; attributes[:"rcv_add_addrs"]&.value; end
|
|
605
|
+
def rcv_add_addrs; self[:"rcv_add_addrs"]; end
|
|
802
606
|
# @rbs return: ::Integer
|
|
803
607
|
# @return [Integer]
|
|
804
|
-
|
|
805
|
-
def subflows; attributes[:"subflows"]&.value; end
|
|
608
|
+
def subflows; self[:"subflows"]; end
|
|
806
609
|
end
|
|
807
610
|
# Get protocol limits
|
|
808
|
-
class DoGetLimitsReply < ::Nl::
|
|
611
|
+
class DoGetLimitsReply < ::Nl::Message
|
|
809
612
|
TYPE = 6
|
|
810
613
|
FIXED_HEADER = nil
|
|
811
614
|
ATTRIBUTE_SET = AttributeSets::Attr
|
|
812
|
-
ATTRIBUTES =
|
|
615
|
+
ATTRIBUTES = %i[rcv_add_addrs subflows].freeze
|
|
616
|
+
include ATTRIBUTE_SET::Definitions
|
|
617
|
+
def initialize(attributes = [])
|
|
618
|
+
@attributes = attributes
|
|
619
|
+
end
|
|
620
|
+
# @private
|
|
621
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
622
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
623
|
+
new(
|
|
624
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
625
|
+
)
|
|
626
|
+
end
|
|
627
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
628
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
629
|
+
def self.decode(decoder)
|
|
630
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
631
|
+
end
|
|
632
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
633
|
+
encode_attributes(encoder, external_selectors:)
|
|
634
|
+
end
|
|
813
635
|
# @rbs return: ::Integer
|
|
814
636
|
# @return [Integer]
|
|
815
|
-
|
|
816
|
-
def rcv_add_addrs; attributes[:"rcv_add_addrs"]&.value; end
|
|
637
|
+
def rcv_add_addrs; self[:"rcv_add_addrs"]; end
|
|
817
638
|
# @rbs return: ::Integer
|
|
818
639
|
# @return [Integer]
|
|
819
|
-
|
|
820
|
-
def subflows; attributes[:"subflows"]&.value; end
|
|
640
|
+
def subflows; self[:"subflows"]; end
|
|
821
641
|
end
|
|
822
642
|
# Change endpoint flags
|
|
823
643
|
#
|
|
824
644
|
# Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
|
|
825
|
-
class DoSetFlagsRequest < ::Nl::
|
|
645
|
+
class DoSetFlagsRequest < ::Nl::Message
|
|
826
646
|
TYPE = 7
|
|
827
647
|
FIXED_HEADER = nil
|
|
828
648
|
ATTRIBUTE_SET = AttributeSets::Attr
|
|
829
|
-
ATTRIBUTES =
|
|
649
|
+
ATTRIBUTES = %i[addr token addr_remote].freeze
|
|
650
|
+
include ATTRIBUTE_SET::Definitions
|
|
651
|
+
def initialize(attributes = [])
|
|
652
|
+
@attributes = attributes
|
|
653
|
+
end
|
|
654
|
+
# @private
|
|
655
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
656
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
657
|
+
new(
|
|
658
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
659
|
+
)
|
|
660
|
+
end
|
|
661
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
662
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
663
|
+
def self.decode(decoder)
|
|
664
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
665
|
+
end
|
|
666
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
667
|
+
encode_attributes(encoder, external_selectors:)
|
|
668
|
+
end
|
|
830
669
|
# @rbs return: AttributeSets::Address
|
|
831
670
|
# @return [AttributeSets::Address]
|
|
832
|
-
|
|
833
|
-
def addr; attributes[:"addr"]&.value; end
|
|
671
|
+
def addr; self[:"addr"]; end
|
|
834
672
|
# @rbs return: ::Integer
|
|
835
673
|
# @return [Integer]
|
|
836
|
-
|
|
837
|
-
def token; attributes[:"token"]&.value; end
|
|
674
|
+
def token; self[:"token"]; end
|
|
838
675
|
# @rbs return: AttributeSets::Address
|
|
839
676
|
# @return [AttributeSets::Address]
|
|
840
|
-
|
|
841
|
-
def addr_remote; attributes[:"addr_remote"]&.value; end
|
|
677
|
+
def addr_remote; self[:"addr_remote"]; end
|
|
842
678
|
end
|
|
843
679
|
# Announce new address
|
|
844
680
|
#
|
|
845
681
|
# Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
|
|
846
|
-
class DoAnnounceRequest < ::Nl::
|
|
682
|
+
class DoAnnounceRequest < ::Nl::Message
|
|
847
683
|
TYPE = 8
|
|
848
684
|
FIXED_HEADER = nil
|
|
849
685
|
ATTRIBUTE_SET = AttributeSets::Attr
|
|
850
|
-
ATTRIBUTES =
|
|
686
|
+
ATTRIBUTES = %i[addr token].freeze
|
|
687
|
+
include ATTRIBUTE_SET::Definitions
|
|
688
|
+
def initialize(attributes = [])
|
|
689
|
+
@attributes = attributes
|
|
690
|
+
end
|
|
691
|
+
# @private
|
|
692
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
693
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
694
|
+
new(
|
|
695
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
696
|
+
)
|
|
697
|
+
end
|
|
698
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
699
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
700
|
+
def self.decode(decoder)
|
|
701
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
702
|
+
end
|
|
703
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
704
|
+
encode_attributes(encoder, external_selectors:)
|
|
705
|
+
end
|
|
851
706
|
# @rbs return: AttributeSets::Address
|
|
852
707
|
# @return [AttributeSets::Address]
|
|
853
|
-
|
|
854
|
-
def addr; attributes[:"addr"]&.value; end
|
|
708
|
+
def addr; self[:"addr"]; end
|
|
855
709
|
# @rbs return: ::Integer
|
|
856
710
|
# @return [Integer]
|
|
857
|
-
|
|
858
|
-
def token; attributes[:"token"]&.value; end
|
|
711
|
+
def token; self[:"token"]; end
|
|
859
712
|
end
|
|
860
713
|
# Announce removal
|
|
861
714
|
#
|
|
862
715
|
# Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
|
|
863
|
-
class DoRemoveRequest < ::Nl::
|
|
716
|
+
class DoRemoveRequest < ::Nl::Message
|
|
864
717
|
TYPE = 9
|
|
865
718
|
FIXED_HEADER = nil
|
|
866
719
|
ATTRIBUTE_SET = AttributeSets::Attr
|
|
867
|
-
ATTRIBUTES =
|
|
720
|
+
ATTRIBUTES = %i[token loc_id].freeze
|
|
721
|
+
include ATTRIBUTE_SET::Definitions
|
|
722
|
+
def initialize(attributes = [])
|
|
723
|
+
@attributes = attributes
|
|
724
|
+
end
|
|
725
|
+
# @private
|
|
726
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
727
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
728
|
+
new(
|
|
729
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
730
|
+
)
|
|
731
|
+
end
|
|
732
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
733
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
734
|
+
def self.decode(decoder)
|
|
735
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
736
|
+
end
|
|
737
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
738
|
+
encode_attributes(encoder, external_selectors:)
|
|
739
|
+
end
|
|
868
740
|
# @rbs return: ::Integer
|
|
869
741
|
# @return [Integer]
|
|
870
|
-
|
|
871
|
-
def token; attributes[:"token"]&.value; end
|
|
742
|
+
def token; self[:"token"]; end
|
|
872
743
|
# @rbs return: ::Integer
|
|
873
744
|
# @return [Integer]
|
|
874
|
-
|
|
875
|
-
def loc_id; attributes[:"loc_id"]&.value; end
|
|
745
|
+
def loc_id; self[:"loc_id"]; end
|
|
876
746
|
end
|
|
877
747
|
# Create subflow
|
|
878
748
|
#
|
|
879
749
|
# Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
|
|
880
|
-
class DoSubflowCreateRequest < ::Nl::
|
|
750
|
+
class DoSubflowCreateRequest < ::Nl::Message
|
|
881
751
|
TYPE = 10
|
|
882
752
|
FIXED_HEADER = nil
|
|
883
753
|
ATTRIBUTE_SET = AttributeSets::Attr
|
|
884
|
-
ATTRIBUTES =
|
|
754
|
+
ATTRIBUTES = %i[addr token addr_remote].freeze
|
|
755
|
+
include ATTRIBUTE_SET::Definitions
|
|
756
|
+
def initialize(attributes = [])
|
|
757
|
+
@attributes = attributes
|
|
758
|
+
end
|
|
759
|
+
# @private
|
|
760
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
761
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
762
|
+
new(
|
|
763
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
764
|
+
)
|
|
765
|
+
end
|
|
766
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
767
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
768
|
+
def self.decode(decoder)
|
|
769
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
770
|
+
end
|
|
771
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
772
|
+
encode_attributes(encoder, external_selectors:)
|
|
773
|
+
end
|
|
885
774
|
# @rbs return: AttributeSets::Address
|
|
886
775
|
# @return [AttributeSets::Address]
|
|
887
|
-
|
|
888
|
-
def addr; attributes[:"addr"]&.value; end
|
|
776
|
+
def addr; self[:"addr"]; end
|
|
889
777
|
# @rbs return: ::Integer
|
|
890
778
|
# @return [Integer]
|
|
891
|
-
|
|
892
|
-
def token; attributes[:"token"]&.value; end
|
|
779
|
+
def token; self[:"token"]; end
|
|
893
780
|
# @rbs return: AttributeSets::Address
|
|
894
781
|
# @return [AttributeSets::Address]
|
|
895
|
-
|
|
896
|
-
def addr_remote; attributes[:"addr_remote"]&.value; end
|
|
782
|
+
def addr_remote; self[:"addr_remote"]; end
|
|
897
783
|
end
|
|
898
784
|
# Destroy subflow
|
|
899
785
|
#
|
|
900
786
|
# Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
|
|
901
|
-
class DoSubflowDestroyRequest < ::Nl::
|
|
787
|
+
class DoSubflowDestroyRequest < ::Nl::Message
|
|
902
788
|
TYPE = 11
|
|
903
789
|
FIXED_HEADER = nil
|
|
904
790
|
ATTRIBUTE_SET = AttributeSets::Attr
|
|
905
|
-
ATTRIBUTES =
|
|
791
|
+
ATTRIBUTES = %i[addr token addr_remote].freeze
|
|
792
|
+
include ATTRIBUTE_SET::Definitions
|
|
793
|
+
def initialize(attributes = [])
|
|
794
|
+
@attributes = attributes
|
|
795
|
+
end
|
|
796
|
+
# @private
|
|
797
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
798
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
799
|
+
new(
|
|
800
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
801
|
+
)
|
|
802
|
+
end
|
|
803
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
804
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
805
|
+
def self.decode(decoder)
|
|
806
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
807
|
+
end
|
|
808
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
809
|
+
encode_attributes(encoder, external_selectors:)
|
|
810
|
+
end
|
|
906
811
|
# @rbs return: AttributeSets::Address
|
|
907
812
|
# @return [AttributeSets::Address]
|
|
908
|
-
|
|
909
|
-
def addr; attributes[:"addr"]&.value; end
|
|
813
|
+
def addr; self[:"addr"]; end
|
|
910
814
|
# @rbs return: ::Integer
|
|
911
815
|
# @return [Integer]
|
|
912
|
-
|
|
913
|
-
def token; attributes[:"token"]&.value; end
|
|
816
|
+
def token; self[:"token"]; end
|
|
914
817
|
# @rbs return: AttributeSets::Address
|
|
915
818
|
# @return [AttributeSets::Address]
|
|
916
|
-
|
|
917
|
-
def addr_remote; attributes[:"addr_remote"]&.value; end
|
|
819
|
+
def addr_remote; self[:"addr_remote"]; end
|
|
918
820
|
end
|
|
919
821
|
end
|
|
920
822
|
module Notifications
|
|
921
823
|
end
|
|
922
824
|
# @private
|
|
923
|
-
NOTIFICATIONS =
|
|
825
|
+
NOTIFICATIONS = {}.freeze #: Hash[::Integer, ::Class]
|
|
924
826
|
# Add endpoint
|
|
925
827
|
#
|
|
926
828
|
# Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
|