nl-linux 0.2.4 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +3 -0
  3. data/.yardopts +5 -0
  4. data/CHANGELOG.md +8 -0
  5. data/Rakefile +27 -5
  6. data/generated/nl/linux/binder.rb +227 -19
  7. data/generated/nl/linux/conntrack.rb +1325 -365
  8. data/generated/nl/linux/dev_energymodel.rb +357 -66
  9. data/generated/nl/linux/devlink.rb +6310 -1859
  10. data/generated/nl/linux/dpll.rb +2202 -376
  11. data/generated/nl/linux/drm_ras.rb +312 -63
  12. data/generated/nl/linux/ethtool.rb +7555 -2447
  13. data/generated/nl/linux/fou.rb +381 -133
  14. data/generated/nl/linux/handshake.rb +340 -70
  15. data/generated/nl/linux/lockd.rb +132 -27
  16. data/generated/nl/linux/mptcp_pm.rb +773 -161
  17. data/generated/nl/linux/net_shaper.rb +892 -211
  18. data/generated/nl/linux/netdev.rb +2366 -518
  19. data/generated/nl/linux/nfsd.rb +1299 -317
  20. data/generated/nl/linux/nftables.rb +5351 -1533
  21. data/generated/nl/linux/nl80211.rb +4601 -882
  22. data/generated/nl/linux/nlctrl.rb +460 -117
  23. data/generated/nl/linux/ovpn.rb +1360 -262
  24. data/generated/nl/linux/ovs_datapath.rb +312 -98
  25. data/generated/nl/linux/ovs_flow.rb +1866 -358
  26. data/generated/nl/linux/ovs_packet.rb +331 -45
  27. data/generated/nl/linux/ovs_vport.rb +374 -123
  28. data/generated/nl/linux/psp.rb +1093 -201
  29. data/generated/nl/linux/rt_addr.rb +423 -165
  30. data/generated/nl/linux/rt_link.rb +6928 -1336
  31. data/generated/nl/linux/rt_neigh.rb +1063 -297
  32. data/generated/nl/linux/rt_route.rb +1112 -483
  33. data/generated/nl/linux/rt_rule.rb +931 -262
  34. data/generated/nl/linux/sunrpc_cache.rb +407 -82
  35. data/generated/nl/linux/tc.rb +10081 -1763
  36. data/generated/nl/linux/tcp_metrics.rb +388 -109
  37. data/generated/nl/linux/team.rb +350 -84
  38. data/generated/nl/linux/wireguard.rb +525 -96
  39. data/generated/nl/linux.rb +1 -0
  40. data/lib/nl/linux/nlctrl_resolver.rb +31 -0
  41. data/lib/nl/linux/version.rb +1 -1
  42. data/sig/generated/nl/linux/binder.rbs +366 -0
  43. data/sig/generated/nl/linux/conntrack.rbs +2787 -0
  44. data/sig/generated/nl/linux/dev_energymodel.rbs +636 -0
  45. data/sig/generated/nl/linux/devlink.rbs +12496 -0
  46. data/sig/generated/nl/linux/dpll.rbs +3461 -0
  47. data/sig/generated/nl/linux/drm_ras.rbs +553 -0
  48. data/sig/generated/nl/linux/ethtool.rbs +15291 -0
  49. data/sig/generated/nl/linux/fou.rbs +702 -0
  50. data/sig/generated/nl/linux/handshake.rbs +622 -0
  51. data/sig/generated/nl/linux/lockd.rbs +234 -0
  52. data/sig/generated/nl/linux/mptcp_pm.rbs +1511 -0
  53. data/sig/generated/nl/linux/net_shaper.rbs +1645 -0
  54. data/sig/generated/nl/linux/netdev.rbs +4187 -0
  55. data/sig/generated/nl/linux/nfsd.rbs +2520 -0
  56. data/sig/generated/nl/linux/nftables.rbs +10304 -0
  57. data/sig/generated/nl/linux/nl80211.rbs +9786 -0
  58. data/sig/generated/nl/linux/nlctrl.rbs +944 -0
  59. data/sig/generated/nl/linux/nlctrl_resolver.rbs +20 -0
  60. data/sig/generated/nl/linux/ovpn.rbs +2564 -0
  61. data/sig/generated/nl/linux/ovs_datapath.rbs +640 -0
  62. data/sig/generated/nl/linux/ovs_flow.rbs +3659 -0
  63. data/sig/generated/nl/linux/ovs_packet.rbs +540 -0
  64. data/sig/generated/nl/linux/ovs_vport.rbs +777 -0
  65. data/sig/generated/nl/linux/psp.rbs +1846 -0
  66. data/sig/generated/nl/linux/rt_addr.rbs +866 -0
  67. data/sig/generated/nl/linux/rt_link.rbs +13438 -0
  68. data/sig/generated/nl/linux/rt_neigh.rbs +2124 -0
  69. data/sig/generated/nl/linux/rt_route.rbs +2218 -0
  70. data/sig/generated/nl/linux/rt_rule.rbs +1726 -0
  71. data/sig/generated/nl/linux/sunrpc_cache.rbs +739 -0
  72. data/sig/generated/nl/linux/tc.rbs +19931 -0
  73. data/sig/generated/nl/linux/tcp_metrics.rbs +740 -0
  74. data/sig/generated/nl/linux/team.rbs +733 -0
  75. data/sig/generated/nl/linux/version.rbs +7 -0
  76. data/sig/generated/nl/linux/wireguard.rbs +1006 -0
  77. data/sig/generated/nl/linux.rbs +6 -0
  78. data/sig/generated/nl-linux.rbs +2 -0
  79. metadata +51 -10
@@ -1,33 +1,101 @@
1
1
  # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
2
+ #
3
+ # This file is based on Documentation/netlink/specs/ovs_flow.yaml from Linux v7.2.
2
4
  #--
3
5
  # frozen_string_literal: true
4
- # rbs_inline: enabled
5
6
  # This code is generated by Ynl::Generator. DO NOT EDIT.
6
7
  require 'nl'
7
8
  module Nl; module Linux
8
9
  # OVS flow configuration over generic netlink.
9
- class OvsFlow < ::Nl::Family
10
+ class OvsFlow < ::Nl::Genl::Family
10
11
  NAME = "ovs_flow"
11
- PROTOCOL = Ractor.make_shareable(::Nl::Protocols::Genl.new("ovs_flow"))
12
+ VERSION = 1
13
+ # @rbs (?resolver: ^(::Nl::Genl::Client, ::String) -> ::Nl::Genl::FamilyInfo, ?executor: executor?, ?notification_capacity: ::Integer?) -> (::Nl::Family::Session & instance)
14
+ # @rbs | [R] (?resolver: ^(::Nl::Genl::Client, ::String) -> ::Nl::Genl::FamilyInfo, ?executor: executor?, ?notification_capacity: ::Integer?) { (instance) -> R } -> R
15
+ # @overload open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
16
+ # @param [#call] resolver
17
+ # @param [Symbol, nil] executor
18
+ # @param [Integer, nil] notification_capacity
19
+ # @return [OvsFlow]
20
+ # @overload open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY, &block)
21
+ # @param [#call] resolver
22
+ # @param [Symbol, nil] executor
23
+ # @param [Integer, nil] notification_capacity
24
+ # @yieldparam [OvsFlow] family
25
+ # @return [Object] the result of the block
26
+ def self.open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
27
+ super
28
+ end
29
+ # @private
30
+ MCAST_GROUPS = Ractor.make_shareable({:"ovs_flow" => ::Nl::McastGroup.new("ovs_flow", nil)}) #: Hash[::Symbol, ::Nl::McastGroup]
31
+ module Enums
32
+ module OvsFragType
33
+ # Packet is not a fragment.
34
+ None = 0
35
+ # Packet is a fragment with offset 0.
36
+ First = 1
37
+ # Packet is a fragment with nonzero offset.
38
+ Later = 2
39
+ Any = 255
40
+ end
41
+ # Data path hash algorithm for computing Datapath hash. The algorithm type
42
+ # only specifies the fields in a flow will be used as part of the hash. Each
43
+ # datapath is free to use its own hash algorithm. The hash value will be
44
+ # opaque to the user space daemon.
45
+ module OvsHashAlg
46
+ OvsHashAlgL4 = 0
47
+ end
48
+ end
49
+ module Flags
50
+ module OvsUfidFlags
51
+ OmitKey = 1
52
+ OmitMask = 2
53
+ OmitActions = 4
54
+ end
55
+ module CtStateFlags
56
+ # Beginning of a new connection.
57
+ New = 1
58
+ # Part of an existing connenction
59
+ Established = 2
60
+ # Related to an existing connection.
61
+ Related = 4
62
+ # Flow is in the reply direction.
63
+ ReplyDir = 8
64
+ # Could not track the connection.
65
+ Invalid = 16
66
+ # Conntrack has occurred.
67
+ Tracked = 32
68
+ # Packet's source address/port was mangled by NAT.
69
+ SrcNat = 64
70
+ # Packet's destination address/port was mangled by NAT.
71
+ DstNat = 128
72
+ end
73
+ end
12
74
  module Structs
13
75
  # Header for OVS Generic Netlink messages.
14
76
  OvsHeader = Struct.new(
15
77
  :"dp_ifindex", #: ::Integer
16
78
  )
17
79
  class OvsHeader
18
- # :nodoc:
19
- MEMBERS = Ractor.make_shareable({dp_ifindex: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
80
+ # @!attribute [rw] dp_ifindex
81
+ # ifindex of local port for datapath (0 to make a request not specific
82
+ # to a datapath).
83
+ # @return [Integer]
84
+ # @private
85
+ MEMBERS = Ractor.make_shareable({dp_ifindex: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
20
86
  # Decodes the struct.
21
- #--
22
87
  # @rbs decoder: ::Nl::Decoder
23
88
  # @rbs return: instance
89
+ # @param [Nl::Decoder] decoder
90
+ # @return [self]
24
91
  def self.decode(decoder)
25
92
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
26
93
  end
27
94
  # Encodes the struct.
28
- #--
29
95
  # @rbs encoder: ::Nl::Encoder
30
96
  # @rbs return: void
97
+ # @param [Nl::Encoder] encoder
98
+ # @return [void]
31
99
  def encode(encoder)
32
100
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
33
101
  end
@@ -37,41 +105,55 @@ class OvsFlow < ::Nl::Family
37
105
  :"n_bytes", #: ::Integer
38
106
  )
39
107
  class OvsFlowStats
40
- # :nodoc:
41
- MEMBERS = Ractor.make_shareable({n_packets: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil), n_bytes: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
108
+ # @!attribute [rw] n_packets
109
+ # Number of matched packets.
110
+ # @return [Integer]
111
+ # @!attribute [rw] n_bytes
112
+ # Number of matched bytes.
113
+ # @return [Integer]
114
+ # @private
115
+ MEMBERS = Ractor.make_shareable({n_packets: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil), n_bytes: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
42
116
  # Decodes the struct.
43
- #--
44
117
  # @rbs decoder: ::Nl::Decoder
45
118
  # @rbs return: instance
119
+ # @param [Nl::Decoder] decoder
120
+ # @return [self]
46
121
  def self.decode(decoder)
47
122
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
48
123
  end
49
124
  # Encodes the struct.
50
- #--
51
125
  # @rbs encoder: ::Nl::Encoder
52
126
  # @rbs return: void
127
+ # @param [Nl::Encoder] encoder
128
+ # @return [void]
53
129
  def encode(encoder)
54
130
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
55
131
  end
56
132
  end
57
133
  OvsKeyEthernet = Struct.new(
58
- :"eth_src", #: untyped
59
- :"eth_dst", #: untyped
134
+ :"eth_src", #: ::String
135
+ :"eth_dst", #: ::String
60
136
  )
61
137
  class OvsKeyEthernet
62
- # :nodoc:
63
- MEMBERS = Ractor.make_shareable({eth_src: ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil), eth_dst: ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
138
+ # @!attribute [rw] eth_src
139
+ # @return [String]
140
+ # @!attribute [rw] eth_dst
141
+ # @return [String]
142
+ # @private
143
+ MEMBERS = Ractor.make_shareable({eth_src: ::Nl::DataTypes::Binary.new(length: 6, check: nil), eth_dst: ::Nl::DataTypes::Binary.new(length: 6, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
64
144
  # Decodes the struct.
65
- #--
66
145
  # @rbs decoder: ::Nl::Decoder
67
146
  # @rbs return: instance
147
+ # @param [Nl::Decoder] decoder
148
+ # @return [self]
68
149
  def self.decode(decoder)
69
150
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
70
151
  end
71
152
  # Encodes the struct.
72
- #--
73
153
  # @rbs encoder: ::Nl::Encoder
74
154
  # @rbs return: void
155
+ # @param [Nl::Encoder] encoder
156
+ # @return [void]
75
157
  def encode(encoder)
76
158
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
77
159
  end
@@ -80,19 +162,23 @@ class OvsFlow < ::Nl::Family
80
162
  :"mpls_lse", #: ::Integer
81
163
  )
82
164
  class OvsKeyMpls
83
- # :nodoc:
84
- MEMBERS = Ractor.make_shareable({mpls_lse: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
165
+ # @!attribute [rw] mpls_lse
166
+ # @return [Integer]
167
+ # @private
168
+ MEMBERS = Ractor.make_shareable({mpls_lse: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
85
169
  # Decodes the struct.
86
- #--
87
170
  # @rbs decoder: ::Nl::Decoder
88
171
  # @rbs return: instance
172
+ # @param [Nl::Decoder] decoder
173
+ # @return [self]
89
174
  def self.decode(decoder)
90
175
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
91
176
  end
92
177
  # Encodes the struct.
93
- #--
94
178
  # @rbs encoder: ::Nl::Encoder
95
179
  # @rbs return: void
180
+ # @param [Nl::Encoder] encoder
181
+ # @return [void]
96
182
  def encode(encoder)
97
183
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
98
184
  end
@@ -106,26 +192,40 @@ class OvsFlow < ::Nl::Family
106
192
  :"ipv4_frag", #: ::Integer
107
193
  )
108
194
  class OvsKeyIpv4
109
- # :nodoc:
110
- MEMBERS = Ractor.make_shareable({ipv4_src: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), ipv4_dst: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), ipv4_proto: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), ipv4_tos: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), ipv4_ttl: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), ipv4_frag: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
195
+ # @!attribute [rw] ipv4_src
196
+ # @return [Integer]
197
+ # @!attribute [rw] ipv4_dst
198
+ # @return [Integer]
199
+ # @!attribute [rw] ipv4_proto
200
+ # @return [Integer]
201
+ # @!attribute [rw] ipv4_tos
202
+ # @return [Integer]
203
+ # @!attribute [rw] ipv4_ttl
204
+ # @return [Integer]
205
+ # @!attribute [rw] ipv4_frag
206
+ # @return [Integer]
207
+ # @private
208
+ MEMBERS = Ractor.make_shareable({ipv4_src: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), ipv4_dst: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), ipv4_proto: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), ipv4_tos: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), ipv4_ttl: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), ipv4_frag: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
111
209
  # Decodes the struct.
112
- #--
113
210
  # @rbs decoder: ::Nl::Decoder
114
211
  # @rbs return: instance
212
+ # @param [Nl::Decoder] decoder
213
+ # @return [self]
115
214
  def self.decode(decoder)
116
215
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
117
216
  end
118
217
  # Encodes the struct.
119
- #--
120
218
  # @rbs encoder: ::Nl::Encoder
121
219
  # @rbs return: void
220
+ # @param [Nl::Encoder] encoder
221
+ # @return [void]
122
222
  def encode(encoder)
123
223
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
124
224
  end
125
225
  end
126
226
  OvsKeyIpv6 = Struct.new(
127
- :"ipv6_src", #: untyped
128
- :"ipv6_dst", #: untyped
227
+ :"ipv6_src", #: ::String
228
+ :"ipv6_dst", #: ::String
129
229
  :"ipv6_label", #: ::Integer
130
230
  :"ipv6_proto", #: ::Integer
131
231
  :"ipv6_tclass", #: ::Integer
@@ -133,19 +233,35 @@ class OvsFlow < ::Nl::Family
133
233
  :"ipv6_frag", #: ::Integer
134
234
  )
135
235
  class OvsKeyIpv6
136
- # :nodoc:
137
- MEMBERS = Ractor.make_shareable({ipv6_src: ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil), ipv6_dst: ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil), ipv6_label: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), ipv6_proto: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), ipv6_tclass: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), ipv6_hlimit: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), ipv6_frag: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
236
+ # @!attribute [rw] ipv6_src
237
+ # @return [String]
238
+ # @!attribute [rw] ipv6_dst
239
+ # @return [String]
240
+ # @!attribute [rw] ipv6_label
241
+ # @return [Integer]
242
+ # @!attribute [rw] ipv6_proto
243
+ # @return [Integer]
244
+ # @!attribute [rw] ipv6_tclass
245
+ # @return [Integer]
246
+ # @!attribute [rw] ipv6_hlimit
247
+ # @return [Integer]
248
+ # @!attribute [rw] ipv6_frag
249
+ # @return [Integer]
250
+ # @private
251
+ MEMBERS = Ractor.make_shareable({ipv6_src: ::Nl::DataTypes::Binary.new(length: 16, check: nil), ipv6_dst: ::Nl::DataTypes::Binary.new(length: 16, check: nil), ipv6_label: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), ipv6_proto: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), ipv6_tclass: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), ipv6_hlimit: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), ipv6_frag: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
138
252
  # Decodes the struct.
