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
|
@@ -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/nl80211.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 Nl80211 < ::Nl::Family
|
|
10
12
|
NAME = "nl80211"
|
|
11
13
|
PROTOCOL = Ractor.make_shareable(::Nl::Protocols::Genl.new("nl80211"))
|
|
14
|
+
MCAST_GROUPS = Ractor.make_shareable({:"config" => ::Nl::McastGroup.new("config", nil), :"scan" => ::Nl::McastGroup.new("scan", nil), :"regulatory" => ::Nl::McastGroup.new("regulatory", nil), :"mlme" => ::Nl::McastGroup.new("mlme", nil), :"vendor" => ::Nl::McastGroup.new("vendor", nil), :"nan" => ::Nl::McastGroup.new("nan", nil), :"testmode" => ::Nl::McastGroup.new("testmode", nil)}) #: Hash[::Symbol, ::Nl::McastGroup]
|
|
12
15
|
module Structs
|
|
13
16
|
StaFlagUpdate = Struct.new(
|
|
14
17
|
:"mask", #: ::Integer
|
|
@@ -2781,7 +2784,7 @@ class Nl80211 < ::Nl::Family
|
|
|
2781
2784
|
def wiphy_name; attributes[:"wiphy_name"]&.value; end
|
|
2782
2785
|
# Gets the value of `mac` attribute in the message.
|
|
2783
2786
|
#--
|
|
2784
|
-
# @rbs return:
|
|
2787
|
+
# @rbs return: ::String
|
|
2785
2788
|
def mac; attributes[:"mac"]&.value; end
|
|
2786
2789
|
# Gets the value of `wiphy-bands` attribute in the message.
|
|
2787
2790
|
#--
|
|
@@ -2801,7 +2804,7 @@ class Nl80211 < ::Nl::Family
|
|
|
2801
2804
|
def generation; attributes[:"generation"]&.value; end
|
|
2802
2805
|
# Gets the value of `supported-commands` attribute in the message.
|
|
2803
2806
|
#--
|
|
2804
|
-
# @rbs return:
|
|
2807
|
+
# @rbs return: ::Array[::Integer]
|
|
2805
2808
|
def supported_commands; attributes[:"supported_commands"]&.value; end
|
|
2806
2809
|
# Gets the value of `max-scan-ie-len` attribute in the message.
|
|
2807
2810
|
#--
|
|
@@ -2809,7 +2812,7 @@ class Nl80211 < ::Nl::Family
|
|
|
2809
2812
|
def max_scan_ie_len; attributes[:"max_scan_ie_len"]&.value; end
|
|
2810
2813
|
# Gets the value of `cipher-suites` attribute in the message.
|
|
2811
2814
|
#--
|
|
2812
|
-
# @rbs return:
|
|
2815
|
+
# @rbs return: ::String
|
|
2813
2816
|
def cipher_suites; attributes[:"cipher_suites"]&.value; end
|
|
2814
2817
|
# Gets the value of `wiphy-retry-short` attribute in the message.
|
|
2815
2818
|
#--
|
|
@@ -2877,7 +2880,7 @@ class Nl80211 < ::Nl::Family
|
|
|
2877
2880
|
def wowlan_triggers_supported; attributes[:"wowlan_triggers_supported"]&.value; end
|
|
2878
2881
|
# Gets the value of `interface-combinations` attribute in the message.
|
|
2879
2882
|
#--
|
|
2880
|
-
# @rbs return:
|
|
2883
|
+
# @rbs return: ::Array[AttributeSets::IfCombinationAttributes]
|
|
2881
2884
|
def interface_combinations; attributes[:"interface_combinations"]&.value; end
|
|
2882
2885
|
# Gets the value of `software-iftypes` attribute in the message.
|
|
2883
2886
|
#--
|
|
@@ -2913,19 +2916,19 @@ class Nl80211 < ::Nl::Family
|
|
|
2913
2916
|
def feature_flags; attributes[:"feature_flags"]&.value; end
|
|
2914
2917
|
# Gets the value of `ht-capability-mask` attribute in the message.
|
|
2915
2918
|
#--
|
|
2916
|
-
# @rbs return:
|
|
2919
|
+
# @rbs return: ::String
|
|
2917
2920
|
def ht_capability_mask; attributes[:"ht_capability_mask"]&.value; end
|
|
2918
2921
|
# Gets the value of `ext-capa` attribute in the message.
|
|
2919
2922
|
#--
|
|
2920
|
-
# @rbs return:
|
|
2923
|
+
# @rbs return: ::String
|
|
2921
2924
|
def ext_capa; attributes[:"ext_capa"]&.value; end
|
|
2922
2925
|
# Gets the value of `ext-capa-mask` attribute in the message.
|
|
2923
2926
|
#--
|
|
2924
|
-
# @rbs return:
|
|
2927
|
+
# @rbs return: ::String
|
|
2925
2928
|
def ext_capa_mask; attributes[:"ext_capa_mask"]&.value; end
|
|
2926
2929
|
# Gets the value of `vht-capability-mask` attribute in the message.
|
|
2927
2930
|
#--
|
|
2928
|
-
# @rbs return:
|
|
2931
|
+
# @rbs return: ::String
|
|
2929
2932
|
def vht_capability_mask; attributes[:"vht_capability_mask"]&.value; end
|
|
2930
2933
|
# Gets the value of `max-csa-counters` attribute in the message.
|
|
2931
2934
|
#--
|
|
@@ -2933,7 +2936,7 @@ class Nl80211 < ::Nl::Family
|
|
|
2933
2936
|
def max_csa_counters; attributes[:"max_csa_counters"]&.value; end
|
|
2934
2937
|
# Gets the value of `ext-features` attribute in the message.
|
|
2935
2938
|
#--
|
|
2936
|
-
# @rbs return:
|
|
2939
|
+
# @rbs return: ::String
|
|
2937
2940
|
def ext_features; attributes[:"ext_features"]&.value; end
|
|
2938
2941
|
# Gets the value of `max-num-sched-scan-plans` attribute in the message.
|
|
2939
2942
|
#--
|
|
@@ -2977,7 +2980,7 @@ class Nl80211 < ::Nl::Family
|
|
|
2977
2980
|
def sar_spec; attributes[:"sar_spec"]&.value; end
|
|
2978
2981
|
# Gets the value of `max-num-akm-suites` attribute in the message.
|
|
2979
2982
|
#--
|
|
2980
|
-
# @rbs return:
|
|
2983
|
+
# @rbs return: ::String
|
|
2981
2984
|
def max_num_akm_suites; attributes[:"max_num_akm_suites"]&.value; end
|
|
2982
2985
|
end
|
|
2983
2986
|
# Get information about a wiphy or dump a list of all wiphys. Requests to
|
|
@@ -3023,7 +3026,7 @@ class Nl80211 < ::Nl::Family
|
|
|
3023
3026
|
def wiphy_name; attributes[:"wiphy_name"]&.value; end
|
|
3024
3027
|
# Gets the value of `mac` attribute in the message.
|
|
3025
3028
|
#--
|
|
3026
|
-
# @rbs return:
|
|
3029
|
+
# @rbs return: ::String
|
|
3027
3030
|
def mac; attributes[:"mac"]&.value; end
|
|
3028
3031
|
# Gets the value of `wiphy-bands` attribute in the message.
|
|
3029
3032
|
#--
|
|
@@ -3043,7 +3046,7 @@ class Nl80211 < ::Nl::Family
|
|
|
3043
3046
|
def generation; attributes[:"generation"]&.value; end
|
|
3044
3047
|
# Gets the value of `supported-commands` attribute in the message.
|
|
3045
3048
|
#--
|
|
3046
|
-
# @rbs return:
|
|
3049
|
+
# @rbs return: ::Array[::Integer]
|
|
3047
3050
|
def supported_commands; attributes[:"supported_commands"]&.value; end
|
|
3048
3051
|
# Gets the value of `max-scan-ie-len` attribute in the message.
|
|
3049
3052
|
#--
|
|
@@ -3051,7 +3054,7 @@ class Nl80211 < ::Nl::Family
|
|
|
3051
3054
|
def max_scan_ie_len; attributes[:"max_scan_ie_len"]&.value; end
|
|
3052
3055
|
# Gets the value of `cipher-suites` attribute in the message.
|
|
3053
3056
|
#--
|
|
3054
|
-
# @rbs return:
|
|
3057
|
+
# @rbs return: ::String
|
|
3055
3058
|
def cipher_suites; attributes[:"cipher_suites"]&.value; end
|
|
3056
3059
|
# Gets the value of `wiphy-retry-short` attribute in the message.
|
|
3057
3060
|
#--
|
|
@@ -3119,7 +3122,7 @@ class Nl80211 < ::Nl::Family
|
|
|
3119
3122
|
def wowlan_triggers_supported; attributes[:"wowlan_triggers_supported"]&.value; end
|
|
3120
3123
|
# Gets the value of `interface-combinations` attribute in the message.
|
|
3121
3124
|
#--
|
|
3122
|
-
# @rbs return:
|
|
3125
|
+
# @rbs return: ::Array[AttributeSets::IfCombinationAttributes]
|
|
3123
3126
|
def interface_combinations; attributes[:"interface_combinations"]&.value; end
|
|
3124
3127
|
# Gets the value of `software-iftypes` attribute in the message.
|
|
3125
3128
|
#--
|
|
@@ -3155,19 +3158,19 @@ class Nl80211 < ::Nl::Family
|
|
|
3155
3158
|
def feature_flags; attributes[:"feature_flags"]&.value; end
|
|
3156
3159
|
# Gets the value of `ht-capability-mask` attribute in the message.
|
|
3157
3160
|
#--
|
|
3158
|
-
# @rbs return:
|
|
3161
|
+
# @rbs return: ::String
|
|
3159
3162
|
def ht_capability_mask; attributes[:"ht_capability_mask"]&.value; end
|
|
3160
3163
|
# Gets the value of `ext-capa` attribute in the message.
|
|
3161
3164
|
#--
|
|
3162
|
-
# @rbs return:
|
|
3165
|
+
# @rbs return: ::String
|
|
3163
3166
|
def ext_capa; attributes[:"ext_capa"]&.value; end
|
|
3164
3167
|
# Gets the value of `ext-capa-mask` attribute in the message.
|
|
3165
3168
|
#--
|
|
3166
|
-
# @rbs return:
|
|
3169
|
+
# @rbs return: ::String
|
|
3167
3170
|
def ext_capa_mask; attributes[:"ext_capa_mask"]&.value; end
|
|
3168
3171
|
# Gets the value of `vht-capability-mask` attribute in the message.
|
|
3169
3172
|
#--
|
|
3170
|
-
# @rbs return:
|
|
3173
|
+
# @rbs return: ::String
|
|
3171
3174
|
def vht_capability_mask; attributes[:"vht_capability_mask"]&.value; end
|
|
3172
3175
|
# Gets the value of `max-csa-counters` attribute in the message.
|
|
3173
3176
|
#--
|
|
@@ -3175,7 +3178,7 @@ class Nl80211 < ::Nl::Family
|
|
|
3175
3178
|
def max_csa_counters; attributes[:"max_csa_counters"]&.value; end
|
|
3176
3179
|
# Gets the value of `ext-features` attribute in the message.
|
|
3177
3180
|
#--
|
|
3178
|
-
# @rbs return:
|
|
3181
|
+
# @rbs return: ::String
|
|
3179
3182
|
def ext_features; attributes[:"ext_features"]&.value; end
|
|
3180
3183
|
# Gets the value of `max-num-sched-scan-plans` attribute in the message.
|
|
3181
3184
|
#--
|
|
@@ -3219,7 +3222,7 @@ class Nl80211 < ::Nl::Family
|
|
|
3219
3222
|
def sar_spec; attributes[:"sar_spec"]&.value; end
|
|
3220
3223
|
# Gets the value of `max-num-akm-suites` attribute in the message.
|
|
3221
3224
|
#--
|
|
3222
|
-
# @rbs return:
|
|
3225
|
+
# @rbs return: ::String
|
|
3223
3226
|
def max_num_akm_suites; attributes[:"max_num_akm_suites"]&.value; end
|
|
3224
3227
|
end
|
|
3225
3228
|
# Get information about an interface or dump a list of all interfaces
|
|
@@ -3257,7 +3260,7 @@ class Nl80211 < ::Nl::Family
|
|
|
3257
3260
|
def iftype; attributes[:"iftype"]&.value; end
|
|
3258
3261
|
# Gets the value of `mac` attribute in the message.
|
|
3259
3262
|
#--
|
|
3260
|
-
# @rbs return:
|
|
3263
|
+
# @rbs return: ::String
|
|
3261
3264
|
def mac; attributes[:"mac"]&.value; end
|
|
3262
3265
|
# Gets the value of `generation` attribute in the message.
|
|
3263
3266
|
#--
|
|
@@ -3311,7 +3314,7 @@ class Nl80211 < ::Nl::Family
|
|
|
3311
3314
|
def iftype; attributes[:"iftype"]&.value; end
|
|
3312
3315
|
# Gets the value of `mac` attribute in the message.
|
|
3313
3316
|
#--
|
|
3314
|
-
# @rbs return:
|
|
3317
|
+
# @rbs return: ::String
|
|
3315
3318
|
def mac; attributes[:"mac"]&.value; end
|
|
3316
3319
|
# Gets the value of `generation` attribute in the message.
|
|
3317
3320
|
#--
|
|
@@ -3353,6 +3356,9 @@ class Nl80211 < ::Nl::Family
|
|
|
3353
3356
|
def protocol_features; attributes[:"protocol_features"]&.value; end
|
|
3354
3357
|
end
|
|
3355
3358
|
end
|
|
3359
|
+
module Notifications
|
|
3360
|
+
end
|
|
3361
|
+
NOTIFICATIONS = Ractor.make_shareable({}) #: Hash[::Integer, ::Class]
|
|
3356
3362
|
# Get information about a wiphy or dump a list of all wiphys. Requests to
|
|
3357
3363
|
# dump get-wiphy should unconditionally include the split-wiphy-dump flag
|
|
3358
3364
|
# in the request.
|
|
@@ -3389,5 +3395,58 @@ class Nl80211 < ::Nl::Family
|
|
|
3389
3395
|
def do_get_protocol_features(**args)
|
|
3390
3396
|
exchange_message(:"do", Messages::DoGetProtocolFeaturesRequest, Messages::DoGetProtocolFeaturesReply, args)
|
|
3391
3397
|
end
|
|
3398
|
+
class AsyncOperations
|
|
3399
|
+
# :nodoc:
|
|
3400
|
+
def initialize(&exchange)
|
|
3401
|
+
@exchange = exchange
|
|
3402
|
+
end
|
|
3403
|
+
# Get information about a wiphy or dump a list of all wiphys. Requests to
|
|
3404
|
+
# dump get-wiphy should unconditionally include the split-wiphy-dump flag
|
|
3405
|
+
# in the request.
|
|
3406
|
+
#--
|
|
3407
|
+
# @rbs (?wiphy: ::Integer, ?ifindex: ::Integer, ?wdev: ::Integer) -> ::Nl::Async::Future[Messages::DoGetWiphyReply]
|
|
3408
|
+
def do_get_wiphy(**args)
|
|
3409
|
+
@exchange.call(:"do", Messages::DoGetWiphyRequest, Messages::DoGetWiphyReply, args)
|
|
3410
|
+
end
|
|
3411
|
+
# Get information about a wiphy or dump a list of all wiphys. Requests to
|
|
3412
|
+
# dump get-wiphy should unconditionally include the split-wiphy-dump flag
|
|
3413
|
+
# in the request.
|
|
3414
|
+
#--
|
|
3415
|
+
# @rbs (?wiphy: ::Integer, ?ifindex: ::Integer, ?wdev: ::Integer, ?split_wiphy_dump: ::Integer) -> ::Nl::Async::Stream[Messages::DumpGetWiphyReply]
|
|
3416
|
+
def dump_get_wiphy(**args)
|
|
3417
|
+
@exchange.call(:"dump", Messages::DumpGetWiphyRequest, Messages::DumpGetWiphyReply, args)
|
|
3418
|
+
end
|
|
3419
|
+
# Get information about an interface or dump a list of all interfaces
|
|
3420
|
+
#--
|
|
3421
|
+
# @rbs (?ifname: ::String) -> ::Nl::Async::Future[Messages::DoGetInterfaceReply]
|
|
3422
|
+
def do_get_interface(**args)
|
|
3423
|
+
@exchange.call(:"do", Messages::DoGetInterfaceRequest, Messages::DoGetInterfaceReply, args)
|
|
3424
|
+
end
|
|
3425
|
+
# Get information about an interface or dump a list of all interfaces
|
|
3426
|
+
#--
|
|
3427
|
+
# @rbs (?ifname: ::String) -> ::Nl::Async::Stream[Messages::DumpGetInterfaceReply]
|
|
3428
|
+
def dump_get_interface(**args)
|
|
3429
|
+
@exchange.call(:"dump", Messages::DumpGetInterfaceRequest, Messages::DumpGetInterfaceReply, args)
|
|
3430
|
+
end
|
|
3431
|
+
# Get information about supported protocol features
|
|
3432
|
+
#--
|
|
3433
|
+
# @rbs (?protocol_features: ::Integer) -> ::Nl::Async::Future[Messages::DoGetProtocolFeaturesReply]
|
|
3434
|
+
def do_get_protocol_features(**args)
|
|
3435
|
+
@exchange.call(:"do", Messages::DoGetProtocolFeaturesRequest, Messages::DoGetProtocolFeaturesReply, args)
|
|
3436
|
+
end
|
|
3437
|
+
end
|
|
3438
|
+
# Returns the asynchronous operation facade for this family.
|
|
3439
|
+
#--
|
|
3440
|
+
# @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
|
|
3441
|
+
def async(stream_capacity: nil)
|
|
3442
|
+
return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
|
|
3443
|
+
build_async_facade(AsyncOperations, stream_capacity:)
|
|
3444
|
+
end
|
|
3445
|
+
#--
|
|
3446
|
+
# @rbs (*(:config | :scan | :regulatory | :mlme | :vendor | :nan | :testmode) groups) -> self
|
|
3447
|
+
def subscribe(*groups) = super
|
|
3448
|
+
#--
|
|
3449
|
+
# @rbs (*(:config | :scan | :regulatory | :mlme | :vendor | :nan | :testmode) groups) -> self
|
|
3450
|
+
def unsubscribe(*groups) = super
|
|
3392
3451
|
end
|
|
3393
3452
|
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/nlctrl.yaml from Linux v7.2.
|
|
2
4
|
#--
|
|
3
5
|
# frozen_string_literal: true
|
|
4
6
|
# rbs_inline: enabled
|
|
@@ -10,6 +12,7 @@ module Nl; module Linux
|
|
|
10
12
|
class Nlctrl < ::Nl::Family
|
|
11
13
|
NAME = "nlctrl"
|
|
12
14
|
PROTOCOL = Ractor.make_shareable(::Nl::Protocols::Genl.new("nlctrl"))
|
|
15
|
+
MCAST_GROUPS = Ractor.make_shareable({}) #: Hash[::Symbol, ::Nl::McastGroup]
|
|
13
16
|
module Structs
|
|
14
17
|
end
|
|
15
18
|
module AttributeSets
|
|
@@ -256,8 +259,8 @@ class Nlctrl < ::Nl::Family
|
|
|
256
259
|
end
|
|
257
260
|
CtrlAttrs::Ops::DATATYPE = ::Nl::Protocols::Genl::DataTypes::IndexedArray.new(::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(OpAttrs))
|
|
258
261
|
CtrlAttrs::McastGroups::DATATYPE = ::Nl::Protocols::Genl::DataTypes::IndexedArray.new(::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(McastGroupAttrs))
|
|
259
|
-
CtrlAttrs::Policy::DATATYPE = ::Nl::Protocols::Genl::DataTypes::
|
|
260
|
-
CtrlAttrs::OpPolicy::DATATYPE = ::Nl::Protocols::Genl::DataTypes::
|
|
262
|
+
CtrlAttrs::Policy::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestTypeValue.new(PolicyAttrs, 2)
|
|
263
|
+
CtrlAttrs::OpPolicy::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestTypeValue.new(OpPolicyAttrs, 1)
|
|
261
264
|
end
|
|
262
265
|
module Messages
|
|
263
266
|
# Get / dump genetlink families
|
|
@@ -299,14 +302,21 @@ class Nlctrl < ::Nl::Family
|
|
|
299
302
|
def maxattr; attributes[:"maxattr"]&.value; end
|
|
300
303
|
# Gets the value of `ops` attribute in the message.
|
|
301
304
|
#--
|
|
302
|
-
# @rbs return:
|
|
305
|
+
# @rbs return: ::Array[AttributeSets::OpAttrs]
|
|
303
306
|
def ops; attributes[:"ops"]&.value; end
|
|
304
307
|
# Gets the value of `mcast-groups` attribute in the message.
|
|
305
308
|
#--
|
|
306
|
-
# @rbs return:
|
|
309
|
+
# @rbs return: ::Array[AttributeSets::McastGroupAttrs]
|
|
307
310
|
def mcast_groups; attributes[:"mcast_groups"]&.value; end
|
|
308
311
|
end
|
|
309
312
|
# Get / dump genetlink families
|
|
313
|
+
class DumpGetfamilyRequest < ::Nl::Protocols::Genl::Message
|
|
314
|
+
TYPE = 3
|
|
315
|
+
FIXED_HEADER = nil
|
|
316
|
+
ATTRIBUTE_SET = AttributeSets::CtrlAttrs
|
|
317
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
318
|
+
end
|
|
319
|
+
# Get / dump genetlink families
|
|
310
320
|
class DumpGetfamilyReply < ::Nl::Protocols::Genl::Message
|
|
311
321
|
TYPE = 1
|
|
312
322
|
FIXED_HEADER = nil
|
|
@@ -334,11 +344,11 @@ class Nlctrl < ::Nl::Family
|
|
|
334
344
|
def maxattr; attributes[:"maxattr"]&.value; end
|
|
335
345
|
# Gets the value of `ops` attribute in the message.
|
|
336
346
|
#--
|
|
337
|
-
# @rbs return:
|
|
347
|
+
# @rbs return: ::Array[AttributeSets::OpAttrs]
|
|
338
348
|
def ops; attributes[:"ops"]&.value; end
|
|
339
349
|
# Gets the value of `mcast-groups` attribute in the message.
|
|
340
350
|
#--
|
|
341
|
-
# @rbs return:
|
|
351
|
+
# @rbs return: ::Array[AttributeSets::McastGroupAttrs]
|
|
342
352
|
def mcast_groups; attributes[:"mcast_groups"]&.value; end
|
|
343
353
|
end
|
|
344
354
|
# Get / dump genetlink policies
|
|
@@ -372,20 +382,30 @@ class Nlctrl < ::Nl::Family
|
|
|
372
382
|
def family_id; attributes[:"family_id"]&.value; end
|
|
373
383
|
# Gets the value of `policy` attribute in the message.
|
|
374
384
|
#--
|
|
375
|
-
# @rbs return: AttributeSets::PolicyAttrs
|
|
385
|
+
# @rbs return: ::Hash[::Integer, ::Hash[::Integer, AttributeSets::PolicyAttrs]]
|
|
376
386
|
def policy; attributes[:"policy"]&.value; end
|
|
377
387
|
# Gets the value of `op-policy` attribute in the message.
|
|
378
388
|
#--
|
|
379
|
-
# @rbs return: AttributeSets::OpPolicyAttrs
|
|
389
|
+
# @rbs return: ::Hash[::Integer, AttributeSets::OpPolicyAttrs]
|
|
380
390
|
def op_policy; attributes[:"op_policy"]&.value; end
|
|
381
391
|
end
|
|
382
392
|
end
|
|
393
|
+
module Notifications
|
|
394
|
+
end
|
|
395
|
+
NOTIFICATIONS = Ractor.make_shareable({}) #: Hash[::Integer, ::Class]
|
|
383
396
|
# Get / dump genetlink families
|
|
384
397
|
#--
|
|
385
398
|
# @rbs (?family_name: ::String) -> Messages::DoGetfamilyReply
|
|
386
399
|
def do_getfamily(**args)
|
|
387
400
|
exchange_message(:"do", Messages::DoGetfamilyRequest, Messages::DoGetfamilyReply, args)
|
|
388
401
|
end
|
|
402
|
+
# Get / dump genetlink families
|
|
403
|
+
#--
|
|
404
|
+
# @rbs () -> Enumerable[Messages::DumpGetfamilyReply]
|
|
405
|
+
# | () { (Messages::DumpGetfamilyReply) -> void } -> void
|
|
406
|
+
def dump_getfamily(**args, &block)
|
|
407
|
+
exchange_message(:"dump", Messages::DumpGetfamilyRequest, Messages::DumpGetfamilyReply, args, &block)
|
|
408
|
+
end
|
|
389
409
|
# Get / dump genetlink policies
|
|
390
410
|
#--
|
|
391
411
|
# @rbs (?family_id: ::Integer, ?family_name: ::String, ?op: ::Integer) -> Enumerable[Messages::DumpGetpolicyReply]
|
|
@@ -393,5 +413,36 @@ class Nlctrl < ::Nl::Family
|
|
|
393
413
|
def dump_getpolicy(**args, &block)
|
|
394
414
|
exchange_message(:"dump", Messages::DumpGetpolicyRequest, Messages::DumpGetpolicyReply, args, &block)
|
|
395
415
|
end
|
|
416
|
+
class AsyncOperations
|
|
417
|
+
# :nodoc:
|
|
418
|
+
def initialize(&exchange)
|
|
419
|
+
@exchange = exchange
|
|
420
|
+
end
|
|
421
|
+
# Get / dump genetlink families
|
|
422
|
+
#--
|
|
423
|
+
# @rbs (?family_name: ::String) -> ::Nl::Async::Future[Messages::DoGetfamilyReply]
|
|
424
|
+
def do_getfamily(**args)
|
|
425
|
+
@exchange.call(:"do", Messages::DoGetfamilyRequest, Messages::DoGetfamilyReply, args)
|
|
426
|
+
end
|
|
427
|
+
# Get / dump genetlink families
|
|
428
|
+
#--
|
|
429
|
+
# @rbs () -> ::Nl::Async::Stream[Messages::DumpGetfamilyReply]
|
|
430
|
+
def dump_getfamily(**args)
|
|
431
|
+
@exchange.call(:"dump", Messages::DumpGetfamilyRequest, Messages::DumpGetfamilyReply, args)
|
|
432
|
+
end
|
|
433
|
+
# Get / dump genetlink policies
|
|
434
|
+
#--
|
|
435
|
+
# @rbs (?family_id: ::Integer, ?family_name: ::String, ?op: ::Integer) -> ::Nl::Async::Stream[Messages::DumpGetpolicyReply]
|
|
436
|
+
def dump_getpolicy(**args)
|
|
437
|
+
@exchange.call(:"dump", Messages::DumpGetpolicyRequest, Messages::DumpGetpolicyReply, args)
|
|
438
|
+
end
|
|
439
|
+
end
|
|
440
|
+
# Returns the asynchronous operation facade for this family.
|
|
441
|
+
#--
|
|
442
|
+
# @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
|
|
443
|
+
def async(stream_capacity: nil)
|
|
444
|
+
return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
|
|
445
|
+
build_async_facade(AsyncOperations, stream_capacity:)
|
|
446
|
+
end
|
|
396
447
|
end
|
|
397
448
|
end; end
|