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/mptcp_pm.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 MptcpPm < ::Nl::Family
10
12
  NAME = "mptcp_pm"
11
13
  PROTOCOL = Ractor.make_shareable(::Nl::Protocols::Genl.new("mptcp_pm"))
14
+ MCAST_GROUPS = Ractor.make_shareable({}) #: Hash[::Symbol, ::Nl::McastGroup]
12
15
  module Structs
13
16
  end
14
17
  module AttributeSets
@@ -335,6 +338,8 @@ class MptcpPm < ::Nl::Family
335
338
  end
336
339
  module Messages
337
340
  # Add endpoint
341
+ #
342
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
338
343
  class DoAddAddrRequest < ::Nl::Protocols::Genl::Message
339
344
  TYPE = 1
340
345
  FIXED_HEADER = nil
@@ -346,6 +351,8 @@ class MptcpPm < ::Nl::Family
346
351
  def addr; attributes[:"addr"]&.value; end
347
352
  end
348
353
  # Delete endpoint
354
+ #
355
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
349
356
  class DoDelAddrRequest < ::Nl::Protocols::Genl::Message
350
357
  TYPE = 2
351
358
  FIXED_HEADER = nil
@@ -383,6 +390,13 @@ class MptcpPm < ::Nl::Family
383
390
  def addr; attributes[:"addr"]&.value; end
384
391
  end
385
392
  # Get endpoint information
393
+ class DumpGetAddrRequest < ::Nl::Protocols::Genl::Message
394
+ TYPE = 3
395
+ FIXED_HEADER = nil
396
+ ATTRIBUTE_SET = AttributeSets::Attr
397
+ ATTRIBUTES = Ractor.make_shareable(%i[])
398
+ end
399
+ # Get endpoint information
386
400
  class DumpGetAddrReply < ::Nl::Protocols::Genl::Message
387
401
  TYPE = 3
388
402
  FIXED_HEADER = nil
@@ -394,6 +408,8 @@ class MptcpPm < ::Nl::Family
394
408
  def addr; attributes[:"addr"]&.value; end
395
409
  end
396
410
  # Flush addresses
411
+ #
412
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
397
413
  class DoFlushAddrsRequest < ::Nl::Protocols::Genl::Message
398
414
  TYPE = 4
399
415
  FIXED_HEADER = nil
@@ -405,6 +421,8 @@ class MptcpPm < ::Nl::Family
405
421
  def addr; attributes[:"addr"]&.value; end
406
422
  end
407
423
  # Set protocol limits
424
+ #
425
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
408
426
  class DoSetLimitsRequest < ::Nl::Protocols::Genl::Message
409
427
  TYPE = 5
410
428
  FIXED_HEADER = nil
@@ -450,6 +468,8 @@ class MptcpPm < ::Nl::Family
450
468
  def subflows; attributes[:"subflows"]&.value; end
451
469
  end
452
470
  # Change endpoint flags
471
+ #
472
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
453
473
  class DoSetFlagsRequest < ::Nl::Protocols::Genl::Message
454
474
  TYPE = 7
455
475
  FIXED_HEADER = nil
@@ -469,6 +489,8 @@ class MptcpPm < ::Nl::Family
469
489
  def addr_remote; attributes[:"addr_remote"]&.value; end
470
490
  end
471
491
  # Announce new address
492
+ #
493
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
472
494
  class DoAnnounceRequest < ::Nl::Protocols::Genl::Message
473
495
  TYPE = 8
474
496
  FIXED_HEADER = nil
@@ -484,6 +506,8 @@ class MptcpPm < ::Nl::Family
484
506
  def token; attributes[:"token"]&.value; end
485
507
  end
486
508
  # Announce removal
509
+ #
510
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
487
511
  class DoRemoveRequest < ::Nl::Protocols::Genl::Message
488
512
  TYPE = 9
489
513
  FIXED_HEADER = nil
@@ -499,6 +523,8 @@ class MptcpPm < ::Nl::Family
499
523
  def loc_id; attributes[:"loc_id"]&.value; end
500
524
  end
501
525
  # Create subflow