139
- #--
140
253
  # @rbs decoder: ::Nl::Decoder
141
254
  # @rbs return: instance
255
+ # @param [Nl::Decoder] decoder
256
+ # @return [self]
142
257
  def self.decode(decoder)
143
258
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
144
259
  end
145
260
  # Encodes the struct.
146
- #--
147
261
  # @rbs encoder: ::Nl::Encoder
148
262
  # @rbs return: void
263
+ # @param [Nl::Encoder] encoder
264
+ # @return [void]
149
265
  def encode(encoder)
150
266
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
151
267
  end
@@ -154,19 +270,23 @@ class OvsFlow < ::Nl::Family
154
270
  :"hdrs", #: ::Integer
155
271
  )
156
272
  class OvsKeyIpv6Exthdrs
157
- # :nodoc:
158
- MEMBERS = Ractor.make_shareable({hdrs: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
273
+ # @!attribute [rw] hdrs
274
+ # @return [Integer]
275
+ # @private
276
+ MEMBERS = Ractor.make_shareable({hdrs: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
159
277
  # Decodes the struct.
160
- #--
161
278
  # @rbs decoder: ::Nl::Decoder
162
279
  # @rbs return: instance
280
+ # @param [Nl::Decoder] decoder
281
+ # @return [self]
163
282
  def self.decode(decoder)
164
283
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
165
284
  end
166
285
  # Encodes the struct.
167
- #--
168
286
  # @rbs encoder: ::Nl::Encoder
169
287
  # @rbs return: void
288
+ # @param [Nl::Encoder] encoder
289
+ # @return [void]
170
290
  def encode(encoder)
171
291
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
172
292
  end
@@ -176,19 +296,25 @@ class OvsFlow < ::Nl::Family
176
296
  :"tcp_dst", #: ::Integer
177
297
  )
178
298
  class OvsKeyTcp
179
- # :nodoc:
180
- MEMBERS = Ractor.make_shareable({tcp_src: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil), tcp_dst: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
299
+ # @!attribute [rw] tcp_src
300
+ # @return [Integer]
301
+ # @!attribute [rw] tcp_dst
302
+ # @return [Integer]
303
+ # @private
304
+ MEMBERS = Ractor.make_shareable({tcp_src: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil), tcp_dst: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
181
305
  # Decodes the struct.
182
- #--
183
306
  # @rbs decoder: ::Nl::Decoder
184
307
  # @rbs return: instance
308
+ # @param [Nl::Decoder] decoder
309
+ # @return [self]
185
310
  def self.decode(decoder)
186
311
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
187
312
  end
188
313
  # Encodes the struct.
189
- #--
190
314
  # @rbs encoder: ::Nl::Encoder
191
315
  # @rbs return: void
316
+ # @param [Nl::Encoder] encoder
317
+ # @return [void]
192
318
  def encode(encoder)
193
319
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
194
320
  end
@@ -198,19 +324,25 @@ class OvsFlow < ::Nl::Family
198
324
  :"udp_dst", #: ::Integer
199
325
  )
200
326
  class OvsKeyUdp
201
- # :nodoc:
202
- MEMBERS = Ractor.make_shareable({udp_src: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil), udp_dst: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
327
+ # @!attribute [rw] udp_src
328
+ # @return [Integer]
329
+ # @!attribute [rw] udp_dst
330
+ # @return [Integer]
331
+ # @private
332
+ MEMBERS = Ractor.make_shareable({udp_src: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil), udp_dst: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
203
333
  # Decodes the struct.
204
- #--
205
334
  # @rbs decoder: ::Nl::Decoder
206
335
  # @rbs return: instance
336
+ # @param [Nl::Decoder] decoder
337
+ # @return [self]
207
338
  def self.decode(decoder)
208
339
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
209
340
  end
210
341
  # Encodes the struct.
211
- #--
212
342
  # @rbs encoder: ::Nl::Encoder
213
343
  # @rbs return: void
344
+ # @param [Nl::Encoder] encoder
345
+ # @return [void]
214
346
  def encode(encoder)
215
347
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
216
348
  end
@@ -220,19 +352,25 @@ class OvsFlow < ::Nl::Family
220
352
  :"sctp_dst", #: ::Integer
221
353
  )
222
354
  class OvsKeySctp
223
- # :nodoc:
224
- MEMBERS = Ractor.make_shareable({sctp_src: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil), sctp_dst: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
355
+ # @!attribute [rw] sctp_src
356
+ # @return [Integer]
357
+ # @!attribute [rw] sctp_dst
358
+ # @return [Integer]
359
+ # @private
360
+ MEMBERS = Ractor.make_shareable({sctp_src: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil), sctp_dst: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
225
361
  # Decodes the struct.
226
- #--
227
362
  # @rbs decoder: ::Nl::Decoder
228
363
  # @rbs return: instance
364
+ # @param [Nl::Decoder] decoder
365
+ # @return [self]
229
366
  def self.decode(decoder)
230
367
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
231
368
  end
232
369
  # Encodes the struct.
233
- #--
234
370
  # @rbs encoder: ::Nl::Encoder
235
371
  # @rbs return: void
372
+ # @param [Nl::Encoder] encoder
373
+ # @return [void]
236
374
  def encode(encoder)
237
375
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
238
376
  end
@@ -242,19 +380,25 @@ class OvsFlow < ::Nl::Family
242
380
  :"icmp_code", #: ::Integer
243
381
  )
244
382
  class OvsKeyIcmp
245
- # :nodoc:
246
- MEMBERS = Ractor.make_shareable({icmp_type: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), icmp_code: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
383
+ # @!attribute [rw] icmp_type
384
+ # @return [Integer]
385
+ # @!attribute [rw] icmp_code
386
+ # @return [Integer]
387
+ # @private
388
+ MEMBERS = Ractor.make_shareable({icmp_type: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), icmp_code: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
247
389
  # Decodes the struct.
248
- #--
249
390
  # @rbs decoder: ::Nl::Decoder
250
391
  # @rbs return: instance
392
+ # @param [Nl::Decoder] decoder
393
+ # @return [self]
251
394
  def self.decode(decoder)
252
395
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
253
396
  end
254
397
  # Encodes the struct.
255
- #--
256
398
  # @rbs encoder: ::Nl::Encoder
257
399
  # @rbs return: void
400
+ # @param [Nl::Encoder] encoder
401
+ # @return [void]
258
402
  def encode(encoder)
259
403
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
260
404
  end
@@ -263,46 +407,66 @@ class OvsFlow < ::Nl::Family
263
407
  :"arp_sip", #: ::Integer
264
408
  :"arp_tip", #: ::Integer
265
409
  :"arp_op", #: ::Integer
266
- :"arp_sha", #: untyped
267
- :"arp_tha", #: untyped
410
+ :"arp_sha", #: ::String
411
+ :"arp_tha", #: ::String
268
412
  )
269
413
  class OvsKeyArp
270
- # :nodoc:
271
- MEMBERS = Ractor.make_shareable({arp_sip: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), arp_tip: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), arp_op: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil), arp_sha: ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil), arp_tha: ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
414
+ # @!attribute [rw] arp_sip
415
+ # @return [Integer]
416
+ # @!attribute [rw] arp_tip
417
+ # @return [Integer]
418
+ # @!attribute [rw] arp_op
419
+ # @return [Integer]
420
+ # @!attribute [rw] arp_sha
421
+ # @return [String]
422
+ # @!attribute [rw] arp_tha
423
+ # @return [String]
424
+ # @private
425
+ MEMBERS = Ractor.make_shareable({arp_sip: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), arp_tip: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), arp_op: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil), arp_sha: ::Nl::DataTypes::Binary.new(length: 6, check: nil), arp_tha: ::Nl::DataTypes::Binary.new(length: 6, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
272
426
  # Decodes the struct.
273
- #--
274
427
  # @rbs decoder: ::Nl::Decoder
275
428
  # @rbs return: instance
429
+ # @param [Nl::Decoder] decoder
430
+ # @return [self]
276
431
  def self.decode(decoder)
277
432
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
278
433
  end
279
434
  # Encodes the struct.
280
- #--
281
435
  # @rbs encoder: ::Nl::Encoder
282
436
  # @rbs return: void
437
+ # @param [Nl::Encoder] encoder
438
+ # @return [void]
283
439
  def encode(encoder)
284
440
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
285
441
  end
286
442
  end
287
443
  OvsKeyNd = Struct.new(
288
- :"nd_target", #: untyped
289
- :"nd_sll", #: untyped
290
- :"nd_tll", #: untyped
444
+ :"nd_target", #: ::String
445
+ :"nd_sll", #: ::String
446
+ :"nd_tll", #: ::String
291
447
  )
292
448
  class OvsKeyNd
293
- # :nodoc:
294
- MEMBERS = Ractor.make_shareable({nd_target: ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil), nd_sll: ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil), nd_tll: ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
449
+ # @!attribute [rw] nd_target
450
+ # @return [String]
451
+ # @!attribute [rw] nd_sll
452
+ # @return [String]
453
+ # @!attribute [rw] nd_tll
454
+ # @return [String]
455
+ # @private
456
+ MEMBERS = Ractor.make_shareable({nd_target: ::Nl::DataTypes::Binary.new(length: 16, check: nil), nd_sll: ::Nl::DataTypes::Binary.new(length: 6, check: nil), nd_tll: ::Nl::DataTypes::Binary.new(length: 6, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
295
457
  # Decodes the struct.
296
- #--
297
458
  # @rbs decoder: ::Nl::Decoder
298
459
  # @rbs return: instance
460
+ # @param [Nl::Decoder] decoder
461
+ # @return [self]
299
462
  def self.decode(decoder)
300
463
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
301
464
  end
302
465
  # Encodes the struct.
303
- #--
304
466
  # @rbs encoder: ::Nl::Encoder
305
467
  # @rbs return: void
468
+ # @param [Nl::Encoder] encoder
469
+ # @return [void]
306
470
  def encode(encoder)
307
471
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
308
472
  end
@@ -315,19 +479,31 @@ class OvsFlow < ::Nl::Family
315
479
  :"ipv4_proto", #: ::Integer
316
480
  )
317
481
  class OvsKeyCtTupleIpv4
318
- # :nodoc:
319
- MEMBERS = Ractor.make_shareable({ipv4_src: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), ipv4_dst: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), src_port: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil), dst_port: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil), ipv4_proto: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
482
+ # @!attribute [rw] ipv4_src
483
+ # @return [Integer]
484
+ # @!attribute [rw] ipv4_dst
485
+ # @return [Integer]
486
+ # @!attribute [rw] src_port
487
+ # @return [Integer]
488
+ # @!attribute [rw] dst_port
489
+ # @return [Integer]
490
+ # @!attribute [rw] ipv4_proto
491
+ # @return [Integer]
492
+ # @private
493
+ MEMBERS = Ractor.make_shareable({ipv4_src: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), ipv4_dst: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), src_port: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil), dst_port: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil), ipv4_proto: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
320
494
  # Decodes the struct.
321
- #--
322
495
  # @rbs decoder: ::Nl::Decoder
323
496
  # @rbs return: instance
497
+ # @param [Nl::Decoder] decoder
498
+ # @return [self]
324
499
  def self.decode(decoder)
325
500
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
326
501
  end
327
502
  # Encodes the struct.
328
- #--
329
503
  # @rbs encoder: ::Nl::Encoder
330
504
  # @rbs return: void
505
+ # @param [Nl::Encoder] encoder
506
+ # @return [void]
331
507
  def encode(encoder)
332
508
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
333
509
  end
@@ -337,19 +513,27 @@ class OvsFlow < ::Nl::Family
337
513
  :"vlan_tci", #: ::Integer
338
514
  )
339
515
  class OvsActionPushVlan
340
- # :nodoc:
341
- MEMBERS = Ractor.make_shareable({vlan_tpid: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil), vlan_tci: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
516
+ # @!attribute [rw] vlan_tpid
517
+ # Tag protocol identifier (TPID) to push.
518
+ # @return [Integer]
519
+ # @!attribute [rw] vlan_tci
520
+ # Tag control identifier (TCI) to push.
521
+ # @return [Integer]
522
+ # @private
523
+ MEMBERS = Ractor.make_shareable({vlan_tpid: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil), vlan_tci: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
342
524
  # Decodes the struct.
343
- #--
344
525
  # @rbs decoder: ::Nl::Decoder
345
526
  # @rbs return: instance
527
+ # @param [Nl::Decoder] decoder
528
+ # @return [self]
346
529
  def self.decode(decoder)
347
530
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
348
531
  end
349
532
  # Encodes the struct.
350
- #--
351
533
  # @rbs encoder: ::Nl::Encoder
352
534
  # @rbs return: void
535
+ # @param [Nl::Encoder] encoder
536
+ # @return [void]
353
537
  def encode(encoder)
354
538
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
355
539
  end
@@ -359,19 +543,27 @@ class OvsFlow < ::Nl::Family
359
543
  :"hash_basis", #: ::Integer
360
544
  )
361
545
  class OvsActionHash
362
- # :nodoc:
363
- MEMBERS = Ractor.make_shareable({hash_alg: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil), hash_basis: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
546
+ # @!attribute [rw] hash_alg
547
+ # Algorithm used to compute hash prior to recirculation.
548
+ # @return [Integer]
549
+ # @!attribute [rw] hash_basis
550
+ # Basis used for computing hash.
551
+ # @return [Integer]
552
+ # @private
553
+ MEMBERS = Ractor.make_shareable({hash_alg: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil), hash_basis: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
364
554
  # Decodes the struct.
365
- #--
366
555
  # @rbs decoder: ::Nl::Decoder
367
556
  # @rbs return: instance
557
+ # @param [Nl::Decoder] decoder
558
+ # @return [self]
368
559
  def self.decode(decoder)
369
560
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
370
561
  end
371
562
  # Encodes the struct.
372
- #--
373
563
  # @rbs encoder: ::Nl::Encoder
374
564
  # @rbs return: void
565
+ # @param [Nl::Encoder] encoder
566
+ # @return [void]
375
567
  def encode(encoder)
376
568
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
377
569
  end
@@ -381,19 +573,29 @@ class OvsFlow < ::Nl::Family
381
573
  :"mpls_ethertype", #: ::Integer
382
574
  )
383
575
  class OvsActionPushMpls
384
- # :nodoc:
385
- MEMBERS = Ractor.make_shareable({mpls_lse: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), mpls_ethertype: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
576
+ # @!attribute [rw] mpls_lse
577
+ # MPLS label stack entry to push
578
+ # @return [Integer]
579
+ # @!attribute [rw] mpls_ethertype
580
+ # Ethertype to set in the encapsulating ethernet frame. The only values
581
+ # ethertype should ever be given are ETH_P_MPLS_UC and ETH_P_MPLS_MC,
582
+ # indicating MPLS unicast or multicast. Other are rejected.
583
+ # @return [Integer]
584
+ # @private
585
+ MEMBERS = Ractor.make_shareable({mpls_lse: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), mpls_ethertype: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
386
586
  # Decodes the struct.
387
- #--
388
587
  # @rbs decoder: ::Nl::Decoder
389
588
  # @rbs return: instance
589
+ # @param [Nl::Decoder] decoder
590
+ # @return [self]
390
591
  def self.decode(decoder)
391
592
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
392
593
  end
393
594
  # Encodes the struct.
394
- #--
395
595
  # @rbs encoder: ::Nl::Encoder
396
596
  # @rbs return: void
597
+ # @param [Nl::Encoder] encoder
598
+ # @return [void]
397
599
  def encode(encoder)
398
600
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
399
601
  end
@@ -404,1044 +606,2350 @@ class OvsFlow < ::Nl::Family
404
606
  :"tun_flags", #: ::Integer
405
607
  )
406
608
  class OvsActionAddMpls
407
- # :nodoc:
408
- MEMBERS = Ractor.make_shareable({mpls_lse: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), mpls_ethertype: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), tun_flags: ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
609
+ # @!attribute [rw] mpls_lse
610
+ # MPLS label stack entry to push
611
+ # @return [Integer]
612
+ # @!attribute [rw] mpls_ethertype
613
+ # Ethertype to set in the encapsulating ethernet frame. The only values
614
+ # ethertype should ever be given are ETH_P_MPLS_UC and ETH_P_MPLS_MC,
615
+ # indicating MPLS unicast or multicast. Other are rejected.
616
+ # @return [Integer]
617
+ # @!attribute [rw] tun_flags
618
+ # MPLS tunnel attributes.
619
+ # @return [Integer]
620
+ # @private
621
+ MEMBERS = Ractor.make_shareable({mpls_lse: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), mpls_ethertype: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil), tun_flags: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
409
622
  # Decodes the struct.
410
- #--
411
623
  # @rbs decoder: ::Nl::Decoder
412
624
  # @rbs return: instance
625
+ # @param [Nl::Decoder] decoder
626
+ # @return [self]
413
627
  def self.decode(decoder)
414
628
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
415
629
  end
416
630
  # Encodes the struct.
417
- #--
418
631
  # @rbs encoder: ::Nl::Encoder
419
632
  # @rbs return: void
633
+ # @param [Nl::Encoder] encoder
634
+ # @return [void]
420
635
  def encode(encoder)
421
636
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
422
637
  end
423
638
  end
424
639
  end
425
640
  module AttributeSets
426
- class FlowAttrs < ::Nl::Protocols::Genl::AttributeSet
641
+ class FlowAttrs < ::Nl::AttributeSet
427
642
  # Abstract class
428
- class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
643
+ class Attribute < ::Nl::AttributeSet::Attribute
429
644
  end
645
+ # Nested attributes specifying the flow key. Always present in
646
+ # notifications. Required for all requests (except dumps).
430
647
  class Key < Attribute
431
648
  TYPE = 1
432
649
  NAME = :"key"
433
- end
650
+ # @private
651
+ ORDER = 0
652
+ end
653
+ # Nested attributes specifying the actions to take for packets that
654
+ # match the key. Always present in notifications. Required for
655
+ # OVS_FLOW_CMD_NEW requests, optional for OVS_FLOW_CMD_SET requests. An
656
+ # OVS_FLOW_CMD_SET without OVS_FLOW_ATTR_ACTIONS will not modify the
657
+ # actions. To clear the actions, an OVS_FLOW_ATTR_ACTIONS without any
658
+ # nested attributes must be given.
434
659
  class Actions < Attribute
435
660
  TYPE = 2
436
661
  NAME = :"actions"
662
+ # @private
663
+ ORDER = 1
437
664
  end
665
+ # Statistics for this flow. Present in notifications if the stats would
666
+ # be nonzero. Ignored in requests.
438
667
  class Stats < Attribute
439
668
  TYPE = 3
440
669
  NAME = :"stats"
441
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
442
- end
670
+ # @private
671
+ ORDER = 2
672
+ # @private
673
+ DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsFlowStats, check: nil, consume_remaining: true)
674
+ end
675
+ # An 8-bit value giving the ORed value of all of the TCP flags seen on
676
+ # packets in this flow. Only present in notifications for TCP flows, and
677
+ # only if it would be nonzero. Ignored in requests.
443
678
  class TcpFlags < Attribute
444
679
  TYPE = 4
445
680
  NAME = :"tcp_flags"
446
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
447
- end
681
+ # @private
682
+ ORDER = 3
683
+ # @private
684
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
685
+ end
686
+ # A 64-bit integer giving the time, in milliseconds on the system
687
+ # monotonic clock, at which a packet was last processed for this
688
+ # flow. Only present in notifications if a packet has been processed for
689
+ # this flow. Ignored in requests.
448
690
  class Used < Attribute
449
691
  TYPE = 5
450
692
  NAME = :"used"
451
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
452
- end
693
+ # @private
694
+ ORDER = 4
695
+ # @private
696
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
697
+ end
698
+ # If present in a OVS_FLOW_CMD_SET request, clears the last-used time,
699
+ # accumulated TCP flags, and statistics for this flow. Otherwise
700
+ # ignored in requests. Never present in notifications.
453
701
  class Clear < Attribute
454
702
  TYPE = 6
455
703
  NAME = :"clear"
456
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
457
- end
704
+ # @private
705
+ ORDER = 5
706
+ # @private
707
+ DATATYPE = ::Nl::DataTypes::Flag.new
708
+ end
709
+ # Nested attributes specifying the mask bits for wildcarded flow
710
+ # match. Mask bit value '1' specifies exact match with corresponding
711
+ # flow key bit, while mask bit value '0' specifies a wildcarded
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.
458
715
  class Mask < Attribute
459
716
  TYPE = 7
460
717
  NAME = :"mask"
718
+ # @private
719
+ ORDER = 6
461
720
  end
721
+ # Flow operation is a feature probe, error logging should be suppressed.
462
722
  class Probe < Attribute
463
723
  TYPE = 8
464
724
  NAME = :"probe"
465
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
466
- end
725
+ # @private
726
+ ORDER = 7
727
+ # @private
728
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
729
+ end
730
+ # A value between 1-16 octets specifying a unique identifier for the
731
+ # flow. Causes the flow to be indexed by this value rather than the
732
+ # value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
733
+ # requests. Present in notifications if the flow was created with this
734
+ # attribute.
467
735
  class Ufid < Attribute
468
736
  TYPE = 9
469
737
  NAME = :"ufid"
470
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
471
- end
738
+ # @private
739
+ ORDER = 8
740
+ # @private
741
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
742
+ end
743
+ # A 32-bit value of ORed flags that provide alternative semantics for
744
+ # flow installation and retrieval. Optional for all requests.
745
+ #
746
+ #
747
+ # Known flags are defined in {Flags::OvsUfidFlags}.
472
748
  class UfidFlags < Attribute
473
749
  TYPE = 10
474
750
  NAME = :"ufid_flags"
475
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
751
+ # @private
752
+ ORDER = 9
753
+ # @private
754
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
476
755
  end
477
756
  class Pad < Attribute
478
757
  TYPE = 11
479
758
  NAME = :"pad"
480
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
759
+ # @private
760
+ ORDER = 10
761
+ # @private
762
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
481
763
  end
482
- # :nodoc:
764
+ # @private
483
765
  BY_NAME = Ractor.make_shareable({:"key" => Key, :"actions" => Actions, :"stats" => Stats, :"tcp_flags" => TcpFlags, :"used" => Used, :"clear" => Clear, :"mask" => Mask, :"probe" => Probe, :"ufid" => Ufid, :"ufid_flags" => UfidFlags, :"pad" => Pad}) #: Hash[::Symbol, Attribute]
484
- # :nodoc:
766
+ # @private
485
767
  BY_TYPE = Ractor.make_shareable({1 => Key, 2 => Actions, 3 => Stats, 4 => TcpFlags, 5 => Used, 6 => Clear, 7 => Mask, 8 => Probe, 9 => Ufid, 10 => UfidFlags, 11 => Pad}) #: Hash[::Integer, Attribute]
768
+ # Nested attributes specifying the flow key. Always present in
769
+ # notifications. Required for all requests (except dumps).
770
+ # @rbs return: AttributeSets::KeyAttrs
771
+ # @return [AttributeSets::KeyAttrs]
772
+ # @see Key
773
+ def key; self[:"key"]&.value; end
774
+ # Nested attributes specifying the actions to take for packets that
775
+ # match the key. Always present in notifications. Required for
776
+ # OVS_FLOW_CMD_NEW requests, optional for OVS_FLOW_CMD_SET requests. An
777
+ # OVS_FLOW_CMD_SET without OVS_FLOW_ATTR_ACTIONS will not modify the
778
+ # actions. To clear the actions, an OVS_FLOW_ATTR_ACTIONS without any
779
+ # nested attributes must be given.
780
+ # @rbs return: AttributeSets::ActionAttrs
781
+ # @return [AttributeSets::ActionAttrs]
782
+ # @see Actions
783
+ def actions; self[:"actions"]&.value; end
784
+ # Statistics for this flow. Present in notifications if the stats would
785
+ # be nonzero. Ignored in requests.
786
+ # @rbs return: Structs::OvsFlowStats
787
+ # @return [Structs::OvsFlowStats]
788
+ # @see Stats
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
812
+ # Nested attributes specifying the mask bits for wildcarded flow
813
+ # match. Mask bit value '1' specifies exact match with corresponding
814
+ # flow key bit, while mask bit value '0' specifies a wildcarded
815
+ # match. Omitting attribute is treated as wildcarding all corresponding
816
+ # fields. Optional for all requests. If not present, all flow key bits
817
+ # are exact match bits.
818
+ # @rbs return: AttributeSets::KeyAttrs
819
+ # @return [AttributeSets::KeyAttrs]
820
+ # @see Mask
821
+ def mask; self[:"mask"]&.value; end
822
+ # Flow operation is a feature probe, error logging should be suppressed.
823
+ # @rbs return: ::String
824
+ # @return [String]
825
+ # @see Probe
826
+ def probe; self[:"probe"]&.value; end
827
+ # A value between 1-16 octets specifying a unique identifier for the
828
+ # flow. Causes the flow to be indexed by this value rather than the
829
+ # value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
830
+ # requests. Present in notifications if the flow was created with this
831
+ # attribute.
832
+ # @rbs return: ::String
833
+ # @return [String]
834
+ # @see Ufid
835
+ def ufid; self[:"ufid"]&.value; end
836
+ # A 32-bit value of ORed flags that provide alternative semantics for
837
+ # flow installation and retrieval. Optional for all requests.
838
+ #
839
+ #
840
+ # Known flags are defined in {Flags::OvsUfidFlags}.
841
+ # @rbs return: ::Integer
842
+ # @return [Integer]
843
+ # @see UfidFlags
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
486
849
  class << self
487
850
  # Looks up Attribute class by name.
488
- #--
489
851
  # @rbs name: Symbol
490
852
  # @rbs return: Attribute
853
+ # @param [Symbol] name
854
+ # @return [Attribute]
491
855
  def by_name(name); BY_NAME.fetch(name); end
492
856
  # Looks up Attribute class by type value.
493
- #--
494
857
  # @rbs type: Integer
495
858
  # @rbs return: Attribute
859
+ # @param [Integer] type
860
+ # @return [Attribute]
496
861
  def by_type(type); BY_TYPE.fetch(type); end
497
862
  end
498
863
  end
499
- class KeyAttrs < ::Nl::Protocols::Genl::AttributeSet
864
+ class KeyAttrs < ::Nl::AttributeSet
500
865
  # Abstract class
501
- class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
866
+ class Attribute < ::Nl::AttributeSet::Attribute
502
867
  end
503
868
  class Encap < Attribute
504
869
  TYPE = 1
505
870
  NAME = :"encap"
871
+ # @private
872
+ ORDER = 0
506
873
  end
507
874
  class Priority < Attribute
508
875
  TYPE = 2
509
876
  NAME = :"priority"
510
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
877
+ # @private
878
+ ORDER = 1
879
+ # @private
880
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
511
881
  end
512
882
  class InPort < Attribute
513
883
  TYPE = 3
514
884
  NAME = :"in_port"
515
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
885
+ # @private
886
+ ORDER = 2
887
+ # @private
888
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
516
889
  end
890
+ # struct ovs_key_ethernet
517
891
  class Ethernet < Attribute
518
892
  TYPE = 4
519
893
  NAME = :"ethernet"
520
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
894
+ # @private
895
+ ORDER = 3
896
+ # @private
897
+ DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyEthernet, check: nil, consume_remaining: true)
521
898
  end
522
899
  class Vlan < Attribute
523
900
  TYPE = 5
524
901
  NAME = :"vlan"
525
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
902
+ # @private
903
+ ORDER = 4
904
+ # @private
905
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
526
906
  end
527
907
  class Ethertype < Attribute
528
908
  TYPE = 6
529
909
  NAME = :"ethertype"
530
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
910
+ # @private
911
+ ORDER = 5
912
+ # @private
913
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
531
914
  end
532
915
  class Ipv4 < Attribute
533
916
  TYPE = 7
534
917
  NAME = :"ipv4"
535
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
918
+ # @private
919
+ ORDER = 6
920
+ # @private
921
+ DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyIpv4, check: nil, consume_remaining: true)
536
922
  end
923
+ # struct ovs_key_ipv6
537
924
  class Ipv6 < Attribute
538
925
  TYPE = 8
539
926
  NAME = :"ipv6"
540
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
927
+ # @private
928
+ ORDER = 7
929
+ # @private
930
+ DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyIpv6, check: nil, consume_remaining: true)
541
931
  end
542
932
  class Tcp < Attribute
543
933
  TYPE = 9
544
934
  NAME = :"tcp"
545
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
935
+ # @private
936
+ ORDER = 8
937
+ # @private
938
+ DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyTcp, check: nil, consume_remaining: true)
546
939
  end
