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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/Rakefile +31 -5
  4. data/generated/nl/linux/binder.rb +96 -0
  5. data/generated/nl/linux/conntrack.rb +1227 -0
  6. data/generated/nl/linux/dev_energymodel.rb +235 -0
  7. data/generated/nl/linux/devlink.rb +5177 -0
  8. data/generated/nl/linux/dpll.rb +944 -0
  9. data/generated/nl/linux/ethtool.rb +7121 -0
  10. data/generated/nl/linux/fou.rb +332 -0
  11. data/generated/nl/linux/handshake.rb +238 -0
  12. data/generated/nl/linux/lockd.rb +99 -0
  13. data/generated/nl/linux/mptcp_pm.rb +607 -0
  14. data/generated/nl/linux/net_shaper.rb +731 -0
  15. data/generated/nl/linux/netdev.rb +1450 -0
  16. data/generated/nl/linux/nfsd.rb +500 -0
  17. data/generated/nl/linux/nftables.rb +2924 -0
  18. data/generated/nl/linux/nl80211.rb +3393 -0
  19. data/generated/nl/linux/nlctrl.rb +397 -0
  20. data/generated/nl/linux/ovpn.rb +964 -0
  21. data/generated/nl/linux/ovs_datapath.rb +321 -0
  22. data/generated/nl/linux/ovs_flow.rb +1447 -0
  23. data/generated/nl/linux/ovs_vport.rb +391 -0
  24. data/generated/nl/linux/psp.rb +463 -0
  25. data/generated/nl/linux/rt_addr.rb +448 -0
  26. data/generated/nl/linux/rt_link.rb +4613 -0
  27. data/generated/nl/linux/rt_neigh.rb +897 -0
  28. data/generated/nl/linux/rt_route.rb +1126 -0
  29. data/generated/nl/linux/rt_rule.rb +708 -0
  30. data/generated/nl/linux/tc.rb +7066 -0
  31. data/generated/nl/linux/tcp_metrics.rb +317 -0
  32. data/generated/nl/linux/team.rb +339 -0
  33. data/generated/nl/linux/wireguard.rb +430 -0
  34. data/generated/nl/linux.rb +35 -0
  35. data/lib/nl/linux/version.rb +1 -1
  36. data/lib/nl-linux.rb +1 -1
  37. metadata +37 -7
  38. data/lib/nl/linux.rb +0 -3
