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