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.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/NLSPEC_VERSION +1 -1
  4. data/generated/nl/linux/binder.rb +103 -187
  5. data/generated/nl/linux/conntrack.rb +1053 -1649
  6. data/generated/nl/linux/dev_energymodel.rb +303 -265
  7. data/generated/nl/linux/devlink.rb +4904 -5576
  8. data/generated/nl/linux/dpll.rb +1097 -1467
  9. data/generated/nl/linux/drm_ras.rb +235 -195
  10. data/generated/nl/linux/ethtool.rb +6652 -7415
  11. data/generated/nl/linux/fou.rb +234 -255
  12. data/generated/nl/linux/handshake.rb +208 -280
  13. data/generated/nl/linux/lockd.rb +99 -73
  14. data/generated/nl/linux/mptcp_pm.rb +589 -687
  15. data/generated/nl/linux/net_shaper.rb +520 -615
  16. data/generated/nl/linux/netdev.rb +1640 -1987
  17. data/generated/nl/linux/nfsd.rb +1341 -1215
  18. data/generated/nl/linux/nftables.rb +5143 -4870
  19. data/generated/nl/linux/nl80211.rb +2542 -6316
  20. data/generated/nl/linux/nlctrl.rb +338 -483
  21. data/generated/nl/linux/ovpn.rb +1006 -1522
  22. data/generated/nl/linux/ovs_datapath.rb +291 -186
  23. data/generated/nl/linux/ovs_flow.rb +1393 -2065
  24. data/generated/nl/linux/ovs_packet.rb +186 -223
  25. data/generated/nl/linux/ovs_vport.rb +328 -285
  26. data/generated/nl/linux/psp.rb +812 -717
  27. data/generated/nl/linux/rt_addr.rb +513 -243
  28. data/generated/nl/linux/rt_link.rb +4504 -7238
  29. data/generated/nl/linux/rt_neigh.rb +935 -847
  30. data/generated/nl/linux/rt_route.rb +1198 -871
  31. data/generated/nl/linux/rt_rule.rb +680 -659
  32. data/generated/nl/linux/sunrpc_cache.rb +323 -321
  33. data/generated/nl/linux/tc.rb +9058 -10454
  34. data/generated/nl/linux/tcp_metrics.rb +258 -367
  35. data/generated/nl/linux/team.rb +327 -345
  36. data/generated/nl/linux/wireguard.rb +270 -434
  37. data/lib/nl/linux/nlctrl_resolver.rb +1 -1
  38. data/lib/nl/linux/version.rb +1 -1
  39. data/linux/conntrack.yaml +18 -3
  40. data/linux/devlink.yaml +26 -4
  41. data/linux/dpll.yaml +19 -0
  42. data/linux/netdev.yaml +21 -0
  43. data/linux/nfsd.yaml +111 -0
  44. data/linux/nl80211.yaml +2 -2
  45. data/linux/rt-addr.yaml +4 -0
  46. data/linux/rt-link.yaml +7 -0
  47. data/linux/rt-neigh.yaml +3 -0
  48. data/linux/rt-route.yaml +83 -2
  49. data/sig/generated/nl/linux/binder.rbs +77 -220
  50. data/sig/generated/nl/linux/conntrack.rbs +770 -1954
  51. data/sig/generated/nl/linux/dev_energymodel.rbs +207 -291
  52. data/sig/generated/nl/linux/devlink.rbs +3318 -6068
  53. data/sig/generated/nl/linux/dpll.rbs +791 -1589
  54. data/sig/generated/nl/linux/drm_ras.rbs +160 -208
  55. data/sig/generated/nl/linux/ethtool.rbs +4205 -7581
  56. data/sig/generated/nl/linux/fou.rbs +139 -254
  57. data/sig/generated/nl/linux/handshake.rbs +144 -319
  58. data/sig/generated/nl/linux/lockd.rbs +64 -74
  59. data/sig/generated/nl/linux/mptcp_pm.rbs +426 -835
  60. data/sig/generated/nl/linux/net_shaper.rbs +351 -644
  61. data/sig/generated/nl/linux/netdev.rbs +1151 -2146
  62. data/sig/generated/nl/linux/nfsd.rbs +1047 -1409
  63. data/sig/generated/nl/linux/nftables.rbs +2907 -5030
  64. data/sig/generated/nl/linux/nl80211.rbs +1807 -7964
  65. data/sig/generated/nl/linux/nlctrl.rbs +220 -544
  66. data/sig/generated/nl/linux/ovpn.rbs +835 -1859
  67. data/sig/generated/nl/linux/ovs_datapath.rbs +141 -181
  68. data/sig/generated/nl/linux/ovs_flow.rbs +817 -2332
  69. data/sig/generated/nl/linux/ovs_packet.rbs +110 -237
  70. data/sig/generated/nl/linux/ovs_vport.rbs +174 -294
  71. data/sig/generated/nl/linux/psp.rbs +550 -741
  72. data/sig/generated/nl/linux/rt_addr.rbs +188 -226
  73. data/sig/generated/nl/linux/rt_link.rbs +2687 -8370
  74. data/sig/generated/nl/linux/rt_neigh.rbs +471 -1005
  75. data/sig/generated/nl/linux/rt_route.rbs +632 -862
  76. data/sig/generated/nl/linux/rt_rule.rbs +217 -639
  77. data/sig/generated/nl/linux/sunrpc_cache.rbs +233 -369
  78. data/sig/generated/nl/linux/tc.rbs +6199 -13391
  79. data/sig/generated/nl/linux/tcp_metrics.rbs +179 -421
  80. data/sig/generated/nl/linux/team.rbs +232 -391
  81. data/sig/generated/nl/linux/wireguard.rbs +197 -502
  82. metadata +6 -6