526
+ #
527
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
502
528
  class DoSubflowCreateRequest < ::Nl::Protocols::Genl::Message
503
529
  TYPE = 10
504
530
  FIXED_HEADER = nil
@@ -518,6 +544,8 @@ class MptcpPm < ::Nl::Family
518
544
  def addr_remote; attributes[:"addr_remote"]&.value; end
519
545
  end
520
546
  # Destroy subflow
547
+ #
548
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
521
549
  class DoSubflowDestroyRequest < ::Nl::Protocols::Genl::Message
522
550
  TYPE = 11
523
551
  FIXED_HEADER = nil
@@ -537,13 +565,20 @@ class MptcpPm < ::Nl::Family
537
565
  def addr_remote; attributes[:"addr_remote"]&.value; end
538
566
  end
539
567
  end
568
+ module Notifications
569
+ end
570
+ NOTIFICATIONS = Ractor.make_shareable({}) #: Hash[::Integer, ::Class]
540
571
  # Add endpoint
572
+ #
573
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
541
574
  #--
542
575
  # @rbs (?addr: AttributeSets::Address) -> void
543
576
  def do_add_addr(**args)
544
577
  exchange_message(:"do", Messages::DoAddAddrRequest, nil, args)
545
578
  end
546
579
  # Delete endpoint
580
+ #
581
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
547
582
  #--
548
583
  # @rbs (?addr: AttributeSets::Address) -> void
549
584
  def do_del_addr(**args)
@@ -555,13 +590,24 @@ class MptcpPm < ::Nl::Family
555
590
  def do_get_addr(**args)
556
591
  exchange_message(:"do", Messages::DoGetAddrRequest, Messages::DoGetAddrReply, args)
557
592
  end
593
+ # Get endpoint information
594
+ #--
595
+ # @rbs () -> Enumerable[Messages::DumpGetAddrReply]
596
+ # | () { (Messages::DumpGetAddrReply) -> void } -> void
597
+ def dump_get_addr(**args, &block)
598
+ exchange_message(:"dump", Messages::DumpGetAddrRequest, Messages::DumpGetAddrReply, args, &block)
599
+ end
558
600
  # Flush addresses
601
+ #
602
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
559
603
  #--
560
604
  # @rbs (?addr: AttributeSets::Address) -> void
561
605
  def do_flush_addrs(**args)
562
606
  exchange_message(:"do", Messages::DoFlushAddrsRequest, nil, args)
563
607
  end
564
608
  # Set protocol limits
609
+ #
610
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
565
611
  #--
566
612
  # @rbs (?rcv_add_addrs: ::Integer, ?subflows: ::Integer) -> void
567
613
  def do_set_limits(**args)
@@ -574,34 +620,147 @@ class MptcpPm < ::Nl::Family
574
620
  exchange_message(:"do", Messages::DoGetLimitsRequest, Messages::DoGetLimitsReply, args)
575
621
  end
576
622
  # Change endpoint flags
623
+ #
624
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
577
625
  #--
578
626
  # @rbs (?addr: AttributeSets::Address, ?token: ::Integer, ?addr_remote: AttributeSets::Address) -> void
579
627
  def do_set_flags(**args)
580
628
  exchange_message(:"do", Messages::DoSetFlagsRequest, nil, args)
581
629
  end
582
630
  # Announce new address
631
+ #
632
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
583
633
  #--
584
634
  # @rbs (?addr: AttributeSets::Address, ?token: ::Integer) -> void
585
635
  def do_announce(**args)
586
636
  exchange_message(:"do", Messages::DoAnnounceRequest, nil, args)
587
637
  end
588
638
  # Announce removal
639
+ #
640
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
589
641
  #--
590
642
  # @rbs (?token: ::Integer, ?loc_id: ::Integer) -> void
591
643
  def do_remove(**args)
592
644
  exchange_message(:"do", Messages::DoRemoveRequest, nil, args)
593
645
  end
594
646
  # Create subflow
647
+ #
648
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
595
649
  #--
596
650
  # @rbs (?addr: AttributeSets::Address, ?token: ::Integer, ?addr_remote: AttributeSets::Address) -> void
597
651
  def do_subflow_create(**args)
