nl-linux 0.2.0 → 0.2.2
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 +4 -0
- data/Rakefile +31 -5
- data/generated/nl/linux/binder.rb +96 -0
- data/generated/nl/linux/conntrack.rb +1227 -0
- data/generated/nl/linux/dev_energymodel.rb +235 -0
- data/generated/nl/linux/devlink.rb +5177 -0
- data/generated/nl/linux/dpll.rb +944 -0
- data/generated/nl/linux/ethtool.rb +7121 -0
- data/generated/nl/linux/fou.rb +332 -0
- data/generated/nl/linux/handshake.rb +238 -0
- data/generated/nl/linux/lockd.rb +99 -0
- data/generated/nl/linux/mptcp_pm.rb +607 -0
- data/generated/nl/linux/net_shaper.rb +731 -0
- data/generated/nl/linux/netdev.rb +1450 -0
- data/generated/nl/linux/nfsd.rb +500 -0
- data/generated/nl/linux/nftables.rb +2924 -0
- data/generated/nl/linux/nl80211.rb +3393 -0
- data/generated/nl/linux/nlctrl.rb +397 -0
- data/generated/nl/linux/ovpn.rb +964 -0
- data/generated/nl/linux/ovs_datapath.rb +321 -0
- data/generated/nl/linux/ovs_flow.rb +1447 -0
- data/generated/nl/linux/ovs_vport.rb +391 -0
- data/generated/nl/linux/psp.rb +463 -0
- data/generated/nl/linux/rt_addr.rb +448 -0
- data/generated/nl/linux/rt_link.rb +4613 -0
- data/generated/nl/linux/rt_neigh.rb +897 -0
- data/generated/nl/linux/rt_route.rb +1126 -0
- data/generated/nl/linux/rt_rule.rb +708 -0
- data/generated/nl/linux/tc.rb +7066 -0
- data/generated/nl/linux/tcp_metrics.rb +317 -0
- data/generated/nl/linux/team.rb +339 -0
- data/generated/nl/linux/wireguard.rb +430 -0
- data/generated/nl/linux.rb +35 -0
- data/lib/nl/linux/version.rb +1 -1
- data/lib/nl-linux.rb +1 -1
- metadata +37 -7
- data/lib/nl/linux.rb +0 -3
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
|
2
|
+
#--
|
|
3
|
+
# frozen_string_literal: true
|
|
4
|
+
# rbs_inline: enabled
|
|
5
|
+
# This code is generated by Ynl::Generator. DO NOT EDIT.
|
|
6
|
+
require 'nl'
|
|
7
|
+
module Nl; module Linux
|
|
8
|
+
# PSP Security Protocol Generic Netlink family.
|
|
9
|
+
class Psp < ::Nl::Family
|
|
10
|
+
NAME = "psp"
|
|
11
|
+
PROTOCOL = Ractor.make_shareable(::Nl::Protocols::Genl.new("psp"))
|
|
12
|
+
module Structs
|
|
13
|
+
end
|
|
14
|
+
module AttributeSets
|
|
15
|
+
class Dev < ::Nl::Protocols::Genl::AttributeSet
|
|
16
|
+
# Abstract class
|
|
17
|
+
class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
|
|
18
|
+
end
|
|
19
|
+
class Id < Attribute
|
|
20
|
+
TYPE = 1
|
|
21
|
+
NAME = :"id"
|
|
22
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1 })
|
|
23
|
+
end
|
|
24
|
+
class Ifindex < Attribute
|
|
25
|
+
TYPE = 2
|
|
26
|
+
NAME = :"ifindex"
|
|
27
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
28
|
+
end
|
|
29
|
+
class PspVersionsCap < Attribute
|
|
30
|
+
TYPE = 3
|
|
31
|
+
NAME = :"psp_versions_cap"
|
|
32
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
33
|
+
end
|
|
34
|
+
class PspVersionsEna < Attribute
|
|
35
|
+
TYPE = 4
|
|
36
|
+
NAME = :"psp_versions_ena"
|
|
37
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
38
|
+
end
|
|
39
|
+
# :nodoc:
|
|
40
|
+
BY_NAME = Ractor.make_shareable({:"id" => Id, :"ifindex" => Ifindex, :"psp_versions_cap" => PspVersionsCap, :"psp_versions_ena" => PspVersionsEna}) #: Hash[::Symbol, Attribute]
|
|
41
|
+
# :nodoc:
|
|
42
|
+
BY_TYPE = Ractor.make_shareable({1 => Id, 2 => Ifindex, 3 => PspVersionsCap, 4 => PspVersionsEna}) #: Hash[::Integer, Attribute]
|
|
43
|
+
class << self
|
|
44
|
+
# Looks up Attribute class by name.
|
|
45
|
+
#--
|
|
46
|
+
# @rbs name: Symbol
|
|
47
|
+
# @rbs return: Attribute
|
|
48
|
+
def by_name(name); BY_NAME.fetch(name); end
|
|
49
|
+
# Looks up Attribute class by type value.
|
|
50
|
+
#--
|
|
51
|
+
# @rbs type: Integer
|
|
52
|
+
# @rbs return: Attribute
|
|
53
|
+
def by_type(type); BY_TYPE.fetch(type); end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
class Assoc < ::Nl::Protocols::Genl::AttributeSet
|
|
57
|
+
# Abstract class
|
|
58
|
+
class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
|
|
59
|
+
end
|
|
60
|
+
class DevId < Attribute
|
|
61
|
+
TYPE = 1
|
|
62
|
+
NAME = :"dev_id"
|
|
63
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1 })
|
|
64
|
+
end
|
|
65
|
+
class Version < Attribute
|
|
66
|
+
TYPE = 2
|
|
67
|
+
NAME = :"version"
|
|
68
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
69
|
+
end
|
|
70
|
+
class RxKey < Attribute
|
|
71
|
+
TYPE = 3
|
|
72
|
+
NAME = :"rx_key"
|
|
73
|
+
end
|
|
74
|
+
class TxKey < Attribute
|
|
75
|
+
TYPE = 4
|
|
76
|
+
NAME = :"tx_key"
|
|
77
|
+
end
|
|
78
|
+
class SockFd < Attribute
|
|
79
|
+
TYPE = 5
|
|
80
|
+
NAME = :"sock_fd"
|
|
81
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
82
|
+
end
|
|
83
|
+
# :nodoc:
|
|
84
|
+
BY_NAME = Ractor.make_shareable({:"dev_id" => DevId, :"version" => Version, :"rx_key" => RxKey, :"tx_key" => TxKey, :"sock_fd" => SockFd}) #: Hash[::Symbol, Attribute]
|
|
85
|
+
# :nodoc:
|
|
86
|
+
BY_TYPE = Ractor.make_shareable({1 => DevId, 2 => Version, 3 => RxKey, 4 => TxKey, 5 => SockFd}) #: Hash[::Integer, Attribute]
|
|
87
|
+
class << self
|
|
88
|
+
# Looks up Attribute class by name.
|
|
89
|
+
#--
|
|
90
|
+
# @rbs name: Symbol
|
|
91
|
+
# @rbs return: Attribute
|
|
92
|
+
def by_name(name); BY_NAME.fetch(name); end
|
|
93
|
+
# Looks up Attribute class by type value.
|
|
94
|
+
#--
|
|
95
|
+
# @rbs type: Integer
|
|
96
|
+
# @rbs return: Attribute
|
|
97
|
+
def by_type(type); BY_TYPE.fetch(type); end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
class Keys < ::Nl::Protocols::Genl::AttributeSet
|
|
101
|
+
# Abstract class
|
|
102
|
+
class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
|
|
103
|
+
end
|
|
104
|
+
class Key < Attribute
|
|
105
|
+
TYPE = 1
|
|
106
|
+
NAME = :"key"
|
|
107
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Binary.new(check: nil)
|
|
108
|
+
end
|
|
109
|
+
class Spi < Attribute
|
|
110
|
+
TYPE = 2
|
|
111
|
+
NAME = :"spi"
|
|
112
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
113
|
+
end
|
|
114
|
+
# :nodoc:
|
|
115
|
+
BY_NAME = Ractor.make_shareable({:"key" => Key, :"spi" => Spi}) #: Hash[::Symbol, Attribute]
|
|
116
|
+
# :nodoc:
|
|
117
|
+
BY_TYPE = Ractor.make_shareable({1 => Key, 2 => Spi}) #: Hash[::Integer, Attribute]
|
|
118
|
+
class << self
|
|
119
|
+
# Looks up Attribute class by name.
|
|
120
|
+
#--
|
|
121
|
+
# @rbs name: Symbol
|
|
122
|
+
# @rbs return: Attribute
|
|
123
|
+
def by_name(name); BY_NAME.fetch(name); end
|
|
124
|
+
# Looks up Attribute class by type value.
|
|
125
|
+
#--
|
|
126
|
+
# @rbs type: Integer
|
|
127
|
+
# @rbs return: Attribute
|
|
128
|
+
def by_type(type); BY_TYPE.fetch(type); end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
class Stats < ::Nl::Protocols::Genl::AttributeSet
|
|
132
|
+
# Abstract class
|
|
133
|
+
class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
|
|
134
|
+
end
|
|
135
|
+
class DevId < Attribute
|
|
136
|
+
TYPE = 1
|
|
137
|
+
NAME = :"dev_id"
|
|
138
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1 })
|
|
139
|
+
end
|
|
140
|
+
class KeyRotations < Attribute
|
|
141
|
+
TYPE = 2
|
|
142
|
+
NAME = :"key_rotations"
|
|
143
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::UINT, check: nil)
|
|
144
|
+
end
|
|
145
|
+
class StaleEvents < Attribute
|
|
146
|
+
TYPE = 3
|
|
147
|
+
NAME = :"stale_events"
|
|
148
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::UINT, check: nil)
|
|
149
|
+
end
|
|
150
|
+
class RxPackets < Attribute
|
|
151
|
+
TYPE = 4
|
|
152
|
+
NAME = :"rx_packets"
|
|
153
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::UINT, check: nil)
|
|
154
|
+
end
|
|
155
|
+
class RxBytes < Attribute
|
|
156
|
+
TYPE = 5
|
|
157
|
+
NAME = :"rx_bytes"
|
|
158
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::UINT, check: nil)
|
|
159
|
+
end
|
|
160
|
+
class RxAuthFail < Attribute
|
|
161
|
+
TYPE = 6
|
|
162
|
+
NAME = :"rx_auth_fail"
|
|
163
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::UINT, check: nil)
|
|
164
|
+
end
|
|
165
|
+
class RxError < Attribute
|
|
166
|
+
TYPE = 7
|
|
167
|
+
NAME = :"rx_error"
|
|
168
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::UINT, check: nil)
|
|
169
|
+
end
|
|
170
|
+
class RxBad < Attribute
|
|
171
|
+
TYPE = 8
|
|
172
|
+
NAME = :"rx_bad"
|
|
173
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::UINT, check: nil)
|
|
174
|
+
end
|
|
175
|
+
class TxPackets < Attribute
|
|
176
|
+
TYPE = 9
|
|
177
|
+
NAME = :"tx_packets"
|
|
178
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::UINT, check: nil)
|
|
179
|
+
end
|
|
180
|
+
class TxBytes < Attribute
|
|
181
|
+
TYPE = 10
|
|
182
|
+
NAME = :"tx_bytes"
|
|
183
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::UINT, check: nil)
|
|
184
|
+
end
|
|
185
|
+
class TxError < Attribute
|
|
186
|
+
TYPE = 11
|
|
187
|
+
NAME = :"tx_error"
|
|
188
|
+
DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::UINT, check: nil)
|
|
189
|
+
end
|
|
190
|
+
# :nodoc:
|
|
191
|
+
BY_NAME = Ractor.make_shareable({:"dev_id" => DevId, :"key_rotations" => KeyRotations, :"stale_events" => StaleEvents, :"rx_packets" => RxPackets, :"rx_bytes" => RxBytes, :"rx_auth_fail" => RxAuthFail, :"rx_error" => RxError, :"rx_bad" => RxBad, :"tx_packets" => TxPackets, :"tx_bytes" => TxBytes, :"tx_error" => TxError}) #: Hash[::Symbol, Attribute]
|
|
192
|
+
# :nodoc:
|
|
193
|
+
BY_TYPE = Ractor.make_shareable({1 => DevId, 2 => KeyRotations, 3 => StaleEvents, 4 => RxPackets, 5 => RxBytes, 6 => RxAuthFail, 7 => RxError, 8 => RxBad, 9 => TxPackets, 10 => TxBytes, 11 => TxError}) #: Hash[::Integer, Attribute]
|
|
194
|
+
class << self
|
|
195
|
+
# Looks up Attribute class by name.
|
|
196
|
+
#--
|
|
197
|
+
# @rbs name: Symbol
|
|
198
|
+
# @rbs return: Attribute
|
|
199
|
+
def by_name(name); BY_NAME.fetch(name); end
|
|
200
|
+
# Looks up Attribute class by type value.
|
|
201
|
+
#--
|
|
202
|
+
# @rbs type: Integer
|
|
203
|
+
# @rbs return: Attribute
|
|
204
|
+
def by_type(type); BY_TYPE.fetch(type); end
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
Assoc::RxKey::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(Keys)
|
|
208
|
+
Assoc::TxKey::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(Keys)
|
|
209
|
+
end
|
|
210
|
+
module Messages
|
|
211
|
+
# Get / dump information about PSP capable devices on the system.
|
|
212
|
+
class DoDevGetRequest < ::Nl::Protocols::Genl::Message
|
|
213
|
+
TYPE = 1
|
|
214
|
+
FIXED_HEADER = nil
|
|
215
|
+
ATTRIBUTE_SET = AttributeSets::Dev
|
|
216
|
+
ATTRIBUTES = Ractor.make_shareable(%i[id])
|
|
217
|
+
# Gets the value of `id` attribute in the message.
|
|
218
|
+
#--
|
|
219
|
+
# @rbs return: ::Integer
|
|
220
|
+
def id; attributes[:"id"]&.value; end
|
|
221
|
+
end
|
|
222
|
+
# Get / dump information about PSP capable devices on the system.
|
|
223
|
+
class DoDevGetReply < ::Nl::Protocols::Genl::Message
|
|
224
|
+
TYPE = 1
|
|
225
|
+
FIXED_HEADER = nil
|
|
226
|
+
ATTRIBUTE_SET = AttributeSets::Dev
|
|
227
|
+
ATTRIBUTES = Ractor.make_shareable(%i[id ifindex psp_versions_cap psp_versions_ena])
|
|
228
|
+
# Gets the value of `id` attribute in the message.
|
|
229
|
+
#--
|
|
230
|
+
# @rbs return: ::Integer
|
|
231
|
+
def id; attributes[:"id"]&.value; end
|
|
232
|
+
# Gets the value of `ifindex` attribute in the message.
|
|
233
|
+
#--
|
|
234
|
+
# @rbs return: ::Integer
|
|
235
|
+
def ifindex; attributes[:"ifindex"]&.value; end
|
|
236
|
+
# Gets the value of `psp-versions-cap` attribute in the message.
|
|
237
|
+
#--
|
|
238
|
+
# @rbs return: ::Integer
|
|
239
|
+
def psp_versions_cap; attributes[:"psp_versions_cap"]&.value; end
|
|
240
|
+
# Gets the value of `psp-versions-ena` attribute in the message.
|
|
241
|
+
#--
|
|
242
|
+
# @rbs return: ::Integer
|
|
243
|
+
def psp_versions_ena; attributes[:"psp_versions_ena"]&.value; end
|
|
244
|
+
end
|
|
245
|
+
# Get / dump information about PSP capable devices on the system.
|
|
246
|
+
class DumpDevGetReply < ::Nl::Protocols::Genl::Message
|
|
247
|
+
TYPE = 1
|
|
248
|
+
FIXED_HEADER = nil
|
|
249
|
+
ATTRIBUTE_SET = AttributeSets::Dev
|
|
250
|
+
ATTRIBUTES = Ractor.make_shareable(%i[id ifindex psp_versions_cap psp_versions_ena])
|
|
251
|
+
# Gets the value of `id` attribute in the message.
|
|
252
|
+
#--
|
|
253
|
+
# @rbs return: ::Integer
|
|
254
|
+
def id; attributes[:"id"]&.value; end
|
|
255
|
+
# Gets the value of `ifindex` attribute in the message.
|
|
256
|
+
#--
|
|
257
|
+
# @rbs return: ::Integer
|
|
258
|
+
def ifindex; attributes[:"ifindex"]&.value; end
|
|
259
|
+
# Gets the value of `psp-versions-cap` attribute in the message.
|
|
260
|
+
#--
|
|
261
|
+
# @rbs return: ::Integer
|
|
262
|
+
def psp_versions_cap; attributes[:"psp_versions_cap"]&.value; end
|
|
263
|
+
# Gets the value of `psp-versions-ena` attribute in the message.
|
|
264
|
+
#--
|
|
265
|
+
# @rbs return: ::Integer
|
|
266
|
+
def psp_versions_ena; attributes[:"psp_versions_ena"]&.value; end
|
|
267
|
+
end
|
|
268
|
+
# Set the configuration of a PSP device.
|
|
269
|
+
class DoDevSetRequest < ::Nl::Protocols::Genl::Message
|
|
270
|
+
TYPE = 4
|
|
271
|
+
FIXED_HEADER = nil
|
|
272
|
+
ATTRIBUTE_SET = AttributeSets::Dev
|
|
273
|
+
ATTRIBUTES = Ractor.make_shareable(%i[id psp_versions_ena])
|
|
274
|
+
# Gets the value of `id` attribute in the message.
|
|
275
|
+
#--
|
|
276
|
+
# @rbs return: ::Integer
|
|
277
|
+
def id; attributes[:"id"]&.value; end
|
|
278
|
+
# Gets the value of `psp-versions-ena` attribute in the message.
|
|
279
|
+
#--
|
|
280
|
+
# @rbs return: ::Integer
|
|
281
|
+
def psp_versions_ena; attributes[:"psp_versions_ena"]&.value; end
|
|
282
|
+
end
|
|
283
|
+
# Set the configuration of a PSP device.
|
|
284
|
+
class DoDevSetReply < ::Nl::Protocols::Genl::Message
|
|
285
|
+
TYPE = 4
|
|
286
|
+
FIXED_HEADER = nil
|
|
287
|
+
ATTRIBUTE_SET = AttributeSets::Dev
|
|
288
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
289
|
+
end
|
|
290
|
+
# Rotate the device key.
|
|
291
|
+
class DoKeyRotateRequest < ::Nl::Protocols::Genl::Message
|
|
292
|
+
TYPE = 6
|
|
293
|
+
FIXED_HEADER = nil
|
|
294
|
+
ATTRIBUTE_SET = AttributeSets::Dev
|
|
295
|
+
ATTRIBUTES = Ractor.make_shareable(%i[id])
|
|
296
|
+
# Gets the value of `id` attribute in the message.
|
|
297
|
+
#--
|
|
298
|
+
# @rbs return: ::Integer
|
|
299
|
+
def id; attributes[:"id"]&.value; end
|
|
300
|
+
end
|
|
301
|
+
# Rotate the device key.
|
|
302
|
+
class DoKeyRotateReply < ::Nl::Protocols::Genl::Message
|
|
303
|
+
TYPE = 6
|
|
304
|
+
FIXED_HEADER = nil
|
|
305
|
+
ATTRIBUTE_SET = AttributeSets::Dev
|
|
306
|
+
ATTRIBUTES = Ractor.make_shareable(%i[id])
|
|
307
|
+
# Gets the value of `id` attribute in the message.
|
|
308
|
+
#--
|
|
309
|
+
# @rbs return: ::Integer
|
|
310
|
+
def id; attributes[:"id"]&.value; end
|
|
311
|
+
end
|
|
312
|
+
# Allocate a new Rx key + SPI pair, associate it with a socket.
|
|
313
|
+
class DoRxAssocRequest < ::Nl::Protocols::Genl::Message
|
|
314
|
+
TYPE = 8
|
|
315
|
+
FIXED_HEADER = nil
|
|
316
|
+
ATTRIBUTE_SET = AttributeSets::Assoc
|
|
317
|
+
ATTRIBUTES = Ractor.make_shareable(%i[dev_id version sock_fd])
|
|
318
|
+
# Gets the value of `dev-id` attribute in the message.
|
|
319
|
+
#--
|
|
320
|
+
# @rbs return: ::Integer
|
|
321
|
+
def dev_id; attributes[:"dev_id"]&.value; end
|
|
322
|
+
# Gets the value of `version` attribute in the message.
|
|
323
|
+
#--
|
|
324
|
+
# @rbs return: ::Integer
|
|
325
|
+
def version; attributes[:"version"]&.value; end
|
|
326
|
+
# Gets the value of `sock-fd` attribute in the message.
|
|
327
|
+
#--
|
|
328
|
+
# @rbs return: ::Integer
|
|
329
|
+
def sock_fd; attributes[:"sock_fd"]&.value; end
|
|
330
|
+
end
|
|
331
|
+
# Allocate a new Rx key + SPI pair, associate it with a socket.
|
|
332
|
+
class DoRxAssocReply < ::Nl::Protocols::Genl::Message
|
|
333
|
+
TYPE = 8
|
|
334
|
+
FIXED_HEADER = nil
|
|
335
|
+
ATTRIBUTE_SET = AttributeSets::Assoc
|
|
336
|
+
ATTRIBUTES = Ractor.make_shareable(%i[dev_id rx_key])
|
|
337
|
+
# Gets the value of `dev-id` attribute in the message.
|
|
338
|
+
#--
|
|
339
|
+
# @rbs return: ::Integer
|
|
340
|
+
def dev_id; attributes[:"dev_id"]&.value; end
|
|
341
|
+
# Gets the value of `rx-key` attribute in the message.
|
|
342
|
+
#--
|
|
343
|
+
# @rbs return: AttributeSets::Keys
|
|
344
|
+
def rx_key; attributes[:"rx_key"]&.value; end
|
|
345
|
+
end
|
|
346
|
+
# Add a PSP Tx association.
|
|
347
|
+
class DoTxAssocRequest < ::Nl::Protocols::Genl::Message
|
|
348
|
+
TYPE = 9
|
|
349
|
+
FIXED_HEADER = nil
|
|
350
|
+
ATTRIBUTE_SET = AttributeSets::Assoc
|
|
351
|
+
ATTRIBUTES = Ractor.make_shareable(%i[dev_id version tx_key sock_fd])
|
|
352
|
+
# Gets the value of `dev-id` attribute in the message.
|
|
353
|
+
#--
|
|
354
|
+
# @rbs return: ::Integer
|
|
355
|
+
def dev_id; attributes[:"dev_id"]&.value; end
|
|
356
|
+
# Gets the value of `version` attribute in the message.
|
|
357
|
+
#--
|
|
358
|
+
# @rbs return: ::Integer
|
|
359
|
+
def version; attributes[:"version"]&.value; end
|
|
360
|
+
# Gets the value of `tx-key` attribute in the message.
|
|
361
|
+
#--
|
|
362
|
+
# @rbs return: AttributeSets::Keys
|
|
363
|
+
def tx_key; attributes[:"tx_key"]&.value; end
|
|
364
|
+
# Gets the value of `sock-fd` attribute in the message.
|
|
365
|
+
#--
|
|
366
|
+
# @rbs return: ::Integer
|
|
367
|
+
def sock_fd; attributes[:"sock_fd"]&.value; end
|
|
368
|
+
end
|
|
369
|
+
# Add a PSP Tx association.
|
|
370
|
+
class DoTxAssocReply < ::Nl::Protocols::Genl::Message
|
|
371
|
+
TYPE = 9
|
|
372
|
+
FIXED_HEADER = nil
|
|
373
|
+
ATTRIBUTE_SET = AttributeSets::Assoc
|
|
374
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
375
|
+
end
|
|
376
|
+
# Get device statistics.
|
|
377
|
+
class DoGetStatsRequest < ::Nl::Protocols::Genl::Message
|
|
378
|
+
TYPE = 10
|
|
379
|
+
FIXED_HEADER = nil
|
|
380
|
+
ATTRIBUTE_SET = AttributeSets::Stats
|
|
381
|
+
ATTRIBUTES = Ractor.make_shareable(%i[dev_id])
|
|
382
|
+
# Gets the value of `dev-id` attribute in the message.
|
|
383
|
+
#--
|
|
384
|
+
# @rbs return: ::Integer
|
|
385
|
+
def dev_id; attributes[:"dev_id"]&.value; end
|
|
386
|
+
end
|
|
387
|
+
# Get device statistics.
|
|
388
|
+
class DoGetStatsReply < ::Nl::Protocols::Genl::Message
|
|
389
|
+
TYPE = 10
|
|
390
|
+
FIXED_HEADER = nil
|
|
391
|
+
ATTRIBUTE_SET = AttributeSets::Stats
|
|
392
|
+
ATTRIBUTES = Ractor.make_shareable(%i[dev_id key_rotations stale_events])
|
|
393
|
+
# Gets the value of `dev-id` attribute in the message.
|
|
394
|
+
#--
|
|
395
|
+
# @rbs return: ::Integer
|
|
396
|
+
def dev_id; attributes[:"dev_id"]&.value; end
|
|
397
|
+
# Gets the value of `key-rotations` attribute in the message.
|
|
398
|
+
#--
|
|
399
|
+
# @rbs return: ::Integer
|
|
400
|
+
def key_rotations; attributes[:"key_rotations"]&.value; end
|
|
401
|
+
# Gets the value of `stale-events` attribute in the message.
|
|
402
|
+
#--
|
|
403
|
+
# @rbs return: ::Integer
|
|
404
|
+
def stale_events; attributes[:"stale_events"]&.value; end
|
|
405
|
+
end
|
|
406
|
+
# Get device statistics.
|
|
407
|
+
class DumpGetStatsReply < ::Nl::Protocols::Genl::Message
|
|
408
|
+
TYPE = 10
|
|
409
|
+
FIXED_HEADER = nil
|
|
410
|
+
ATTRIBUTE_SET = AttributeSets::Stats
|
|
411
|
+
ATTRIBUTES = Ractor.make_shareable(%i[dev_id key_rotations stale_events])
|
|
412
|
+
# Gets the value of `dev-id` attribute in the message.
|
|
413
|
+
#--
|
|
414
|
+
# @rbs return: ::Integer
|
|
415
|
+
def dev_id; attributes[:"dev_id"]&.value; end
|
|
416
|
+
# Gets the value of `key-rotations` attribute in the message.
|
|
417
|
+
#--
|
|
418
|
+
# @rbs return: ::Integer
|
|
419
|
+
def key_rotations; attributes[:"key_rotations"]&.value; end
|
|
420
|
+
# Gets the value of `stale-events` attribute in the message.
|
|
421
|
+
#--
|
|
422
|
+
# @rbs return: ::Integer
|
|
423
|
+
def stale_events; attributes[:"stale_events"]&.value; end
|
|
424
|
+
end
|
|
425
|
+
end
|
|
426
|
+
# Get / dump information about PSP capable devices on the system.
|
|
427
|
+
#--
|
|
428
|
+
# @rbs (?id: ::Integer) -> Messages::DoDevGetReply
|
|
429
|
+
def do_dev_get(**args)
|
|
430
|
+
exchange_message(:"do", Messages::DoDevGetRequest, Messages::DoDevGetReply, args)
|
|
431
|
+
end
|
|
432
|
+
# Set the configuration of a PSP device.
|
|
433
|
+
#--
|
|
434
|
+
# @rbs (?id: ::Integer, ?psp_versions_ena: ::Integer) -> Messages::DoDevSetReply
|
|
435
|
+
def do_dev_set(**args)
|
|
436
|
+
exchange_message(:"do", Messages::DoDevSetRequest, Messages::DoDevSetReply, args)
|
|
437
|
+
end
|
|
438
|
+
# Rotate the device key.
|
|
439
|
+
#--
|
|
440
|
+
# @rbs (?id: ::Integer) -> Messages::DoKeyRotateReply
|
|
441
|
+
def do_key_rotate(**args)
|
|
442
|
+
exchange_message(:"do", Messages::DoKeyRotateRequest, Messages::DoKeyRotateReply, args)
|
|
443
|
+
end
|
|
444
|
+
# Allocate a new Rx key + SPI pair, associate it with a socket.
|
|
445
|
+
#--
|
|
446
|
+
# @rbs (?dev_id: ::Integer, ?version: ::Integer, ?sock_fd: ::Integer) -> Messages::DoRxAssocReply
|
|
447
|
+
def do_rx_assoc(**args)
|
|
448
|
+
exchange_message(:"do", Messages::DoRxAssocRequest, Messages::DoRxAssocReply, args)
|
|
449
|
+
end
|
|
450
|
+
# Add a PSP Tx association.
|
|
451
|
+
#--
|
|
452
|
+
# @rbs (?dev_id: ::Integer, ?version: ::Integer, ?tx_key: AttributeSets::Keys, ?sock_fd: ::Integer) -> Messages::DoTxAssocReply
|
|
453
|
+
def do_tx_assoc(**args)
|
|
454
|
+
exchange_message(:"do", Messages::DoTxAssocRequest, Messages::DoTxAssocReply, args)
|
|
455
|
+
end
|
|
456
|
+
# Get device statistics.
|
|
457
|
+
#--
|
|
458
|
+
# @rbs (?dev_id: ::Integer) -> Messages::DoGetStatsReply
|
|
459
|
+
def do_get_stats(**args)
|
|
460
|
+
exchange_message(:"do", Messages::DoGetStatsRequest, Messages::DoGetStatsReply, args)
|
|
461
|
+
end
|
|
462
|
+
end
|
|
463
|
+
end; end
|