@@ -75,6 +75,10 @@ module Nl
75
75
  # @private
76
76
  MEMBERS: Hash[::Symbol, ::Nl::_DataType]
77
77
 
78
+ # @private
79
+ # @rbs (Hash[Symbol, untyped] params, ?context: untyped) -> instance
80
+ def self.from_params: (Hash[Symbol, untyped] params, ?context: untyped) -> instance
81
+
78
82
  # Decodes the struct.
79
83
  # @rbs decoder: ::Nl::Decoder
80
84
  # @rbs return: instance
@@ -93,517 +97,187 @@ module Nl
93
97
 
94
98
  module AttributeSets
95
99
  class Wgdevice < ::Nl::AttributeSet
96
- # Abstract class
97
- class Attribute < ::Nl::AttributeSet::Attribute
98
- end
99
-
100
- class Ifindex < Attribute
101
- TYPE: ::Integer
102
-
103
- NAME: ::Symbol
104
-
105
- # @private
106
- ORDER: ::Integer
107
-
108
- # @private
109
- DATATYPE: untyped
100
+ module Definitions
101
+ # @rbs return: ::Integer
102
+ # @return [Integer]
103
+ def ifindex: () -> ::Integer
104
+
105
+ # @rbs return: ::String
106
+ # @return [String]
107
+ def ifname: () -> ::String
108
+
109
+ # Set to all zeros to remove.
110
+ # @rbs return: ::String
111
+ # @return [String]
112
+ def private_key: () -> ::String
113
+
114
+ # @rbs return: ::String
115
+ # @return [String]
116
+ def public_key: () -> ::String
117
+
118
+ # ``0`` or ``WGDEVICE_F_REPLACE_PEERS`` if all current peers should be
119
+ # removed prior to adding the list below.
120
+ #
121
+ #
122
+ # Known flags are defined in {Flags::WgdeviceFlags}.
123
+ # @rbs return: ::Integer
124
+ # @return [Integer]
125
+ def flags: () -> ::Integer
126
+
127
+ # Set as ``0`` to choose randomly.
128
+ # @rbs return: ::Integer
129
+ # @return [Integer]
130
+ def listen_port: () -> ::Integer
131
+
132
+ # Set as ``0`` to disable.
133
+ # @rbs return: ::Integer
134
+ # @return [Integer]
135
+ def fwmark: () -> ::Integer
136
+
137
+ # The index/type parameter is unused on ``SET_DEVICE`` operations and is
138
+ # zero on ``GET_DEVICE`` operations.
139
+ # @rbs return: ::Array[AttributeSets::Wgpeer]
140
+ # @return [Array<AttributeSets::Wgpeer>]
141
+ def peers: () -> ::Array[AttributeSets::Wgpeer]
110
142
  end
111
143
 
