nl-linux 0.2.4 → 0.4.1
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/.yardopts +5 -0
- data/CHANGELOG.md +8 -0
- data/Rakefile +27 -5
- data/generated/nl/linux/binder.rb +227 -19
- data/generated/nl/linux/conntrack.rb +1325 -365
- data/generated/nl/linux/dev_energymodel.rb +357 -66
- data/generated/nl/linux/devlink.rb +6310 -1859
- data/generated/nl/linux/dpll.rb +2202 -376
- data/generated/nl/linux/drm_ras.rb +312 -63
- data/generated/nl/linux/ethtool.rb +7555 -2447
- data/generated/nl/linux/fou.rb +381 -133
- data/generated/nl/linux/handshake.rb +340 -70
- data/generated/nl/linux/lockd.rb +132 -27
- data/generated/nl/linux/mptcp_pm.rb +773 -161
- data/generated/nl/linux/net_shaper.rb +892 -211
- data/generated/nl/linux/netdev.rb +2366 -518
- data/generated/nl/linux/nfsd.rb +1299 -317
- data/generated/nl/linux/nftables.rb +5351 -1533
- data/generated/nl/linux/nl80211.rb +4601 -882
- data/generated/nl/linux/nlctrl.rb +460 -117
- data/generated/nl/linux/ovpn.rb +1360 -262
- data/generated/nl/linux/ovs_datapath.rb +312 -98
- data/generated/nl/linux/ovs_flow.rb +1866 -358
- data/generated/nl/linux/ovs_packet.rb +331 -45
- data/generated/nl/linux/ovs_vport.rb +374 -123
- data/generated/nl/linux/psp.rb +1093 -201
- data/generated/nl/linux/rt_addr.rb +423 -165
- data/generated/nl/linux/rt_link.rb +6928 -1336
- data/generated/nl/linux/rt_neigh.rb +1063 -297
- data/generated/nl/linux/rt_route.rb +1112 -483
- data/generated/nl/linux/rt_rule.rb +931 -262
- data/generated/nl/linux/sunrpc_cache.rb +407 -82
- data/generated/nl/linux/tc.rb +10081 -1763
- data/generated/nl/linux/tcp_metrics.rb +388 -109
- data/generated/nl/linux/team.rb +350 -84
- data/generated/nl/linux/wireguard.rb +525 -96
- data/generated/nl/linux.rb +1 -0
- data/lib/nl/linux/nlctrl_resolver.rb +31 -0
- data/lib/nl/linux/version.rb +1 -1
- data/sig/generated/nl/linux/binder.rbs +366 -0
- data/sig/generated/nl/linux/conntrack.rbs +2787 -0
- data/sig/generated/nl/linux/dev_energymodel.rbs +636 -0
- data/sig/generated/nl/linux/devlink.rbs +12496 -0
- data/sig/generated/nl/linux/dpll.rbs +3461 -0
- data/sig/generated/nl/linux/drm_ras.rbs +553 -0
- data/sig/generated/nl/linux/ethtool.rbs +15291 -0
- data/sig/generated/nl/linux/fou.rbs +702 -0
- data/sig/generated/nl/linux/handshake.rbs +622 -0
- data/sig/generated/nl/linux/lockd.rbs +234 -0
- data/sig/generated/nl/linux/mptcp_pm.rbs +1511 -0
- data/sig/generated/nl/linux/net_shaper.rbs +1645 -0
- data/sig/generated/nl/linux/netdev.rbs +4187 -0
- data/sig/generated/nl/linux/nfsd.rbs +2520 -0
- data/sig/generated/nl/linux/nftables.rbs +10304 -0
- data/sig/generated/nl/linux/nl80211.rbs +9786 -0
- data/sig/generated/nl/linux/nlctrl.rbs +944 -0
- data/sig/generated/nl/linux/nlctrl_resolver.rbs +20 -0
- data/sig/generated/nl/linux/ovpn.rbs +2564 -0
- data/sig/generated/nl/linux/ovs_datapath.rbs +640 -0
- data/sig/generated/nl/linux/ovs_flow.rbs +3659 -0
- data/sig/generated/nl/linux/ovs_packet.rbs +540 -0
- data/sig/generated/nl/linux/ovs_vport.rbs +777 -0
- data/sig/generated/nl/linux/psp.rbs +1846 -0
- data/sig/generated/nl/linux/rt_addr.rbs +866 -0
- data/sig/generated/nl/linux/rt_link.rbs +13438 -0
- data/sig/generated/nl/linux/rt_neigh.rbs +2124 -0
- data/sig/generated/nl/linux/rt_route.rbs +2218 -0
- data/sig/generated/nl/linux/rt_rule.rbs +1726 -0
- data/sig/generated/nl/linux/sunrpc_cache.rbs +739 -0
- data/sig/generated/nl/linux/tc.rbs +19931 -0
- data/sig/generated/nl/linux/tcp_metrics.rbs +740 -0
- data/sig/generated/nl/linux/team.rbs +733 -0
- data/sig/generated/nl/linux/version.rbs +7 -0
- data/sig/generated/nl/linux/wireguard.rbs +1006 -0
- data/sig/generated/nl/linux.rbs +6 -0
- data/sig/generated/nl-linux.rbs +2 -0
- metadata +51 -10
|
@@ -1,293 +1,618 @@
|
|
|
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/sunrpc_cache.yaml from Linux v7.2.
|
|
2
4
|
#--
|
|
3
5
|
# frozen_string_literal: true
|
|
4
|
-
# rbs_inline: enabled
|
|
5
6
|
# This code is generated by Ynl::Generator. DO NOT EDIT.
|
|
6
7
|
require 'nl'
|
|
7
8
|
module Nl; module Linux
|
|
8
9
|
# SUNRPC cache upcall support over generic netlink.
|
|
9
|
-
class Sunrpc < ::Nl::Family
|
|
10
|
+
class Sunrpc < ::Nl::Genl::Family
|
|
10
11
|
NAME = "sunrpc"
|
|
11
|
-
|
|
12
|
+
VERSION = 1
|
|
13
|
+
# @rbs (?resolver: ^(::Nl::Genl::Client, ::String) -> ::Nl::Genl::FamilyInfo, ?executor: executor?, ?notification_capacity: ::Integer?) -> (::Nl::Family::Session & instance)
|
|
14
|
+
# @rbs | [R] (?resolver: ^(::Nl::Genl::Client, ::String) -> ::Nl::Genl::FamilyInfo, ?executor: executor?, ?notification_capacity: ::Integer?) { (instance) -> R } -> R
|
|
15
|
+
# @overload open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
|
|
16
|
+
# @param [#call] resolver
|
|
17
|
+
# @param [Symbol, nil] executor
|
|
18
|
+
# @param [Integer, nil] notification_capacity
|
|
19
|
+
# @return [Sunrpc]
|
|
20
|
+
# @overload open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY, &block)
|
|
21
|
+
# @param [#call] resolver
|
|
22
|
+
# @param [Symbol, nil] executor
|
|
23
|
+
# @param [Integer, nil] notification_capacity
|
|
24
|
+
# @yieldparam [Sunrpc] family
|
|
25
|
+
# @return [Object] the result of the block
|
|
26
|
+
def self.open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
|
|
27
|
+
super
|
|
28
|
+
end
|
|
29
|
+
# @private
|
|
30
|
+
MCAST_GROUPS = Ractor.make_shareable({:"none" => ::Nl::McastGroup.new("none", nil), :"exportd" => ::Nl::McastGroup.new("exportd", nil)}) #: Hash[::Symbol, ::Nl::McastGroup]
|
|
31
|
+
module Flags
|
|
32
|
+
module CacheType
|
|
33
|
+
IpMap = 1
|
|
34
|
+
UnixGid = 2
|
|
35
|
+
end
|
|
36
|
+
end
|
|
12
37
|
module Structs
|
|
13
38
|
end
|
|
14
39
|
module AttributeSets
|
|
15
|
-
class CacheNotify < ::Nl::
|
|
40
|
+
class CacheNotify < ::Nl::AttributeSet
|
|
16
41
|
# Abstract class
|
|
17
|
-
class Attribute < ::Nl::
|
|
42
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
18
43
|
end
|
|
44
|
+
# Known flags are defined in {Flags::CacheType}.
|
|
19
45
|
class CacheType < Attribute
|
|
20
46
|
TYPE = 1
|
|
21
47
|
NAME = :"cache_type"
|
|
22
|
-
|
|
48
|
+
# @private
|
|
49
|
+
ORDER = 0
|
|
50
|
+
# @private
|
|
51
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
23
52
|
end
|
|
24
|
-
#
|
|
53
|
+
# @private
|
|
25
54
|
BY_NAME = Ractor.make_shareable({:"cache_type" => CacheType}) #: Hash[::Symbol, Attribute]
|
|
26
|
-
#
|
|
55
|
+
# @private
|
|
27
56
|
BY_TYPE = Ractor.make_shareable({1 => CacheType}) #: Hash[::Integer, Attribute]
|
|
57
|
+
# Known flags are defined in {Flags::CacheType}.
|
|
58
|
+
# @rbs return: ::Integer
|
|
59
|
+
# @return [Integer]
|
|
60
|
+
# @see CacheType
|
|
61
|
+
def cache_type; self[:"cache_type"]&.value; end
|
|
28
62
|
class << self
|
|
29
63
|
# Looks up Attribute class by name.
|
|
30
|
-
#--
|
|
31
64
|
# @rbs name: Symbol
|
|
32
65
|
# @rbs return: Attribute
|
|
66
|
+
# @param [Symbol] name
|
|
67
|
+
# @return [Attribute]
|
|
33
68
|
def by_name(name); BY_NAME.fetch(name); end
|
|
34
69
|
# Looks up Attribute class by type value.
|
|
35
|
-
#--
|
|
36
70
|
# @rbs type: Integer
|
|
37
71
|
# @rbs return: Attribute
|
|
72
|
+
# @param [Integer] type
|
|
73
|
+
# @return [Attribute]
|
|
38
74
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
39
75
|
end
|
|
40
76
|
end
|
|
41
|
-
class IpMap < ::Nl::
|
|
77
|
+
class IpMap < ::Nl::AttributeSet
|
|
42
78
|
# Abstract class
|
|
43
|
-
class Attribute < ::Nl::
|
|
79
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
44
80
|
end
|
|
45
81
|
class Seqno < Attribute
|
|
46
82
|
TYPE = 1
|
|
47
83
|
NAME = :"seqno"
|
|
48
|
-
|
|
84
|
+
# @private
|
|
85
|
+
ORDER = 0
|
|
86
|
+
# @private
|
|
87
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
49
88
|
end
|
|
50
89
|
class Class < Attribute
|
|
51
90
|
TYPE = 2
|
|
52
91
|
NAME = :"class"
|
|
53
|
-
|
|
92
|
+
# @private
|
|
93
|
+
ORDER = 1
|
|
94
|
+
# @private
|
|
95
|
+
DATATYPE = ::Nl::DataTypes::String.new(check: nil)
|
|
54
96
|
end
|
|
55
97
|
class Addr < Attribute
|
|
56
98
|
TYPE = 3
|
|
57
99
|
NAME = :"addr"
|
|
58
|
-
|
|
100
|
+
# @private
|
|
101
|
+
ORDER = 2
|
|
102
|
+
# @private
|
|
103
|
+
DATATYPE = ::Nl::DataTypes::String.new(check: nil)
|
|
59
104
|
end
|
|
60
105
|
class Domain < Attribute
|
|
61
106
|
TYPE = 4
|
|
62
107
|
NAME = :"domain"
|
|
63
|
-
|
|
108
|
+
# @private
|
|
109
|
+
ORDER = 3
|
|
110
|
+
# @private
|
|
111
|
+
DATATYPE = ::Nl::DataTypes::String.new(check: nil)
|
|
64
112
|
end
|
|
65
113
|
class Negative < Attribute
|
|
66
114
|
TYPE = 5
|
|
67
115
|
NAME = :"negative"
|
|
68
|
-
|
|
116
|
+
# @private
|
|
117
|
+
ORDER = 4
|
|
118
|
+
# @private
|
|
119
|
+
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
69
120
|
end
|
|
70
121
|
class Expiry < Attribute
|
|
71
122
|
TYPE = 6
|
|
72
123
|
NAME = :"expiry"
|
|
73
|
-
|
|
124
|
+
# @private
|
|
125
|
+
ORDER = 5
|
|
126
|
+
# @private
|
|
127
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
74
128
|
end
|
|
75
|
-
#
|
|
129
|
+
# @private
|
|
76
130
|
BY_NAME = Ractor.make_shareable({:"seqno" => Seqno, :"class" => Class, :"addr" => Addr, :"domain" => Domain, :"negative" => Negative, :"expiry" => Expiry}) #: Hash[::Symbol, Attribute]
|
|
77
|
-
#
|
|
131
|
+
# @private
|
|
78
132
|
BY_TYPE = Ractor.make_shareable({1 => Seqno, 2 => Class, 3 => Addr, 4 => Domain, 5 => Negative, 6 => Expiry}) #: Hash[::Integer, Attribute]
|
|
133
|
+
# @rbs return: ::Integer
|
|
134
|
+
# @return [Integer]
|
|
135
|
+
# @see Seqno
|
|
136
|
+
def seqno; self[:"seqno"]&.value; end
|
|
137
|
+
# @rbs return: ::String
|
|
138
|
+
# @return [String]
|
|
139
|
+
# @see Class
|
|
140
|
+
def class; self[:"class"]&.value; end
|
|
141
|
+
# @rbs return: ::String
|
|
142
|
+
# @return [String]
|
|
143
|
+
# @see Addr
|
|
144
|
+
def addr; self[:"addr"]&.value; end
|
|
145
|
+
# @rbs return: ::String
|
|
146
|
+
# @return [String]
|
|
147
|
+
# @see Domain
|
|
148
|
+
def domain; self[:"domain"]&.value; end
|
|
149
|
+
# @rbs return: ::Integer
|
|
150
|
+
# @return [Integer]
|
|
151
|
+
# @see Negative
|
|
152
|
+
def negative; self[:"negative"]&.value; end
|
|
153
|
+
# @rbs return: ::Integer
|
|
154
|
+
# @return [Integer]
|
|
155
|
+
# @see Expiry
|
|
156
|
+
def expiry; self[:"expiry"]&.value; end
|
|
79
157
|
class << self
|
|
80
158
|
# Looks up Attribute class by name.
|
|
81
|
-
#--
|
|
82
159
|
# @rbs name: Symbol
|
|
83
160
|
# @rbs return: Attribute
|
|
161
|
+
# @param [Symbol] name
|
|
162
|
+
# @return [Attribute]
|
|
84
163
|
def by_name(name); BY_NAME.fetch(name); end
|
|
85
164
|
# Looks up Attribute class by type value.
|
|
86
|
-
#--
|
|
87
165
|
# @rbs type: Integer
|
|
88
166
|
# @rbs return: Attribute
|
|
167
|
+
# @param [Integer] type
|
|
168
|
+
# @return [Attribute]
|
|
89
169
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
90
170
|
end
|
|
91
171
|
end
|
|
92
|
-
class IpMapReqs < ::Nl::
|
|
172
|
+
class IpMapReqs < ::Nl::AttributeSet
|
|
93
173
|
# Abstract class
|
|
94
|
-
class Attribute < ::Nl::
|
|
174
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
95
175
|
end
|
|
96
176
|
class Requests < Attribute
|
|
97
177
|
TYPE = 1
|
|
98
178
|
NAME = :"requests"
|
|
179
|
+
# @private
|
|
180
|
+
MULTI = true
|
|
181
|
+
# @private
|
|
182
|
+
ORDER = 0
|
|
99
183
|
end
|
|
100
|
-
#
|
|
184
|
+
# @private
|
|
101
185
|
BY_NAME = Ractor.make_shareable({:"requests" => Requests}) #: Hash[::Symbol, Attribute]
|
|
102
|
-
#
|
|
186
|
+
# @private
|
|
103
187
|
BY_TYPE = Ractor.make_shareable({1 => Requests}) #: Hash[::Integer, Attribute]
|
|
188
|
+
# @rbs return: ::Array[AttributeSets::IpMap]
|
|
189
|
+
# @return [Array<AttributeSets::IpMap>]
|
|
190
|
+
# @see Requests
|
|
191
|
+
def requests; self[:"requests"].map(&:value); end
|
|
104
192
|
class << self
|
|
105
193
|
# Looks up Attribute class by name.
|
|
106
|
-
#--
|
|
107
194
|
# @rbs name: Symbol
|
|
108
195
|
# @rbs return: Attribute
|
|
196
|
+
# @param [Symbol] name
|
|
197
|
+
# @return [Attribute]
|
|
109
198
|
def by_name(name); BY_NAME.fetch(name); end
|
|
110
199
|
# Looks up Attribute class by type value.
|
|
111
|
-
#--
|
|
112
200
|
# @rbs type: Integer
|
|
113
201
|
# @rbs return: Attribute
|
|
202
|
+
# @param [Integer] type
|
|
203
|
+
# @return [Attribute]
|
|
114
204
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
115
205
|
end
|
|
116
206
|
end
|
|
117
|
-
class UnixGid < ::Nl::
|
|
207
|
+
class UnixGid < ::Nl::AttributeSet
|
|
118
208
|
# Abstract class
|
|
119
|
-
class Attribute < ::Nl::
|
|
209
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
120
210
|
end
|
|
121
211
|
class Seqno < Attribute
|
|
122
212
|
TYPE = 1
|
|
123
213
|
NAME = :"seqno"
|
|
124
|
-
|
|
214
|
+
# @private
|
|
215
|
+
ORDER = 0
|
|
216
|
+
# @private
|
|
217
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
125
218
|
end
|
|
126
219
|
class Uid < Attribute
|
|
127
220
|
TYPE = 2
|
|
128
221
|
NAME = :"uid"
|
|
129
|
-
|
|
222
|
+
# @private
|
|
223
|
+
ORDER = 1
|
|
224
|
+
# @private
|
|
225
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
130
226
|
end
|
|
131
227
|
class Gids < Attribute
|
|
132
228
|
TYPE = 3
|
|
133
229
|
NAME = :"gids"
|
|
134
|
-
|
|
230
|
+
# @private
|
|
231
|
+
MULTI = true
|
|
232
|
+
# @private
|
|
233
|
+
ORDER = 2
|
|
234
|
+
# @private
|
|
235
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
135
236
|
end
|
|
136
237
|
class Negative < Attribute
|
|
137
238
|
TYPE = 4
|
|
138
239
|
NAME = :"negative"
|
|
139
|
-
|
|
240
|
+
# @private
|
|
241
|
+
ORDER = 3
|
|
242
|
+
# @private
|
|
243
|
+
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
140
244
|
end
|
|
141
245
|
class Expiry < Attribute
|
|
142
246
|
TYPE = 5
|
|
143
247
|
NAME = :"expiry"
|
|
144
|
-
|
|
248
|
+
# @private
|
|
249
|
+
ORDER = 4
|
|
250
|
+
# @private
|
|
251
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
145
252
|
end
|
|
146
|
-
#
|
|
253
|
+
# @private
|
|
147
254
|
BY_NAME = Ractor.make_shareable({:"seqno" => Seqno, :"uid" => Uid, :"gids" => Gids, :"negative" => Negative, :"expiry" => Expiry}) #: Hash[::Symbol, Attribute]
|
|
148
|
-
#
|
|
255
|
+
# @private
|
|
149
256
|
BY_TYPE = Ractor.make_shareable({1 => Seqno, 2 => Uid, 3 => Gids, 4 => Negative, 5 => Expiry}) #: Hash[::Integer, Attribute]
|
|
257
|
+
# @rbs return: ::Integer
|
|
258
|
+
# @return [Integer]
|
|
259
|
+
# @see Seqno
|
|
260
|
+
def seqno; self[:"seqno"]&.value; end
|
|
261
|
+
# @rbs return: ::Integer
|
|
262
|
+
# @return [Integer]
|
|
263
|
+
# @see Uid
|
|
264
|
+
def uid; self[:"uid"]&.value; end
|
|
265
|
+
# @rbs return: ::Array[::Integer]
|
|
266
|
+
# @return [Array<Integer>]
|
|
267
|
+
# @see Gids
|
|
268
|
+
def gids; self[:"gids"].map(&:value); end
|
|
269
|
+
# @rbs return: ::Integer
|
|
270
|
+
# @return [Integer]
|
|
271
|
+
# @see Negative
|
|
272
|
+
def negative; self[:"negative"]&.value; end
|
|
273
|
+
# @rbs return: ::Integer
|
|
274
|
+
# @return [Integer]
|
|
275
|
+
# @see Expiry
|
|
276
|
+
def expiry; self[:"expiry"]&.value; end
|
|
150
277
|
class << self
|
|
151
278
|
# Looks up Attribute class by name.
|
|
152
|
-
#--
|
|
153
279
|
# @rbs name: Symbol
|
|
154
280
|
# @rbs return: Attribute
|
|
281
|
+
# @param [Symbol] name
|
|
282
|
+
# @return [Attribute]
|
|
155
283
|
def by_name(name); BY_NAME.fetch(name); end
|
|
156
284
|
# Looks up Attribute class by type value.
|
|
157
|
-
#--
|
|
158
285
|
# @rbs type: Integer
|
|
159
286
|
# @rbs return: Attribute
|
|
287
|
+
# @param [Integer] type
|
|
288
|
+
# @return [Attribute]
|
|
160
289
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
161
290
|
end
|
|
162
291
|
end
|
|
163
|
-
class UnixGidReqs < ::Nl::
|
|
292
|
+
class UnixGidReqs < ::Nl::AttributeSet
|
|
164
293
|
# Abstract class
|
|
165
|
-
class Attribute < ::Nl::
|
|
294
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
166
295
|
end
|
|
167
296
|
class Requests < Attribute
|
|
168
297
|
TYPE = 1
|
|
169
298
|
NAME = :"requests"
|
|
299
|
+
# @private
|
|
300
|
+
MULTI = true
|
|
301
|
+
# @private
|
|
302
|
+
ORDER = 0
|
|
170
303
|
end
|
|
171
|
-
#
|
|
304
|
+
# @private
|
|
172
305
|
BY_NAME = Ractor.make_shareable({:"requests" => Requests}) #: Hash[::Symbol, Attribute]
|
|
173
|
-
#
|
|
306
|
+
# @private
|
|
174
307
|
BY_TYPE = Ractor.make_shareable({1 => Requests}) #: Hash[::Integer, Attribute]
|
|
308
|
+
# @rbs return: ::Array[AttributeSets::UnixGid]
|
|
309
|
+
# @return [Array<AttributeSets::UnixGid>]
|
|
310
|
+
# @see Requests
|
|
311
|
+
def requests; self[:"requests"].map(&:value); end
|
|
175
312
|
class << self
|
|
176
313
|
# Looks up Attribute class by name.
|
|
177
|
-
#--
|
|
178
314
|
# @rbs name: Symbol
|
|
179
315
|
# @rbs return: Attribute
|
|
316
|
+
# @param [Symbol] name
|
|
317
|
+
# @return [Attribute]
|
|
180
318
|
def by_name(name); BY_NAME.fetch(name); end
|
|
181
319
|
# Looks up Attribute class by type value.
|
|
182
|
-
#--
|
|
183
320
|
# @rbs type: Integer
|
|
184
321
|
# @rbs return: Attribute
|
|
322
|
+
# @param [Integer] type
|
|
323
|
+
# @return [Attribute]
|
|
185
324
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
186
325
|
end
|
|
187
326
|
end
|
|
188
|
-
class CacheFlush < ::Nl::
|
|
327
|
+
class CacheFlush < ::Nl::AttributeSet
|
|
189
328
|
# Abstract class
|
|
190
|
-
class Attribute < ::Nl::
|
|
329
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
191
330
|
end
|
|
331
|
+
# Known flags are defined in {Flags::CacheType}.
|
|
192
332
|
class Mask < Attribute
|
|
193
333
|
TYPE = 1
|
|
194
334
|
NAME = :"mask"
|
|
195
|
-
|
|
335
|
+
# @private
|
|
336
|
+
ORDER = 0
|
|
337
|
+
# @private
|
|
338
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
196
339
|
end
|
|
197
|
-
#
|
|
340
|
+
# @private
|
|
198
341
|
BY_NAME = Ractor.make_shareable({:"mask" => Mask}) #: Hash[::Symbol, Attribute]
|
|
199
|
-
#
|
|
342
|
+
# @private
|
|
200
343
|
BY_TYPE = Ractor.make_shareable({1 => Mask}) #: Hash[::Integer, Attribute]
|
|
344
|
+
# Known flags are defined in {Flags::CacheType}.
|
|
345
|
+
# @rbs return: ::Integer
|
|
346
|
+
# @return [Integer]
|
|
347
|
+
# @see Mask
|
|
348
|
+
def mask; self[:"mask"]&.value; end
|
|
201
349
|
class << self
|
|
202
350
|
# Looks up Attribute class by name.
|
|
203
|
-
#--
|
|
204
351
|
# @rbs name: Symbol
|
|
205
352
|
# @rbs return: Attribute
|
|
353
|
+
# @param [Symbol] name
|
|
354
|
+
# @return [Attribute]
|
|
206
355
|
def by_name(name); BY_NAME.fetch(name); end
|
|
207
356
|
# Looks up Attribute class by type value.
|
|
208
|
-
#--
|
|
209
357
|
# @rbs type: Integer
|
|
210
358
|
# @rbs return: Attribute
|
|
359
|
+
# @param [Integer] type
|
|
360
|
+
# @return [Attribute]
|
|
211
361
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
212
362
|
end
|
|
213
363
|
end
|
|
214
|
-
|
|
215
|
-
|
|
364
|
+
# @private
|
|
365
|
+
IpMapReqs::Requests::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::IpMap, selector_bindings: Ractor.make_shareable([]))
|
|
366
|
+
# @private
|
|
367
|
+
UnixGidReqs::Requests::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::UnixGid, selector_bindings: Ractor.make_shareable([]))
|
|
216
368
|
end
|
|
217
369
|
module Messages
|
|
218
370
|
# Dump all pending ip_map requests
|
|
219
|
-
|
|
371
|
+
#
|
|
372
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
373
|
+
class DumpIpMapGetReqsRequest < ::Nl::Genl::Message
|
|
374
|
+
TYPE = 2
|
|
375
|
+
FIXED_HEADER = nil
|
|
376
|
+
ATTRIBUTE_SET = AttributeSets::IpMapReqs
|
|
377
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
378
|
+
end
|
|
379
|
+
# Dump all pending ip_map requests
|
|
380
|
+
#
|
|
381
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
382
|
+
class DumpIpMapGetReqsReply < ::Nl::Genl::Message
|
|
220
383
|
TYPE = 2
|
|
221
384
|
FIXED_HEADER = nil
|
|
222
385
|
ATTRIBUTE_SET = AttributeSets::IpMapReqs
|
|
223
386
|
ATTRIBUTES = Ractor.make_shareable(%i[requests])
|
|
224
|
-
#
|
|
225
|
-
|
|
226
|
-
# @
|
|
227
|
-
def requests; attributes[:"requests"]
|
|
387
|
+
# @rbs return: ::Array[AttributeSets::IpMap]
|
|
388
|
+
# @return [Array<AttributeSets::IpMap>]
|
|
389
|
+
# @see AttributeSets::IpMapReqs::Requests
|
|
390
|
+
def requests; attributes[:"requests"].map(&:value); end
|
|
228
391
|
end
|
|
229
392
|
# Respond to one or more ip_map requests
|
|
230
|
-
|
|
393
|
+
#
|
|
394
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
395
|
+
class DoIpMapSetReqsRequest < ::Nl::Genl::Message
|
|
231
396
|
TYPE = 3
|
|
232
397
|
FIXED_HEADER = nil
|
|
233
398
|
ATTRIBUTE_SET = AttributeSets::IpMapReqs
|
|
234
399
|
ATTRIBUTES = Ractor.make_shareable(%i[requests])
|
|
235
|
-
#
|
|
236
|
-
|
|
237
|
-
# @
|
|
238
|
-
def requests; attributes[:"requests"]
|
|
400
|
+
# @rbs return: ::Array[AttributeSets::IpMap]
|
|
401
|
+
# @return [Array<AttributeSets::IpMap>]
|
|
402
|
+
# @see AttributeSets::IpMapReqs::Requests
|
|
403
|
+
def requests; attributes[:"requests"].map(&:value); end
|
|
239
404
|
end
|
|
240
405
|
# Dump all pending unix_gid requests
|
|
241
|
-
|
|
406
|
+
#
|
|
407
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
408
|
+
class DumpUnixGidGetReqsRequest < ::Nl::Genl::Message
|
|
409
|
+
TYPE = 4
|
|
410
|
+
FIXED_HEADER = nil
|
|
411
|
+
ATTRIBUTE_SET = AttributeSets::UnixGidReqs
|
|
412
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
413
|
+
end
|
|
414
|
+
# Dump all pending unix_gid requests
|
|
415
|
+
#
|
|
416
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
417
|
+
class DumpUnixGidGetReqsReply < ::Nl::Genl::Message
|
|
242
418
|
TYPE = 4
|
|
243
419
|
FIXED_HEADER = nil
|
|
244
420
|
ATTRIBUTE_SET = AttributeSets::UnixGidReqs
|
|
245
421
|
ATTRIBUTES = Ractor.make_shareable(%i[requests])
|
|
246
|
-
#
|
|
247
|
-
|
|
248
|
-
# @
|
|
249
|
-
def requests; attributes[:"requests"]
|
|
422
|
+
# @rbs return: ::Array[AttributeSets::UnixGid]
|
|
423
|
+
# @return [Array<AttributeSets::UnixGid>]
|
|
424
|
+
# @see AttributeSets::UnixGidReqs::Requests
|
|
425
|
+
def requests; attributes[:"requests"].map(&:value); end
|
|
250
426
|
end
|
|
251
427
|
# Respond to one or more unix_gid requests
|
|
252
|
-
|
|
428
|
+
#
|
|
429
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
430
|
+
class DoUnixGidSetReqsRequest < ::Nl::Genl::Message
|
|
253
431
|
TYPE = 5
|
|
254
432
|
FIXED_HEADER = nil
|
|
255
433
|
ATTRIBUTE_SET = AttributeSets::UnixGidReqs
|
|
256
434
|
ATTRIBUTES = Ractor.make_shareable(%i[requests])
|
|
257
|
-
#
|
|
258
|
-
|
|
259
|
-
# @
|
|
260
|
-
def requests; attributes[:"requests"]
|
|
435
|
+
# @rbs return: ::Array[AttributeSets::UnixGid]
|
|
436
|
+
# @return [Array<AttributeSets::UnixGid>]
|
|
437
|
+
# @see AttributeSets::UnixGidReqs::Requests
|
|
438
|
+
def requests; attributes[:"requests"].map(&:value); end
|
|
261
439
|
end
|
|
262
440
|
# Flush sunrpc caches (ip_map and/or unix_gid)
|
|
263
|
-
|
|
441
|
+
#
|
|
442
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
443
|
+
class DoCacheFlushRequest < ::Nl::Genl::Message
|
|
264
444
|
TYPE = 6
|
|
265
445
|
FIXED_HEADER = nil
|
|
266
446
|
ATTRIBUTE_SET = AttributeSets::CacheFlush
|
|
267
447
|
ATTRIBUTES = Ractor.make_shareable(%i[mask])
|
|
268
|
-
#
|
|
269
|
-
#--
|
|
448
|
+
# Known flags are defined in {Flags::CacheType}.
|
|
270
449
|
# @rbs return: ::Integer
|
|
450
|
+
# @return [Integer]
|
|
451
|
+
# @see AttributeSets::CacheFlush::Mask
|
|
271
452
|
def mask; attributes[:"mask"]&.value; end
|
|
272
453
|
end
|
|
273
454
|
end
|
|
455
|
+
module Notifications
|
|
456
|
+
# Notification that there are cache requests that need servicing
|
|
457
|
+
#
|
|
458
|
+
# Multicast group: `exportd`.
|
|
459
|
+
class CacheNotify < ::Nl::Genl::Message
|
|
460
|
+
TYPE = 1
|
|
461
|
+
FIXED_HEADER = nil
|
|
462
|
+
ATTRIBUTE_SET = AttributeSets::CacheNotify
|
|
463
|
+
ATTRIBUTES = Ractor.make_shareable(%i[cache_type])
|
|
464
|
+
# Known flags are defined in {Flags::CacheType}.
|
|
465
|
+
# @rbs return: ::Integer
|
|
466
|
+
# @return [Integer]
|
|
467
|
+
# @see AttributeSets::CacheNotify::CacheType
|
|
468
|
+
def cache_type; attributes[:"cache_type"]&.value; end
|
|
469
|
+
end
|
|
470
|
+
end
|
|
471
|
+
# @private
|
|
472
|
+
NOTIFICATIONS = Ractor.make_shareable({1 => Notifications::CacheNotify}) #: Hash[::Integer, ::Class]
|
|
473
|
+
# Dump all pending ip_map requests
|
|
474
|
+
#
|
|
475
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
476
|
+
# @rbs () -> Array[Messages::DumpIpMapGetReqsReply]
|
|
477
|
+
# | () { (Messages::DumpIpMapGetReqsReply) -> void } -> void
|
|
478
|
+
# @overload dump_ip_map_get_reqs(**args)
|
|
479
|
+
# Returns an array when no block is given.
|
|
480
|
+
# @param [Hash] args
|
|
481
|
+
# @return [Array<Messages::DumpIpMapGetReqsReply>]
|
|
482
|
+
# @overload dump_ip_map_get_reqs(**args, &block)
|
|
483
|
+
# Yields each reply when a block is given.
|
|
484
|
+
# @param [Hash] args
|
|
485
|
+
# @yieldparam [Messages::DumpIpMapGetReqsReply] reply
|
|
486
|
+
# @return [void]
|
|
487
|
+
# @see Messages::DumpIpMapGetReqsRequest
|
|
488
|
+
def dump_ip_map_get_reqs(**args, &block)
|
|
489
|
+
exchange_message(:"dump", Messages::DumpIpMapGetReqsRequest, Messages::DumpIpMapGetReqsReply, args, &block)
|
|
490
|
+
end
|
|
274
491
|
# Respond to one or more ip_map requests
|
|
275
|
-
|
|
276
|
-
#
|
|
492
|
+
#
|
|
493
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
494
|
+
# @rbs (?requests: ::Array[(AttributeSets::IpMap | ::Hash[::Symbol, untyped])]) -> void
|
|
495
|
+
# @param [Hash] args
|
|
496
|
+
# @option args [Array<AttributeSets::IpMap, Hash<Symbol, Object>>] requests
|
|
497
|
+
# @return [void]
|
|
498
|
+
# @see Messages::DoIpMapSetReqsRequest
|
|
277
499
|
def do_ip_map_set_reqs(**args)
|
|
278
500
|
exchange_message(:"do", Messages::DoIpMapSetReqsRequest, nil, args)
|
|
279
501
|
end
|
|
502
|
+
# Dump all pending unix_gid requests
|
|
503
|
+
#
|
|
504
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
505
|
+
# @rbs () -> Array[Messages::DumpUnixGidGetReqsReply]
|
|
506
|
+
# | () { (Messages::DumpUnixGidGetReqsReply) -> void } -> void
|
|
507
|
+
# @overload dump_unix_gid_get_reqs(**args)
|
|
508
|
+
# Returns an array when no block is given.
|
|
509
|
+
# @param [Hash] args
|
|
510
|
+
# @return [Array<Messages::DumpUnixGidGetReqsReply>]
|
|
511
|
+
# @overload dump_unix_gid_get_reqs(**args, &block)
|
|
512
|
+
# Yields each reply when a block is given.
|
|
513
|
+
# @param [Hash] args
|
|
514
|
+
# @yieldparam [Messages::DumpUnixGidGetReqsReply] reply
|
|
515
|
+
# @return [void]
|
|
516
|
+
# @see Messages::DumpUnixGidGetReqsRequest
|
|
517
|
+
def dump_unix_gid_get_reqs(**args, &block)
|
|
518
|
+
exchange_message(:"dump", Messages::DumpUnixGidGetReqsRequest, Messages::DumpUnixGidGetReqsReply, args, &block)
|
|
519
|
+
end
|
|
280
520
|
# Respond to one or more unix_gid requests
|
|
281
|
-
|
|
282
|
-
#
|
|
521
|
+
#
|
|
522
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
523
|
+
# @rbs (?requests: ::Array[(AttributeSets::UnixGid | ::Hash[::Symbol, untyped])]) -> void
|
|
524
|
+
# @param [Hash] args
|
|
525
|
+
# @option args [Array<AttributeSets::UnixGid, Hash<Symbol, Object>>] requests
|
|
526
|
+
# @return [void]
|
|
527
|
+
# @see Messages::DoUnixGidSetReqsRequest
|
|
283
528
|
def do_unix_gid_set_reqs(**args)
|
|
284
529
|
exchange_message(:"do", Messages::DoUnixGidSetReqsRequest, nil, args)
|
|
285
530
|
end
|
|
286
531
|
# Flush sunrpc caches (ip_map and/or unix_gid)
|
|
287
|
-
|
|
532
|
+
#
|
|
533
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
288
534
|
# @rbs (?mask: ::Integer) -> void
|
|
535
|
+
# @param [Hash] args
|
|
536
|
+
# @option args [Integer] mask Known flags are defined in {Flags::CacheType}.
|
|
537
|
+
# @return [void]
|
|
538
|
+
# @see Messages::DoCacheFlushRequest
|
|
289
539
|
def do_cache_flush(**args)
|
|
290
540
|
exchange_message(:"do", Messages::DoCacheFlushRequest, nil, args)
|
|
291
541
|
end
|
|
542
|
+
class AsyncOperations
|
|
543
|
+
# @private
|
|
544
|
+
def initialize(&exchange)
|
|
545
|
+
@exchange = exchange
|
|
546
|
+
end
|
|
547
|
+
# Dump all pending ip_map requests
|
|
548
|
+
#
|
|
549
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
550
|
+
# @rbs () -> ::Nl::Async::Stream[Messages::DumpIpMapGetReqsReply]
|
|
551
|
+
# @param [Hash] args
|
|
552
|
+
# @return [Nl::Async::Stream<Messages::DumpIpMapGetReqsReply>]
|
|
553
|
+
# @see Messages::DumpIpMapGetReqsRequest
|
|
554
|
+
def dump_ip_map_get_reqs(**args)
|
|
555
|
+
@exchange.call(:"dump", Messages::DumpIpMapGetReqsRequest, Messages::DumpIpMapGetReqsReply, args)
|
|
556
|
+
end
|
|
557
|
+
# Respond to one or more ip_map requests
|
|
558
|
+
#
|
|
559
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
560
|
+
# @rbs (?requests: ::Array[(AttributeSets::IpMap | ::Hash[::Symbol, untyped])]) -> ::Nl::Async::Future[void]
|
|
561
|
+
# @param [Hash] args
|
|
562
|
+
# @option args [Array<AttributeSets::IpMap, Hash<Symbol, Object>>] requests
|
|
563
|
+
# @return [Nl::Async::Future<void>]
|
|
564
|
+
# @see Messages::DoIpMapSetReqsRequest
|
|
565
|
+
def do_ip_map_set_reqs(**args)
|
|
566
|
+
@exchange.call(:"do", Messages::DoIpMapSetReqsRequest, nil, args)
|
|
567
|
+
end
|
|
568
|
+
# Dump all pending unix_gid requests
|
|
569
|
+
#
|
|
570
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
571
|
+
# @rbs () -> ::Nl::Async::Stream[Messages::DumpUnixGidGetReqsReply]
|
|
572
|
+
# @param [Hash] args
|
|
573
|
+
# @return [Nl::Async::Stream<Messages::DumpUnixGidGetReqsReply>]
|
|
574
|
+
# @see Messages::DumpUnixGidGetReqsRequest
|
|
575
|
+
def dump_unix_gid_get_reqs(**args)
|
|
576
|
+
@exchange.call(:"dump", Messages::DumpUnixGidGetReqsRequest, Messages::DumpUnixGidGetReqsReply, args)
|
|
577
|
+
end
|
|
578
|
+
# Respond to one or more unix_gid requests
|
|
579
|
+
#
|
|
580
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
581
|
+
# @rbs (?requests: ::Array[(AttributeSets::UnixGid | ::Hash[::Symbol, untyped])]) -> ::Nl::Async::Future[void]
|
|
582
|
+
# @param [Hash] args
|
|
583
|
+
# @option args [Array<AttributeSets::UnixGid, Hash<Symbol, Object>>] requests
|
|
584
|
+
# @return [Nl::Async::Future<void>]
|
|
585
|
+
# @see Messages::DoUnixGidSetReqsRequest
|
|
586
|
+
def do_unix_gid_set_reqs(**args)
|
|
587
|
+
@exchange.call(:"do", Messages::DoUnixGidSetReqsRequest, nil, args)
|
|
588
|
+
end
|
|
589
|
+
# Flush sunrpc caches (ip_map and/or unix_gid)
|
|
590
|
+
#
|
|
591
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
592
|
+
# @rbs (?mask: ::Integer) -> ::Nl::Async::Future[void]
|
|
593
|
+
# @param [Hash] args
|
|
594
|
+
# @option args [Integer] mask Known flags are defined in {Flags::CacheType}.
|
|
595
|
+
# @return [Nl::Async::Future<void>]
|
|
596
|
+
# @see Messages::DoCacheFlushRequest
|
|
597
|
+
def do_cache_flush(**args)
|
|
598
|
+
@exchange.call(:"do", Messages::DoCacheFlushRequest, nil, args)
|
|
599
|
+
end
|
|
600
|
+
end
|
|
601
|
+
# Returns the asynchronous operation facade for this family.
|
|
602
|
+
# @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
|
|
603
|
+
# @param [::Integer, nil] stream_capacity
|
|
604
|
+
# @return [AsyncOperations]
|
|
605
|
+
def async(stream_capacity: nil)
|
|
606
|
+
return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
|
|
607
|
+
build_async_facade(AsyncOperations, stream_capacity:)
|
|
608
|
+
end
|
|
609
|
+
# @rbs (*(:none | :exportd) groups) -> self
|
|
610
|
+
# @param [Array<:none, :exportd>] groups
|
|
611
|
+
# @return [self]
|
|
612
|
+
def subscribe(*groups) = super
|
|
613
|
+
# @rbs (*(:none | :exportd) groups) -> self
|
|
614
|
+
# @param [Array<:none, :exportd>] groups
|
|
615
|
+
# @return [self]
|
|
616
|
+
def unsubscribe(*groups) = super
|
|
292
617
|
end
|
|
293
618
|
end; end
|