nl-linux 0.2.3 → 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 +8 -0
- data/NLSPEC_VERSION +1 -1
- 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 +1478 -200
- data/generated/nl/linux/dpll.rb +790 -66
- data/generated/nl/linux/drm_ras.rb +309 -0
- data/generated/nl/linux/ethtool.rb +1597 -248
- data/generated/nl/linux/fou.rb +82 -13
- data/generated/nl/linux/handshake.rb +93 -1
- data/generated/nl/linux/lockd.rb +50 -0
- data/generated/nl/linux/mptcp_pm.rb +159 -0
- data/generated/nl/linux/net_shaper.rb +124 -1
- data/generated/nl/linux/netdev.rb +515 -6
- data/generated/nl/linux/nfsd.rb +878 -10
- data/generated/nl/linux/nftables.rb +2134 -179
- data/generated/nl/linux/nl80211.rb +81 -22
- data/generated/nl/linux/nlctrl.rb +59 -8
- data/generated/nl/linux/ovpn.rb +207 -12
- data/generated/nl/linux/ovs_datapath.rb +59 -10
- data/generated/nl/linux/ovs_flow.rb +63 -20
- data/generated/nl/linux/ovs_packet.rb +277 -0
- data/generated/nl/linux/ovs_vport.rb +59 -10
- data/generated/nl/linux/psp.rb +453 -6
- data/generated/nl/linux/rt_addr.rb +69 -14
- data/generated/nl/linux/rt_link.rb +452 -112
- 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 +423 -0
- data/generated/nl/linux/tc.rb +168 -54
- 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/generated/nl/linux.rb +3 -0
- data/lib/nl/linux/version.rb +1 -1
- data/linux/devlink.yaml +92 -2
- data/linux/dpll.yaml +94 -5
- data/linux/drm_ras.yaml +126 -0
- data/linux/ethtool.yaml +21 -4
- data/linux/handshake.yaml +9 -0
- data/linux/mptcp_pm.yaml +1 -0
- data/linux/net_shaper.yaml +13 -6
- data/linux/netdev.yaml +61 -2
- data/linux/nfsd.yaml +303 -2
- data/linux/nftables.yaml +640 -49
- data/linux/ovpn.yaml +26 -1
- data/linux/ovs_packet.yaml +130 -0
- data/linux/psp.yaml +80 -3
- data/linux/rt-link.yaml +70 -24
- data/linux/sunrpc_cache.yaml +149 -0
- data/linux/tc.yaml +3 -0
- metadata +17 -9
data/generated/nl/linux/nfsd.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/nfsd.yaml from Linux v7.2.
|
|
2
4
|
#--
|
|
3
5
|
# frozen_string_literal: true
|
|
4
6
|
# rbs_inline: enabled
|
|
@@ -9,9 +11,36 @@ module Nl; module Linux
|
|
|
9
11
|
class Nfsd < ::Nl::Family
|
|
10
12
|
NAME = "nfsd"
|
|
11
13
|
PROTOCOL = Ractor.make_shareable(::Nl::Protocols::Genl.new("nfsd"))
|
|
14
|
+
MCAST_GROUPS = Ractor.make_shareable({:"none" => ::Nl::McastGroup.new("none", nil), :"exportd" => ::Nl::McastGroup.new("exportd", nil)}) #: Hash[::Symbol, ::Nl::McastGroup]
|
|
12
15
|
module Structs
|
|
13
16
|
end
|
|
14
17
|
module AttributeSets
|
|
18
|
+
class CacheNotify < ::Nl::Protocols::Genl::AttributeSet
|
|
19
|
+
# Abstract class
|
|
20
|
+
class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
|
|
21
|
+
end
|
|
22
|
+
class CacheType < Attribute
|
|
23
|
+
TYPE = 1
|
|
24
|
+
NAME = :"cache_type"
|
|
25
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
26
|
+
end
|
|
27
|
+
# :nodoc:
|
|
28
|
+
BY_NAME = Ractor.make_shareable({:"cache_type" => CacheType}) #: Hash[::Symbol, Attribute]
|
|
29
|
+
# :nodoc:
|
|
30
|
+
BY_TYPE = Ractor.make_shareable({1 => CacheType}) #: Hash[::Integer, Attribute]
|
|
31
|
+
class << self
|
|
32
|
+
# Looks up Attribute class by name.
|
|
33
|
+
#--
|
|
34
|
+
# @rbs name: Symbol
|
|
35
|
+
# @rbs return: Attribute
|
|
36
|
+
def by_name(name); BY_NAME.fetch(name); end
|
|
37
|
+
# Looks up Attribute class by type value.
|
|
38
|
+
#--
|
|
39
|
+
# @rbs type: Integer
|
|
40
|
+
# @rbs return: Attribute
|
|
41
|
+
def by_type(type); BY_TYPE.fetch(type); end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
15
44
|
class RpcStatus < ::Nl::Protocols::Genl::AttributeSet
|
|
16
45
|
# Abstract class
|
|
17
46
|
class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
|
|
@@ -127,10 +156,20 @@ class Nfsd < ::Nl::Family
|
|
|
127
156
|
NAME = :"scope"
|
|
128
157
|
DATATYPE = ::Nl::Protocols::Genl::DataTypes::String.new(check: nil)
|
|
129
158
|
end
|
|
159
|
+
class MinThreads < Attribute
|
|
160
|
+
TYPE = 5
|
|
161
|
+
NAME = :"min_threads"
|
|
162
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
163
|
+
end
|
|
164
|
+
class FhKey < Attribute
|
|
165
|
+
TYPE = 6
|
|
166
|
+
NAME = :"fh_key"
|
|
167
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: -> { raise ArgumentError, "Value #{it.inspect} is not equal to length 16" unless it.bytesize == 16 })
|
|
168
|
+
end
|
|
130
169
|
# :nodoc:
|
|
131
|
-
BY_NAME = Ractor.make_shareable({:"threads" => Threads, :"gracetime" => Gracetime, :"leasetime" => Leasetime, :"scope" => Scope}) #: Hash[::Symbol, Attribute]
|
|
170
|
+
BY_NAME = Ractor.make_shareable({:"threads" => Threads, :"gracetime" => Gracetime, :"leasetime" => Leasetime, :"scope" => Scope, :"min_threads" => MinThreads, :"fh_key" => FhKey}) #: Hash[::Symbol, Attribute]
|
|
132
171
|
# :nodoc:
|
|
133
|
-
BY_TYPE = Ractor.make_shareable({1 => Threads, 2 => Gracetime, 3 => Leasetime, 4 => Scope}) #: Hash[::Integer, Attribute]
|
|
172
|
+
BY_TYPE = Ractor.make_shareable({1 => Threads, 2 => Gracetime, 3 => Leasetime, 4 => Scope, 5 => MinThreads, 6 => FhKey}) #: Hash[::Integer, Attribute]
|
|
134
173
|
class << self
|
|
135
174
|
# Looks up Attribute class by name.
|
|
136
175
|
#--
|
|
@@ -292,10 +331,403 @@ class Nfsd < ::Nl::Family
|
|
|
292
331
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
293
332
|
end
|
|
294
333
|
end
|
|
334
|
+
class Fslocation < ::Nl::Protocols::Genl::AttributeSet
|
|
335
|
+
# Abstract class
|
|
336
|
+
class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
|
|
337
|
+
end
|
|
338
|
+
class Host < Attribute
|
|
339
|
+
TYPE = 1
|
|
340
|
+
NAME = :"host"
|
|
341
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::String.new(check: nil)
|
|
342
|
+
end
|
|
343
|
+
class Path < Attribute
|
|
344
|
+
TYPE = 2
|
|
345
|
+
NAME = :"path"
|
|
346
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::String.new(check: nil)
|
|
347
|
+
end
|
|
348
|
+
# :nodoc:
|
|
349
|
+
BY_NAME = Ractor.make_shareable({:"host" => Host, :"path" => Path}) #: Hash[::Symbol, Attribute]
|
|
350
|
+
# :nodoc:
|
|
351
|
+
BY_TYPE = Ractor.make_shareable({1 => Host, 2 => Path}) #: Hash[::Integer, Attribute]
|
|
352
|
+
class << self
|
|
353
|
+
# Looks up Attribute class by name.
|
|
354
|
+
#--
|
|
355
|
+
# @rbs name: Symbol
|
|
356
|
+
# @rbs return: Attribute
|
|
357
|
+
def by_name(name); BY_NAME.fetch(name); end
|
|
358
|
+
# Looks up Attribute class by type value.
|
|
359
|
+
#--
|
|
360
|
+
# @rbs type: Integer
|
|
361
|
+
# @rbs return: Attribute
|
|
362
|
+
def by_type(type); BY_TYPE.fetch(type); end
|
|
363
|
+
end
|
|
364
|
+
end
|
|
365
|
+
class Fslocations < ::Nl::Protocols::Genl::AttributeSet
|
|
366
|
+
# Abstract class
|
|
367
|
+
class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
|
|
368
|
+
end
|
|
369
|
+
class Location < Attribute
|
|
370
|
+
TYPE = 1
|
|
371
|
+
NAME = :"location"
|
|
372
|
+
end
|
|
373
|
+
# :nodoc:
|
|
374
|
+
BY_NAME = Ractor.make_shareable({:"location" => Location}) #: Hash[::Symbol, Attribute]
|
|
375
|
+
# :nodoc:
|
|
376
|
+
BY_TYPE = Ractor.make_shareable({1 => Location}) #: Hash[::Integer, Attribute]
|
|
377
|
+
class << self
|
|
378
|
+
# Looks up Attribute class by name.
|
|
379
|
+
#--
|
|
380
|
+
# @rbs name: Symbol
|
|
381
|
+
# @rbs return: Attribute
|
|
382
|
+
def by_name(name); BY_NAME.fetch(name); end
|
|
383
|
+
# Looks up Attribute class by type value.
|
|
384
|
+
#--
|
|
385
|
+
# @rbs type: Integer
|
|
386
|
+
# @rbs return: Attribute
|
|
387
|
+
def by_type(type); BY_TYPE.fetch(type); end
|
|
388
|
+
end
|
|
389
|
+
end
|
|
390
|
+
class AuthFlavor < ::Nl::Protocols::Genl::AttributeSet
|
|
391
|
+
# Abstract class
|
|
392
|
+
class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
|
|
393
|
+
end
|
|
394
|
+
class Pseudoflavor < Attribute
|
|
395
|
+
TYPE = 1
|
|
396
|
+
NAME = :"pseudoflavor"
|
|
397
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
398
|
+
end
|
|
399
|
+
class Flags < Attribute
|
|
400
|
+
TYPE = 2
|
|
401
|
+
NAME = :"flags"
|
|
402
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
403
|
+
end
|
|
404
|
+
# :nodoc:
|
|
405
|
+
BY_NAME = Ractor.make_shareable({:"pseudoflavor" => Pseudoflavor, :"flags" => Flags}) #: Hash[::Symbol, Attribute]
|
|
406
|
+
# :nodoc:
|
|
407
|
+
BY_TYPE = Ractor.make_shareable({1 => Pseudoflavor, 2 => Flags}) #: Hash[::Integer, Attribute]
|
|
408
|
+
class << self
|
|
409
|
+
# Looks up Attribute class by name.
|
|
410
|
+
#--
|
|
411
|
+
# @rbs name: Symbol
|
|
412
|
+
# @rbs return: Attribute
|
|
413
|
+
def by_name(name); BY_NAME.fetch(name); end
|
|
414
|
+
# Looks up Attribute class by type value.
|
|
415
|
+
#--
|
|
416
|
+
# @rbs type: Integer
|
|
417
|
+
# @rbs return: Attribute
|
|
418
|
+
def by_type(type); BY_TYPE.fetch(type); end
|
|
419
|
+
end
|
|
420
|
+
end
|
|
421
|
+
class SvcExport < ::Nl::Protocols::Genl::AttributeSet
|
|
422
|
+
# Abstract class
|
|
423
|
+
class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
|
|
424
|
+
end
|
|
425
|
+
class Seqno < Attribute
|
|
426
|
+
TYPE = 1
|
|
427
|
+
NAME = :"seqno"
|
|
428
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
429
|
+
end
|
|
430
|
+
class Client < Attribute
|
|
431
|
+
TYPE = 2
|
|
432
|
+
NAME = :"client"
|
|
433
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::String.new(check: nil)
|
|
434
|
+
end
|
|
435
|
+
class Path < Attribute
|
|
436
|
+
TYPE = 3
|
|
437
|
+
NAME = :"path"
|
|
438
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::String.new(check: nil)
|
|
439
|
+
end
|
|
440
|
+
class Negative < Attribute
|
|
441
|
+
TYPE = 4
|
|
442
|
+
NAME = :"negative"
|
|
443
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
|
|
444
|
+
end
|
|
445
|
+
class Expiry < Attribute
|
|
446
|
+
TYPE = 5
|
|
447
|
+
NAME = :"expiry"
|
|
448
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
449
|
+
end
|
|
450
|
+
class AnonUid < Attribute
|
|
451
|
+
TYPE = 6
|
|
452
|
+
NAME = :"anon_uid"
|
|
453
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
454
|
+
end
|
|
455
|
+
class AnonGid < Attribute
|
|
456
|
+
TYPE = 7
|
|
457
|
+
NAME = :"anon_gid"
|
|
458
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
459
|
+
end
|
|
460
|
+
class Fslocations < Attribute
|
|
461
|
+
TYPE = 8
|
|
462
|
+
NAME = :"fslocations"
|
|
463
|
+
end
|
|
464
|
+
class Uuid < Attribute
|
|
465
|
+
TYPE = 9
|
|
466
|
+
NAME = :"uuid"
|
|
467
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
|
|
468
|
+
end
|
|
469
|
+
class Secinfo < Attribute
|
|
470
|
+
TYPE = 10
|
|
471
|
+
NAME = :"secinfo"
|
|
472
|
+
end
|
|
473
|
+
class Xprtsec < Attribute
|
|
474
|
+
TYPE = 11
|
|
475
|
+
NAME = :"xprtsec"
|
|
476
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
477
|
+
end
|
|
478
|
+
class Flags < Attribute
|
|
479
|
+
TYPE = 12
|
|
480
|
+
NAME = :"flags"
|
|
481
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
482
|
+
end
|
|
483
|
+
class Fsid < Attribute
|
|
484
|
+
TYPE = 13
|
|
485
|
+
NAME = :"fsid"
|
|
486
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::S32, check: nil)
|
|
487
|
+
end
|
|
488
|
+
# :nodoc:
|
|
489
|
+
BY_NAME = Ractor.make_shareable({:"seqno" => Seqno, :"client" => Client, :"path" => Path, :"negative" => Negative, :"expiry" => Expiry, :"anon_uid" => AnonUid, :"anon_gid" => AnonGid, :"fslocations" => Fslocations, :"uuid" => Uuid, :"secinfo" => Secinfo, :"xprtsec" => Xprtsec, :"flags" => Flags, :"fsid" => Fsid}) #: Hash[::Symbol, Attribute]
|
|
490
|
+
# :nodoc:
|
|
491
|
+
BY_TYPE = Ractor.make_shareable({1 => Seqno, 2 => Client, 3 => Path, 4 => Negative, 5 => Expiry, 6 => AnonUid, 7 => AnonGid, 8 => Fslocations, 9 => Uuid, 10 => Secinfo, 11 => Xprtsec, 12 => Flags, 13 => Fsid}) #: Hash[::Integer, Attribute]
|
|
492
|
+
class << self
|
|
493
|
+
# Looks up Attribute class by name.
|
|
494
|
+
#--
|
|
495
|
+
# @rbs name: Symbol
|
|
496
|
+
# @rbs return: Attribute
|
|
497
|
+
def by_name(name); BY_NAME.fetch(name); end
|
|
498
|
+
# Looks up Attribute class by type value.
|
|
499
|
+
#--
|
|
500
|
+
# @rbs type: Integer
|
|
501
|
+
# @rbs return: Attribute
|
|
502
|
+
def by_type(type); BY_TYPE.fetch(type); end
|
|
503
|
+
end
|
|
504
|
+
end
|
|
505
|
+
class SvcExportReqs < ::Nl::Protocols::Genl::AttributeSet
|
|
506
|
+
# Abstract class
|
|
507
|
+
class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
|
|
508
|
+
end
|
|
509
|
+
class Requests < Attribute
|
|
510
|
+
TYPE = 1
|
|
511
|
+
NAME = :"requests"
|
|
512
|
+
end
|
|
513
|
+
# :nodoc:
|
|
514
|
+
BY_NAME = Ractor.make_shareable({:"requests" => Requests}) #: Hash[::Symbol, Attribute]
|
|
515
|
+
# :nodoc:
|
|
516
|
+
BY_TYPE = Ractor.make_shareable({1 => Requests}) #: Hash[::Integer, Attribute]
|
|
517
|
+
class << self
|
|
518
|
+
# Looks up Attribute class by name.
|
|
519
|
+
#--
|
|
520
|
+
# @rbs name: Symbol
|
|
521
|
+
# @rbs return: Attribute
|
|
522
|
+
def by_name(name); BY_NAME.fetch(name); end
|
|
523
|
+
# Looks up Attribute class by type value.
|
|
524
|
+
#--
|
|
525
|
+
# @rbs type: Integer
|
|
526
|
+
# @rbs return: Attribute
|
|
527
|
+
def by_type(type); BY_TYPE.fetch(type); end
|
|
528
|
+
end
|
|
529
|
+
end
|
|
530
|
+
class Expkey < ::Nl::Protocols::Genl::AttributeSet
|
|
531
|
+
# Abstract class
|
|
532
|
+
class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
|
|
533
|
+
end
|
|
534
|
+
class Seqno < Attribute
|
|
535
|
+
TYPE = 1
|
|
536
|
+
NAME = :"seqno"
|
|
537
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
538
|
+
end
|
|
539
|
+
class Client < Attribute
|
|
540
|
+
TYPE = 2
|
|
541
|
+
NAME = :"client"
|
|
542
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::String.new(check: nil)
|
|
543
|
+
end
|
|
544
|
+
class Fsidtype < Attribute
|
|
545
|
+
TYPE = 3
|
|
546
|
+
NAME = :"fsidtype"
|
|
547
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
548
|
+
end
|
|
549
|
+
class Fsid < Attribute
|
|
550
|
+
TYPE = 4
|
|
551
|
+
NAME = :"fsid"
|
|
552
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
|
|
553
|
+
end
|
|
554
|
+
class Negative < Attribute
|
|
555
|
+
TYPE = 5
|
|
556
|
+
NAME = :"negative"
|
|
557
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Flag.new
|
|
558
|
+
end
|
|
559
|
+
class Expiry < Attribute
|
|
560
|
+
TYPE = 6
|
|
561
|
+
NAME = :"expiry"
|
|
562
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
563
|
+
end
|
|
564
|
+
class Path < Attribute
|
|
565
|
+
TYPE = 7
|
|
566
|
+
NAME = :"path"
|
|
567
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::String.new(check: nil)
|
|
568
|
+
end
|
|
569
|
+
# :nodoc:
|
|
570
|
+
BY_NAME = Ractor.make_shareable({:"seqno" => Seqno, :"client" => Client, :"fsidtype" => Fsidtype, :"fsid" => Fsid, :"negative" => Negative, :"expiry" => Expiry, :"path" => Path}) #: Hash[::Symbol, Attribute]
|
|
571
|
+
# :nodoc:
|
|
572
|
+
BY_TYPE = Ractor.make_shareable({1 => Seqno, 2 => Client, 3 => Fsidtype, 4 => Fsid, 5 => Negative, 6 => Expiry, 7 => Path}) #: Hash[::Integer, Attribute]
|
|
573
|
+
class << self
|
|
574
|
+
# Looks up Attribute class by name.
|
|
575
|
+
#--
|
|
576
|
+
# @rbs name: Symbol
|
|
577
|
+
# @rbs return: Attribute
|
|
578
|
+
def by_name(name); BY_NAME.fetch(name); end
|
|
579
|
+
# Looks up Attribute class by type value.
|
|
580
|
+
#--
|
|
581
|
+
# @rbs type: Integer
|
|
582
|
+
# @rbs return: Attribute
|
|
583
|
+
def by_type(type); BY_TYPE.fetch(type); end
|
|
584
|
+
end
|
|
585
|
+
end
|
|
586
|
+
class ExpkeyReqs < ::Nl::Protocols::Genl::AttributeSet
|
|
587
|
+
# Abstract class
|
|
588
|
+
class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
|
|
589
|
+
end
|
|
590
|
+
class Requests < Attribute
|
|
591
|
+
TYPE = 1
|
|
592
|
+
NAME = :"requests"
|
|
593
|
+
end
|
|
594
|
+
# :nodoc:
|
|
595
|
+
BY_NAME = Ractor.make_shareable({:"requests" => Requests}) #: Hash[::Symbol, Attribute]
|
|
596
|
+
# :nodoc:
|
|
597
|
+
BY_TYPE = Ractor.make_shareable({1 => Requests}) #: Hash[::Integer, Attribute]
|
|
598
|
+
class << self
|
|
599
|
+
# Looks up Attribute class by name.
|
|
600
|
+
#--
|
|
601
|
+
# @rbs name: Symbol
|
|
602
|
+
# @rbs return: Attribute
|
|
603
|
+
def by_name(name); BY_NAME.fetch(name); end
|
|
604
|
+
# Looks up Attribute class by type value.
|
|
605
|
+
#--
|
|
606
|
+
# @rbs type: Integer
|
|
607
|
+
# @rbs return: Attribute
|
|
608
|
+
def by_type(type); BY_TYPE.fetch(type); end
|
|
609
|
+
end
|
|
610
|
+
end
|
|
611
|
+
class CacheFlush < ::Nl::Protocols::Genl::AttributeSet
|
|
612
|
+
# Abstract class
|
|
613
|
+
class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
|
|
614
|
+
end
|
|
615
|
+
class Mask < Attribute
|
|
616
|
+
TYPE = 1
|
|
617
|
+
NAME = :"mask"
|
|
618
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
619
|
+
end
|
|
620
|
+
# :nodoc:
|
|
621
|
+
BY_NAME = Ractor.make_shareable({:"mask" => Mask}) #: Hash[::Symbol, Attribute]
|
|
622
|
+
# :nodoc:
|
|
623
|
+
BY_TYPE = Ractor.make_shareable({1 => Mask}) #: Hash[::Integer, Attribute]
|
|
624
|
+
class << self
|
|
625
|
+
# Looks up Attribute class by name.
|
|
626
|
+
#--
|
|
627
|
+
# @rbs name: Symbol
|
|
628
|
+
# @rbs return: Attribute
|
|
629
|
+
def by_name(name); BY_NAME.fetch(name); end
|
|
630
|
+
# Looks up Attribute class by type value.
|
|
631
|
+
#--
|
|
632
|
+
# @rbs type: Integer
|
|
633
|
+
# @rbs return: Attribute
|
|
634
|
+
def by_type(type); BY_TYPE.fetch(type); end
|
|
635
|
+
end
|
|
636
|
+
end
|
|
637
|
+
class UnlockIp < ::Nl::Protocols::Genl::AttributeSet
|
|
638
|
+
# Abstract class
|
|
639
|
+
class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
|
|
640
|
+
end
|
|
641
|
+
class Address < Attribute
|
|
642
|
+
TYPE = 1
|
|
643
|
+
NAME = :"address"
|
|
644
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: -> { raise ArgumentError, "Value #{it.inspect} is shorter than minimum length 16" unless it.bytesize >= 16 })
|
|
645
|
+
end
|
|
646
|
+
# :nodoc:
|
|
647
|
+
BY_NAME = Ractor.make_shareable({:"address" => Address}) #: Hash[::Symbol, Attribute]
|
|
648
|
+
# :nodoc:
|
|
649
|
+
BY_TYPE = Ractor.make_shareable({1 => Address}) #: Hash[::Integer, Attribute]
|
|
650
|
+
class << self
|
|
651
|
+
# Looks up Attribute class by name.
|
|
652
|
+
#--
|
|
653
|
+
# @rbs name: Symbol
|
|
654
|
+
# @rbs return: Attribute
|
|
655
|
+
def by_name(name); BY_NAME.fetch(name); end
|
|
656
|
+
# Looks up Attribute class by type value.
|
|
657
|
+
#--
|
|
658
|
+
# @rbs type: Integer
|
|
659
|
+
# @rbs return: Attribute
|
|
660
|
+
def by_type(type); BY_TYPE.fetch(type); end
|
|
661
|
+
end
|
|
662
|
+
end
|
|
663
|
+
class UnlockFilesystem < ::Nl::Protocols::Genl::AttributeSet
|
|
664
|
+
# Abstract class
|
|
665
|
+
class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
|
|
666
|
+
end
|
|
667
|
+
class Path < Attribute
|
|
668
|
+
TYPE = 1
|
|
669
|
+
NAME = :"path"
|
|
670
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::String.new(check: nil)
|
|
671
|
+
end
|
|
672
|
+
# :nodoc:
|
|
673
|
+
BY_NAME = Ractor.make_shareable({:"path" => Path}) #: Hash[::Symbol, Attribute]
|
|
674
|
+
# :nodoc:
|
|
675
|
+
BY_TYPE = Ractor.make_shareable({1 => Path}) #: Hash[::Integer, Attribute]
|
|
676
|
+
class << self
|
|
677
|
+
# Looks up Attribute class by name.
|
|
678
|
+
#--
|
|
679
|
+
# @rbs name: Symbol
|
|
680
|
+
# @rbs return: Attribute
|
|
681
|
+
def by_name(name); BY_NAME.fetch(name); end
|
|
682
|
+
# Looks up Attribute class by type value.
|
|
683
|
+
#--
|
|
684
|
+
# @rbs type: Integer
|
|
685
|
+
# @rbs return: Attribute
|
|
686
|
+
def by_type(type); BY_TYPE.fetch(type); end
|
|
687
|
+
end
|
|
688
|
+
end
|
|
689
|
+
class UnlockExport < ::Nl::Protocols::Genl::AttributeSet
|
|
690
|
+
# Abstract class
|
|
691
|
+
class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
|
|
692
|
+
end
|
|
693
|
+
class Path < Attribute
|
|
694
|
+
TYPE = 1
|
|
695
|
+
NAME = :"path"
|
|
696
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::String.new(check: nil)
|
|
697
|
+
end
|
|
698
|
+
# :nodoc:
|
|
699
|
+
BY_NAME = Ractor.make_shareable({:"path" => Path}) #: Hash[::Symbol, Attribute]
|
|
700
|
+
# :nodoc:
|
|
701
|
+
BY_TYPE = Ractor.make_shareable({1 => Path}) #: Hash[::Integer, Attribute]
|
|
702
|
+
class << self
|
|
703
|
+
# Looks up Attribute class by name.
|
|
704
|
+
#--
|
|
705
|
+
# @rbs name: Symbol
|
|
706
|
+
# @rbs return: Attribute
|
|
707
|
+
def by_name(name); BY_NAME.fetch(name); end
|
|
708
|
+
# Looks up Attribute class by type value.
|
|
709
|
+
#--
|
|
710
|
+
# @rbs type: Integer
|
|
711
|
+
# @rbs return: Attribute
|
|
712
|
+
def by_type(type); BY_TYPE.fetch(type); end
|
|
713
|
+
end
|
|
714
|
+
end
|
|
295
715
|
ServerProto::Version::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(Version)
|
|
296
716
|
ServerSock::Addr::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(Sock)
|
|
717
|
+
Fslocations::Location::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(Fslocation)
|
|
718
|
+
SvcExport::Fslocations::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(Fslocations)
|
|
719
|
+
SvcExport::Secinfo::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(AuthFlavor)
|
|
720
|
+
SvcExportReqs::Requests::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(SvcExport)
|
|
721
|
+
ExpkeyReqs::Requests::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(Expkey)
|
|
297
722
|
end
|
|
298
723
|
module Messages
|
|
724
|
+
# dump pending nfsd rpc
|
|
725
|
+
class DumpRpcStatusGetRequest < ::Nl::Protocols::Genl::Message
|
|
726
|
+
TYPE = 1
|
|
727
|
+
FIXED_HEADER = nil
|
|
728
|
+
ATTRIBUTE_SET = AttributeSets::RpcStatus
|
|
729
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
730
|
+
end
|
|
299
731
|
# dump pending nfsd rpc
|
|
300
732
|
class DumpRpcStatusGetReply < ::Nl::Protocols::Genl::Message
|
|
301
733
|
TYPE = 1
|
|
@@ -336,11 +768,11 @@ class Nfsd < ::Nl::Family
|
|
|
336
768
|
def daddr4; attributes[:"daddr4"]&.value; end
|
|
337
769
|
# Gets the value of `saddr6` attribute in the message.
|
|
338
770
|
#--
|
|
339
|
-
# @rbs return:
|
|
771
|
+
# @rbs return: ::String
|
|
340
772
|
def saddr6; attributes[:"saddr6"]&.value; end
|
|
341
773
|
# Gets the value of `daddr6` attribute in the message.
|
|
342
774
|
#--
|
|
343
|
-
# @rbs return:
|
|
775
|
+
# @rbs return: ::String
|
|
344
776
|
def daddr6; attributes[:"daddr6"]&.value; end
|
|
345
777
|
# Gets the value of `sport` attribute in the message.
|
|
346
778
|
#--
|
|
@@ -355,12 +787,14 @@ class Nfsd < ::Nl::Family
|
|
|
355
787
|
# @rbs return: ::Integer
|
|
356
788
|
def compound_ops; attributes[:"compound_ops"]&.value; end
|
|
357
789
|
end
|
|
358
|
-
# set the number of running threads
|
|
790
|
+
# set the maximum number of running threads
|
|
791
|
+
#
|
|
792
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
359
793
|
class DoThreadsSetRequest < ::Nl::Protocols::Genl::Message
|
|
360
794
|
TYPE = 2
|
|
361
795
|
FIXED_HEADER = nil
|
|
362
796
|
ATTRIBUTE_SET = AttributeSets::Server
|
|
363
|
-
ATTRIBUTES = Ractor.make_shareable(%i[threads gracetime leasetime scope])
|
|
797
|
+
ATTRIBUTES = Ractor.make_shareable(%i[threads gracetime leasetime scope min_threads fh_key])
|
|
364
798
|
# Gets the value of `threads` attribute in the message.
|
|
365
799
|
#--
|
|
366
800
|
# @rbs return: ::Integer
|
|
@@ -377,13 +811,28 @@ class Nfsd < ::Nl::Family
|
|
|
377
811
|
#--
|
|
378
812
|
# @rbs return: ::String
|
|
379
813
|
def scope; attributes[:"scope"]&.value; end
|
|
814
|
+
# Gets the value of `min-threads` attribute in the message.
|
|
815
|
+
#--
|
|
816
|
+
# @rbs return: ::Integer
|
|
817
|
+
def min_threads; attributes[:"min_threads"]&.value; end
|
|
818
|
+
# Gets the value of `fh-key` attribute in the message.
|
|
819
|
+
#--
|
|
820
|
+
# @rbs return: ::String
|
|
821
|
+
def fh_key; attributes[:"fh_key"]&.value; end
|
|
380
822
|
end
|
|
381
|
-
# get the number of running threads
|
|
823
|
+
# get the maximum number of running threads
|
|
824
|
+
class DoThreadsGetRequest < ::Nl::Protocols::Genl::Message
|
|
825
|
+
TYPE = 3
|
|
826
|
+
FIXED_HEADER = nil
|
|
827
|
+
ATTRIBUTE_SET = AttributeSets::Server
|
|
828
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
829
|
+
end
|
|
830
|
+
# get the maximum number of running threads
|
|
382
831
|
class DoThreadsGetReply < ::Nl::Protocols::Genl::Message
|
|
383
832
|
TYPE = 3
|
|
384
833
|
FIXED_HEADER = nil
|
|
385
834
|
ATTRIBUTE_SET = AttributeSets::Server
|
|
386
|
-
ATTRIBUTES = Ractor.make_shareable(%i[threads gracetime leasetime scope])
|
|
835
|
+
ATTRIBUTES = Ractor.make_shareable(%i[threads gracetime leasetime scope min_threads])
|
|
387
836
|
# Gets the value of `threads` attribute in the message.
|
|
388
837
|
#--
|
|
389
838
|
# @rbs return: ::Integer
|
|
@@ -400,8 +849,14 @@ class Nfsd < ::Nl::Family
|
|
|
400
849
|
#--
|
|
401
850
|
# @rbs return: ::String
|
|
402
851
|
def scope; attributes[:"scope"]&.value; end
|
|
852
|
+
# Gets the value of `min-threads` attribute in the message.
|
|
853
|
+
#--
|
|
854
|
+
# @rbs return: ::Integer
|
|
855
|
+
def min_threads; attributes[:"min_threads"]&.value; end
|
|
403
856
|
end
|
|
404
857
|
# set nfs enabled versions
|
|
858
|
+
#
|
|
859
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
405
860
|
class DoVersionSetRequest < ::Nl::Protocols::Genl::Message
|
|
406
861
|
TYPE = 4
|
|
407
862
|
FIXED_HEADER = nil
|
|
@@ -413,6 +868,13 @@ class Nfsd < ::Nl::Family
|
|
|
413
868
|
def version; attributes[:"version"]&.value; end
|
|
414
869
|
end
|
|
415
870
|
# get nfs enabled versions
|
|
871
|
+
class DoVersionGetRequest < ::Nl::Protocols::Genl::Message
|
|
872
|
+
TYPE = 5
|
|
873
|
+
FIXED_HEADER = nil
|
|
874
|
+
ATTRIBUTE_SET = AttributeSets::ServerProto
|
|
875
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
876
|
+
end
|
|
877
|
+
# get nfs enabled versions
|
|
416
878
|
class DoVersionGetReply < ::Nl::Protocols::Genl::Message
|
|
417
879
|
TYPE = 5
|
|
418
880
|
FIXED_HEADER = nil
|
|
@@ -424,6 +886,8 @@ class Nfsd < ::Nl::Family
|
|
|
424
886
|
def version; attributes[:"version"]&.value; end
|
|
425
887
|
end
|
|
426
888
|
# set nfs running sockets
|
|
889
|
+
#
|
|
890
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
427
891
|
class DoListenerSetRequest < ::Nl::Protocols::Genl::Message
|
|
428
892
|
TYPE = 6
|
|
429
893
|
FIXED_HEADER = nil
|
|
@@ -435,6 +899,13 @@ class Nfsd < ::Nl::Family
|
|
|
435
899
|
def addr; attributes[:"addr"]&.value; end
|
|
436
900
|
end
|
|
437
901
|
# get nfs running listeners
|
|
902
|
+
class DoListenerGetRequest < ::Nl::Protocols::Genl::Message
|
|
903
|
+
TYPE = 7
|
|
904
|
+
FIXED_HEADER = nil
|
|
905
|
+
ATTRIBUTE_SET = AttributeSets::ServerSock
|
|
906
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
907
|
+
end
|
|
908
|
+
# get nfs running listeners
|
|
438
909
|
class DoListenerGetReply < ::Nl::Protocols::Genl::Message
|
|
439
910
|
TYPE = 7
|
|
440
911
|
FIXED_HEADER = nil
|
|
@@ -446,6 +917,8 @@ class Nfsd < ::Nl::Family
|
|
|
446
917
|
def addr; attributes[:"addr"]&.value; end
|
|
447
918
|
end
|
|
448
919
|
# set the current server pool-mode
|
|
920
|
+
#
|
|
921
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
449
922
|
class DoPoolModeSetRequest < ::Nl::Protocols::Genl::Message
|
|
450
923
|
TYPE = 8
|
|
451
924
|
FIXED_HEADER = nil
|
|
@@ -457,6 +930,13 @@ class Nfsd < ::Nl::Family
|
|
|
457
930
|
def mode; attributes[:"mode"]&.value; end
|
|
458
931
|
end
|
|
459
932
|
# get info about server pool-mode
|
|
933
|
+
class DoPoolModeGetRequest < ::Nl::Protocols::Genl::Message
|
|
934
|
+
TYPE = 9
|
|
935
|
+
FIXED_HEADER = nil
|
|
936
|
+
ATTRIBUTE_SET = AttributeSets::PoolMode
|
|
937
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
938
|
+
end
|
|
939
|
+
# get info about server pool-mode
|
|
460
940
|
class DoPoolModeGetReply < ::Nl::Protocols::Genl::Message
|
|
461
941
|
TYPE = 9
|
|
462
942
|
FIXED_HEADER = nil
|
|
@@ -471,30 +951,418 @@ class Nfsd < ::Nl::Family
|
|
|
471
951
|
# @rbs return: ::Integer
|
|
472
952
|
def npools; attributes[:"npools"]&.value; end
|
|
473
953
|
end
|
|
954
|
+
# Dump all pending svc_export requests
|
|
955
|
+
#
|
|
956
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
957
|
+
class DumpSvcExportGetReqsRequest < ::Nl::Protocols::Genl::Message
|
|
958
|
+
TYPE = 11
|
|
959
|
+
FIXED_HEADER = nil
|
|
960
|
+
ATTRIBUTE_SET = AttributeSets::SvcExportReqs
|
|
961
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
962
|
+
end
|
|
963
|
+
# Dump all pending svc_export requests
|
|
964
|
+
#
|
|
965
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
966
|
+
class DumpSvcExportGetReqsReply < ::Nl::Protocols::Genl::Message
|
|
967
|
+
TYPE = 11
|
|
968
|
+
FIXED_HEADER = nil
|
|
969
|
+
ATTRIBUTE_SET = AttributeSets::SvcExportReqs
|
|
970
|
+
ATTRIBUTES = Ractor.make_shareable(%i[requests])
|
|
971
|
+
# Gets the value of `requests` attribute in the message.
|
|
972
|
+
#--
|
|
973
|
+
# @rbs return: AttributeSets::SvcExport
|
|
974
|
+
def requests; attributes[:"requests"]&.value; end
|
|
975
|
+
end
|
|
976
|
+
# Respond to one or more svc_export requests
|
|
977
|
+
#
|
|
978
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
979
|
+
class DoSvcExportSetReqsRequest < ::Nl::Protocols::Genl::Message
|
|
980
|
+
TYPE = 12
|
|
981
|
+
FIXED_HEADER = nil
|
|
982
|
+
ATTRIBUTE_SET = AttributeSets::SvcExportReqs
|
|
983
|
+
ATTRIBUTES = Ractor.make_shareable(%i[requests])
|
|
984
|
+
# Gets the value of `requests` attribute in the message.
|
|
985
|
+
#--
|
|
986
|
+
# @rbs return: AttributeSets::SvcExport
|
|
987
|
+
def requests; attributes[:"requests"]&.value; end
|
|
988
|
+
end
|
|
989
|
+
# Dump all pending expkey requests
|
|
990
|
+
#
|
|
991
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
992
|
+
class DumpExpkeyGetReqsRequest < ::Nl::Protocols::Genl::Message
|
|
993
|
+
TYPE = 13
|
|
994
|
+
FIXED_HEADER = nil
|
|
995
|
+
ATTRIBUTE_SET = AttributeSets::ExpkeyReqs
|
|
996
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
997
|
+
end
|
|
998
|
+
# Dump all pending expkey requests
|
|
999
|
+
#
|
|
1000
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1001
|
+
class DumpExpkeyGetReqsReply < ::Nl::Protocols::Genl::Message
|
|
1002
|
+
TYPE = 13
|
|
1003
|
+
FIXED_HEADER = nil
|
|
1004
|
+
ATTRIBUTE_SET = AttributeSets::ExpkeyReqs
|
|
1005
|
+
ATTRIBUTES = Ractor.make_shareable(%i[requests])
|
|
1006
|
+
# Gets the value of `requests` attribute in the message.
|
|
1007
|
+
#--
|
|
1008
|
+
# @rbs return: AttributeSets::Expkey
|
|
1009
|
+
def requests; attributes[:"requests"]&.value; end
|
|
1010
|
+
end
|
|
1011
|
+
# Respond to one or more expkey requests
|
|
1012
|
+
#
|
|
1013
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1014
|
+
class DoExpkeySetReqsRequest < ::Nl::Protocols::Genl::Message
|
|
1015
|
+
TYPE = 14
|
|
1016
|
+
FIXED_HEADER = nil
|
|
1017
|
+
ATTRIBUTE_SET = AttributeSets::ExpkeyReqs
|
|
1018
|
+
ATTRIBUTES = Ractor.make_shareable(%i[requests])
|
|
1019
|
+
# Gets the value of `requests` attribute in the message.
|
|
1020
|
+
#--
|
|
1021
|
+
# @rbs return: AttributeSets::Expkey
|
|
1022
|
+
def requests; attributes[:"requests"]&.value; end
|
|
1023
|
+
end
|
|
1024
|
+
# Flush nfsd caches (svc_export and/or expkey)
|
|
1025
|
+
#
|
|
1026
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1027
|
+
class DoCacheFlushRequest < ::Nl::Protocols::Genl::Message
|
|
1028
|
+
TYPE = 15
|
|
1029
|
+
FIXED_HEADER = nil
|
|
1030
|
+
ATTRIBUTE_SET = AttributeSets::CacheFlush
|
|
1031
|
+
ATTRIBUTES = Ractor.make_shareable(%i[mask])
|
|
1032
|
+
# Gets the value of `mask` attribute in the message.
|
|
1033
|
+
#--
|
|
1034
|
+
# @rbs return: ::Integer
|
|
1035
|
+
def mask; attributes[:"mask"]&.value; end
|
|
1036
|
+
end
|
|
1037
|
+
# release NLM locks held by an IP address
|
|
1038
|
+
#
|
|
1039
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1040
|
+
class DoUnlockIpRequest < ::Nl::Protocols::Genl::Message
|
|
1041
|
+
TYPE = 16
|
|
1042
|
+
FIXED_HEADER = nil
|
|
1043
|
+
ATTRIBUTE_SET = AttributeSets::UnlockIp
|
|
1044
|
+
ATTRIBUTES = Ractor.make_shareable(%i[address])
|
|
1045
|
+
# Gets the value of `address` attribute in the message.
|
|
1046
|
+
#--
|
|
1047
|
+
# @rbs return: ::String
|
|
1048
|
+
def address; attributes[:"address"]&.value; end
|
|
1049
|
+
end
|
|
1050
|
+
# revoke NFS state under a filesystem path
|
|
1051
|
+
#
|
|
1052
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1053
|
+
class DoUnlockFilesystemRequest < ::Nl::Protocols::Genl::Message
|
|
1054
|
+
TYPE = 17
|
|
1055
|
+
FIXED_HEADER = nil
|
|
1056
|
+
ATTRIBUTE_SET = AttributeSets::UnlockFilesystem
|
|
1057
|
+
ATTRIBUTES = Ractor.make_shareable(%i[path])
|
|
1058
|
+
# Gets the value of `path` attribute in the message.
|
|
1059
|
+
#--
|
|
1060
|
+
# @rbs return: ::String
|
|
1061
|
+
def path; attributes[:"path"]&.value; end
|
|
1062
|
+
end
|
|
1063
|
+
# Revoke NFSv4 state acquired through exports of a given path. Unlike unlock-filesystem, which operates at superblock granularity, this command targets only state associated with a specific export path. Userspace (exportfs -u) sends this after removing the last client for a path so the underlying filesystem can be unmounted.
|
|
1064
|
+
#
|
|
1065
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1066
|
+
class DoUnlockExportRequest < ::Nl::Protocols::Genl::Message
|
|
1067
|
+
TYPE = 18
|
|
1068
|
+
FIXED_HEADER = nil
|
|
1069
|
+
ATTRIBUTE_SET = AttributeSets::UnlockExport
|
|
1070
|
+
ATTRIBUTES = Ractor.make_shareable(%i[path])
|
|
1071
|
+
# Gets the value of `path` attribute in the message.
|
|
1072
|
+
#--
|
|
1073
|
+
# @rbs return: ::String
|
|
1074
|
+
def path; attributes[:"path"]&.value; end
|
|
1075
|
+
end
|
|
1076
|
+
end
|
|
1077
|
+
module Notifications
|
|
1078
|
+
# Notification that there are cache requests that need servicing
|
|
1079
|
+
#
|
|
1080
|
+
# Multicast group: `exportd`.
|
|
1081
|
+
class CacheNotify < ::Nl::Protocols::Genl::Message
|
|
1082
|
+
TYPE = 10
|
|
1083
|
+
FIXED_HEADER = nil
|
|
1084
|
+
ATTRIBUTE_SET = AttributeSets::CacheNotify
|
|
1085
|
+
ATTRIBUTES = Ractor.make_shareable(%i[cache_type])
|
|
1086
|
+
# Gets the value of `cache-type` attribute in the message.
|
|
1087
|
+
#--
|
|
1088
|
+
# @rbs return: ::Integer
|
|
1089
|
+
def cache_type; attributes[:"cache_type"]&.value; end
|
|
1090
|
+
end
|
|
1091
|
+
end
|
|
1092
|
+
NOTIFICATIONS = Ractor.make_shareable({10 => Notifications::CacheNotify}) #: Hash[::Integer, ::Class]
|
|
1093
|
+
# dump pending nfsd rpc
|
|
1094
|
+
#--
|
|
1095
|
+
# @rbs () -> Enumerable[Messages::DumpRpcStatusGetReply]
|
|
1096
|
+
# | () { (Messages::DumpRpcStatusGetReply) -> void } -> void
|
|
1097
|
+
def dump_rpc_status_get(**args, &block)
|
|
1098
|
+
exchange_message(:"dump", Messages::DumpRpcStatusGetRequest, Messages::DumpRpcStatusGetReply, args, &block)
|
|
474
1099
|
end
|
|
475
|
-
# set the number of running threads
|
|
1100
|
+
# set the maximum number of running threads
|
|
1101
|
+
#
|
|
1102
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
476
1103
|
#--
|
|
477
|
-
# @rbs (?threads: ::Integer, ?gracetime: ::Integer, ?leasetime: ::Integer, ?scope: ::String) -> void
|
|
1104
|
+
# @rbs (?threads: ::Integer, ?gracetime: ::Integer, ?leasetime: ::Integer, ?scope: ::String, ?min_threads: ::Integer, ?fh_key: ::String) -> void
|
|
478
1105
|
def do_threads_set(**args)
|
|
479
1106
|
exchange_message(:"do", Messages::DoThreadsSetRequest, nil, args)
|
|
480
1107
|
end
|
|
1108
|
+
# get the maximum number of running threads
|
|
1109
|
+
#--
|
|
1110
|
+
# @rbs () -> Messages::DoThreadsGetReply
|
|
1111
|
+
def do_threads_get(**args)
|
|
1112
|
+
exchange_message(:"do", Messages::DoThreadsGetRequest, Messages::DoThreadsGetReply, args)
|
|
1113
|
+
end
|
|
481
1114
|
# set nfs enabled versions
|
|
1115
|
+
#
|
|
1116
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
482
1117
|
#--
|
|
483
1118
|
# @rbs (?version: AttributeSets::Version) -> void
|
|
484
1119
|
def do_version_set(**args)
|
|
485
1120
|
exchange_message(:"do", Messages::DoVersionSetRequest, nil, args)
|
|
486
1121
|
end
|
|
1122
|
+
# get nfs enabled versions
|
|
1123
|
+
#--
|
|
1124
|
+
# @rbs () -> Messages::DoVersionGetReply
|
|
1125
|
+
def do_version_get(**args)
|
|
1126
|
+
exchange_message(:"do", Messages::DoVersionGetRequest, Messages::DoVersionGetReply, args)
|
|
1127
|
+
end
|
|
487
1128
|
# set nfs running sockets
|
|
1129
|
+
#
|
|
1130
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
488
1131
|
#--
|
|
489
1132
|
# @rbs (?addr: AttributeSets::Sock) -> void
|
|
490
1133
|
def do_listener_set(**args)
|
|
491
1134
|
exchange_message(:"do", Messages::DoListenerSetRequest, nil, args)
|
|
492
1135
|
end
|
|
1136
|
+
# get nfs running listeners
|
|
1137
|
+
#--
|
|
1138
|
+
# @rbs () -> Messages::DoListenerGetReply
|
|
1139
|
+
def do_listener_get(**args)
|
|
1140
|
+
exchange_message(:"do", Messages::DoListenerGetRequest, Messages::DoListenerGetReply, args)
|
|
1141
|
+
end
|
|
493
1142
|
# set the current server pool-mode
|
|
1143
|
+
#
|
|
1144
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
494
1145
|
#--
|
|
495
1146
|
# @rbs (?mode: ::String) -> void
|
|
496
1147
|
def do_pool_mode_set(**args)
|
|
497
1148
|
exchange_message(:"do", Messages::DoPoolModeSetRequest, nil, args)
|
|
498
1149
|
end
|
|
1150
|
+
# get info about server pool-mode
|
|
1151
|
+
#--
|
|
1152
|
+
# @rbs () -> Messages::DoPoolModeGetReply
|
|
1153
|
+
def do_pool_mode_get(**args)
|
|
1154
|
+
exchange_message(:"do", Messages::DoPoolModeGetRequest, Messages::DoPoolModeGetReply, args)
|
|
1155
|
+
end
|
|
1156
|
+
# Dump all pending svc_export requests
|
|
1157
|
+
#
|
|
1158
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1159
|
+
#--
|
|
1160
|
+
# @rbs () -> Enumerable[Messages::DumpSvcExportGetReqsReply]
|
|
1161
|
+
# | () { (Messages::DumpSvcExportGetReqsReply) -> void } -> void
|
|
1162
|
+
def dump_svc_export_get_reqs(**args, &block)
|
|
1163
|
+
exchange_message(:"dump", Messages::DumpSvcExportGetReqsRequest, Messages::DumpSvcExportGetReqsReply, args, &block)
|
|
1164
|
+
end
|
|
1165
|
+
# Respond to one or more svc_export requests
|
|
1166
|
+
#
|
|
1167
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1168
|
+
#--
|
|
1169
|
+
# @rbs (?requests: AttributeSets::SvcExport) -> void
|
|
1170
|
+
def do_svc_export_set_reqs(**args)
|
|
1171
|
+
exchange_message(:"do", Messages::DoSvcExportSetReqsRequest, nil, args)
|
|
1172
|
+
end
|
|
1173
|
+
# Dump all pending expkey requests
|
|
1174
|
+
#
|
|
1175
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1176
|
+
#--
|
|
1177
|
+
# @rbs () -> Enumerable[Messages::DumpExpkeyGetReqsReply]
|
|
1178
|
+
# | () { (Messages::DumpExpkeyGetReqsReply) -> void } -> void
|
|
1179
|
+
def dump_expkey_get_reqs(**args, &block)
|
|
1180
|
+
exchange_message(:"dump", Messages::DumpExpkeyGetReqsRequest, Messages::DumpExpkeyGetReqsReply, args, &block)
|
|
1181
|
+
end
|
|
1182
|
+
# Respond to one or more expkey requests
|
|
1183
|
+
#
|
|
1184
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1185
|
+
#--
|
|
1186
|
+
# @rbs (?requests: AttributeSets::Expkey) -> void
|
|
1187
|
+
def do_expkey_set_reqs(**args)
|
|
1188
|
+
exchange_message(:"do", Messages::DoExpkeySetReqsRequest, nil, args)
|
|
1189
|
+
end
|
|
1190
|
+
# Flush nfsd caches (svc_export and/or expkey)
|
|
1191
|
+
#
|
|
1192
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1193
|
+
#--
|
|
1194
|
+
# @rbs (?mask: ::Integer) -> void
|
|
1195
|
+
def do_cache_flush(**args)
|
|
1196
|
+
exchange_message(:"do", Messages::DoCacheFlushRequest, nil, args)
|
|
1197
|
+
end
|
|
1198
|
+
# release NLM locks held by an IP address
|
|
1199
|
+
#
|
|
1200
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1201
|
+
#--
|
|
1202
|
+
# @rbs (?address: ::String) -> void
|
|
1203
|
+
def do_unlock_ip(**args)
|
|
1204
|
+
exchange_message(:"do", Messages::DoUnlockIpRequest, nil, args)
|
|
1205
|
+
end
|
|
1206
|
+
# revoke NFS state under a filesystem path
|
|
1207
|
+
#
|
|
1208
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1209
|
+
#--
|
|
1210
|
+
# @rbs (?path: ::String) -> void
|
|
1211
|
+
def do_unlock_filesystem(**args)
|
|
1212
|
+
exchange_message(:"do", Messages::DoUnlockFilesystemRequest, nil, args)
|
|
1213
|
+
end
|
|
1214
|
+
# Revoke NFSv4 state acquired through exports of a given path. Unlike unlock-filesystem, which operates at superblock granularity, this command targets only state associated with a specific export path. Userspace (exportfs -u) sends this after removing the last client for a path so the underlying filesystem can be unmounted.
|
|
1215
|
+
#
|
|
1216
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1217
|
+
#--
|
|
1218
|
+
# @rbs (?path: ::String) -> void
|
|
1219
|
+
def do_unlock_export(**args)
|
|
1220
|
+
exchange_message(:"do", Messages::DoUnlockExportRequest, nil, args)
|
|
1221
|
+
end
|
|
1222
|
+
class AsyncOperations
|
|
1223
|
+
# :nodoc:
|
|
1224
|
+
def initialize(&exchange)
|
|
1225
|
+
@exchange = exchange
|
|
1226
|
+
end
|
|
1227
|
+
# dump pending nfsd rpc
|
|
1228
|
+
#--
|
|
1229
|
+
# @rbs () -> ::Nl::Async::Stream[Messages::DumpRpcStatusGetReply]
|
|
1230
|
+
def dump_rpc_status_get(**args)
|
|
1231
|
+
@exchange.call(:"dump", Messages::DumpRpcStatusGetRequest, Messages::DumpRpcStatusGetReply, args)
|
|
1232
|
+
end
|
|
1233
|
+
# set the maximum number of running threads
|
|
1234
|
+
#
|
|
1235
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1236
|
+
#--
|
|
1237
|
+
# @rbs (?threads: ::Integer, ?gracetime: ::Integer, ?leasetime: ::Integer, ?scope: ::String, ?min_threads: ::Integer, ?fh_key: ::String) -> ::Nl::Async::Future[void]
|
|
1238
|
+
def do_threads_set(**args)
|
|
1239
|
+
@exchange.call(:"do", Messages::DoThreadsSetRequest, nil, args)
|
|
1240
|
+
end
|
|
1241
|
+
# get the maximum number of running threads
|
|
1242
|
+
#--
|
|
1243
|
+
# @rbs () -> ::Nl::Async::Future[Messages::DoThreadsGetReply]
|
|
1244
|
+
def do_threads_get(**args)
|
|
1245
|
+
@exchange.call(:"do", Messages::DoThreadsGetRequest, Messages::DoThreadsGetReply, args)
|
|
1246
|
+
end
|
|
1247
|
+
# set nfs enabled versions
|
|
1248
|
+
#
|
|
1249
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1250
|
+
#--
|
|
1251
|
+
# @rbs (?version: AttributeSets::Version) -> ::Nl::Async::Future[void]
|
|
1252
|
+
def do_version_set(**args)
|
|
1253
|
+
@exchange.call(:"do", Messages::DoVersionSetRequest, nil, args)
|
|
1254
|
+
end
|
|
1255
|
+
# get nfs enabled versions
|
|
1256
|
+
#--
|
|
1257
|
+
# @rbs () -> ::Nl::Async::Future[Messages::DoVersionGetReply]
|
|
1258
|
+
def do_version_get(**args)
|
|
1259
|
+
@exchange.call(:"do", Messages::DoVersionGetRequest, Messages::DoVersionGetReply, args)
|
|
1260
|
+
end
|
|
1261
|
+
# set nfs running sockets
|
|
1262
|
+
#
|
|
1263
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1264
|
+
#--
|
|
1265
|
+
# @rbs (?addr: AttributeSets::Sock) -> ::Nl::Async::Future[void]
|
|
1266
|
+
def do_listener_set(**args)
|
|
1267
|
+
@exchange.call(:"do", Messages::DoListenerSetRequest, nil, args)
|
|
1268
|
+
end
|
|
1269
|
+
# get nfs running listeners
|
|
1270
|
+
#--
|
|
1271
|
+
# @rbs () -> ::Nl::Async::Future[Messages::DoListenerGetReply]
|
|
1272
|
+
def do_listener_get(**args)
|
|
1273
|
+
@exchange.call(:"do", Messages::DoListenerGetRequest, Messages::DoListenerGetReply, args)
|
|
1274
|
+
end
|
|
1275
|
+
# set the current server pool-mode
|
|
1276
|
+
#
|
|
1277
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1278
|
+
#--
|
|
1279
|
+
# @rbs (?mode: ::String) -> ::Nl::Async::Future[void]
|
|
1280
|
+
def do_pool_mode_set(**args)
|
|
1281
|
+
@exchange.call(:"do", Messages::DoPoolModeSetRequest, nil, args)
|
|
1282
|
+
end
|
|
1283
|
+
# get info about server pool-mode
|
|
1284
|
+
#--
|
|
1285
|
+
# @rbs () -> ::Nl::Async::Future[Messages::DoPoolModeGetReply]
|
|
1286
|
+
def do_pool_mode_get(**args)
|
|
1287
|
+
@exchange.call(:"do", Messages::DoPoolModeGetRequest, Messages::DoPoolModeGetReply, args)
|
|
1288
|
+
end
|
|
1289
|
+
# Dump all pending svc_export requests
|
|
1290
|
+
#
|
|
1291
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1292
|
+
#--
|
|
1293
|
+
# @rbs () -> ::Nl::Async::Stream[Messages::DumpSvcExportGetReqsReply]
|
|
1294
|
+
def dump_svc_export_get_reqs(**args)
|
|
1295
|
+
@exchange.call(:"dump", Messages::DumpSvcExportGetReqsRequest, Messages::DumpSvcExportGetReqsReply, args)
|
|
1296
|
+
end
|
|
1297
|
+
# Respond to one or more svc_export requests
|
|
1298
|
+
#
|
|
1299
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1300
|
+
#--
|
|
1301
|
+
# @rbs (?requests: AttributeSets::SvcExport) -> ::Nl::Async::Future[void]
|
|
1302
|
+
def do_svc_export_set_reqs(**args)
|
|
1303
|
+
@exchange.call(:"do", Messages::DoSvcExportSetReqsRequest, nil, args)
|
|
1304
|
+
end
|
|
1305
|
+
# Dump all pending expkey requests
|
|
1306
|
+
#
|
|
1307
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1308
|
+
#--
|
|
1309
|
+
# @rbs () -> ::Nl::Async::Stream[Messages::DumpExpkeyGetReqsReply]
|
|
1310
|
+
def dump_expkey_get_reqs(**args)
|
|
1311
|
+
@exchange.call(:"dump", Messages::DumpExpkeyGetReqsRequest, Messages::DumpExpkeyGetReqsReply, args)
|
|
1312
|
+
end
|
|
1313
|
+
# Respond to one or more expkey requests
|
|
1314
|
+
#
|
|
1315
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1316
|
+
#--
|
|
1317
|
+
# @rbs (?requests: AttributeSets::Expkey) -> ::Nl::Async::Future[void]
|
|
1318
|
+
def do_expkey_set_reqs(**args)
|
|
1319
|
+
@exchange.call(:"do", Messages::DoExpkeySetReqsRequest, nil, args)
|
|
1320
|
+
end
|
|
1321
|
+
# Flush nfsd caches (svc_export and/or expkey)
|
|
1322
|
+
#
|
|
1323
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1324
|
+
#--
|
|
1325
|
+
# @rbs (?mask: ::Integer) -> ::Nl::Async::Future[void]
|
|
1326
|
+
def do_cache_flush(**args)
|
|
1327
|
+
@exchange.call(:"do", Messages::DoCacheFlushRequest, nil, args)
|
|
1328
|
+
end
|
|
1329
|
+
# release NLM locks held by an IP address
|
|
1330
|
+
#
|
|
1331
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1332
|
+
#--
|
|
1333
|
+
# @rbs (?address: ::String) -> ::Nl::Async::Future[void]
|
|
1334
|
+
def do_unlock_ip(**args)
|
|
1335
|
+
@exchange.call(:"do", Messages::DoUnlockIpRequest, nil, args)
|
|
1336
|
+
end
|
|
1337
|
+
# revoke NFS state under a filesystem path
|
|
1338
|
+
#
|
|
1339
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1340
|
+
#--
|
|
1341
|
+
# @rbs (?path: ::String) -> ::Nl::Async::Future[void]
|
|
1342
|
+
def do_unlock_filesystem(**args)
|
|
1343
|
+
@exchange.call(:"do", Messages::DoUnlockFilesystemRequest, nil, args)
|
|
1344
|
+
end
|
|
1345
|
+
# Revoke NFSv4 state acquired through exports of a given path. Unlike unlock-filesystem, which operates at superblock granularity, this command targets only state associated with a specific export path. Userspace (exportfs -u) sends this after removing the last client for a path so the underlying filesystem can be unmounted.
|
|
1346
|
+
#
|
|
1347
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1348
|
+
#--
|
|
1349
|
+
# @rbs (?path: ::String) -> ::Nl::Async::Future[void]
|
|
1350
|
+
def do_unlock_export(**args)
|
|
1351
|
+
@exchange.call(:"do", Messages::DoUnlockExportRequest, nil, args)
|
|
1352
|
+
end
|
|
1353
|
+
end
|
|
1354
|
+
# Returns the asynchronous operation facade for this family.
|
|
1355
|
+
#--
|
|
1356
|
+
# @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
|
|
1357
|
+
def async(stream_capacity: nil)
|
|
1358
|
+
return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
|
|
1359
|
+
build_async_facade(AsyncOperations, stream_capacity:)
|
|
1360
|
+
end
|
|
1361
|
+
#--
|
|
1362
|
+
# @rbs (*(:none | :exportd) groups) -> self
|
|
1363
|
+
def subscribe(*groups) = super
|
|
1364
|
+
#--
|
|
1365
|
+
# @rbs (*(:none | :exportd) groups) -> self
|
|
1366
|
+
def unsubscribe(*groups) = super
|
|
499
1367
|
end
|
|
500
1368
|
end; end
|