112
- class Ifname < Attribute
113
- TYPE: ::Integer
114
-
115
- NAME: ::Symbol
116
-
117
- # @private
118
- ORDER: ::Integer
119
-
120
- # @private
121
- DATATYPE: untyped
122
- end
123
-
124
- # Set to all zeros to remove.
125
- class PrivateKey < Attribute
126
- TYPE: ::Integer
127
-
128
- NAME: ::Symbol
129
-
130
- # @private
131
- ORDER: ::Integer
132
-
133
- # @private
134
- DATATYPE: untyped
135
- end
136
-
137
- class PublicKey < Attribute
138
- TYPE: ::Integer
139
-
140
- NAME: ::Symbol
141
-
142
- # @private
143
- ORDER: ::Integer
144
-
145
- # @private
146
- DATATYPE: untyped
147
- end
148
-
149
- # ``0`` or ``WGDEVICE_F_REPLACE_PEERS`` if all current peers should be
150
- # removed prior to adding the list below.
151
- #
152
- #
153
- # Known flags are defined in {Flags::WgdeviceFlags}.
154
- class Flags < Attribute
155
- TYPE: ::Integer
156
-
157
- NAME: ::Symbol
158
-
159
- # @private
160
- ORDER: ::Integer
161
-
162
- # @private
163
- DATATYPE: untyped
164
- end
165
-
166
- # Set as ``0`` to choose randomly.
167
- class ListenPort < Attribute
168
- TYPE: ::Integer
169
-
170
- NAME: ::Symbol
171
-
172
- # @private
173
- ORDER: ::Integer
174
-
175
- # @private
176
- DATATYPE: untyped
177
- end
178
-
179
- # Set as ``0`` to disable.
180
- class Fwmark < Attribute
181
- TYPE: ::Integer
182
-
183
- NAME: ::Symbol
184
-
185
- # @private
186
- ORDER: ::Integer
187
-
188
- # @private
189
- DATATYPE: untyped
190
- end
191
-
192
- # The index/type parameter is unused on ``SET_DEVICE`` operations and is
193
- # zero on ``GET_DEVICE`` operations.
194
- class Peers < Attribute
195
- TYPE: ::Integer
196
-
197
- NAME: ::Symbol
198
-
199
- # @private
200
- ORDER: ::Integer
201
- end
202
-
203
- # @private
204
- BY_NAME: Hash[::Symbol, Attribute]
205
-
206
- # @private
207
- BY_TYPE: Hash[::Integer, Attribute]
208
-
209
- # @rbs return: ::Integer
210
- # @return [Integer]
211
- # @see Ifindex
212
- def ifindex: () -> ::Integer
213
-
214
- # @rbs return: ::String
215
- # @return [String]
216
- # @see Ifname
217
- def ifname: () -> ::String
218
-
219
- # Set to all zeros to remove.
220
- # @rbs return: ::String
221
- # @return [String]
222
- # @see PrivateKey
223
- def private_key: () -> ::String
144
+ include Definitions
224
145
 
