nl-linux 0.2.4 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +3 -0
  3. data/CHANGELOG.md +2 -0
  4. data/Rakefile +13 -3
  5. data/generated/nl/linux/binder.rb +80 -0
  6. data/generated/nl/linux/conntrack.rb +39 -2
  7. data/generated/nl/linux/dev_energymodel.rb +106 -0
  8. data/generated/nl/linux/devlink.rb +751 -0
  9. data/generated/nl/linux/dpll.rb +712 -55
  10. data/generated/nl/linux/drm_ras.rb +87 -0
  11. data/generated/nl/linux/ethtool.rb +1569 -259
  12. data/generated/nl/linux/fou.rb +82 -13
  13. data/generated/nl/linux/handshake.rb +92 -0
  14. data/generated/nl/linux/lockd.rb +50 -0
  15. data/generated/nl/linux/mptcp_pm.rb +159 -0
  16. data/generated/nl/linux/net_shaper.rb +123 -0
  17. data/generated/nl/linux/netdev.rb +374 -0
  18. data/generated/nl/linux/nfsd.rb +316 -6
  19. data/generated/nl/linux/nftables.rb +414 -25
  20. data/generated/nl/linux/nl80211.rb +81 -22
  21. data/generated/nl/linux/nlctrl.rb +59 -8
  22. data/generated/nl/linux/ovpn.rb +180 -0
  23. data/generated/nl/linux/ovs_datapath.rb +55 -6
  24. data/generated/nl/linux/ovs_flow.rb +63 -20
  25. data/generated/nl/linux/ovs_packet.rb +115 -4
  26. data/generated/nl/linux/ovs_vport.rb +55 -6
  27. data/generated/nl/linux/psp.rb +257 -0
  28. data/generated/nl/linux/rt_addr.rb +69 -14
  29. data/generated/nl/linux/rt_link.rb +381 -47
  30. data/generated/nl/linux/rt_neigh.rb +227 -16
  31. data/generated/nl/linux/rt_route.rb +92 -49
  32. data/generated/nl/linux/rt_rule.rb +300 -11
  33. data/generated/nl/linux/sunrpc_cache.rb +130 -0
  34. data/generated/nl/linux/tc.rb +161 -52
  35. data/generated/nl/linux/tcp_metrics.rb +69 -12
  36. data/generated/nl/linux/team.rb +80 -0
  37. data/generated/nl/linux/wireguard.rb +99 -7
  38. data/lib/nl/linux/version.rb +1 -1
  39. metadata +11 -9
@@ -1,4 +1,6 @@
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/drm_ras.yaml from Linux v7.2.
2
4
  #--
3
5
  # frozen_string_literal: true
4
6
  # rbs_inline: enabled
@@ -9,6 +11,7 @@ module Nl; module Linux
9
11
  class DrmRas < ::Nl::Family
10
12
  NAME = "drm-ras"
11
13
  PROTOCOL = Ractor.make_shareable(::Nl::Protocols::Genl.new("drm-ras"))
14
+ MCAST_GROUPS = Ractor.make_shareable({}) #: Hash[::Symbol, ::Nl::McastGroup]
12
15
  module Structs
13
16
  end
14
17
  module AttributeSets
@@ -97,6 +100,17 @@ class DrmRas < ::Nl::Family
97
100
  end
98
101
  module Messages
99
102
  # Retrieve the full list of currently registered DRM RAS nodes. Each node includes its dynamically assigned ID, name, and type. **Important:** User space must call this operation first to obtain the node IDs. These IDs are required for all subsequent operations on nodes, such as querying error counters.