598
652
  exchange_message(:"do", Messages::DoSubflowCreateRequest, nil, args)
599
653
  end
600
654
  # Destroy subflow
655
+ #
656
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
601
657
  #--
602
658
  # @rbs (?addr: AttributeSets::Address, ?token: ::Integer, ?addr_remote: AttributeSets::Address) -> void
603
659
  def do_subflow_destroy(**args)
604
660
  exchange_message(:"do", Messages::DoSubflowDestroyRequest, nil, args)
605
661
  end
662
+ class AsyncOperations
663
+ # :nodoc:
664
+ def initialize(&exchange)
665
+ @exchange = exchange
666
+ end
667
+ # Add endpoint
668
+ #
669
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
670
+ #--
671
+ # @rbs (?addr: AttributeSets::Address) -> ::Nl::Async::Future[void]
672
+ def do_add_addr(**args)
673
+ @exchange.call(:"do", Messages::DoAddAddrRequest, nil, args)
674
+ end
675
+ # Delete endpoint
676
+ #
677
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
678
+ #--
679
+ # @rbs (?addr: AttributeSets::Address) -> ::Nl::Async::Future[void]
680
+ def do_del_addr(**args)
681
+ @exchange.call(:"do", Messages::DoDelAddrRequest, nil, args)
682
+ end
683
+ # Get endpoint information
684
+ #--
685
+ # @rbs (?addr: AttributeSets::Address, ?token: ::Integer) -> ::Nl::Async::Future[Messages::DoGetAddrReply]
686
+ def do_get_addr(**args)
687
+ @exchange.call(:"do", Messages::DoGetAddrRequest, Messages::DoGetAddrReply, args)
688
+ end
689
+ # Get endpoint information
690
+ #--
691
+ # @rbs () -> ::Nl::Async::Stream[Messages::DumpGetAddrReply]
692
+ def dump_get_addr(**args)
693
+ @exchange.call(:"dump", Messages::DumpGetAddrRequest, Messages::DumpGetAddrReply, args)
694
+ end
695
+ # Flush addresses
696
+ #
697
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
698
+ #--
699
+ # @rbs (?addr: AttributeSets::Address) -> ::Nl::Async::Future[void]
700
+ def do_flush_addrs(**args)
701
+ @exchange.call(:"do", Messages::DoFlushAddrsRequest, nil, args)
702
+ end
703
+ # Set protocol limits
704
+ #
705
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
706
+ #--
707
+ # @rbs (?rcv_add_addrs: ::Integer, ?subflows: ::Integer) -> ::Nl::Async::Future[void]
708
+ def do_set_limits(**args)
709
+ @exchange.call(:"do", Messages::DoSetLimitsRequest, nil, args)
710
+ end
711
+ # Get protocol limits
712
+ #--
713
+ # @rbs (?rcv_add_addrs: ::Integer, ?subflows: ::Integer) -> ::Nl::Async::Future[Messages::DoGetLimitsReply]
714
+ def do_get_limits(**args)
715
+ @exchange.call(:"do", Messages::DoGetLimitsRequest, Messages::DoGetLimitsReply, args)
716
+ end
717
+ # Change endpoint flags
718
+ #
719
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
720
+ #--
721
+ # @rbs (?addr: AttributeSets::Address, ?token: ::Integer, ?addr_remote: AttributeSets::Address) -> ::Nl::Async::Future[void]
722
+ def do_set_flags(**args)
723
+ @exchange.call(:"do", Messages::DoSetFlagsRequest, nil, args)
724
+ end
725
+ # Announce new address
726
+ #
727
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
728
+ #--
729
+ # @rbs (?addr: AttributeSets::Address, ?token: ::Integer) -> ::Nl::Async::Future[void]
730
+ def do_announce(**args)
731
+ @exchange.call(:"do", Messages::DoAnnounceRequest, nil, args)
732
+ end
733
+ # Announce removal
734
+ #
735
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
736
+ #--
737
+ # @rbs (?token: ::Integer, ?loc_id: ::Integer) -> ::Nl::Async::Future[void]
738
+ def do_remove(**args)
739
+ @exchange.call(:"do", Messages::DoRemoveRequest, nil, args)
740
+ end
741
+ # Create subflow
742
+ #
743
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
744
+ #--
745
+ # @rbs (?addr: AttributeSets::Address, ?token: ::Integer, ?addr_remote: AttributeSets::Address) -> ::Nl::Async::Future[void]
746
+ def do_subflow_create(**args)
747
+ @exchange.call(:"do", Messages::DoSubflowCreateRequest, nil, args)
748
+ end
749
+ # Destroy subflow
750
+ #
751
+ # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
752
+ #--
753
+ # @rbs (?addr: AttributeSets::Address, ?token: ::Integer, ?addr_remote: AttributeSets::Address) -> ::Nl::Async::Future[void]
754
+ def do_subflow_destroy(**args)
755
+ @exchange.call(:"do", Messages::DoSubflowDestroyRequest, nil, args)
756
+ end
757
+ end
758
+ # Returns the asynchronous operation facade for this family.
759
+ #--
760
+ # @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
761
+ def async(stream_capacity: nil)
762
+ return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
763
+ build_async_facade(AsyncOperations, stream_capacity:)
764
+ end
606
765
  end