225
- # @rbs return: ::String
226
- # @return [String]
227
- # @see PublicKey
228
- def public_key: () -> ::String
229
-
230
- # ``0`` or ``WGDEVICE_F_REPLACE_PEERS`` if all current peers should be
231
- # removed prior to adding the list below.
232
- #
233
- #
234
- # Known flags are defined in {Flags::WgdeviceFlags}.
235
- # @rbs return: ::Integer
236
- # @return [Integer]
237
- # @see Flags
238
- def flags: () -> ::Integer
239
-
240
- # Set as ``0`` to choose randomly.
241
- # @rbs return: ::Integer
242
- # @return [Integer]
243
- # @see ListenPort
244
- def listen_port: () -> ::Integer
245
-
246
- # Set as ``0`` to disable.
247
- # @rbs return: ::Integer
248
- # @return [Integer]
249
- # @see Fwmark
250
- def fwmark: () -> ::Integer
251
-
252
- # The index/type parameter is unused on ``SET_DEVICE`` operations and is
253
- # zero on ``GET_DEVICE`` operations.
254
- # @rbs return: ::Array[AttributeSets::Wgpeer]
255
- # @return [Array<AttributeSets::Wgpeer>]
256
- # @see Peers
257
- def peers: () -> ::Array[AttributeSets::Wgpeer]
258
-
259
- # Looks up Attribute class by name.
260
- # @rbs name: Symbol
261
- # @rbs return: Attribute
262
- # @param [Symbol] name
263
- # @return [Attribute]
264
- def self.by_name: (Symbol name) -> Attribute
265
-
266
- # Looks up Attribute class by type value.
267
- # @rbs type: Integer
268
- # @rbs return: Attribute
269
- # @param [Integer] type
270
- # @return [Attribute]
271
- def self.by_type: (Integer type) -> Attribute
146
+ # Decodes attributes from the decoder into a new attribute set.
147
+ # @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
148
+ def self.decode: (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
272
149
  end
273
150
 
274
151
  class Wgpeer < ::Nl::AttributeSet
275
- # Abstract class
276
- class Attribute < ::Nl::AttributeSet::Attribute
277
- end
278
-
279
- class PublicKey < Attribute
280
- TYPE: ::Integer
281
-
282
- NAME: ::Symbol
283
-
284
- # @private
285
- ORDER: ::Integer
286
-
287
- # @private
288
- DATATYPE: untyped
289
- end
290
-
291
- # Set as all zeros to remove.
292
- class PresharedKey < Attribute
293
- TYPE: ::Integer
294
-
295
- NAME: ::Symbol
296
-
297
- # @private
298
- ORDER: ::Integer
299
-
300
- # @private
301
- DATATYPE: untyped
302
- end
303
-
304
- # ``0`` and/or ``WGPEER_F_REMOVE_ME`` if the specified peer should not
305
- # exist at the end of the operation, rather than added/updated and/or
306
- # ``WGPEER_F_REPLACE_ALLOWEDIPS`` if all current allowed IPs of this
307
- # peer should be removed prior to adding the list below and/or
308
- # ``WGPEER_F_UPDATE_ONLY`` if the peer should only be set if it already
309
- # exists.
310
- #
311
- #
312
- # Known flags are defined in {Flags::WgpeerFlags}.
313
- class Flags < Attribute
314
- TYPE: ::Integer
315
-
316
- NAME: ::Symbol
317
-
318
- # @private
319
- ORDER: ::Integer
320
-
321
- # @private
322
- DATATYPE: untyped
323
- end
324
-
325
- # struct sockaddr_in or struct sockaddr_in6
326
- class Endpoint < Attribute
327
- TYPE: ::Integer
328
-
329
- NAME: ::Symbol
330
-
331
- # @private
332
- ORDER: ::Integer
333
-
334
- # @private
335
- DATATYPE: untyped
336
- end
337
-
338
- # Set as ``0`` to disable.
339
- class PersistentKeepaliveInterval < Attribute
340
- TYPE: ::Integer
341
-
342
- NAME: ::Symbol
343
-
344
- # @private
345
- ORDER: ::Integer
346
-
347
- # @private
348
- DATATYPE: untyped
349
- end
350
-
351
- class LastHandshakeTime < Attribute
352
- TYPE: ::Integer
353
-
354
- NAME: ::Symbol
355
-
356
- # @private
357
- ORDER: ::Integer
358
-
359
- # @private
360
- DATATYPE: untyped
152
+ module Definitions
153
+ # @rbs return: ::String
154
+ # @return [String]
155
+ def public_key: () -> ::String
156
+
157
+ # Set as all zeros to remove.
158
+ # @rbs return: ::String
159
+ # @return [String]
160
+ def preshared_key: () -> ::String
161
+
162
+ # ``0`` and/or ``WGPEER_F_REMOVE_ME`` if the specified peer should not
163
+ # exist at the end of the operation, rather than added/updated and/or
164
+ # ``WGPEER_F_REPLACE_ALLOWEDIPS`` if all current allowed IPs of this
165
+ # peer should be removed prior to adding the list below and/or
166
+ # ``WGPEER_F_UPDATE_ONLY`` if the peer should only be set if it already
167
+ # exists.
168
+ #
169
+ #
170
+ # Known flags are defined in {Flags::WgpeerFlags}.
171
+ # @rbs return: ::Integer
172
+ # @return [Integer]
173
+ def flags: () -> ::Integer
174
+
175
+ # struct sockaddr_in or struct sockaddr_in6
176
+ # @rbs return: ::String
177
+ # @return [String]
178
+ def endpoint: () -> ::String
179
+
180
+ # Set as ``0`` to disable.
181
+ # @rbs return: ::Integer
182
+ # @return [Integer]
183
+ def persistent_keepalive_interval: () -> ::Integer
184
+
185
+ # @rbs return: Structs::KernelTimespec
186
+ # @return [Structs::KernelTimespec]
187
+ def last_handshake_time: () -> Structs::KernelTimespec
188
+
189
+ # @rbs return: ::Integer
190
+ # @return [Integer]
191
+ def rx_bytes: () -> ::Integer
192
+
193
+ # @rbs return: ::Integer
194
+ # @return [Integer]
195
+ def tx_bytes: () -> ::Integer
196
+
197
+ # The index/type parameter is unused on ``SET_DEVICE`` operations and is
198
+ # zero on ``GET_DEVICE`` operations.
199
+ # @rbs return: ::Array[AttributeSets::Wgallowedip]
200
+ # @return [Array<AttributeSets::Wgallowedip>]
201
+ def allowedips: () -> ::Array[AttributeSets::Wgallowedip]
202
+
203
+ # Should not be set or used at all by most users of this API, as the
204
+ # most recent protocol will be used when this is unset. Otherwise,
205
+ # must be set to ``1``.
206
+ # @rbs return: ::Integer
207
+ # @return [Integer]
208
+ def protocol_version: () -> ::Integer
361
209
  end
362
210
 
363
- class RxBytes < Attribute
364
- TYPE: ::Integer
365
-
366
- NAME: ::Symbol
367
-
368
- # @private
369
- ORDER: ::Integer
370
-
371
- # @private
372
- DATATYPE: untyped
373
- end
374
-
375
- class TxBytes < Attribute
376
- TYPE: ::Integer
377
-
378
- NAME: ::Symbol
379
-
380
- # @private
381
- ORDER: ::Integer
382
-
383
- # @private
384
- DATATYPE: untyped
385
- end
386
-
387
- # The index/type parameter is unused on ``SET_DEVICE`` operations and is
388
- # zero on ``GET_DEVICE`` operations.
389
- class Allowedips < Attribute
390
- TYPE: ::Integer
391
-
392
- NAME: ::Symbol
393
-
394
- # @private
395
- ORDER: ::Integer
396
- end
397
-
398
- # Should not be set or used at all by most users of this API, as the
399
- # most recent protocol will be used when this is unset. Otherwise,
400
- # must be set to ``1``.
401
- class ProtocolVersion < Attribute
402
- TYPE: ::Integer
403
-
404
- NAME: ::Symbol
405
-
406
- # @private
407
- ORDER: ::Integer
408
-
409
- # @private
410
- DATATYPE: untyped
411
- end
412
-
413
- # @private
414
- BY_NAME: Hash[::Symbol, Attribute]
415
-
416
- # @private
417
- BY_TYPE: Hash[::Integer, Attribute]
418
-
419
- # @rbs return: ::String
420
- # @return [String]
421
- # @see PublicKey
422
- def public_key: () -> ::String
423
-
424
- # Set as all zeros to remove.
425
- # @rbs return: ::String
426
- # @return [String]
427
- # @see PresharedKey
428
- def preshared_key: () -> ::String
429
-
430
- # ``0`` and/or ``WGPEER_F_REMOVE_ME`` if the specified peer should not
431
- # exist at the end of the operation, rather than added/updated and/or
432
- # ``WGPEER_F_REPLACE_ALLOWEDIPS`` if all current allowed IPs of this
433
- # peer should be removed prior to adding the list below and/or
434
- # ``WGPEER_F_UPDATE_ONLY`` if the peer should only be set if it already
435
- # exists.
436
- #
437
- #
438
- # Known flags are defined in {Flags::WgpeerFlags}.
439
- # @rbs return: ::Integer
440
- # @return [Integer]
441
- # @see Flags
442
- def flags: () -> ::Integer
443
-
444
- # struct sockaddr_in or struct sockaddr_in6
445
- # @rbs return: ::String
446
- # @return [String]
447
- # @see Endpoint
448
- def endpoint: () -> ::String
449
-
450
- # Set as ``0`` to disable.
451
- # @rbs return: ::Integer
452
- # @return [Integer]
453
- # @see PersistentKeepaliveInterval
454
- def persistent_keepalive_interval: () -> ::Integer
455
-
456
- # @rbs return: Structs::KernelTimespec
457
- # @return [Structs::KernelTimespec]
458
- # @see LastHandshakeTime
459
- def last_handshake_time: () -> Structs::KernelTimespec
211
+ include Definitions
460
212
 
461
- # @rbs return: ::Integer
462
- # @return [Integer]
463
- # @see RxBytes
464
- def rx_bytes: () -> ::Integer
465
-
466
- # @rbs return: ::Integer
467
- # @return [Integer]
468
- # @see TxBytes
469
- def tx_bytes: () -> ::Integer
470
-
471
- # The index/type parameter is unused on ``SET_DEVICE`` operations and is
472
- # zero on ``GET_DEVICE`` operations.
473
- # @rbs return: ::Array[AttributeSets::Wgallowedip]
474
- # @return [Array<AttributeSets::Wgallowedip>]
475
- # @see Allowedips
476
- def allowedips: () -> ::Array[AttributeSets::Wgallowedip]
477
-
478
- # Should not be set or used at all by most users of this API, as the
479
- # most recent protocol will be used when this is unset. Otherwise,
480
- # must be set to ``1``.
481
- # @rbs return: ::Integer
482
- # @return [Integer]
483
- # @see ProtocolVersion
484
- def protocol_version: () -> ::Integer
485
-
486
- # Looks up Attribute class by name.
487
- # @rbs name: Symbol
488
- # @rbs return: Attribute
489
- # @param [Symbol] name
490
- # @return [Attribute]
491
- def self.by_name: (Symbol name) -> Attribute
492
-
493
- # Looks up Attribute class by type value.
494
- # @rbs type: Integer
495
- # @rbs return: Attribute
496
- # @param [Integer] type
497
- # @return [Attribute]
498
- def self.by_type: (Integer type) -> Attribute
213
+ # Decodes attributes from the decoder into a new attribute set.
214
+ # @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
215
+ def self.decode: (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
499
216
  end
500
217
 
501
218
  class Wgallowedip < ::Nl::AttributeSet
502
- # Abstract class
503
- class Attribute < ::Nl::AttributeSet::Attribute
219
+ module Definitions
220
+ # IP family, either ``AF_INET`` or ``AF_INET6``.
221
+ # @rbs return: ::Integer
222
+ # @return [Integer]
223
+ def family: () -> ::Integer
224
+
225
+ # Either ``struct in_addr`` or ``struct in6_addr``.
226
+ # @rbs return: ::String
227
+ # @return [String]
228
+ def ipaddr: () -> ::String
229
+
230
+ # @rbs return: ::Integer
231
+ # @return [Integer]
232
+ def cidr_mask: () -> ::Integer
233
+
234
+ # ``WGALLOWEDIP_F_REMOVE_ME`` if the specified IP should be removed;
235
+ # otherwise, this IP will be added if it is not already present.
236
+ #
237
+ #
238
+ # Known flags are defined in {Flags::WgallowedipFlags}.
239
+ # @rbs return: ::Integer
240
+ # @return [Integer]
241
+ def flags: () -> ::Integer
504
242
  end
505
243
 
506
- # IP family, either ``AF_INET`` or ``AF_INET6``.
507
- class Family < Attribute
508
- TYPE: ::Integer
509
-
510
- NAME: ::Symbol
244
+ include Definitions
511
245
 
512
- # @private
513
- ORDER: ::Integer
514
-
515
- # @private
516
- DATATYPE: untyped
517
- end
518
-
519
- # Either ``struct in_addr`` or ``struct in6_addr``.
520
- class Ipaddr < Attribute
521
- TYPE: ::Integer
522
-
523
- NAME: ::Symbol
246
+ # Decodes attributes from the decoder into a new attribute set.
247
+ # @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
248
+ def self.decode: (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
249
+ end
250
+ end
524
251
 
252
+ module AttributeSets
253
+ class Wgdevice
254
+ module Definitions
525
255
  # @private
526
- ORDER: ::Integer
256
+ BY_TYPE: Array[::Nl::AttributeSet::Definition?]
527
257
 
528
258
  # @private
529
- DATATYPE: untyped
259
+ BY_NAME: Hash[::Symbol, ::Nl::AttributeSet::Definition]
530
260
  end
261
+ end
531
262
 
532
- class CidrMask < Attribute
533
- TYPE: ::Integer
534
-
535
- NAME: ::Symbol
536
-
263
+ class Wgpeer
264
+ module Definitions
537
265
  # @private
538
- ORDER: ::Integer
266
+ BY_TYPE: Array[::Nl::AttributeSet::Definition?]
539
267
 
540
268
  # @private
541
- DATATYPE: untyped
269
+ BY_NAME: Hash[::Symbol, ::Nl::AttributeSet::Definition]
542
270
  end
271
+ end
543
272
 
544
- # ``WGALLOWEDIP_F_REMOVE_ME`` if the specified IP should be removed;
545
- # otherwise, this IP will be added if it is not already present.
546
- #
547
- #
548
- # Known flags are defined in {Flags::WgallowedipFlags}.
549
- class Flags < Attribute
550
- TYPE: ::Integer
551
-
552
- NAME: ::Symbol
553
-
273
+ class Wgallowedip
274
+ module Definitions
554
275
  # @private
555
- ORDER: ::Integer
276
+ BY_TYPE: Array[::Nl::AttributeSet::Definition?]
556
277
 
557
278
  # @private
558
- DATATYPE: untyped
279
+ BY_NAME: Hash[::Symbol, ::Nl::AttributeSet::Definition]
559
280
  end
560
-
561
- # @private
562
- BY_NAME: Hash[::Symbol, Attribute]
563
-
564
- # @private
565
- BY_TYPE: Hash[::Integer, Attribute]
566
-
567
- # IP family, either ``AF_INET`` or ``AF_INET6``.
568
- # @rbs return: ::Integer
569
- # @return [Integer]
570
- # @see Family
571
- def family: () -> ::Integer
572
-
573
- # Either ``struct in_addr`` or ``struct in6_addr``.
574
- # @rbs return: ::String
575
- # @return [String]
576
- # @see Ipaddr
577
- def ipaddr: () -> ::String
578
-
579
- # @rbs return: ::Integer
580
- # @return [Integer]
581
- # @see CidrMask
582
- def cidr_mask: () -> ::Integer
583
-
584
- # ``WGALLOWEDIP_F_REMOVE_ME`` if the specified IP should be removed;
585
- # otherwise, this IP will be added if it is not already present.
586
- #
587
- #
588
- # Known flags are defined in {Flags::WgallowedipFlags}.
589
- # @rbs return: ::Integer
590
- # @return [Integer]
591
- # @see Flags
592
- def flags: () -> ::Integer
593
-
594
- # Looks up Attribute class by name.
595
- # @rbs name: Symbol
596
- # @rbs return: Attribute
597
- # @param [Symbol] name
598
- # @return [Attribute]
599
- def self.by_name: (Symbol name) -> Attribute
600
-
601
- # Looks up Attribute class by type value.
602
- # @rbs type: Integer
603
- # @rbs return: Attribute
604
- # @param [Integer] type
605
- # @return [Attribute]
606
- def self.by_type: (Integer type) -> Attribute
607
281
  end
608
282
  end
609
283
 
@@ -635,7 +309,7 @@ module Nl
635
309
  #
636
310
  #
637
311
  # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
638
- class DumpGetDeviceRequest < ::Nl::Genl::Message
312
+ class DumpGetDeviceRequest < ::Nl::Message
639
313
  TYPE: ::Integer
640
314
 
641
315
  FIXED_HEADER: untyped
@@ -644,14 +318,25 @@ module Nl
644
318
 
645
319
  ATTRIBUTES: untyped
646
320
 
321
+ include ATTRIBUTE_SET::Definitions
322
+
323
+ def initialize: (?untyped attributes) -> untyped
324
+
325
+ # @private
326
+ def self.build_instance: (untyped params, ?external_selectors: untyped) -> untyped
327
+
328
+ # Decodes a message payload from the decoder into a new instance.
329
+ # @rbs (::Nl::Decoder decoder) -> instance
330
+ def self.decode: (::Nl::Decoder decoder) -> instance
331
+
332
+ def encode: (untyped encoder, ?external_selectors: untyped) -> untyped
333
+
647
334
  # @rbs return: ::Integer
648
335
  # @return [Integer]
649
- # @see AttributeSets::Wgdevice::Ifindex
650
336
  def ifindex: () -> ::Integer
651
337
 
652
338
  # @rbs return: ::String
653
339
  # @return [String]
654
- # @see AttributeSets::Wgdevice::Ifname
655
340
  def ifname: () -> ::String
656
341
  end
657
342
 
@@ -682,7 +367,7 @@ module Nl
682
367
  #
683
368
  #
684
369
  # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
685
- class DumpGetDeviceReply < ::Nl::Genl::Message
370
+ class DumpGetDeviceReply < ::Nl::Message
686
371
  TYPE: ::Integer
687
372
 
688
373
  FIXED_HEADER: untyped
@@ -691,25 +376,34 @@ module Nl
691
376
 
692
377
  ATTRIBUTES: untyped
693
378
 
379
+ include ATTRIBUTE_SET::Definitions
380
+
381
+ def initialize: (?untyped attributes) -> untyped
382
+
383
+ # @private
384
+ def self.build_instance: (untyped params, ?external_selectors: untyped) -> untyped
385
+
386
+ # Decodes a message payload from the decoder into a new instance.
387
+ # @rbs (::Nl::Decoder decoder) -> instance
388
+ def self.decode: (::Nl::Decoder decoder) -> instance
389
+
390
+ def encode: (untyped encoder, ?external_selectors: untyped) -> untyped
391
+
694
392
  # @rbs return: ::Integer
695
393
  # @return [Integer]
696
- # @see AttributeSets::Wgdevice::Ifindex
697
394
  def ifindex: () -> ::Integer
698
395
 
699
396
  # @rbs return: ::String
700
397
  # @return [String]
701
- # @see AttributeSets::Wgdevice::Ifname
702
398
  def ifname: () -> ::String
703
399
 
704
400
  # Set to all zeros to remove.
705
401
  # @rbs return: ::String
706
402
  # @return [String]
707
- # @see AttributeSets::Wgdevice::PrivateKey
708
403
  def private_key: () -> ::String
709
404
 
710
405
  # @rbs return: ::String
711
406
  # @return [String]
712
- # @see AttributeSets::Wgdevice::PublicKey
713
407
  def public_key: () -> ::String
714
408
 
715
409
  # ``0`` or ``WGDEVICE_F_REPLACE_PEERS`` if all current peers should be
@@ -719,26 +413,22 @@ module Nl
719
413
  # Known flags are defined in {Flags::WgdeviceFlags}.
720
414
  # @rbs return: ::Integer
721
415
  # @return [Integer]
722
- # @see AttributeSets::Wgdevice::Flags
723
416
  def flags: () -> ::Integer
724
417
 
725
418
  # Set as ``0`` to choose randomly.
726
419
  # @rbs return: ::Integer
727
420
  # @return [Integer]
728
- # @see AttributeSets::Wgdevice::ListenPort
729
421
  def listen_port: () -> ::Integer
730
422
 
731
423
  # Set as ``0`` to disable.
732
424
  # @rbs return: ::Integer
733
425
  # @return [Integer]
734
- # @see AttributeSets::Wgdevice::Fwmark
735
426
  def fwmark: () -> ::Integer
736
427
 
737
428
  # The index/type parameter is unused on ``SET_DEVICE`` operations and is
738
429
  # zero on ``GET_DEVICE`` operations.
739
430
  # @rbs return: ::Array[AttributeSets::Wgpeer]
740
431
  # @return [Array<AttributeSets::Wgpeer>]
741
- # @see AttributeSets::Wgdevice::Peers
742
432
  def peers: () -> ::Array[AttributeSets::Wgpeer]
743
433
  end
744
434
 
@@ -763,7 +453,7 @@ module Nl
763
453
  #
764
454
  #
765
455
  # Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
766
- class DoSetDeviceRequest < ::Nl::Genl::Message
456
+ class DoSetDeviceRequest < ::Nl::Message
767
457
  TYPE: ::Integer
768
458
 
769
459
  FIXED_HEADER: untyped
@@ -772,25 +462,34 @@ module Nl
772
462
 
773
463
  ATTRIBUTES: untyped
774
464
 
465
+ include ATTRIBUTE_SET::Definitions
466
+
467
+ def initialize: (?untyped attributes) -> untyped
468
+
469
+ # @private
470
+ def self.build_instance: (untyped params, ?external_selectors: untyped) -> untyped
471
+
472
+ # Decodes a message payload from the decoder into a new instance.
473
+ # @rbs (::Nl::Decoder decoder) -> instance
474
+ def self.decode: (::Nl::Decoder decoder) -> instance
475
+
476
+ def encode: (untyped encoder, ?external_selectors: untyped) -> untyped
477
+
775
478
  # @rbs return: ::Integer
776
479
  # @return [Integer]
777
- # @see AttributeSets::Wgdevice::Ifindex
778
480
  def ifindex: () -> ::Integer
779
481
 
780
482
  # @rbs return: ::String
781
483
  # @return [String]
782
- # @see AttributeSets::Wgdevice::Ifname
783
484
  def ifname: () -> ::String
784
485
 
785
486
  # Set to all zeros to remove.
786
487
  # @rbs return: ::String
787
488
  # @return [String]
788
- # @see AttributeSets::Wgdevice::PrivateKey
789
489
  def private_key: () -> ::String
790
490
 
791
491
  # @rbs return: ::String
792
492
  # @return [String]
793
- # @see AttributeSets::Wgdevice::PublicKey
794
493
  def public_key: () -> ::String
795
494
 
796
495
  # ``0`` or ``WGDEVICE_F_REPLACE_PEERS`` if all current peers should be
@@ -800,26 +499,22 @@ module Nl
800
499
  # Known flags are defined in {Flags::WgdeviceFlags}.
801
500
  # @rbs return: ::Integer
802
501
  # @return [Integer]
803
- # @see AttributeSets::Wgdevice::Flags
804
502
  def flags: () -> ::Integer
805
503
 
806
504
  # Set as ``0`` to choose randomly.
807
505
  # @rbs return: ::Integer
808
506
  # @return [Integer]
809
- # @see AttributeSets::Wgdevice::ListenPort
810
507
  def listen_port: () -> ::Integer
811
508
 
812
509
  # Set as ``0`` to disable.
813
510
  # @rbs return: ::Integer
814
511
  # @return [Integer]
815
- # @see AttributeSets::Wgdevice::Fwmark
816
512
  def fwmark: () -> ::Integer
817
513
 
818
514
  # The index/type parameter is unused on ``SET_DEVICE`` operations and is
819
515
  # zero on ``GET_DEVICE`` operations.
820
516
  # @rbs return: ::Array[AttributeSets::Wgpeer]
821
517
  # @return [Array<AttributeSets::Wgpeer>]
822
- # @see AttributeSets::Wgdevice::Peers
823
518
  def peers: () -> ::Array[AttributeSets::Wgpeer]
824
519
  end
825
520
  end