547
940
  class Udp < Attribute
548
941
  TYPE = 10
549
942
  NAME = :"udp"
550
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
943
+ # @private
944
+ ORDER = 9
945
+ # @private
946
+ DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyUdp, check: nil, consume_remaining: true)
551
947
  end
552
948
  class Icmp < Attribute
553
949
  TYPE = 11
554
950
  NAME = :"icmp"
555
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
951
+ # @private
952
+ ORDER = 10
953
+ # @private
954
+ DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyIcmp, check: nil, consume_remaining: true)
556
955
  end
557
956
  class Icmpv6 < Attribute
558
957
  TYPE = 12
559
958
  NAME = :"icmpv6"
560
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
959
+ # @private
960
+ ORDER = 11
961
+ # @private
962
+ DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyIcmp, check: nil, consume_remaining: true)
561
963
  end
964
+ # struct ovs_key_arp
562
965
  class Arp < Attribute
563
966
  TYPE = 13
564
967
  NAME = :"arp"
565
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
968
+ # @private
969
+ ORDER = 12
970
+ # @private
971
+ DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyArp, check: nil, consume_remaining: true)
566
972
  end
973
+ # struct ovs_key_nd
567
974
  class Nd < Attribute
568
975
  TYPE = 14
569
976
  NAME = :"nd"