607
766
  end; end
@@ -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/net_shaper.yaml from Linux v7.2.
2
4
  #--
3
5
  # frozen_string_literal: true
4
6
  # rbs_inline: enabled
@@ -36,6 +38,7 @@ module Nl; module Linux
36
38
  class NetShaper < ::Nl::Family
37
39
  NAME = "net-shaper"
38
40
  PROTOCOL = Ractor.make_shareable(::Nl::Protocols::Genl.new("net-shaper"))
41
+ MCAST_GROUPS = Ractor.make_shareable({}) #: Hash[::Symbol, ::Nl::McastGroup]
39
42
  module Structs
40
43
  end
41
44
  module AttributeSets
@@ -365,6 +368,9 @@ class NetShaper < ::Nl::Family
365
368
  # Create or update the specified shaper.
366
369
  # The set operation can't be used to create a `node` scope shaper,
367
370
  # use the `group` operation instead.
371
+ #
372
+ #
373
+ # Requires CAP_NET_ADMIN in the initial user namespace.
368
374
  class DoSetRequest < ::Nl::Protocols::Genl::Message
369
375
  TYPE = 2
370
376
  FIXED_HEADER = nil
@@ -414,6 +420,9 @@ class NetShaper < ::Nl::Family
414
420
  # queue/device can still send traffic: it has an implicit
415
421
  # node with infinite bandwidth. The queue's implicit node
416
422
  # feeds an implicit RR node at the root of the hierarchy.
423
+ #
424
+ #
425
+ # Requires CAP_NET_ADMIN in the initial user namespace.
417
426
  class DoDeleteRequest < ::Nl::Protocols::Genl::Message
418
427
  TYPE = 3
419
428
  FIXED_HEADER = nil
@@ -447,6 +456,9 @@ class NetShaper < ::Nl::Family
447
456
  # the device shaping configuration, otherwise the `node` shaper
448
457
  # full identifier, comprising `binding` and `handle`, is provided
449
458
  # as the reply.
459
+ #
460
+ #
461
+ # Requires CAP_NET_ADMIN in the initial user namespace.
450
462
  class DoGroupRequest < ::Nl::Protocols::Genl::Message
451
463
  TYPE = 4
452
464
  FIXED_HEADER = nil
@@ -512,6 +524,9 @@ class NetShaper < ::Nl::Family
512
524
  # the device shaping configuration, otherwise the `node` shaper
513
525
  # full identifier, comprising `binding` and `handle`, is provided
514
526
  # as the reply.
527
+ #
528
+ #
529
+ # Requires CAP_NET_ADMIN in the initial user namespace.
515
530
  class DoGroupReply < ::Nl::Protocols::Genl::Message
516
531
  TYPE = 4
517
532
  FIXED_HEADER = nil
@@ -651,6 +666,9 @@ class NetShaper < ::Nl::Family
651
666
  def support_weight; attributes[:"support_weight"]&.value; end
652
667
  end
