nl-linux 0.4.2 → 0.5.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/CHANGELOG.md +5 -0
- data/NLSPEC_VERSION +1 -1
- data/generated/nl/linux/binder.rb +103 -187
- data/generated/nl/linux/conntrack.rb +1053 -1649
- data/generated/nl/linux/dev_energymodel.rb +303 -265
- data/generated/nl/linux/devlink.rb +4904 -5576
- data/generated/nl/linux/dpll.rb +1097 -1467
- data/generated/nl/linux/drm_ras.rb +235 -195
- data/generated/nl/linux/ethtool.rb +6652 -7415
- data/generated/nl/linux/fou.rb +234 -255
- data/generated/nl/linux/handshake.rb +208 -280
- data/generated/nl/linux/lockd.rb +99 -73
- data/generated/nl/linux/mptcp_pm.rb +589 -687
- data/generated/nl/linux/net_shaper.rb +520 -615
- data/generated/nl/linux/netdev.rb +1640 -1987
- data/generated/nl/linux/nfsd.rb +1341 -1215
- data/generated/nl/linux/nftables.rb +5143 -4870
- data/generated/nl/linux/nl80211.rb +2542 -6316
- data/generated/nl/linux/nlctrl.rb +338 -483
- data/generated/nl/linux/ovpn.rb +1006 -1522
- data/generated/nl/linux/ovs_datapath.rb +291 -186
- data/generated/nl/linux/ovs_flow.rb +1393 -2065
- data/generated/nl/linux/ovs_packet.rb +186 -223
- data/generated/nl/linux/ovs_vport.rb +328 -285
- data/generated/nl/linux/psp.rb +812 -717
- data/generated/nl/linux/rt_addr.rb +513 -243
- data/generated/nl/linux/rt_link.rb +4504 -7238
- data/generated/nl/linux/rt_neigh.rb +935 -847
- data/generated/nl/linux/rt_route.rb +1198 -871
- data/generated/nl/linux/rt_rule.rb +680 -659
- data/generated/nl/linux/sunrpc_cache.rb +323 -321
- data/generated/nl/linux/tc.rb +9058 -10454
- data/generated/nl/linux/tcp_metrics.rb +258 -367
- data/generated/nl/linux/team.rb +327 -345
- data/generated/nl/linux/wireguard.rb +270 -434
- data/lib/nl/linux/nlctrl_resolver.rb +1 -1
- data/lib/nl/linux/version.rb +1 -1
- data/linux/conntrack.yaml +18 -3
- data/linux/devlink.yaml +26 -4
- data/linux/dpll.yaml +19 -0
- data/linux/netdev.yaml +21 -0
- data/linux/nfsd.yaml +111 -0
- data/linux/nl80211.yaml +2 -2
- data/linux/rt-addr.yaml +4 -0
- data/linux/rt-link.yaml +7 -0
- data/linux/rt-neigh.yaml +3 -0
- data/linux/rt-route.yaml +83 -2
- data/sig/generated/nl/linux/binder.rbs +77 -220
- data/sig/generated/nl/linux/conntrack.rbs +770 -1954
- data/sig/generated/nl/linux/dev_energymodel.rbs +207 -291
- data/sig/generated/nl/linux/devlink.rbs +3318 -6068
- data/sig/generated/nl/linux/dpll.rbs +791 -1589
- data/sig/generated/nl/linux/drm_ras.rbs +160 -208
- data/sig/generated/nl/linux/ethtool.rbs +4205 -7581
- data/sig/generated/nl/linux/fou.rbs +139 -254
- data/sig/generated/nl/linux/handshake.rbs +144 -319
- data/sig/generated/nl/linux/lockd.rbs +64 -74
- data/sig/generated/nl/linux/mptcp_pm.rbs +426 -835
- data/sig/generated/nl/linux/net_shaper.rbs +351 -644
- data/sig/generated/nl/linux/netdev.rbs +1151 -2146
- data/sig/generated/nl/linux/nfsd.rbs +1047 -1409
- data/sig/generated/nl/linux/nftables.rbs +2907 -5030
- data/sig/generated/nl/linux/nl80211.rbs +1807 -7964
- data/sig/generated/nl/linux/nlctrl.rbs +220 -544
- data/sig/generated/nl/linux/ovpn.rbs +835 -1859
- data/sig/generated/nl/linux/ovs_datapath.rbs +141 -181
- data/sig/generated/nl/linux/ovs_flow.rbs +817 -2332
- data/sig/generated/nl/linux/ovs_packet.rbs +110 -237
- data/sig/generated/nl/linux/ovs_vport.rbs +174 -294
- data/sig/generated/nl/linux/psp.rbs +550 -741
- data/sig/generated/nl/linux/rt_addr.rbs +188 -226
- data/sig/generated/nl/linux/rt_link.rbs +2687 -8370
- data/sig/generated/nl/linux/rt_neigh.rbs +471 -1005
- data/sig/generated/nl/linux/rt_route.rbs +632 -862
- data/sig/generated/nl/linux/rt_rule.rbs +217 -639
- data/sig/generated/nl/linux/sunrpc_cache.rbs +233 -369
- data/sig/generated/nl/linux/tc.rbs +6199 -13391
- data/sig/generated/nl/linux/tcp_metrics.rbs +179 -421
- data/sig/generated/nl/linux/team.rbs +232 -391
- data/sig/generated/nl/linux/wireguard.rbs +197 -502
- metadata +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
|
2
2
|
#
|
|
3
|
-
# This file is based on Documentation/netlink/specs/sunrpc_cache.yaml from Linux v7.
|
|
3
|
+
# This file is based on Documentation/netlink/specs/sunrpc_cache.yaml from Linux v7.3.
|
|
4
4
|
#--
|
|
5
5
|
# frozen_string_literal: true
|
|
6
6
|
# This code is generated by Ynl::Generator. DO NOT EDIT.
|
|
@@ -27,7 +27,7 @@ class Sunrpc < ::Nl::Genl::Family
|
|
|
27
27
|
super
|
|
28
28
|
end
|
|
29
29
|
# @private
|
|
30
|
-
MCAST_GROUPS =
|
|
30
|
+
MCAST_GROUPS = {:"none" => ::Nl::McastGroup.new("none", nil), :"exportd" => ::Nl::McastGroup.new("exportd", nil)}.freeze #: Hash[::Symbol, ::Nl::McastGroup]
|
|
31
31
|
module Flags
|
|
32
32
|
module CacheType
|
|
33
33
|
IpMap = 1
|
|
@@ -38,438 +38,440 @@ class Sunrpc < ::Nl::Genl::Family
|
|
|
38
38
|
end
|
|
39
39
|
module AttributeSets
|
|
40
40
|
class CacheNotify < ::Nl::AttributeSet
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
module Definitions
|
|
42
|
+
# Known flags are defined in {Flags::CacheType}.
|
|
43
|
+
# @rbs return: ::Integer
|
|
44
|
+
# @return [Integer]
|
|
45
|
+
def cache_type; self[:"cache_type"]; end
|
|
43
46
|
end
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
ORDER = 0
|
|
50
|
-
# @private
|
|
51
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
52
|
-
end
|
|
53
|
-
# @private
|
|
54
|
-
BY_NAME = Ractor.make_shareable({:"cache_type" => CacheType}) #: Hash[::Symbol, Attribute]
|
|
55
|
-
# @private
|
|
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
|
|
62
|
-
class << self
|
|
63
|
-
# Looks up Attribute class by name.
|
|
64
|
-
# @rbs name: Symbol
|
|
65
|
-
# @rbs return: Attribute
|
|
66
|
-
# @param [Symbol] name
|
|
67
|
-
# @return [Attribute]
|
|
68
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
69
|
-
# Looks up Attribute class by type value.
|
|
70
|
-
# @rbs type: Integer
|
|
71
|
-
# @rbs return: Attribute
|
|
72
|
-
# @param [Integer] type
|
|
73
|
-
# @return [Attribute]
|
|
74
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
47
|
+
include Definitions
|
|
48
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
49
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
50
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
51
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
75
52
|
end
|
|
76
53
|
end
|
|
77
54
|
class IpMap < ::Nl::AttributeSet
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
# @
|
|
87
|
-
|
|
55
|
+
module Definitions
|
|
56
|
+
# @rbs return: ::Integer
|
|
57
|
+
# @return [Integer]
|
|
58
|
+
def seqno; self[:"seqno"]; end
|
|
59
|
+
# @rbs return: ::String
|
|
60
|
+
# @return [String]
|
|
61
|
+
def class; self[:"class"]; end
|
|
62
|
+
# @rbs return: ::String
|
|
63
|
+
# @return [String]
|
|
64
|
+
def addr; self[:"addr"]; end
|
|
65
|
+
# @rbs return: ::String
|
|
66
|
+
# @return [String]
|
|
67
|
+
def domain; self[:"domain"]; end
|
|
68
|
+
# @rbs return: ::Integer
|
|
69
|
+
# @return [Integer]
|
|
70
|
+
def negative; self[:"negative"]; end
|
|
71
|
+
# @rbs return: ::Integer
|
|
72
|
+
# @return [Integer]
|
|
73
|
+
def expiry; self[:"expiry"]; end
|
|
88
74
|
end
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
# @private
|
|
95
|
-
DATATYPE = ::Nl::DataTypes::String.new(check: nil)
|
|
75
|
+
include Definitions
|
|
76
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
77
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
78
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
79
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
96
80
|
end
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
# @
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
DATATYPE = ::Nl::DataTypes::String.new(check: nil)
|
|
104
|
-
end
|
|
105
|
-
class Domain < Attribute
|
|
106
|
-
TYPE = 4
|
|
107
|
-
NAME = :"domain"
|
|
108
|
-
# @private
|
|
109
|
-
ORDER = 3
|
|
110
|
-
# @private
|
|
111
|
-
DATATYPE = ::Nl::DataTypes::String.new(check: nil)
|
|
81
|
+
end
|
|
82
|
+
class IpMapReqs < ::Nl::AttributeSet
|
|
83
|
+
module Definitions
|
|
84
|
+
# @rbs return: ::Array[AttributeSets::IpMap]
|
|
85
|
+
# @return [Array<AttributeSets::IpMap>]
|
|
86
|
+
def requests; self[:"requests"]; end
|
|
112
87
|
end
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
# @private
|
|
119
|
-
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
88
|
+
include Definitions
|
|
89
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
90
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
91
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
92
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
120
93
|
end
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
# @
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
94
|
+
end
|
|
95
|
+
class UnixGid < ::Nl::AttributeSet
|
|
96
|
+
module Definitions
|
|
97
|
+
# @rbs return: ::Integer
|
|
98
|
+
# @return [Integer]
|
|
99
|
+
def seqno; self[:"seqno"]; end
|
|
100
|
+
# @rbs return: ::Integer
|
|
101
|
+
# @return [Integer]
|
|
102
|
+
def uid; self[:"uid"]; end
|
|
103
|
+
# @rbs return: ::Array[::Integer]
|
|
104
|
+
# @return [Array<Integer>]
|
|
105
|
+
def gids; self[:"gids"]; end
|
|
106
|
+
# @rbs return: ::Integer
|
|
107
|
+
# @return [Integer]
|
|
108
|
+
def negative; self[:"negative"]; end
|
|
109
|
+
# @rbs return: ::Integer
|
|
110
|
+
# @return [Integer]
|
|
111
|
+
def expiry; self[:"expiry"]; end
|
|
128
112
|
end
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
# @
|
|
132
|
-
|
|
133
|
-
|
|
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
|
|
157
|
-
class << self
|
|
158
|
-
# Looks up Attribute class by name.
|
|
159
|
-
# @rbs name: Symbol
|
|
160
|
-
# @rbs return: Attribute
|
|
161
|
-
# @param [Symbol] name
|
|
162
|
-
# @return [Attribute]
|
|
163
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
164
|
-
# Looks up Attribute class by type value.
|
|
165
|
-
# @rbs type: Integer
|
|
166
|
-
# @rbs return: Attribute
|
|
167
|
-
# @param [Integer] type
|
|
168
|
-
# @return [Attribute]
|
|
169
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
113
|
+
include Definitions
|
|
114
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
115
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
116
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
117
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
170
118
|
end
|
|
171
119
|
end
|
|
172
|
-
class
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
TYPE = 1
|
|
178
|
-
NAME = :"requests"
|
|
179
|
-
# @private
|
|
180
|
-
MULTI = true
|
|
181
|
-
# @private
|
|
182
|
-
ORDER = 0
|
|
120
|
+
class UnixGidReqs < ::Nl::AttributeSet
|
|
121
|
+
module Definitions
|
|
122
|
+
# @rbs return: ::Array[AttributeSets::UnixGid]
|
|
123
|
+
# @return [Array<AttributeSets::UnixGid>]
|
|
124
|
+
def requests; self[:"requests"]; end
|
|
183
125
|
end
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
# @
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
# @return [Array<AttributeSets::IpMap>]
|
|
190
|
-
# @see Requests
|
|
191
|
-
def requests; self[:"requests"].map(&:value); end
|
|
192
|
-
class << self
|
|
193
|
-
# Looks up Attribute class by name.
|
|
194
|
-
# @rbs name: Symbol
|
|
195
|
-
# @rbs return: Attribute
|
|
196
|
-
# @param [Symbol] name
|
|
197
|
-
# @return [Attribute]
|
|
198
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
199
|
-
# Looks up Attribute class by type value.
|
|
200
|
-
# @rbs type: Integer
|
|
201
|
-
# @rbs return: Attribute
|
|
202
|
-
# @param [Integer] type
|
|
203
|
-
# @return [Attribute]
|
|
204
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
126
|
+
include Definitions
|
|
127
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
128
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
129
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
130
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
205
131
|
end
|
|
206
132
|
end
|
|
207
|
-
class
|
|
208
|
-
|
|
209
|
-
|
|
133
|
+
class CacheFlush < ::Nl::AttributeSet
|
|
134
|
+
module Definitions
|
|
135
|
+
# Known flags are defined in {Flags::CacheType}.
|
|
136
|
+
# @rbs return: ::Integer
|
|
137
|
+
# @return [Integer]
|
|
138
|
+
def mask; self[:"mask"]; end
|
|
210
139
|
end
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
# @private
|
|
217
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
140
|
+
include Definitions
|
|
141
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
142
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
143
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
144
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
218
145
|
end
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
module AttributeSets
|
|
149
|
+
class CacheNotify
|
|
150
|
+
module Definitions
|
|
222
151
|
# @private
|
|
223
|
-
|
|
152
|
+
BY_TYPE = ::Array.new(2).tap do |definitions|
|
|
153
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"cache_type", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 0, selector_slot: nil)
|
|
154
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
155
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
224
156
|
# @private
|
|
225
|
-
|
|
157
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
226
158
|
end
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
# @private
|
|
231
|
-
MULTI = true
|
|
159
|
+
end
|
|
160
|
+
class IpMap
|
|
161
|
+
module Definitions
|
|
232
162
|
# @private
|
|
233
|
-
|
|
163
|
+
BY_TYPE = ::Array.new(7).tap do |definitions|
|
|
164
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"seqno", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U64].new, multi: false, order: 0, selector_slot: nil)
|
|
165
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"class", datatype: ::Nl::DataTypes::String.new, multi: false, order: 1, selector_slot: nil)
|
|
166
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"addr", datatype: ::Nl::DataTypes::String.new, multi: false, order: 2, selector_slot: nil)
|
|
167
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"domain", datatype: ::Nl::DataTypes::String.new, multi: false, order: 3, selector_slot: nil)
|
|
168
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"negative", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 4, selector_slot: nil)
|
|
169
|
+
definitions[6] = ::Nl::AttributeSet::Definition.new(id: 6, name: :"expiry", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U64].new, multi: false, order: 5, selector_slot: nil)
|
|
170
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
171
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
234
172
|
# @private
|
|
235
|
-
|
|
173
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
236
174
|
end
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
175
|
+
end
|
|
176
|
+
class IpMapReqs
|
|
177
|
+
module Definitions
|
|
240
178
|
# @private
|
|
241
|
-
|
|
179
|
+
BY_TYPE = ::Array.new(2).tap do |definitions|
|
|
180
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"requests", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::IpMap, selector_bindings: []), multi: true, order: 0, selector_slot: nil)
|
|
181
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
182
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
242
183
|
# @private
|
|
243
|
-
|
|
184
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
244
185
|
end
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
186
|
+
end
|
|
187
|
+
class UnixGid
|
|
188
|
+
module Definitions
|
|
248
189
|
# @private
|
|
249
|
-
|
|
190
|
+
BY_TYPE = ::Array.new(6).tap do |definitions|
|
|
191
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"seqno", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U64].new, multi: false, order: 0, selector_slot: nil)
|
|
192
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"uid", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 1, selector_slot: nil)
|
|
193
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"gids", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: true, order: 2, selector_slot: nil)
|
|
194
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"negative", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 3, selector_slot: nil)
|
|
195
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"expiry", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U64].new, multi: false, order: 4, selector_slot: nil)
|
|
196
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
197
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
250
198
|
# @private
|
|
251
|
-
|
|
252
|
-
end
|
|
253
|
-
# @private
|
|
254
|
-
BY_NAME = Ractor.make_shareable({:"seqno" => Seqno, :"uid" => Uid, :"gids" => Gids, :"negative" => Negative, :"expiry" => Expiry}) #: Hash[::Symbol, Attribute]
|
|
255
|
-
# @private
|
|
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
|
|
277
|
-
class << self
|
|
278
|
-
# Looks up Attribute class by name.
|
|
279
|
-
# @rbs name: Symbol
|
|
280
|
-
# @rbs return: Attribute
|
|
281
|
-
# @param [Symbol] name
|
|
282
|
-
# @return [Attribute]
|
|
283
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
284
|
-
# Looks up Attribute class by type value.
|
|
285
|
-
# @rbs type: Integer
|
|
286
|
-
# @rbs return: Attribute
|
|
287
|
-
# @param [Integer] type
|
|
288
|
-
# @return [Attribute]
|
|
289
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
199
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
290
200
|
end
|
|
291
201
|
end
|
|
292
|
-
class UnixGidReqs
|
|
293
|
-
|
|
294
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
295
|
-
end
|
|
296
|
-
class Requests < Attribute
|
|
297
|
-
TYPE = 1
|
|
298
|
-
NAME = :"requests"
|
|
202
|
+
class UnixGidReqs
|
|
203
|
+
module Definitions
|
|
299
204
|
# @private
|
|
300
|
-
|
|
205
|
+
BY_TYPE = ::Array.new(2).tap do |definitions|
|
|
206
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"requests", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::UnixGid, selector_bindings: []), multi: true, order: 0, selector_slot: nil)
|
|
207
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
208
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
301
209
|
# @private
|
|
302
|
-
|
|
303
|
-
end
|
|
304
|
-
# @private
|
|
305
|
-
BY_NAME = Ractor.make_shareable({:"requests" => Requests}) #: Hash[::Symbol, Attribute]
|
|
306
|
-
# @private
|
|
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
|
|
312
|
-
class << self
|
|
313
|
-
# Looks up Attribute class by name.
|
|
314
|
-
# @rbs name: Symbol
|
|
315
|
-
# @rbs return: Attribute
|
|
316
|
-
# @param [Symbol] name
|
|
317
|
-
# @return [Attribute]
|
|
318
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
319
|
-
# Looks up Attribute class by type value.
|
|
320
|
-
# @rbs type: Integer
|
|
321
|
-
# @rbs return: Attribute
|
|
322
|
-
# @param [Integer] type
|
|
323
|
-
# @return [Attribute]
|
|
324
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
210
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
325
211
|
end
|
|
326
212
|
end
|
|
327
|
-
class CacheFlush
|
|
328
|
-
|
|
329
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
330
|
-
end
|
|
331
|
-
# Known flags are defined in {Flags::CacheType}.
|
|
332
|
-
class Mask < Attribute
|
|
333
|
-
TYPE = 1
|
|
334
|
-
NAME = :"mask"
|
|
213
|
+
class CacheFlush
|
|
214
|
+
module Definitions
|
|
335
215
|
# @private
|
|
336
|
-
|
|
216
|
+
BY_TYPE = ::Array.new(2).tap do |definitions|
|
|
217
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"mask", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 0, selector_slot: nil)
|
|
218
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
219
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
337
220
|
# @private
|
|
338
|
-
|
|
339
|
-
end
|
|
340
|
-
# @private
|
|
341
|
-
BY_NAME = Ractor.make_shareable({:"mask" => Mask}) #: Hash[::Symbol, Attribute]
|
|
342
|
-
# @private
|
|
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
|
|
349
|
-
class << self
|
|
350
|
-
# Looks up Attribute class by name.
|
|
351
|
-
# @rbs name: Symbol
|
|
352
|
-
# @rbs return: Attribute
|
|
353
|
-
# @param [Symbol] name
|
|
354
|
-
# @return [Attribute]
|
|
355
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
356
|
-
# Looks up Attribute class by type value.
|
|
357
|
-
# @rbs type: Integer
|
|
358
|
-
# @rbs return: Attribute
|
|
359
|
-
# @param [Integer] type
|
|
360
|
-
# @return [Attribute]
|
|
361
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
221
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
362
222
|
end
|
|
363
223
|
end
|
|
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([]))
|
|
368
224
|
end
|
|
369
225
|
module Messages
|
|
370
226
|
# Dump all pending ip_map requests
|
|
371
227
|
#
|
|
372
228
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
373
|
-
class DumpIpMapGetReqsRequest < ::Nl::
|
|
229
|
+
class DumpIpMapGetReqsRequest < ::Nl::Message
|
|
374
230
|
TYPE = 2
|
|
375
231
|
FIXED_HEADER = nil
|
|
376
232
|
ATTRIBUTE_SET = AttributeSets::IpMapReqs
|
|
377
|
-
ATTRIBUTES =
|
|
233
|
+
ATTRIBUTES = %i[].freeze
|
|
234
|
+
include ATTRIBUTE_SET::Definitions
|
|
235
|
+
def initialize(attributes = [])
|
|
236
|
+
@attributes = attributes
|
|
237
|
+
end
|
|
238
|
+
# @private
|
|
239
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
240
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
241
|
+
new(
|
|
242
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
243
|
+
)
|
|
244
|
+
end
|
|
245
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
246
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
247
|
+
def self.decode(decoder)
|
|
248
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
249
|
+
end
|
|
250
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
251
|
+
encode_attributes(encoder, external_selectors:)
|
|
252
|
+
end
|
|
378
253
|
end
|
|
379
254
|
# Dump all pending ip_map requests
|
|
380
255
|
#
|
|
381
256
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
382
|
-
class DumpIpMapGetReqsReply < ::Nl::
|
|
257
|
+
class DumpIpMapGetReqsReply < ::Nl::Message
|
|
383
258
|
TYPE = 2
|
|
384
259
|
FIXED_HEADER = nil
|
|
385
260
|
ATTRIBUTE_SET = AttributeSets::IpMapReqs
|
|
386
|
-
ATTRIBUTES =
|
|
261
|
+
ATTRIBUTES = %i[requests].freeze
|
|
262
|
+
include ATTRIBUTE_SET::Definitions
|
|
263
|
+
def initialize(attributes = [])
|
|
264
|
+
@attributes = attributes
|
|
265
|
+
end
|
|
266
|
+
# @private
|
|
267
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
268
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
269
|
+
new(
|
|
270
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
271
|
+
)
|
|
272
|
+
end
|
|
273
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
274
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
275
|
+
def self.decode(decoder)
|
|
276
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
277
|
+
end
|
|
278
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
279
|
+
encode_attributes(encoder, external_selectors:)
|
|
280
|
+
end
|
|
387
281
|
# @rbs return: ::Array[AttributeSets::IpMap]
|
|
388
282
|
# @return [Array<AttributeSets::IpMap>]
|
|
389
|
-
|
|
390
|
-
def requests; attributes[:"requests"].map(&:value); end
|
|
283
|
+
def requests; self[:"requests"]; end
|
|
391
284
|
end
|
|
392
285
|
# Respond to one or more ip_map requests
|
|
393
286
|
#
|
|
394
287
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
395
|
-
class DoIpMapSetReqsRequest < ::Nl::
|
|
288
|
+
class DoIpMapSetReqsRequest < ::Nl::Message
|
|
396
289
|
TYPE = 3
|
|
397
290
|
FIXED_HEADER = nil
|
|
398
291
|
ATTRIBUTE_SET = AttributeSets::IpMapReqs
|
|
399
|
-
ATTRIBUTES =
|
|
292
|
+
ATTRIBUTES = %i[requests].freeze
|
|
293
|
+
include ATTRIBUTE_SET::Definitions
|
|
294
|
+
def initialize(attributes = [])
|
|
295
|
+
@attributes = attributes
|
|
296
|
+
end
|
|
297
|
+
# @private
|
|
298
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
299
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
300
|
+
new(
|
|
301
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
302
|
+
)
|
|
303
|
+
end
|
|
304
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
305
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
306
|
+
def self.decode(decoder)
|
|
307
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
308
|
+
end
|
|
309
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
310
|
+
encode_attributes(encoder, external_selectors:)
|
|
311
|
+
end
|
|
400
312
|
# @rbs return: ::Array[AttributeSets::IpMap]
|
|
401
313
|
# @return [Array<AttributeSets::IpMap>]
|
|
402
|
-
|
|
403
|
-
def requests; attributes[:"requests"].map(&:value); end
|
|
314
|
+
def requests; self[:"requests"]; end
|
|
404
315
|
end
|
|
405
316
|
# Dump all pending unix_gid requests
|
|
406
317
|
#
|
|
407
318
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
408
|
-
class DumpUnixGidGetReqsRequest < ::Nl::
|
|
319
|
+
class DumpUnixGidGetReqsRequest < ::Nl::Message
|
|
409
320
|
TYPE = 4
|
|
410
321
|
FIXED_HEADER = nil
|
|
411
322
|
ATTRIBUTE_SET = AttributeSets::UnixGidReqs
|
|
412
|
-
ATTRIBUTES =
|
|
323
|
+
ATTRIBUTES = %i[].freeze
|
|
324
|
+
include ATTRIBUTE_SET::Definitions
|
|
325
|
+
def initialize(attributes = [])
|
|
326
|
+
@attributes = attributes
|
|
327
|
+
end
|
|
328
|
+
# @private
|
|
329
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
330
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
331
|
+
new(
|
|
332
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
333
|
+
)
|
|
334
|
+
end
|
|
335
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
336
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
337
|
+
def self.decode(decoder)
|
|
338
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
339
|
+
end
|
|
340
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
341
|
+
encode_attributes(encoder, external_selectors:)
|
|
342
|
+
end
|
|
413
343
|
end
|
|
414
344
|
# Dump all pending unix_gid requests
|
|
415
345
|
#
|
|
416
346
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
417
|
-
class DumpUnixGidGetReqsReply < ::Nl::
|
|
347
|
+
class DumpUnixGidGetReqsReply < ::Nl::Message
|
|
418
348
|
TYPE = 4
|
|
419
349
|
FIXED_HEADER = nil
|
|
420
350
|
ATTRIBUTE_SET = AttributeSets::UnixGidReqs
|
|
421
|
-
ATTRIBUTES =
|
|
351
|
+
ATTRIBUTES = %i[requests].freeze
|
|
352
|
+
include ATTRIBUTE_SET::Definitions
|
|
353
|
+
def initialize(attributes = [])
|
|
354
|
+
@attributes = attributes
|
|
355
|
+
end
|
|
356
|
+
# @private
|
|
357
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
358
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
359
|
+
new(
|
|
360
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
361
|
+
)
|
|
362
|
+
end
|
|
363
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
364
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
365
|
+
def self.decode(decoder)
|
|
366
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
367
|
+
end
|
|
368
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
369
|
+
encode_attributes(encoder, external_selectors:)
|
|
370
|
+
end
|
|
422
371
|
# @rbs return: ::Array[AttributeSets::UnixGid]
|
|
423
372
|
# @return [Array<AttributeSets::UnixGid>]
|
|
424
|
-
|
|
425
|
-
def requests; attributes[:"requests"].map(&:value); end
|
|
373
|
+
def requests; self[:"requests"]; end
|
|
426
374
|
end
|
|
427
375
|
# Respond to one or more unix_gid requests
|
|
428
376
|
#
|
|
429
377
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
430
|
-
class DoUnixGidSetReqsRequest < ::Nl::
|
|
378
|
+
class DoUnixGidSetReqsRequest < ::Nl::Message
|
|
431
379
|
TYPE = 5
|
|
432
380
|
FIXED_HEADER = nil
|
|
433
381
|
ATTRIBUTE_SET = AttributeSets::UnixGidReqs
|
|
434
|
-
ATTRIBUTES =
|
|
382
|
+
ATTRIBUTES = %i[requests].freeze
|
|
383
|
+
include ATTRIBUTE_SET::Definitions
|
|
384
|
+
def initialize(attributes = [])
|
|
385
|
+
@attributes = attributes
|
|
386
|
+
end
|
|
387
|
+
# @private
|
|
388
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
389
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
390
|
+
new(
|
|
391
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
392
|
+
)
|
|
393
|
+
end
|
|
394
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
395
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
396
|
+
def self.decode(decoder)
|
|
397
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
398
|
+
end
|
|
399
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
400
|
+
encode_attributes(encoder, external_selectors:)
|
|
401
|
+
end
|
|
435
402
|
# @rbs return: ::Array[AttributeSets::UnixGid]
|
|
436
403
|
# @return [Array<AttributeSets::UnixGid>]
|
|
437
|
-
|
|
438
|
-
def requests; attributes[:"requests"].map(&:value); end
|
|
404
|
+
def requests; self[:"requests"]; end
|
|
439
405
|
end
|
|
440
406
|
# Flush sunrpc caches (ip_map and/or unix_gid)
|
|
441
407
|
#
|
|
442
408
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
443
|
-
class DoCacheFlushRequest < ::Nl::
|
|
409
|
+
class DoCacheFlushRequest < ::Nl::Message
|
|
444
410
|
TYPE = 6
|
|
445
411
|
FIXED_HEADER = nil
|
|
446
412
|
ATTRIBUTE_SET = AttributeSets::CacheFlush
|
|
447
|
-
ATTRIBUTES =
|
|
413
|
+
ATTRIBUTES = %i[mask].freeze
|
|
414
|
+
include ATTRIBUTE_SET::Definitions
|
|
415
|
+
def initialize(attributes = [])
|
|
416
|
+
@attributes = attributes
|
|
417
|
+
end
|
|
418
|
+
# @private
|
|
419
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
420
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
421
|
+
new(
|
|
422
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
423
|
+
)
|
|
424
|
+
end
|
|
425
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
426
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
427
|
+
def self.decode(decoder)
|
|
428
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
429
|
+
end
|
|
430
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
431
|
+
encode_attributes(encoder, external_selectors:)
|
|
432
|
+
end
|
|
448
433
|
# Known flags are defined in {Flags::CacheType}.
|
|
449
434
|
# @rbs return: ::Integer
|
|
450
435
|
# @return [Integer]
|
|
451
|
-
|
|
452
|
-
def mask; attributes[:"mask"]&.value; end
|
|
436
|
+
def mask; self[:"mask"]; end
|
|
453
437
|
end
|
|
454
438
|
end
|
|
455
439
|
module Notifications
|
|
456
440
|
# Notification that there are cache requests that need servicing
|
|
457
441
|
#
|
|
458
442
|
# Multicast group: `exportd`.
|
|
459
|
-
class CacheNotify < ::Nl::
|
|
443
|
+
class CacheNotify < ::Nl::Message
|
|
460
444
|
TYPE = 1
|
|
461
445
|
FIXED_HEADER = nil
|
|
462
446
|
ATTRIBUTE_SET = AttributeSets::CacheNotify
|
|
463
|
-
ATTRIBUTES =
|
|
447
|
+
ATTRIBUTES = %i[cache_type].freeze
|
|
448
|
+
include ATTRIBUTE_SET::Definitions
|
|
449
|
+
def initialize(attributes = [])
|
|
450
|
+
@attributes = attributes
|
|
451
|
+
end
|
|
452
|
+
# @private
|
|
453
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
454
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
455
|
+
new(
|
|
456
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
457
|
+
)
|
|
458
|
+
end
|
|
459
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
460
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
461
|
+
def self.decode(decoder)
|
|
462
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
463
|
+
end
|
|
464
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
465
|
+
encode_attributes(encoder, external_selectors:)
|
|
466
|
+
end
|
|
464
467
|
# Known flags are defined in {Flags::CacheType}.
|
|
465
468
|
# @rbs return: ::Integer
|
|
466
469
|
# @return [Integer]
|
|
467
|
-
|
|
468
|
-
def cache_type; attributes[:"cache_type"]&.value; end
|
|
470
|
+
def cache_type; self[:"cache_type"]; end
|
|
469
471
|
end
|
|
470
472
|
end
|
|
471
473
|
# @private
|
|
472
|
-
NOTIFICATIONS =
|
|
474
|
+
NOTIFICATIONS = {1 => Notifications::CacheNotify}.freeze #: Hash[::Integer, ::Class]
|
|
473
475
|
# Dump all pending ip_map requests
|
|
474
476
|
#
|
|
475
477
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|