570
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
977
+ # @private
978
+ ORDER = 13
979
+ # @private
980
+ DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyNd, check: nil, consume_remaining: true)
571
981
  end
572
982
  class SkbMark < Attribute
573
983
  TYPE = 15
574
984
  NAME = :"skb_mark"
575
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
985
+ # @private
986
+ ORDER = 14
987
+ # @private
988
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
576
989
  end
577
990
  class Tunnel < Attribute
578
991
  TYPE = 16
579
992
  NAME = :"tunnel"
993
+ # @private
994
+ ORDER = 15
580
995
  end
581
996
  class Sctp < Attribute
582
997
  TYPE = 17
583
998
  NAME = :"sctp"
584
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
999
+ # @private
1000
+ ORDER = 16
1001
+ # @private
1002
+ DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeySctp, check: nil, consume_remaining: true)
585
1003
  end
586
1004
  class TcpFlags < Attribute
587
1005
  TYPE = 18
588
1006
  NAME = :"tcp_flags"
589
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
1007
+ # @private
1008
+ ORDER = 17
1009
+ # @private
1010
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
590
1011
  end
1012
+ # Value 0 indicates the hash is not computed by the datapath.
591
1013
  class DpHash < Attribute
592
1014
  TYPE = 19
593
1015
  NAME = :"dp_hash"
594
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
1016
+ # @private
1017
+ ORDER = 18
1018
+ # @private
1019
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
595
1020
  end
596
1021
  class RecircId < Attribute
597
1022
  TYPE = 20
598
1023
  NAME = :"recirc_id"
599
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
1024
+ # @private
1025
+ ORDER = 19
1026
+ # @private
1027
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
600
1028
  end
601
1029
  class Mpls < Attribute
602
1030
  TYPE = 21
603
1031
  NAME = :"mpls"
604
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
1032
+ # @private
1033
+ ORDER = 20
1034
+ # @private
1035
+ DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyMpls, check: nil, consume_remaining: true)
605
1036
  end
1037
+ # Known flags are defined in {Flags::CtStateFlags}.
606
1038
  class CtState < Attribute
607
1039
  TYPE = 22
608
1040
  NAME = :"ct_state"
609
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
1041
+ # @private
1042
+ ORDER = 21
1043
+ # @private
1044
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
610
1045
  end
1046
+ # connection tracking zone
611
1047
  class CtZone < Attribute
612
1048
  TYPE = 23
613
1049
  NAME = :"ct_zone"
614
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
1050
+ # @private
1051
+ ORDER = 22
1052
+ # @private
1053
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
615
1054
  end
1055
+ # connection tracking mark
616
1056
  class CtMark < Attribute
617
1057
  TYPE = 24
618
1058
  NAME = :"ct_mark"
619
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
1059
+ # @private
1060
+ ORDER = 23
1061
+ # @private
1062
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
620
1063
  end
1064
+ # 16-octet connection tracking label
621
1065
  class CtLabels < Attribute
622
1066
  TYPE = 25
623
1067
  NAME = :"ct_labels"
624
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
1068
+ # @private
1069
+ ORDER = 24
1070
+ # @private
1071
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
625
1072
  end
626
1073
  class CtOrigTupleIpv4 < Attribute
627
1074
  TYPE = 26
628
1075
  NAME = :"ct_orig_tuple_ipv4"
629
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
1076
+ # @private
1077
+ ORDER = 25
1078
+ # @private
1079
+ DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyCtTupleIpv4, check: nil, consume_remaining: true)
630
1080
  end
1081
+ # struct ovs_key_ct_tuple_ipv6
631
1082
  class CtOrigTupleIpv6 < Attribute
632
1083
  TYPE = 27
633
1084
  NAME = :"ct_orig_tuple_ipv6"
634
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
1085
+ # @private
1086
+ ORDER = 26
1087
+ # @private
1088
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
635
1089
  end
636
1090
  class Nsh < Attribute
637
1091
  TYPE = 28
638
1092
  NAME = :"nsh"
1093
+ # @private
1094
+ ORDER = 27
639
1095
  end
1096
+ # Should not be sent to the kernel
640
1097
  class PacketType < Attribute
641
1098
  TYPE = 29
642
1099
  NAME = :"packet_type"
643
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)
1100
+ # @private
1101
+ ORDER = 28
1102
+ # @private
1103
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)
644
1104
  end
1105
+ # Should not be sent to the kernel
645
1106
  class NdExtensions < Attribute
646
1107
  TYPE = 30
647
1108
  NAME = :"nd_extensions"
648
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
1109
+ # @private
1110
+ ORDER = 29
1111
+ # @private
1112
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
649
1113
  end
1114
+ # struct ip_tunnel_info
650
1115
  class TunnelInfo < Attribute
651
1116
  TYPE = 31
652
1117
  NAME = :"tunnel_info"
653
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
1118
+ # @private
1119
+ ORDER = 30
1120
+ # @private
1121
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
654
1122
  end
1123
+ # struct ovs_key_ipv6_exthdr
655
1124
  class Ipv6Exthdrs < Attribute
656
1125
  TYPE = 32
657
1126
  NAME = :"ipv6_exthdrs"
658
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
1127
+ # @private
1128
+ ORDER = 31
1129
+ # @private
1130
+ DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsKeyIpv6Exthdrs, check: nil, consume_remaining: true)
659
1131
  end
660
- # :nodoc:
1132
+ # @private
661
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]
662
- # :nodoc:
1134
+ # @private
663
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
664
1278
  class << self
665
1279
  # Looks up Attribute class by name.
666
- #--
667
1280
  # @rbs name: Symbol
668
1281
  # @rbs return: Attribute
1282
+ # @param [Symbol] name
1283
+ # @return [Attribute]
669
1284
  def by_name(name); BY_NAME.fetch(name); end
670
1285
  # Looks up Attribute class by type value.
671
- #--
672
1286
  # @rbs type: Integer
673
1287
  # @rbs return: Attribute
1288
+ # @param [Integer] type
1289
+ # @return [Attribute]
674
1290
  def by_type(type); BY_TYPE.fetch(type); end
675
1291
  end
676
1292
  end
677
- class ActionAttrs < ::Nl::Protocols::Genl::AttributeSet
1293
+ class ActionAttrs < ::Nl::AttributeSet
678
1294
  # Abstract class
679
- class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
1295
+ class Attribute < ::Nl::AttributeSet::Attribute
680
1296
  end
1297
+ # ovs port number in datapath
681
1298
  class Output < Attribute
682
1299
  TYPE = 1
683
1300
  NAME = :"output"
684
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
1301
+ # @private
1302
+ ORDER = 0
1303
+ # @private
1304
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
685
1305
  end
686
1306
  class Userspace < Attribute
687
1307
  TYPE = 2
688
1308
  NAME = :"userspace"
1309
+ # @private
1310
+ ORDER = 1
689
1311
  end
1312
+ # Replaces the contents of an existing header. The single nested
1313
+ # attribute specifies a header to modify and its value.
690
1314
  class Set < Attribute
691
1315
  TYPE = 3
692
1316
  NAME = :"set"
1317
+ # @private
1318
+ ORDER = 2
693
1319
  end
1320
+ # Push a new outermost 802.1Q or 802.1ad header onto the packet.
694
1321
  class PushVlan < Attribute
695
1322
  TYPE = 4
696
1323
  NAME = :"push_vlan"
697
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
1324
+ # @private
1325
+ ORDER = 3
1326
+ # @private
1327
+ DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsActionPushVlan, check: nil, consume_remaining: true)
698
1328
  end
1329
+ # Pop the outermost 802.1Q or 802.1ad header from the packet.
699
1330
  class PopVlan < Attribute
700
1331
  TYPE = 5
701
1332
  NAME = :"pop_vlan"
702
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
1333
+ # @private
1334
+ ORDER = 4
1335
+ # @private
1336
+ DATATYPE = ::Nl::DataTypes::Flag.new
703
1337
  end
1338
+ # Probabilistically executes actions, as specified in the nested
1339
+ # attributes.
704
1340
  class Sample < Attribute
705
1341
  TYPE = 6
706
1342
  NAME = :"sample"
1343
+ # @private
1344
+ ORDER = 5
707
1345
  end
1346
+ # recirc id
708
1347
  class Recirc < Attribute
709
1348
  TYPE = 7
710
1349
  NAME = :"recirc"
711
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
1350
+ # @private
1351
+ ORDER = 6
1352
+ # @private
1353
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
712
1354
  end
713
1355
  class Hash < Attribute
714
1356
  TYPE = 8
715
1357
  NAME = :"hash"
716
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
717
- end
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.
718
1366
  class PushMpls < Attribute
719
1367
  TYPE = 9
720
1368
  NAME = :"push_mpls"
721
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
1369
+ # @private
1370
+ ORDER = 8
1371
+ # @private
1372
+ DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsActionPushMpls, check: nil, consume_remaining: true)
722
1373
  end
1374
+ # ethertype
723
1375
  class PopMpls < Attribute
724
1376
  TYPE = 10
725
1377
  NAME = :"pop_mpls"
726
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
727
- end
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.
728
1389
  class SetMasked < Attribute
729
1390
  TYPE = 11
730
1391
  NAME = :"set_masked"
1392
+ # @private
1393
+ ORDER = 10
731
1394
  end
1395
+ # Track the connection. Populate the conntrack-related entries
1396
+ # in the flow key.
732
1397
  class Ct < Attribute
733
1398
  TYPE = 12
734
1399
  NAME = :"ct"
1400
+ # @private
1401
+ ORDER = 11
735
1402
  end
1403
+ # struct ovs_action_trunc is a u32 max length
736
1404
  class Trunc < Attribute
737
1405
  TYPE = 13
738
1406
  NAME = :"trunc"
739
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
1407
+ # @private
1408
+ ORDER = 12
1409
+ # @private
1410
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
740
1411
  end
