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.
- checksums.yaml +4 -4
- data/.rspec +3 -0
- data/CHANGELOG.md +2 -0
- data/Rakefile +13 -3
- data/generated/nl/linux/binder.rb +80 -0
- data/generated/nl/linux/conntrack.rb +39 -2
- data/generated/nl/linux/dev_energymodel.rb +106 -0
- data/generated/nl/linux/devlink.rb +751 -0
- data/generated/nl/linux/dpll.rb +712 -55
- data/generated/nl/linux/drm_ras.rb +87 -0
- data/generated/nl/linux/ethtool.rb +1569 -259
- data/generated/nl/linux/fou.rb +82 -13
- data/generated/nl/linux/handshake.rb +92 -0
- data/generated/nl/linux/lockd.rb +50 -0
- data/generated/nl/linux/mptcp_pm.rb +159 -0
- data/generated/nl/linux/net_shaper.rb +123 -0
- data/generated/nl/linux/netdev.rb +374 -0
- data/generated/nl/linux/nfsd.rb +316 -6
- data/generated/nl/linux/nftables.rb +414 -25
- data/generated/nl/linux/nl80211.rb +81 -22
- data/generated/nl/linux/nlctrl.rb +59 -8
- data/generated/nl/linux/ovpn.rb +180 -0
- data/generated/nl/linux/ovs_datapath.rb +55 -6
- data/generated/nl/linux/ovs_flow.rb +63 -20
- data/generated/nl/linux/ovs_packet.rb +115 -4
- data/generated/nl/linux/ovs_vport.rb +55 -6
- data/generated/nl/linux/psp.rb +257 -0
- data/generated/nl/linux/rt_addr.rb +69 -14
- data/generated/nl/linux/rt_link.rb +381 -47
- data/generated/nl/linux/rt_neigh.rb +227 -16
- data/generated/nl/linux/rt_route.rb +92 -49
- data/generated/nl/linux/rt_rule.rb +300 -11
- data/generated/nl/linux/sunrpc_cache.rb +130 -0
- data/generated/nl/linux/tc.rb +161 -52
- data/generated/nl/linux/tcp_metrics.rb +69 -12
- data/generated/nl/linux/team.rb +80 -0
- data/generated/nl/linux/wireguard.rb +99 -7
- data/lib/nl/linux/version.rb +1 -1
- metadata +11 -9
data/generated/nl/linux/fou.rb
CHANGED
|
@@ -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/fou.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 Fou < ::Nl::Family
|
|
10
12
|
NAME = "fou"
|
|
11
13
|
PROTOCOL = Ractor.make_shareable(::Nl::Protocols::Genl.new("fou"))
|
|
14
|
+
MCAST_GROUPS = Ractor.make_shareable({}) #: Hash[::Symbol, ::Nl::McastGroup]
|
|
12
15
|
module Structs
|
|
13
16
|
end
|
|
14
17
|
module AttributeSets
|
|
@@ -91,6 +94,8 @@ class Fou < ::Nl::Family
|
|
|
91
94
|
end
|
|
92
95
|
module Messages
|
|
93
96
|
# Add port.
|
|
97
|
+
#
|
|
98
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
94
99
|
class DoAddRequest < ::Nl::Protocols::Genl::Message
|
|
95
100
|
TYPE = 1
|
|
96
101
|
FIXED_HEADER = nil
|
|
@@ -118,7 +123,7 @@ class Fou < ::Nl::Family
|
|
|
118
123
|
def local_v4; attributes[:"local_v4"]&.value; end
|
|
119
124
|
# Gets the value of `local-v6` attribute in the message.
|
|
120
125
|
#--
|
|
121
|
-
# @rbs return:
|
|
126
|
+
# @rbs return: ::String
|
|
122
127
|
def local_v6; attributes[:"local_v6"]&.value; end
|
|
123
128
|
# Gets the value of `peer-v4` attribute in the message.
|
|
124
129
|
#--
|
|
@@ -126,7 +131,7 @@ class Fou < ::Nl::Family
|
|
|
126
131
|
def peer_v4; attributes[:"peer_v4"]&.value; end
|
|
127
132
|
# Gets the value of `peer-v6` attribute in the message.
|
|
128
133
|
#--
|
|
129
|
-
# @rbs return:
|
|
134
|
+
# @rbs return: ::String
|
|
130
135
|
def peer_v6; attributes[:"peer_v6"]&.value; end
|
|
131
136
|
# Gets the value of `peer-port` attribute in the message.
|
|
132
137
|
#--
|
|
@@ -138,6 +143,8 @@ class Fou < ::Nl::Family
|
|
|
138
143
|
def ifindex; attributes[:"ifindex"]&.value; end
|
|
139
144
|
end
|
|
140
145
|
# Delete port.
|
|
146
|
+
#
|
|
147
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
141
148
|
class DoDelRequest < ::Nl::Protocols::Genl::Message
|
|
142
149
|
TYPE = 2
|
|
143
150
|
FIXED_HEADER = nil
|
|
@@ -157,7 +164,7 @@ class Fou < ::Nl::Family
|
|
|
157
164
|
def local_v4; attributes[:"local_v4"]&.value; end
|
|
158
165
|
# Gets the value of `local-v6` attribute in the message.
|
|
159
166
|
#--
|
|
160
|
-
# @rbs return:
|
|
167
|
+
# @rbs return: ::String
|
|
161
168
|
def local_v6; attributes[:"local_v6"]&.value; end
|
|
162
169
|
# Gets the value of `peer-v4` attribute in the message.
|
|
163
170
|
#--
|
|
@@ -165,7 +172,7 @@ class Fou < ::Nl::Family
|
|
|
165
172
|
def peer_v4; attributes[:"peer_v4"]&.value; end
|
|
166
173
|
# Gets the value of `peer-v6` attribute in the message.
|
|
167
174
|
#--
|
|
168
|
-
# @rbs return:
|
|
175
|
+
# @rbs return: ::String
|
|
169
176
|
def peer_v6; attributes[:"peer_v6"]&.value; end
|
|
170
177
|
# Gets the value of `peer-port` attribute in the message.
|
|
171
178
|
#--
|
|
@@ -196,7 +203,7 @@ class Fou < ::Nl::Family
|
|
|
196
203
|
def local_v4; attributes[:"local_v4"]&.value; end
|
|
197
204
|
# Gets the value of `local-v6` attribute in the message.
|
|
198
205
|
#--
|
|
199
|
-
# @rbs return:
|
|
206
|
+
# @rbs return: ::String
|
|
200
207
|
def local_v6; attributes[:"local_v6"]&.value; end
|
|
201
208
|
# Gets the value of `peer-v4` attribute in the message.
|
|
202
209
|
#--
|
|
@@ -204,7 +211,7 @@ class Fou < ::Nl::Family
|
|
|
204
211
|
def peer_v4; attributes[:"peer_v4"]&.value; end
|
|
205
212
|
# Gets the value of `peer-v6` attribute in the message.
|
|
206
213
|
#--
|
|
207
|
-
# @rbs return:
|
|
214
|
+
# @rbs return: ::String
|
|
208
215
|
def peer_v6; attributes[:"peer_v6"]&.value; end
|
|
209
216
|
# Gets the value of `peer-port` attribute in the message.
|
|
210
217
|
#--
|
|
@@ -243,7 +250,7 @@ class Fou < ::Nl::Family
|
|
|
243
250
|
def local_v4; attributes[:"local_v4"]&.value; end
|
|
244
251
|
# Gets the value of `local-v6` attribute in the message.
|
|
245
252
|
#--
|
|
246
|
-
# @rbs return:
|
|
253
|
+
# @rbs return: ::String
|
|
247
254
|
def local_v6; attributes[:"local_v6"]&.value; end
|
|
248
255
|
# Gets the value of `peer-v4` attribute in the message.
|
|
249
256
|
#--
|
|
@@ -251,7 +258,7 @@ class Fou < ::Nl::Family
|
|
|
251
258
|
def peer_v4; attributes[:"peer_v4"]&.value; end
|
|
252
259
|
# Gets the value of `peer-v6` attribute in the message.
|
|
253
260
|
#--
|
|
254
|
-
# @rbs return:
|
|
261
|
+
# @rbs return: ::String
|
|
255
262
|
def peer_v6; attributes[:"peer_v6"]&.value; end
|
|
256
263
|
# Gets the value of `peer-port` attribute in the message.
|
|
257
264
|
#--
|
|
@@ -263,6 +270,13 @@ class Fou < ::Nl::Family
|
|
|
263
270
|
def ifindex; attributes[:"ifindex"]&.value; end
|
|
264
271
|
end
|
|
265
272
|
# Get tunnel info.
|
|
273
|
+
class DumpGetRequest < ::Nl::Protocols::Genl::Message
|
|
274
|
+
TYPE = 3
|
|
275
|
+
FIXED_HEADER = nil
|
|
276
|
+
ATTRIBUTE_SET = AttributeSets::Fou
|
|
277
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
278
|
+
end
|
|
279
|
+
# Get tunnel info.
|
|
266
280
|
class DumpGetReply < ::Nl::Protocols::Genl::Message
|
|
267
281
|
TYPE = 3
|
|
268
282
|
FIXED_HEADER = nil
|
|
@@ -290,7 +304,7 @@ class Fou < ::Nl::Family
|
|
|
290
304
|
def local_v4; attributes[:"local_v4"]&.value; end
|
|
291
305
|
# Gets the value of `local-v6` attribute in the message.
|
|
292
306
|
#--
|
|
293
|
-
# @rbs return:
|
|
307
|
+
# @rbs return: ::String
|
|
294
308
|
def local_v6; attributes[:"local_v6"]&.value; end
|
|
295
309
|
# Gets the value of `peer-v4` attribute in the message.
|
|
296
310
|
#--
|
|
@@ -298,7 +312,7 @@ class Fou < ::Nl::Family
|
|
|
298
312
|
def peer_v4; attributes[:"peer_v4"]&.value; end
|
|
299
313
|
# Gets the value of `peer-v6` attribute in the message.
|
|
300
314
|
#--
|
|
301
|
-
# @rbs return:
|
|
315
|
+
# @rbs return: ::String
|
|
302
316
|
def peer_v6; attributes[:"peer_v6"]&.value; end
|
|
303
317
|
# Gets the value of `peer-port` attribute in the message.
|
|
304
318
|
#--
|
|
@@ -310,23 +324,78 @@ class Fou < ::Nl::Family
|
|
|
310
324
|
def ifindex; attributes[:"ifindex"]&.value; end
|
|
311
325
|
end
|
|
312
326
|
end
|
|
327
|
+
module Notifications
|
|
328
|
+
end
|
|
329
|
+
NOTIFICATIONS = Ractor.make_shareable({}) #: Hash[::Integer, ::Class]
|
|
313
330
|
# Add port.
|
|
331
|
+
#
|
|
332
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
314
333
|
#--
|
|
315
|
-
# @rbs (?port: ::Integer, ?ipproto: ::Integer, ?type: ::Integer, ?remcsum_nopartial: ::Integer, ?local_v4: ::Integer, ?local_v6:
|
|
334
|
+
# @rbs (?port: ::Integer, ?ipproto: ::Integer, ?type: ::Integer, ?remcsum_nopartial: ::Integer, ?local_v4: ::Integer, ?local_v6: ::String, ?peer_v4: ::Integer, ?peer_v6: ::String, ?peer_port: ::Integer, ?ifindex: ::Integer) -> void
|
|
316
335
|
def do_add(**args)
|
|
317
336
|
exchange_message(:"do", Messages::DoAddRequest, nil, args)
|
|
318
337
|
end
|
|
319
338
|
# Delete port.
|
|
339
|
+
#
|
|
340
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
320
341
|
#--
|
|
321
|
-
# @rbs (?port: ::Integer, ?af: ::Integer, ?local_v4: ::Integer, ?local_v6:
|
|
342
|
+
# @rbs (?port: ::Integer, ?af: ::Integer, ?local_v4: ::Integer, ?local_v6: ::String, ?peer_v4: ::Integer, ?peer_v6: ::String, ?peer_port: ::Integer, ?ifindex: ::Integer) -> void
|
|
322
343
|
def do_del(**args)
|
|
323
344
|
exchange_message(:"do", Messages::DoDelRequest, nil, args)
|
|
324
345
|
end
|
|
325
346
|
# Get tunnel info.
|
|
326
347
|
#--
|
|
327
|
-
# @rbs (?port: ::Integer, ?af: ::Integer, ?local_v4: ::Integer, ?local_v6:
|
|
348
|
+
# @rbs (?port: ::Integer, ?af: ::Integer, ?local_v4: ::Integer, ?local_v6: ::String, ?peer_v4: ::Integer, ?peer_v6: ::String, ?peer_port: ::Integer, ?ifindex: ::Integer) -> Messages::DoGetReply
|
|
328
349
|
def do_get(**args)
|
|
329
350
|
exchange_message(:"do", Messages::DoGetRequest, Messages::DoGetReply, args)
|
|
330
351
|
end
|
|
352
|
+
# Get tunnel info.
|
|
353
|
+
#--
|
|
354
|
+
# @rbs () -> Enumerable[Messages::DumpGetReply]
|
|
355
|
+
# | () { (Messages::DumpGetReply) -> void } -> void
|
|
356
|
+
def dump_get(**args, &block)
|
|
357
|
+
exchange_message(:"dump", Messages::DumpGetRequest, Messages::DumpGetReply, args, &block)
|
|
358
|
+
end
|
|
359
|
+
class AsyncOperations
|
|
360
|
+
# :nodoc:
|
|
361
|
+
def initialize(&exchange)
|
|
362
|
+
@exchange = exchange
|
|
363
|
+
end
|
|
364
|
+
# Add port.
|
|
365
|
+
#
|
|
366
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
367
|
+
#--
|
|
368
|
+
# @rbs (?port: ::Integer, ?ipproto: ::Integer, ?type: ::Integer, ?remcsum_nopartial: ::Integer, ?local_v4: ::Integer, ?local_v6: ::String, ?peer_v4: ::Integer, ?peer_v6: ::String, ?peer_port: ::Integer, ?ifindex: ::Integer) -> ::Nl::Async::Future[void]
|
|
369
|
+
def do_add(**args)
|
|
370
|
+
@exchange.call(:"do", Messages::DoAddRequest, nil, args)
|
|
371
|
+
end
|
|
372
|
+
# Delete port.
|
|
373
|
+
#
|
|
374
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
375
|
+
#--
|
|
376
|
+
# @rbs (?port: ::Integer, ?af: ::Integer, ?local_v4: ::Integer, ?local_v6: ::String, ?peer_v4: ::Integer, ?peer_v6: ::String, ?peer_port: ::Integer, ?ifindex: ::Integer) -> ::Nl::Async::Future[void]
|
|
377
|
+
def do_del(**args)
|
|
378
|
+
@exchange.call(:"do", Messages::DoDelRequest, nil, args)
|
|
379
|
+
end
|
|
380
|
+
# Get tunnel info.
|
|
381
|
+
#--
|
|
382
|
+
# @rbs (?port: ::Integer, ?af: ::Integer, ?local_v4: ::Integer, ?local_v6: ::String, ?peer_v4: ::Integer, ?peer_v6: ::String, ?peer_port: ::Integer, ?ifindex: ::Integer) -> ::Nl::Async::Future[Messages::DoGetReply]
|
|
383
|
+
def do_get(**args)
|
|
384
|
+
@exchange.call(:"do", Messages::DoGetRequest, Messages::DoGetReply, args)
|
|
385
|
+
end
|
|
386
|
+
# Get tunnel info.
|
|
387
|
+
#--
|
|
388
|
+
# @rbs () -> ::Nl::Async::Stream[Messages::DumpGetReply]
|
|
389
|
+
def dump_get(**args)
|
|
390
|
+
@exchange.call(:"dump", Messages::DumpGetRequest, Messages::DumpGetReply, args)
|
|
391
|
+
end
|
|
392
|
+
end
|
|
393
|
+
# Returns the asynchronous operation facade for this family.
|
|
394
|
+
#--
|
|
395
|
+
# @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
|
|
396
|
+
def async(stream_capacity: nil)
|
|
397
|
+
return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
|
|
398
|
+
build_async_facade(AsyncOperations, stream_capacity:)
|
|
399
|
+
end
|
|
331
400
|
end
|
|
332
401
|
end; end
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
|
2
2
|
#
|
|
3
|
+
# This file is based on Documentation/netlink/specs/handshake.yaml from Linux v7.2.
|
|
4
|
+
#
|
|
5
|
+
# Original YNL comment:
|
|
6
|
+
#
|
|
3
7
|
# Author: Chuck Lever <chuck.lever@oracle.com>
|
|
4
8
|
#
|
|
5
9
|
# Copyright (c) 2023, Oracle and/or its affiliates.
|
|
@@ -14,6 +18,7 @@ module Nl; module Linux
|
|
|
14
18
|
class Handshake < ::Nl::Family
|
|
15
19
|
NAME = "handshake"
|
|
16
20
|
PROTOCOL = Ractor.make_shareable(::Nl::Protocols::Genl.new("handshake"))
|
|
21
|
+
MCAST_GROUPS = Ractor.make_shareable({:"none" => ::Nl::McastGroup.new("none", nil), :"tlshd" => ::Nl::McastGroup.new("tlshd", nil)}) #: Hash[::Symbol, ::Nl::McastGroup]
|
|
17
22
|
module Structs
|
|
18
23
|
end
|
|
19
24
|
module AttributeSets
|
|
@@ -153,6 +158,8 @@ class Handshake < ::Nl::Family
|
|
|
153
158
|
end
|
|
154
159
|
module Messages
|
|
155
160
|
# Handler retrieves next queued handshake request
|
|
161
|
+
#
|
|
162
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
156
163
|
class DoAcceptRequest < ::Nl::Protocols::Genl::Message
|
|
157
164
|
TYPE = 2
|
|
158
165
|
FIXED_HEADER = nil
|
|
@@ -164,6 +171,8 @@ class Handshake < ::Nl::Family
|
|
|
164
171
|
def handler_class; attributes[:"handler_class"]&.value; end
|
|
165
172
|
end
|
|
166
173
|
# Handler retrieves next queued handshake request
|
|
174
|
+
#
|
|
175
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
167
176
|
class DoAcceptReply < ::Nl::Protocols::Genl::Message
|
|
168
177
|
TYPE = 2
|
|
169
178
|
FIXED_HEADER = nil
|
|
@@ -203,6 +212,8 @@ class Handshake < ::Nl::Family
|
|
|
203
212
|
def keyring; attributes[:"keyring"]&.value; end
|
|
204
213
|
end
|
|
205
214
|
# Handler reports handshake completion
|
|
215
|
+
#
|
|
216
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
206
217
|
class DoDoneRequest < ::Nl::Protocols::Genl::Message
|
|
207
218
|
TYPE = 3
|
|
208
219
|
FIXED_HEADER = nil
|
|
@@ -222,17 +233,98 @@ class Handshake < ::Nl::Family
|
|
|
222
233
|
def remote_auth; attributes[:"remote_auth"]&.value; end
|
|
223
234
|
end
|
|
224
235
|
end
|
|
236
|
+
module Notifications
|
|
237
|
+
# Notify handlers that a new handshake request is waiting
|
|
238
|
+
class Ready < ::Nl::Protocols::Genl::Message
|
|
239
|
+
TYPE = 1
|
|
240
|
+
FIXED_HEADER = nil
|
|
241
|
+
ATTRIBUTE_SET = AttributeSets::Accept
|
|
242
|
+
ATTRIBUTES = Ractor.make_shareable(%i[sockfd message_type timeout auth_mode peer_identity certificate peername keyring])
|
|
243
|
+
# Gets the value of `sockfd` attribute in the message.
|
|
244
|
+
#--
|
|
245
|
+
# @rbs return: ::Integer
|
|
246
|
+
def sockfd; attributes[:"sockfd"]&.value; end
|
|
247
|
+
# Gets the value of `message-type` attribute in the message.
|
|
248
|
+
#--
|
|
249
|
+
# @rbs return: ::Integer
|
|
250
|
+
def message_type; attributes[:"message_type"]&.value; end
|
|
251
|
+
# Gets the value of `timeout` attribute in the message.
|
|
252
|
+
#--
|
|
253
|
+
# @rbs return: ::Integer
|
|
254
|
+
def timeout; attributes[:"timeout"]&.value; end
|
|
255
|
+
# Gets the value of `auth-mode` attribute in the message.
|
|
256
|
+
#--
|
|
257
|
+
# @rbs return: ::Integer
|
|
258
|
+
def auth_mode; attributes[:"auth_mode"]&.value; end
|
|
259
|
+
# Gets the value of `peer-identity` attribute in the message.
|
|
260
|
+
#--
|
|
261
|
+
# @rbs return: ::Integer
|
|
262
|
+
def peer_identity; attributes[:"peer_identity"]&.value; end
|
|
263
|
+
# Gets the value of `certificate` attribute in the message.
|
|
264
|
+
#--
|
|
265
|
+
# @rbs return: AttributeSets::X509
|
|
266
|
+
def certificate; attributes[:"certificate"]&.value; end
|
|
267
|
+
# Gets the value of `peername` attribute in the message.
|
|
268
|
+
#--
|
|
269
|
+
# @rbs return: ::String
|
|
270
|
+
def peername; attributes[:"peername"]&.value; end
|
|
271
|
+
# Gets the value of `keyring` attribute in the message.
|
|
272
|
+
#--
|
|
273
|
+
# @rbs return: ::Integer
|
|
274
|
+
def keyring; attributes[:"keyring"]&.value; end
|
|
275
|
+
end
|
|
276
|
+
end
|
|
277
|
+
NOTIFICATIONS = Ractor.make_shareable({1 => Notifications::Ready}) #: Hash[::Integer, ::Class]
|
|
225
278
|
# Handler retrieves next queued handshake request
|
|
279
|
+
#
|
|
280
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
226
281
|
#--
|
|
227
282
|
# @rbs (?handler_class: ::Integer) -> Messages::DoAcceptReply
|
|
228
283
|
def do_accept(**args)
|
|
229
284
|
exchange_message(:"do", Messages::DoAcceptRequest, Messages::DoAcceptReply, args)
|
|
230
285
|
end
|
|
231
286
|
# Handler reports handshake completion
|
|
287
|
+
#
|
|
288
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
232
289
|
#--
|
|
233
290
|
# @rbs (?status: ::Integer, ?sockfd: ::Integer, ?remote_auth: ::Integer) -> void
|
|
234
291
|
def do_done(**args)
|
|
235
292
|
exchange_message(:"do", Messages::DoDoneRequest, nil, args)
|
|
236
293
|
end
|
|
294
|
+
class AsyncOperations
|
|
295
|
+
# :nodoc:
|
|
296
|
+
def initialize(&exchange)
|
|
297
|
+
@exchange = exchange
|
|
298
|
+
end
|
|
299
|
+
# Handler retrieves next queued handshake request
|
|
300
|
+
#
|
|
301
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
302
|
+
#--
|
|
303
|
+
# @rbs (?handler_class: ::Integer) -> ::Nl::Async::Future[Messages::DoAcceptReply]
|
|
304
|
+
def do_accept(**args)
|
|
305
|
+
@exchange.call(:"do", Messages::DoAcceptRequest, Messages::DoAcceptReply, args)
|
|
306
|
+
end
|
|
307
|
+
# Handler reports handshake completion
|
|
308
|
+
#
|
|
309
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
310
|
+
#--
|
|
311
|
+
# @rbs (?status: ::Integer, ?sockfd: ::Integer, ?remote_auth: ::Integer) -> ::Nl::Async::Future[void]
|
|
312
|
+
def do_done(**args)
|
|
313
|
+
@exchange.call(:"do", Messages::DoDoneRequest, nil, args)
|
|
314
|
+
end
|
|
315
|
+
end
|
|
316
|
+
# Returns the asynchronous operation facade for this family.
|
|
317
|
+
#--
|
|
318
|
+
# @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
|
|
319
|
+
def async(stream_capacity: nil)
|
|
320
|
+
return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
|
|
321
|
+
build_async_facade(AsyncOperations, stream_capacity:)
|
|
322
|
+
end
|
|
323
|
+
#--
|
|
324
|
+
# @rbs (*(:none | :tlshd) groups) -> self
|
|
325
|
+
def subscribe(*groups) = super
|
|
326
|
+
#--
|
|
327
|
+
# @rbs (*(:none | :tlshd) groups) -> self
|
|
328
|
+
def unsubscribe(*groups) = super
|
|
237
329
|
end
|
|
238
330
|
end; end
|
data/generated/nl/linux/lockd.rb
CHANGED
|
@@ -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/lockd.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 Lockd < ::Nl::Family
|
|
10
12
|
NAME = "lockd"
|
|
11
13
|
PROTOCOL = Ractor.make_shareable(::Nl::Protocols::Genl.new("lockd"))
|
|
14
|
+
MCAST_GROUPS = Ractor.make_shareable({}) #: Hash[::Symbol, ::Nl::McastGroup]
|
|
12
15
|
module Structs
|
|
13
16
|
end
|
|
14
17
|
module AttributeSets
|
|
@@ -51,6 +54,8 @@ class Lockd < ::Nl::Family
|
|
|
51
54
|
end
|
|
52
55
|
module Messages
|
|
53
56
|
# set the lockd server parameters
|
|
57
|
+
#
|
|
58
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
54
59
|
class DoServerSetRequest < ::Nl::Protocols::Genl::Message
|
|
55
60
|
TYPE = 1
|
|
56
61
|
FIXED_HEADER = nil
|
|
@@ -70,6 +75,13 @@ class Lockd < ::Nl::Family
|
|
|
70
75
|
def udp_port; attributes[:"udp_port"]&.value; end
|
|
71
76
|
end
|
|
72
77
|
# get the lockd server parameters
|
|
78
|
+
class DoServerGetRequest < ::Nl::Protocols::Genl::Message
|
|
79
|
+
TYPE = 2
|
|
80
|
+
FIXED_HEADER = nil
|
|
81
|
+
ATTRIBUTE_SET = AttributeSets::Server
|
|
82
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
83
|
+
end
|
|
84
|
+
# get the lockd server parameters
|
|
73
85
|
class DoServerGetReply < ::Nl::Protocols::Genl::Message
|
|
74
86
|
TYPE = 2
|
|
75
87
|
FIXED_HEADER = nil
|
|
@@ -89,11 +101,49 @@ class Lockd < ::Nl::Family
|
|
|
89
101
|
def udp_port; attributes[:"udp_port"]&.value; end
|
|
90
102
|
end
|
|
91
103
|
end
|
|
104
|
+
module Notifications
|
|
105
|
+
end
|
|
106
|
+
NOTIFICATIONS = Ractor.make_shareable({}) #: Hash[::Integer, ::Class]
|
|
92
107
|
# set the lockd server parameters
|
|
108
|
+
#
|
|
109
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
93
110
|
#--
|
|
94
111
|
# @rbs (?gracetime: ::Integer, ?tcp_port: ::Integer, ?udp_port: ::Integer) -> void
|
|
95
112
|
def do_server_set(**args)
|
|
96
113
|
exchange_message(:"do", Messages::DoServerSetRequest, nil, args)
|
|
97
114
|
end
|
|
115
|
+
# get the lockd server parameters
|
|
116
|
+
#--
|
|
117
|
+
# @rbs () -> Messages::DoServerGetReply
|
|
118
|
+
def do_server_get(**args)
|
|
119
|
+
exchange_message(:"do", Messages::DoServerGetRequest, Messages::DoServerGetReply, args)
|
|
120
|
+
end
|
|
121
|
+
class AsyncOperations
|
|
122
|
+
# :nodoc:
|
|
123
|
+
def initialize(&exchange)
|
|
124
|
+
@exchange = exchange
|
|
125
|
+
end
|
|
126
|
+
# set the lockd server parameters
|
|
127
|
+
#
|
|
128
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
129
|
+
#--
|
|
130
|
+
# @rbs (?gracetime: ::Integer, ?tcp_port: ::Integer, ?udp_port: ::Integer) -> ::Nl::Async::Future[void]
|
|
131
|
+
def do_server_set(**args)
|
|
132
|
+
@exchange.call(:"do", Messages::DoServerSetRequest, nil, args)
|
|
133
|
+
end
|
|
134
|
+
# get the lockd server parameters
|
|
135
|
+
#--
|
|
136
|
+
# @rbs () -> ::Nl::Async::Future[Messages::DoServerGetReply]
|
|
137
|
+
def do_server_get(**args)
|
|
138
|
+
@exchange.call(:"do", Messages::DoServerGetRequest, Messages::DoServerGetReply, args)
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
# Returns the asynchronous operation facade for this family.
|
|
142
|
+
#--
|
|
143
|
+
# @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
|
|
144
|
+
def async(stream_capacity: nil)
|
|
145
|
+
return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
|
|
146
|
+
build_async_facade(AsyncOperations, stream_capacity:)
|
|
147
|
+
end
|
|
98
148
|
end
|
|
99
149
|
end; end
|