@@ -0,0 +1,235 @@
1
+ # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
2
+ #
3
+ # Copyright (c) 2025 Valve Corporation.
4
+ #
5
+ #--
6
+ # frozen_string_literal: true
7
+ # rbs_inline: enabled
8
+ # This code is generated by Ynl::Generator. DO NOT EDIT.
9
+ require 'nl'
10
+ module Nl; module Linux
11
+ # Energy model netlink interface to notify its changes.
12
+ class DevEnergymodel < ::Nl::Family
13
+ NAME = "dev-energymodel"
14
+ PROTOCOL = Ractor.make_shareable(::Nl::Protocols::Genl.new("dev-energymodel"))
15
+ module Structs
16
+ end
17
+ module AttributeSets
18
+ # Information on a single performance domains.
19
+ class PerfDomain < ::Nl::Protocols::Genl::AttributeSet
20
+ # Abstract class
21
+ class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
22
+ end
23
+ class Pad < Attribute
24
+ TYPE = 1
25
+ NAME = :"pad"
26
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Pad.new()
27
+ end
28
+ class PerfDomainId < Attribute
29
+ TYPE = 2
30
+ NAME = :"perf_domain_id"
31
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
32
+ end
33
+ class Flags < Attribute
34
+ TYPE = 3
35
+ NAME = :"flags"
36
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
37
+ end
38
+ class Cpus < Attribute
39
+ TYPE = 4
40
+ NAME = :"cpus"
41
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
42
+ end
43
+ # :nodoc:
44
+ BY_NAME = Ractor.make_shareable({:"pad" => Pad, :"perf_domain_id" => PerfDomainId, :"flags" => Flags, :"cpus" => Cpus}) #: Hash[::Symbol, Attribute]
45
+ # :nodoc:
46
+ BY_TYPE = Ractor.make_shareable({1 => Pad, 2 => PerfDomainId, 3 => Flags, 4 => Cpus}) #: Hash[::Integer, Attribute]
47
+ class << self
48
+ # Looks up Attribute class by name.
49
+ #--
50
+ # @rbs name: Symbol
51
+ # @rbs return: Attribute
52
+ def by_name(name); BY_NAME.fetch(name); end
53
+ # Looks up Attribute class by type value.
54
+ #--
55
+ # @rbs type: Integer
56
+ # @rbs return: Attribute
57
+ def by_type(type); BY_TYPE.fetch(type); end
58
+ end
59
+ end
60
+ # Performance states table.
61
+ class PerfTable < ::Nl::Protocols::Genl::AttributeSet
62
+ # Abstract class
63
+ class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
64
+ end
65
+ class PerfDomainId < Attribute
66
+ TYPE = 1
67
+ NAME = :"perf_domain_id"
68
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
69
+ end
70
+ class PerfState < Attribute
71
+ TYPE = 2
72
+ NAME = :"perf_state"
73
+ end
74
+ # :nodoc:
75
+ BY_NAME = Ractor.make_shareable({:"perf_domain_id" => PerfDomainId, :"perf_state" => PerfState}) #: Hash[::Symbol, Attribute]
76
+ # :nodoc:
77
+ BY_TYPE = Ractor.make_shareable({1 => PerfDomainId, 2 => PerfState}) #: Hash[::Integer, Attribute]
78
+ class << self
79
+ # Looks up Attribute class by name.
80
+ #--
81
+ # @rbs name: Symbol
82
+ # @rbs return: Attribute
83
+ def by_name(name); BY_NAME.fetch(name); end
84
+ # Looks up Attribute class by type value.
85
+ #--
86
+ # @rbs type: Integer
87
+ # @rbs return: Attribute
88
+ def by_type(type); BY_TYPE.fetch(type); end
89
+ end
90
+ end
91
+ # Performance state of a performance domain.
92
+ class PerfState < ::Nl::Protocols::Genl::AttributeSet
93
+ # Abstract class
94
+ class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
95
+ end
96
+ class Pad < Attribute
97
+ TYPE = 1
98
+ NAME = :"pad"
99
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Pad.new()
100
+ end
101
+ class Performance < Attribute
102
+ TYPE = 2
103
+ NAME = :"performance"
104
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
105
+ end
106
+ class Frequency < Attribute
107
+ TYPE = 3
108
+ NAME = :"frequency"
109
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
110
+ end
111
+ class Power < Attribute
112
+ TYPE = 4
113
+ NAME = :"power"
114
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
115
+ end
116
+ class Cost < Attribute
117
+ TYPE = 5
118
+ NAME = :"cost"
119
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
120
+ end
121
+ class Flags < Attribute
122
+ TYPE = 6
123
+ NAME = :"flags"
124
+ DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
125
+ end
126
+ # :nodoc:
127
+ BY_NAME = Ractor.make_shareable({:"pad" => Pad, :"performance" => Performance, :"frequency" => Frequency, :"power" => Power, :"cost" => Cost, :"flags" => Flags}) #: Hash[::Symbol, Attribute]
128
+ # :nodoc:
129
+ BY_TYPE = Ractor.make_shareable({1 => Pad, 2 => Performance, 3 => Frequency, 4 => Power, 5 => Cost, 6 => Flags}) #: Hash[::Integer, Attribute]
130
+ class << self
131
+ # Looks up Attribute class by name.
132
+ #--
133
+ # @rbs name: Symbol
134
+ # @rbs return: Attribute
135
+ def by_name(name); BY_NAME.fetch(name); end
136
+ # Looks up Attribute class by type value.
137
+ #--
138
+ # @rbs type: Integer
139
+ # @rbs return: Attribute
140
+ def by_type(type); BY_TYPE.fetch(type); end
141
+ end
142
+ end
143
+ PerfTable::PerfState::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(PerfState)
144
+ end
145
+ module Messages
146
+ # Get the list of information for all performance domains.
147
+ class DoGetPerfDomainsRequest < ::Nl::Protocols::Genl::Message
148
+ TYPE = 1
149
+ FIXED_HEADER = nil
150
+ ATTRIBUTE_SET = AttributeSets::PerfDomain
151
+ ATTRIBUTES = Ractor.make_shareable(%i[perf_domain_id])
152
+ # Gets the value of `perf-domain-id` attribute in the message.
153
+ #--
154
+ # @rbs return: ::Integer
155
+ def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
156
+ end
157
+ # Get the list of information for all performance domains.
158
+ class DoGetPerfDomainsReply < ::Nl::Protocols::Genl::Message
159
+ TYPE = 1
160
+ FIXED_HEADER = nil
161
+ ATTRIBUTE_SET = AttributeSets::PerfDomain
162
+ ATTRIBUTES = Ractor.make_shareable(%i[pad perf_domain_id flags cpus])
163
+ # Gets the value of `perf-domain-id` attribute in the message.
164
+ #--
165
+ # @rbs return: ::Integer
166
+ def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
167
+ # Gets the value of `flags` attribute in the message.
168
+ #--
169
+ # @rbs return: ::Integer
170
+ def flags; attributes[:"flags"]&.value; end
171
+ # Gets the value of `cpus` attribute in the message.
172
+ #--
173
+ # @rbs return: ::Integer
174
+ def cpus; attributes[:"cpus"]&.value; end
175
+ end
176
+ # Get the list of information for all performance domains.
177
+ class DumpGetPerfDomainsReply < ::Nl::Protocols::Genl::Message
178
+ TYPE = 1
179
+ FIXED_HEADER = nil
180
+ ATTRIBUTE_SET = AttributeSets::PerfDomain
181
+ ATTRIBUTES = Ractor.make_shareable(%i[pad perf_domain_id flags cpus])
182
+ # Gets the value of `perf-domain-id` attribute in the message.
183
+ #--
184
+ # @rbs return: ::Integer
185
+ def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
186
+ # Gets the value of `flags` attribute in the message.
187
+ #--
188
+ # @rbs return: ::Integer
189
+ def flags; attributes[:"flags"]&.value; end
190
+ # Gets the value of `cpus` attribute in the message.
191
+ #--
192
+ # @rbs return: ::Integer
193
+ def cpus; attributes[:"cpus"]&.value; end
194
+ end
195
+ # Get the energy model table of a performance domain.
196
+ class DoGetPerfTableRequest < ::Nl::Protocols::Genl::Message
197
+ TYPE = 2
198
+ FIXED_HEADER = nil
199
+ ATTRIBUTE_SET = AttributeSets::PerfTable
200
+ ATTRIBUTES = Ractor.make_shareable(%i[perf_domain_id])
201
+ # Gets the value of `perf-domain-id` attribute in the message.
202
+ #--
203
+ # @rbs return: ::Integer
204
+ def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
205
+ end
206
+ # Get the energy model table of a performance domain.
207
+ class DoGetPerfTableReply < ::Nl::Protocols::Genl::Message
208
+ TYPE = 2
209
+ FIXED_HEADER = nil
210
+ ATTRIBUTE_SET = AttributeSets::PerfTable
211
+ ATTRIBUTES = Ractor.make_shareable(%i[perf_domain_id perf_state])
212
+ # Gets the value of `perf-domain-id` attribute in the message.
213
+ #--
214
+ # @rbs return: ::Integer
215
+ def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
216
+ # Gets the value of `perf-state` attribute in the message.
217
+ #--
218
+ # @rbs return: AttributeSets::PerfState
219
+ def perf_state; attributes[:"perf_state"]&.value; end
220
+ end
221
+ end
222
+ # Get the list of information for all performance domains.
223
+ #--
224
+ # @rbs (?perf_domain_id: ::Integer) -> Messages::DoGetPerfDomainsReply
225
+ def do_get_perf_domains(**args)
226
+ exchange_message(:"do", Messages::DoGetPerfDomainsRequest, Messages::DoGetPerfDomainsReply, args)
227
+ end
228
+ # Get the energy model table of a performance domain.
229
+ #--
230
+ # @rbs (?perf_domain_id: ::Integer) -> Messages::DoGetPerfTableReply
231
+ def do_get_perf_table(**args)
232
+ exchange_message(:"do", Messages::DoGetPerfTableRequest, Messages::DoGetPerfTableReply, args)
233
+ end
234
+ end
235
+ end; end