653
668
  end
669
+ module Notifications
670
+ end
671
+ NOTIFICATIONS = Ractor.make_shareable({}) #: Hash[::Integer, ::Class]
654
672
  # Get information about a shaper for a given device.
655
673
  #--
656
674
  # @rbs (?handle: AttributeSets::Handle, ?ifindex: ::Integer) -> Messages::DoGetReply
@@ -667,6 +685,9 @@ class NetShaper < ::Nl::Family
667
685
  # Create or update the specified shaper.
668
686
  # The set operation can't be used to create a `node` scope shaper,
669
687
  # use the `group` operation instead.
688
+ #
689
+ #
690
+ # Requires CAP_NET_ADMIN in the initial user namespace.
670
691
  #--
671
692
  # @rbs (?handle: AttributeSets::Handle, ?metric: ::Integer, ?bw_min: ::Integer, ?bw_max: ::Integer, ?burst: ::Integer, ?priority: ::Integer, ?weight: ::Integer, ?ifindex: ::Integer) -> void
672
693
  def do_set(**args)
@@ -683,6 +704,9 @@ class NetShaper < ::Nl::Family
683
704
  # queue/device can still send traffic: it has an implicit
684
705
  # node with infinite bandwidth. The queue's implicit node
685
706
  # feeds an implicit RR node at the root of the hierarchy.
707
+ #
708
+ #
709
+ # Requires CAP_NET_ADMIN in the initial user namespace.
686
710
  #--
687
711
  # @rbs (?handle: AttributeSets::Handle, ?ifindex: ::Integer) -> void
688
712
  def do_delete(**args)
@@ -707,6 +731,9 @@ class NetShaper < ::Nl::Family
707
731
  # the device shaping configuration, otherwise the `node` shaper
708
732
  # full identifier, comprising `binding` and `handle`, is provided
709
733
  # as the reply.
734
+ #
735
+ #
736
+ # Requires CAP_NET_ADMIN in the initial user namespace.
710
737
  #--
711
738
  # @rbs (?handle: AttributeSets::Handle, ?metric: ::Integer, ?bw_min: ::Integer, ?bw_max: ::Integer, ?burst: ::Integer, ?priority: ::Integer, ?weight: ::Integer, ?ifindex: ::Integer, ?parent: AttributeSets::Handle, ?leaves: AttributeSets::LeafInfo) -> Messages::DoGroupReply
712
739
  def do_group(**args)
@@ -727,5 +754,101 @@ class NetShaper < ::Nl::Family
727
754
  def dump_cap_get(**args, &block)
728
755
  exchange_message(:"dump", Messages::DumpCapGetRequest, Messages::DumpCapGetReply, args, &block)
729
756
  end