103
+ #
104
+ # Requires CAP_NET_ADMIN in the initial user namespace.
105
+ class DumpListNodesRequest < ::Nl::Protocols::Genl::Message
106
+ TYPE = 1
107
+ FIXED_HEADER = nil
108
+ ATTRIBUTE_SET = AttributeSets::NodeAttrs
109
+ ATTRIBUTES = Ractor.make_shareable(%i[])
110
+ end
111
+ # Retrieve the full list of currently registered DRM RAS nodes. Each node includes its dynamically assigned ID, name, and type. **Important:** User space must call this operation first to obtain the node IDs. These IDs are required for all subsequent operations on nodes, such as querying error counters.
112
+ #
113
+ # Requires CAP_NET_ADMIN in the initial user namespace.
100
114
  class DumpListNodesReply < ::Nl::Protocols::Genl::Message
101
115
  TYPE = 1
102
116
  FIXED_HEADER = nil
@@ -120,6 +134,8 @@ class DrmRas < ::Nl::Family
120
134
  def node_type; attributes[:"node_type"]&.value; end
121
135
  end
122
136
  # Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
137
+ #
138
+ # Requires CAP_NET_ADMIN in the initial user namespace.
123
139
  class DoGetErrorCounterRequest < ::Nl::Protocols::Genl::Message
124
140
  TYPE = 2
125
141
  FIXED_HEADER = nil
@@ -135,6 +151,8 @@ class DrmRas < ::Nl::Family
135
151
  def error_id; attributes[:"error_id"]&.value; end
136
152
  end
137
153
  # Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
154
+ #
155
+ # Requires CAP_NET_ADMIN in the initial user namespace.
138
156
  class DoGetErrorCounterReply < ::Nl::Protocols::Genl::Message
139
157
  TYPE = 2
140
158
  FIXED_HEADER = nil
@@ -154,6 +172,8 @@ class DrmRas < ::Nl::Family
154
172
  def error_value; attributes[:"error_value"]&.value; end
155
173
  end
156
174
  # Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
175
+ #
176
+ # Requires CAP_NET_ADMIN in the initial user namespace.
157
177
  class DumpGetErrorCounterRequest < ::Nl::Protocols::Genl::Message
158
178
  TYPE = 2
159
179
  FIXED_HEADER = nil
@@ -165,6 +185,8 @@ class DrmRas < ::Nl::Family
165
185
  def node_id; attributes[:"node_id"]&.value; end
166
186
  end
167
187
  # Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
188
+ #
189
+ # Requires CAP_NET_ADMIN in the initial user namespace.
168
190
  class DumpGetErrorCounterReply < ::Nl::Protocols::Genl::Message
169
191
  TYPE = 2
170
192
  FIXED_HEADER = nil
@@ -184,6 +206,8 @@ class DrmRas < ::Nl::Family
184
206
  def error_value; attributes[:"error_value"]&.value; end
185
207
  end
186
208
  # Clear error counter for a given node. The request includes the error-id and node-id of the counter to be cleared.
209
+ #
210
+ # Requires CAP_NET_ADMIN in the initial user namespace.
187
211
  class DoClearErrorCounterRequest < ::Nl::Protocols::Genl::Message
188
212
  TYPE = 3
189
213
  FIXED_HEADER = nil
@@ -199,13 +223,29 @@ class DrmRas < ::Nl::Family
199
223
  def error_id; attributes[:"error_id"]&.value; end
200
224
  end
201
225
  end
226
+ module Notifications
227
+ end
228
+ NOTIFICATIONS = Ractor.make_shareable({}) #: Hash[::Integer, ::Class]
229
+ # Retrieve the full list of currently registered DRM RAS nodes. Each node includes its dynamically assigned ID, name, and type. **Important:** User space must call this operation first to obtain the node IDs. These IDs are required for all subsequent operations on nodes, such as querying error counters.
230
+ #
231
+ # Requires CAP_NET_ADMIN in the initial user namespace.
232
+ #--
233
+ # @rbs () -> Enumerable[Messages::DumpListNodesReply]
234
+ # | () { (Messages::DumpListNodesReply) -> void } -> void
235
+ def dump_list_nodes(**args, &block)
236
+ exchange_message(:"dump", Messages::DumpListNodesRequest, Messages::DumpListNodesReply, args, &block)
237
+ end
202
238
  # Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
239
+ #
240
+ # Requires CAP_NET_ADMIN in the initial user namespace.
203
241
  #--