1412
+ # struct ovs_action_push_eth
741
1413
  class PushEth < Attribute
742
1414
  TYPE = 14
743
1415
  NAME = :"push_eth"
744
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
1416
+ # @private
1417
+ ORDER = 13
1418
+ # @private
1419
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
745
1420
  end
746
1421
  class PopEth < Attribute
747
1422
  TYPE = 15
748
1423
  NAME = :"pop_eth"
749
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
1424
+ # @private
1425
+ ORDER = 14
1426
+ # @private
1427
+ DATATYPE = ::Nl::DataTypes::Flag.new
750
1428
  end
751
1429
  class CtClear < Attribute
752
1430
  TYPE = 16
753
1431
  NAME = :"ct_clear"
754
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
1432
+ # @private
1433
+ ORDER = 15
1434
+ # @private
1435
+ DATATYPE = ::Nl::DataTypes::Flag.new
755
1436
  end
1437
+ # Push NSH header to the packet.
756
1438
  class PushNsh < Attribute
757
1439
  TYPE = 17
758
1440
  NAME = :"push_nsh"
1441
+ # @private
1442
+ ORDER = 16
759
1443
  end
1444
+ # Pop the outermost NSH header off the packet.
760
1445
  class PopNsh < Attribute
761
1446
  TYPE = 18
762
1447
  NAME = :"pop_nsh"
763
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
1448
+ # @private
1449
+ ORDER = 17
1450
+ # @private
1451
+ DATATYPE = ::Nl::DataTypes::Flag.new
764
1452
  end
1453
+ # Run packet through a meter, which may drop the packet, or modify the
1454
+ # packet (e.g., change the DSCP field)
765
1455
  class Meter < Attribute
766
1456
  TYPE = 19
767
1457
  NAME = :"meter"
768
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
1458
+ # @private
1459
+ ORDER = 18
1460
+ # @private
1461
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
769
1462
  end
1463
+ # Make a copy of the packet and execute a list of actions without
1464
+ # affecting the original packet and key.
770
1465
  class Clone < Attribute
771
1466
  TYPE = 20
772
1467
  NAME = :"clone"
1468
+ # @private
1469
+ ORDER = 19
773
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.
774
1473
  class CheckPktLen < Attribute
775
1474
  TYPE = 21
776
1475
  NAME = :"check_pkt_len"
1476
+ # @private
1477
+ ORDER = 20
777
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.
778
1482
  class AddMpls < Attribute
779
1483
  TYPE = 22
780
1484
  NAME = :"add_mpls"
781
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
1485
+ # @private
1486
+ ORDER = 21
1487
+ # @private
1488
+ DATATYPE = ::Nl::DataTypes::Struct.new(Structs::OvsActionAddMpls, check: nil, consume_remaining: true)
782
1489
  end
783
1490
  class DecTtl < Attribute
784
1491
  TYPE = 23
785
1492
  NAME = :"dec_ttl"
1493
+ # @private
1494
+ ORDER = 22
786
1495
  end
1496
+ # Sends a packet sample to psample for external observation.
787
1497
  class Psample < Attribute
788
1498
  TYPE = 24
789
1499
  NAME = :"psample"
1500
+ # @private
1501
+ ORDER = 23
790
1502
  end
791
- # :nodoc:
1503
+ # @private
792
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]
793
- # :nodoc:
1505
+ # @private
794
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
795
1637
  class << self
796
1638
  # Looks up Attribute class by name.
797
- #--
798
1639
  # @rbs name: Symbol
799
1640
  # @rbs return: Attribute
1641
+ # @param [Symbol] name
1642
+ # @return [Attribute]
800
1643
  def by_name(name); BY_NAME.fetch(name); end
801
1644
  # Looks up Attribute class by type value.
802
- #--
803
1645
  # @rbs type: Integer
804
1646
  # @rbs return: Attribute
1647
+ # @param [Integer] type
1648
+ # @return [Attribute]
805
1649
  def by_type(type); BY_TYPE.fetch(type); end
806
1650
  end
807
1651
  end
808
- class TunnelKeyAttrs < ::Nl::Protocols::Genl::AttributeSet
1652
+ class TunnelKeyAttrs < ::Nl::AttributeSet
809
1653
  # Abstract class
810
- class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
1654
+ class Attribute < ::Nl::AttributeSet::Attribute
811
1655
  end
812
1656
  class Id < Attribute
813
1657
  TYPE = 0
814
1658
  NAME = :"id"
815
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U64, check: nil)
1659
+ # @private
1660
+ ORDER = 0
1661
+ # @private
1662
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U64, check: nil)
816
1663
  end
817
1664
  class Ipv4Src < Attribute
818
1665
  TYPE = 1
819
1666
  NAME = :"ipv4_src"
820
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)
1667
+ # @private
1668
+ ORDER = 1
1669
+ # @private
1670
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)
821
1671
  end
822
1672
  class Ipv4Dst < Attribute
823
1673
  TYPE = 2
824
1674
  NAME = :"ipv4_dst"
825
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)
1675
+ # @private
1676
+ ORDER = 2
1677
+ # @private
1678
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)
826
1679
  end
827
1680
  class Tos < Attribute
828
1681
  TYPE = 3
829
1682
  NAME = :"tos"
830
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
1683
+ # @private
1684
+ ORDER = 3
1685
+ # @private
1686
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
831
1687
  end
832
1688
  class Ttl < Attribute
833
1689
  TYPE = 4
834
1690
  NAME = :"ttl"
835
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
1691
+ # @private
1692
+ ORDER = 4
1693
+ # @private
1694
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
836
1695
  end
837
1696
  class DontFragment < Attribute
838
1697
  TYPE = 5
839
1698
  NAME = :"dont_fragment"
840
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
1699
+ # @private
1700
+ ORDER = 5
1701
+ # @private
1702
+ DATATYPE = ::Nl::DataTypes::Flag.new
841
1703
  end
842
1704
  class Csum < Attribute
843
1705
  TYPE = 6
844
1706
  NAME = :"csum"
845
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
1707
+ # @private
1708
+ ORDER = 6
1709
+ # @private
1710
+ DATATYPE = ::Nl::DataTypes::Flag.new
846
1711
  end
847
1712
  class Oam < Attribute
848
1713
  TYPE = 7
849
1714
  NAME = :"oam"
850
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
1715
+ # @private
1716
+ ORDER = 7
1717
+ # @private
1718
+ DATATYPE = ::Nl::DataTypes::Flag.new
851
1719
  end
852
1720
  class GeneveOpts < Attribute
853
1721
  TYPE = 8
854
1722
  NAME = :"geneve_opts"
855
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
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)
856
1727
  end
857
1728
  class TpSrc < Attribute
858
1729
  TYPE = 9
859
1730
  NAME = :"tp_src"
860
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
1731
+ # @private
1732
+ ORDER = 9
1733
+ # @private
1734
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
861
1735
  end
862
1736
  class TpDst < Attribute
863
1737
  TYPE = 10
864
1738
  NAME = :"tp_dst"
865
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
1739
+ # @private
1740
+ ORDER = 10
1741
+ # @private
1742
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
866
1743
  end
867
1744
  class VxlanOpts < Attribute
868
1745
  TYPE = 11
869
1746
  NAME = :"vxlan_opts"
1747
+ # @private
1748
+ ORDER = 11
870
1749
  end
1750
+ # struct in6_addr source IPv6 address
871
1751
  class Ipv6Src < Attribute
872
1752
  TYPE = 12
873
1753
  NAME = :"ipv6_src"
874
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
1754
+ # @private
1755
+ ORDER = 12
1756
+ # @private
1757
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
875
1758
  end
1759
+ # struct in6_addr destination IPv6 address
876
1760
  class Ipv6Dst < Attribute
877
1761
  TYPE = 13
878
1762
  NAME = :"ipv6_dst"
879
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
1763
+ # @private
1764
+ ORDER = 13
1765
+ # @private
1766
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
880
1767
  end
881
1768
  class Pad < Attribute
882
1769
  TYPE = 14
883
1770
  NAME = :"pad"
884
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
1771
+ # @private
1772
+ ORDER = 14
1773
+ # @private
1774
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
885
1775
  end
1776
+ # struct erspan_metadata
886
1777
  class ErspanOpts < Attribute
887
1778
  TYPE = 15
888
1779
  NAME = :"erspan_opts"
889
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
1780
+ # @private
1781
+ ORDER = 15
1782
+ # @private
1783
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
890
1784
  end
891
1785
  class Ipv4InfoBridge < Attribute
892
1786
  TYPE = 16
893
1787
  NAME = :"ipv4_info_bridge"
894
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
1788
+ # @private
1789
+ ORDER = 16
1790
+ # @private
1791
+ DATATYPE = ::Nl::DataTypes::Flag.new
895
1792
  end
896
- # :nodoc:
1793
+ # @private
897
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]
898
- # :nodoc:
1795
+ # @private
899
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
900
1868
  class << self
901
1869
  # Looks up Attribute class by name.
902
- #--
903
1870
  # @rbs name: Symbol
904
1871
  # @rbs return: Attribute
1872
+ # @param [Symbol] name
1873
+ # @return [Attribute]
905
1874
  def by_name(name); BY_NAME.fetch(name); end
906
1875
  # Looks up Attribute class by type value.
907
- #--
908
1876
  # @rbs type: Integer
909
1877
  # @rbs return: Attribute
1878
+ # @param [Integer] type
1879
+ # @return [Attribute]
910
1880
  def by_type(type); BY_TYPE.fetch(type); end
911
1881
  end
912
1882
  end
913
- class CheckPktLenAttrs < ::Nl::Protocols::Genl::AttributeSet
1883
+ class CheckPktLenAttrs < ::Nl::AttributeSet
914
1884
  # Abstract class
915
- class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
1885
+ class Attribute < ::Nl::AttributeSet::Attribute
916
1886
  end
917
1887
  class PktLen < Attribute
918
1888
  TYPE = 1
919
1889
  NAME = :"pkt_len"
920
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
1890
+ # @private
1891
+ ORDER = 0
1892
+ # @private
1893
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
921
1894
  end
922
1895
  class ActionsIfGreater < Attribute
923
1896
  TYPE = 2
924
1897
  NAME = :"actions_if_greater"
1898
+ # @private
1899
+ ORDER = 1
925
1900
  end
926
1901
  class ActionsIfLessEqual < Attribute
927
1902
  TYPE = 3
928
1903
  NAME = :"actions_if_less_equal"
1904
+ # @private
1905
+ ORDER = 2
929
1906
  end
930
- # :nodoc:
1907
+ # @private
931
1908
  BY_NAME = Ractor.make_shareable({:"pkt_len" => PktLen, :"actions_if_greater" => ActionsIfGreater, :"actions_if_less_equal" => ActionsIfLessEqual}) #: Hash[::Symbol, Attribute]
932
- # :nodoc:
1909
+ # @private
933
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
934
1923
  class << self
935
1924
  # Looks up Attribute class by name.
936
- #--
937
1925
  # @rbs name: Symbol
938
1926
  # @rbs return: Attribute
1927
+ # @param [Symbol] name
1928
+ # @return [Attribute]
939
1929
  def by_name(name); BY_NAME.fetch(name); end
940
1930
  # Looks up Attribute class by type value.
941
- #--
942
1931
  # @rbs type: Integer
943
1932
  # @rbs return: Attribute
1933
+ # @param [Integer] type
1934
+ # @return [Attribute]
944
1935
  def by_type(type); BY_TYPE.fetch(type); end
945
1936
  end
946
1937
  end
947
- class SampleAttrs < ::Nl::Protocols::Genl::AttributeSet
1938
+ class SampleAttrs < ::Nl::AttributeSet
948
1939
  # Abstract class
949
- class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
1940
+ class Attribute < ::Nl::AttributeSet::Attribute
950
1941
  end
951
1942
  class Probability < Attribute
952
1943
  TYPE = 1
953
1944
  NAME = :"probability"
954
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
1945
+ # @private
1946
+ ORDER = 0
1947
+ # @private
1948
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
955
1949
  end
956
1950
  class Actions < Attribute
957
1951
  TYPE = 2
958
1952
  NAME = :"actions"
1953
+ # @private
1954
+ ORDER = 1
959
1955
  end
960
- # :nodoc:
1956
+ # @private
961
1957
  BY_NAME = Ractor.make_shareable({:"probability" => Probability, :"actions" => Actions}) #: Hash[::Symbol, Attribute]
962
- # :nodoc:
1958
+ # @private
963
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
964
1968
  class << self
965
1969
  # Looks up Attribute class by name.
966
- #--
967
1970
  # @rbs name: Symbol
968
1971
  # @rbs return: Attribute
1972
+ # @param [Symbol] name
1973
+ # @return [Attribute]
969
1974
  def by_name(name); BY_NAME.fetch(name); end
970
1975
  # Looks up Attribute class by type value.
971
- #--
972
1976
  # @rbs type: Integer
973
1977
  # @rbs return: Attribute
1978
+ # @param [Integer] type
1979
+ # @return [Attribute]
974
1980
  def by_type(type); BY_TYPE.fetch(type); end
975
1981
  end
976
1982
  end
977
- class UserspaceAttrs < ::Nl::Protocols::Genl::AttributeSet
1983
+ class UserspaceAttrs < ::Nl::AttributeSet
978
1984
  # Abstract class
979
- class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
1985
+ class Attribute < ::Nl::AttributeSet::Attribute
980
1986
  end
981
1987
  class Pid < Attribute
982
1988
  TYPE = 1
983
1989
  NAME = :"pid"
984
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
1990
+ # @private
1991
+ ORDER = 0
1992
+ # @private
1993
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
985
1994
  end
986
1995
  class Userdata < Attribute
987
1996
  TYPE = 2
988
1997
  NAME = :"userdata"
989
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
1998
+ # @private
1999
+ ORDER = 1
2000
+ # @private
2001
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
990
2002
  end
991
2003
  class EgressTunPort < Attribute
992
2004
  TYPE = 3
993
2005
  NAME = :"egress_tun_port"
994
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
2006
+ # @private
2007
+ ORDER = 2
2008
+ # @private
2009
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
995
2010
  end
996
2011
  class Actions < Attribute
997
2012
  TYPE = 4
998
2013
  NAME = :"actions"
999
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
2014
+ # @private
2015
+ ORDER = 3
2016
+ # @private
2017
+ DATATYPE = ::Nl::DataTypes::Flag.new
1000
2018
  end
