nl-linux 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/NLSPEC_VERSION +1 -1
- data/generated/nl/linux/binder.rb +103 -187
- data/generated/nl/linux/conntrack.rb +1053 -1649
- data/generated/nl/linux/dev_energymodel.rb +303 -265
- data/generated/nl/linux/devlink.rb +4904 -5576
- data/generated/nl/linux/dpll.rb +1097 -1467
- data/generated/nl/linux/drm_ras.rb +235 -195
- data/generated/nl/linux/ethtool.rb +6652 -7415
- data/generated/nl/linux/fou.rb +234 -255
- data/generated/nl/linux/handshake.rb +208 -280
- data/generated/nl/linux/lockd.rb +99 -73
- data/generated/nl/linux/mptcp_pm.rb +589 -687
- data/generated/nl/linux/net_shaper.rb +520 -615
- data/generated/nl/linux/netdev.rb +1640 -1987
- data/generated/nl/linux/nfsd.rb +1341 -1215
- data/generated/nl/linux/nftables.rb +5143 -4870
- data/generated/nl/linux/nl80211.rb +2542 -6316
- data/generated/nl/linux/nlctrl.rb +338 -483
- data/generated/nl/linux/ovpn.rb +1006 -1522
- data/generated/nl/linux/ovs_datapath.rb +291 -186
- data/generated/nl/linux/ovs_flow.rb +1393 -2065
- data/generated/nl/linux/ovs_packet.rb +186 -223
- data/generated/nl/linux/ovs_vport.rb +328 -285
- data/generated/nl/linux/psp.rb +812 -717
- data/generated/nl/linux/rt_addr.rb +513 -243
- data/generated/nl/linux/rt_link.rb +4504 -7238
- data/generated/nl/linux/rt_neigh.rb +935 -847
- data/generated/nl/linux/rt_route.rb +1198 -871
- data/generated/nl/linux/rt_rule.rb +680 -659
- data/generated/nl/linux/sunrpc_cache.rb +323 -321
- data/generated/nl/linux/tc.rb +9058 -10454
- data/generated/nl/linux/tcp_metrics.rb +258 -367
- data/generated/nl/linux/team.rb +327 -345
- data/generated/nl/linux/wireguard.rb +270 -434
- data/lib/nl/linux/nlctrl_resolver.rb +1 -1
- data/lib/nl/linux/version.rb +1 -1
- data/linux/conntrack.yaml +18 -3
- data/linux/devlink.yaml +26 -4
- data/linux/dpll.yaml +19 -0
- data/linux/netdev.yaml +21 -0
- data/linux/nfsd.yaml +111 -0
- data/linux/nl80211.yaml +2 -2
- data/linux/rt-addr.yaml +4 -0
- data/linux/rt-link.yaml +7 -0
- data/linux/rt-neigh.yaml +3 -0
- data/linux/rt-route.yaml +83 -2
- data/sig/generated/nl/linux/binder.rbs +77 -220
- data/sig/generated/nl/linux/conntrack.rbs +770 -1954
- data/sig/generated/nl/linux/dev_energymodel.rbs +207 -291
- data/sig/generated/nl/linux/devlink.rbs +3318 -6068
- data/sig/generated/nl/linux/dpll.rbs +791 -1589
- data/sig/generated/nl/linux/drm_ras.rbs +160 -208
- data/sig/generated/nl/linux/ethtool.rbs +4205 -7581
- data/sig/generated/nl/linux/fou.rbs +139 -254
- data/sig/generated/nl/linux/handshake.rbs +144 -319
- data/sig/generated/nl/linux/lockd.rbs +64 -74
- data/sig/generated/nl/linux/mptcp_pm.rbs +426 -835
- data/sig/generated/nl/linux/net_shaper.rbs +351 -644
- data/sig/generated/nl/linux/netdev.rbs +1151 -2146
- data/sig/generated/nl/linux/nfsd.rbs +1047 -1409
- data/sig/generated/nl/linux/nftables.rbs +2907 -5030
- data/sig/generated/nl/linux/nl80211.rbs +1807 -7964
- data/sig/generated/nl/linux/nlctrl.rbs +220 -544
- data/sig/generated/nl/linux/ovpn.rbs +835 -1859
- data/sig/generated/nl/linux/ovs_datapath.rbs +141 -181
- data/sig/generated/nl/linux/ovs_flow.rbs +817 -2332
- data/sig/generated/nl/linux/ovs_packet.rbs +110 -237
- data/sig/generated/nl/linux/ovs_vport.rbs +174 -294
- data/sig/generated/nl/linux/psp.rbs +550 -741
- data/sig/generated/nl/linux/rt_addr.rbs +188 -226
- data/sig/generated/nl/linux/rt_link.rbs +2687 -8370
- data/sig/generated/nl/linux/rt_neigh.rbs +471 -1005
- data/sig/generated/nl/linux/rt_route.rbs +632 -862
- data/sig/generated/nl/linux/rt_rule.rbs +217 -639
- data/sig/generated/nl/linux/sunrpc_cache.rbs +233 -369
- data/sig/generated/nl/linux/tc.rbs +6199 -13391
- data/sig/generated/nl/linux/tcp_metrics.rbs +179 -421
- data/sig/generated/nl/linux/team.rbs +232 -391
- data/sig/generated/nl/linux/wireguard.rbs +197 -502
- metadata +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
|
2
2
|
#
|
|
3
|
-
# This file is based on Documentation/netlink/specs/ovs_flow.yaml from Linux v7.
|
|
3
|
+
# This file is based on Documentation/netlink/specs/ovs_flow.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 OvsFlow < ::Nl::Genl::Family
|
|
|
27
27
|
super
|
|
28
28
|
end
|
|
29
29
|
# @private
|
|
30
|
-
MCAST_GROUPS =
|
|
30
|
+
MCAST_GROUPS = {:"ovs_flow" => ::Nl::McastGroup.new("ovs_flow", nil)}.freeze #: Hash[::Symbol, ::Nl::McastGroup]
|
|
31
31
|
module Enums
|
|
32
32
|
module OvsFragType
|
|
33
33
|
# Packet is not a fragment.
|
|
@@ -82,14 +82,25 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
82
82
|
# to a datapath).
|
|
83
83
|
# @return [Integer]
|
|
84
84
|
# @private
|
|
85
|
-
MEMBERS =
|
|
85
|
+
MEMBERS = {dp_ifindex: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new}.freeze #: Hash[::Symbol, ::Nl::_DataType]
|
|
86
|
+
Ractor.make_shareable(MEMBERS) if defined?(Ractor)
|
|
87
|
+
# @private
|
|
88
|
+
# @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
|
|
89
|
+
def self.from_params(params, context: nil)
|
|
90
|
+
unknown = params.keys - members
|
|
91
|
+
raise ArgumentError, "unknown struct members: #{unknown.join(', ')}" unless unknown.empty?
|
|
92
|
+
self.new(
|
|
93
|
+
MEMBERS[:"dp_ifindex"].coerce(params.fetch(:"dp_ifindex", 0), context:),
|
|
94
|
+
)
|
|
95
|
+
end
|
|
86
96
|
# Decodes the struct.
|
|
87
97
|
# @rbs decoder: ::Nl::Decoder
|
|
88
98
|
# @rbs return: instance
|
|
89
99
|
# @param [Nl::Decoder] decoder
|
|
90
100
|
# @return [self]
|
|
91
101
|
def self.decode(decoder)
|
|
92
|
-
|
|
102
|
+
value_0 = decoder.get_host_u32
|
|
103
|
+
self.new(value_0)
|
|
93
104
|
end
|
|
94
105
|
# Encodes the struct.
|
|
95
106
|
# @rbs encoder: ::Nl::Encoder
|
|
@@ -97,7 +108,7 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
97
108
|
# @param [Nl::Encoder] encoder
|
|
98
109
|
# @return [void]
|
|
99
110
|
def encode(encoder)
|
|
100
|
-
MEMBERS.
|
|
111
|
+
MEMBERS[:"dp_ifindex"].encode(encoder, public_send(:"dp_ifindex"))
|
|
101
112
|
end
|
|
102
113
|
end
|
|
103
114
|
OvsFlowStats = Struct.new(
|
|
@@ -112,14 +123,27 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
112
123
|
# Number of matched bytes.
|
|
113
124
|
# @return [Integer]
|
|
114
125
|
# @private
|
|
115
|
-
MEMBERS =
|
|
126
|
+
MEMBERS = {n_packets: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U64].new, n_bytes: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U64].new}.freeze #: Hash[::Symbol, ::Nl::_DataType]
|
|
127
|
+
Ractor.make_shareable(MEMBERS) if defined?(Ractor)
|
|
128
|
+
# @private
|
|
129
|
+
# @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
|
|
130
|
+
def self.from_params(params, context: nil)
|
|
131
|
+
unknown = params.keys - members
|
|
132
|
+
raise ArgumentError, "unknown struct members: #{unknown.join(', ')}" unless unknown.empty?
|
|
133
|
+
self.new(
|
|
134
|
+
MEMBERS[:"n_packets"].coerce(params.fetch(:"n_packets", 0), context:),
|
|
135
|
+
MEMBERS[:"n_bytes"].coerce(params.fetch(:"n_bytes", 0), context:),
|
|
136
|
+
)
|
|
137
|
+
end
|
|
116
138
|
# Decodes the struct.
|
|
117
139
|
# @rbs decoder: ::Nl::Decoder
|
|
118
140
|
# @rbs return: instance
|
|
119
141
|
# @param [Nl::Decoder] decoder
|
|
120
142
|
# @return [self]
|
|
121
143
|
def self.decode(decoder)
|
|
122
|
-
|
|
144
|
+
value_0 = decoder.get_host_u64
|
|
145
|
+
value_1 = decoder.get_host_u64
|
|
146
|
+
self.new(value_0, value_1)
|
|
123
147
|
end
|
|
124
148
|
# Encodes the struct.
|
|
125
149
|
# @rbs encoder: ::Nl::Encoder
|
|
@@ -127,7 +151,8 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
127
151
|
# @param [Nl::Encoder] encoder
|
|
128
152
|
# @return [void]
|
|
129
153
|
def encode(encoder)
|
|
130
|
-
MEMBERS.
|
|
154
|
+
MEMBERS[:"n_packets"].encode(encoder, public_send(:"n_packets"))
|
|
155
|
+
MEMBERS[:"n_bytes"].encode(encoder, public_send(:"n_bytes"))
|
|
131
156
|
end
|
|
132
157
|
end
|
|
133
158
|
OvsKeyEthernet = Struct.new(
|
|
@@ -140,14 +165,27 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
140
165
|
# @!attribute [rw] eth_dst
|
|
141
166
|
# @return [String]
|
|
142
167
|
# @private
|
|
143
|
-
MEMBERS =
|
|
168
|
+
MEMBERS = {eth_src: ::Nl::DataTypes::Binary.new(length: 6), eth_dst: ::Nl::DataTypes::Binary.new(length: 6)}.freeze #: Hash[::Symbol, ::Nl::_DataType]
|
|
169
|
+
Ractor.make_shareable(MEMBERS) if defined?(Ractor)
|
|
170
|
+
# @private
|
|
171
|
+
# @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
|
|
172
|
+
def self.from_params(params, context: nil)
|
|
173
|
+
unknown = params.keys - members
|
|
174
|
+
raise ArgumentError, "unknown struct members: #{unknown.join(', ')}" unless unknown.empty?
|
|
175
|
+
self.new(
|
|
176
|
+
MEMBERS[:"eth_src"].coerce(params[:"eth_src"], context:),
|
|
177
|
+
MEMBERS[:"eth_dst"].coerce(params[:"eth_dst"], context:),
|
|
178
|
+
)
|
|
179
|
+
end
|
|
144
180
|
# Decodes the struct.
|
|
145
181
|
# @rbs decoder: ::Nl::Decoder
|
|
146
182
|
# @rbs return: instance
|
|
147
183
|
# @param [Nl::Decoder] decoder
|
|
148
184
|
# @return [self]
|
|
149
185
|
def self.decode(decoder)
|
|
150
|
-
|
|
186
|
+
value_0 = MEMBERS[:"eth_src"].decode(decoder)
|
|
187
|
+
value_1 = MEMBERS[:"eth_dst"].decode(decoder)
|
|
188
|
+
self.new(value_0, value_1)
|
|
151
189
|
end
|
|
152
190
|
# Encodes the struct.
|
|
153
191
|
# @rbs encoder: ::Nl::Encoder
|
|
@@ -155,7 +193,8 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
155
193
|
# @param [Nl::Encoder] encoder
|
|
156
194
|
# @return [void]
|
|
157
195
|
def encode(encoder)
|
|
158
|
-
MEMBERS.
|
|
196
|
+
MEMBERS[:"eth_src"].encode(encoder, public_send(:"eth_src"))
|
|
197
|
+
MEMBERS[:"eth_dst"].encode(encoder, public_send(:"eth_dst"))
|
|
159
198
|
end
|
|
160
199
|
end
|
|
161
200
|
OvsKeyMpls = Struct.new(
|
|
@@ -165,14 +204,25 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
165
204
|
# @!attribute [rw] mpls_lse
|
|
166
205
|
# @return [Integer]
|
|
167
206
|
# @private
|
|
168
|
-
MEMBERS =
|
|
207
|
+
MEMBERS = {mpls_lse: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U32].new}.freeze #: Hash[::Symbol, ::Nl::_DataType]
|
|
208
|
+
Ractor.make_shareable(MEMBERS) if defined?(Ractor)
|
|
209
|
+
# @private
|
|
210
|
+
# @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
|
|
211
|
+
def self.from_params(params, context: nil)
|
|
212
|
+
unknown = params.keys - members
|
|
213
|
+
raise ArgumentError, "unknown struct members: #{unknown.join(', ')}" unless unknown.empty?
|
|
214
|
+
self.new(
|
|
215
|
+
MEMBERS[:"mpls_lse"].coerce(params.fetch(:"mpls_lse", 0), context:),
|
|
216
|
+
)
|
|
217
|
+
end
|
|
169
218
|
# Decodes the struct.
|
|
170
219
|
# @rbs decoder: ::Nl::Decoder
|
|
171
220
|
# @rbs return: instance
|
|
172
221
|
# @param [Nl::Decoder] decoder
|
|
173
222
|
# @return [self]
|
|
174
223
|
def self.decode(decoder)
|
|
175
|
-
|
|
224
|
+
value_0 = decoder.get_U32
|
|
225
|
+
self.new(value_0)
|
|
176
226
|
end
|
|
177
227
|
# Encodes the struct.
|
|
178
228
|
# @rbs encoder: ::Nl::Encoder
|
|
@@ -180,7 +230,7 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
180
230
|
# @param [Nl::Encoder] encoder
|
|
181
231
|
# @return [void]
|
|
182
232
|
def encode(encoder)
|
|
183
|
-
MEMBERS.
|
|
233
|
+
MEMBERS[:"mpls_lse"].encode(encoder, public_send(:"mpls_lse"))
|
|
184
234
|
end
|
|
185
235
|
end
|
|
186
236
|
OvsKeyIpv4 = Struct.new(
|
|
@@ -205,14 +255,36 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
205
255
|
# @!attribute [rw] ipv4_frag
|
|
206
256
|
# @return [Integer]
|
|
207
257
|
# @private
|
|
208
|
-
MEMBERS =
|
|
258
|
+
MEMBERS = {ipv4_src: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U32].new, ipv4_dst: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U32].new, ipv4_proto: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, ipv4_tos: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, ipv4_ttl: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, ipv4_frag: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new}.freeze #: Hash[::Symbol, ::Nl::_DataType]
|
|
259
|
+
Ractor.make_shareable(MEMBERS) if defined?(Ractor)
|
|
260
|
+
# @private
|
|
261
|
+
# @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
|
|
262
|
+
def self.from_params(params, context: nil)
|
|
263
|
+
unknown = params.keys - members
|
|
264
|
+
raise ArgumentError, "unknown struct members: #{unknown.join(', ')}" unless unknown.empty?
|
|
265
|
+
self.new(
|
|
266
|
+
MEMBERS[:"ipv4_src"].coerce(params.fetch(:"ipv4_src", 0), context:),
|
|
267
|
+
MEMBERS[:"ipv4_dst"].coerce(params.fetch(:"ipv4_dst", 0), context:),
|
|
268
|
+
MEMBERS[:"ipv4_proto"].coerce(params.fetch(:"ipv4_proto", 0), context:),
|
|
269
|
+
MEMBERS[:"ipv4_tos"].coerce(params.fetch(:"ipv4_tos", 0), context:),
|
|
270
|
+
MEMBERS[:"ipv4_ttl"].coerce(params.fetch(:"ipv4_ttl", 0), context:),
|
|
271
|
+
MEMBERS[:"ipv4_frag"].coerce(params.fetch(:"ipv4_frag", 0), context:),
|
|
272
|
+
)
|
|
273
|
+
end
|
|
209
274
|
# Decodes the struct.
|
|
210
275
|
# @rbs decoder: ::Nl::Decoder
|
|
211
276
|
# @rbs return: instance
|
|
212
277
|
# @param [Nl::Decoder] decoder
|
|
213
278
|
# @return [self]
|
|
214
279
|
def self.decode(decoder)
|
|
215
|
-
|
|
280
|
+
value_0 = decoder.get_U32
|
|
281
|
+
value_1 = decoder.get_U32
|
|
282
|
+
word = decoder.get_u32
|
|
283
|
+
value_2 = ((word >> 0) & 0xff)
|
|
284
|
+
value_3 = ((word >> 8) & 0xff)
|
|
285
|
+
value_4 = ((word >> 16) & 0xff)
|
|
286
|
+
value_5 = ((word >> 24) & 0xff)
|
|
287
|
+
self.new(value_0, value_1, value_2, value_3, value_4, value_5)
|
|
216
288
|
end
|
|
217
289
|
# Encodes the struct.
|
|
218
290
|
# @rbs encoder: ::Nl::Encoder
|
|
@@ -220,7 +292,12 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
220
292
|
# @param [Nl::Encoder] encoder
|
|
221
293
|
# @return [void]
|
|
222
294
|
def encode(encoder)
|
|
223
|
-
MEMBERS.
|
|
295
|
+
MEMBERS[:"ipv4_src"].encode(encoder, public_send(:"ipv4_src"))
|
|
296
|
+
MEMBERS[:"ipv4_dst"].encode(encoder, public_send(:"ipv4_dst"))
|
|
297
|
+
MEMBERS[:"ipv4_proto"].encode(encoder, public_send(:"ipv4_proto"))
|
|
298
|
+
MEMBERS[:"ipv4_tos"].encode(encoder, public_send(:"ipv4_tos"))
|
|
299
|
+
MEMBERS[:"ipv4_ttl"].encode(encoder, public_send(:"ipv4_ttl"))
|
|
300
|
+
MEMBERS[:"ipv4_frag"].encode(encoder, public_send(:"ipv4_frag"))
|
|
224
301
|
end
|
|
225
302
|
end
|
|
226
303
|
OvsKeyIpv6 = Struct.new(
|
|
@@ -248,14 +325,38 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
248
325
|
# @!attribute [rw] ipv6_frag
|
|
249
326
|
# @return [Integer]
|
|
250
327
|
# @private
|
|
251
|
-
MEMBERS =
|
|
328
|
+
MEMBERS = {ipv6_src: ::Nl::DataTypes::Binary.new(length: 16), ipv6_dst: ::Nl::DataTypes::Binary.new(length: 16), ipv6_label: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U32].new, ipv6_proto: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, ipv6_tclass: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, ipv6_hlimit: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, ipv6_frag: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new}.freeze #: Hash[::Symbol, ::Nl::_DataType]
|
|
329
|
+
Ractor.make_shareable(MEMBERS) if defined?(Ractor)
|
|
330
|
+
# @private
|
|
331
|
+
# @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
|
|
332
|
+
def self.from_params(params, context: nil)
|
|
333
|
+
unknown = params.keys - members
|
|
334
|
+
raise ArgumentError, "unknown struct members: #{unknown.join(', ')}" unless unknown.empty?
|
|
335
|
+
self.new(
|
|
336
|
+
MEMBERS[:"ipv6_src"].coerce(params[:"ipv6_src"], context:),
|
|
337
|
+
MEMBERS[:"ipv6_dst"].coerce(params[:"ipv6_dst"], context:),
|
|
338
|
+
MEMBERS[:"ipv6_label"].coerce(params.fetch(:"ipv6_label", 0), context:),
|
|
339
|
+
MEMBERS[:"ipv6_proto"].coerce(params.fetch(:"ipv6_proto", 0), context:),
|
|
340
|
+
MEMBERS[:"ipv6_tclass"].coerce(params.fetch(:"ipv6_tclass", 0), context:),
|
|
341
|
+
MEMBERS[:"ipv6_hlimit"].coerce(params.fetch(:"ipv6_hlimit", 0), context:),
|
|
342
|
+
MEMBERS[:"ipv6_frag"].coerce(params.fetch(:"ipv6_frag", 0), context:),
|
|
343
|
+
)
|
|
344
|
+
end
|
|
252
345
|
# Decodes the struct.
|
|
253
346
|
# @rbs decoder: ::Nl::Decoder
|
|
254
347
|
# @rbs return: instance
|
|
255
348
|
# @param [Nl::Decoder] decoder
|
|
256
349
|
# @return [self]
|
|
257
350
|
def self.decode(decoder)
|
|
258
|
-
|
|
351
|
+
value_0 = MEMBERS[:"ipv6_src"].decode(decoder)
|
|
352
|
+
value_1 = MEMBERS[:"ipv6_dst"].decode(decoder)
|
|
353
|
+
value_2 = decoder.get_U32
|
|
354
|
+
word = decoder.get_u32
|
|
355
|
+
value_3 = ((word >> 0) & 0xff)
|
|
356
|
+
value_4 = ((word >> 8) & 0xff)
|
|
357
|
+
value_5 = ((word >> 16) & 0xff)
|
|
358
|
+
value_6 = ((word >> 24) & 0xff)
|
|
359
|
+
self.new(value_0, value_1, value_2, value_3, value_4, value_5, value_6)
|
|
259
360
|
end
|
|
260
361
|
# Encodes the struct.
|
|
261
362
|
# @rbs encoder: ::Nl::Encoder
|
|
@@ -263,7 +364,13 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
263
364
|
# @param [Nl::Encoder] encoder
|
|
264
365
|
# @return [void]
|
|
265
366
|
def encode(encoder)
|
|
266
|
-
MEMBERS.
|
|
367
|
+
MEMBERS[:"ipv6_src"].encode(encoder, public_send(:"ipv6_src"))
|
|
368
|
+
MEMBERS[:"ipv6_dst"].encode(encoder, public_send(:"ipv6_dst"))
|
|
369
|
+
MEMBERS[:"ipv6_label"].encode(encoder, public_send(:"ipv6_label"))
|
|
370
|
+
MEMBERS[:"ipv6_proto"].encode(encoder, public_send(:"ipv6_proto"))
|
|
371
|
+
MEMBERS[:"ipv6_tclass"].encode(encoder, public_send(:"ipv6_tclass"))
|
|
372
|
+
MEMBERS[:"ipv6_hlimit"].encode(encoder, public_send(:"ipv6_hlimit"))
|
|
373
|
+
MEMBERS[:"ipv6_frag"].encode(encoder, public_send(:"ipv6_frag"))
|
|
267
374
|
end
|
|
268
375
|
end
|
|
269
376
|
OvsKeyIpv6Exthdrs = Struct.new(
|
|
@@ -273,14 +380,25 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
273
380
|
# @!attribute [rw] hdrs
|
|
274
381
|
# @return [Integer]
|
|
275
382
|
# @private
|
|
276
|
-
MEMBERS =
|
|
383
|
+
MEMBERS = {hdrs: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U16].new}.freeze #: Hash[::Symbol, ::Nl::_DataType]
|
|
384
|
+
Ractor.make_shareable(MEMBERS) if defined?(Ractor)
|
|
385
|
+
# @private
|
|
386
|
+
# @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
|
|
387
|
+
def self.from_params(params, context: nil)
|
|
388
|
+
unknown = params.keys - members
|
|
389
|
+
raise ArgumentError, "unknown struct members: #{unknown.join(', ')}" unless unknown.empty?
|
|
390
|
+
self.new(
|
|
391
|
+
MEMBERS[:"hdrs"].coerce(params.fetch(:"hdrs", 0), context:),
|
|
392
|
+
)
|
|
393
|
+
end
|
|
277
394
|
# Decodes the struct.
|
|
278
395
|
# @rbs decoder: ::Nl::Decoder
|
|
279
396
|
# @rbs return: instance
|
|
280
397
|
# @param [Nl::Decoder] decoder
|
|
281
398
|
# @return [self]
|
|
282
399
|
def self.decode(decoder)
|
|
283
|
-
|
|
400
|
+
value_0 = decoder.get_host_u16
|
|
401
|
+
self.new(value_0)
|
|
284
402
|
end
|
|
285
403
|
# Encodes the struct.
|
|
286
404
|
# @rbs encoder: ::Nl::Encoder
|
|
@@ -288,7 +406,7 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
288
406
|
# @param [Nl::Encoder] encoder
|
|
289
407
|
# @return [void]
|
|
290
408
|
def encode(encoder)
|
|
291
|
-
MEMBERS.
|
|
409
|
+
MEMBERS[:"hdrs"].encode(encoder, public_send(:"hdrs"))
|
|
292
410
|
end
|
|
293
411
|
end
|
|
294
412
|
OvsKeyTcp = Struct.new(
|
|
@@ -301,14 +419,28 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
301
419
|
# @!attribute [rw] tcp_dst
|
|
302
420
|
# @return [Integer]
|
|
303
421
|
# @private
|
|
304
|
-
MEMBERS =
|
|
422
|
+
MEMBERS = {tcp_src: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new, tcp_dst: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new}.freeze #: Hash[::Symbol, ::Nl::_DataType]
|
|
423
|
+
Ractor.make_shareable(MEMBERS) if defined?(Ractor)
|
|
424
|
+
# @private
|
|
425
|
+
# @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
|
|
426
|
+
def self.from_params(params, context: nil)
|
|
427
|
+
unknown = params.keys - members
|
|
428
|
+
raise ArgumentError, "unknown struct members: #{unknown.join(', ')}" unless unknown.empty?
|
|
429
|
+
self.new(
|
|
430
|
+
MEMBERS[:"tcp_src"].coerce(params.fetch(:"tcp_src", 0), context:),
|
|
431
|
+
MEMBERS[:"tcp_dst"].coerce(params.fetch(:"tcp_dst", 0), context:),
|
|
432
|
+
)
|
|
433
|
+
end
|
|
305
434
|
# Decodes the struct.
|
|
306
435
|
# @rbs decoder: ::Nl::Decoder
|
|
307
436
|
# @rbs return: instance
|
|
308
437
|
# @param [Nl::Decoder] decoder
|
|
309
438
|
# @return [self]
|
|
310
439
|
def self.decode(decoder)
|
|
311
|
-
|
|
440
|
+
word = decoder.get_u32
|
|
441
|
+
value_0 = ((((word >> 0) & 0xff) << 8) | ((word >> 8) & 0xff))
|
|
442
|
+
value_1 = ((((word >> 16) & 0xff) << 8) | ((word >> 24) & 0xff))
|
|
443
|
+
self.new(value_0, value_1)
|
|
312
444
|
end
|
|
313
445
|
# Encodes the struct.
|
|
314
446
|
# @rbs encoder: ::Nl::Encoder
|
|
@@ -316,7 +448,8 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
316
448
|
# @param [Nl::Encoder] encoder
|
|
317
449
|
# @return [void]
|
|
318
450
|
def encode(encoder)
|
|
319
|
-
MEMBERS.
|
|
451
|
+
MEMBERS[:"tcp_src"].encode(encoder, public_send(:"tcp_src"))
|
|
452
|
+
MEMBERS[:"tcp_dst"].encode(encoder, public_send(:"tcp_dst"))
|
|
320
453
|
end
|
|
321
454
|
end
|
|
322
455
|
OvsKeyUdp = Struct.new(
|
|
@@ -329,14 +462,28 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
329
462
|
# @!attribute [rw] udp_dst
|
|
330
463
|
# @return [Integer]
|
|
331
464
|
# @private
|
|
332
|
-
MEMBERS =
|
|
465
|
+
MEMBERS = {udp_src: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new, udp_dst: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new}.freeze #: Hash[::Symbol, ::Nl::_DataType]
|
|
466
|
+
Ractor.make_shareable(MEMBERS) if defined?(Ractor)
|
|
467
|
+
# @private
|
|
468
|
+
# @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
|
|
469
|
+
def self.from_params(params, context: nil)
|
|
470
|
+
unknown = params.keys - members
|
|
471
|
+
raise ArgumentError, "unknown struct members: #{unknown.join(', ')}" unless unknown.empty?
|
|
472
|
+
self.new(
|
|
473
|
+
MEMBERS[:"udp_src"].coerce(params.fetch(:"udp_src", 0), context:),
|
|
474
|
+
MEMBERS[:"udp_dst"].coerce(params.fetch(:"udp_dst", 0), context:),
|
|
475
|
+
)
|
|
476
|
+
end
|
|
333
477
|
# Decodes the struct.
|
|
334
478
|
# @rbs decoder: ::Nl::Decoder
|
|
335
479
|
# @rbs return: instance
|
|
336
480
|
# @param [Nl::Decoder] decoder
|
|
337
481
|
# @return [self]
|
|
338
482
|
def self.decode(decoder)
|
|
339
|
-
|
|
483
|
+
word = decoder.get_u32
|
|
484
|
+
value_0 = ((((word >> 0) & 0xff) << 8) | ((word >> 8) & 0xff))
|
|
485
|
+
value_1 = ((((word >> 16) & 0xff) << 8) | ((word >> 24) & 0xff))
|
|
486
|
+
self.new(value_0, value_1)
|
|
340
487
|
end
|
|
341
488
|
# Encodes the struct.
|
|
342
489
|
# @rbs encoder: ::Nl::Encoder
|
|
@@ -344,7 +491,8 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
344
491
|
# @param [Nl::Encoder] encoder
|
|
345
492
|
# @return [void]
|
|
346
493
|
def encode(encoder)
|
|
347
|
-
MEMBERS.
|
|
494
|
+
MEMBERS[:"udp_src"].encode(encoder, public_send(:"udp_src"))
|
|
495
|
+
MEMBERS[:"udp_dst"].encode(encoder, public_send(:"udp_dst"))
|
|
348
496
|
end
|
|
349
497
|
end
|
|
350
498
|
OvsKeySctp = Struct.new(
|
|
@@ -357,14 +505,28 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
357
505
|
# @!attribute [rw] sctp_dst
|
|
358
506
|
# @return [Integer]
|
|
359
507
|
# @private
|
|
360
|
-
MEMBERS =
|
|
508
|
+
MEMBERS = {sctp_src: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new, sctp_dst: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new}.freeze #: Hash[::Symbol, ::Nl::_DataType]
|
|
509
|
+
Ractor.make_shareable(MEMBERS) if defined?(Ractor)
|
|
510
|
+
# @private
|
|
511
|
+
# @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
|
|
512
|
+
def self.from_params(params, context: nil)
|
|
513
|
+
unknown = params.keys - members
|
|
514
|
+
raise ArgumentError, "unknown struct members: #{unknown.join(', ')}" unless unknown.empty?
|
|
515
|
+
self.new(
|
|
516
|
+
MEMBERS[:"sctp_src"].coerce(params.fetch(:"sctp_src", 0), context:),
|
|
517
|
+
MEMBERS[:"sctp_dst"].coerce(params.fetch(:"sctp_dst", 0), context:),
|
|
518
|
+
)
|
|
519
|
+
end
|
|
361
520
|
# Decodes the struct.
|
|
362
521
|
# @rbs decoder: ::Nl::Decoder
|
|
363
522
|
# @rbs return: instance
|
|
364
523
|
# @param [Nl::Decoder] decoder
|
|
365
524
|
# @return [self]
|
|
366
525
|
def self.decode(decoder)
|
|
367
|
-
|
|
526
|
+
word = decoder.get_u32
|
|
527
|
+
value_0 = ((((word >> 0) & 0xff) << 8) | ((word >> 8) & 0xff))
|
|
528
|
+
value_1 = ((((word >> 16) & 0xff) << 8) | ((word >> 24) & 0xff))
|
|
529
|
+
self.new(value_0, value_1)
|
|
368
530
|
end
|
|
369
531
|
# Encodes the struct.
|
|
370
532
|
# @rbs encoder: ::Nl::Encoder
|
|
@@ -372,7 +534,8 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
372
534
|
# @param [Nl::Encoder] encoder
|
|
373
535
|
# @return [void]
|
|
374
536
|
def encode(encoder)
|
|
375
|
-
MEMBERS.
|
|
537
|
+
MEMBERS[:"sctp_src"].encode(encoder, public_send(:"sctp_src"))
|
|
538
|
+
MEMBERS[:"sctp_dst"].encode(encoder, public_send(:"sctp_dst"))
|
|
376
539
|
end
|
|
377
540
|
end
|
|
378
541
|
OvsKeyIcmp = Struct.new(
|
|
@@ -385,14 +548,28 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
385
548
|
# @!attribute [rw] icmp_code
|
|
386
549
|
# @return [Integer]
|
|
387
550
|
# @private
|
|
388
|
-
MEMBERS =
|
|
551
|
+
MEMBERS = {icmp_type: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, icmp_code: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new}.freeze #: Hash[::Symbol, ::Nl::_DataType]
|
|
552
|
+
Ractor.make_shareable(MEMBERS) if defined?(Ractor)
|
|
553
|
+
# @private
|
|
554
|
+
# @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
|
|
555
|
+
def self.from_params(params, context: nil)
|
|
556
|
+
unknown = params.keys - members
|
|
557
|
+
raise ArgumentError, "unknown struct members: #{unknown.join(', ')}" unless unknown.empty?
|
|
558
|
+
self.new(
|
|
559
|
+
MEMBERS[:"icmp_type"].coerce(params.fetch(:"icmp_type", 0), context:),
|
|
560
|
+
MEMBERS[:"icmp_code"].coerce(params.fetch(:"icmp_code", 0), context:),
|
|
561
|
+
)
|
|
562
|
+
end
|
|
389
563
|
# Decodes the struct.
|
|
390
564
|
# @rbs decoder: ::Nl::Decoder
|
|
391
565
|
# @rbs return: instance
|
|
392
566
|
# @param [Nl::Decoder] decoder
|
|
393
567
|
# @return [self]
|
|
394
568
|
def self.decode(decoder)
|
|
395
|
-
|
|
569
|
+
word = decoder.get_u16
|
|
570
|
+
value_0 = ((word >> 0) & 0xff)
|
|
571
|
+
value_1 = ((word >> 8) & 0xff)
|
|
572
|
+
self.new(value_0, value_1)
|
|
396
573
|
end
|
|
397
574
|
# Encodes the struct.
|
|
398
575
|
# @rbs encoder: ::Nl::Encoder
|
|
@@ -400,7 +577,8 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
400
577
|
# @param [Nl::Encoder] encoder
|
|
401
578
|
# @return [void]
|
|
402
579
|
def encode(encoder)
|
|
403
|
-
MEMBERS.
|
|
580
|
+
MEMBERS[:"icmp_type"].encode(encoder, public_send(:"icmp_type"))
|
|
581
|
+
MEMBERS[:"icmp_code"].encode(encoder, public_send(:"icmp_code"))
|
|
404
582
|
end
|
|
405
583
|
end
|
|
406
584
|
OvsKeyArp = Struct.new(
|
|
@@ -422,14 +600,33 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
422
600
|
# @!attribute [rw] arp_tha
|
|
423
601
|
# @return [String]
|
|
424
602
|
# @private
|
|
425
|
-
MEMBERS =
|
|
603
|
+
MEMBERS = {arp_sip: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U32].new, arp_tip: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U32].new, arp_op: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new, arp_sha: ::Nl::DataTypes::Binary.new(length: 6), arp_tha: ::Nl::DataTypes::Binary.new(length: 6)}.freeze #: Hash[::Symbol, ::Nl::_DataType]
|
|
604
|
+
Ractor.make_shareable(MEMBERS) if defined?(Ractor)
|
|
605
|
+
# @private
|
|
606
|
+
# @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
|
|
607
|
+
def self.from_params(params, context: nil)
|
|
608
|
+
unknown = params.keys - members
|
|
609
|
+
raise ArgumentError, "unknown struct members: #{unknown.join(', ')}" unless unknown.empty?
|
|
610
|
+
self.new(
|
|
611
|
+
MEMBERS[:"arp_sip"].coerce(params.fetch(:"arp_sip", 0), context:),
|
|
612
|
+
MEMBERS[:"arp_tip"].coerce(params.fetch(:"arp_tip", 0), context:),
|
|
613
|
+
MEMBERS[:"arp_op"].coerce(params.fetch(:"arp_op", 0), context:),
|
|
614
|
+
MEMBERS[:"arp_sha"].coerce(params[:"arp_sha"], context:),
|
|
615
|
+
MEMBERS[:"arp_tha"].coerce(params[:"arp_tha"], context:),
|
|
616
|
+
)
|
|
617
|
+
end
|
|
426
618
|
# Decodes the struct.
|
|
427
619
|
# @rbs decoder: ::Nl::Decoder
|
|
428
620
|
# @rbs return: instance
|
|
429
621
|
# @param [Nl::Decoder] decoder
|
|
430
622
|
# @return [self]
|
|
431
623
|
def self.decode(decoder)
|
|
432
|
-
|
|
624
|
+
value_0 = decoder.get_U32
|
|
625
|
+
value_1 = decoder.get_U32
|
|
626
|
+
value_2 = decoder.get_U16
|
|
627
|
+
value_3 = MEMBERS[:"arp_sha"].decode(decoder)
|
|
628
|
+
value_4 = MEMBERS[:"arp_tha"].decode(decoder)
|
|
629
|
+
self.new(value_0, value_1, value_2, value_3, value_4)
|
|
433
630
|
end
|
|
434
631
|
# Encodes the struct.
|
|
435
632
|
# @rbs encoder: ::Nl::Encoder
|
|
@@ -437,7 +634,11 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
437
634
|
# @param [Nl::Encoder] encoder
|
|
438
635
|
# @return [void]
|
|
439
636
|
def encode(encoder)
|
|
440
|
-
MEMBERS.
|
|
637
|
+
MEMBERS[:"arp_sip"].encode(encoder, public_send(:"arp_sip"))
|
|
638
|
+
MEMBERS[:"arp_tip"].encode(encoder, public_send(:"arp_tip"))
|
|
639
|
+
MEMBERS[:"arp_op"].encode(encoder, public_send(:"arp_op"))
|
|
640
|
+
MEMBERS[:"arp_sha"].encode(encoder, public_send(:"arp_sha"))
|
|
641
|
+
MEMBERS[:"arp_tha"].encode(encoder, public_send(:"arp_tha"))
|
|
441
642
|
end
|
|
442
643
|
end
|
|
443
644
|
OvsKeyNd = Struct.new(
|
|
@@ -453,14 +654,29 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
453
654
|
# @!attribute [rw] nd_tll
|
|
454
655
|
# @return [String]
|
|
455
656
|
# @private
|
|
456
|
-
MEMBERS =
|
|
657
|
+
MEMBERS = {nd_target: ::Nl::DataTypes::Binary.new(length: 16), nd_sll: ::Nl::DataTypes::Binary.new(length: 6), nd_tll: ::Nl::DataTypes::Binary.new(length: 6)}.freeze #: Hash[::Symbol, ::Nl::_DataType]
|
|
658
|
+
Ractor.make_shareable(MEMBERS) if defined?(Ractor)
|
|
659
|
+
# @private
|
|
660
|
+
# @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
|
|
661
|
+
def self.from_params(params, context: nil)
|
|
662
|
+
unknown = params.keys - members
|
|
663
|
+
raise ArgumentError, "unknown struct members: #{unknown.join(', ')}" unless unknown.empty?
|
|
664
|
+
self.new(
|
|
665
|
+
MEMBERS[:"nd_target"].coerce(params[:"nd_target"], context:),
|
|
666
|
+
MEMBERS[:"nd_sll"].coerce(params[:"nd_sll"], context:),
|
|
667
|
+
MEMBERS[:"nd_tll"].coerce(params[:"nd_tll"], context:),
|
|
668
|
+
)
|
|
669
|
+
end
|
|
457
670
|
# Decodes the struct.
|
|
458
671
|
# @rbs decoder: ::Nl::Decoder
|
|
459
672
|
# @rbs return: instance
|
|
460
673
|
# @param [Nl::Decoder] decoder
|
|
461
674
|
# @return [self]
|
|
462
675
|
def self.decode(decoder)
|
|
463
|
-
|
|
676
|
+
value_0 = MEMBERS[:"nd_target"].decode(decoder)
|
|
677
|
+
value_1 = MEMBERS[:"nd_sll"].decode(decoder)
|
|
678
|
+
value_2 = MEMBERS[:"nd_tll"].decode(decoder)
|
|
679
|
+
self.new(value_0, value_1, value_2)
|
|
464
680
|
end
|
|
465
681
|
# Encodes the struct.
|
|
466
682
|
# @rbs encoder: ::Nl::Encoder
|
|
@@ -468,7 +684,9 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
468
684
|
# @param [Nl::Encoder] encoder
|
|
469
685
|
# @return [void]
|
|
470
686
|
def encode(encoder)
|
|
471
|
-
MEMBERS.
|
|
687
|
+
MEMBERS[:"nd_target"].encode(encoder, public_send(:"nd_target"))
|
|
688
|
+
MEMBERS[:"nd_sll"].encode(encoder, public_send(:"nd_sll"))
|
|
689
|
+
MEMBERS[:"nd_tll"].encode(encoder, public_send(:"nd_tll"))
|
|
472
690
|
end
|
|
473
691
|
end
|
|
474
692
|
OvsKeyCtTupleIpv4 = Struct.new(
|
|
@@ -490,14 +708,34 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
490
708
|
# @!attribute [rw] ipv4_proto
|
|
491
709
|
# @return [Integer]
|
|
492
710
|
# @private
|
|
493
|
-
MEMBERS =
|
|
711
|
+
MEMBERS = {ipv4_src: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U32].new, ipv4_dst: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U32].new, src_port: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new, dst_port: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new, ipv4_proto: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new}.freeze #: Hash[::Symbol, ::Nl::_DataType]
|
|
712
|
+
Ractor.make_shareable(MEMBERS) if defined?(Ractor)
|
|
713
|
+
# @private
|
|
714
|
+
# @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
|
|
715
|
+
def self.from_params(params, context: nil)
|
|
716
|
+
unknown = params.keys - members
|
|
717
|
+
raise ArgumentError, "unknown struct members: #{unknown.join(', ')}" unless unknown.empty?
|
|
718
|
+
self.new(
|
|
719
|
+
MEMBERS[:"ipv4_src"].coerce(params.fetch(:"ipv4_src", 0), context:),
|
|
720
|
+
MEMBERS[:"ipv4_dst"].coerce(params.fetch(:"ipv4_dst", 0), context:),
|
|
721
|
+
MEMBERS[:"src_port"].coerce(params.fetch(:"src_port", 0), context:),
|
|
722
|
+
MEMBERS[:"dst_port"].coerce(params.fetch(:"dst_port", 0), context:),
|
|
723
|
+
MEMBERS[:"ipv4_proto"].coerce(params.fetch(:"ipv4_proto", 0), context:),
|
|
724
|
+
)
|
|
725
|
+
end
|
|
494
726
|
# Decodes the struct.
|
|
495
727
|
# @rbs decoder: ::Nl::Decoder
|
|
496
728
|
# @rbs return: instance
|
|
497
729
|
# @param [Nl::Decoder] decoder
|
|
498
730
|
# @return [self]
|
|
499
731
|
def self.decode(decoder)
|
|
500
|
-
|
|
732
|
+
value_0 = decoder.get_U32
|
|
733
|
+
value_1 = decoder.get_U32
|
|
734
|
+
word = decoder.get_u32
|
|
735
|
+
value_2 = ((((word >> 0) & 0xff) << 8) | ((word >> 8) & 0xff))
|
|
736
|
+
value_3 = ((((word >> 16) & 0xff) << 8) | ((word >> 24) & 0xff))
|
|
737
|
+
value_4 = decoder.get_host_u8
|
|
738
|
+
self.new(value_0, value_1, value_2, value_3, value_4)
|
|
501
739
|
end
|
|
502
740
|
# Encodes the struct.
|
|
503
741
|
# @rbs encoder: ::Nl::Encoder
|
|
@@ -505,7 +743,11 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
505
743
|
# @param [Nl::Encoder] encoder
|
|
506
744
|
# @return [void]
|
|
507
745
|
def encode(encoder)
|
|
508
|
-
MEMBERS.
|
|
746
|
+
MEMBERS[:"ipv4_src"].encode(encoder, public_send(:"ipv4_src"))
|
|
747
|
+
MEMBERS[:"ipv4_dst"].encode(encoder, public_send(:"ipv4_dst"))
|
|
748
|
+
MEMBERS[:"src_port"].encode(encoder, public_send(:"src_port"))
|
|
749
|
+
MEMBERS[:"dst_port"].encode(encoder, public_send(:"dst_port"))
|
|
750
|
+
MEMBERS[:"ipv4_proto"].encode(encoder, public_send(:"ipv4_proto"))
|
|
509
751
|
end
|
|
510
752
|
end
|
|
511
753
|
OvsActionPushVlan = Struct.new(
|
|
@@ -520,14 +762,28 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
520
762
|
# Tag control identifier (TCI) to push.
|
|
521
763
|
# @return [Integer]
|
|
522
764
|
# @private
|
|
523
|
-
MEMBERS =
|
|
765
|
+
MEMBERS = {vlan_tpid: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new, vlan_tci: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new}.freeze #: Hash[::Symbol, ::Nl::_DataType]
|
|
766
|
+
Ractor.make_shareable(MEMBERS) if defined?(Ractor)
|
|
767
|
+
# @private
|
|
768
|
+
# @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
|
|
769
|
+
def self.from_params(params, context: nil)
|
|
770
|
+
unknown = params.keys - members
|
|
771
|
+
raise ArgumentError, "unknown struct members: #{unknown.join(', ')}" unless unknown.empty?
|
|
772
|
+
self.new(
|
|
773
|
+
MEMBERS[:"vlan_tpid"].coerce(params.fetch(:"vlan_tpid", 0), context:),
|
|
774
|
+
MEMBERS[:"vlan_tci"].coerce(params.fetch(:"vlan_tci", 0), context:),
|
|
775
|
+
)
|
|
776
|
+
end
|
|
524
777
|
# Decodes the struct.
|
|
525
778
|
# @rbs decoder: ::Nl::Decoder
|
|
526
779
|
# @rbs return: instance
|
|
527
780
|
# @param [Nl::Decoder] decoder
|
|
528
781
|
# @return [self]
|
|
529
782
|
def self.decode(decoder)
|
|
530
|
-
|
|
783
|
+
word = decoder.get_u32
|
|
784
|
+
value_0 = ((((word >> 0) & 0xff) << 8) | ((word >> 8) & 0xff))
|
|
785
|
+
value_1 = ((((word >> 16) & 0xff) << 8) | ((word >> 24) & 0xff))
|
|
786
|
+
self.new(value_0, value_1)
|
|
531
787
|
end
|
|
532
788
|
# Encodes the struct.
|
|
533
789
|
# @rbs encoder: ::Nl::Encoder
|
|
@@ -535,7 +791,8 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
535
791
|
# @param [Nl::Encoder] encoder
|
|
536
792
|
# @return [void]
|
|
537
793
|
def encode(encoder)
|
|
538
|
-
MEMBERS.
|
|
794
|
+
MEMBERS[:"vlan_tpid"].encode(encoder, public_send(:"vlan_tpid"))
|
|
795
|
+
MEMBERS[:"vlan_tci"].encode(encoder, public_send(:"vlan_tci"))
|
|
539
796
|
end
|
|
540
797
|
end
|
|
541
798
|
OvsActionHash = Struct.new(
|
|
@@ -550,14 +807,27 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
550
807
|
# Basis used for computing hash.
|
|
551
808
|
# @return [Integer]
|
|
552
809
|
# @private
|
|
553
|
-
MEMBERS =
|
|
810
|
+
MEMBERS = {hash_alg: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, hash_basis: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new}.freeze #: Hash[::Symbol, ::Nl::_DataType]
|
|
811
|
+
Ractor.make_shareable(MEMBERS) if defined?(Ractor)
|
|
812
|
+
# @private
|
|
813
|
+
# @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
|
|
814
|
+
def self.from_params(params, context: nil)
|
|
815
|
+
unknown = params.keys - members
|
|
816
|
+
raise ArgumentError, "unknown struct members: #{unknown.join(', ')}" unless unknown.empty?
|
|
817
|
+
self.new(
|
|
818
|
+
MEMBERS[:"hash_alg"].coerce(params.fetch(:"hash_alg", 0), context:),
|
|
819
|
+
MEMBERS[:"hash_basis"].coerce(params.fetch(:"hash_basis", 0), context:),
|
|
820
|
+
)
|
|
821
|
+
end
|
|
554
822
|
# Decodes the struct.
|
|
555
823
|
# @rbs decoder: ::Nl::Decoder
|
|
556
824
|
# @rbs return: instance
|
|
557
825
|
# @param [Nl::Decoder] decoder
|
|
558
826
|
# @return [self]
|
|
559
827
|
def self.decode(decoder)
|
|
560
|
-
|
|
828
|
+
value_0 = decoder.get_host_u32
|
|
829
|
+
value_1 = decoder.get_host_u32
|
|
830
|
+
self.new(value_0, value_1)
|
|
561
831
|
end
|
|
562
832
|
# Encodes the struct.
|
|
563
833
|
# @rbs encoder: ::Nl::Encoder
|
|
@@ -565,7 +835,8 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
565
835
|
# @param [Nl::Encoder] encoder
|
|
566
836
|
# @return [void]
|
|
567
837
|
def encode(encoder)
|
|
568
|
-
MEMBERS.
|
|
838
|
+
MEMBERS[:"hash_alg"].encode(encoder, public_send(:"hash_alg"))
|
|
839
|
+
MEMBERS[:"hash_basis"].encode(encoder, public_send(:"hash_basis"))
|
|
569
840
|
end
|
|
570
841
|
end
|
|
571
842
|
OvsActionPushMpls = Struct.new(
|
|
@@ -582,14 +853,27 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
582
853
|
# indicating MPLS unicast or multicast. Other are rejected.
|
|
583
854
|
# @return [Integer]
|
|
584
855
|
# @private
|
|
585
|
-
MEMBERS =
|
|
856
|
+
MEMBERS = {mpls_lse: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U32].new, mpls_ethertype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U32].new}.freeze #: Hash[::Symbol, ::Nl::_DataType]
|
|
857
|
+
Ractor.make_shareable(MEMBERS) if defined?(Ractor)
|
|
858
|
+
# @private
|
|
859
|
+
# @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
|
|
860
|
+
def self.from_params(params, context: nil)
|
|
861
|
+
unknown = params.keys - members
|
|
862
|
+
raise ArgumentError, "unknown struct members: #{unknown.join(', ')}" unless unknown.empty?
|
|
863
|
+
self.new(
|
|
864
|
+
MEMBERS[:"mpls_lse"].coerce(params.fetch(:"mpls_lse", 0), context:),
|
|
865
|
+
MEMBERS[:"mpls_ethertype"].coerce(params.fetch(:"mpls_ethertype", 0), context:),
|
|
866
|
+
)
|
|
867
|
+
end
|
|
586
868
|
# Decodes the struct.
|
|
587
869
|
# @rbs decoder: ::Nl::Decoder
|
|
588
870
|
# @rbs return: instance
|
|
589
871
|
# @param [Nl::Decoder] decoder
|
|
590
872
|
# @return [self]
|
|
591
873
|
def self.decode(decoder)
|
|
592
|
-
|
|
874
|
+
value_0 = decoder.get_U32
|
|
875
|
+
value_1 = decoder.get_U32
|
|
876
|
+
self.new(value_0, value_1)
|
|
593
877
|
end
|
|
594
878
|
# Encodes the struct.
|
|
595
879
|
# @rbs encoder: ::Nl::Encoder
|
|
@@ -597,7 +881,8 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
597
881
|
# @param [Nl::Encoder] encoder
|
|
598
882
|
# @return [void]
|
|
599
883
|
def encode(encoder)
|
|
600
|
-
MEMBERS.
|
|
884
|
+
MEMBERS[:"mpls_lse"].encode(encoder, public_send(:"mpls_lse"))
|
|
885
|
+
MEMBERS[:"mpls_ethertype"].encode(encoder, public_send(:"mpls_ethertype"))
|
|
601
886
|
end
|
|
602
887
|
end
|
|
603
888
|
OvsActionAddMpls = Struct.new(
|
|
@@ -618,14 +903,29 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
618
903
|
# MPLS tunnel attributes.
|
|
619
904
|
# @return [Integer]
|
|
620
905
|
# @private
|
|
621
|
-
MEMBERS =
|
|
906
|
+
MEMBERS = {mpls_lse: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U32].new, mpls_ethertype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U32].new, tun_flags: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U16].new}.freeze #: Hash[::Symbol, ::Nl::_DataType]
|
|
907
|
+
Ractor.make_shareable(MEMBERS) if defined?(Ractor)
|
|
908
|
+
# @private
|
|
909
|
+
# @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
|
|
910
|
+
def self.from_params(params, context: nil)
|
|
911
|
+
unknown = params.keys - members
|
|
912
|
+
raise ArgumentError, "unknown struct members: #{unknown.join(', ')}" unless unknown.empty?
|
|
913
|
+
self.new(
|
|
914
|
+
MEMBERS[:"mpls_lse"].coerce(params.fetch(:"mpls_lse", 0), context:),
|
|
915
|
+
MEMBERS[:"mpls_ethertype"].coerce(params.fetch(:"mpls_ethertype", 0), context:),
|
|
916
|
+
MEMBERS[:"tun_flags"].coerce(params.fetch(:"tun_flags", 0), context:),
|
|
917
|
+
)
|
|
918
|
+
end
|
|
622
919
|
# Decodes the struct.
|
|
623
920
|
# @rbs decoder: ::Nl::Decoder
|
|
624
921
|
# @rbs return: instance
|
|
625
922
|
# @param [Nl::Decoder] decoder
|
|
626
923
|
# @return [self]
|
|
627
924
|
def self.decode(decoder)
|
|
628
|
-
|
|
925
|
+
value_0 = decoder.get_U32
|
|
926
|
+
value_1 = decoder.get_U32
|
|
927
|
+
value_2 = decoder.get_host_u16
|
|
928
|
+
self.new(value_0, value_1, value_2)
|
|
629
929
|
end
|
|
630
930
|
# Encodes the struct.
|
|
631
931
|
# @rbs encoder: ::Nl::Encoder
|
|
@@ -633,144 +933,932 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
633
933
|
# @param [Nl::Encoder] encoder
|
|
634
934
|
# @return [void]
|
|
635
935
|
def encode(encoder)
|
|
636
|
-
MEMBERS.
|
|
936
|
+
MEMBERS[:"mpls_lse"].encode(encoder, public_send(:"mpls_lse"))
|
|
937
|
+
MEMBERS[:"mpls_ethertype"].encode(encoder, public_send(:"mpls_ethertype"))
|
|
938
|
+
MEMBERS[:"tun_flags"].encode(encoder, public_send(:"tun_flags"))
|
|
637
939
|
end
|
|
638
940
|
end
|
|
639
941
|
end
|
|
640
942
|
module AttributeSets
|
|
641
943
|
class FlowAttrs < ::Nl::AttributeSet
|
|
642
|
-
|
|
643
|
-
|
|
944
|
+
module Definitions
|
|
945
|
+
# Nested attributes specifying the flow key. Always present in
|
|
946
|
+
# notifications. Required for all requests (except dumps).
|
|
947
|
+
# @rbs return: AttributeSets::KeyAttrs
|
|
948
|
+
# @return [AttributeSets::KeyAttrs]
|
|
949
|
+
def key; self[:"key"]; end
|
|
950
|
+
# Nested attributes specifying the actions to take for packets that
|
|
951
|
+
# match the key. Always present in notifications. Required for
|
|
952
|
+
# OVS_FLOW_CMD_NEW requests, optional for OVS_FLOW_CMD_SET requests. An
|
|
953
|
+
# OVS_FLOW_CMD_SET without OVS_FLOW_ATTR_ACTIONS will not modify the
|
|
954
|
+
# actions. To clear the actions, an OVS_FLOW_ATTR_ACTIONS without any
|
|
955
|
+
# nested attributes must be given.
|
|
956
|
+
# @rbs return: AttributeSets::ActionAttrs
|
|
957
|
+
# @return [AttributeSets::ActionAttrs]
|
|
958
|
+
def actions; self[:"actions"]; end
|
|
959
|
+
# Statistics for this flow. Present in notifications if the stats would
|
|
960
|
+
# be nonzero. Ignored in requests.
|
|
961
|
+
# @rbs return: Structs::OvsFlowStats
|
|
962
|
+
# @return [Structs::OvsFlowStats]
|
|
963
|
+
def stats; self[:"stats"]; end
|
|
964
|
+
# An 8-bit value giving the ORed value of all of the TCP flags seen on
|
|
965
|
+
# packets in this flow. Only present in notifications for TCP flows, and
|
|
966
|
+
# only if it would be nonzero. Ignored in requests.
|
|
967
|
+
# @rbs return: ::Integer
|
|
968
|
+
# @return [Integer]
|
|
969
|
+
def tcp_flags; self[:"tcp_flags"]; end
|
|
970
|
+
# A 64-bit integer giving the time, in milliseconds on the system
|
|
971
|
+
# monotonic clock, at which a packet was last processed for this
|
|
972
|
+
# flow. Only present in notifications if a packet has been processed for
|
|
973
|
+
# this flow. Ignored in requests.
|
|
974
|
+
# @rbs return: ::Integer
|
|
975
|
+
# @return [Integer]
|
|
976
|
+
def used; self[:"used"]; end
|
|
977
|
+
# If present in a OVS_FLOW_CMD_SET request, clears the last-used time,
|
|
978
|
+
# accumulated TCP flags, and statistics for this flow. Otherwise
|
|
979
|
+
# ignored in requests. Never present in notifications.
|
|
980
|
+
# @rbs return: ::Integer
|
|
981
|
+
# @return [Integer]
|
|
982
|
+
def clear; self[:"clear"]; end
|
|
983
|
+
# Nested attributes specifying the mask bits for wildcarded flow
|
|
984
|
+
# match. Mask bit value '1' specifies exact match with corresponding
|
|
985
|
+
# flow key bit, while mask bit value '0' specifies a wildcarded
|
|
986
|
+
# match. Omitting attribute is treated as wildcarding all corresponding
|
|
987
|
+
# fields. Optional for all requests. If not present, all flow key bits
|
|
988
|
+
# are exact match bits.
|
|
989
|
+
# @rbs return: AttributeSets::KeyAttrs
|
|
990
|
+
# @return [AttributeSets::KeyAttrs]
|
|
991
|
+
def mask; self[:"mask"]; end
|
|
992
|
+
# Flow operation is a feature probe, error logging should be suppressed.
|
|
993
|
+
# @rbs return: ::String
|
|
994
|
+
# @return [String]
|
|
995
|
+
def probe; self[:"probe"]; end
|
|
996
|
+
# A value between 1-16 octets specifying a unique identifier for the
|
|
997
|
+
# flow. Causes the flow to be indexed by this value rather than the
|
|
998
|
+
# value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
|
|
999
|
+
# requests. Present in notifications if the flow was created with this
|
|
1000
|
+
# attribute.
|
|
1001
|
+
# @rbs return: ::String
|
|
1002
|
+
# @return [String]
|
|
1003
|
+
def ufid; self[:"ufid"]; end
|
|
1004
|
+
# A 32-bit value of ORed flags that provide alternative semantics for
|
|
1005
|
+
# flow installation and retrieval. Optional for all requests.
|
|
1006
|
+
#
|
|
1007
|
+
#
|
|
1008
|
+
# Known flags are defined in {Flags::OvsUfidFlags}.
|
|
1009
|
+
# @rbs return: ::Integer
|
|
1010
|
+
# @return [Integer]
|
|
1011
|
+
def ufid_flags; self[:"ufid_flags"]; end
|
|
1012
|
+
# @rbs return: ::String
|
|
1013
|
+
# @return [String]
|
|
1014
|
+
def pad; self[:"pad"]; end
|
|
1015
|
+
end
|
|
1016
|
+
include Definitions
|
|
1017
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
1018
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
1019
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1020
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
644
1021
|
end
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
1022
|
+
end
|
|
1023
|
+
class KeyAttrs < ::Nl::AttributeSet
|
|
1024
|
+
module Definitions
|
|
1025
|
+
# @rbs return: AttributeSets::KeyAttrs
|
|
1026
|
+
# @return [AttributeSets::KeyAttrs]
|
|
1027
|
+
def encap; self[:"encap"]; end
|
|
1028
|
+
# @rbs return: ::Integer
|
|
1029
|
+
# @return [Integer]
|
|
1030
|
+
def priority; self[:"priority"]; end
|
|
1031
|
+
# @rbs return: ::Integer
|
|
1032
|
+
# @return [Integer]
|
|
1033
|
+
def in_port; self[:"in_port"]; end
|
|
1034
|
+
# struct ovs_key_ethernet
|
|
1035
|
+
# @rbs return: Structs::OvsKeyEthernet
|
|
1036
|
+
# @return [Structs::OvsKeyEthernet]
|
|
1037
|
+
def ethernet; self[:"ethernet"]; end
|
|
1038
|
+
# @rbs return: ::Integer
|
|
1039
|
+
# @return [Integer]
|
|
1040
|
+
def vlan; self[:"vlan"]; end
|
|
1041
|
+
# @rbs return: ::Integer
|
|
1042
|
+
# @return [Integer]
|
|
1043
|
+
def ethertype; self[:"ethertype"]; end
|
|
1044
|
+
# @rbs return: Structs::OvsKeyIpv4
|
|
1045
|
+
# @return [Structs::OvsKeyIpv4]
|
|
1046
|
+
def ipv4; self[:"ipv4"]; end
|
|
1047
|
+
# struct ovs_key_ipv6
|
|
1048
|
+
# @rbs return: Structs::OvsKeyIpv6
|
|
1049
|
+
# @return [Structs::OvsKeyIpv6]
|
|
1050
|
+
def ipv6; self[:"ipv6"]; end
|
|
1051
|
+
# @rbs return: Structs::OvsKeyTcp
|
|
1052
|
+
# @return [Structs::OvsKeyTcp]
|
|
1053
|
+
def tcp; self[:"tcp"]; end
|
|
1054
|
+
# @rbs return: Structs::OvsKeyUdp
|
|
1055
|
+
# @return [Structs::OvsKeyUdp]
|
|
1056
|
+
def udp; self[:"udp"]; end
|
|
1057
|
+
# @rbs return: Structs::OvsKeyIcmp
|
|
1058
|
+
# @return [Structs::OvsKeyIcmp]
|
|
1059
|
+
def icmp; self[:"icmp"]; end
|
|
1060
|
+
# @rbs return: Structs::OvsKeyIcmp
|
|
1061
|
+
# @return [Structs::OvsKeyIcmp]
|
|
1062
|
+
def icmpv6; self[:"icmpv6"]; end
|
|
1063
|
+
# struct ovs_key_arp
|
|
1064
|
+
# @rbs return: Structs::OvsKeyArp
|
|
1065
|
+
# @return [Structs::OvsKeyArp]
|
|
1066
|
+
def arp; self[:"arp"]; end
|
|
1067
|
+
# struct ovs_key_nd
|
|
1068
|
+
# @rbs return: Structs::OvsKeyNd
|
|
1069
|
+
# @return [Structs::OvsKeyNd]
|
|
1070
|
+
def nd; self[:"nd"]; end
|
|
1071
|
+
# @rbs return: ::Integer
|
|
1072
|
+
# @return [Integer]
|
|
1073
|
+
def skb_mark; self[:"skb_mark"]; end
|
|
1074
|
+
# @rbs return: AttributeSets::TunnelKeyAttrs
|
|
1075
|
+
# @return [AttributeSets::TunnelKeyAttrs]
|
|
1076
|
+
def tunnel; self[:"tunnel"]; end
|
|
1077
|
+
# @rbs return: Structs::OvsKeySctp
|
|
1078
|
+
# @return [Structs::OvsKeySctp]
|
|
1079
|
+
def sctp; self[:"sctp"]; end
|
|
1080
|
+
# @rbs return: ::Integer
|
|
1081
|
+
# @return [Integer]
|
|
1082
|
+
def tcp_flags; self[:"tcp_flags"]; end
|
|
1083
|
+
# Value 0 indicates the hash is not computed by the datapath.
|
|
1084
|
+
# @rbs return: ::Integer
|
|
1085
|
+
# @return [Integer]
|
|
1086
|
+
def dp_hash; self[:"dp_hash"]; end
|
|
1087
|
+
# @rbs return: ::Integer
|
|
1088
|
+
# @return [Integer]
|
|
1089
|
+
def recirc_id; self[:"recirc_id"]; end
|
|
1090
|
+
# @rbs return: Structs::OvsKeyMpls
|
|
1091
|
+
# @return [Structs::OvsKeyMpls]
|
|
1092
|
+
def mpls; self[:"mpls"]; end
|
|
1093
|
+
# Known flags are defined in {Flags::CtStateFlags}.
|
|
1094
|
+
# @rbs return: ::Integer
|
|
1095
|
+
# @return [Integer]
|
|
1096
|
+
def ct_state; self[:"ct_state"]; end
|
|
1097
|
+
# connection tracking zone
|
|
1098
|
+
# @rbs return: ::Integer
|
|
1099
|
+
# @return [Integer]
|
|
1100
|
+
def ct_zone; self[:"ct_zone"]; end
|
|
1101
|
+
# connection tracking mark
|
|
1102
|
+
# @rbs return: ::Integer
|
|
1103
|
+
# @return [Integer]
|
|
1104
|
+
def ct_mark; self[:"ct_mark"]; end
|
|
1105
|
+
# 16-octet connection tracking label
|
|
1106
|
+
# @rbs return: ::String
|
|
1107
|
+
# @return [String]
|
|
1108
|
+
def ct_labels; self[:"ct_labels"]; end
|
|
1109
|
+
# @rbs return: Structs::OvsKeyCtTupleIpv4
|
|
1110
|
+
# @return [Structs::OvsKeyCtTupleIpv4]
|
|
1111
|
+
def ct_orig_tuple_ipv4; self[:"ct_orig_tuple_ipv4"]; end
|
|
1112
|
+
# struct ovs_key_ct_tuple_ipv6
|
|
1113
|
+
# @rbs return: ::String
|
|
1114
|
+
# @return [String]
|
|
1115
|
+
def ct_orig_tuple_ipv6; self[:"ct_orig_tuple_ipv6"]; end
|
|
1116
|
+
# @rbs return: AttributeSets::OvsNshKeyAttrs
|
|
1117
|
+
# @return [AttributeSets::OvsNshKeyAttrs]
|
|
1118
|
+
def nsh; self[:"nsh"]; end
|
|
1119
|
+
# Should not be sent to the kernel
|
|
1120
|
+
# @rbs return: ::Integer
|
|
1121
|
+
# @return [Integer]
|
|
1122
|
+
def packet_type; self[:"packet_type"]; end
|
|
1123
|
+
# Should not be sent to the kernel
|
|
1124
|
+
# @rbs return: ::String
|
|
1125
|
+
# @return [String]
|
|
1126
|
+
def nd_extensions; self[:"nd_extensions"]; end
|
|
1127
|
+
# struct ip_tunnel_info
|
|
1128
|
+
# @rbs return: ::String
|
|
1129
|
+
# @return [String]
|
|
1130
|
+
def tunnel_info; self[:"tunnel_info"]; end
|
|
1131
|
+
# struct ovs_key_ipv6_exthdr
|
|
1132
|
+
# @rbs return: Structs::OvsKeyIpv6Exthdrs
|
|
1133
|
+
# @return [Structs::OvsKeyIpv6Exthdrs]
|
|
1134
|
+
def ipv6_exthdrs; self[:"ipv6_exthdrs"]; end
|
|
1135
|
+
end
|
|
1136
|
+
include Definitions
|
|
1137
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
1138
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
1139
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1140
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
652
1141
|
end
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
1142
|
+
end
|
|
1143
|
+
class ActionAttrs < ::Nl::AttributeSet
|
|
1144
|
+
module Definitions
|
|
1145
|
+
# ovs port number in datapath
|
|
1146
|
+
# @rbs return: ::Integer
|
|
1147
|
+
# @return [Integer]
|
|
1148
|
+
def output; self[:"output"]; end
|
|
1149
|
+
# @rbs return: AttributeSets::UserspaceAttrs
|
|
1150
|
+
# @return [AttributeSets::UserspaceAttrs]
|
|
1151
|
+
def userspace; self[:"userspace"]; end
|
|
1152
|
+
# Replaces the contents of an existing header. The single nested
|
|
1153
|
+
# attribute specifies a header to modify and its value.
|
|
1154
|
+
# @rbs return: AttributeSets::KeyAttrs
|
|
1155
|
+
# @return [AttributeSets::KeyAttrs]
|
|
1156
|
+
def set; self[:"set"]; end
|
|
1157
|
+
# Push a new outermost 802.1Q or 802.1ad header onto the packet.
|
|
1158
|
+
# @rbs return: Structs::OvsActionPushVlan
|
|
1159
|
+
# @return [Structs::OvsActionPushVlan]
|
|
1160
|
+
def push_vlan; self[:"push_vlan"]; end
|
|
1161
|
+
# Pop the outermost 802.1Q or 802.1ad header from the packet.
|
|
1162
|
+
# @rbs return: ::Integer
|
|
1163
|
+
# @return [Integer]
|
|
1164
|
+
def pop_vlan; self[:"pop_vlan"]; end
|
|
1165
|
+
# Probabilistically executes actions, as specified in the nested
|
|
1166
|
+
# attributes.
|
|
1167
|
+
# @rbs return: AttributeSets::SampleAttrs
|
|
1168
|
+
# @return [AttributeSets::SampleAttrs]
|
|
1169
|
+
def sample; self[:"sample"]; end
|
|
1170
|
+
# recirc id
|
|
1171
|
+
# @rbs return: ::Integer
|
|
1172
|
+
# @return [Integer]
|
|
1173
|
+
def recirc; self[:"recirc"]; end
|
|
1174
|
+
# @rbs return: Structs::OvsActionHash
|
|
1175
|
+
# @return [Structs::OvsActionHash]
|
|
1176
|
+
def hash; self[:"hash"]; end
|
|
1177
|
+
# Push a new MPLS label stack entry onto the top of the packets MPLS
|
|
1178
|
+
# label stack. Set the ethertype of the encapsulating frame to either
|
|
1179
|
+
# ETH_P_MPLS_UC or ETH_P_MPLS_MC to indicate the new packet contents.
|
|
1180
|
+
# @rbs return: Structs::OvsActionPushMpls
|
|
1181
|
+
# @return [Structs::OvsActionPushMpls]
|
|
1182
|
+
def push_mpls; self[:"push_mpls"]; end
|
|
1183
|
+
# ethertype
|
|
1184
|
+
# @rbs return: ::Integer
|
|
1185
|
+
# @return [Integer]
|
|
1186
|
+
def pop_mpls; self[:"pop_mpls"]; end
|
|
1187
|
+
# Replaces the contents of an existing header. A nested attribute
|
|
1188
|
+
# specifies a header to modify, its value, and a mask. For every bit set
|
|
1189
|
+
# in the mask, the corresponding bit value is copied from the value to
|
|
1190
|
+
# the packet header field, rest of the bits are left unchanged. The
|
|
1191
|
+
# non-masked value bits must be passed in as zeroes. Masking is not
|
|
1192
|
+
# supported for the OVS_KEY_ATTR_TUNNEL attribute.
|
|
1193
|
+
# @rbs return: AttributeSets::KeyAttrs
|
|
1194
|
+
# @return [AttributeSets::KeyAttrs]
|
|
1195
|
+
def set_masked; self[:"set_masked"]; end
|
|
1196
|
+
# Track the connection. Populate the conntrack-related entries
|
|
1197
|
+
# in the flow key.
|
|
1198
|
+
# @rbs return: AttributeSets::CtAttrs
|
|
1199
|
+
# @return [AttributeSets::CtAttrs]
|
|
1200
|
+
def ct; self[:"ct"]; end
|
|
1201
|
+
# struct ovs_action_trunc is a u32 max length
|
|
1202
|
+
# @rbs return: ::Integer
|
|
1203
|
+
# @return [Integer]
|
|
1204
|
+
def trunc; self[:"trunc"]; end
|
|
1205
|
+
# struct ovs_action_push_eth
|
|
1206
|
+
# @rbs return: ::String
|
|
1207
|
+
# @return [String]
|
|
1208
|
+
def push_eth; self[:"push_eth"]; end
|
|
1209
|
+
# @rbs return: ::Integer
|
|
1210
|
+
# @return [Integer]
|
|
1211
|
+
def pop_eth; self[:"pop_eth"]; end
|
|
1212
|
+
# @rbs return: ::Integer
|
|
1213
|
+
# @return [Integer]
|
|
1214
|
+
def ct_clear; self[:"ct_clear"]; end
|
|
1215
|
+
# Push NSH header to the packet.
|
|
1216
|
+
# @rbs return: AttributeSets::OvsNshKeyAttrs
|
|
1217
|
+
# @return [AttributeSets::OvsNshKeyAttrs]
|
|
1218
|
+
def push_nsh; self[:"push_nsh"]; end
|
|
1219
|
+
# Pop the outermost NSH header off the packet.
|
|
1220
|
+
# @rbs return: ::Integer
|
|
1221
|
+
# @return [Integer]
|
|
1222
|
+
def pop_nsh; self[:"pop_nsh"]; end
|
|
1223
|
+
# Run packet through a meter, which may drop the packet, or modify the
|
|
1224
|
+
# packet (e.g., change the DSCP field)
|
|
1225
|
+
# @rbs return: ::Integer
|
|
1226
|
+
# @return [Integer]
|
|
1227
|
+
def meter; self[:"meter"]; end
|
|
1228
|
+
# Make a copy of the packet and execute a list of actions without
|
|
1229
|
+
# affecting the original packet and key.
|
|
1230
|
+
# @rbs return: AttributeSets::ActionAttrs
|
|
1231
|
+
# @return [AttributeSets::ActionAttrs]
|
|
1232
|
+
def clone; self[:"clone"]; end
|
|
1233
|
+
# Check the packet length and execute a set of actions if greater than
|
|
1234
|
+
# the specified packet length, else execute another set of actions.
|
|
1235
|
+
# @rbs return: AttributeSets::CheckPktLenAttrs
|
|
1236
|
+
# @return [AttributeSets::CheckPktLenAttrs]
|
|
1237
|
+
def check_pkt_len; self[:"check_pkt_len"]; end
|
|
1238
|
+
# Push a new MPLS label stack entry at the start of the packet or at the
|
|
1239
|
+
# start of the l3 header depending on the value of l3 tunnel flag in the
|
|
1240
|
+
# tun_flags field of this OVS_ACTION_ATTR_ADD_MPLS argument.
|
|
1241
|
+
# @rbs return: Structs::OvsActionAddMpls
|
|
1242
|
+
# @return [Structs::OvsActionAddMpls]
|
|
1243
|
+
def add_mpls; self[:"add_mpls"]; end
|
|
1244
|
+
# @rbs return: AttributeSets::DecTtlAttrs
|
|
1245
|
+
# @return [AttributeSets::DecTtlAttrs]
|
|
1246
|
+
def dec_ttl; self[:"dec_ttl"]; end
|
|
1247
|
+
# Sends a packet sample to psample for external observation.
|
|
1248
|
+
# @rbs return: AttributeSets::PsampleAttrs
|
|
1249
|
+
# @return [AttributeSets::PsampleAttrs]
|
|
1250
|
+
def psample; self[:"psample"]; end
|
|
1251
|
+
end
|
|
1252
|
+
include Definitions
|
|
1253
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
1254
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
1255
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1256
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1257
|
+
end
|
|
1258
|
+
end
|
|
1259
|
+
class TunnelKeyAttrs < ::Nl::AttributeSet
|
|
1260
|
+
module Definitions
|
|
1261
|
+
# @rbs return: ::Integer
|
|
1262
|
+
# @return [Integer]
|
|
1263
|
+
def id; self[:"id"]; end
|
|
1264
|
+
# @rbs return: ::Integer
|
|
1265
|
+
# @return [Integer]
|
|
1266
|
+
def ipv4_src; self[:"ipv4_src"]; end
|
|
1267
|
+
# @rbs return: ::Integer
|
|
1268
|
+
# @return [Integer]
|
|
1269
|
+
def ipv4_dst; self[:"ipv4_dst"]; end
|
|
1270
|
+
# @rbs return: ::Integer
|
|
1271
|
+
# @return [Integer]
|
|
1272
|
+
def tos; self[:"tos"]; end
|
|
1273
|
+
# @rbs return: ::Integer
|
|
1274
|
+
# @return [Integer]
|
|
1275
|
+
def ttl; self[:"ttl"]; end
|
|
1276
|
+
# @rbs return: ::Integer
|
|
1277
|
+
# @return [Integer]
|
|
1278
|
+
def dont_fragment; self[:"dont_fragment"]; end
|
|
1279
|
+
# @rbs return: ::Integer
|
|
1280
|
+
# @return [Integer]
|
|
1281
|
+
def csum; self[:"csum"]; end
|
|
1282
|
+
# @rbs return: ::Integer
|
|
1283
|
+
# @return [Integer]
|
|
1284
|
+
def oam; self[:"oam"]; end
|
|
1285
|
+
# @rbs return: ::Array[::Integer]
|
|
1286
|
+
# @return [Array<Integer>]
|
|
1287
|
+
def geneve_opts; self[:"geneve_opts"]; end
|
|
1288
|
+
# @rbs return: ::Integer
|
|
1289
|
+
# @return [Integer]
|
|
1290
|
+
def tp_src; self[:"tp_src"]; end
|
|
1291
|
+
# @rbs return: ::Integer
|
|
1292
|
+
# @return [Integer]
|
|
1293
|
+
def tp_dst; self[:"tp_dst"]; end
|
|
1294
|
+
# @rbs return: AttributeSets::VxlanExtAttrs
|
|
1295
|
+
# @return [AttributeSets::VxlanExtAttrs]
|
|
1296
|
+
def vxlan_opts; self[:"vxlan_opts"]; end
|
|
1297
|
+
# struct in6_addr source IPv6 address
|
|
1298
|
+
# @rbs return: ::String
|
|
1299
|
+
# @return [String]
|
|
1300
|
+
def ipv6_src; self[:"ipv6_src"]; end
|
|
1301
|
+
# struct in6_addr destination IPv6 address
|
|
1302
|
+
# @rbs return: ::String
|
|
1303
|
+
# @return [String]
|
|
1304
|
+
def ipv6_dst; self[:"ipv6_dst"]; end
|
|
1305
|
+
# @rbs return: ::String
|
|
1306
|
+
# @return [String]
|
|
1307
|
+
def pad; self[:"pad"]; end
|
|
1308
|
+
# struct erspan_metadata
|
|
1309
|
+
# @rbs return: ::String
|
|
1310
|
+
# @return [String]
|
|
1311
|
+
def erspan_opts; self[:"erspan_opts"]; end
|
|
1312
|
+
# @rbs return: ::Integer
|
|
1313
|
+
# @return [Integer]
|
|
1314
|
+
def ipv4_info_bridge; self[:"ipv4_info_bridge"]; end
|
|
1315
|
+
end
|
|
1316
|
+
include Definitions
|
|
1317
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
1318
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
1319
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1320
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1321
|
+
end
|
|
1322
|
+
end
|
|
1323
|
+
class CheckPktLenAttrs < ::Nl::AttributeSet
|
|
1324
|
+
module Definitions
|
|
1325
|
+
# @rbs return: ::Integer
|
|
1326
|
+
# @return [Integer]
|
|
1327
|
+
def pkt_len; self[:"pkt_len"]; end
|
|
1328
|
+
# @rbs return: AttributeSets::ActionAttrs
|
|
1329
|
+
# @return [AttributeSets::ActionAttrs]
|
|
1330
|
+
def actions_if_greater; self[:"actions_if_greater"]; end
|
|
1331
|
+
# @rbs return: AttributeSets::ActionAttrs
|
|
1332
|
+
# @return [AttributeSets::ActionAttrs]
|
|
1333
|
+
def actions_if_less_equal; self[:"actions_if_less_equal"]; end
|
|
1334
|
+
end
|
|
1335
|
+
include Definitions
|
|
1336
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
1337
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
1338
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1339
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1340
|
+
end
|
|
1341
|
+
end
|
|
1342
|
+
class SampleAttrs < ::Nl::AttributeSet
|
|
1343
|
+
module Definitions
|
|
1344
|
+
# @rbs return: ::Integer
|
|
1345
|
+
# @return [Integer]
|
|
1346
|
+
def probability; self[:"probability"]; end
|
|
1347
|
+
# @rbs return: AttributeSets::ActionAttrs
|
|
1348
|
+
# @return [AttributeSets::ActionAttrs]
|
|
1349
|
+
def actions; self[:"actions"]; end
|
|
1350
|
+
end
|
|
1351
|
+
include Definitions
|
|
1352
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
1353
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
1354
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1355
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1356
|
+
end
|
|
1357
|
+
end
|
|
1358
|
+
class UserspaceAttrs < ::Nl::AttributeSet
|
|
1359
|
+
module Definitions
|
|
1360
|
+
# @rbs return: ::Integer
|
|
1361
|
+
# @return [Integer]
|
|
1362
|
+
def pid; self[:"pid"]; end
|
|
1363
|
+
# @rbs return: ::String
|
|
1364
|
+
# @return [String]
|
|
1365
|
+
def userdata; self[:"userdata"]; end
|
|
1366
|
+
# @rbs return: ::Integer
|
|
1367
|
+
# @return [Integer]
|
|
1368
|
+
def egress_tun_port; self[:"egress_tun_port"]; end
|
|
1369
|
+
# @rbs return: ::Integer
|
|
1370
|
+
# @return [Integer]
|
|
1371
|
+
def actions; self[:"actions"]; end
|
|
1372
|
+
end
|
|
1373
|
+
include Definitions
|
|
1374
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
1375
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
1376
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1377
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1378
|
+
end
|
|
1379
|
+
end
|
|
1380
|
+
class OvsNshKeyAttrs < ::Nl::AttributeSet
|
|
1381
|
+
module Definitions
|
|
1382
|
+
# @rbs return: ::String
|
|
1383
|
+
# @return [String]
|
|
1384
|
+
def base; self[:"base"]; end
|
|
1385
|
+
# @rbs return: ::String
|
|
1386
|
+
# @return [String]
|
|
1387
|
+
def md1; self[:"md1"]; end
|
|
1388
|
+
# @rbs return: ::String
|
|
1389
|
+
# @return [String]
|
|
1390
|
+
def md2; self[:"md2"]; end
|
|
1391
|
+
end
|
|
1392
|
+
include Definitions
|
|
1393
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
1394
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
1395
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1396
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1397
|
+
end
|
|
1398
|
+
end
|
|
1399
|
+
class CtAttrs < ::Nl::AttributeSet
|
|
1400
|
+
module Definitions
|
|
1401
|
+
# @rbs return: ::Integer
|
|
1402
|
+
# @return [Integer]
|
|
1403
|
+
def commit; self[:"commit"]; end
|
|
1404
|
+
# @rbs return: ::Integer
|
|
1405
|
+
# @return [Integer]
|
|
1406
|
+
def zone; self[:"zone"]; end
|
|
1407
|
+
# @rbs return: ::String
|
|
1408
|
+
# @return [String]
|
|
1409
|
+
def mark; self[:"mark"]; end
|
|
1410
|
+
# @rbs return: ::String
|
|
1411
|
+
# @return [String]
|
|
1412
|
+
def labels; self[:"labels"]; end
|
|
1413
|
+
# @rbs return: ::String
|
|
1414
|
+
# @return [String]
|
|
1415
|
+
def helper; self[:"helper"]; end
|
|
1416
|
+
# @rbs return: AttributeSets::NatAttrs
|
|
1417
|
+
# @return [AttributeSets::NatAttrs]
|
|
1418
|
+
def nat; self[:"nat"]; end
|
|
1419
|
+
# @rbs return: ::Integer
|
|
1420
|
+
# @return [Integer]
|
|
1421
|
+
def force_commit; self[:"force_commit"]; end
|
|
1422
|
+
# @rbs return: ::Integer
|
|
1423
|
+
# @return [Integer]
|
|
1424
|
+
def eventmask; self[:"eventmask"]; end
|
|
1425
|
+
# @rbs return: ::String
|
|
1426
|
+
# @return [String]
|
|
1427
|
+
def timeout; self[:"timeout"]; end
|
|
1428
|
+
end
|
|
1429
|
+
include Definitions
|
|
1430
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
1431
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
1432
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1433
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1434
|
+
end
|
|
1435
|
+
end
|
|
1436
|
+
class NatAttrs < ::Nl::AttributeSet
|
|
1437
|
+
module Definitions
|
|
1438
|
+
# @rbs return: ::Integer
|
|
1439
|
+
# @return [Integer]
|
|
1440
|
+
def src; self[:"src"]; end
|
|
1441
|
+
# @rbs return: ::Integer
|
|
1442
|
+
# @return [Integer]
|
|
1443
|
+
def dst; self[:"dst"]; end
|
|
1444
|
+
# @rbs return: ::String
|
|
1445
|
+
# @return [String]
|
|
1446
|
+
def ip_min; self[:"ip_min"]; end
|
|
1447
|
+
# @rbs return: ::String
|
|
1448
|
+
# @return [String]
|
|
1449
|
+
def ip_max; self[:"ip_max"]; end
|
|
1450
|
+
# @rbs return: ::Integer
|
|
1451
|
+
# @return [Integer]
|
|
1452
|
+
def proto_min; self[:"proto_min"]; end
|
|
1453
|
+
# @rbs return: ::Integer
|
|
1454
|
+
# @return [Integer]
|
|
1455
|
+
def proto_max; self[:"proto_max"]; end
|
|
1456
|
+
# @rbs return: ::Integer
|
|
1457
|
+
# @return [Integer]
|
|
1458
|
+
def persistent; self[:"persistent"]; end
|
|
1459
|
+
# @rbs return: ::Integer
|
|
1460
|
+
# @return [Integer]
|
|
1461
|
+
def proto_hash; self[:"proto_hash"]; end
|
|
1462
|
+
# @rbs return: ::Integer
|
|
1463
|
+
# @return [Integer]
|
|
1464
|
+
def proto_random; self[:"proto_random"]; end
|
|
1465
|
+
end
|
|
1466
|
+
include Definitions
|
|
1467
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
1468
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
1469
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1470
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1471
|
+
end
|
|
1472
|
+
end
|
|
1473
|
+
class DecTtlAttrs < ::Nl::AttributeSet
|
|
1474
|
+
module Definitions
|
|
1475
|
+
# @rbs return: AttributeSets::ActionAttrs
|
|
1476
|
+
# @return [AttributeSets::ActionAttrs]
|
|
1477
|
+
def action; self[:"action"]; end
|
|
1478
|
+
end
|
|
1479
|
+
include Definitions
|
|
1480
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
1481
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
1482
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1483
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1484
|
+
end
|
|
1485
|
+
end
|
|
1486
|
+
class VxlanExtAttrs < ::Nl::AttributeSet
|
|
1487
|
+
module Definitions
|
|
1488
|
+
# @rbs return: ::Integer
|
|
1489
|
+
# @return [Integer]
|
|
1490
|
+
def gbp; self[:"gbp"]; end
|
|
1491
|
+
end
|
|
1492
|
+
include Definitions
|
|
1493
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
1494
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
1495
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1496
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1497
|
+
end
|
|
1498
|
+
end
|
|
1499
|
+
class PsampleAttrs < ::Nl::AttributeSet
|
|
1500
|
+
module Definitions
|
|
1501
|
+
# @rbs return: ::Integer
|
|
1502
|
+
# @return [Integer]
|
|
1503
|
+
def group; self[:"group"]; end
|
|
1504
|
+
# @rbs return: ::String
|
|
1505
|
+
# @return [String]
|
|
1506
|
+
def cookie; self[:"cookie"]; end
|
|
1507
|
+
end
|
|
1508
|
+
include Definitions
|
|
1509
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
1510
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
1511
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1512
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1513
|
+
end
|
|
1514
|
+
end
|
|
1515
|
+
end
|
|
1516
|
+
module AttributeSets
|
|
1517
|
+
class FlowAttrs
|
|
1518
|
+
module Definitions
|
|
1519
|
+
# @private
|
|
1520
|
+
BY_TYPE = ::Array.new(12).tap do |definitions|
|
|
1521
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"key", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::KeyAttrs, selector_bindings: []), multi: false, order: 0, selector_slot: nil)
|
|
1522
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"actions", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::ActionAttrs, selector_bindings: []), multi: false, order: 1, selector_slot: nil)
|
|
1523
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"stats", datatype: ::Nl::DataTypes::Struct.new(Structs::OvsFlowStats, consume_remaining: true), multi: false, order: 2, selector_slot: nil)
|
|
1524
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"tcp_flags", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, multi: false, order: 3, selector_slot: nil)
|
|
1525
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"used", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U64].new, multi: false, order: 4, selector_slot: nil)
|
|
1526
|
+
definitions[6] = ::Nl::AttributeSet::Definition.new(id: 6, name: :"clear", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 5, selector_slot: nil)
|
|
1527
|
+
definitions[7] = ::Nl::AttributeSet::Definition.new(id: 7, name: :"mask", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::KeyAttrs, selector_bindings: []), multi: false, order: 6, selector_slot: nil)
|
|
1528
|
+
definitions[8] = ::Nl::AttributeSet::Definition.new(id: 8, name: :"probe", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 7, selector_slot: nil)
|
|
1529
|
+
definitions[9] = ::Nl::AttributeSet::Definition.new(id: 9, name: :"ufid", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 8, selector_slot: nil)
|
|
1530
|
+
definitions[10] = ::Nl::AttributeSet::Definition.new(id: 10, name: :"ufid_flags", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 9, selector_slot: nil)
|
|
1531
|
+
definitions[11] = ::Nl::AttributeSet::Definition.new(id: 11, name: :"pad", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 10, selector_slot: nil)
|
|
1532
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
1533
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
1534
|
+
# @private
|
|
1535
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
1536
|
+
end
|
|
1537
|
+
end
|
|
1538
|
+
class KeyAttrs
|
|
1539
|
+
module Definitions
|
|
1540
|
+
# @private
|
|
1541
|
+
BY_TYPE = ::Array.new(33).tap do |definitions|
|
|
1542
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"encap", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::KeyAttrs, selector_bindings: []), multi: false, order: 0, selector_slot: nil)
|
|
1543
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"priority", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 1, selector_slot: nil)
|
|
1544
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"in_port", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 2, selector_slot: nil)
|
|
1545
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"ethernet", datatype: ::Nl::DataTypes::Struct.new(Structs::OvsKeyEthernet, consume_remaining: true), multi: false, order: 3, selector_slot: nil)
|
|
1546
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"vlan", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new, multi: false, order: 4, selector_slot: nil)
|
|
1547
|
+
definitions[6] = ::Nl::AttributeSet::Definition.new(id: 6, name: :"ethertype", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new, multi: false, order: 5, selector_slot: nil)
|
|
1548
|
+
definitions[7] = ::Nl::AttributeSet::Definition.new(id: 7, name: :"ipv4", datatype: ::Nl::DataTypes::Struct.new(Structs::OvsKeyIpv4, consume_remaining: true), multi: false, order: 6, selector_slot: nil)
|
|
1549
|
+
definitions[8] = ::Nl::AttributeSet::Definition.new(id: 8, name: :"ipv6", datatype: ::Nl::DataTypes::Struct.new(Structs::OvsKeyIpv6, consume_remaining: true), multi: false, order: 7, selector_slot: nil)
|
|
1550
|
+
definitions[9] = ::Nl::AttributeSet::Definition.new(id: 9, name: :"tcp", datatype: ::Nl::DataTypes::Struct.new(Structs::OvsKeyTcp, consume_remaining: true), multi: false, order: 8, selector_slot: nil)
|
|
1551
|
+
definitions[10] = ::Nl::AttributeSet::Definition.new(id: 10, name: :"udp", datatype: ::Nl::DataTypes::Struct.new(Structs::OvsKeyUdp, consume_remaining: true), multi: false, order: 9, selector_slot: nil)
|
|
1552
|
+
definitions[11] = ::Nl::AttributeSet::Definition.new(id: 11, name: :"icmp", datatype: ::Nl::DataTypes::Struct.new(Structs::OvsKeyIcmp, consume_remaining: true), multi: false, order: 10, selector_slot: nil)
|
|
1553
|
+
definitions[12] = ::Nl::AttributeSet::Definition.new(id: 12, name: :"icmpv6", datatype: ::Nl::DataTypes::Struct.new(Structs::OvsKeyIcmp, consume_remaining: true), multi: false, order: 11, selector_slot: nil)
|
|
1554
|
+
definitions[13] = ::Nl::AttributeSet::Definition.new(id: 13, name: :"arp", datatype: ::Nl::DataTypes::Struct.new(Structs::OvsKeyArp, consume_remaining: true), multi: false, order: 12, selector_slot: nil)
|
|
1555
|
+
definitions[14] = ::Nl::AttributeSet::Definition.new(id: 14, name: :"nd", datatype: ::Nl::DataTypes::Struct.new(Structs::OvsKeyNd, consume_remaining: true), multi: false, order: 13, selector_slot: nil)
|
|
1556
|
+
definitions[15] = ::Nl::AttributeSet::Definition.new(id: 15, name: :"skb_mark", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 14, selector_slot: nil)
|
|
1557
|
+
definitions[16] = ::Nl::AttributeSet::Definition.new(id: 16, name: :"tunnel", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::TunnelKeyAttrs, selector_bindings: []), multi: false, order: 15, selector_slot: nil)
|
|
1558
|
+
definitions[17] = ::Nl::AttributeSet::Definition.new(id: 17, name: :"sctp", datatype: ::Nl::DataTypes::Struct.new(Structs::OvsKeySctp, consume_remaining: true), multi: false, order: 16, selector_slot: nil)
|
|
1559
|
+
definitions[18] = ::Nl::AttributeSet::Definition.new(id: 18, name: :"tcp_flags", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new, multi: false, order: 17, selector_slot: nil)
|
|
1560
|
+
definitions[19] = ::Nl::AttributeSet::Definition.new(id: 19, name: :"dp_hash", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 18, selector_slot: nil)
|
|
1561
|
+
definitions[20] = ::Nl::AttributeSet::Definition.new(id: 20, name: :"recirc_id", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 19, selector_slot: nil)
|
|
1562
|
+
definitions[21] = ::Nl::AttributeSet::Definition.new(id: 21, name: :"mpls", datatype: ::Nl::DataTypes::Struct.new(Structs::OvsKeyMpls, consume_remaining: true), multi: false, order: 20, selector_slot: nil)
|
|
1563
|
+
definitions[22] = ::Nl::AttributeSet::Definition.new(id: 22, name: :"ct_state", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 21, selector_slot: nil)
|
|
1564
|
+
definitions[23] = ::Nl::AttributeSet::Definition.new(id: 23, name: :"ct_zone", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U16].new, multi: false, order: 22, selector_slot: nil)
|
|
1565
|
+
definitions[24] = ::Nl::AttributeSet::Definition.new(id: 24, name: :"ct_mark", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 23, selector_slot: nil)
|
|
1566
|
+
definitions[25] = ::Nl::AttributeSet::Definition.new(id: 25, name: :"ct_labels", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 24, selector_slot: nil)
|
|
1567
|
+
definitions[26] = ::Nl::AttributeSet::Definition.new(id: 26, name: :"ct_orig_tuple_ipv4", datatype: ::Nl::DataTypes::Struct.new(Structs::OvsKeyCtTupleIpv4, consume_remaining: true), multi: false, order: 25, selector_slot: nil)
|
|
1568
|
+
definitions[27] = ::Nl::AttributeSet::Definition.new(id: 27, name: :"ct_orig_tuple_ipv6", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 26, selector_slot: nil)
|
|
1569
|
+
definitions[28] = ::Nl::AttributeSet::Definition.new(id: 28, name: :"nsh", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::OvsNshKeyAttrs, selector_bindings: []), multi: false, order: 27, selector_slot: nil)
|
|
1570
|
+
definitions[29] = ::Nl::AttributeSet::Definition.new(id: 29, name: :"packet_type", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U32].new, multi: false, order: 28, selector_slot: nil)
|
|
1571
|
+
definitions[30] = ::Nl::AttributeSet::Definition.new(id: 30, name: :"nd_extensions", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 29, selector_slot: nil)
|
|
1572
|
+
definitions[31] = ::Nl::AttributeSet::Definition.new(id: 31, name: :"tunnel_info", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 30, selector_slot: nil)
|
|
1573
|
+
definitions[32] = ::Nl::AttributeSet::Definition.new(id: 32, name: :"ipv6_exthdrs", datatype: ::Nl::DataTypes::Struct.new(Structs::OvsKeyIpv6Exthdrs, consume_remaining: true), multi: false, order: 31, selector_slot: nil)
|
|
1574
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
1575
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
1576
|
+
# @private
|
|
1577
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
1578
|
+
end
|
|
1579
|
+
end
|
|
1580
|
+
class ActionAttrs
|
|
1581
|
+
module Definitions
|
|
1582
|
+
# @private
|
|
1583
|
+
BY_TYPE = ::Array.new(25).tap do |definitions|
|
|
1584
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"output", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 0, selector_slot: nil)
|
|
1585
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"userspace", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::UserspaceAttrs, selector_bindings: []), multi: false, order: 1, selector_slot: nil)
|
|
1586
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"set", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::KeyAttrs, selector_bindings: []), multi: false, order: 2, selector_slot: nil)
|
|
1587
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"push_vlan", datatype: ::Nl::DataTypes::Struct.new(Structs::OvsActionPushVlan, consume_remaining: true), multi: false, order: 3, selector_slot: nil)
|
|
1588
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"pop_vlan", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 4, selector_slot: nil)
|
|
1589
|
+
definitions[6] = ::Nl::AttributeSet::Definition.new(id: 6, name: :"sample", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::SampleAttrs, selector_bindings: []), multi: false, order: 5, selector_slot: nil)
|
|
1590
|
+
definitions[7] = ::Nl::AttributeSet::Definition.new(id: 7, name: :"recirc", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 6, selector_slot: nil)
|
|
1591
|
+
definitions[8] = ::Nl::AttributeSet::Definition.new(id: 8, name: :"hash", datatype: ::Nl::DataTypes::Struct.new(Structs::OvsActionHash, consume_remaining: true), multi: false, order: 7, selector_slot: nil)
|
|
1592
|
+
definitions[9] = ::Nl::AttributeSet::Definition.new(id: 9, name: :"push_mpls", datatype: ::Nl::DataTypes::Struct.new(Structs::OvsActionPushMpls, consume_remaining: true), multi: false, order: 8, selector_slot: nil)
|
|
1593
|
+
definitions[10] = ::Nl::AttributeSet::Definition.new(id: 10, name: :"pop_mpls", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new, multi: false, order: 9, selector_slot: nil)
|
|
1594
|
+
definitions[11] = ::Nl::AttributeSet::Definition.new(id: 11, name: :"set_masked", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::KeyAttrs, selector_bindings: []), multi: false, order: 10, selector_slot: nil)
|
|
1595
|
+
definitions[12] = ::Nl::AttributeSet::Definition.new(id: 12, name: :"ct", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::CtAttrs, selector_bindings: []), multi: false, order: 11, selector_slot: nil)
|
|
1596
|
+
definitions[13] = ::Nl::AttributeSet::Definition.new(id: 13, name: :"trunc", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 12, selector_slot: nil)
|
|
1597
|
+
definitions[14] = ::Nl::AttributeSet::Definition.new(id: 14, name: :"push_eth", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 13, selector_slot: nil)
|
|
1598
|
+
definitions[15] = ::Nl::AttributeSet::Definition.new(id: 15, name: :"pop_eth", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 14, selector_slot: nil)
|
|
1599
|
+
definitions[16] = ::Nl::AttributeSet::Definition.new(id: 16, name: :"ct_clear", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 15, selector_slot: nil)
|
|
1600
|
+
definitions[17] = ::Nl::AttributeSet::Definition.new(id: 17, name: :"push_nsh", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::OvsNshKeyAttrs, selector_bindings: []), multi: false, order: 16, selector_slot: nil)
|
|
1601
|
+
definitions[18] = ::Nl::AttributeSet::Definition.new(id: 18, name: :"pop_nsh", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 17, selector_slot: nil)
|
|
1602
|
+
definitions[19] = ::Nl::AttributeSet::Definition.new(id: 19, name: :"meter", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 18, selector_slot: nil)
|
|
1603
|
+
definitions[20] = ::Nl::AttributeSet::Definition.new(id: 20, name: :"clone", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::ActionAttrs, selector_bindings: []), multi: false, order: 19, selector_slot: nil)
|
|
1604
|
+
definitions[21] = ::Nl::AttributeSet::Definition.new(id: 21, name: :"check_pkt_len", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::CheckPktLenAttrs, selector_bindings: []), multi: false, order: 20, selector_slot: nil)
|
|
1605
|
+
definitions[22] = ::Nl::AttributeSet::Definition.new(id: 22, name: :"add_mpls", datatype: ::Nl::DataTypes::Struct.new(Structs::OvsActionAddMpls, consume_remaining: true), multi: false, order: 21, selector_slot: nil)
|
|
1606
|
+
definitions[23] = ::Nl::AttributeSet::Definition.new(id: 23, name: :"dec_ttl", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::DecTtlAttrs, selector_bindings: []), multi: false, order: 22, selector_slot: nil)
|
|
1607
|
+
definitions[24] = ::Nl::AttributeSet::Definition.new(id: 24, name: :"psample", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::PsampleAttrs, selector_bindings: []), multi: false, order: 23, selector_slot: nil)
|
|
1608
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
1609
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
1610
|
+
# @private
|
|
1611
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
1612
|
+
end
|
|
1613
|
+
end
|
|
1614
|
+
class TunnelKeyAttrs
|
|
1615
|
+
module Definitions
|
|
1616
|
+
# @private
|
|
1617
|
+
BY_TYPE = ::Array.new(17).tap do |definitions|
|
|
1618
|
+
definitions[0] = ::Nl::AttributeSet::Definition.new(id: 0, name: :"id", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U64].new, multi: false, order: 0, selector_slot: nil)
|
|
1619
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"ipv4_src", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U32].new, multi: false, order: 1, selector_slot: nil)
|
|
1620
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"ipv4_dst", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U32].new, multi: false, order: 2, selector_slot: nil)
|
|
1621
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"tos", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, multi: false, order: 3, selector_slot: nil)
|
|
1622
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"ttl", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, multi: false, order: 4, selector_slot: nil)
|
|
1623
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"dont_fragment", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 5, selector_slot: nil)
|
|
1624
|
+
definitions[6] = ::Nl::AttributeSet::Definition.new(id: 6, name: :"csum", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 6, selector_slot: nil)
|
|
1625
|
+
definitions[7] = ::Nl::AttributeSet::Definition.new(id: 7, name: :"oam", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 7, selector_slot: nil)
|
|
1626
|
+
definitions[8] = ::Nl::AttributeSet::Definition.new(id: 8, name: :"geneve_opts", datatype: ::Nl::DataTypes::PackedArray.new(::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new), multi: false, order: 8, selector_slot: nil)
|
|
1627
|
+
definitions[9] = ::Nl::AttributeSet::Definition.new(id: 9, name: :"tp_src", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new, multi: false, order: 9, selector_slot: nil)
|
|
1628
|
+
definitions[10] = ::Nl::AttributeSet::Definition.new(id: 10, name: :"tp_dst", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new, multi: false, order: 10, selector_slot: nil)
|
|
1629
|
+
definitions[11] = ::Nl::AttributeSet::Definition.new(id: 11, name: :"vxlan_opts", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::VxlanExtAttrs, selector_bindings: []), multi: false, order: 11, selector_slot: nil)
|
|
1630
|
+
definitions[12] = ::Nl::AttributeSet::Definition.new(id: 12, name: :"ipv6_src", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 12, selector_slot: nil)
|
|
1631
|
+
definitions[13] = ::Nl::AttributeSet::Definition.new(id: 13, name: :"ipv6_dst", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 13, selector_slot: nil)
|
|
1632
|
+
definitions[14] = ::Nl::AttributeSet::Definition.new(id: 14, name: :"pad", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 14, selector_slot: nil)
|
|
1633
|
+
definitions[15] = ::Nl::AttributeSet::Definition.new(id: 15, name: :"erspan_opts", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 15, selector_slot: nil)
|
|
1634
|
+
definitions[16] = ::Nl::AttributeSet::Definition.new(id: 16, name: :"ipv4_info_bridge", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 16, selector_slot: nil)
|
|
1635
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
1636
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
1637
|
+
# @private
|
|
1638
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
1639
|
+
end
|
|
1640
|
+
end
|
|
1641
|
+
class CheckPktLenAttrs
|
|
1642
|
+
module Definitions
|
|
1643
|
+
# @private
|
|
1644
|
+
BY_TYPE = ::Array.new(4).tap do |definitions|
|
|
1645
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"pkt_len", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U16].new, multi: false, order: 0, selector_slot: nil)
|
|
1646
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"actions_if_greater", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::ActionAttrs, selector_bindings: []), multi: false, order: 1, selector_slot: nil)
|
|
1647
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"actions_if_less_equal", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::ActionAttrs, selector_bindings: []), multi: false, order: 2, selector_slot: nil)
|
|
1648
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
1649
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
662
1650
|
# @private
|
|
663
|
-
|
|
1651
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
664
1652
|
end
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
TYPE = 3
|
|
669
|
-
NAME = :"stats"
|
|
1653
|
+
end
|
|
1654
|
+
class SampleAttrs
|
|
1655
|
+
module Definitions
|
|
670
1656
|
# @private
|
|
671
|
-
|
|
1657
|
+
BY_TYPE = ::Array.new(3).tap do |definitions|
|
|
1658
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"probability", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 0, selector_slot: nil)
|
|
1659
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"actions", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::ActionAttrs, selector_bindings: []), multi: false, order: 1, selector_slot: nil)
|
|
1660
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
1661
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
672
1662
|
# @private
|
|
673
|
-
|
|
674
|
-
end
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
class TcpFlags < Attribute
|
|
679
|
-
TYPE = 4
|
|
680
|
-
NAME = :"tcp_flags"
|
|
1663
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
1664
|
+
end
|
|
1665
|
+
end
|
|
1666
|
+
class UserspaceAttrs
|
|
1667
|
+
module Definitions
|
|
681
1668
|
# @private
|
|
682
|
-
|
|
1669
|
+
BY_TYPE = ::Array.new(5).tap do |definitions|
|
|
1670
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"pid", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 0, selector_slot: nil)
|
|
1671
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"userdata", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 1, selector_slot: nil)
|
|
1672
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"egress_tun_port", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 2, selector_slot: nil)
|
|
1673
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"actions", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 3, selector_slot: nil)
|
|
1674
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
1675
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
683
1676
|
# @private
|
|
684
|
-
|
|
685
|
-
end
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
# this flow. Ignored in requests.
|
|
690
|
-
class Used < Attribute
|
|
691
|
-
TYPE = 5
|
|
692
|
-
NAME = :"used"
|
|
1677
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
1678
|
+
end
|
|
1679
|
+
end
|
|
1680
|
+
class OvsNshKeyAttrs
|
|
1681
|
+
module Definitions
|
|
693
1682
|
# @private
|
|
694
|
-
|
|
1683
|
+
BY_TYPE = ::Array.new(4).tap do |definitions|
|
|
1684
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"base", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 0, selector_slot: nil)
|
|
1685
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"md1", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 1, selector_slot: nil)
|
|
1686
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"md2", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 2, selector_slot: nil)
|
|
1687
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
1688
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
695
1689
|
# @private
|
|
696
|
-
|
|
697
|
-
end
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
1690
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
1691
|
+
end
|
|
1692
|
+
end
|
|
1693
|
+
class CtAttrs
|
|
1694
|
+
module Definitions
|
|
1695
|
+
# @private
|
|
1696
|
+
BY_TYPE = ::Array.new(10).tap do |definitions|
|
|
1697
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"commit", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 0, selector_slot: nil)
|
|
1698
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"zone", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U16].new, multi: false, order: 1, selector_slot: nil)
|
|
1699
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"mark", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 2, selector_slot: nil)
|
|
1700
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"labels", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 3, selector_slot: nil)
|
|
1701
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"helper", datatype: ::Nl::DataTypes::String.new, multi: false, order: 4, selector_slot: nil)
|
|
1702
|
+
definitions[6] = ::Nl::AttributeSet::Definition.new(id: 6, name: :"nat", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::NatAttrs, selector_bindings: []), multi: false, order: 5, selector_slot: nil)
|
|
1703
|
+
definitions[7] = ::Nl::AttributeSet::Definition.new(id: 7, name: :"force_commit", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 6, selector_slot: nil)
|
|
1704
|
+
definitions[8] = ::Nl::AttributeSet::Definition.new(id: 8, name: :"eventmask", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 7, selector_slot: nil)
|
|
1705
|
+
definitions[9] = ::Nl::AttributeSet::Definition.new(id: 9, name: :"timeout", datatype: ::Nl::DataTypes::String.new, multi: false, order: 8, selector_slot: nil)
|
|
1706
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
1707
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
1708
|
+
# @private
|
|
1709
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
1710
|
+
end
|
|
1711
|
+
end
|
|
1712
|
+
class NatAttrs
|
|
1713
|
+
module Definitions
|
|
1714
|
+
# @private
|
|
1715
|
+
BY_TYPE = ::Array.new(10).tap do |definitions|
|
|
1716
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"src", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 0, selector_slot: nil)
|
|
1717
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"dst", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 1, selector_slot: nil)
|
|
1718
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"ip_min", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 2, selector_slot: nil)
|
|
1719
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"ip_max", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 3, selector_slot: nil)
|
|
1720
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"proto_min", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U16].new, multi: false, order: 4, selector_slot: nil)
|
|
1721
|
+
definitions[6] = ::Nl::AttributeSet::Definition.new(id: 6, name: :"proto_max", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U16].new, multi: false, order: 5, selector_slot: nil)
|
|
1722
|
+
definitions[7] = ::Nl::AttributeSet::Definition.new(id: 7, name: :"persistent", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 6, selector_slot: nil)
|
|
1723
|
+
definitions[8] = ::Nl::AttributeSet::Definition.new(id: 8, name: :"proto_hash", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 7, selector_slot: nil)
|
|
1724
|
+
definitions[9] = ::Nl::AttributeSet::Definition.new(id: 9, name: :"proto_random", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 8, selector_slot: nil)
|
|
1725
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
1726
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
1727
|
+
# @private
|
|
1728
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
1729
|
+
end
|
|
1730
|
+
end
|
|
1731
|
+
class DecTtlAttrs
|
|
1732
|
+
module Definitions
|
|
704
1733
|
# @private
|
|
705
|
-
|
|
1734
|
+
BY_TYPE = ::Array.new(2).tap do |definitions|
|
|
1735
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"action", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::ActionAttrs, selector_bindings: []), multi: false, order: 0, selector_slot: nil)
|
|
1736
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
1737
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
706
1738
|
# @private
|
|
707
|
-
|
|
1739
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
708
1740
|
end
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
# match. Omitting attribute is treated as wildcarding all corresponding
|
|
713
|
-
# fields. Optional for all requests. If not present, all flow key bits
|
|
714
|
-
# are exact match bits.
|
|
715
|
-
class Mask < Attribute
|
|
716
|
-
TYPE = 7
|
|
717
|
-
NAME = :"mask"
|
|
1741
|
+
end
|
|
1742
|
+
class VxlanExtAttrs
|
|
1743
|
+
module Definitions
|
|
718
1744
|
# @private
|
|
719
|
-
|
|
1745
|
+
BY_TYPE = ::Array.new(2).tap do |definitions|
|
|
1746
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"gbp", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 0, selector_slot: nil)
|
|
1747
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
1748
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
1749
|
+
# @private
|
|
1750
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
720
1751
|
end
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
NAME = :"probe"
|
|
1752
|
+
end
|
|
1753
|
+
class PsampleAttrs
|
|
1754
|
+
module Definitions
|
|
725
1755
|
# @private
|
|
726
|
-
|
|
1756
|
+
BY_TYPE = ::Array.new(3).tap do |definitions|
|
|
1757
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"group", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 0, selector_slot: nil)
|
|
1758
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"cookie", datatype: ::Nl::DataTypes::Binary.new, multi: false, order: 1, selector_slot: nil)
|
|
1759
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
1760
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
727
1761
|
# @private
|
|
728
|
-
|
|
1762
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
1763
|
+
end
|
|
1764
|
+
end
|
|
1765
|
+
end
|
|
1766
|
+
module Messages
|
|
1767
|
+
# Get / dump OVS flow configuration and state
|
|
1768
|
+
class DoGetRequest < ::Nl::Message
|
|
1769
|
+
TYPE = 3
|
|
1770
|
+
FIXED_HEADER = Structs::OvsHeader
|
|
1771
|
+
ATTRIBUTE_SET = AttributeSets::FlowAttrs
|
|
1772
|
+
ATTRIBUTES = %i[key ufid ufid_flags].freeze
|
|
1773
|
+
include ATTRIBUTE_SET::Definitions
|
|
1774
|
+
def initialize(dp_ifindex, attributes = [])
|
|
1775
|
+
@dp_ifindex = dp_ifindex
|
|
1776
|
+
@attributes = attributes
|
|
1777
|
+
end
|
|
1778
|
+
# @private
|
|
1779
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1780
|
+
validate_params(params, FIXED_HEADER.members, ATTRIBUTES)
|
|
1781
|
+
new(
|
|
1782
|
+
FIXED_HEADER::MEMBERS[:"dp_ifindex"].coerce(params.fetch(:"dp_ifindex", 0)),
|
|
1783
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1784
|
+
)
|
|
1785
|
+
end
|
|
1786
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1787
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1788
|
+
def self.decode(decoder)
|
|
1789
|
+
value_0 = decoder.get_host_u32
|
|
1790
|
+
new(value_0, decode_attributes(decoder, BY_TYPE, 0))
|
|
1791
|
+
end
|
|
1792
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1793
|
+
FIXED_HEADER::MEMBERS[:"dp_ifindex"].encode(encoder, @dp_ifindex)
|
|
1794
|
+
encode_attributes(encoder, external_selectors:)
|
|
729
1795
|
end
|
|
1796
|
+
# ifindex of local port for datapath (0 to make a request not specific
|
|
1797
|
+
# to a datapath).
|
|
1798
|
+
# @rbs return: ::Integer
|
|
1799
|
+
# @return [Integer]
|
|
1800
|
+
def dp_ifindex; @dp_ifindex; end
|
|
1801
|
+
# Nested attributes specifying the flow key. Always present in
|
|
1802
|
+
# notifications. Required for all requests (except dumps).
|
|
1803
|
+
# @rbs return: AttributeSets::KeyAttrs
|
|
1804
|
+
# @return [AttributeSets::KeyAttrs]
|
|
1805
|
+
def key; self[:"key"]; end
|
|
730
1806
|
# A value between 1-16 octets specifying a unique identifier for the
|
|
731
1807
|
# flow. Causes the flow to be indexed by this value rather than the
|
|
732
1808
|
# value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
|
|
733
1809
|
# requests. Present in notifications if the flow was created with this
|
|
734
1810
|
# attribute.
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
# @private
|
|
739
|
-
ORDER = 8
|
|
740
|
-
# @private
|
|
741
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
742
|
-
end
|
|
1811
|
+
# @rbs return: ::String
|
|
1812
|
+
# @return [String]
|
|
1813
|
+
def ufid; self[:"ufid"]; end
|
|
743
1814
|
# A 32-bit value of ORed flags that provide alternative semantics for
|
|
744
1815
|
# flow installation and retrieval. Optional for all requests.
|
|
745
1816
|
#
|
|
746
1817
|
#
|
|
747
1818
|
# Known flags are defined in {Flags::OvsUfidFlags}.
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
1819
|
+
# @rbs return: ::Integer
|
|
1820
|
+
# @return [Integer]
|
|
1821
|
+
def ufid_flags; self[:"ufid_flags"]; end
|
|
1822
|
+
end
|
|
1823
|
+
# Get / dump OVS flow configuration and state
|
|
1824
|
+
class DoGetReply < ::Nl::Message
|
|
1825
|
+
TYPE = 3
|
|
1826
|
+
FIXED_HEADER = Structs::OvsHeader
|
|
1827
|
+
ATTRIBUTE_SET = AttributeSets::FlowAttrs
|
|
1828
|
+
ATTRIBUTES = %i[key actions stats mask ufid].freeze
|
|
1829
|
+
include ATTRIBUTE_SET::Definitions
|
|
1830
|
+
def initialize(dp_ifindex, attributes = [])
|
|
1831
|
+
@dp_ifindex = dp_ifindex
|
|
1832
|
+
@attributes = attributes
|
|
763
1833
|
end
|
|
764
1834
|
# @private
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
1835
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1836
|
+
validate_params(params, FIXED_HEADER.members, ATTRIBUTES)
|
|
1837
|
+
new(
|
|
1838
|
+
FIXED_HEADER::MEMBERS[:"dp_ifindex"].coerce(params.fetch(:"dp_ifindex", 0)),
|
|
1839
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1840
|
+
)
|
|
1841
|
+
end
|
|
1842
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1843
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1844
|
+
def self.decode(decoder)
|
|
1845
|
+
value_0 = decoder.get_host_u32
|
|
1846
|
+
new(value_0, decode_attributes(decoder, BY_TYPE, 0))
|
|
1847
|
+
end
|
|
1848
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1849
|
+
FIXED_HEADER::MEMBERS[:"dp_ifindex"].encode(encoder, @dp_ifindex)
|
|
1850
|
+
encode_attributes(encoder, external_selectors:)
|
|
1851
|
+
end
|
|
1852
|
+
# ifindex of local port for datapath (0 to make a request not specific
|
|
1853
|
+
# to a datapath).
|
|
1854
|
+
# @rbs return: ::Integer
|
|
1855
|
+
# @return [Integer]
|
|
1856
|
+
def dp_ifindex; @dp_ifindex; end
|
|
768
1857
|
# Nested attributes specifying the flow key. Always present in
|
|
769
1858
|
# notifications. Required for all requests (except dumps).
|
|
770
1859
|
# @rbs return: AttributeSets::KeyAttrs
|
|
771
1860
|
# @return [AttributeSets::KeyAttrs]
|
|
772
|
-
|
|
773
|
-
def key; self[:"key"]&.value; end
|
|
1861
|
+
def key; self[:"key"]; end
|
|
774
1862
|
# Nested attributes specifying the actions to take for packets that
|
|
775
1863
|
# match the key. Always present in notifications. Required for
|
|
776
1864
|
# OVS_FLOW_CMD_NEW requests, optional for OVS_FLOW_CMD_SET requests. An
|
|
@@ -779,36 +1867,12 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
779
1867
|
# nested attributes must be given.
|
|
780
1868
|
# @rbs return: AttributeSets::ActionAttrs
|
|
781
1869
|
# @return [AttributeSets::ActionAttrs]
|
|
782
|
-
|
|
783
|
-
def actions; self[:"actions"]&.value; end
|
|
1870
|
+
def actions; self[:"actions"]; end
|
|
784
1871
|
# Statistics for this flow. Present in notifications if the stats would
|
|
785
1872
|
# be nonzero. Ignored in requests.
|
|
786
1873
|
# @rbs return: Structs::OvsFlowStats
|
|
787
1874
|
# @return [Structs::OvsFlowStats]
|
|
788
|
-
|
|
789
|
-
def stats; self[:"stats"]&.value; end
|
|
790
|
-
# An 8-bit value giving the ORed value of all of the TCP flags seen on
|
|
791
|
-
# packets in this flow. Only present in notifications for TCP flows, and
|
|
792
|
-
# only if it would be nonzero. Ignored in requests.
|
|
793
|
-
# @rbs return: ::Integer
|
|
794
|
-
# @return [Integer]
|
|
795
|
-
# @see TcpFlags
|
|
796
|
-
def tcp_flags; self[:"tcp_flags"]&.value; end
|
|
797
|
-
# A 64-bit integer giving the time, in milliseconds on the system
|
|
798
|
-
# monotonic clock, at which a packet was last processed for this
|
|
799
|
-
# flow. Only present in notifications if a packet has been processed for
|
|
800
|
-
# this flow. Ignored in requests.
|
|
801
|
-
# @rbs return: ::Integer
|
|
802
|
-
# @return [Integer]
|
|
803
|
-
# @see Used
|
|
804
|
-
def used; self[:"used"]&.value; end
|
|
805
|
-
# If present in a OVS_FLOW_CMD_SET request, clears the last-used time,
|
|
806
|
-
# accumulated TCP flags, and statistics for this flow. Otherwise
|
|
807
|
-
# ignored in requests. Never present in notifications.
|
|
808
|
-
# @rbs return: ::Integer
|
|
809
|
-
# @return [Integer]
|
|
810
|
-
# @see Clear
|
|
811
|
-
def clear; self[:"clear"]&.value; end
|
|
1875
|
+
def stats; self[:"stats"]; end
|
|
812
1876
|
# Nested attributes specifying the mask bits for wildcarded flow
|
|
813
1877
|
# match. Mask bit value '1' specifies exact match with corresponding
|
|
814
1878
|
# flow key bit, while mask bit value '0' specifies a wildcarded
|
|
@@ -817,13 +1881,55 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
817
1881
|
# are exact match bits.
|
|
818
1882
|
# @rbs return: AttributeSets::KeyAttrs
|
|
819
1883
|
# @return [AttributeSets::KeyAttrs]
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
#
|
|
1884
|
+
def mask; self[:"mask"]; end
|
|
1885
|
+
# A value between 1-16 octets specifying a unique identifier for the
|
|
1886
|
+
# flow. Causes the flow to be indexed by this value rather than the
|
|
1887
|
+
# value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
|
|
1888
|
+
# requests. Present in notifications if the flow was created with this
|
|
1889
|
+
# attribute.
|
|
823
1890
|
# @rbs return: ::String
|
|
824
1891
|
# @return [String]
|
|
825
|
-
|
|
826
|
-
|
|
1892
|
+
def ufid; self[:"ufid"]; end
|
|
1893
|
+
end
|
|
1894
|
+
# Get / dump OVS flow configuration and state
|
|
1895
|
+
class DumpGetRequest < ::Nl::Message
|
|
1896
|
+
TYPE = 3
|
|
1897
|
+
FIXED_HEADER = Structs::OvsHeader
|
|
1898
|
+
ATTRIBUTE_SET = AttributeSets::FlowAttrs
|
|
1899
|
+
ATTRIBUTES = %i[key ufid ufid_flags].freeze
|
|
1900
|
+
include ATTRIBUTE_SET::Definitions
|
|
1901
|
+
def initialize(dp_ifindex, attributes = [])
|
|
1902
|
+
@dp_ifindex = dp_ifindex
|
|
1903
|
+
@attributes = attributes
|
|
1904
|
+
end
|
|
1905
|
+
# @private
|
|
1906
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1907
|
+
validate_params(params, FIXED_HEADER.members, ATTRIBUTES)
|
|
1908
|
+
new(
|
|
1909
|
+
FIXED_HEADER::MEMBERS[:"dp_ifindex"].coerce(params.fetch(:"dp_ifindex", 0)),
|
|
1910
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1911
|
+
)
|
|
1912
|
+
end
|
|
1913
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1914
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1915
|
+
def self.decode(decoder)
|
|
1916
|
+
value_0 = decoder.get_host_u32
|
|
1917
|
+
new(value_0, decode_attributes(decoder, BY_TYPE, 0))
|
|
1918
|
+
end
|
|
1919
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1920
|
+
FIXED_HEADER::MEMBERS[:"dp_ifindex"].encode(encoder, @dp_ifindex)
|
|
1921
|
+
encode_attributes(encoder, external_selectors:)
|
|
1922
|
+
end
|
|
1923
|
+
# ifindex of local port for datapath (0 to make a request not specific
|
|
1924
|
+
# to a datapath).
|
|
1925
|
+
# @rbs return: ::Integer
|
|
1926
|
+
# @return [Integer]
|
|
1927
|
+
def dp_ifindex; @dp_ifindex; end
|
|
1928
|
+
# Nested attributes specifying the flow key. Always present in
|
|
1929
|
+
# notifications. Required for all requests (except dumps).
|
|
1930
|
+
# @rbs return: AttributeSets::KeyAttrs
|
|
1931
|
+
# @return [AttributeSets::KeyAttrs]
|
|
1932
|
+
def key; self[:"key"]; end
|
|
827
1933
|
# A value between 1-16 octets specifying a unique identifier for the
|
|
828
1934
|
# flow. Causes the flow to be indexed by this value rather than the
|
|
829
1935
|
# value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
|
|
@@ -831,8 +1937,7 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
831
1937
|
# attribute.
|
|
832
1938
|
# @rbs return: ::String
|
|
833
1939
|
# @return [String]
|
|
834
|
-
|
|
835
|
-
def ufid; self[:"ufid"]&.value; end
|
|
1940
|
+
def ufid; self[:"ufid"]; end
|
|
836
1941
|
# A 32-bit value of ORed flags that provide alternative semantics for
|
|
837
1942
|
# flow installation and retrieval. Optional for all requests.
|
|
838
1943
|
#
|
|
@@ -840,1892 +1945,118 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
840
1945
|
# Known flags are defined in {Flags::OvsUfidFlags}.
|
|
841
1946
|
# @rbs return: ::Integer
|
|
842
1947
|
# @return [Integer]
|
|
843
|
-
|
|
844
|
-
def ufid_flags; self[:"ufid_flags"]&.value; end
|
|
845
|
-
# @rbs return: ::String
|
|
846
|
-
# @return [String]
|
|
847
|
-
# @see Pad
|
|
848
|
-
def pad; self[:"pad"]&.value; end
|
|
849
|
-
class << self
|
|
850
|
-
# Looks up Attribute class by name.
|
|
851
|
-
# @rbs name: Symbol
|
|
852
|
-
# @rbs return: Attribute
|
|
853
|
-
# @param [Symbol] name
|
|
854
|
-
# @return [Attribute]
|
|
855
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
856
|
-
# Looks up Attribute class by type value.
|
|
857
|
-
# @rbs type: Integer
|
|
858
|
-
# @rbs return: Attribute
|
|
859
|
-
# @param [Integer] type
|
|
860
|
-
# @return [Attribute]
|
|
861
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
862
|
-
end
|
|
1948
|
+
def ufid_flags; self[:"ufid_flags"]; end
|
|
863
1949
|
end
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
1950
|
+
# Get / dump OVS flow configuration and state
|
|
1951
|
+
class DumpGetReply < ::Nl::Message
|
|
1952
|
+
TYPE = 3
|
|
1953
|
+
FIXED_HEADER = Structs::OvsHeader
|
|
1954
|
+
ATTRIBUTE_SET = AttributeSets::FlowAttrs
|
|
1955
|
+
ATTRIBUTES = %i[key actions stats mask ufid].freeze
|
|
1956
|
+
include ATTRIBUTE_SET::Definitions
|
|
1957
|
+
def initialize(dp_ifindex, attributes = [])
|
|
1958
|
+
@dp_ifindex = dp_ifindex
|
|
1959
|
+
@attributes = attributes
|
|
873
1960
|
end
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
1961
|
+
# @private
|
|
1962
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1963
|
+
validate_params(params, FIXED_HEADER.members, ATTRIBUTES)
|
|
1964
|
+
new(
|
|
1965
|
+
FIXED_HEADER::MEMBERS[:"dp_ifindex"].coerce(params.fetch(:"dp_ifindex", 0)),
|
|
1966
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1967
|
+
)
|
|
1968
|
+
end
|
|
1969
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1970
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1971
|
+
def self.decode(decoder)
|
|
1972
|
+
value_0 = decoder.get_host_u32
|
|
1973
|
+
new(value_0, decode_attributes(decoder, BY_TYPE, 0))
|
|
881
1974
|
end
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
# @private
|
|
886
|
-
ORDER = 2
|
|
887
|
-
# @private
|
|
888
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
1975
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1976
|
+
FIXED_HEADER::MEMBERS[:"dp_ifindex"].encode(encoder, @dp_ifindex)
|
|
1977
|
+
encode_attributes(encoder, external_selectors:)
|
|
889
1978
|
end
|
|
890
|
-
#
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
1979
|
+
# ifindex of local port for datapath (0 to make a request not specific
|
|
1980
|
+
# to a datapath).
|
|
1981
|
+
# @rbs return: ::Integer
|
|
1982
|
+
# @return [Integer]
|
|
1983
|
+
def dp_ifindex; @dp_ifindex; end
|
|
1984
|
+
# Nested attributes specifying the flow key. Always present in
|
|
1985
|
+
# notifications. Required for all requests (except dumps).
|
|
1986
|
+
# @rbs return: AttributeSets::KeyAttrs
|
|
1987
|
+
# @return [AttributeSets::KeyAttrs]
|
|
1988
|
+
def key; self[:"key"]; end
|
|
1989
|
+
# Nested attributes specifying the actions to take for packets that
|
|
1990
|
+
# match the key. Always present in notifications. Required for
|
|
1991
|
+
# OVS_FLOW_CMD_NEW requests, optional for OVS_FLOW_CMD_SET requests. An
|
|
1992
|
+
# OVS_FLOW_CMD_SET without OVS_FLOW_ATTR_ACTIONS will not modify the
|
|
1993
|
+
# actions. To clear the actions, an OVS_FLOW_ATTR_ACTIONS without any
|
|
1994
|
+
# nested attributes must be given.
|
|
1995
|
+
# @rbs return: AttributeSets::ActionAttrs
|
|
1996
|
+
# @return [AttributeSets::ActionAttrs]
|
|
1997
|
+
def actions; self[:"actions"]; end
|
|
1998
|
+
# Statistics for this flow. Present in notifications if the stats would
|
|
1999
|
+
# be nonzero. Ignored in requests.
|
|
2000
|
+
# @rbs return: Structs::OvsFlowStats
|
|
2001
|
+
# @return [Structs::OvsFlowStats]
|
|
2002
|
+
def stats; self[:"stats"]; end
|
|
2003
|
+
# Nested attributes specifying the mask bits for wildcarded flow
|
|
2004
|
+
# match. Mask bit value '1' specifies exact match with corresponding
|
|
2005
|
+
# flow key bit, while mask bit value '0' specifies a wildcarded
|
|
2006
|
+
# match. Omitting attribute is treated as wildcarding all corresponding
|
|
2007
|
+
# fields. Optional for all requests. If not present, all flow key bits
|
|
2008
|
+
# are exact match bits.
|
|
2009
|
+
# @rbs return: AttributeSets::KeyAttrs
|
|
2010
|
+
# @return [AttributeSets::KeyAttrs]
|
|
2011
|
+
def mask; self[:"mask"]; end
|
|
2012
|
+
# A value between 1-16 octets specifying a unique identifier for the
|
|
2013
|
+
# flow. Causes the flow to be indexed by this value rather than the
|
|
2014
|
+
# value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
|
|
2015
|
+
# requests. Present in notifications if the flow was created with this
|
|
2016
|
+
# attribute.
|
|
2017
|
+
# @rbs return: ::String
|
|
2018
|
+
# @return [String]
|
|
2019
|
+
def ufid; self[:"ufid"]; end
|
|
2020
|
+
end
|
|
2021
|
+
# Create OVS flow configuration in a data path
|
|
2022
|
+
class DoNewRequest < ::Nl::Message
|
|
2023
|
+
TYPE = 1
|
|
2024
|
+
FIXED_HEADER = Structs::OvsHeader
|
|
2025
|
+
ATTRIBUTE_SET = AttributeSets::FlowAttrs
|
|
2026
|
+
ATTRIBUTES = %i[key actions mask ufid].freeze
|
|
2027
|
+
include ATTRIBUTE_SET::Definitions
|
|
2028
|
+
def initialize(dp_ifindex, attributes = [])
|
|
2029
|
+
@dp_ifindex = dp_ifindex
|
|
2030
|
+
@attributes = attributes
|
|
898
2031
|
end
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
2032
|
+
# @private
|
|
2033
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2034
|
+
validate_params(params, FIXED_HEADER.members, ATTRIBUTES)
|
|
2035
|
+
new(
|
|
2036
|
+
FIXED_HEADER::MEMBERS[:"dp_ifindex"].coerce(params.fetch(:"dp_ifindex", 0)),
|
|
2037
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
2038
|
+
)
|
|
2039
|
+
end
|
|
2040
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
2041
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
2042
|
+
def self.decode(decoder)
|
|
2043
|
+
value_0 = decoder.get_host_u32
|
|
2044
|
+
new(value_0, decode_attributes(decoder, BY_TYPE, 0))
|
|
906
2045
|
end
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
# @private
|
|
911
|
-
ORDER = 5
|
|
912
|
-
# @private
|
|
913
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
|
|
2046
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2047
|
+
FIXED_HEADER::MEMBERS[:"dp_ifindex"].encode(encoder, @dp_ifindex)
|
|
2048
|
+
encode_attributes(encoder, external_selectors:)
|
|
914
2049
|
end
|
|
915
|
-
class Ipv4 < Attribute
|
|
916
|
-
TYPE = 7
|
|
917
|
-
NAME = :"ipv4"
|
|
918
|
-
# @private
|
|
919
|
-
ORDER = 6
|
|
920
|
-
# @private
|
|
921
|
-
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyIpv4, check: nil, consume_remaining: true)
|
|
922
|
-
end
|
|
923
|
-
# struct ovs_key_ipv6
|
|
924
|
-
class Ipv6 < Attribute
|
|
925
|
-
TYPE = 8
|
|
926
|
-
NAME = :"ipv6"
|
|
927
|
-
# @private
|
|
928
|
-
ORDER = 7
|
|
929
|
-
# @private
|
|
930
|
-
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyIpv6, check: nil, consume_remaining: true)
|
|
931
|
-
end
|
|
932
|
-
class Tcp < Attribute
|
|
933
|
-
TYPE = 9
|
|
934
|
-
NAME = :"tcp"
|
|
935
|
-
# @private
|
|
936
|
-
ORDER = 8
|
|
937
|
-
# @private
|
|
938
|
-
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyTcp, check: nil, consume_remaining: true)
|
|
939
|
-
end
|
|
940
|
-
class Udp < Attribute
|
|
941
|
-
TYPE = 10
|
|
942
|
-
NAME = :"udp"
|
|
943
|
-
# @private
|
|
944
|
-
ORDER = 9
|
|
945
|
-
# @private
|
|
946
|
-
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyUdp, check: nil, consume_remaining: true)
|
|
947
|
-
end
|
|
948
|
-
class Icmp < Attribute
|
|
949
|
-
TYPE = 11
|
|
950
|
-
NAME = :"icmp"
|
|
951
|
-
# @private
|
|
952
|
-
ORDER = 10
|
|
953
|
-
# @private
|
|
954
|
-
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyIcmp, check: nil, consume_remaining: true)
|
|
955
|
-
end
|
|
956
|
-
class Icmpv6 < Attribute
|
|
957
|
-
TYPE = 12
|
|
958
|
-
NAME = :"icmpv6"
|
|
959
|
-
# @private
|
|
960
|
-
ORDER = 11
|
|
961
|
-
# @private
|
|
962
|
-
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyIcmp, check: nil, consume_remaining: true)
|
|
963
|
-
end
|
|
964
|
-
# struct ovs_key_arp
|
|
965
|
-
class Arp < Attribute
|
|
966
|
-
TYPE = 13
|
|
967
|
-
NAME = :"arp"
|
|
968
|
-
# @private
|
|
969
|
-
ORDER = 12
|
|
970
|
-
# @private
|
|
971
|
-
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyArp, check: nil, consume_remaining: true)
|
|
972
|
-
end
|
|
973
|
-
# struct ovs_key_nd
|
|
974
|
-
class Nd < Attribute
|
|
975
|
-
TYPE = 14
|
|
976
|
-
NAME = :"nd"
|
|
977
|
-
# @private
|
|
978
|
-
ORDER = 13
|
|
979
|
-
# @private
|
|
980
|
-
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyNd, check: nil, consume_remaining: true)
|
|
981
|
-
end
|
|
982
|
-
class SkbMark < Attribute
|
|
983
|
-
TYPE = 15
|
|
984
|
-
NAME = :"skb_mark"
|
|
985
|
-
# @private
|
|
986
|
-
ORDER = 14
|
|
987
|
-
# @private
|
|
988
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
989
|
-
end
|
|
990
|
-
class Tunnel < Attribute
|
|
991
|
-
TYPE = 16
|
|
992
|
-
NAME = :"tunnel"
|
|
993
|
-
# @private
|
|
994
|
-
ORDER = 15
|
|
995
|
-
end
|
|
996
|
-
class Sctp < Attribute
|
|
997
|
-
TYPE = 17
|
|
998
|
-
NAME = :"sctp"
|
|
999
|
-
# @private
|
|
1000
|
-
ORDER = 16
|
|
1001
|
-
# @private
|
|
1002
|
-
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeySctp, check: nil, consume_remaining: true)
|
|
1003
|
-
end
|
|
1004
|
-
class TcpFlags < Attribute
|
|
1005
|
-
TYPE = 18
|
|
1006
|
-
NAME = :"tcp_flags"
|
|
1007
|
-
# @private
|
|
1008
|
-
ORDER = 17
|
|
1009
|
-
# @private
|
|
1010
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
|
|
1011
|
-
end
|
|
1012
|
-
# Value 0 indicates the hash is not computed by the datapath.
|
|
1013
|
-
class DpHash < Attribute
|
|
1014
|
-
TYPE = 19
|
|
1015
|
-
NAME = :"dp_hash"
|
|
1016
|
-
# @private
|
|
1017
|
-
ORDER = 18
|
|
1018
|
-
# @private
|
|
1019
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
1020
|
-
end
|
|
1021
|
-
class RecircId < Attribute
|
|
1022
|
-
TYPE = 20
|
|
1023
|
-
NAME = :"recirc_id"
|
|
1024
|
-
# @private
|
|
1025
|
-
ORDER = 19
|
|
1026
|
-
# @private
|
|
1027
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
1028
|
-
end
|
|
1029
|
-
class Mpls < Attribute
|
|
1030
|
-
TYPE = 21
|
|
1031
|
-
NAME = :"mpls"
|
|
1032
|
-
# @private
|
|
1033
|
-
ORDER = 20
|
|
1034
|
-
# @private
|
|
1035
|
-
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyMpls, check: nil, consume_remaining: true)
|
|
1036
|
-
end
|
|
1037
|
-
# Known flags are defined in {Flags::CtStateFlags}.
|
|
1038
|
-
class CtState < Attribute
|
|
1039
|
-
TYPE = 22
|
|
1040
|
-
NAME = :"ct_state"
|
|
1041
|
-
# @private
|
|
1042
|
-
ORDER = 21
|
|
1043
|
-
# @private
|
|
1044
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
1045
|
-
end
|
|
1046
|
-
# connection tracking zone
|
|
1047
|
-
class CtZone < Attribute
|
|
1048
|
-
TYPE = 23
|
|
1049
|
-
NAME = :"ct_zone"
|
|
1050
|
-
# @private
|
|
1051
|
-
ORDER = 22
|
|
1052
|
-
# @private
|
|
1053
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
|
|
1054
|
-
end
|
|
1055
|
-
# connection tracking mark
|
|
1056
|
-
class CtMark < Attribute
|
|
1057
|
-
TYPE = 24
|
|
1058
|
-
NAME = :"ct_mark"
|
|
1059
|
-
# @private
|
|
1060
|
-
ORDER = 23
|
|
1061
|
-
# @private
|
|
1062
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
1063
|
-
end
|
|
1064
|
-
# 16-octet connection tracking label
|
|
1065
|
-
class CtLabels < Attribute
|
|
1066
|
-
TYPE = 25
|
|
1067
|
-
NAME = :"ct_labels"
|
|
1068
|
-
# @private
|
|
1069
|
-
ORDER = 24
|
|
1070
|
-
# @private
|
|
1071
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
1072
|
-
end
|
|
1073
|
-
class CtOrigTupleIpv4 < Attribute
|
|
1074
|
-
TYPE = 26
|
|
1075
|
-
NAME = :"ct_orig_tuple_ipv4"
|
|
1076
|
-
# @private
|
|
1077
|
-
ORDER = 25
|
|
1078
|
-
# @private
|
|
1079
|
-
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyCtTupleIpv4, check: nil, consume_remaining: true)
|
|
1080
|
-
end
|
|
1081
|
-
# struct ovs_key_ct_tuple_ipv6
|
|
1082
|
-
class CtOrigTupleIpv6 < Attribute
|
|
1083
|
-
TYPE = 27
|
|
1084
|
-
NAME = :"ct_orig_tuple_ipv6"
|
|
1085
|
-
# @private
|
|
1086
|
-
ORDER = 26
|
|
1087
|
-
# @private
|
|
1088
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
1089
|
-
end
|
|
1090
|
-
class Nsh < Attribute
|
|
1091
|
-
TYPE = 28
|
|
1092
|
-
NAME = :"nsh"
|
|
1093
|
-
# @private
|
|
1094
|
-
ORDER = 27
|
|
1095
|
-
end
|
|
1096
|
-
# Should not be sent to the kernel
|
|
1097
|
-
class PacketType < Attribute
|
|
1098
|
-
TYPE = 29
|
|
1099
|
-
NAME = :"packet_type"
|
|
1100
|
-
# @private
|
|
1101
|
-
ORDER = 28
|
|
1102
|
-
# @private
|
|
1103
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)
|
|
1104
|
-
end
|
|
1105
|
-
# Should not be sent to the kernel
|
|
1106
|
-
class NdExtensions < Attribute
|
|
1107
|
-
TYPE = 30
|
|
1108
|
-
NAME = :"nd_extensions"
|
|
1109
|
-
# @private
|
|
1110
|
-
ORDER = 29
|
|
1111
|
-
# @private
|
|
1112
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
1113
|
-
end
|
|
1114
|
-
# struct ip_tunnel_info
|
|
1115
|
-
class TunnelInfo < Attribute
|
|
1116
|
-
TYPE = 31
|
|
1117
|
-
NAME = :"tunnel_info"
|
|
1118
|
-
# @private
|
|
1119
|
-
ORDER = 30
|
|
1120
|
-
# @private
|
|
1121
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
1122
|
-
end
|
|
1123
|
-
# struct ovs_key_ipv6_exthdr
|
|
1124
|
-
class Ipv6Exthdrs < Attribute
|
|
1125
|
-
TYPE = 32
|
|
1126
|
-
NAME = :"ipv6_exthdrs"
|
|
1127
|
-
# @private
|
|
1128
|
-
ORDER = 31
|
|
1129
|
-
# @private
|
|
1130
|
-
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyIpv6Exthdrs, check: nil, consume_remaining: true)
|
|
1131
|
-
end
|
|
1132
|
-
# @private
|
|
1133
|
-
BY_NAME = Ractor.make_shareable({:"encap" => Encap, :"priority" => Priority, :"in_port" => InPort, :"ethernet" => Ethernet, :"vlan" => Vlan, :"ethertype" => Ethertype, :"ipv4" => Ipv4, :"ipv6" => Ipv6, :"tcp" => Tcp, :"udp" => Udp, :"icmp" => Icmp, :"icmpv6" => Icmpv6, :"arp" => Arp, :"nd" => Nd, :"skb_mark" => SkbMark, :"tunnel" => Tunnel, :"sctp" => Sctp, :"tcp_flags" => TcpFlags, :"dp_hash" => DpHash, :"recirc_id" => RecircId, :"mpls" => Mpls, :"ct_state" => CtState, :"ct_zone" => CtZone, :"ct_mark" => CtMark, :"ct_labels" => CtLabels, :"ct_orig_tuple_ipv4" => CtOrigTupleIpv4, :"ct_orig_tuple_ipv6" => CtOrigTupleIpv6, :"nsh" => Nsh, :"packet_type" => PacketType, :"nd_extensions" => NdExtensions, :"tunnel_info" => TunnelInfo, :"ipv6_exthdrs" => Ipv6Exthdrs}) #: Hash[::Symbol, Attribute]
|
|
1134
|
-
# @private
|
|
1135
|
-
BY_TYPE = Ractor.make_shareable({1 => Encap, 2 => Priority, 3 => InPort, 4 => Ethernet, 5 => Vlan, 6 => Ethertype, 7 => Ipv4, 8 => Ipv6, 9 => Tcp, 10 => Udp, 11 => Icmp, 12 => Icmpv6, 13 => Arp, 14 => Nd, 15 => SkbMark, 16 => Tunnel, 17 => Sctp, 18 => TcpFlags, 19 => DpHash, 20 => RecircId, 21 => Mpls, 22 => CtState, 23 => CtZone, 24 => CtMark, 25 => CtLabels, 26 => CtOrigTupleIpv4, 27 => CtOrigTupleIpv6, 28 => Nsh, 29 => PacketType, 30 => NdExtensions, 31 => TunnelInfo, 32 => Ipv6Exthdrs}) #: Hash[::Integer, Attribute]
|
|
1136
|
-
# @rbs return: AttributeSets::KeyAttrs
|
|
1137
|
-
# @return [AttributeSets::KeyAttrs]
|
|
1138
|
-
# @see Encap
|
|
1139
|
-
def encap; self[:"encap"]&.value; end
|
|
1140
|
-
# @rbs return: ::Integer
|
|
1141
|
-
# @return [Integer]
|
|
1142
|
-
# @see Priority
|
|
1143
|
-
def priority; self[:"priority"]&.value; end
|
|
1144
|
-
# @rbs return: ::Integer
|
|
1145
|
-
# @return [Integer]
|
|
1146
|
-
# @see InPort
|
|
1147
|
-
def in_port; self[:"in_port"]&.value; end
|
|
1148
|
-
# struct ovs_key_ethernet
|
|
1149
|
-
# @rbs return: Structs::OvsKeyEthernet
|
|
1150
|
-
# @return [Structs::OvsKeyEthernet]
|
|
1151
|
-
# @see Ethernet
|
|
1152
|
-
def ethernet; self[:"ethernet"]&.value; end
|
|
1153
|
-
# @rbs return: ::Integer
|
|
1154
|
-
# @return [Integer]
|
|
1155
|
-
# @see Vlan
|
|
1156
|
-
def vlan; self[:"vlan"]&.value; end
|
|
1157
|
-
# @rbs return: ::Integer
|
|
1158
|
-
# @return [Integer]
|
|
1159
|
-
# @see Ethertype
|
|
1160
|
-
def ethertype; self[:"ethertype"]&.value; end
|
|
1161
|
-
# @rbs return: Structs::OvsKeyIpv4
|
|
1162
|
-
# @return [Structs::OvsKeyIpv4]
|
|
1163
|
-
# @see Ipv4
|
|
1164
|
-
def ipv4; self[:"ipv4"]&.value; end
|
|
1165
|
-
# struct ovs_key_ipv6
|
|
1166
|
-
# @rbs return: Structs::OvsKeyIpv6
|
|
1167
|
-
# @return [Structs::OvsKeyIpv6]
|
|
1168
|
-
# @see Ipv6
|
|
1169
|
-
def ipv6; self[:"ipv6"]&.value; end
|
|
1170
|
-
# @rbs return: Structs::OvsKeyTcp
|
|
1171
|
-
# @return [Structs::OvsKeyTcp]
|
|
1172
|
-
# @see Tcp
|
|
1173
|
-
def tcp; self[:"tcp"]&.value; end
|
|
1174
|
-
# @rbs return: Structs::OvsKeyUdp
|
|
1175
|
-
# @return [Structs::OvsKeyUdp]
|
|
1176
|
-
# @see Udp
|
|
1177
|
-
def udp; self[:"udp"]&.value; end
|
|
1178
|
-
# @rbs return: Structs::OvsKeyIcmp
|
|
1179
|
-
# @return [Structs::OvsKeyIcmp]
|
|
1180
|
-
# @see Icmp
|
|
1181
|
-
def icmp; self[:"icmp"]&.value; end
|
|
1182
|
-
# @rbs return: Structs::OvsKeyIcmp
|
|
1183
|
-
# @return [Structs::OvsKeyIcmp]
|
|
1184
|
-
# @see Icmpv6
|
|
1185
|
-
def icmpv6; self[:"icmpv6"]&.value; end
|
|
1186
|
-
# struct ovs_key_arp
|
|
1187
|
-
# @rbs return: Structs::OvsKeyArp
|
|
1188
|
-
# @return [Structs::OvsKeyArp]
|
|
1189
|
-
# @see Arp
|
|
1190
|
-
def arp; self[:"arp"]&.value; end
|
|
1191
|
-
# struct ovs_key_nd
|
|
1192
|
-
# @rbs return: Structs::OvsKeyNd
|
|
1193
|
-
# @return [Structs::OvsKeyNd]
|
|
1194
|
-
# @see Nd
|
|
1195
|
-
def nd; self[:"nd"]&.value; end
|
|
1196
|
-
# @rbs return: ::Integer
|
|
1197
|
-
# @return [Integer]
|
|
1198
|
-
# @see SkbMark
|
|
1199
|
-
def skb_mark; self[:"skb_mark"]&.value; end
|
|
1200
|
-
# @rbs return: AttributeSets::TunnelKeyAttrs
|
|
1201
|
-
# @return [AttributeSets::TunnelKeyAttrs]
|
|
1202
|
-
# @see Tunnel
|
|
1203
|
-
def tunnel; self[:"tunnel"]&.value; end
|
|
1204
|
-
# @rbs return: Structs::OvsKeySctp
|
|
1205
|
-
# @return [Structs::OvsKeySctp]
|
|
1206
|
-
# @see Sctp
|
|
1207
|
-
def sctp; self[:"sctp"]&.value; end
|
|
1208
|
-
# @rbs return: ::Integer
|
|
1209
|
-
# @return [Integer]
|
|
1210
|
-
# @see TcpFlags
|
|
1211
|
-
def tcp_flags; self[:"tcp_flags"]&.value; end
|
|
1212
|
-
# Value 0 indicates the hash is not computed by the datapath.
|
|
1213
|
-
# @rbs return: ::Integer
|
|
1214
|
-
# @return [Integer]
|
|
1215
|
-
# @see DpHash
|
|
1216
|
-
def dp_hash; self[:"dp_hash"]&.value; end
|
|
1217
|
-
# @rbs return: ::Integer
|
|
1218
|
-
# @return [Integer]
|
|
1219
|
-
# @see RecircId
|
|
1220
|
-
def recirc_id; self[:"recirc_id"]&.value; end
|
|
1221
|
-
# @rbs return: Structs::OvsKeyMpls
|
|
1222
|
-
# @return [Structs::OvsKeyMpls]
|
|
1223
|
-
# @see Mpls
|
|
1224
|
-
def mpls; self[:"mpls"]&.value; end
|
|
1225
|
-
# Known flags are defined in {Flags::CtStateFlags}.
|
|
1226
|
-
# @rbs return: ::Integer
|
|
1227
|
-
# @return [Integer]
|
|
1228
|
-
# @see CtState
|
|
1229
|
-
def ct_state; self[:"ct_state"]&.value; end
|
|
1230
|
-
# connection tracking zone
|
|
1231
|
-
# @rbs return: ::Integer
|
|
1232
|
-
# @return [Integer]
|
|
1233
|
-
# @see CtZone
|
|
1234
|
-
def ct_zone; self[:"ct_zone"]&.value; end
|
|
1235
|
-
# connection tracking mark
|
|
1236
|
-
# @rbs return: ::Integer
|
|
1237
|
-
# @return [Integer]
|
|
1238
|
-
# @see CtMark
|
|
1239
|
-
def ct_mark; self[:"ct_mark"]&.value; end
|
|
1240
|
-
# 16-octet connection tracking label
|
|
1241
|
-
# @rbs return: ::String
|
|
1242
|
-
# @return [String]
|
|
1243
|
-
# @see CtLabels
|
|
1244
|
-
def ct_labels; self[:"ct_labels"]&.value; end
|
|
1245
|
-
# @rbs return: Structs::OvsKeyCtTupleIpv4
|
|
1246
|
-
# @return [Structs::OvsKeyCtTupleIpv4]
|
|
1247
|
-
# @see CtOrigTupleIpv4
|
|
1248
|
-
def ct_orig_tuple_ipv4; self[:"ct_orig_tuple_ipv4"]&.value; end
|
|
1249
|
-
# struct ovs_key_ct_tuple_ipv6
|
|
1250
|
-
# @rbs return: ::String
|
|
1251
|
-
# @return [String]
|
|
1252
|
-
# @see CtOrigTupleIpv6
|
|
1253
|
-
def ct_orig_tuple_ipv6; self[:"ct_orig_tuple_ipv6"]&.value; end
|
|
1254
|
-
# @rbs return: AttributeSets::OvsNshKeyAttrs
|
|
1255
|
-
# @return [AttributeSets::OvsNshKeyAttrs]
|
|
1256
|
-
# @see Nsh
|
|
1257
|
-
def nsh; self[:"nsh"]&.value; end
|
|
1258
|
-
# Should not be sent to the kernel
|
|
1259
|
-
# @rbs return: ::Integer
|
|
1260
|
-
# @return [Integer]
|
|
1261
|
-
# @see PacketType
|
|
1262
|
-
def packet_type; self[:"packet_type"]&.value; end
|
|
1263
|
-
# Should not be sent to the kernel
|
|
1264
|
-
# @rbs return: ::String
|
|
1265
|
-
# @return [String]
|
|
1266
|
-
# @see NdExtensions
|
|
1267
|
-
def nd_extensions; self[:"nd_extensions"]&.value; end
|
|
1268
|
-
# struct ip_tunnel_info
|
|
1269
|
-
# @rbs return: ::String
|
|
1270
|
-
# @return [String]
|
|
1271
|
-
# @see TunnelInfo
|
|
1272
|
-
def tunnel_info; self[:"tunnel_info"]&.value; end
|
|
1273
|
-
# struct ovs_key_ipv6_exthdr
|
|
1274
|
-
# @rbs return: Structs::OvsKeyIpv6Exthdrs
|
|
1275
|
-
# @return [Structs::OvsKeyIpv6Exthdrs]
|
|
1276
|
-
# @see Ipv6Exthdrs
|
|
1277
|
-
def ipv6_exthdrs; self[:"ipv6_exthdrs"]&.value; end
|
|
1278
|
-
class << self
|
|
1279
|
-
# Looks up Attribute class by name.
|
|
1280
|
-
# @rbs name: Symbol
|
|
1281
|
-
# @rbs return: Attribute
|
|
1282
|
-
# @param [Symbol] name
|
|
1283
|
-
# @return [Attribute]
|
|
1284
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
1285
|
-
# Looks up Attribute class by type value.
|
|
1286
|
-
# @rbs type: Integer
|
|
1287
|
-
# @rbs return: Attribute
|
|
1288
|
-
# @param [Integer] type
|
|
1289
|
-
# @return [Attribute]
|
|
1290
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
1291
|
-
end
|
|
1292
|
-
end
|
|
1293
|
-
class ActionAttrs < ::Nl::AttributeSet
|
|
1294
|
-
# Abstract class
|
|
1295
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
1296
|
-
end
|
|
1297
|
-
# ovs port number in datapath
|
|
1298
|
-
class Output < Attribute
|
|
1299
|
-
TYPE = 1
|
|
1300
|
-
NAME = :"output"
|
|
1301
|
-
# @private
|
|
1302
|
-
ORDER = 0
|
|
1303
|
-
# @private
|
|
1304
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
1305
|
-
end
|
|
1306
|
-
class Userspace < Attribute
|
|
1307
|
-
TYPE = 2
|
|
1308
|
-
NAME = :"userspace"
|
|
1309
|
-
# @private
|
|
1310
|
-
ORDER = 1
|
|
1311
|
-
end
|
|
1312
|
-
# Replaces the contents of an existing header. The single nested
|
|
1313
|
-
# attribute specifies a header to modify and its value.
|
|
1314
|
-
class Set < Attribute
|
|
1315
|
-
TYPE = 3
|
|
1316
|
-
NAME = :"set"
|
|
1317
|
-
# @private
|
|
1318
|
-
ORDER = 2
|
|
1319
|
-
end
|
|
1320
|
-
# Push a new outermost 802.1Q or 802.1ad header onto the packet.
|
|
1321
|
-
class PushVlan < Attribute
|
|
1322
|
-
TYPE = 4
|
|
1323
|
-
NAME = :"push_vlan"
|
|
1324
|
-
# @private
|
|
1325
|
-
ORDER = 3
|
|
1326
|
-
# @private
|
|
1327
|
-
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsActionPushVlan, check: nil, consume_remaining: true)
|
|
1328
|
-
end
|
|
1329
|
-
# Pop the outermost 802.1Q or 802.1ad header from the packet.
|
|
1330
|
-
class PopVlan < Attribute
|
|
1331
|
-
TYPE = 5
|
|
1332
|
-
NAME = :"pop_vlan"
|
|
1333
|
-
# @private
|
|
1334
|
-
ORDER = 4
|
|
1335
|
-
# @private
|
|
1336
|
-
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
1337
|
-
end
|
|
1338
|
-
# Probabilistically executes actions, as specified in the nested
|
|
1339
|
-
# attributes.
|
|
1340
|
-
class Sample < Attribute
|
|
1341
|
-
TYPE = 6
|
|
1342
|
-
NAME = :"sample"
|
|
1343
|
-
# @private
|
|
1344
|
-
ORDER = 5
|
|
1345
|
-
end
|
|
1346
|
-
# recirc id
|
|
1347
|
-
class Recirc < Attribute
|
|
1348
|
-
TYPE = 7
|
|
1349
|
-
NAME = :"recirc"
|
|
1350
|
-
# @private
|
|
1351
|
-
ORDER = 6
|
|
1352
|
-
# @private
|
|
1353
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
1354
|
-
end
|
|
1355
|
-
class Hash < Attribute
|
|
1356
|
-
TYPE = 8
|
|
1357
|
-
NAME = :"hash"
|
|
1358
|
-
# @private
|
|
1359
|
-
ORDER = 7
|
|
1360
|
-
# @private
|
|
1361
|
-
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsActionHash, check: nil, consume_remaining: true)
|
|
1362
|
-
end
|
|
1363
|
-
# Push a new MPLS label stack entry onto the top of the packets MPLS
|
|
1364
|
-
# label stack. Set the ethertype of the encapsulating frame to either
|
|
1365
|
-
# ETH_P_MPLS_UC or ETH_P_MPLS_MC to indicate the new packet contents.
|
|
1366
|
-
class PushMpls < Attribute
|
|
1367
|
-
TYPE = 9
|
|
1368
|
-
NAME = :"push_mpls"
|
|
1369
|
-
# @private
|
|
1370
|
-
ORDER = 8
|
|
1371
|
-
# @private
|
|
1372
|
-
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsActionPushMpls, check: nil, consume_remaining: true)
|
|
1373
|
-
end
|
|
1374
|
-
# ethertype
|
|
1375
|
-
class PopMpls < Attribute
|
|
1376
|
-
TYPE = 10
|
|
1377
|
-
NAME = :"pop_mpls"
|
|
1378
|
-
# @private
|
|
1379
|
-
ORDER = 9
|
|
1380
|
-
# @private
|
|
1381
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
|
|
1382
|
-
end
|
|
1383
|
-
# Replaces the contents of an existing header. A nested attribute
|
|
1384
|
-
# specifies a header to modify, its value, and a mask. For every bit set
|
|
1385
|
-
# in the mask, the corresponding bit value is copied from the value to
|
|
1386
|
-
# the packet header field, rest of the bits are left unchanged. The
|
|
1387
|
-
# non-masked value bits must be passed in as zeroes. Masking is not
|
|
1388
|
-
# supported for the OVS_KEY_ATTR_TUNNEL attribute.
|
|
1389
|
-
class SetMasked < Attribute
|
|
1390
|
-
TYPE = 11
|
|
1391
|
-
NAME = :"set_masked"
|
|
1392
|
-
# @private
|
|
1393
|
-
ORDER = 10
|
|
1394
|
-
end
|
|
1395
|
-
# Track the connection. Populate the conntrack-related entries
|
|
1396
|
-
# in the flow key.
|
|
1397
|
-
class Ct < Attribute
|
|
1398
|
-
TYPE = 12
|
|
1399
|
-
NAME = :"ct"
|
|
1400
|
-
# @private
|
|
1401
|
-
ORDER = 11
|
|
1402
|
-
end
|
|
1403
|
-
# struct ovs_action_trunc is a u32 max length
|
|
1404
|
-
class Trunc < Attribute
|
|
1405
|
-
TYPE = 13
|
|
1406
|
-
NAME = :"trunc"
|
|
1407
|
-
# @private
|
|
1408
|
-
ORDER = 12
|
|
1409
|
-
# @private
|
|
1410
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
1411
|
-
end
|
|
1412
|
-
# struct ovs_action_push_eth
|
|
1413
|
-
class PushEth < Attribute
|
|
1414
|
-
TYPE = 14
|
|
1415
|
-
NAME = :"push_eth"
|
|
1416
|
-
# @private
|
|
1417
|
-
ORDER = 13
|
|
1418
|
-
# @private
|
|
1419
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
1420
|
-
end
|
|
1421
|
-
class PopEth < Attribute
|
|
1422
|
-
TYPE = 15
|
|
1423
|
-
NAME = :"pop_eth"
|
|
1424
|
-
# @private
|
|
1425
|
-
ORDER = 14
|
|
1426
|
-
# @private
|
|
1427
|
-
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
1428
|
-
end
|
|
1429
|
-
class CtClear < Attribute
|
|
1430
|
-
TYPE = 16
|
|
1431
|
-
NAME = :"ct_clear"
|
|
1432
|
-
# @private
|
|
1433
|
-
ORDER = 15
|
|
1434
|
-
# @private
|
|
1435
|
-
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
1436
|
-
end
|
|
1437
|
-
# Push NSH header to the packet.
|
|
1438
|
-
class PushNsh < Attribute
|
|
1439
|
-
TYPE = 17
|
|
1440
|
-
NAME = :"push_nsh"
|
|
1441
|
-
# @private
|
|
1442
|
-
ORDER = 16
|
|
1443
|
-
end
|
|
1444
|
-
# Pop the outermost NSH header off the packet.
|
|
1445
|
-
class PopNsh < Attribute
|
|
1446
|
-
TYPE = 18
|
|
1447
|
-
NAME = :"pop_nsh"
|
|
1448
|
-
# @private
|
|
1449
|
-
ORDER = 17
|
|
1450
|
-
# @private
|
|
1451
|
-
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
1452
|
-
end
|
|
1453
|
-
# Run packet through a meter, which may drop the packet, or modify the
|
|
1454
|
-
# packet (e.g., change the DSCP field)
|
|
1455
|
-
class Meter < Attribute
|
|
1456
|
-
TYPE = 19
|
|
1457
|
-
NAME = :"meter"
|
|
1458
|
-
# @private
|
|
1459
|
-
ORDER = 18
|
|
1460
|
-
# @private
|
|
1461
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
1462
|
-
end
|
|
1463
|
-
# Make a copy of the packet and execute a list of actions without
|
|
1464
|
-
# affecting the original packet and key.
|
|
1465
|
-
class Clone < Attribute
|
|
1466
|
-
TYPE = 20
|
|
1467
|
-
NAME = :"clone"
|
|
1468
|
-
# @private
|
|
1469
|
-
ORDER = 19
|
|
1470
|
-
end
|
|
1471
|
-
# Check the packet length and execute a set of actions if greater than
|
|
1472
|
-
# the specified packet length, else execute another set of actions.
|
|
1473
|
-
class CheckPktLen < Attribute
|
|
1474
|
-
TYPE = 21
|
|
1475
|
-
NAME = :"check_pkt_len"
|
|
1476
|
-
# @private
|
|
1477
|
-
ORDER = 20
|
|
1478
|
-
end
|
|
1479
|
-
# Push a new MPLS label stack entry at the start of the packet or at the
|
|
1480
|
-
# start of the l3 header depending on the value of l3 tunnel flag in the
|
|
1481
|
-
# tun_flags field of this OVS_ACTION_ATTR_ADD_MPLS argument.
|
|
1482
|
-
class AddMpls < Attribute
|
|
1483
|
-
TYPE = 22
|
|
1484
|
-
NAME = :"add_mpls"
|
|
1485
|
-
# @private
|
|
1486
|
-
ORDER = 21
|
|
1487
|
-
# @private
|
|
1488
|
-
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsActionAddMpls, check: nil, consume_remaining: true)
|
|
1489
|
-
end
|
|
1490
|
-
class DecTtl < Attribute
|
|
1491
|
-
TYPE = 23
|
|
1492
|
-
NAME = :"dec_ttl"
|
|
1493
|
-
# @private
|
|
1494
|
-
ORDER = 22
|
|
1495
|
-
end
|
|
1496
|
-
# Sends a packet sample to psample for external observation.
|
|
1497
|
-
class Psample < Attribute
|
|
1498
|
-
TYPE = 24
|
|
1499
|
-
NAME = :"psample"
|
|
1500
|
-
# @private
|
|
1501
|
-
ORDER = 23
|
|
1502
|
-
end
|
|
1503
|
-
# @private
|
|
1504
|
-
BY_NAME = Ractor.make_shareable({:"output" => Output, :"userspace" => Userspace, :"set" => Set, :"push_vlan" => PushVlan, :"pop_vlan" => PopVlan, :"sample" => Sample, :"recirc" => Recirc, :"hash" => Hash, :"push_mpls" => PushMpls, :"pop_mpls" => PopMpls, :"set_masked" => SetMasked, :"ct" => Ct, :"trunc" => Trunc, :"push_eth" => PushEth, :"pop_eth" => PopEth, :"ct_clear" => CtClear, :"push_nsh" => PushNsh, :"pop_nsh" => PopNsh, :"meter" => Meter, :"clone" => Clone, :"check_pkt_len" => CheckPktLen, :"add_mpls" => AddMpls, :"dec_ttl" => DecTtl, :"psample" => Psample}) #: Hash[::Symbol, Attribute]
|
|
1505
|
-
# @private
|
|
1506
|
-
BY_TYPE = Ractor.make_shareable({1 => Output, 2 => Userspace, 3 => Set, 4 => PushVlan, 5 => PopVlan, 6 => Sample, 7 => Recirc, 8 => Hash, 9 => PushMpls, 10 => PopMpls, 11 => SetMasked, 12 => Ct, 13 => Trunc, 14 => PushEth, 15 => PopEth, 16 => CtClear, 17 => PushNsh, 18 => PopNsh, 19 => Meter, 20 => Clone, 21 => CheckPktLen, 22 => AddMpls, 23 => DecTtl, 24 => Psample}) #: Hash[::Integer, Attribute]
|
|
1507
|
-
# ovs port number in datapath
|
|
1508
|
-
# @rbs return: ::Integer
|
|
1509
|
-
# @return [Integer]
|
|
1510
|
-
# @see Output
|
|
1511
|
-
def output; self[:"output"]&.value; end
|
|
1512
|
-
# @rbs return: AttributeSets::UserspaceAttrs
|
|
1513
|
-
# @return [AttributeSets::UserspaceAttrs]
|
|
1514
|
-
# @see Userspace
|
|
1515
|
-
def userspace; self[:"userspace"]&.value; end
|
|
1516
|
-
# Replaces the contents of an existing header. The single nested
|
|
1517
|
-
# attribute specifies a header to modify and its value.
|
|
1518
|
-
# @rbs return: AttributeSets::KeyAttrs
|
|
1519
|
-
# @return [AttributeSets::KeyAttrs]
|
|
1520
|
-
# @see Set
|
|
1521
|
-
def set; self[:"set"]&.value; end
|
|
1522
|
-
# Push a new outermost 802.1Q or 802.1ad header onto the packet.
|
|
1523
|
-
# @rbs return: Structs::OvsActionPushVlan
|
|
1524
|
-
# @return [Structs::OvsActionPushVlan]
|
|
1525
|
-
# @see PushVlan
|
|
1526
|
-
def push_vlan; self[:"push_vlan"]&.value; end
|
|
1527
|
-
# Pop the outermost 802.1Q or 802.1ad header from the packet.
|
|
1528
|
-
# @rbs return: ::Integer
|
|
1529
|
-
# @return [Integer]
|
|
1530
|
-
# @see PopVlan
|
|
1531
|
-
def pop_vlan; self[:"pop_vlan"]&.value; end
|
|
1532
|
-
# Probabilistically executes actions, as specified in the nested
|
|
1533
|
-
# attributes.
|
|
1534
|
-
# @rbs return: AttributeSets::SampleAttrs
|
|
1535
|
-
# @return [AttributeSets::SampleAttrs]
|
|
1536
|
-
# @see Sample
|
|
1537
|
-
def sample; self[:"sample"]&.value; end
|
|
1538
|
-
# recirc id
|
|
1539
|
-
# @rbs return: ::Integer
|
|
1540
|
-
# @return [Integer]
|
|
1541
|
-
# @see Recirc
|
|
1542
|
-
def recirc; self[:"recirc"]&.value; end
|
|
1543
|
-
# @rbs return: Structs::OvsActionHash
|
|
1544
|
-
# @return [Structs::OvsActionHash]
|
|
1545
|
-
# @see Hash
|
|
1546
|
-
def hash; self[:"hash"]&.value; end
|
|
1547
|
-
# Push a new MPLS label stack entry onto the top of the packets MPLS
|
|
1548
|
-
# label stack. Set the ethertype of the encapsulating frame to either
|
|
1549
|
-
# ETH_P_MPLS_UC or ETH_P_MPLS_MC to indicate the new packet contents.
|
|
1550
|
-
# @rbs return: Structs::OvsActionPushMpls
|
|
1551
|
-
# @return [Structs::OvsActionPushMpls]
|
|
1552
|
-
# @see PushMpls
|
|
1553
|
-
def push_mpls; self[:"push_mpls"]&.value; end
|
|
1554
|
-
# ethertype
|
|
1555
|
-
# @rbs return: ::Integer
|
|
1556
|
-
# @return [Integer]
|
|
1557
|
-
# @see PopMpls
|
|
1558
|
-
def pop_mpls; self[:"pop_mpls"]&.value; end
|
|
1559
|
-
# Replaces the contents of an existing header. A nested attribute
|
|
1560
|
-
# specifies a header to modify, its value, and a mask. For every bit set
|
|
1561
|
-
# in the mask, the corresponding bit value is copied from the value to
|
|
1562
|
-
# the packet header field, rest of the bits are left unchanged. The
|
|
1563
|
-
# non-masked value bits must be passed in as zeroes. Masking is not
|
|
1564
|
-
# supported for the OVS_KEY_ATTR_TUNNEL attribute.
|
|
1565
|
-
# @rbs return: AttributeSets::KeyAttrs
|
|
1566
|
-
# @return [AttributeSets::KeyAttrs]
|
|
1567
|
-
# @see SetMasked
|
|
1568
|
-
def set_masked; self[:"set_masked"]&.value; end
|
|
1569
|
-
# Track the connection. Populate the conntrack-related entries
|
|
1570
|
-
# in the flow key.
|
|
1571
|
-
# @rbs return: AttributeSets::CtAttrs
|
|
1572
|
-
# @return [AttributeSets::CtAttrs]
|
|
1573
|
-
# @see Ct
|
|
1574
|
-
def ct; self[:"ct"]&.value; end
|
|
1575
|
-
# struct ovs_action_trunc is a u32 max length
|
|
1576
|
-
# @rbs return: ::Integer
|
|
1577
|
-
# @return [Integer]
|
|
1578
|
-
# @see Trunc
|
|
1579
|
-
def trunc; self[:"trunc"]&.value; end
|
|
1580
|
-
# struct ovs_action_push_eth
|
|
1581
|
-
# @rbs return: ::String
|
|
1582
|
-
# @return [String]
|
|
1583
|
-
# @see PushEth
|
|
1584
|
-
def push_eth; self[:"push_eth"]&.value; end
|
|
1585
|
-
# @rbs return: ::Integer
|
|
1586
|
-
# @return [Integer]
|
|
1587
|
-
# @see PopEth
|
|
1588
|
-
def pop_eth; self[:"pop_eth"]&.value; end
|
|
1589
|
-
# @rbs return: ::Integer
|
|
1590
|
-
# @return [Integer]
|
|
1591
|
-
# @see CtClear
|
|
1592
|
-
def ct_clear; self[:"ct_clear"]&.value; end
|
|
1593
|
-
# Push NSH header to the packet.
|
|
1594
|
-
# @rbs return: AttributeSets::OvsNshKeyAttrs
|
|
1595
|
-
# @return [AttributeSets::OvsNshKeyAttrs]
|
|
1596
|
-
# @see PushNsh
|
|
1597
|
-
def push_nsh; self[:"push_nsh"]&.value; end
|
|
1598
|
-
# Pop the outermost NSH header off the packet.
|
|
1599
|
-
# @rbs return: ::Integer
|
|
1600
|
-
# @return [Integer]
|
|
1601
|
-
# @see PopNsh
|
|
1602
|
-
def pop_nsh; self[:"pop_nsh"]&.value; end
|
|
1603
|
-
# Run packet through a meter, which may drop the packet, or modify the
|
|
1604
|
-
# packet (e.g., change the DSCP field)
|
|
1605
|
-
# @rbs return: ::Integer
|
|
1606
|
-
# @return [Integer]
|
|
1607
|
-
# @see Meter
|
|
1608
|
-
def meter; self[:"meter"]&.value; end
|
|
1609
|
-
# Make a copy of the packet and execute a list of actions without
|
|
1610
|
-
# affecting the original packet and key.
|
|
1611
|
-
# @rbs return: AttributeSets::ActionAttrs
|
|
1612
|
-
# @return [AttributeSets::ActionAttrs]
|
|
1613
|
-
# @see Clone
|
|
1614
|
-
def clone; self[:"clone"]&.value; end
|
|
1615
|
-
# Check the packet length and execute a set of actions if greater than
|
|
1616
|
-
# the specified packet length, else execute another set of actions.
|
|
1617
|
-
# @rbs return: AttributeSets::CheckPktLenAttrs
|
|
1618
|
-
# @return [AttributeSets::CheckPktLenAttrs]
|
|
1619
|
-
# @see CheckPktLen
|
|
1620
|
-
def check_pkt_len; self[:"check_pkt_len"]&.value; end
|
|
1621
|
-
# Push a new MPLS label stack entry at the start of the packet or at the
|
|
1622
|
-
# start of the l3 header depending on the value of l3 tunnel flag in the
|
|
1623
|
-
# tun_flags field of this OVS_ACTION_ATTR_ADD_MPLS argument.
|
|
1624
|
-
# @rbs return: Structs::OvsActionAddMpls
|
|
1625
|
-
# @return [Structs::OvsActionAddMpls]
|
|
1626
|
-
# @see AddMpls
|
|
1627
|
-
def add_mpls; self[:"add_mpls"]&.value; end
|
|
1628
|
-
# @rbs return: AttributeSets::DecTtlAttrs
|
|
1629
|
-
# @return [AttributeSets::DecTtlAttrs]
|
|
1630
|
-
# @see DecTtl
|
|
1631
|
-
def dec_ttl; self[:"dec_ttl"]&.value; end
|
|
1632
|
-
# Sends a packet sample to psample for external observation.
|
|
1633
|
-
# @rbs return: AttributeSets::PsampleAttrs
|
|
1634
|
-
# @return [AttributeSets::PsampleAttrs]
|
|
1635
|
-
# @see Psample
|
|
1636
|
-
def psample; self[:"psample"]&.value; end
|
|
1637
|
-
class << self
|
|
1638
|
-
# Looks up Attribute class by name.
|
|
1639
|
-
# @rbs name: Symbol
|
|
1640
|
-
# @rbs return: Attribute
|
|
1641
|
-
# @param [Symbol] name
|
|
1642
|
-
# @return [Attribute]
|
|
1643
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
1644
|
-
# Looks up Attribute class by type value.
|
|
1645
|
-
# @rbs type: Integer
|
|
1646
|
-
# @rbs return: Attribute
|
|
1647
|
-
# @param [Integer] type
|
|
1648
|
-
# @return [Attribute]
|
|
1649
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
1650
|
-
end
|
|
1651
|
-
end
|
|
1652
|
-
class TunnelKeyAttrs < ::Nl::AttributeSet
|
|
1653
|
-
# Abstract class
|
|
1654
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
1655
|
-
end
|
|
1656
|
-
class Id < Attribute
|
|
1657
|
-
TYPE = 0
|
|
1658
|
-
NAME = :"id"
|
|
1659
|
-
# @private
|
|
1660
|
-
ORDER = 0
|
|
1661
|
-
# @private
|
|
1662
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U64, check: nil)
|
|
1663
|
-
end
|
|
1664
|
-
class Ipv4Src < Attribute
|
|
1665
|
-
TYPE = 1
|
|
1666
|
-
NAME = :"ipv4_src"
|
|
1667
|
-
# @private
|
|
1668
|
-
ORDER = 1
|
|
1669
|
-
# @private
|
|
1670
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)
|
|
1671
|
-
end
|
|
1672
|
-
class Ipv4Dst < Attribute
|
|
1673
|
-
TYPE = 2
|
|
1674
|
-
NAME = :"ipv4_dst"
|
|
1675
|
-
# @private
|
|
1676
|
-
ORDER = 2
|
|
1677
|
-
# @private
|
|
1678
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)
|
|
1679
|
-
end
|
|
1680
|
-
class Tos < Attribute
|
|
1681
|
-
TYPE = 3
|
|
1682
|
-
NAME = :"tos"
|
|
1683
|
-
# @private
|
|
1684
|
-
ORDER = 3
|
|
1685
|
-
# @private
|
|
1686
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
1687
|
-
end
|
|
1688
|
-
class Ttl < Attribute
|
|
1689
|
-
TYPE = 4
|
|
1690
|
-
NAME = :"ttl"
|
|
1691
|
-
# @private
|
|
1692
|
-
ORDER = 4
|
|
1693
|
-
# @private
|
|
1694
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
1695
|
-
end
|
|
1696
|
-
class DontFragment < Attribute
|
|
1697
|
-
TYPE = 5
|
|
1698
|
-
NAME = :"dont_fragment"
|
|
1699
|
-
# @private
|
|
1700
|
-
ORDER = 5
|
|
1701
|
-
# @private
|
|
1702
|
-
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
1703
|
-
end
|
|
1704
|
-
class Csum < Attribute
|
|
1705
|
-
TYPE = 6
|
|
1706
|
-
NAME = :"csum"
|
|
1707
|
-
# @private
|
|
1708
|
-
ORDER = 6
|
|
1709
|
-
# @private
|
|
1710
|
-
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
1711
|
-
end
|
|
1712
|
-
class Oam < Attribute
|
|
1713
|
-
TYPE = 7
|
|
1714
|
-
NAME = :"oam"
|
|
1715
|
-
# @private
|
|
1716
|
-
ORDER = 7
|
|
1717
|
-
# @private
|
|
1718
|
-
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
1719
|
-
end
|
|
1720
|
-
class GeneveOpts < Attribute
|
|
1721
|
-
TYPE = 8
|
|
1722
|
-
NAME = :"geneve_opts"
|
|
1723
|
-
# @private
|
|
1724
|
-
ORDER = 8
|
|
1725
|
-
# @private
|
|
1726
|
-
DATATYPE = ::Nl::DataTypes::PackedArray.new(::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil), check: nil)
|
|
1727
|
-
end
|
|
1728
|
-
class TpSrc < Attribute
|
|
1729
|
-
TYPE = 9
|
|
1730
|
-
NAME = :"tp_src"
|
|
1731
|
-
# @private
|
|
1732
|
-
ORDER = 9
|
|
1733
|
-
# @private
|
|
1734
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
|
|
1735
|
-
end
|
|
1736
|
-
class TpDst < Attribute
|
|
1737
|
-
TYPE = 10
|
|
1738
|
-
NAME = :"tp_dst"
|
|
1739
|
-
# @private
|
|
1740
|
-
ORDER = 10
|
|
1741
|
-
# @private
|
|
1742
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
|
|
1743
|
-
end
|
|
1744
|
-
class VxlanOpts < Attribute
|
|
1745
|
-
TYPE = 11
|
|
1746
|
-
NAME = :"vxlan_opts"
|
|
1747
|
-
# @private
|
|
1748
|
-
ORDER = 11
|
|
1749
|
-
end
|
|
1750
|
-
# struct in6_addr source IPv6 address
|
|
1751
|
-
class Ipv6Src < Attribute
|
|
1752
|
-
TYPE = 12
|
|
1753
|
-
NAME = :"ipv6_src"
|
|
1754
|
-
# @private
|
|
1755
|
-
ORDER = 12
|
|
1756
|
-
# @private
|
|
1757
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
1758
|
-
end
|
|
1759
|
-
# struct in6_addr destination IPv6 address
|
|
1760
|
-
class Ipv6Dst < Attribute
|
|
1761
|
-
TYPE = 13
|
|
1762
|
-
NAME = :"ipv6_dst"
|
|
1763
|
-
# @private
|
|
1764
|
-
ORDER = 13
|
|
1765
|
-
# @private
|
|
1766
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
1767
|
-
end
|
|
1768
|
-
class Pad < Attribute
|
|
1769
|
-
TYPE = 14
|
|
1770
|
-
NAME = :"pad"
|
|
1771
|
-
# @private
|
|
1772
|
-
ORDER = 14
|
|
1773
|
-
# @private
|
|
1774
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
1775
|
-
end
|
|
1776
|
-
# struct erspan_metadata
|
|
1777
|
-
class ErspanOpts < Attribute
|
|
1778
|
-
TYPE = 15
|
|
1779
|
-
NAME = :"erspan_opts"
|
|
1780
|
-
# @private
|
|
1781
|
-
ORDER = 15
|
|
1782
|
-
# @private
|
|
1783
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
1784
|
-
end
|
|
1785
|
-
class Ipv4InfoBridge < Attribute
|
|
1786
|
-
TYPE = 16
|
|
1787
|
-
NAME = :"ipv4_info_bridge"
|
|
1788
|
-
# @private
|
|
1789
|
-
ORDER = 16
|
|
1790
|
-
# @private
|
|
1791
|
-
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
1792
|
-
end
|
|
1793
|
-
# @private
|
|
1794
|
-
BY_NAME = Ractor.make_shareable({:"id" => Id, :"ipv4_src" => Ipv4Src, :"ipv4_dst" => Ipv4Dst, :"tos" => Tos, :"ttl" => Ttl, :"dont_fragment" => DontFragment, :"csum" => Csum, :"oam" => Oam, :"geneve_opts" => GeneveOpts, :"tp_src" => TpSrc, :"tp_dst" => TpDst, :"vxlan_opts" => VxlanOpts, :"ipv6_src" => Ipv6Src, :"ipv6_dst" => Ipv6Dst, :"pad" => Pad, :"erspan_opts" => ErspanOpts, :"ipv4_info_bridge" => Ipv4InfoBridge}) #: Hash[::Symbol, Attribute]
|
|
1795
|
-
# @private
|
|
1796
|
-
BY_TYPE = Ractor.make_shareable({0 => Id, 1 => Ipv4Src, 2 => Ipv4Dst, 3 => Tos, 4 => Ttl, 5 => DontFragment, 6 => Csum, 7 => Oam, 8 => GeneveOpts, 9 => TpSrc, 10 => TpDst, 11 => VxlanOpts, 12 => Ipv6Src, 13 => Ipv6Dst, 14 => Pad, 15 => ErspanOpts, 16 => Ipv4InfoBridge}) #: Hash[::Integer, Attribute]
|
|
1797
|
-
# @rbs return: ::Integer
|
|
1798
|
-
# @return [Integer]
|
|
1799
|
-
# @see Id
|
|
1800
|
-
def id; self[:"id"]&.value; end
|
|
1801
|
-
# @rbs return: ::Integer
|
|
1802
|
-
# @return [Integer]
|
|
1803
|
-
# @see Ipv4Src
|
|
1804
|
-
def ipv4_src; self[:"ipv4_src"]&.value; end
|
|
1805
|
-
# @rbs return: ::Integer
|
|
1806
|
-
# @return [Integer]
|
|
1807
|
-
# @see Ipv4Dst
|
|
1808
|
-
def ipv4_dst; self[:"ipv4_dst"]&.value; end
|
|
1809
|
-
# @rbs return: ::Integer
|
|
1810
|
-
# @return [Integer]
|
|
1811
|
-
# @see Tos
|
|
1812
|
-
def tos; self[:"tos"]&.value; end
|
|
1813
|
-
# @rbs return: ::Integer
|
|
1814
|
-
# @return [Integer]
|
|
1815
|
-
# @see Ttl
|
|
1816
|
-
def ttl; self[:"ttl"]&.value; end
|
|
1817
|
-
# @rbs return: ::Integer
|
|
1818
|
-
# @return [Integer]
|
|
1819
|
-
# @see DontFragment
|
|
1820
|
-
def dont_fragment; self[:"dont_fragment"]&.value; end
|
|
1821
|
-
# @rbs return: ::Integer
|
|
1822
|
-
# @return [Integer]
|
|
1823
|
-
# @see Csum
|
|
1824
|
-
def csum; self[:"csum"]&.value; end
|
|
1825
|
-
# @rbs return: ::Integer
|
|
1826
|
-
# @return [Integer]
|
|
1827
|
-
# @see Oam
|
|
1828
|
-
def oam; self[:"oam"]&.value; end
|
|
1829
|
-
# @rbs return: ::Array[::Integer]
|
|
1830
|
-
# @return [Array<Integer>]
|
|
1831
|
-
# @see GeneveOpts
|
|
1832
|
-
def geneve_opts; self[:"geneve_opts"]&.value; end
|
|
1833
|
-
# @rbs return: ::Integer
|
|
1834
|
-
# @return [Integer]
|
|
1835
|
-
# @see TpSrc
|
|
1836
|
-
def tp_src; self[:"tp_src"]&.value; end
|
|
1837
|
-
# @rbs return: ::Integer
|
|
1838
|
-
# @return [Integer]
|
|
1839
|
-
# @see TpDst
|
|
1840
|
-
def tp_dst; self[:"tp_dst"]&.value; end
|
|
1841
|
-
# @rbs return: AttributeSets::VxlanExtAttrs
|
|
1842
|
-
# @return [AttributeSets::VxlanExtAttrs]
|
|
1843
|
-
# @see VxlanOpts
|
|
1844
|
-
def vxlan_opts; self[:"vxlan_opts"]&.value; end
|
|
1845
|
-
# struct in6_addr source IPv6 address
|
|
1846
|
-
# @rbs return: ::String
|
|
1847
|
-
# @return [String]
|
|
1848
|
-
# @see Ipv6Src
|
|
1849
|
-
def ipv6_src; self[:"ipv6_src"]&.value; end
|
|
1850
|
-
# struct in6_addr destination IPv6 address
|
|
1851
|
-
# @rbs return: ::String
|
|
1852
|
-
# @return [String]
|
|
1853
|
-
# @see Ipv6Dst
|
|
1854
|
-
def ipv6_dst; self[:"ipv6_dst"]&.value; end
|
|
1855
|
-
# @rbs return: ::String
|
|
1856
|
-
# @return [String]
|
|
1857
|
-
# @see Pad
|
|
1858
|
-
def pad; self[:"pad"]&.value; end
|
|
1859
|
-
# struct erspan_metadata
|
|
1860
|
-
# @rbs return: ::String
|
|
1861
|
-
# @return [String]
|
|
1862
|
-
# @see ErspanOpts
|
|
1863
|
-
def erspan_opts; self[:"erspan_opts"]&.value; end
|
|
1864
|
-
# @rbs return: ::Integer
|
|
1865
|
-
# @return [Integer]
|
|
1866
|
-
# @see Ipv4InfoBridge
|
|
1867
|
-
def ipv4_info_bridge; self[:"ipv4_info_bridge"]&.value; end
|
|
1868
|
-
class << self
|
|
1869
|
-
# Looks up Attribute class by name.
|
|
1870
|
-
# @rbs name: Symbol
|
|
1871
|
-
# @rbs return: Attribute
|
|
1872
|
-
# @param [Symbol] name
|
|
1873
|
-
# @return [Attribute]
|
|
1874
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
1875
|
-
# Looks up Attribute class by type value.
|
|
1876
|
-
# @rbs type: Integer
|
|
1877
|
-
# @rbs return: Attribute
|
|
1878
|
-
# @param [Integer] type
|
|
1879
|
-
# @return [Attribute]
|
|
1880
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
1881
|
-
end
|
|
1882
|
-
end
|
|
1883
|
-
class CheckPktLenAttrs < ::Nl::AttributeSet
|
|
1884
|
-
# Abstract class
|
|
1885
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
1886
|
-
end
|
|
1887
|
-
class PktLen < Attribute
|
|
1888
|
-
TYPE = 1
|
|
1889
|
-
NAME = :"pkt_len"
|
|
1890
|
-
# @private
|
|
1891
|
-
ORDER = 0
|
|
1892
|
-
# @private
|
|
1893
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
|
|
1894
|
-
end
|
|
1895
|
-
class ActionsIfGreater < Attribute
|
|
1896
|
-
TYPE = 2
|
|
1897
|
-
NAME = :"actions_if_greater"
|
|
1898
|
-
# @private
|
|
1899
|
-
ORDER = 1
|
|
1900
|
-
end
|
|
1901
|
-
class ActionsIfLessEqual < Attribute
|
|
1902
|
-
TYPE = 3
|
|
1903
|
-
NAME = :"actions_if_less_equal"
|
|
1904
|
-
# @private
|
|
1905
|
-
ORDER = 2
|
|
1906
|
-
end
|
|
1907
|
-
# @private
|
|
1908
|
-
BY_NAME = Ractor.make_shareable({:"pkt_len" => PktLen, :"actions_if_greater" => ActionsIfGreater, :"actions_if_less_equal" => ActionsIfLessEqual}) #: Hash[::Symbol, Attribute]
|
|
1909
|
-
# @private
|
|
1910
|
-
BY_TYPE = Ractor.make_shareable({1 => PktLen, 2 => ActionsIfGreater, 3 => ActionsIfLessEqual}) #: Hash[::Integer, Attribute]
|
|
1911
|
-
# @rbs return: ::Integer
|
|
1912
|
-
# @return [Integer]
|
|
1913
|
-
# @see PktLen
|
|
1914
|
-
def pkt_len; self[:"pkt_len"]&.value; end
|
|
1915
|
-
# @rbs return: AttributeSets::ActionAttrs
|
|
1916
|
-
# @return [AttributeSets::ActionAttrs]
|
|
1917
|
-
# @see ActionsIfGreater
|
|
1918
|
-
def actions_if_greater; self[:"actions_if_greater"]&.value; end
|
|
1919
|
-
# @rbs return: AttributeSets::ActionAttrs
|
|
1920
|
-
# @return [AttributeSets::ActionAttrs]
|
|
1921
|
-
# @see ActionsIfLessEqual
|
|
1922
|
-
def actions_if_less_equal; self[:"actions_if_less_equal"]&.value; end
|
|
1923
|
-
class << self
|
|
1924
|
-
# Looks up Attribute class by name.
|
|
1925
|
-
# @rbs name: Symbol
|
|
1926
|
-
# @rbs return: Attribute
|
|
1927
|
-
# @param [Symbol] name
|
|
1928
|
-
# @return [Attribute]
|
|
1929
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
1930
|
-
# Looks up Attribute class by type value.
|
|
1931
|
-
# @rbs type: Integer
|
|
1932
|
-
# @rbs return: Attribute
|
|
1933
|
-
# @param [Integer] type
|
|
1934
|
-
# @return [Attribute]
|
|
1935
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
1936
|
-
end
|
|
1937
|
-
end
|
|
1938
|
-
class SampleAttrs < ::Nl::AttributeSet
|
|
1939
|
-
# Abstract class
|
|
1940
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
1941
|
-
end
|
|
1942
|
-
class Probability < Attribute
|
|
1943
|
-
TYPE = 1
|
|
1944
|
-
NAME = :"probability"
|
|
1945
|
-
# @private
|
|
1946
|
-
ORDER = 0
|
|
1947
|
-
# @private
|
|
1948
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
1949
|
-
end
|
|
1950
|
-
class Actions < Attribute
|
|
1951
|
-
TYPE = 2
|
|
1952
|
-
NAME = :"actions"
|
|
1953
|
-
# @private
|
|
1954
|
-
ORDER = 1
|
|
1955
|
-
end
|
|
1956
|
-
# @private
|
|
1957
|
-
BY_NAME = Ractor.make_shareable({:"probability" => Probability, :"actions" => Actions}) #: Hash[::Symbol, Attribute]
|
|
1958
|
-
# @private
|
|
1959
|
-
BY_TYPE = Ractor.make_shareable({1 => Probability, 2 => Actions}) #: Hash[::Integer, Attribute]
|
|
1960
|
-
# @rbs return: ::Integer
|
|
1961
|
-
# @return [Integer]
|
|
1962
|
-
# @see Probability
|
|
1963
|
-
def probability; self[:"probability"]&.value; end
|
|
1964
|
-
# @rbs return: AttributeSets::ActionAttrs
|
|
1965
|
-
# @return [AttributeSets::ActionAttrs]
|
|
1966
|
-
# @see Actions
|
|
1967
|
-
def actions; self[:"actions"]&.value; end
|
|
1968
|
-
class << self
|
|
1969
|
-
# Looks up Attribute class by name.
|
|
1970
|
-
# @rbs name: Symbol
|
|
1971
|
-
# @rbs return: Attribute
|
|
1972
|
-
# @param [Symbol] name
|
|
1973
|
-
# @return [Attribute]
|
|
1974
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
1975
|
-
# Looks up Attribute class by type value.
|
|
1976
|
-
# @rbs type: Integer
|
|
1977
|
-
# @rbs return: Attribute
|
|
1978
|
-
# @param [Integer] type
|
|
1979
|
-
# @return [Attribute]
|
|
1980
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
1981
|
-
end
|
|
1982
|
-
end
|
|
1983
|
-
class UserspaceAttrs < ::Nl::AttributeSet
|
|
1984
|
-
# Abstract class
|
|
1985
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
1986
|
-
end
|
|
1987
|
-
class Pid < Attribute
|
|
1988
|
-
TYPE = 1
|
|
1989
|
-
NAME = :"pid"
|
|
1990
|
-
# @private
|
|
1991
|
-
ORDER = 0
|
|
1992
|
-
# @private
|
|
1993
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
1994
|
-
end
|
|
1995
|
-
class Userdata < Attribute
|
|
1996
|
-
TYPE = 2
|
|
1997
|
-
NAME = :"userdata"
|
|
1998
|
-
# @private
|
|
1999
|
-
ORDER = 1
|
|
2000
|
-
# @private
|
|
2001
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
2002
|
-
end
|
|
2003
|
-
class EgressTunPort < Attribute
|
|
2004
|
-
TYPE = 3
|
|
2005
|
-
NAME = :"egress_tun_port"
|
|
2006
|
-
# @private
|
|
2007
|
-
ORDER = 2
|
|
2008
|
-
# @private
|
|
2009
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
2010
|
-
end
|
|
2011
|
-
class Actions < Attribute
|
|
2012
|
-
TYPE = 4
|
|
2013
|
-
NAME = :"actions"
|
|
2014
|
-
# @private
|
|
2015
|
-
ORDER = 3
|
|
2016
|
-
# @private
|
|
2017
|
-
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
2018
|
-
end
|
|
2019
|
-
# @private
|
|
2020
|
-
BY_NAME = Ractor.make_shareable({:"pid" => Pid, :"userdata" => Userdata, :"egress_tun_port" => EgressTunPort, :"actions" => Actions}) #: Hash[::Symbol, Attribute]
|
|
2021
|
-
# @private
|
|
2022
|
-
BY_TYPE = Ractor.make_shareable({1 => Pid, 2 => Userdata, 3 => EgressTunPort, 4 => Actions}) #: Hash[::Integer, Attribute]
|
|
2023
|
-
# @rbs return: ::Integer
|
|
2024
|
-
# @return [Integer]
|
|
2025
|
-
# @see Pid
|
|
2026
|
-
def pid; self[:"pid"]&.value; end
|
|
2027
|
-
# @rbs return: ::String
|
|
2028
|
-
# @return [String]
|
|
2029
|
-
# @see Userdata
|
|
2030
|
-
def userdata; self[:"userdata"]&.value; end
|
|
2031
|
-
# @rbs return: ::Integer
|
|
2032
|
-
# @return [Integer]
|
|
2033
|
-
# @see EgressTunPort
|
|
2034
|
-
def egress_tun_port; self[:"egress_tun_port"]&.value; end
|
|
2035
|
-
# @rbs return: ::Integer
|
|
2036
|
-
# @return [Integer]
|
|
2037
|
-
# @see Actions
|
|
2038
|
-
def actions; self[:"actions"]&.value; end
|
|
2039
|
-
class << self
|
|
2040
|
-
# Looks up Attribute class by name.
|
|
2041
|
-
# @rbs name: Symbol
|
|
2042
|
-
# @rbs return: Attribute
|
|
2043
|
-
# @param [Symbol] name
|
|
2044
|
-
# @return [Attribute]
|
|
2045
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
2046
|
-
# Looks up Attribute class by type value.
|
|
2047
|
-
# @rbs type: Integer
|
|
2048
|
-
# @rbs return: Attribute
|
|
2049
|
-
# @param [Integer] type
|
|
2050
|
-
# @return [Attribute]
|
|
2051
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
2052
|
-
end
|
|
2053
|
-
end
|
|
2054
|
-
class OvsNshKeyAttrs < ::Nl::AttributeSet
|
|
2055
|
-
# Abstract class
|
|
2056
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
2057
|
-
end
|
|
2058
|
-
class Base < Attribute
|
|
2059
|
-
TYPE = 1
|
|
2060
|
-
NAME = :"base"
|
|
2061
|
-
# @private
|
|
2062
|
-
ORDER = 0
|
|
2063
|
-
# @private
|
|
2064
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
2065
|
-
end
|
|
2066
|
-
class Md1 < Attribute
|
|
2067
|
-
TYPE = 2
|
|
2068
|
-
NAME = :"md1"
|
|
2069
|
-
# @private
|
|
2070
|
-
ORDER = 1
|
|
2071
|
-
# @private
|
|
2072
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
2073
|
-
end
|
|
2074
|
-
class Md2 < Attribute
|
|
2075
|
-
TYPE = 3
|
|
2076
|
-
NAME = :"md2"
|
|
2077
|
-
# @private
|
|
2078
|
-
ORDER = 2
|
|
2079
|
-
# @private
|
|
2080
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
2081
|
-
end
|
|
2082
|
-
# @private
|
|
2083
|
-
BY_NAME = Ractor.make_shareable({:"base" => Base, :"md1" => Md1, :"md2" => Md2}) #: Hash[::Symbol, Attribute]
|
|
2084
|
-
# @private
|
|
2085
|
-
BY_TYPE = Ractor.make_shareable({1 => Base, 2 => Md1, 3 => Md2}) #: Hash[::Integer, Attribute]
|
|
2086
|
-
# @rbs return: ::String
|
|
2087
|
-
# @return [String]
|
|
2088
|
-
# @see Base
|
|
2089
|
-
def base; self[:"base"]&.value; end
|
|
2090
|
-
# @rbs return: ::String
|
|
2091
|
-
# @return [String]
|
|
2092
|
-
# @see Md1
|
|
2093
|
-
def md1; self[:"md1"]&.value; end
|
|
2094
|
-
# @rbs return: ::String
|
|
2095
|
-
# @return [String]
|
|
2096
|
-
# @see Md2
|
|
2097
|
-
def md2; self[:"md2"]&.value; end
|
|
2098
|
-
class << self
|
|
2099
|
-
# Looks up Attribute class by name.
|
|
2100
|
-
# @rbs name: Symbol
|
|
2101
|
-
# @rbs return: Attribute
|
|
2102
|
-
# @param [Symbol] name
|
|
2103
|
-
# @return [Attribute]
|
|
2104
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
2105
|
-
# Looks up Attribute class by type value.
|
|
2106
|
-
# @rbs type: Integer
|
|
2107
|
-
# @rbs return: Attribute
|
|
2108
|
-
# @param [Integer] type
|
|
2109
|
-
# @return [Attribute]
|
|
2110
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
2111
|
-
end
|
|
2112
|
-
end
|
|
2113
|
-
class CtAttrs < ::Nl::AttributeSet
|
|
2114
|
-
# Abstract class
|
|
2115
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
2116
|
-
end
|
|
2117
|
-
class Commit < Attribute
|
|
2118
|
-
TYPE = 1
|
|
2119
|
-
NAME = :"commit"
|
|
2120
|
-
# @private
|
|
2121
|
-
ORDER = 0
|
|
2122
|
-
# @private
|
|
2123
|
-
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
2124
|
-
end
|
|
2125
|
-
class Zone < Attribute
|
|
2126
|
-
TYPE = 2
|
|
2127
|
-
NAME = :"zone"
|
|
2128
|
-
# @private
|
|
2129
|
-
ORDER = 1
|
|
2130
|
-
# @private
|
|
2131
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
|
|
2132
|
-
end
|
|
2133
|
-
class Mark < Attribute
|
|
2134
|
-
TYPE = 3
|
|
2135
|
-
NAME = :"mark"
|
|
2136
|
-
# @private
|
|
2137
|
-
ORDER = 2
|
|
2138
|
-
# @private
|
|
2139
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
2140
|
-
end
|
|
2141
|
-
class Labels < Attribute
|
|
2142
|
-
TYPE = 4
|
|
2143
|
-
NAME = :"labels"
|
|
2144
|
-
# @private
|
|
2145
|
-
ORDER = 3
|
|
2146
|
-
# @private
|
|
2147
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
2148
|
-
end
|
|
2149
|
-
class Helper < Attribute
|
|
2150
|
-
TYPE = 5
|
|
2151
|
-
NAME = :"helper"
|
|
2152
|
-
# @private
|
|
2153
|
-
ORDER = 4
|
|
2154
|
-
# @private
|
|
2155
|
-
DATATYPE = ::Nl::DataTypes::String.new(check: nil)
|
|
2156
|
-
end
|
|
2157
|
-
class Nat < Attribute
|
|
2158
|
-
TYPE = 6
|
|
2159
|
-
NAME = :"nat"
|
|
2160
|
-
# @private
|
|
2161
|
-
ORDER = 5
|
|
2162
|
-
end
|
|
2163
|
-
class ForceCommit < Attribute
|
|
2164
|
-
TYPE = 7
|
|
2165
|
-
NAME = :"force_commit"
|
|
2166
|
-
# @private
|
|
2167
|
-
ORDER = 6
|
|
2168
|
-
# @private
|
|
2169
|
-
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
2170
|
-
end
|
|
2171
|
-
class Eventmask < Attribute
|
|
2172
|
-
TYPE = 8
|
|
2173
|
-
NAME = :"eventmask"
|
|
2174
|
-
# @private
|
|
2175
|
-
ORDER = 7
|
|
2176
|
-
# @private
|
|
2177
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
2178
|
-
end
|
|
2179
|
-
class Timeout < Attribute
|
|
2180
|
-
TYPE = 9
|
|
2181
|
-
NAME = :"timeout"
|
|
2182
|
-
# @private
|
|
2183
|
-
ORDER = 8
|
|
2184
|
-
# @private
|
|
2185
|
-
DATATYPE = ::Nl::DataTypes::String.new(check: nil)
|
|
2186
|
-
end
|
|
2187
|
-
# @private
|
|
2188
|
-
BY_NAME = Ractor.make_shareable({:"commit" => Commit, :"zone" => Zone, :"mark" => Mark, :"labels" => Labels, :"helper" => Helper, :"nat" => Nat, :"force_commit" => ForceCommit, :"eventmask" => Eventmask, :"timeout" => Timeout}) #: Hash[::Symbol, Attribute]
|
|
2189
|
-
# @private
|
|
2190
|
-
BY_TYPE = Ractor.make_shareable({1 => Commit, 2 => Zone, 3 => Mark, 4 => Labels, 5 => Helper, 6 => Nat, 7 => ForceCommit, 8 => Eventmask, 9 => Timeout}) #: Hash[::Integer, Attribute]
|
|
2191
|
-
# @rbs return: ::Integer
|
|
2192
|
-
# @return [Integer]
|
|
2193
|
-
# @see Commit
|
|
2194
|
-
def commit; self[:"commit"]&.value; end
|
|
2195
|
-
# @rbs return: ::Integer
|
|
2196
|
-
# @return [Integer]
|
|
2197
|
-
# @see Zone
|
|
2198
|
-
def zone; self[:"zone"]&.value; end
|
|
2199
|
-
# @rbs return: ::String
|
|
2200
|
-
# @return [String]
|
|
2201
|
-
# @see Mark
|
|
2202
|
-
def mark; self[:"mark"]&.value; end
|
|
2203
|
-
# @rbs return: ::String
|
|
2204
|
-
# @return [String]
|
|
2205
|
-
# @see Labels
|
|
2206
|
-
def labels; self[:"labels"]&.value; end
|
|
2207
|
-
# @rbs return: ::String
|
|
2208
|
-
# @return [String]
|
|
2209
|
-
# @see Helper
|
|
2210
|
-
def helper; self[:"helper"]&.value; end
|
|
2211
|
-
# @rbs return: AttributeSets::NatAttrs
|
|
2212
|
-
# @return [AttributeSets::NatAttrs]
|
|
2213
|
-
# @see Nat
|
|
2214
|
-
def nat; self[:"nat"]&.value; end
|
|
2215
|
-
# @rbs return: ::Integer
|
|
2216
|
-
# @return [Integer]
|
|
2217
|
-
# @see ForceCommit
|
|
2218
|
-
def force_commit; self[:"force_commit"]&.value; end
|
|
2219
|
-
# @rbs return: ::Integer
|
|
2220
|
-
# @return [Integer]
|
|
2221
|
-
# @see Eventmask
|
|
2222
|
-
def eventmask; self[:"eventmask"]&.value; end
|
|
2223
|
-
# @rbs return: ::String
|
|
2224
|
-
# @return [String]
|
|
2225
|
-
# @see Timeout
|
|
2226
|
-
def timeout; self[:"timeout"]&.value; end
|
|
2227
|
-
class << self
|
|
2228
|
-
# Looks up Attribute class by name.
|
|
2229
|
-
# @rbs name: Symbol
|
|
2230
|
-
# @rbs return: Attribute
|
|
2231
|
-
# @param [Symbol] name
|
|
2232
|
-
# @return [Attribute]
|
|
2233
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
2234
|
-
# Looks up Attribute class by type value.
|
|
2235
|
-
# @rbs type: Integer
|
|
2236
|
-
# @rbs return: Attribute
|
|
2237
|
-
# @param [Integer] type
|
|
2238
|
-
# @return [Attribute]
|
|
2239
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
2240
|
-
end
|
|
2241
|
-
end
|
|
2242
|
-
class NatAttrs < ::Nl::AttributeSet
|
|
2243
|
-
# Abstract class
|
|
2244
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
2245
|
-
end
|
|
2246
|
-
class Src < Attribute
|
|
2247
|
-
TYPE = 1
|
|
2248
|
-
NAME = :"src"
|
|
2249
|
-
# @private
|
|
2250
|
-
ORDER = 0
|
|
2251
|
-
# @private
|
|
2252
|
-
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
2253
|
-
end
|
|
2254
|
-
class Dst < Attribute
|
|
2255
|
-
TYPE = 2
|
|
2256
|
-
NAME = :"dst"
|
|
2257
|
-
# @private
|
|
2258
|
-
ORDER = 1
|
|
2259
|
-
# @private
|
|
2260
|
-
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
2261
|
-
end
|
|
2262
|
-
class IpMin < Attribute
|
|
2263
|
-
TYPE = 3
|
|
2264
|
-
NAME = :"ip_min"
|
|
2265
|
-
# @private
|
|
2266
|
-
ORDER = 2
|
|
2267
|
-
# @private
|
|
2268
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
2269
|
-
end
|
|
2270
|
-
class IpMax < Attribute
|
|
2271
|
-
TYPE = 4
|
|
2272
|
-
NAME = :"ip_max"
|
|
2273
|
-
# @private
|
|
2274
|
-
ORDER = 3
|
|
2275
|
-
# @private
|
|
2276
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
2277
|
-
end
|
|
2278
|
-
class ProtoMin < Attribute
|
|
2279
|
-
TYPE = 5
|
|
2280
|
-
NAME = :"proto_min"
|
|
2281
|
-
# @private
|
|
2282
|
-
ORDER = 4
|
|
2283
|
-
# @private
|
|
2284
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
|
|
2285
|
-
end
|
|
2286
|
-
class ProtoMax < Attribute
|
|
2287
|
-
TYPE = 6
|
|
2288
|
-
NAME = :"proto_max"
|
|
2289
|
-
# @private
|
|
2290
|
-
ORDER = 5
|
|
2291
|
-
# @private
|
|
2292
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
|
|
2293
|
-
end
|
|
2294
|
-
class Persistent < Attribute
|
|
2295
|
-
TYPE = 7
|
|
2296
|
-
NAME = :"persistent"
|
|
2297
|
-
# @private
|
|
2298
|
-
ORDER = 6
|
|
2299
|
-
# @private
|
|
2300
|
-
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
2301
|
-
end
|
|
2302
|
-
class ProtoHash < Attribute
|
|
2303
|
-
TYPE = 8
|
|
2304
|
-
NAME = :"proto_hash"
|
|
2305
|
-
# @private
|
|
2306
|
-
ORDER = 7
|
|
2307
|
-
# @private
|
|
2308
|
-
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
2309
|
-
end
|
|
2310
|
-
class ProtoRandom < Attribute
|
|
2311
|
-
TYPE = 9
|
|
2312
|
-
NAME = :"proto_random"
|
|
2313
|
-
# @private
|
|
2314
|
-
ORDER = 8
|
|
2315
|
-
# @private
|
|
2316
|
-
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
2317
|
-
end
|
|
2318
|
-
# @private
|
|
2319
|
-
BY_NAME = Ractor.make_shareable({:"src" => Src, :"dst" => Dst, :"ip_min" => IpMin, :"ip_max" => IpMax, :"proto_min" => ProtoMin, :"proto_max" => ProtoMax, :"persistent" => Persistent, :"proto_hash" => ProtoHash, :"proto_random" => ProtoRandom}) #: Hash[::Symbol, Attribute]
|
|
2320
|
-
# @private
|
|
2321
|
-
BY_TYPE = Ractor.make_shareable({1 => Src, 2 => Dst, 3 => IpMin, 4 => IpMax, 5 => ProtoMin, 6 => ProtoMax, 7 => Persistent, 8 => ProtoHash, 9 => ProtoRandom}) #: Hash[::Integer, Attribute]
|
|
2322
|
-
# @rbs return: ::Integer
|
|
2323
|
-
# @return [Integer]
|
|
2324
|
-
# @see Src
|
|
2325
|
-
def src; self[:"src"]&.value; end
|
|
2326
|
-
# @rbs return: ::Integer
|
|
2327
|
-
# @return [Integer]
|
|
2328
|
-
# @see Dst
|
|
2329
|
-
def dst; self[:"dst"]&.value; end
|
|
2330
|
-
# @rbs return: ::String
|
|
2331
|
-
# @return [String]
|
|
2332
|
-
# @see IpMin
|
|
2333
|
-
def ip_min; self[:"ip_min"]&.value; end
|
|
2334
|
-
# @rbs return: ::String
|
|
2335
|
-
# @return [String]
|
|
2336
|
-
# @see IpMax
|
|
2337
|
-
def ip_max; self[:"ip_max"]&.value; end
|
|
2338
|
-
# @rbs return: ::Integer
|
|
2339
|
-
# @return [Integer]
|
|
2340
|
-
# @see ProtoMin
|
|
2341
|
-
def proto_min; self[:"proto_min"]&.value; end
|
|
2342
|
-
# @rbs return: ::Integer
|
|
2343
|
-
# @return [Integer]
|
|
2344
|
-
# @see ProtoMax
|
|
2345
|
-
def proto_max; self[:"proto_max"]&.value; end
|
|
2346
|
-
# @rbs return: ::Integer
|
|
2347
|
-
# @return [Integer]
|
|
2348
|
-
# @see Persistent
|
|
2349
|
-
def persistent; self[:"persistent"]&.value; end
|
|
2350
|
-
# @rbs return: ::Integer
|
|
2351
|
-
# @return [Integer]
|
|
2352
|
-
# @see ProtoHash
|
|
2353
|
-
def proto_hash; self[:"proto_hash"]&.value; end
|
|
2354
|
-
# @rbs return: ::Integer
|
|
2355
|
-
# @return [Integer]
|
|
2356
|
-
# @see ProtoRandom
|
|
2357
|
-
def proto_random; self[:"proto_random"]&.value; end
|
|
2358
|
-
class << self
|
|
2359
|
-
# Looks up Attribute class by name.
|
|
2360
|
-
# @rbs name: Symbol
|
|
2361
|
-
# @rbs return: Attribute
|
|
2362
|
-
# @param [Symbol] name
|
|
2363
|
-
# @return [Attribute]
|
|
2364
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
2365
|
-
# Looks up Attribute class by type value.
|
|
2366
|
-
# @rbs type: Integer
|
|
2367
|
-
# @rbs return: Attribute
|
|
2368
|
-
# @param [Integer] type
|
|
2369
|
-
# @return [Attribute]
|
|
2370
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
2371
|
-
end
|
|
2372
|
-
end
|
|
2373
|
-
class DecTtlAttrs < ::Nl::AttributeSet
|
|
2374
|
-
# Abstract class
|
|
2375
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
2376
|
-
end
|
|
2377
|
-
class Action < Attribute
|
|
2378
|
-
TYPE = 1
|
|
2379
|
-
NAME = :"action"
|
|
2380
|
-
# @private
|
|
2381
|
-
ORDER = 0
|
|
2382
|
-
end
|
|
2383
|
-
# @private
|
|
2384
|
-
BY_NAME = Ractor.make_shareable({:"action" => Action}) #: Hash[::Symbol, Attribute]
|
|
2385
|
-
# @private
|
|
2386
|
-
BY_TYPE = Ractor.make_shareable({1 => Action}) #: Hash[::Integer, Attribute]
|
|
2387
|
-
# @rbs return: AttributeSets::ActionAttrs
|
|
2388
|
-
# @return [AttributeSets::ActionAttrs]
|
|
2389
|
-
# @see Action
|
|
2390
|
-
def action; self[:"action"]&.value; end
|
|
2391
|
-
class << self
|
|
2392
|
-
# Looks up Attribute class by name.
|
|
2393
|
-
# @rbs name: Symbol
|
|
2394
|
-
# @rbs return: Attribute
|
|
2395
|
-
# @param [Symbol] name
|
|
2396
|
-
# @return [Attribute]
|
|
2397
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
2398
|
-
# Looks up Attribute class by type value.
|
|
2399
|
-
# @rbs type: Integer
|
|
2400
|
-
# @rbs return: Attribute
|
|
2401
|
-
# @param [Integer] type
|
|
2402
|
-
# @return [Attribute]
|
|
2403
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
2404
|
-
end
|
|
2405
|
-
end
|
|
2406
|
-
class VxlanExtAttrs < ::Nl::AttributeSet
|
|
2407
|
-
# Abstract class
|
|
2408
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
2409
|
-
end
|
|
2410
|
-
class Gbp < Attribute
|
|
2411
|
-
TYPE = 1
|
|
2412
|
-
NAME = :"gbp"
|
|
2413
|
-
# @private
|
|
2414
|
-
ORDER = 0
|
|
2415
|
-
# @private
|
|
2416
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
2417
|
-
end
|
|
2418
|
-
# @private
|
|
2419
|
-
BY_NAME = Ractor.make_shareable({:"gbp" => Gbp}) #: Hash[::Symbol, Attribute]
|
|
2420
|
-
# @private
|
|
2421
|
-
BY_TYPE = Ractor.make_shareable({1 => Gbp}) #: Hash[::Integer, Attribute]
|
|
2422
|
-
# @rbs return: ::Integer
|
|
2423
|
-
# @return [Integer]
|
|
2424
|
-
# @see Gbp
|
|
2425
|
-
def gbp; self[:"gbp"]&.value; end
|
|
2426
|
-
class << self
|
|
2427
|
-
# Looks up Attribute class by name.
|
|
2428
|
-
# @rbs name: Symbol
|
|
2429
|
-
# @rbs return: Attribute
|
|
2430
|
-
# @param [Symbol] name
|
|
2431
|
-
# @return [Attribute]
|
|
2432
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
2433
|
-
# Looks up Attribute class by type value.
|
|
2434
|
-
# @rbs type: Integer
|
|
2435
|
-
# @rbs return: Attribute
|
|
2436
|
-
# @param [Integer] type
|
|
2437
|
-
# @return [Attribute]
|
|
2438
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
2439
|
-
end
|
|
2440
|
-
end
|
|
2441
|
-
class PsampleAttrs < ::Nl::AttributeSet
|
|
2442
|
-
# Abstract class
|
|
2443
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
2444
|
-
end
|
|
2445
|
-
class Group < Attribute
|
|
2446
|
-
TYPE = 1
|
|
2447
|
-
NAME = :"group"
|
|
2448
|
-
# @private
|
|
2449
|
-
ORDER = 0
|
|
2450
|
-
# @private
|
|
2451
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
2452
|
-
end
|
|
2453
|
-
class Cookie < Attribute
|
|
2454
|
-
TYPE = 2
|
|
2455
|
-
NAME = :"cookie"
|
|
2456
|
-
# @private
|
|
2457
|
-
ORDER = 1
|
|
2458
|
-
# @private
|
|
2459
|
-
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
2460
|
-
end
|
|
2461
|
-
# @private
|
|
2462
|
-
BY_NAME = Ractor.make_shareable({:"group" => Group, :"cookie" => Cookie}) #: Hash[::Symbol, Attribute]
|
|
2463
|
-
# @private
|
|
2464
|
-
BY_TYPE = Ractor.make_shareable({1 => Group, 2 => Cookie}) #: Hash[::Integer, Attribute]
|
|
2465
|
-
# @rbs return: ::Integer
|
|
2466
|
-
# @return [Integer]
|
|
2467
|
-
# @see Group
|
|
2468
|
-
def group; self[:"group"]&.value; end
|
|
2469
|
-
# @rbs return: ::String
|
|
2470
|
-
# @return [String]
|
|
2471
|
-
# @see Cookie
|
|
2472
|
-
def cookie; self[:"cookie"]&.value; end
|
|
2473
|
-
class << self
|
|
2474
|
-
# Looks up Attribute class by name.
|
|
2475
|
-
# @rbs name: Symbol
|
|
2476
|
-
# @rbs return: Attribute
|
|
2477
|
-
# @param [Symbol] name
|
|
2478
|
-
# @return [Attribute]
|
|
2479
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
2480
|
-
# Looks up Attribute class by type value.
|
|
2481
|
-
# @rbs type: Integer
|
|
2482
|
-
# @rbs return: Attribute
|
|
2483
|
-
# @param [Integer] type
|
|
2484
|
-
# @return [Attribute]
|
|
2485
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
2486
|
-
end
|
|
2487
|
-
end
|
|
2488
|
-
# @private
|
|
2489
|
-
FlowAttrs::Key::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::KeyAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2490
|
-
# @private
|
|
2491
|
-
FlowAttrs::Actions::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::ActionAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2492
|
-
# @private
|
|
2493
|
-
FlowAttrs::Mask::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::KeyAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2494
|
-
# @private
|
|
2495
|
-
KeyAttrs::Encap::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::KeyAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2496
|
-
# @private
|
|
2497
|
-
KeyAttrs::Tunnel::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::TunnelKeyAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2498
|
-
# @private
|
|
2499
|
-
KeyAttrs::Nsh::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::OvsNshKeyAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2500
|
-
# @private
|
|
2501
|
-
ActionAttrs::Userspace::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::UserspaceAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2502
|
-
# @private
|
|
2503
|
-
ActionAttrs::Set::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::KeyAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2504
|
-
# @private
|
|
2505
|
-
ActionAttrs::Sample::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::SampleAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2506
|
-
# @private
|
|
2507
|
-
ActionAttrs::SetMasked::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::KeyAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2508
|
-
# @private
|
|
2509
|
-
ActionAttrs::Ct::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::CtAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2510
|
-
# @private
|
|
2511
|
-
ActionAttrs::PushNsh::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::OvsNshKeyAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2512
|
-
# @private
|
|
2513
|
-
ActionAttrs::Clone::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::ActionAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2514
|
-
# @private
|
|
2515
|
-
ActionAttrs::CheckPktLen::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::CheckPktLenAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2516
|
-
# @private
|
|
2517
|
-
ActionAttrs::DecTtl::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::DecTtlAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2518
|
-
# @private
|
|
2519
|
-
ActionAttrs::Psample::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::PsampleAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2520
|
-
# @private
|
|
2521
|
-
TunnelKeyAttrs::VxlanOpts::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::VxlanExtAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2522
|
-
# @private
|
|
2523
|
-
CheckPktLenAttrs::ActionsIfGreater::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::ActionAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2524
|
-
# @private
|
|
2525
|
-
CheckPktLenAttrs::ActionsIfLessEqual::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::ActionAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2526
|
-
# @private
|
|
2527
|
-
SampleAttrs::Actions::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::ActionAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2528
|
-
# @private
|
|
2529
|
-
CtAttrs::Nat::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::NatAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2530
|
-
# @private
|
|
2531
|
-
DecTtlAttrs::Action::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::ActionAttrs, selector_bindings: Ractor.make_shareable([]))
|
|
2532
|
-
end
|
|
2533
|
-
module Messages
|
|
2534
|
-
# Get / dump OVS flow configuration and state
|
|
2535
|
-
class DoGetRequest < ::Nl::Genl::Message
|
|
2536
|
-
TYPE = 3
|
|
2537
|
-
FIXED_HEADER = Structs::OvsHeader
|
|
2538
|
-
ATTRIBUTE_SET = AttributeSets::FlowAttrs
|
|
2539
|
-
ATTRIBUTES = Ractor.make_shareable(%i[key ufid ufid_flags])
|
|
2540
|
-
# ifindex of local port for datapath (0 to make a request not specific
|
|
2541
|
-
# to a datapath).
|
|
2542
|
-
# @rbs return: ::Integer
|
|
2543
|
-
# @return [Integer]
|
|
2544
|
-
def dp_ifindex; fixed_header.dp_ifindex; end
|
|
2545
|
-
# Nested attributes specifying the flow key. Always present in
|
|
2546
|
-
# notifications. Required for all requests (except dumps).
|
|
2547
|
-
# @rbs return: AttributeSets::KeyAttrs
|
|
2548
|
-
# @return [AttributeSets::KeyAttrs]
|
|
2549
|
-
# @see AttributeSets::FlowAttrs::Key
|
|
2550
|
-
def key; attributes[:"key"]&.value; end
|
|
2551
|
-
# A value between 1-16 octets specifying a unique identifier for the
|
|
2552
|
-
# flow. Causes the flow to be indexed by this value rather than the
|
|
2553
|
-
# value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
|
|
2554
|
-
# requests. Present in notifications if the flow was created with this
|
|
2555
|
-
# attribute.
|
|
2556
|
-
# @rbs return: ::String
|
|
2557
|
-
# @return [String]
|
|
2558
|
-
# @see AttributeSets::FlowAttrs::Ufid
|
|
2559
|
-
def ufid; attributes[:"ufid"]&.value; end
|
|
2560
|
-
# A 32-bit value of ORed flags that provide alternative semantics for
|
|
2561
|
-
# flow installation and retrieval. Optional for all requests.
|
|
2562
|
-
#
|
|
2563
|
-
#
|
|
2564
|
-
# Known flags are defined in {Flags::OvsUfidFlags}.
|
|
2565
|
-
# @rbs return: ::Integer
|
|
2566
|
-
# @return [Integer]
|
|
2567
|
-
# @see AttributeSets::FlowAttrs::UfidFlags
|
|
2568
|
-
def ufid_flags; attributes[:"ufid_flags"]&.value; end
|
|
2569
|
-
end
|
|
2570
|
-
# Get / dump OVS flow configuration and state
|
|
2571
|
-
class DoGetReply < ::Nl::Genl::Message
|
|
2572
|
-
TYPE = 3
|
|
2573
|
-
FIXED_HEADER = Structs::OvsHeader
|
|
2574
|
-
ATTRIBUTE_SET = AttributeSets::FlowAttrs
|
|
2575
|
-
ATTRIBUTES = Ractor.make_shareable(%i[key actions stats mask ufid])
|
|
2576
|
-
# ifindex of local port for datapath (0 to make a request not specific
|
|
2577
|
-
# to a datapath).
|
|
2578
|
-
# @rbs return: ::Integer
|
|
2579
|
-
# @return [Integer]
|
|
2580
|
-
def dp_ifindex; fixed_header.dp_ifindex; end
|
|
2581
|
-
# Nested attributes specifying the flow key. Always present in
|
|
2582
|
-
# notifications. Required for all requests (except dumps).
|
|
2583
|
-
# @rbs return: AttributeSets::KeyAttrs
|
|
2584
|
-
# @return [AttributeSets::KeyAttrs]
|
|
2585
|
-
# @see AttributeSets::FlowAttrs::Key
|
|
2586
|
-
def key; attributes[:"key"]&.value; end
|
|
2587
|
-
# Nested attributes specifying the actions to take for packets that
|
|
2588
|
-
# match the key. Always present in notifications. Required for
|
|
2589
|
-
# OVS_FLOW_CMD_NEW requests, optional for OVS_FLOW_CMD_SET requests. An
|
|
2590
|
-
# OVS_FLOW_CMD_SET without OVS_FLOW_ATTR_ACTIONS will not modify the
|
|
2591
|
-
# actions. To clear the actions, an OVS_FLOW_ATTR_ACTIONS without any
|
|
2592
|
-
# nested attributes must be given.
|
|
2593
|
-
# @rbs return: AttributeSets::ActionAttrs
|
|
2594
|
-
# @return [AttributeSets::ActionAttrs]
|
|
2595
|
-
# @see AttributeSets::FlowAttrs::Actions
|
|
2596
|
-
def actions; attributes[:"actions"]&.value; end
|
|
2597
|
-
# Statistics for this flow. Present in notifications if the stats would
|
|
2598
|
-
# be nonzero. Ignored in requests.
|
|
2599
|
-
# @rbs return: Structs::OvsFlowStats
|
|
2600
|
-
# @return [Structs::OvsFlowStats]
|
|
2601
|
-
# @see AttributeSets::FlowAttrs::Stats
|
|
2602
|
-
def stats; attributes[:"stats"]&.value; end
|
|
2603
|
-
# Nested attributes specifying the mask bits for wildcarded flow
|
|
2604
|
-
# match. Mask bit value '1' specifies exact match with corresponding
|
|
2605
|
-
# flow key bit, while mask bit value '0' specifies a wildcarded
|
|
2606
|
-
# match. Omitting attribute is treated as wildcarding all corresponding
|
|
2607
|
-
# fields. Optional for all requests. If not present, all flow key bits
|
|
2608
|
-
# are exact match bits.
|
|
2609
|
-
# @rbs return: AttributeSets::KeyAttrs
|
|
2610
|
-
# @return [AttributeSets::KeyAttrs]
|
|
2611
|
-
# @see AttributeSets::FlowAttrs::Mask
|
|
2612
|
-
def mask; attributes[:"mask"]&.value; end
|
|
2613
|
-
# A value between 1-16 octets specifying a unique identifier for the
|
|
2614
|
-
# flow. Causes the flow to be indexed by this value rather than the
|
|
2615
|
-
# value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
|
|
2616
|
-
# requests. Present in notifications if the flow was created with this
|
|
2617
|
-
# attribute.
|
|
2618
|
-
# @rbs return: ::String
|
|
2619
|
-
# @return [String]
|
|
2620
|
-
# @see AttributeSets::FlowAttrs::Ufid
|
|
2621
|
-
def ufid; attributes[:"ufid"]&.value; end
|
|
2622
|
-
end
|
|
2623
|
-
# Get / dump OVS flow configuration and state
|
|
2624
|
-
class DumpGetRequest < ::Nl::Genl::Message
|
|
2625
|
-
TYPE = 3
|
|
2626
|
-
FIXED_HEADER = Structs::OvsHeader
|
|
2627
|
-
ATTRIBUTE_SET = AttributeSets::FlowAttrs
|
|
2628
|
-
ATTRIBUTES = Ractor.make_shareable(%i[key ufid ufid_flags])
|
|
2629
|
-
# ifindex of local port for datapath (0 to make a request not specific
|
|
2630
|
-
# to a datapath).
|
|
2631
|
-
# @rbs return: ::Integer
|
|
2632
|
-
# @return [Integer]
|
|
2633
|
-
def dp_ifindex; fixed_header.dp_ifindex; end
|
|
2634
|
-
# Nested attributes specifying the flow key. Always present in
|
|
2635
|
-
# notifications. Required for all requests (except dumps).
|
|
2636
|
-
# @rbs return: AttributeSets::KeyAttrs
|
|
2637
|
-
# @return [AttributeSets::KeyAttrs]
|
|
2638
|
-
# @see AttributeSets::FlowAttrs::Key
|
|
2639
|
-
def key; attributes[:"key"]&.value; end
|
|
2640
|
-
# A value between 1-16 octets specifying a unique identifier for the
|
|
2641
|
-
# flow. Causes the flow to be indexed by this value rather than the
|
|
2642
|
-
# value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
|
|
2643
|
-
# requests. Present in notifications if the flow was created with this
|
|
2644
|
-
# attribute.
|
|
2645
|
-
# @rbs return: ::String
|
|
2646
|
-
# @return [String]
|
|
2647
|
-
# @see AttributeSets::FlowAttrs::Ufid
|
|
2648
|
-
def ufid; attributes[:"ufid"]&.value; end
|
|
2649
|
-
# A 32-bit value of ORed flags that provide alternative semantics for
|
|
2650
|
-
# flow installation and retrieval. Optional for all requests.
|
|
2651
|
-
#
|
|
2652
|
-
#
|
|
2653
|
-
# Known flags are defined in {Flags::OvsUfidFlags}.
|
|
2654
|
-
# @rbs return: ::Integer
|
|
2655
|
-
# @return [Integer]
|
|
2656
|
-
# @see AttributeSets::FlowAttrs::UfidFlags
|
|
2657
|
-
def ufid_flags; attributes[:"ufid_flags"]&.value; end
|
|
2658
|
-
end
|
|
2659
|
-
# Get / dump OVS flow configuration and state
|
|
2660
|
-
class DumpGetReply < ::Nl::Genl::Message
|
|
2661
|
-
TYPE = 3
|
|
2662
|
-
FIXED_HEADER = Structs::OvsHeader
|
|
2663
|
-
ATTRIBUTE_SET = AttributeSets::FlowAttrs
|
|
2664
|
-
ATTRIBUTES = Ractor.make_shareable(%i[key actions stats mask ufid])
|
|
2665
|
-
# ifindex of local port for datapath (0 to make a request not specific
|
|
2666
|
-
# to a datapath).
|
|
2667
|
-
# @rbs return: ::Integer
|
|
2668
|
-
# @return [Integer]
|
|
2669
|
-
def dp_ifindex; fixed_header.dp_ifindex; end
|
|
2670
|
-
# Nested attributes specifying the flow key. Always present in
|
|
2671
|
-
# notifications. Required for all requests (except dumps).
|
|
2672
|
-
# @rbs return: AttributeSets::KeyAttrs
|
|
2673
|
-
# @return [AttributeSets::KeyAttrs]
|
|
2674
|
-
# @see AttributeSets::FlowAttrs::Key
|
|
2675
|
-
def key; attributes[:"key"]&.value; end
|
|
2676
|
-
# Nested attributes specifying the actions to take for packets that
|
|
2677
|
-
# match the key. Always present in notifications. Required for
|
|
2678
|
-
# OVS_FLOW_CMD_NEW requests, optional for OVS_FLOW_CMD_SET requests. An
|
|
2679
|
-
# OVS_FLOW_CMD_SET without OVS_FLOW_ATTR_ACTIONS will not modify the
|
|
2680
|
-
# actions. To clear the actions, an OVS_FLOW_ATTR_ACTIONS without any
|
|
2681
|
-
# nested attributes must be given.
|
|
2682
|
-
# @rbs return: AttributeSets::ActionAttrs
|
|
2683
|
-
# @return [AttributeSets::ActionAttrs]
|
|
2684
|
-
# @see AttributeSets::FlowAttrs::Actions
|
|
2685
|
-
def actions; attributes[:"actions"]&.value; end
|
|
2686
|
-
# Statistics for this flow. Present in notifications if the stats would
|
|
2687
|
-
# be nonzero. Ignored in requests.
|
|
2688
|
-
# @rbs return: Structs::OvsFlowStats
|
|
2689
|
-
# @return [Structs::OvsFlowStats]
|
|
2690
|
-
# @see AttributeSets::FlowAttrs::Stats
|
|
2691
|
-
def stats; attributes[:"stats"]&.value; end
|
|
2692
|
-
# Nested attributes specifying the mask bits for wildcarded flow
|
|
2693
|
-
# match. Mask bit value '1' specifies exact match with corresponding
|
|
2694
|
-
# flow key bit, while mask bit value '0' specifies a wildcarded
|
|
2695
|
-
# match. Omitting attribute is treated as wildcarding all corresponding
|
|
2696
|
-
# fields. Optional for all requests. If not present, all flow key bits
|
|
2697
|
-
# are exact match bits.
|
|
2698
|
-
# @rbs return: AttributeSets::KeyAttrs
|
|
2699
|
-
# @return [AttributeSets::KeyAttrs]
|
|
2700
|
-
# @see AttributeSets::FlowAttrs::Mask
|
|
2701
|
-
def mask; attributes[:"mask"]&.value; end
|
|
2702
|
-
# A value between 1-16 octets specifying a unique identifier for the
|
|
2703
|
-
# flow. Causes the flow to be indexed by this value rather than the
|
|
2704
|
-
# value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
|
|
2705
|
-
# requests. Present in notifications if the flow was created with this
|
|
2706
|
-
# attribute.
|
|
2707
|
-
# @rbs return: ::String
|
|
2708
|
-
# @return [String]
|
|
2709
|
-
# @see AttributeSets::FlowAttrs::Ufid
|
|
2710
|
-
def ufid; attributes[:"ufid"]&.value; end
|
|
2711
|
-
end
|
|
2712
|
-
# Create OVS flow configuration in a data path
|
|
2713
|
-
class DoNewRequest < ::Nl::Genl::Message
|
|
2714
|
-
TYPE = 1
|
|
2715
|
-
FIXED_HEADER = Structs::OvsHeader
|
|
2716
|
-
ATTRIBUTE_SET = AttributeSets::FlowAttrs
|
|
2717
|
-
ATTRIBUTES = Ractor.make_shareable(%i[key actions mask ufid])
|
|
2718
2050
|
# ifindex of local port for datapath (0 to make a request not specific
|
|
2719
2051
|
# to a datapath).
|
|
2720
2052
|
# @rbs return: ::Integer
|
|
2721
2053
|
# @return [Integer]
|
|
2722
|
-
def dp_ifindex;
|
|
2054
|
+
def dp_ifindex; @dp_ifindex; end
|
|
2723
2055
|
# Nested attributes specifying the flow key. Always present in
|
|
2724
2056
|
# notifications. Required for all requests (except dumps).
|
|
2725
2057
|
# @rbs return: AttributeSets::KeyAttrs
|
|
2726
2058
|
# @return [AttributeSets::KeyAttrs]
|
|
2727
|
-
|
|
2728
|
-
def key; attributes[:"key"]&.value; end
|
|
2059
|
+
def key; self[:"key"]; end
|
|
2729
2060
|
# Nested attributes specifying the actions to take for packets that
|
|
2730
2061
|
# match the key. Always present in notifications. Required for
|
|
2731
2062
|
# OVS_FLOW_CMD_NEW requests, optional for OVS_FLOW_CMD_SET requests. An
|
|
@@ -2734,8 +2065,7 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
2734
2065
|
# nested attributes must be given.
|
|
2735
2066
|
# @rbs return: AttributeSets::ActionAttrs
|
|
2736
2067
|
# @return [AttributeSets::ActionAttrs]
|
|
2737
|
-
|
|
2738
|
-
def actions; attributes[:"actions"]&.value; end
|
|
2068
|
+
def actions; self[:"actions"]; end
|
|
2739
2069
|
# Nested attributes specifying the mask bits for wildcarded flow
|
|
2740
2070
|
# match. Mask bit value '1' specifies exact match with corresponding
|
|
2741
2071
|
# flow key bit, while mask bit value '0' specifies a wildcarded
|
|
@@ -2744,8 +2074,7 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
2744
2074
|
# are exact match bits.
|
|
2745
2075
|
# @rbs return: AttributeSets::KeyAttrs
|
|
2746
2076
|
# @return [AttributeSets::KeyAttrs]
|
|
2747
|
-
|
|
2748
|
-
def mask; attributes[:"mask"]&.value; end
|
|
2077
|
+
def mask; self[:"mask"]; end
|
|
2749
2078
|
# A value between 1-16 octets specifying a unique identifier for the
|
|
2750
2079
|
# flow. Causes the flow to be indexed by this value rather than the
|
|
2751
2080
|
# value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
|
|
@@ -2753,14 +2082,13 @@ class OvsFlow < ::Nl::Genl::Family
|
|
|
2753
2082
|
# attribute.
|
|
2754
2083
|
# @rbs return: ::String
|
|
2755
2084
|
# @return [String]
|
|
2756
|
-
|
|
2757
|
-
def ufid; attributes[:"ufid"]&.value; end
|
|
2085
|
+
def ufid; self[:"ufid"]; end
|
|
2758
2086
|
end
|
|
2759
2087
|
end
|
|
2760
2088
|
module Notifications
|
|
2761
2089
|
end
|
|
2762
2090
|
# @private
|
|
2763
|
-
NOTIFICATIONS =
|
|
2091
|
+
NOTIFICATIONS = {}.freeze #: Hash[::Integer, ::Class]
|
|
2764
2092
|
# Get / dump OVS flow configuration and state
|
|
2765
2093
|
# @rbs (?dp_ifindex: ::Integer, ?key: (AttributeSets::KeyAttrs | ::Hash[::Symbol, untyped]), ?ufid: ::String, ?ufid_flags: ::Integer) -> Messages::DoGetReply
|
|
2766
2094
|
# @param [Hash] args
|