204
242
  # @rbs (?node_id: ::Integer, ?error_id: ::Integer) -> Messages::DoGetErrorCounterReply
205
243
  def do_get_error_counter(**args)
206
244
  exchange_message(:"do", Messages::DoGetErrorCounterRequest, Messages::DoGetErrorCounterReply, args)
207
245
  end
208
246
  # Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
247
+ #
248
+ # Requires CAP_NET_ADMIN in the initial user namespace.
209
249
  #--
210
250
  # @rbs (?node_id: ::Integer) -> Enumerable[Messages::DumpGetErrorCounterReply]
211
251
  # | (?node_id: ::Integer) { (Messages::DumpGetErrorCounterReply) -> void } -> void
@@ -213,10 +253,57 @@ class DrmRas < ::Nl::Family
213
253
  exchange_message(:"dump", Messages::DumpGetErrorCounterRequest, Messages::DumpGetErrorCounterReply, args, &block)
214
254
  end
215
255
  # Clear error counter for a given node. The request includes the error-id and node-id of the counter to be cleared.
256
+ #
257
+ # Requires CAP_NET_ADMIN in the initial user namespace.
216
258
  #--
217
259
  # @rbs (?node_id: ::Integer, ?error_id: ::Integer) -> void
218
260
  def do_clear_error_counter(**args)
219
261
  exchange_message(:"do", Messages::DoClearErrorCounterRequest, nil, args)
220
262
  end
263
+ class AsyncOperations
264
+ # :nodoc:
265
+ def initialize(&exchange)
266
+ @exchange = exchange
267
+ end
268
+ # Retrieve the full list of currently registered DRM RAS nodes. Each node includes its dynamically assigned ID, name, and type. **Important:** User space must call this operation first to obtain the node IDs. These IDs are required for all subsequent operations on nodes, such as querying error counters.
269
+ #
270
+ # Requires CAP_NET_ADMIN in the initial user namespace.
271
+ #--
272
+ # @rbs () -> ::Nl::Async::Stream[Messages::DumpListNodesReply]
273
+ def dump_list_nodes(**args)
274
+ @exchange.call(:"dump", Messages::DumpListNodesRequest, Messages::DumpListNodesReply, args)
275
+ end
276
+ # Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
277
+ #
278
+ # Requires CAP_NET_ADMIN in the initial user namespace.
279
+ #--
280
+ # @rbs (?node_id: ::Integer, ?error_id: ::Integer) -> ::Nl::Async::Future[Messages::DoGetErrorCounterReply]
281
+ def do_get_error_counter(**args)
282
+ @exchange.call(:"do", Messages::DoGetErrorCounterRequest, Messages::DoGetErrorCounterReply, args)
283
+ end
284
+ # Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
285
+ #
286
+ # Requires CAP_NET_ADMIN in the initial user namespace.
287
+ #--
288
+ # @rbs (?node_id: ::Integer) -> ::Nl::Async::Stream[Messages::DumpGetErrorCounterReply]
289
+ def dump_get_error_counter(**args)
290
+ @exchange.call(:"dump", Messages::DumpGetErrorCounterRequest, Messages::DumpGetErrorCounterReply, args)
291
+ end
292
+ # Clear error counter for a given node. The request includes the error-id and node-id of the counter to be cleared.
293
+ #
294
+ # Requires CAP_NET_ADMIN in the initial user namespace.
295
+ #--
296
+ # @rbs (?node_id: ::Integer, ?error_id: ::Integer) -> ::Nl::Async::Future[void]
297
+ def do_clear_error_counter(**args)
298
+ @exchange.call(:"do", Messages::DoClearErrorCounterRequest, nil, args)
299
+ end
300
+ end
301
+ # Returns the asynchronous operation facade for this family.
302
+ #--
303
+ # @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
304
+ def async(stream_capacity: nil)
305
+ return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
306
+ build_async_facade(AsyncOperations, stream_capacity:)
307
+ end
221
308
  end
222
309
  end; end