1001
- # :nodoc:
2019
+ # @private
1002
2020
  BY_NAME = Ractor.make_shareable({:"pid" => Pid, :"userdata" => Userdata, :"egress_tun_port" => EgressTunPort, :"actions" => Actions}) #: Hash[::Symbol, Attribute]
1003
- # :nodoc:
2021
+ # @private
1004
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
1005
2039
  class << self
1006
2040
  # Looks up Attribute class by name.
1007
- #--
1008
2041
  # @rbs name: Symbol
1009
2042
  # @rbs return: Attribute
2043
+ # @param [Symbol] name
2044
+ # @return [Attribute]
1010
2045
  def by_name(name); BY_NAME.fetch(name); end
1011
2046
  # Looks up Attribute class by type value.
1012
- #--
1013
2047
  # @rbs type: Integer
1014
2048
  # @rbs return: Attribute
2049
+ # @param [Integer] type
2050
+ # @return [Attribute]
1015
2051
  def by_type(type); BY_TYPE.fetch(type); end
1016
2052
  end
1017
2053
  end
1018
- class OvsNshKeyAttrs < ::Nl::Protocols::Genl::AttributeSet
2054
+ class OvsNshKeyAttrs < ::Nl::AttributeSet
1019
2055
  # Abstract class
1020
- class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
2056
+ class Attribute < ::Nl::AttributeSet::Attribute
1021
2057
  end
1022
2058
  class Base < Attribute
1023
2059
  TYPE = 1
1024
2060
  NAME = :"base"
1025
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
2061
+ # @private
2062
+ ORDER = 0
2063
+ # @private
2064
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
1026
2065
  end
1027
2066
  class Md1 < Attribute
1028
2067
  TYPE = 2
1029
2068
  NAME = :"md1"
1030
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
2069
+ # @private
2070
+ ORDER = 1
2071
+ # @private
2072
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
1031
2073
  end
1032
2074
  class Md2 < Attribute
1033
2075
  TYPE = 3
1034
2076
  NAME = :"md2"
1035
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
2077
+ # @private
2078
+ ORDER = 2
2079
+ # @private
2080
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
1036
2081
  end
1037
- # :nodoc:
2082
+ # @private
1038
2083
  BY_NAME = Ractor.make_shareable({:"base" => Base, :"md1" => Md1, :"md2" => Md2}) #: Hash[::Symbol, Attribute]
1039
- # :nodoc:
2084
+ # @private
1040
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
1041
2098
  class << self
1042
2099
  # Looks up Attribute class by name.
1043
- #--
1044
2100
  # @rbs name: Symbol
1045
2101
  # @rbs return: Attribute
2102
+ # @param [Symbol] name
2103
+ # @return [Attribute]
1046
2104
  def by_name(name); BY_NAME.fetch(name); end
1047
2105
  # Looks up Attribute class by type value.
1048
- #--
1049
2106
  # @rbs type: Integer
1050
2107
  # @rbs return: Attribute
2108
+ # @param [Integer] type
2109
+ # @return [Attribute]
1051
2110
  def by_type(type); BY_TYPE.fetch(type); end
1052
2111
  end
1053
2112
  end
1054
- class CtAttrs < ::Nl::Protocols::Genl::AttributeSet
2113
+ class CtAttrs < ::Nl::AttributeSet
1055
2114
  # Abstract class
1056
- class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
2115
+ class Attribute < ::Nl::AttributeSet::Attribute
1057
2116
  end
1058
2117
  class Commit < Attribute
1059
2118
  TYPE = 1
1060
2119
  NAME = :"commit"
1061
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
2120
+ # @private
2121
+ ORDER = 0
2122
+ # @private
2123
+ DATATYPE = ::Nl::DataTypes::Flag.new
1062
2124
  end
1063
2125
  class Zone < Attribute
1064
2126
  TYPE = 2
1065
2127
  NAME = :"zone"
1066
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
2128
+ # @private
2129
+ ORDER = 1
2130
+ # @private
2131
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
1067
2132
  end
1068
2133
  class Mark < Attribute
1069
2134
  TYPE = 3
1070
2135
  NAME = :"mark"
1071
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
2136
+ # @private
2137
+ ORDER = 2
2138
+ # @private
2139
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
1072
2140
  end
1073
2141
  class Labels < Attribute
1074
2142
  TYPE = 4
1075
2143
  NAME = :"labels"
1076
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
2144
+ # @private
2145
+ ORDER = 3
2146
+ # @private
2147
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
1077
2148
  end
1078
2149
  class Helper < Attribute
1079
2150
  TYPE = 5
1080
2151
  NAME = :"helper"
1081
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::String.new(check: nil)
2152
+ # @private
2153
+ ORDER = 4
2154
+ # @private
2155
+ DATATYPE = ::Nl::DataTypes::String.new(check: nil)
1082
2156
  end
1083
2157
  class Nat < Attribute
1084
2158
  TYPE = 6
1085
2159
  NAME = :"nat"
2160
+ # @private
2161
+ ORDER = 5
1086
2162
  end
1087
2163
  class ForceCommit < Attribute
1088
2164
  TYPE = 7
1089
2165
  NAME = :"force_commit"
1090
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
2166
+ # @private
2167
+ ORDER = 6
2168
+ # @private
2169
+ DATATYPE = ::Nl::DataTypes::Flag.new
1091
2170
  end
1092
2171
  class Eventmask < Attribute
1093
2172
  TYPE = 8
1094
2173
  NAME = :"eventmask"
1095
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
2174
+ # @private
2175
+ ORDER = 7
2176
+ # @private
2177
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
1096
2178
  end
1097
2179
  class Timeout < Attribute
1098
2180
  TYPE = 9
1099
2181
  NAME = :"timeout"
1100
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::String.new(check: nil)
2182
+ # @private
2183
+ ORDER = 8
2184
+ # @private
2185
+ DATATYPE = ::Nl::DataTypes::String.new(check: nil)
1101
2186
  end
1102
- # :nodoc:
2187
+ # @private
1103
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]
1104
- # :nodoc:
2189
+ # @private
1105
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
1106
2227
  class << self
1107
2228
  # Looks up Attribute class by name.
1108
- #--
1109
2229
  # @rbs name: Symbol
1110
2230
  # @rbs return: Attribute
2231
+ # @param [Symbol] name
2232
+ # @return [Attribute]
1111
2233
  def by_name(name); BY_NAME.fetch(name); end
1112
2234
  # Looks up Attribute class by type value.
1113
- #--
1114
2235
  # @rbs type: Integer
1115
2236
  # @rbs return: Attribute
2237
+ # @param [Integer] type
2238
+ # @return [Attribute]
1116
2239
  def by_type(type); BY_TYPE.fetch(type); end
1117
2240
  end
1118
2241
  end
1119
- class NatAttrs < ::Nl::Protocols::Genl::AttributeSet
2242
+ class NatAttrs < ::Nl::AttributeSet
1120
2243
  # Abstract class
1121
- class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
2244
+ class Attribute < ::Nl::AttributeSet::Attribute
1122
2245
  end
1123
2246
  class Src < Attribute
1124
2247
  TYPE = 1
1125
2248
  NAME = :"src"
1126
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
2249
+ # @private
2250
+ ORDER = 0
2251
+ # @private
2252
+ DATATYPE = ::Nl::DataTypes::Flag.new
1127
2253
  end
1128
2254
  class Dst < Attribute
1129
2255
  TYPE = 2
1130
2256
  NAME = :"dst"
1131
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
2257
+ # @private
2258
+ ORDER = 1
2259
+ # @private
2260
+ DATATYPE = ::Nl::DataTypes::Flag.new
1132
2261
  end
1133
2262
  class IpMin < Attribute
1134
2263
  TYPE = 3
1135
2264
  NAME = :"ip_min"
1136
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
2265
+ # @private
2266
+ ORDER = 2
2267
+ # @private
2268
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
1137
2269
  end
1138
2270
  class IpMax < Attribute
1139
2271
  TYPE = 4
1140
2272
  NAME = :"ip_max"
1141
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
2273
+ # @private
2274
+ ORDER = 3
2275
+ # @private
2276
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
1142
2277
  end
1143
2278
  class ProtoMin < Attribute
1144
2279
  TYPE = 5
1145
2280
  NAME = :"proto_min"
1146
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
2281
+ # @private
2282
+ ORDER = 4
2283
+ # @private
2284
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
1147
2285
  end
1148
2286
  class ProtoMax < Attribute
1149
2287
  TYPE = 6
1150
2288
  NAME = :"proto_max"
1151
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
2289
+ # @private
2290
+ ORDER = 5
2291
+ # @private
2292
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
1152
2293
  end
1153
2294
  class Persistent < Attribute
1154
2295
  TYPE = 7
1155
2296
  NAME = :"persistent"
1156
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
2297
+ # @private
2298
+ ORDER = 6
2299
+ # @private
2300
+ DATATYPE = ::Nl::DataTypes::Flag.new
1157
2301
  end
1158
2302
  class ProtoHash < Attribute
1159
2303
  TYPE = 8
1160
2304
  NAME = :"proto_hash"
1161
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
2305
+ # @private
2306
+ ORDER = 7
2307
+ # @private
2308
+ DATATYPE = ::Nl::DataTypes::Flag.new
1162
2309
  end
1163
2310
  class ProtoRandom < Attribute
1164
2311
  TYPE = 9
1165
2312
  NAME = :"proto_random"
1166
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
2313
+ # @private
2314
+ ORDER = 8
2315
+ # @private
2316
+ DATATYPE = ::Nl::DataTypes::Flag.new
1167
2317
  end
1168
- # :nodoc:
2318
+ # @private
1169
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]
1170
- # :nodoc:
2320
+ # @private
1171
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
1172
2358
  class << self
1173
2359
  # Looks up Attribute class by name.
1174
- #--
1175
2360
  # @rbs name: Symbol
1176
2361
  # @rbs return: Attribute
2362
+ # @param [Symbol] name
2363
+ # @return [Attribute]
1177
2364
  def by_name(name); BY_NAME.fetch(name); end
1178
2365
  # Looks up Attribute class by type value.
1179
- #--
1180
2366
  # @rbs type: Integer
1181
2367
  # @rbs return: Attribute
2368
+ # @param [Integer] type
2369
+ # @return [Attribute]
1182
2370
  def by_type(type); BY_TYPE.fetch(type); end
1183
2371
  end
1184
2372
  end
1185
- class DecTtlAttrs < ::Nl::Protocols::Genl::AttributeSet
2373
+ class DecTtlAttrs < ::Nl::AttributeSet
1186
2374
  # Abstract class
1187
- class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
2375
+ class Attribute < ::Nl::AttributeSet::Attribute
1188
2376
  end
1189
2377
  class Action < Attribute
1190
2378
  TYPE = 1
1191
2379
  NAME = :"action"
2380
+ # @private
2381
+ ORDER = 0
1192
2382
  end
1193
- # :nodoc:
2383
+ # @private
1194
2384
  BY_NAME = Ractor.make_shareable({:"action" => Action}) #: Hash[::Symbol, Attribute]
1195
- # :nodoc:
2385
+ # @private
1196
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
1197
2391
  class << self
1198
2392
  # Looks up Attribute class by name.
1199
- #--
1200
2393
  # @rbs name: Symbol
1201
2394
  # @rbs return: Attribute
2395
+ # @param [Symbol] name
2396
+ # @return [Attribute]
1202
2397
  def by_name(name); BY_NAME.fetch(name); end
1203
2398
  # Looks up Attribute class by type value.
1204
- #--
1205
2399
  # @rbs type: Integer
1206
2400
  # @rbs return: Attribute
2401
+ # @param [Integer] type
2402
+ # @return [Attribute]
1207
2403
  def by_type(type); BY_TYPE.fetch(type); end
1208
2404
  end
1209
2405
  end
1210
- class VxlanExtAttrs < ::Nl::Protocols::Genl::AttributeSet
2406
+ class VxlanExtAttrs < ::Nl::AttributeSet
1211
2407
  # Abstract class
1212
- class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
2408
+ class Attribute < ::Nl::AttributeSet::Attribute
1213
2409
  end
1214
2410
  class Gbp < Attribute
1215
2411
  TYPE = 1
1216
2412
  NAME = :"gbp"
1217
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
2413
+ # @private
2414
+ ORDER = 0
2415
+ # @private
2416
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
1218
2417
  end
1219
- # :nodoc:
2418
+ # @private
1220
2419
  BY_NAME = Ractor.make_shareable({:"gbp" => Gbp}) #: Hash[::Symbol, Attribute]
1221
- # :nodoc:
2420
+ # @private
1222
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
1223
2426
  class << self
1224
2427
  # Looks up Attribute class by name.
1225
- #--
1226
2428
  # @rbs name: Symbol
1227
2429
  # @rbs return: Attribute
2430
+ # @param [Symbol] name
2431
+ # @return [Attribute]
1228
2432
  def by_name(name); BY_NAME.fetch(name); end
1229
2433
  # Looks up Attribute class by type value.
1230
- #--
1231
2434
  # @rbs type: Integer
1232
2435
  # @rbs return: Attribute
2436
+ # @param [Integer] type
2437
+ # @return [Attribute]
1233
2438
  def by_type(type); BY_TYPE.fetch(type); end
1234
2439
  end
1235
2440
  end
1236
- class PsampleAttrs < ::Nl::Protocols::Genl::AttributeSet
2441
+ class PsampleAttrs < ::Nl::AttributeSet
1237
2442
  # Abstract class
1238
- class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
2443
+ class Attribute < ::Nl::AttributeSet::Attribute
1239
2444
  end
1240
2445
  class Group < Attribute
1241
2446
  TYPE = 1
1242
2447
  NAME = :"group"
1243
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
2448
+ # @private
2449
+ ORDER = 0
2450
+ # @private
2451
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
1244
2452
  end
1245
2453
  class Cookie < Attribute
1246
2454
  TYPE = 2
1247
2455
  NAME = :"cookie"
1248
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
2456
+ # @private
2457
+ ORDER = 1
2458
+ # @private
2459
+ DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
1249
2460
  end
1250
- # :nodoc:
2461
+ # @private
1251
2462
  BY_NAME = Ractor.make_shareable({:"group" => Group, :"cookie" => Cookie}) #: Hash[::Symbol, Attribute]
1252
- # :nodoc:
2463
+ # @private
1253
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
1254
2473
  class << self
