nl-linux 0.2.4 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rspec +3 -0
- data/.yardopts +5 -0
- data/CHANGELOG.md +8 -0
- data/Rakefile +27 -5
- data/generated/nl/linux/binder.rb +227 -19
- data/generated/nl/linux/conntrack.rb +1325 -365
- data/generated/nl/linux/dev_energymodel.rb +357 -66
- data/generated/nl/linux/devlink.rb +6310 -1859
- data/generated/nl/linux/dpll.rb +2202 -376
- data/generated/nl/linux/drm_ras.rb +312 -63
- data/generated/nl/linux/ethtool.rb +7555 -2447
- data/generated/nl/linux/fou.rb +381 -133
- data/generated/nl/linux/handshake.rb +340 -70
- data/generated/nl/linux/lockd.rb +132 -27
- data/generated/nl/linux/mptcp_pm.rb +773 -161
- data/generated/nl/linux/net_shaper.rb +892 -211
- data/generated/nl/linux/netdev.rb +2366 -518
- data/generated/nl/linux/nfsd.rb +1299 -317
- data/generated/nl/linux/nftables.rb +5351 -1533
- data/generated/nl/linux/nl80211.rb +4601 -882
- data/generated/nl/linux/nlctrl.rb +460 -117
- data/generated/nl/linux/ovpn.rb +1360 -262
- data/generated/nl/linux/ovs_datapath.rb +312 -98
- data/generated/nl/linux/ovs_flow.rb +1866 -358
- data/generated/nl/linux/ovs_packet.rb +331 -45
- data/generated/nl/linux/ovs_vport.rb +374 -123
- data/generated/nl/linux/psp.rb +1093 -201
- data/generated/nl/linux/rt_addr.rb +423 -165
- data/generated/nl/linux/rt_link.rb +6928 -1336
- data/generated/nl/linux/rt_neigh.rb +1063 -297
- data/generated/nl/linux/rt_route.rb +1112 -483
- data/generated/nl/linux/rt_rule.rb +931 -262
- data/generated/nl/linux/sunrpc_cache.rb +407 -82
- data/generated/nl/linux/tc.rb +10081 -1763
- data/generated/nl/linux/tcp_metrics.rb +388 -109
- data/generated/nl/linux/team.rb +350 -84
- data/generated/nl/linux/wireguard.rb +525 -96
- data/generated/nl/linux.rb +1 -0
- data/lib/nl/linux/nlctrl_resolver.rb +31 -0
- data/lib/nl/linux/version.rb +1 -1
- data/sig/generated/nl/linux/binder.rbs +366 -0
- data/sig/generated/nl/linux/conntrack.rbs +2787 -0
- data/sig/generated/nl/linux/dev_energymodel.rbs +636 -0
- data/sig/generated/nl/linux/devlink.rbs +12496 -0
- data/sig/generated/nl/linux/dpll.rbs +3461 -0
- data/sig/generated/nl/linux/drm_ras.rbs +553 -0
- data/sig/generated/nl/linux/ethtool.rbs +15291 -0
- data/sig/generated/nl/linux/fou.rbs +702 -0
- data/sig/generated/nl/linux/handshake.rbs +622 -0
- data/sig/generated/nl/linux/lockd.rbs +234 -0
- data/sig/generated/nl/linux/mptcp_pm.rbs +1511 -0
- data/sig/generated/nl/linux/net_shaper.rbs +1645 -0
- data/sig/generated/nl/linux/netdev.rbs +4187 -0
- data/sig/generated/nl/linux/nfsd.rbs +2520 -0
- data/sig/generated/nl/linux/nftables.rbs +10304 -0
- data/sig/generated/nl/linux/nl80211.rbs +9786 -0
- data/sig/generated/nl/linux/nlctrl.rbs +944 -0
- data/sig/generated/nl/linux/nlctrl_resolver.rbs +20 -0
- data/sig/generated/nl/linux/ovpn.rbs +2564 -0
- data/sig/generated/nl/linux/ovs_datapath.rbs +640 -0
- data/sig/generated/nl/linux/ovs_flow.rbs +3659 -0
- data/sig/generated/nl/linux/ovs_packet.rbs +540 -0
- data/sig/generated/nl/linux/ovs_vport.rbs +777 -0
- data/sig/generated/nl/linux/psp.rbs +1846 -0
- data/sig/generated/nl/linux/rt_addr.rbs +866 -0
- data/sig/generated/nl/linux/rt_link.rbs +13438 -0
- data/sig/generated/nl/linux/rt_neigh.rbs +2124 -0
- data/sig/generated/nl/linux/rt_route.rbs +2218 -0
- data/sig/generated/nl/linux/rt_rule.rbs +1726 -0
- data/sig/generated/nl/linux/sunrpc_cache.rbs +739 -0
- data/sig/generated/nl/linux/tc.rbs +19931 -0
- data/sig/generated/nl/linux/tcp_metrics.rbs +740 -0
- data/sig/generated/nl/linux/team.rbs +733 -0
- data/sig/generated/nl/linux/version.rbs +7 -0
- data/sig/generated/nl/linux/wireguard.rbs +1006 -0
- data/sig/generated/nl/linux.rbs +6 -0
- data/sig/generated/nl-linux.rbs +2 -0
- metadata +51 -10
data/generated/nl/linux/fou.rb
CHANGED
|
@@ -1,332 +1,580 @@
|
|
|
1
1
|
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
|
2
|
+
#
|
|
3
|
+
# This file is based on Documentation/netlink/specs/fou.yaml from Linux v7.2.
|
|
2
4
|
#--
|
|
3
5
|
# frozen_string_literal: true
|
|
4
|
-
# rbs_inline: enabled
|
|
5
6
|
# This code is generated by Ynl::Generator. DO NOT EDIT.
|
|
6
7
|
require 'nl'
|
|
7
8
|
module Nl; module Linux
|
|
8
9
|
# Foo-over-UDP.
|
|
9
|
-
class Fou < ::Nl::Family
|
|
10
|
+
class Fou < ::Nl::Genl::Family
|
|
10
11
|
NAME = "fou"
|
|
11
|
-
|
|
12
|
+
VERSION = 1
|
|
13
|
+
# @rbs (?resolver: ^(::Nl::Genl::Client, ::String) -> ::Nl::Genl::FamilyInfo, ?executor: executor?, ?notification_capacity: ::Integer?) -> (::Nl::Family::Session & instance)
|
|
14
|
+
# @rbs | [R] (?resolver: ^(::Nl::Genl::Client, ::String) -> ::Nl::Genl::FamilyInfo, ?executor: executor?, ?notification_capacity: ::Integer?) { (instance) -> R } -> R
|
|
15
|
+
# @overload open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
|
|
16
|
+
# @param [#call] resolver
|
|
17
|
+
# @param [Symbol, nil] executor
|
|
18
|
+
# @param [Integer, nil] notification_capacity
|
|
19
|
+
# @return [Fou]
|
|
20
|
+
# @overload open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY, &block)
|
|
21
|
+
# @param [#call] resolver
|
|
22
|
+
# @param [Symbol, nil] executor
|
|
23
|
+
# @param [Integer, nil] notification_capacity
|
|
24
|
+
# @yieldparam [Fou] family
|
|
25
|
+
# @return [Object] the result of the block
|
|
26
|
+
def self.open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
|
|
27
|
+
super
|
|
28
|
+
end
|
|
29
|
+
# @private
|
|
30
|
+
MCAST_GROUPS = Ractor.make_shareable({}) #: Hash[::Symbol, ::Nl::McastGroup]
|
|
31
|
+
module Enums
|
|
32
|
+
module EncapType
|
|
33
|
+
Unspec = 0
|
|
34
|
+
Direct = 1
|
|
35
|
+
Gue = 2
|
|
36
|
+
end
|
|
37
|
+
end
|
|
12
38
|
module Structs
|
|
13
39
|
end
|
|
14
40
|
module AttributeSets
|
|
15
|
-
class Fou < ::Nl::
|
|
41
|
+
class Fou < ::Nl::AttributeSet
|
|
16
42
|
# Abstract class
|
|
17
|
-
class Attribute < ::Nl::
|
|
43
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
18
44
|
end
|
|
19
45
|
class Port < Attribute
|
|
20
46
|
TYPE = 1
|
|
21
47
|
NAME = :"port"
|
|
22
|
-
|
|
48
|
+
# @private
|
|
49
|
+
ORDER = 0
|
|
50
|
+
# @private
|
|
51
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
|
|
23
52
|
end
|
|
24
53
|
class Af < Attribute
|
|
25
54
|
TYPE = 2
|
|
26
55
|
NAME = :"af"
|
|
27
|
-
|
|
56
|
+
# @private
|
|
57
|
+
ORDER = 1
|
|
58
|
+
# @private
|
|
59
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
28
60
|
end
|
|
29
61
|
class Ipproto < Attribute
|
|
30
62
|
TYPE = 3
|
|
31
63
|
NAME = :"ipproto"
|
|
32
|
-
|
|
64
|
+
# @private
|
|
65
|
+
ORDER = 2
|
|
66
|
+
# @private
|
|
67
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1 })
|
|
33
68
|
end
|
|
34
69
|
class Type < Attribute
|
|
35
70
|
TYPE = 4
|
|
36
71
|
NAME = :"type"
|
|
37
|
-
|
|
72
|
+
# @private
|
|
73
|
+
ORDER = 3
|
|
74
|
+
# @private
|
|
75
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
38
76
|
end
|
|
39
77
|
class RemcsumNopartial < Attribute
|
|
40
78
|
TYPE = 5
|
|
41
79
|
NAME = :"remcsum_nopartial"
|
|
42
|
-
|
|
80
|
+
# @private
|
|
81
|
+
ORDER = 4
|
|
82
|
+
# @private
|
|
83
|
+
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
43
84
|
end
|
|
44
85
|
class LocalV4 < Attribute
|
|
45
86
|
TYPE = 6
|
|
46
87
|
NAME = :"local_v4"
|
|
47
|
-
|
|
88
|
+
# @private
|
|
89
|
+
ORDER = 5
|
|
90
|
+
# @private
|
|
91
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
48
92
|
end
|
|
49
93
|
class LocalV6 < Attribute
|
|
50
94
|
TYPE = 7
|
|
51
95
|
NAME = :"local_v6"
|
|
52
|
-
|
|
96
|
+
# @private
|
|
97
|
+
ORDER = 6
|
|
98
|
+
# @private
|
|
99
|
+
DATATYPE = ::Nl::DataTypes::Binary.new(check: -> { raise ArgumentError, "Value #{it.inspect} is not equal to length 16" unless it.bytesize == 16 })
|
|
53
100
|
end
|
|
54
101
|
class PeerV4 < Attribute
|
|
55
102
|
TYPE = 8
|
|
56
103
|
NAME = :"peer_v4"
|
|
57
|
-
|
|
104
|
+
# @private
|
|
105
|
+
ORDER = 7
|
|
106
|
+
# @private
|
|
107
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
58
108
|
end
|
|
59
109
|
class PeerV6 < Attribute
|
|
60
110
|
TYPE = 9
|
|
61
111
|
NAME = :"peer_v6"
|
|
62
|
-
|
|
112
|
+
# @private
|
|
113
|
+
ORDER = 8
|
|
114
|
+
# @private
|
|
115
|
+
DATATYPE = ::Nl::DataTypes::Binary.new(check: -> { raise ArgumentError, "Value #{it.inspect} is not equal to length 16" unless it.bytesize == 16 })
|
|
63
116
|
end
|
|
64
117
|
class PeerPort < Attribute
|
|
65
118
|
TYPE = 10
|
|
66
119
|
NAME = :"peer_port"
|
|
67
|
-
|
|
120
|
+
# @private
|
|
121
|
+
ORDER = 9
|
|
122
|
+
# @private
|
|
123
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
|
|
68
124
|
end
|
|
69
125
|
class Ifindex < Attribute
|
|
70
126
|
TYPE = 11
|
|
71
127
|
NAME = :"ifindex"
|
|
72
|
-
|
|
128
|
+
# @private
|
|
129
|
+
ORDER = 10
|
|
130
|
+
# @private
|
|
131
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::S32, check: nil)
|
|
73
132
|
end
|
|
74
|
-
#
|
|
133
|
+
# @private
|
|
75
134
|
BY_NAME = Ractor.make_shareable({:"port" => Port, :"af" => Af, :"ipproto" => Ipproto, :"type" => Type, :"remcsum_nopartial" => RemcsumNopartial, :"local_v4" => LocalV4, :"local_v6" => LocalV6, :"peer_v4" => PeerV4, :"peer_v6" => PeerV6, :"peer_port" => PeerPort, :"ifindex" => Ifindex}) #: Hash[::Symbol, Attribute]
|
|
76
|
-
#
|
|
135
|
+
# @private
|
|
77
136
|
BY_TYPE = Ractor.make_shareable({1 => Port, 2 => Af, 3 => Ipproto, 4 => Type, 5 => RemcsumNopartial, 6 => LocalV4, 7 => LocalV6, 8 => PeerV4, 9 => PeerV6, 10 => PeerPort, 11 => Ifindex}) #: Hash[::Integer, Attribute]
|
|
137
|
+
# @rbs return: ::Integer
|
|
138
|
+
# @return [Integer]
|
|
139
|
+
# @see Port
|
|
140
|
+
def port; self[:"port"]&.value; end
|
|
141
|
+
# @rbs return: ::Integer
|
|
142
|
+
# @return [Integer]
|
|
143
|
+
# @see Af
|
|
144
|
+
def af; self[:"af"]&.value; end
|
|
145
|
+
# @rbs return: ::Integer
|
|
146
|
+
# @return [Integer]
|
|
147
|
+
# @see Ipproto
|
|
148
|
+
def ipproto; self[:"ipproto"]&.value; end
|
|
149
|
+
# @rbs return: ::Integer
|
|
150
|
+
# @return [Integer]
|
|
151
|
+
# @see Type
|
|
152
|
+
def type; self[:"type"]&.value; end
|
|
153
|
+
# @rbs return: ::Integer
|
|
154
|
+
# @return [Integer]
|
|
155
|
+
# @see RemcsumNopartial
|
|
156
|
+
def remcsum_nopartial; self[:"remcsum_nopartial"]&.value; end
|
|
157
|
+
# @rbs return: ::Integer
|
|
158
|
+
# @return [Integer]
|
|
159
|
+
# @see LocalV4
|
|
160
|
+
def local_v4; self[:"local_v4"]&.value; end
|
|
161
|
+
# @rbs return: ::String
|
|
162
|
+
# @return [String]
|
|
163
|
+
# @see LocalV6
|
|
164
|
+
def local_v6; self[:"local_v6"]&.value; end
|
|
165
|
+
# @rbs return: ::Integer
|
|
166
|
+
# @return [Integer]
|
|
167
|
+
# @see PeerV4
|
|
168
|
+
def peer_v4; self[:"peer_v4"]&.value; end
|
|
169
|
+
# @rbs return: ::String
|
|
170
|
+
# @return [String]
|
|
171
|
+
# @see PeerV6
|
|
172
|
+
def peer_v6; self[:"peer_v6"]&.value; end
|
|
173
|
+
# @rbs return: ::Integer
|
|
174
|
+
# @return [Integer]
|
|
175
|
+
# @see PeerPort
|
|
176
|
+
def peer_port; self[:"peer_port"]&.value; end
|
|
177
|
+
# @rbs return: ::Integer
|
|
178
|
+
# @return [Integer]
|
|
179
|
+
# @see Ifindex
|
|
180
|
+
def ifindex; self[:"ifindex"]&.value; end
|
|
78
181
|
class << self
|
|
79
182
|
# Looks up Attribute class by name.
|
|
80
|
-
#--
|
|
81
183
|
# @rbs name: Symbol
|
|
82
184
|
# @rbs return: Attribute
|
|
185
|
+
# @param [Symbol] name
|
|
186
|
+
# @return [Attribute]
|
|
83
187
|
def by_name(name); BY_NAME.fetch(name); end
|
|
84
188
|
# Looks up Attribute class by type value.
|
|
85
|
-
#--
|
|
86
189
|
# @rbs type: Integer
|
|
87
190
|
# @rbs return: Attribute
|
|
191
|
+
# @param [Integer] type
|
|
192
|
+
# @return [Attribute]
|
|
88
193
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
89
194
|
end
|
|
90
195
|
end
|
|
91
196
|
end
|
|
92
197
|
module Messages
|
|
93
198
|
# Add port.
|
|
94
|
-
|
|
199
|
+
#
|
|
200
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
201
|
+
class DoAddRequest < ::Nl::Genl::Message
|
|
95
202
|
TYPE = 1
|
|
96
203
|
FIXED_HEADER = nil
|
|
97
204
|
ATTRIBUTE_SET = AttributeSets::Fou
|
|
98
205
|
ATTRIBUTES = Ractor.make_shareable(%i[port ipproto type remcsum_nopartial local_v4 local_v6 peer_v4 peer_v6 peer_port ifindex])
|
|
99
|
-
# Gets the value of `port` attribute in the message.
|
|
100
|
-
#--
|
|
101
206
|
# @rbs return: ::Integer
|
|
207
|
+
# @return [Integer]
|
|
208
|
+
# @see AttributeSets::Fou::Port
|
|
102
209
|
def port; attributes[:"port"]&.value; end
|
|
103
|
-
# Gets the value of `ipproto` attribute in the message.
|
|
104
|
-
#--
|
|
105
210
|
# @rbs return: ::Integer
|
|
211
|
+
# @return [Integer]
|
|
212
|
+
# @see AttributeSets::Fou::Ipproto
|
|
106
213
|
def ipproto; attributes[:"ipproto"]&.value; end
|
|
107
|
-
# Gets the value of `type` attribute in the message.
|
|
108
|
-
#--
|
|
109
214
|
# @rbs return: ::Integer
|
|
215
|
+
# @return [Integer]
|
|
216
|
+
# @see AttributeSets::Fou::Type
|
|
110
217
|
def type; attributes[:"type"]&.value; end
|
|
111
|
-
# Gets the value of `remcsum-nopartial` attribute in the message.
|
|
112
|
-
#--
|
|
113
218
|
# @rbs return: ::Integer
|
|
219
|
+
# @return [Integer]
|
|
220
|
+
# @see AttributeSets::Fou::RemcsumNopartial
|
|
114
221
|
def remcsum_nopartial; attributes[:"remcsum_nopartial"]&.value; end
|
|
115
|
-
# Gets the value of `local-v4` attribute in the message.
|
|
116
|
-
#--
|
|
117
222
|
# @rbs return: ::Integer
|
|
223
|
+
# @return [Integer]
|
|
224
|
+
# @see AttributeSets::Fou::LocalV4
|
|
118
225
|
def local_v4; attributes[:"local_v4"]&.value; end
|
|
119
|
-
#
|
|
120
|
-
|
|
121
|
-
# @
|
|
226
|
+
# @rbs return: ::String
|
|
227
|
+
# @return [String]
|
|
228
|
+
# @see AttributeSets::Fou::LocalV6
|
|
122
229
|
def local_v6; attributes[:"local_v6"]&.value; end
|
|
123
|
-
# Gets the value of `peer-v4` attribute in the message.
|
|
124
|
-
#--
|
|
125
230
|
# @rbs return: ::Integer
|
|
231
|
+
# @return [Integer]
|
|
232
|
+
# @see AttributeSets::Fou::PeerV4
|
|
126
233
|
def peer_v4; attributes[:"peer_v4"]&.value; end
|
|
127
|
-
#
|
|
128
|
-
|
|
129
|
-
# @
|
|
234
|
+
# @rbs return: ::String
|
|
235
|
+
# @return [String]
|
|
236
|
+
# @see AttributeSets::Fou::PeerV6
|
|
130
237
|
def peer_v6; attributes[:"peer_v6"]&.value; end
|
|
131
|
-
# Gets the value of `peer-port` attribute in the message.
|
|
132
|
-
#--
|
|
133
238
|
# @rbs return: ::Integer
|
|
239
|
+
# @return [Integer]
|
|
240
|
+
# @see AttributeSets::Fou::PeerPort
|
|
134
241
|
def peer_port; attributes[:"peer_port"]&.value; end
|
|
135
|
-
# Gets the value of `ifindex` attribute in the message.
|
|
136
|
-
#--
|
|
137
242
|
# @rbs return: ::Integer
|
|
243
|
+
# @return [Integer]
|
|
244
|
+
# @see AttributeSets::Fou::Ifindex
|
|
138
245
|
def ifindex; attributes[:"ifindex"]&.value; end
|
|
139
246
|
end
|
|
140
247
|
# Delete port.
|
|
141
|
-
|
|
248
|
+
#
|
|
249
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
250
|
+
class DoDelRequest < ::Nl::Genl::Message
|
|
142
251
|
TYPE = 2
|
|
143
252
|
FIXED_HEADER = nil
|
|
144
253
|
ATTRIBUTE_SET = AttributeSets::Fou
|
|
145
254
|
ATTRIBUTES = Ractor.make_shareable(%i[port af local_v4 local_v6 peer_v4 peer_v6 peer_port ifindex])
|
|
146
|
-
# Gets the value of `port` attribute in the message.
|
|
147
|
-
#--
|
|
148
255
|
# @rbs return: ::Integer
|
|
256
|
+
# @return [Integer]
|
|
257
|
+
# @see AttributeSets::Fou::Port
|
|
149
258
|
def port; attributes[:"port"]&.value; end
|
|
150
|
-
# Gets the value of `af` attribute in the message.
|
|
151
|
-
#--
|
|
152
259
|
# @rbs return: ::Integer
|
|
260
|
+
# @return [Integer]
|
|
261
|
+
# @see AttributeSets::Fou::Af
|
|
153
262
|
def af; attributes[:"af"]&.value; end
|
|
154
|
-
# Gets the value of `local-v4` attribute in the message.
|
|
155
|
-
#--
|
|
156
263
|
# @rbs return: ::Integer
|
|
264
|
+
# @return [Integer]
|
|
265
|
+
# @see AttributeSets::Fou::LocalV4
|
|
157
266
|
def local_v4; attributes[:"local_v4"]&.value; end
|
|
158
|
-
#
|
|
159
|
-
|
|
160
|
-
# @
|
|
267
|
+
# @rbs return: ::String
|
|
268
|
+
# @return [String]
|
|
269
|
+
# @see AttributeSets::Fou::LocalV6
|
|
161
270
|
def local_v6; attributes[:"local_v6"]&.value; end
|
|
162
|
-
# Gets the value of `peer-v4` attribute in the message.
|
|
163
|
-
#--
|
|
164
271
|
# @rbs return: ::Integer
|
|
272
|
+
# @return [Integer]
|
|
273
|
+
# @see AttributeSets::Fou::PeerV4
|
|
165
274
|
def peer_v4; attributes[:"peer_v4"]&.value; end
|
|
166
|
-
#
|
|
167
|
-
|
|
168
|
-
# @
|
|
275
|
+
# @rbs return: ::String
|
|
276
|
+
# @return [String]
|
|
277
|
+
# @see AttributeSets::Fou::PeerV6
|
|
169
278
|
def peer_v6; attributes[:"peer_v6"]&.value; end
|
|
170
|
-
# Gets the value of `peer-port` attribute in the message.
|
|
171
|
-
#--
|
|
172
279
|
# @rbs return: ::Integer
|
|
280
|
+
# @return [Integer]
|
|
281
|
+
# @see AttributeSets::Fou::PeerPort
|
|
173
282
|
def peer_port; attributes[:"peer_port"]&.value; end
|
|
174
|
-
# Gets the value of `ifindex` attribute in the message.
|
|
175
|
-
#--
|
|
176
283
|
# @rbs return: ::Integer
|
|
284
|
+
# @return [Integer]
|
|
285
|
+
# @see AttributeSets::Fou::Ifindex
|
|
177
286
|
def ifindex; attributes[:"ifindex"]&.value; end
|
|
178
287
|
end
|
|
179
288
|
# Get tunnel info.
|
|
180
|
-
class DoGetRequest < ::Nl::
|
|
289
|
+
class DoGetRequest < ::Nl::Genl::Message
|
|
181
290
|
TYPE = 3
|
|
182
291
|
FIXED_HEADER = nil
|
|
183
292
|
ATTRIBUTE_SET = AttributeSets::Fou
|
|
184
293
|
ATTRIBUTES = Ractor.make_shareable(%i[port af local_v4 local_v6 peer_v4 peer_v6 peer_port ifindex])
|
|
185
|
-
# Gets the value of `port` attribute in the message.
|
|
186
|
-
#--
|
|
187
294
|
# @rbs return: ::Integer
|
|
295
|
+
# @return [Integer]
|
|
296
|
+
# @see AttributeSets::Fou::Port
|
|
188
297
|
def port; attributes[:"port"]&.value; end
|
|
189
|
-
# Gets the value of `af` attribute in the message.
|
|
190
|
-
#--
|
|
191
298
|
# @rbs return: ::Integer
|
|
299
|
+
# @return [Integer]
|
|
300
|
+
# @see AttributeSets::Fou::Af
|
|
192
301
|
def af; attributes[:"af"]&.value; end
|
|
193
|
-
# Gets the value of `local-v4` attribute in the message.
|
|
194
|
-
#--
|
|
195
302
|
# @rbs return: ::Integer
|
|
303
|
+
# @return [Integer]
|
|
304
|
+
# @see AttributeSets::Fou::LocalV4
|
|
196
305
|
def local_v4; attributes[:"local_v4"]&.value; end
|
|
197
|
-
#
|
|
198
|
-
|
|
199
|
-
# @
|
|
306
|
+
# @rbs return: ::String
|
|
307
|
+
# @return [String]
|
|
308
|
+
# @see AttributeSets::Fou::LocalV6
|
|
200
309
|
def local_v6; attributes[:"local_v6"]&.value; end
|
|
201
|
-
# Gets the value of `peer-v4` attribute in the message.
|
|
202
|
-
#--
|
|
203
310
|
# @rbs return: ::Integer
|
|
311
|
+
# @return [Integer]
|
|
312
|
+
# @see AttributeSets::Fou::PeerV4
|
|
204
313
|
def peer_v4; attributes[:"peer_v4"]&.value; end
|
|
205
|
-
#
|
|
206
|
-
|
|
207
|
-
# @
|
|
314
|
+
# @rbs return: ::String
|
|
315
|
+
# @return [String]
|
|
316
|
+
# @see AttributeSets::Fou::PeerV6
|
|
208
317
|
def peer_v6; attributes[:"peer_v6"]&.value; end
|
|
209
|
-
# Gets the value of `peer-port` attribute in the message.
|
|
210
|
-
#--
|
|
211
318
|
# @rbs return: ::Integer
|
|
319
|
+
# @return [Integer]
|
|
320
|
+
# @see AttributeSets::Fou::PeerPort
|
|
212
321
|
def peer_port; attributes[:"peer_port"]&.value; end
|
|
213
|
-
# Gets the value of `ifindex` attribute in the message.
|
|
214
|
-
#--
|
|
215
322
|
# @rbs return: ::Integer
|
|
323
|
+
# @return [Integer]
|
|
324
|
+
# @see AttributeSets::Fou::Ifindex
|
|
216
325
|
def ifindex; attributes[:"ifindex"]&.value; end
|
|
217
326
|
end
|
|
218
327
|
# Get tunnel info.
|
|
219
|
-
class DoGetReply < ::Nl::
|
|
328
|
+
class DoGetReply < ::Nl::Genl::Message
|
|
220
329
|
TYPE = 3
|
|
221
330
|
FIXED_HEADER = nil
|
|
222
331
|
ATTRIBUTE_SET = AttributeSets::Fou
|
|
223
332
|
ATTRIBUTES = Ractor.make_shareable(%i[port ipproto type remcsum_nopartial local_v4 local_v6 peer_v4 peer_v6 peer_port ifindex])
|
|
224
|
-
# Gets the value of `port` attribute in the message.
|
|
225
|
-
#--
|
|
226
333
|
# @rbs return: ::Integer
|
|
334
|
+
# @return [Integer]
|
|
335
|
+
# @see AttributeSets::Fou::Port
|
|
227
336
|
def port; attributes[:"port"]&.value; end
|
|
228
|
-
# Gets the value of `ipproto` attribute in the message.
|
|
229
|
-
#--
|
|
230
337
|
# @rbs return: ::Integer
|
|
338
|
+
# @return [Integer]
|
|
339
|
+
# @see AttributeSets::Fou::Ipproto
|
|
231
340
|
def ipproto; attributes[:"ipproto"]&.value; end
|
|
232
|
-
# Gets the value of `type` attribute in the message.
|
|
233
|
-
#--
|
|
234
341
|
# @rbs return: ::Integer
|
|
342
|
+
# @return [Integer]
|
|
343
|
+
# @see AttributeSets::Fou::Type
|
|
235
344
|
def type; attributes[:"type"]&.value; end
|
|
236
|
-
# Gets the value of `remcsum-nopartial` attribute in the message.
|
|
237
|
-
#--
|
|
238
345
|
# @rbs return: ::Integer
|
|
346
|
+
# @return [Integer]
|
|
347
|
+
# @see AttributeSets::Fou::RemcsumNopartial
|
|
239
348
|
def remcsum_nopartial; attributes[:"remcsum_nopartial"]&.value; end
|
|
240
|
-
# Gets the value of `local-v4` attribute in the message.
|
|
241
|
-
#--
|
|
242
349
|
# @rbs return: ::Integer
|
|
350
|
+
# @return [Integer]
|
|
351
|
+
# @see AttributeSets::Fou::LocalV4
|
|
243
352
|
def local_v4; attributes[:"local_v4"]&.value; end
|
|
244
|
-
#
|
|
245
|
-
|
|
246
|
-
# @
|
|
353
|
+
# @rbs return: ::String
|
|
354
|
+
# @return [String]
|
|
355
|
+
# @see AttributeSets::Fou::LocalV6
|
|
247
356
|
def local_v6; attributes[:"local_v6"]&.value; end
|
|
248
|
-
# Gets the value of `peer-v4` attribute in the message.
|
|
249
|
-
#--
|
|
250
357
|
# @rbs return: ::Integer
|
|
358
|
+
# @return [Integer]
|
|
359
|
+
# @see AttributeSets::Fou::PeerV4
|
|
251
360
|
def peer_v4; attributes[:"peer_v4"]&.value; end
|
|
252
|
-
#
|
|
253
|
-
|
|
254
|
-
# @
|
|
361
|
+
# @rbs return: ::String
|
|
362
|
+
# @return [String]
|
|
363
|
+
# @see AttributeSets::Fou::PeerV6
|
|
255
364
|
def peer_v6; attributes[:"peer_v6"]&.value; end
|
|
256
|
-
# Gets the value of `peer-port` attribute in the message.
|
|
257
|
-
#--
|
|
258
365
|
# @rbs return: ::Integer
|
|
366
|
+
# @return [Integer]
|
|
367
|
+
# @see AttributeSets::Fou::PeerPort
|
|
259
368
|
def peer_port; attributes[:"peer_port"]&.value; end
|
|
260
|
-
# Gets the value of `ifindex` attribute in the message.
|
|
261
|
-
#--
|
|
262
369
|
# @rbs return: ::Integer
|
|
370
|
+
# @return [Integer]
|
|
371
|
+
# @see AttributeSets::Fou::Ifindex
|
|
263
372
|
def ifindex; attributes[:"ifindex"]&.value; end
|
|
264
373
|
end
|
|
265
374
|
# Get tunnel info.
|
|
266
|
-
class
|
|
375
|
+
class DumpGetRequest < ::Nl::Genl::Message
|
|
376
|
+
TYPE = 3
|
|
377
|
+
FIXED_HEADER = nil
|
|
378
|
+
ATTRIBUTE_SET = AttributeSets::Fou
|
|
379
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
380
|
+
end
|
|
381
|
+
# Get tunnel info.
|
|
382
|
+
class DumpGetReply < ::Nl::Genl::Message
|
|
267
383
|
TYPE = 3
|
|
268
384
|
FIXED_HEADER = nil
|
|
269
385
|
ATTRIBUTE_SET = AttributeSets::Fou
|
|
270
386
|
ATTRIBUTES = Ractor.make_shareable(%i[port ipproto type remcsum_nopartial local_v4 local_v6 peer_v4 peer_v6 peer_port ifindex])
|
|
271
|
-
# Gets the value of `port` attribute in the message.
|
|
272
|
-
#--
|
|
273
387
|
# @rbs return: ::Integer
|
|
388
|
+
# @return [Integer]
|
|
389
|
+
# @see AttributeSets::Fou::Port
|
|
274
390
|
def port; attributes[:"port"]&.value; end
|
|
275
|
-
# Gets the value of `ipproto` attribute in the message.
|
|
276
|
-
#--
|
|
277
391
|
# @rbs return: ::Integer
|
|
392
|
+
# @return [Integer]
|
|
393
|
+
# @see AttributeSets::Fou::Ipproto
|
|
278
394
|
def ipproto; attributes[:"ipproto"]&.value; end
|
|
279
|
-
# Gets the value of `type` attribute in the message.
|
|
280
|
-
#--
|
|
281
395
|
# @rbs return: ::Integer
|
|
396
|
+
# @return [Integer]
|
|
397
|
+
# @see AttributeSets::Fou::Type
|
|
282
398
|
def type; attributes[:"type"]&.value; end
|
|
283
|
-
# Gets the value of `remcsum-nopartial` attribute in the message.
|
|
284
|
-
#--
|
|
285
399
|
# @rbs return: ::Integer
|
|
400
|
+
# @return [Integer]
|
|
401
|
+
# @see AttributeSets::Fou::RemcsumNopartial
|
|
286
402
|
def remcsum_nopartial; attributes[:"remcsum_nopartial"]&.value; end
|
|
287
|
-
# Gets the value of `local-v4` attribute in the message.
|
|
288
|
-
#--
|
|
289
403
|
# @rbs return: ::Integer
|
|
404
|
+
# @return [Integer]
|
|
405
|
+
# @see AttributeSets::Fou::LocalV4
|
|
290
406
|
def local_v4; attributes[:"local_v4"]&.value; end
|
|
291
|
-
#
|
|
292
|
-
|
|
293
|
-
# @
|
|
407
|
+
# @rbs return: ::String
|
|
408
|
+
# @return [String]
|
|
409
|
+
# @see AttributeSets::Fou::LocalV6
|
|
294
410
|
def local_v6; attributes[:"local_v6"]&.value; end
|
|
295
|
-
# Gets the value of `peer-v4` attribute in the message.
|
|
296
|
-
#--
|
|
297
411
|
# @rbs return: ::Integer
|
|
412
|
+
# @return [Integer]
|
|
413
|
+
# @see AttributeSets::Fou::PeerV4
|
|
298
414
|
def peer_v4; attributes[:"peer_v4"]&.value; end
|
|
299
|
-
#
|
|
300
|
-
|
|
301
|
-
# @
|
|
415
|
+
# @rbs return: ::String
|
|
416
|
+
# @return [String]
|
|
417
|
+
# @see AttributeSets::Fou::PeerV6
|
|
302
418
|
def peer_v6; attributes[:"peer_v6"]&.value; end
|
|
303
|
-
# Gets the value of `peer-port` attribute in the message.
|
|
304
|
-
#--
|
|
305
419
|
# @rbs return: ::Integer
|
|
420
|
+
# @return [Integer]
|
|
421
|
+
# @see AttributeSets::Fou::PeerPort
|
|
306
422
|
def peer_port; attributes[:"peer_port"]&.value; end
|
|
307
|
-
# Gets the value of `ifindex` attribute in the message.
|
|
308
|
-
#--
|
|
309
423
|
# @rbs return: ::Integer
|
|
424
|
+
# @return [Integer]
|
|
425
|
+
# @see AttributeSets::Fou::Ifindex
|
|
310
426
|
def ifindex; attributes[:"ifindex"]&.value; end
|
|
311
427
|
end
|
|
312
428
|
end
|
|
429
|
+
module Notifications
|
|
430
|
+
end
|
|
431
|
+
# @private
|
|
432
|
+
NOTIFICATIONS = Ractor.make_shareable({}) #: Hash[::Integer, ::Class]
|
|
313
433
|
# Add port.
|
|
314
|
-
|
|
315
|
-
#
|
|
434
|
+
#
|
|
435
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
436
|
+
# @rbs (?port: ::Integer, ?ipproto: ::Integer, ?type: ::Integer, ?remcsum_nopartial: ::Integer, ?local_v4: ::Integer, ?local_v6: ::String, ?peer_v4: ::Integer, ?peer_v6: ::String, ?peer_port: ::Integer, ?ifindex: ::Integer) -> void
|
|
437
|
+
# @param [Hash] args
|
|
438
|
+
# @option args [Integer] port
|
|
439
|
+
# @option args [Integer] ipproto
|
|
440
|
+
# @option args [Integer] type
|
|
441
|
+
# @option args [Integer] remcsum_nopartial
|
|
442
|
+
# @option args [Integer] local_v4
|
|
443
|
+
# @option args [String] local_v6
|
|
444
|
+
# @option args [Integer] peer_v4
|
|
445
|
+
# @option args [String] peer_v6
|
|
446
|
+
# @option args [Integer] peer_port
|
|
447
|
+
# @option args [Integer] ifindex
|
|
448
|
+
# @return [void]
|
|
449
|
+
# @see Messages::DoAddRequest
|
|
316
450
|
def do_add(**args)
|
|
317
451
|
exchange_message(:"do", Messages::DoAddRequest, nil, args)
|
|
318
452
|
end
|
|
319
453
|
# Delete port.
|
|
320
|
-
|
|
321
|
-
#
|
|
454
|
+
#
|
|
455
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
456
|
+
# @rbs (?port: ::Integer, ?af: ::Integer, ?local_v4: ::Integer, ?local_v6: ::String, ?peer_v4: ::Integer, ?peer_v6: ::String, ?peer_port: ::Integer, ?ifindex: ::Integer) -> void
|
|
457
|
+
# @param [Hash] args
|
|
458
|
+
# @option args [Integer] port
|
|
459
|
+
# @option args [Integer] af
|
|
460
|
+
# @option args [Integer] local_v4
|
|
461
|
+
# @option args [String] local_v6
|
|
462
|
+
# @option args [Integer] peer_v4
|
|
463
|
+
# @option args [String] peer_v6
|
|
464
|
+
# @option args [Integer] peer_port
|
|
465
|
+
# @option args [Integer] ifindex
|
|
466
|
+
# @return [void]
|
|
467
|
+
# @see Messages::DoDelRequest
|
|
322
468
|
def do_del(**args)
|
|
323
469
|
exchange_message(:"do", Messages::DoDelRequest, nil, args)
|
|
324
470
|
end
|
|
325
471
|
# Get tunnel info.
|
|
326
|
-
|
|
327
|
-
# @
|
|
472
|
+
# @rbs (?port: ::Integer, ?af: ::Integer, ?local_v4: ::Integer, ?local_v6: ::String, ?peer_v4: ::Integer, ?peer_v6: ::String, ?peer_port: ::Integer, ?ifindex: ::Integer) -> Messages::DoGetReply
|
|
473
|
+
# @param [Hash] args
|
|
474
|
+
# @option args [Integer] port
|
|
475
|
+
# @option args [Integer] af
|
|
476
|
+
# @option args [Integer] local_v4
|
|
477
|
+
# @option args [String] local_v6
|
|
478
|
+
# @option args [Integer] peer_v4
|
|
479
|
+
# @option args [String] peer_v6
|
|
480
|
+
# @option args [Integer] peer_port
|
|
481
|
+
# @option args [Integer] ifindex
|
|
482
|
+
# @return [Messages::DoGetReply]
|
|
483
|
+
# @see Messages::DoGetRequest
|
|
328
484
|
def do_get(**args)
|
|
329
485
|
exchange_message(:"do", Messages::DoGetRequest, Messages::DoGetReply, args)
|
|
330
486
|
end
|
|
487
|
+
# Get tunnel info.
|
|
488
|
+
# @rbs () -> Array[Messages::DumpGetReply]
|
|
489
|
+
# | () { (Messages::DumpGetReply) -> void } -> void
|
|
490
|
+
# @overload dump_get(**args)
|
|
491
|
+
# Returns an array when no block is given.
|
|
492
|
+
# @param [Hash] args
|
|
493
|
+
# @return [Array<Messages::DumpGetReply>]
|
|
494
|
+
# @overload dump_get(**args, &block)
|
|
495
|
+
# Yields each reply when a block is given.
|
|
496
|
+
# @param [Hash] args
|
|
497
|
+
# @yieldparam [Messages::DumpGetReply] reply
|
|
498
|
+
# @return [void]
|
|
499
|
+
# @see Messages::DumpGetRequest
|
|
500
|
+
def dump_get(**args, &block)
|
|
501
|
+
exchange_message(:"dump", Messages::DumpGetRequest, Messages::DumpGetReply, args, &block)
|
|
502
|
+
end
|
|
503
|
+
class AsyncOperations
|
|
504
|
+
# @private
|
|
505
|
+
def initialize(&exchange)
|
|
506
|
+
@exchange = exchange
|
|
507
|
+
end
|
|
508
|
+
# Add port.
|
|
509
|
+
#
|
|
510
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
511
|
+
# @rbs (?port: ::Integer, ?ipproto: ::Integer, ?type: ::Integer, ?remcsum_nopartial: ::Integer, ?local_v4: ::Integer, ?local_v6: ::String, ?peer_v4: ::Integer, ?peer_v6: ::String, ?peer_port: ::Integer, ?ifindex: ::Integer) -> ::Nl::Async::Future[void]
|
|
512
|
+
# @param [Hash] args
|
|
513
|
+
# @option args [Integer] port
|
|
514
|
+
# @option args [Integer] ipproto
|
|
515
|
+
# @option args [Integer] type
|
|
516
|
+
# @option args [Integer] remcsum_nopartial
|
|
517
|
+
# @option args [Integer] local_v4
|
|
518
|
+
# @option args [String] local_v6
|
|
519
|
+
# @option args [Integer] peer_v4
|
|
520
|
+
# @option args [String] peer_v6
|
|
521
|
+
# @option args [Integer] peer_port
|
|
522
|
+
# @option args [Integer] ifindex
|
|
523
|
+
# @return [Nl::Async::Future<void>]
|
|
524
|
+
# @see Messages::DoAddRequest
|
|
525
|
+
def do_add(**args)
|
|
526
|
+
@exchange.call(:"do", Messages::DoAddRequest, nil, args)
|
|
527
|
+
end
|
|
528
|
+
# Delete port.
|
|
529
|
+
#
|
|
530
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
531
|
+
# @rbs (?port: ::Integer, ?af: ::Integer, ?local_v4: ::Integer, ?local_v6: ::String, ?peer_v4: ::Integer, ?peer_v6: ::String, ?peer_port: ::Integer, ?ifindex: ::Integer) -> ::Nl::Async::Future[void]
|
|
532
|
+
# @param [Hash] args
|
|
533
|
+
# @option args [Integer] port
|
|
534
|
+
# @option args [Integer] af
|
|
535
|
+
# @option args [Integer] local_v4
|
|
536
|
+
# @option args [String] local_v6
|
|
537
|
+
# @option args [Integer] peer_v4
|
|
538
|
+
# @option args [String] peer_v6
|
|
539
|
+
# @option args [Integer] peer_port
|
|
540
|
+
# @option args [Integer] ifindex
|
|
541
|
+
# @return [Nl::Async::Future<void>]
|
|
542
|
+
# @see Messages::DoDelRequest
|
|
543
|
+
def do_del(**args)
|
|
544
|
+
@exchange.call(:"do", Messages::DoDelRequest, nil, args)
|
|
545
|
+
end
|
|
546
|
+
# Get tunnel info.
|
|
547
|
+
# @rbs (?port: ::Integer, ?af: ::Integer, ?local_v4: ::Integer, ?local_v6: ::String, ?peer_v4: ::Integer, ?peer_v6: ::String, ?peer_port: ::Integer, ?ifindex: ::Integer) -> ::Nl::Async::Future[Messages::DoGetReply]
|
|
548
|
+
# @param [Hash] args
|
|
549
|
+
# @option args [Integer] port
|
|
550
|
+
# @option args [Integer] af
|
|
551
|
+
# @option args [Integer] local_v4
|
|
552
|
+
# @option args [String] local_v6
|
|
553
|
+
# @option args [Integer] peer_v4
|
|
554
|
+
# @option args [String] peer_v6
|
|
555
|
+
# @option args [Integer] peer_port
|
|
556
|
+
# @option args [Integer] ifindex
|
|
557
|
+
# @return [Nl::Async::Future<Messages::DoGetReply>]
|
|
558
|
+
# @see Messages::DoGetRequest
|
|
559
|
+
def do_get(**args)
|
|
560
|
+
@exchange.call(:"do", Messages::DoGetRequest, Messages::DoGetReply, args)
|
|
561
|
+
end
|
|
562
|
+
# Get tunnel info.
|
|
563
|
+
# @rbs () -> ::Nl::Async::Stream[Messages::DumpGetReply]
|
|
564
|
+
# @param [Hash] args
|
|
565
|
+
# @return [Nl::Async::Stream<Messages::DumpGetReply>]
|
|
566
|
+
# @see Messages::DumpGetRequest
|
|
567
|
+
def dump_get(**args)
|
|
568
|
+
@exchange.call(:"dump", Messages::DumpGetRequest, Messages::DumpGetReply, args)
|
|
569
|
+
end
|
|
570
|
+
end
|
|
571
|
+
# Returns the asynchronous operation facade for this family.
|
|
572
|
+
# @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
|
|
573
|
+
# @param [::Integer, nil] stream_capacity
|
|
574
|
+
# @return [AsyncOperations]
|
|
575
|
+
def async(stream_capacity: nil)
|
|
576
|
+
return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
|
|
577
|
+
build_async_facade(AsyncOperations, stream_capacity:)
|
|
578
|
+
end
|
|
331
579
|
end
|
|
332
580
|
end; end
|