757
+ class AsyncOperations
758
+ # :nodoc:
759
+ def initialize(&exchange)
760
+ @exchange = exchange
761
+ end
762
+ # Get information about a shaper for a given device.
763
+ #--
764
+ # @rbs (?handle: AttributeSets::Handle, ?ifindex: ::Integer) -> ::Nl::Async::Future[Messages::DoGetReply]
765
+ def do_get(**args)
766
+ @exchange.call(:"do", Messages::DoGetRequest, Messages::DoGetReply, args)
767
+ end
768
+ # Get information about a shaper for a given device.
769
+ #--
770
+ # @rbs (?ifindex: ::Integer) -> ::Nl::Async::Stream[Messages::DumpGetReply]
771
+ def dump_get(**args)
772
+ @exchange.call(:"dump", Messages::DumpGetRequest, Messages::DumpGetReply, args)
773
+ end
774
+ # Create or update the specified shaper.
775
+ # The set operation can't be used to create a `node` scope shaper,
776
+ # use the `group` operation instead.
777
+ #
778
+ #
779
+ # Requires CAP_NET_ADMIN in the initial user namespace.
780
+ #--
781
+ # @rbs (?handle: AttributeSets::Handle, ?metric: ::Integer, ?bw_min: ::Integer, ?bw_max: ::Integer, ?burst: ::Integer, ?priority: ::Integer, ?weight: ::Integer, ?ifindex: ::Integer) -> ::Nl::Async::Future[void]
782
+ def do_set(**args)
783
+ @exchange.call(:"do", Messages::DoSetRequest, nil, args)
784
+ end
785
+ # Clear (remove) the specified shaper. When deleting
786
+ # a `node` shaper, reattach all the node's leaves to the
787
+ # deleted node's parent.
788
+ # If, after the removal, the parent shaper has no more
789
+ # leaves and the parent shaper scope is `node`, the parent
790
+ # node is deleted, recursively.
791
+ # When deleting a `queue` shaper or a `netdev` shaper,
792
+ # the shaper disappears from the hierarchy, but the
793
+ # queue/device can still send traffic: it has an implicit
794
+ # node with infinite bandwidth. The queue's implicit node
795
+ # feeds an implicit RR node at the root of the hierarchy.
796
+ #
797
+ #
798
+ # Requires CAP_NET_ADMIN in the initial user namespace.
799
+ #--
800
+ # @rbs (?handle: AttributeSets::Handle, ?ifindex: ::Integer) -> ::Nl::Async::Future[void]
801
+ def do_delete(**args)
802
+ @exchange.call(:"do", Messages::DoDeleteRequest, nil, args)
803
+ end
804
+ # Create or update a scheduling group, attaching the specified
805
+ # `leaves` shapers under the specified node identified by `handle.`
806
+ # The `leaves` shapers scope must be `queue` and the node shaper
807
+ # scope must be either `node` or `netdev.`
808
+ # When the node shaper has `node` scope, if the `handle` `id` is not
809
+ # specified, a new shaper of such scope is created, otherwise the
810
+ # specified node must already exist.
811
+ # When updating an existing node shaper, the specified `leaves` are
812
+ # added to the existing node; such node will also retain any preexisting
813
+ # leave.
814
+ # The `parent` handle for a new node shaper defaults to the parent
815
+ # of all the leaves, provided all the leaves share the same parent.
816
+ # Otherwise `parent` handle must be specified.
817
+ # The user can optionally provide shaping attributes for the node
818
+ # shaper.
819
+ # The operation is atomic, on failure no change is applied to
820
+ # the device shaping configuration, otherwise the `node` shaper
821
+ # full identifier, comprising `binding` and `handle`, is provided
822
+ # as the reply.
823
+ #
824
+ #
825
+ # Requires CAP_NET_ADMIN in the initial user namespace.
826
+ #--
827
+ # @rbs (?handle: AttributeSets::Handle, ?metric: ::Integer, ?bw_min: ::Integer, ?bw_max: ::Integer, ?burst: ::Integer, ?priority: ::Integer, ?weight: ::Integer, ?ifindex: ::Integer, ?parent: AttributeSets::Handle, ?leaves: AttributeSets::LeafInfo) -> ::Nl::Async::Future[Messages::DoGroupReply]
828
+ def do_group(**args)
829
+ @exchange.call(:"do", Messages::DoGroupRequest, Messages::DoGroupReply, args)
830
+ end
831
+ # Get the shaper capabilities supported by the given device
832
+ # for the specified scope.
833
+ #--
834
+ # @rbs (?ifindex: ::Integer, ?scope: ::Integer) -> ::Nl::Async::Future[Messages::DoCapGetReply]
835
+ def do_cap_get(**args)
836
+ @exchange.call(:"do", Messages::DoCapGetRequest, Messages::DoCapGetReply, args)
837
+ end
838
+ # Get the shaper capabilities supported by the given device
839
+ # for the specified scope.
840
+ #--
841
+ # @rbs (?ifindex: ::Integer) -> ::Nl::Async::Stream[Messages::DumpCapGetReply]
842
+ def dump_cap_get(**args)
843
+ @exchange.call(:"dump", Messages::DumpCapGetRequest, Messages::DumpCapGetReply, args)
844
+ end
845
+ end
846
+ # Returns the asynchronous operation facade for this family.
847
+ #--
848
+ # @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
849
+ def async(stream_capacity: nil)
850
+ return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
851
+ build_async_facade(AsyncOperations, stream_capacity:)
852
+ end
730
853
  end
731
854
  end; end