1255
2474
  # Looks up Attribute class by name.
1256
- #--
1257
2475
  # @rbs name: Symbol
1258
2476
  # @rbs return: Attribute
2477
+ # @param [Symbol] name
2478
+ # @return [Attribute]
1259
2479
  def by_name(name); BY_NAME.fetch(name); end
1260
2480
  # Looks up Attribute class by type value.
1261
- #--
1262
2481
  # @rbs type: Integer
1263
2482
  # @rbs return: Attribute
2483
+ # @param [Integer] type
2484
+ # @return [Attribute]
1264
2485
  def by_type(type); BY_TYPE.fetch(type); end
1265
2486
  end
1266
2487
  end
1267
- FlowAttrs::Key::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(KeyAttrs)
1268
- FlowAttrs::Actions::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(ActionAttrs)
1269
- FlowAttrs::Mask::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(KeyAttrs)
1270
- KeyAttrs::Encap::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(KeyAttrs)
1271
- KeyAttrs::Tunnel::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(TunnelKeyAttrs)
1272
- KeyAttrs::Nsh::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(OvsNshKeyAttrs)
1273
- ActionAttrs::Userspace::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(UserspaceAttrs)
1274
- ActionAttrs::Set::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(KeyAttrs)
1275
- ActionAttrs::Sample::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(SampleAttrs)
1276
- ActionAttrs::SetMasked::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(KeyAttrs)
1277
- ActionAttrs::Ct::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(CtAttrs)
1278
- ActionAttrs::PushNsh::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(OvsNshKeyAttrs)
1279
- ActionAttrs::Clone::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(ActionAttrs)
1280
- ActionAttrs::CheckPktLen::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(CheckPktLenAttrs)
1281
- ActionAttrs::DecTtl::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(DecTtlAttrs)
1282
- ActionAttrs::Psample::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(PsampleAttrs)
1283
- TunnelKeyAttrs::VxlanOpts::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(VxlanExtAttrs)
1284
- CheckPktLenAttrs::ActionsIfGreater::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(ActionAttrs)
1285
- CheckPktLenAttrs::ActionsIfLessEqual::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(ActionAttrs)
1286
- SampleAttrs::Actions::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(ActionAttrs)
1287
- CtAttrs::Nat::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(NatAttrs)
1288
- DecTtlAttrs::Action::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(ActionAttrs)
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([]))
1289
2532
  end
1290
2533
  module Messages
1291
2534
  # Get / dump OVS flow configuration and state
1292
- class DoGetRequest < ::Nl::Protocols::Genl::Message
2535
+ class DoGetRequest < ::Nl::Genl::Message
1293
2536
  TYPE = 3
1294
2537
  FIXED_HEADER = Structs::OvsHeader
1295
2538
  ATTRIBUTE_SET = AttributeSets::FlowAttrs
1296
2539
  ATTRIBUTES = Ractor.make_shareable(%i[key ufid ufid_flags])
1297
- # Gets the value of `dp-ifindex` field in the message's fixed header.
1298
- #--
2540
+ # ifindex of local port for datapath (0 to make a request not specific
2541
+ # to a datapath).
1299
2542
  # @rbs return: ::Integer
2543
+ # @return [Integer]
1300
2544
  def dp_ifindex; fixed_header.dp_ifindex; end
1301
- # Gets the value of `key` attribute in the message.
1302
- #--
2545
+ # Nested attributes specifying the flow key. Always present in
2546
+ # notifications. Required for all requests (except dumps).
1303
2547
  # @rbs return: AttributeSets::KeyAttrs
2548
+ # @return [AttributeSets::KeyAttrs]
2549
+ # @see AttributeSets::FlowAttrs::Key
1304
2550
  def key; attributes[:"key"]&.value; end
1305
- # Gets the value of `ufid` attribute in the message.
1306
- #--
1307
- # @rbs return: untyped
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
1308
2559
  def ufid; attributes[:"ufid"]&.value; end
1309
- # Gets the value of `ufid-flags` attribute in the message.
1310
- #--
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}.
1311
2565
  # @rbs return: ::Integer
2566
+ # @return [Integer]
2567
+ # @see AttributeSets::FlowAttrs::UfidFlags
1312
2568
  def ufid_flags; attributes[:"ufid_flags"]&.value; end
1313
2569
  end
1314
2570
  # Get / dump OVS flow configuration and state
1315
- class DoGetReply < ::Nl::Protocols::Genl::Message
2571
+ class DoGetReply < ::Nl::Genl::Message
1316
2572
  TYPE = 3
1317
2573
  FIXED_HEADER = Structs::OvsHeader
1318
2574
  ATTRIBUTE_SET = AttributeSets::FlowAttrs
1319
2575
  ATTRIBUTES = Ractor.make_shareable(%i[key actions stats mask ufid])
1320
- # Gets the value of `dp-ifindex` field in the message's fixed header.
1321
- #--
2576
+ # ifindex of local port for datapath (0 to make a request not specific
2577
+ # to a datapath).
1322
2578
  # @rbs return: ::Integer
2579
+ # @return [Integer]
1323
2580
  def dp_ifindex; fixed_header.dp_ifindex; end
1324
- # Gets the value of `key` attribute in the message.
1325
- #--
2581
+ # Nested attributes specifying the flow key. Always present in
2582
+ # notifications. Required for all requests (except dumps).
1326
2583
  # @rbs return: AttributeSets::KeyAttrs
2584
+ # @return [AttributeSets::KeyAttrs]
2585
+ # @see AttributeSets::FlowAttrs::Key
1327
2586
  def key; attributes[:"key"]&.value; end
1328
- # Gets the value of `actions` attribute in the message.
1329
- #--
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.
1330
2593
  # @rbs return: AttributeSets::ActionAttrs
2594
+ # @return [AttributeSets::ActionAttrs]
2595
+ # @see AttributeSets::FlowAttrs::Actions
1331
2596
  def actions; attributes[:"actions"]&.value; end
1332
- # Gets the value of `stats` attribute in the message.
1333
- #--
1334
- # @rbs return: untyped
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
1335
2602
  def stats; attributes[:"stats"]&.value; end
1336
- # Gets the value of `mask` attribute in the message.
1337
- #--
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.
1338
2609
  # @rbs return: AttributeSets::KeyAttrs
2610
+ # @return [AttributeSets::KeyAttrs]
2611
+ # @see AttributeSets::FlowAttrs::Mask
1339
2612
  def mask; attributes[:"mask"]&.value; end
1340
- # Gets the value of `ufid` attribute in the message.
1341
- #--
1342
- # @rbs return: untyped
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
1343
2621
  def ufid; attributes[:"ufid"]&.value; end
1344
2622
  end
1345
2623
  # Get / dump OVS flow configuration and state
1346
- class DumpGetRequest < ::Nl::Protocols::Genl::Message
2624
+ class DumpGetRequest < ::Nl::Genl::Message
1347
2625
  TYPE = 3
1348
2626
  FIXED_HEADER = Structs::OvsHeader
1349
2627
  ATTRIBUTE_SET = AttributeSets::FlowAttrs
1350
2628
  ATTRIBUTES = Ractor.make_shareable(%i[key ufid ufid_flags])
1351
- # Gets the value of `dp-ifindex` field in the message's fixed header.
1352
- #--
2629
+ # ifindex of local port for datapath (0 to make a request not specific
2630
+ # to a datapath).
1353
2631
  # @rbs return: ::Integer
2632
+ # @return [Integer]
1354
2633
  def dp_ifindex; fixed_header.dp_ifindex; end
1355
- # Gets the value of `key` attribute in the message.
1356
- #--
2634
+ # Nested attributes specifying the flow key. Always present in
2635
+ # notifications. Required for all requests (except dumps).
1357
2636
  # @rbs return: AttributeSets::KeyAttrs
2637
+ # @return [AttributeSets::KeyAttrs]
2638
+ # @see AttributeSets::FlowAttrs::Key
1358
2639
  def key; attributes[:"key"]&.value; end
1359
- # Gets the value of `ufid` attribute in the message.
1360
- #--
1361
- # @rbs return: untyped
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
1362
2648
  def ufid; attributes[:"ufid"]&.value; end
1363
- # Gets the value of `ufid-flags` attribute in the message.
1364
- #--
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}.
1365
2654
  # @rbs return: ::Integer
2655
+ # @return [Integer]
2656
+ # @see AttributeSets::FlowAttrs::UfidFlags
1366
2657
  def ufid_flags; attributes[:"ufid_flags"]&.value; end
1367
2658
  end
1368
2659
  # Get / dump OVS flow configuration and state
1369
- class DumpGetReply < ::Nl::Protocols::Genl::Message
2660
+ class DumpGetReply < ::Nl::Genl::Message
1370
2661
  TYPE = 3
1371
2662
  FIXED_HEADER = Structs::OvsHeader
1372
2663
  ATTRIBUTE_SET = AttributeSets::FlowAttrs
1373
2664
  ATTRIBUTES = Ractor.make_shareable(%i[key actions stats mask ufid])
1374
- # Gets the value of `dp-ifindex` field in the message's fixed header.
1375
- #--
2665
+ # ifindex of local port for datapath (0 to make a request not specific
2666
+ # to a datapath).
1376
2667
  # @rbs return: ::Integer
2668
+ # @return [Integer]
1377
2669
  def dp_ifindex; fixed_header.dp_ifindex; end
1378
- # Gets the value of `key` attribute in the message.
1379
- #--
2670
+ # Nested attributes specifying the flow key. Always present in
2671
+ # notifications. Required for all requests (except dumps).
1380
2672
  # @rbs return: AttributeSets::KeyAttrs
2673
+ # @return [AttributeSets::KeyAttrs]
2674
+ # @see AttributeSets::FlowAttrs::Key
1381
2675
  def key; attributes[:"key"]&.value; end
1382
- # Gets the value of `actions` attribute in the message.
1383
- #--
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.
1384
2682
  # @rbs return: AttributeSets::ActionAttrs
2683
+ # @return [AttributeSets::ActionAttrs]
2684
+ # @see AttributeSets::FlowAttrs::Actions
1385
2685
  def actions; attributes[:"actions"]&.value; end
1386
- # Gets the value of `stats` attribute in the message.
1387
- #--
1388
- # @rbs return: untyped
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
1389
2691
  def stats; attributes[:"stats"]&.value; end
1390
- # Gets the value of `mask` attribute in the message.
1391
- #--
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.
1392
2698
  # @rbs return: AttributeSets::KeyAttrs
2699
+ # @return [AttributeSets::KeyAttrs]
2700
+ # @see AttributeSets::FlowAttrs::Mask
1393
2701
  def mask; attributes[:"mask"]&.value; end
1394
- # Gets the value of `ufid` attribute in the message.
1395
- #--
1396
- # @rbs return: untyped
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
1397
2710
  def ufid; attributes[:"ufid"]&.value; end
1398
2711
  end
1399
2712
  # Create OVS flow configuration in a data path
1400
- class DoNewRequest < ::Nl::Protocols::Genl::Message
2713
+ class DoNewRequest < ::Nl::Genl::Message
1401
2714
  TYPE = 1
1402
2715
  FIXED_HEADER = Structs::OvsHeader
1403
2716
  ATTRIBUTE_SET = AttributeSets::FlowAttrs
1404
2717
  ATTRIBUTES = Ractor.make_shareable(%i[key actions mask ufid])
1405
- # Gets the value of `dp-ifindex` field in the message's fixed header.
1406
- #--
2718
+ # ifindex of local port for datapath (0 to make a request not specific
2719
+ # to a datapath).
1407
2720
  # @rbs return: ::Integer
2721
+ # @return [Integer]
1408
2722
  def dp_ifindex; fixed_header.dp_ifindex; end
1409
- # Gets the value of `key` attribute in the message.
1410
- #--
2723
+ # Nested attributes specifying the flow key. Always present in
2724
+ # notifications. Required for all requests (except dumps).
1411
2725
  # @rbs return: AttributeSets::KeyAttrs
2726
+ # @return [AttributeSets::KeyAttrs]
2727
+ # @see AttributeSets::FlowAttrs::Key
1412
2728
  def key; attributes[:"key"]&.value; end
1413
- # Gets the value of `actions` attribute in the message.
1414
- #--
2729
+ # Nested attributes specifying the actions to take for packets that
2730
+ # match the key. Always present in notifications. Required for
2731
+ # OVS_FLOW_CMD_NEW requests, optional for OVS_FLOW_CMD_SET requests. An
2732
+ # OVS_FLOW_CMD_SET without OVS_FLOW_ATTR_ACTIONS will not modify the
2733
+ # actions. To clear the actions, an OVS_FLOW_ATTR_ACTIONS without any
2734
+ # nested attributes must be given.
1415
2735
  # @rbs return: AttributeSets::ActionAttrs
2736
+ # @return [AttributeSets::ActionAttrs]
2737
+ # @see AttributeSets::FlowAttrs::Actions
1416
2738
  def actions; attributes[:"actions"]&.value; end
1417
- # Gets the value of `mask` attribute in the message.
1418
- #--
2739
+ # Nested attributes specifying the mask bits for wildcarded flow
2740
+ # match. Mask bit value '1' specifies exact match with corresponding
2741
+ # flow key bit, while mask bit value '0' specifies a wildcarded
2742
+ # match. Omitting attribute is treated as wildcarding all corresponding
2743
+ # fields. Optional for all requests. If not present, all flow key bits
2744
+ # are exact match bits.
1419
2745
  # @rbs return: AttributeSets::KeyAttrs
2746
+ # @return [AttributeSets::KeyAttrs]
2747
+ # @see AttributeSets::FlowAttrs::Mask
1420
2748
  def mask; attributes[:"mask"]&.value; end
1421
- # Gets the value of `ufid` attribute in the message.
1422
- #--
1423
- # @rbs return: untyped
2749
+ # A value between 1-16 octets specifying a unique identifier for the
2750
+ # flow. Causes the flow to be indexed by this value rather than the
2751
+ # value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
2752
+ # requests. Present in notifications if the flow was created with this
2753
+ # attribute.
2754
+ # @rbs return: ::String
2755
+ # @return [String]
2756
+ # @see AttributeSets::FlowAttrs::Ufid
1424
2757
  def ufid; attributes[:"ufid"]&.value; end
1425
2758
  end
1426
2759
  end
2760
+ module Notifications
2761
+ end
2762
+ # @private
2763
+ NOTIFICATIONS = Ractor.make_shareable({}) #: Hash[::Integer, ::Class]
1427
2764
  # Get / dump OVS flow configuration and state
1428
- #--
1429
- # @rbs (?dp_ifindex: ::Integer, ?key: AttributeSets::KeyAttrs, ?ufid: untyped, ?ufid_flags: ::Integer) -> Messages::DoGetReply
2765
+ # @rbs (?dp_ifindex: ::Integer, ?key: (AttributeSets::KeyAttrs | ::Hash[::Symbol, untyped]), ?ufid: ::String, ?ufid_flags: ::Integer) -> Messages::DoGetReply
2766
+ # @param [Hash] args
2767
+ # @option args [Integer] dp_ifindex ifindex of local port for datapath (0 to make a request not specific
2768
+ # to a datapath).
2769
+ # @option args [AttributeSets::KeyAttrs, Hash<Symbol, Object>] key Nested attributes specifying the flow key. Always present in
2770
+ # notifications. Required for all requests (except dumps).
2771
+ # @option args [String] ufid A value between 1-16 octets specifying a unique identifier for the
2772
+ # flow. Causes the flow to be indexed by this value rather than the
2773
+ # value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
2774
+ # requests. Present in notifications if the flow was created with this
2775
+ # attribute.
2776
+ # @option args [Integer] ufid_flags A 32-bit value of ORed flags that provide alternative semantics for
2777
+ # flow installation and retrieval. Optional for all requests.
2778
+ #
2779
+ #
2780
+ # Known flags are defined in {Flags::OvsUfidFlags}.
2781
+ # @return [Messages::DoGetReply]
2782
+ # @see Messages::DoGetRequest
1430
2783
  def do_get(**args)
1431
2784
  exchange_message(:"do", Messages::DoGetRequest, Messages::DoGetReply, args)
1432
2785
  end
1433
2786
  # Get / dump OVS flow configuration and state
1434
- #--
1435
- # @rbs (?dp_ifindex: ::Integer, ?key: AttributeSets::KeyAttrs, ?ufid: untyped, ?ufid_flags: ::Integer) -> Enumerable[Messages::DumpGetReply]
1436
- # | (?dp_ifindex: ::Integer, ?key: AttributeSets::KeyAttrs, ?ufid: untyped, ?ufid_flags: ::Integer) { (Messages::DumpGetReply) -> void } -> void
2787
+ # @rbs (?dp_ifindex: ::Integer, ?key: (AttributeSets::KeyAttrs | ::Hash[::Symbol, untyped]), ?ufid: ::String, ?ufid_flags: ::Integer) -> Array[Messages::DumpGetReply]
2788
+ # | (?dp_ifindex: ::Integer, ?key: (AttributeSets::KeyAttrs | ::Hash[::Symbol, untyped]), ?ufid: ::String, ?ufid_flags: ::Integer) { (Messages::DumpGetReply) -> void } -> void
2789
+ # @overload dump_get(**args)
2790
+ # Returns an array when no block is given.
2791
+ # @param [Hash] args
2792
+ # @option args [Integer] dp_ifindex ifindex of local port for datapath (0 to make a request not specific
2793
+ # to a datapath).
2794
+ # @option args [AttributeSets::KeyAttrs, Hash<Symbol, Object>] key Nested attributes specifying the flow key. Always present in
2795
+ # notifications. Required for all requests (except dumps).
2796
+ # @option args [String] ufid A value between 1-16 octets specifying a unique identifier for the
2797
+ # flow. Causes the flow to be indexed by this value rather than the
2798
+ # value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
2799
+ # requests. Present in notifications if the flow was created with this
2800
+ # attribute.
2801
+ # @option args [Integer] ufid_flags A 32-bit value of ORed flags that provide alternative semantics for
2802
+ # flow installation and retrieval. Optional for all requests.
2803
+ #
2804
+ #
2805
+ # Known flags are defined in {Flags::OvsUfidFlags}.
2806
+ # @return [Array<Messages::DumpGetReply>]
2807
+ # @overload dump_get(**args, &block)
2808
+ # Yields each reply when a block is given.
2809
+ # @param [Hash] args
2810
+ # @option args [Integer] dp_ifindex ifindex of local port for datapath (0 to make a request not specific
2811
+ # to a datapath).
2812
+ # @option args [AttributeSets::KeyAttrs, Hash<Symbol, Object>] key Nested attributes specifying the flow key. Always present in
2813
+ # notifications. Required for all requests (except dumps).
2814
+ # @option args [String] ufid A value between 1-16 octets specifying a unique identifier for the
2815
+ # flow. Causes the flow to be indexed by this value rather than the
2816
+ # value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
2817
+ # requests. Present in notifications if the flow was created with this
2818
+ # attribute.
2819
+ # @option args [Integer] ufid_flags A 32-bit value of ORed flags that provide alternative semantics for
2820
+ # flow installation and retrieval. Optional for all requests.
2821
+ #
2822
+ #
2823
+ # Known flags are defined in {Flags::OvsUfidFlags}.
2824
+ # @yieldparam [Messages::DumpGetReply] reply
2825
+ # @return [void]
2826
+ # @see Messages::DumpGetRequest
1437
2827
  def dump_get(**args, &block)
1438
2828
  exchange_message(:"dump", Messages::DumpGetRequest, Messages::DumpGetReply, args, &block)
1439
2829
  end
1440
2830
  # Create OVS flow configuration in a data path
1441
- #--
1442
- # @rbs (?dp_ifindex: ::Integer, ?key: AttributeSets::KeyAttrs, ?actions: AttributeSets::ActionAttrs, ?mask: AttributeSets::KeyAttrs, ?ufid: untyped) -> void
2831
+ # @rbs (?dp_ifindex: ::Integer, ?key: (AttributeSets::KeyAttrs | ::Hash[::Symbol, untyped]), ?actions: (AttributeSets::ActionAttrs | ::Hash[::Symbol, untyped]), ?mask: (AttributeSets::KeyAttrs | ::Hash[::Symbol, untyped]), ?ufid: ::String) -> void
2832
+ # @param [Hash] args
2833
+ # @option args [Integer] dp_ifindex ifindex of local port for datapath (0 to make a request not specific
2834
+ # to a datapath).
2835
+ # @option args [AttributeSets::KeyAttrs, Hash<Symbol, Object>] key Nested attributes specifying the flow key. Always present in
2836
+ # notifications. Required for all requests (except dumps).
2837
+ # @option args [AttributeSets::ActionAttrs, Hash<Symbol, Object>] actions Nested attributes specifying the actions to take for packets that
2838
+ # match the key. Always present in notifications. Required for
2839
+ # OVS_FLOW_CMD_NEW requests, optional for OVS_FLOW_CMD_SET requests. An
2840
+ # OVS_FLOW_CMD_SET without OVS_FLOW_ATTR_ACTIONS will not modify the
2841
+ # actions. To clear the actions, an OVS_FLOW_ATTR_ACTIONS without any
2842
+ # nested attributes must be given.
2843
+ # @option args [AttributeSets::KeyAttrs, Hash<Symbol, Object>] mask Nested attributes specifying the mask bits for wildcarded flow
2844
+ # match. Mask bit value '1' specifies exact match with corresponding
2845
+ # flow key bit, while mask bit value '0' specifies a wildcarded
2846
+ # match. Omitting attribute is treated as wildcarding all corresponding
2847
+ # fields. Optional for all requests. If not present, all flow key bits
2848
+ # are exact match bits.
2849
+ # @option args [String] ufid A value between 1-16 octets specifying a unique identifier for the
2850
+ # flow. Causes the flow to be indexed by this value rather than the
2851
+ # value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
2852
+ # requests. Present in notifications if the flow was created with this
2853
+ # attribute.
2854
+ # @return [void]
2855
+ # @see Messages::DoNewRequest
1443
2856
  def do_new(**args)
1444
2857
  exchange_message(:"do", Messages::DoNewRequest, nil, args)
1445
2858
  end
2859
+ class AsyncOperations
2860
+ # @private
2861
+ def initialize(&exchange)
2862
+ @exchange = exchange
2863
+ end
2864
+ # Get / dump OVS flow configuration and state
2865
+ # @rbs (?dp_ifindex: ::Integer, ?key: (AttributeSets::KeyAttrs | ::Hash[::Symbol, untyped]), ?ufid: ::String, ?ufid_flags: ::Integer) -> ::Nl::Async::Future[Messages::DoGetReply]
2866
+ # @param [Hash] args
2867
+ # @option args [Integer] dp_ifindex ifindex of local port for datapath (0 to make a request not specific
2868
+ # to a datapath).
2869
+ # @option args [AttributeSets::KeyAttrs, Hash<Symbol, Object>] key Nested attributes specifying the flow key. Always present in
2870
+ # notifications. Required for all requests (except dumps).
2871
+ # @option args [String] ufid A value between 1-16 octets specifying a unique identifier for the
2872
+ # flow. Causes the flow to be indexed by this value rather than the
2873
+ # value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
2874
+ # requests. Present in notifications if the flow was created with this
2875
+ # attribute.
2876
+ # @option args [Integer] ufid_flags A 32-bit value of ORed flags that provide alternative semantics for
2877
+ # flow installation and retrieval. Optional for all requests.
2878
+ #
2879
+ #
2880
+ # Known flags are defined in {Flags::OvsUfidFlags}.
2881
+ # @return [Nl::Async::Future<Messages::DoGetReply>]
2882
+ # @see Messages::DoGetRequest
2883
+ def do_get(**args)
2884
+ @exchange.call(:"do", Messages::DoGetRequest, Messages::DoGetReply, args)
2885
+ end
2886
+ # Get / dump OVS flow configuration and state
2887
+ # @rbs (?dp_ifindex: ::Integer, ?key: (AttributeSets::KeyAttrs | ::Hash[::Symbol, untyped]), ?ufid: ::String, ?ufid_flags: ::Integer) -> ::Nl::Async::Stream[Messages::DumpGetReply]
2888
+ # @param [Hash] args
2889
+ # @option args [Integer] dp_ifindex ifindex of local port for datapath (0 to make a request not specific
2890
+ # to a datapath).
2891
+ # @option args [AttributeSets::KeyAttrs, Hash<Symbol, Object>] key Nested attributes specifying the flow key. Always present in
2892
+ # notifications. Required for all requests (except dumps).
2893
+ # @option args [String] ufid A value between 1-16 octets specifying a unique identifier for the
2894
+ # flow. Causes the flow to be indexed by this value rather than the
2895
+ # value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
2896
+ # requests. Present in notifications if the flow was created with this
2897
+ # attribute.
2898
+ # @option args [Integer] ufid_flags A 32-bit value of ORed flags that provide alternative semantics for
2899
+ # flow installation and retrieval. Optional for all requests.
2900
+ #
2901
+ #
2902
+ # Known flags are defined in {Flags::OvsUfidFlags}.
2903
+ # @return [Nl::Async::Stream<Messages::DumpGetReply>]
2904
+ # @see Messages::DumpGetRequest
2905
+ def dump_get(**args)
2906
+ @exchange.call(:"dump", Messages::DumpGetRequest, Messages::DumpGetReply, args)
2907
+ end
2908
+ # Create OVS flow configuration in a data path
2909
+ # @rbs (?dp_ifindex: ::Integer, ?key: (AttributeSets::KeyAttrs | ::Hash[::Symbol, untyped]), ?actions: (AttributeSets::ActionAttrs | ::Hash[::Symbol, untyped]), ?mask: (AttributeSets::KeyAttrs | ::Hash[::Symbol, untyped]), ?ufid: ::String) -> ::Nl::Async::Future[void]
2910
+ # @param [Hash] args
2911
+ # @option args [Integer] dp_ifindex ifindex of local port for datapath (0 to make a request not specific
2912
+ # to a datapath).
2913
+ # @option args [AttributeSets::KeyAttrs, Hash<Symbol, Object>] key Nested attributes specifying the flow key. Always present in
2914
+ # notifications. Required for all requests (except dumps).
2915
+ # @option args [AttributeSets::ActionAttrs, Hash<Symbol, Object>] actions Nested attributes specifying the actions to take for packets that
2916
+ # match the key. Always present in notifications. Required for
2917
+ # OVS_FLOW_CMD_NEW requests, optional for OVS_FLOW_CMD_SET requests. An
2918
+ # OVS_FLOW_CMD_SET without OVS_FLOW_ATTR_ACTIONS will not modify the
2919
+ # actions. To clear the actions, an OVS_FLOW_ATTR_ACTIONS without any
2920
+ # nested attributes must be given.
2921
+ # @option args [AttributeSets::KeyAttrs, Hash<Symbol, Object>] mask Nested attributes specifying the mask bits for wildcarded flow
2922
+ # match. Mask bit value '1' specifies exact match with corresponding
2923
+ # flow key bit, while mask bit value '0' specifies a wildcarded
2924
+ # match. Omitting attribute is treated as wildcarding all corresponding
2925
+ # fields. Optional for all requests. If not present, all flow key bits
2926
+ # are exact match bits.
2927
+ # @option args [String] ufid A value between 1-16 octets specifying a unique identifier for the
2928
+ # flow. Causes the flow to be indexed by this value rather than the
2929
+ # value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
2930
+ # requests. Present in notifications if the flow was created with this
2931
+ # attribute.
2932
+ # @return [Nl::Async::Future<void>]
2933
+ # @see Messages::DoNewRequest
2934
+ def do_new(**args)
2935
+ @exchange.call(:"do", Messages::DoNewRequest, nil, args)
2936
+ end
2937
+ end
2938
+ # Returns the asynchronous operation facade for this family.
2939
+ # @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
2940
+ # @param [::Integer, nil] stream_capacity
2941
+ # @return [AsyncOperations]
2942
+ def async(stream_capacity: nil)
2943
+ return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
2944
+ build_async_facade(AsyncOperations, stream_capacity:)
2945
+ end
2946
+ # @rbs (*(:ovs_flow) groups) -> self
2947
+ # @param [Array<:ovs_flow>] groups
2948
+ # @return [self]
2949
+ def subscribe(*groups) = super
2950
+ # @rbs (*(:ovs_flow) groups) -> self
2951
+ # @param [Array<:ovs_flow>] groups
2952
+ # @return [self]
2953
+ def unsubscribe(*groups) = super
1446
2954
  end
1447
2955
  end; end