nl-linux 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/NLSPEC_VERSION +1 -1
- data/generated/nl/linux/binder.rb +103 -187
- data/generated/nl/linux/conntrack.rb +1053 -1649
- data/generated/nl/linux/dev_energymodel.rb +303 -265
- data/generated/nl/linux/devlink.rb +4904 -5576
- data/generated/nl/linux/dpll.rb +1097 -1467
- data/generated/nl/linux/drm_ras.rb +235 -195
- data/generated/nl/linux/ethtool.rb +6652 -7415
- data/generated/nl/linux/fou.rb +234 -255
- data/generated/nl/linux/handshake.rb +208 -280
- data/generated/nl/linux/lockd.rb +99 -73
- data/generated/nl/linux/mptcp_pm.rb +589 -687
- data/generated/nl/linux/net_shaper.rb +520 -615
- data/generated/nl/linux/netdev.rb +1640 -1987
- data/generated/nl/linux/nfsd.rb +1341 -1215
- data/generated/nl/linux/nftables.rb +5143 -4870
- data/generated/nl/linux/nl80211.rb +2542 -6316
- data/generated/nl/linux/nlctrl.rb +338 -483
- data/generated/nl/linux/ovpn.rb +1006 -1522
- data/generated/nl/linux/ovs_datapath.rb +291 -186
- data/generated/nl/linux/ovs_flow.rb +1393 -2065
- data/generated/nl/linux/ovs_packet.rb +186 -223
- data/generated/nl/linux/ovs_vport.rb +328 -285
- data/generated/nl/linux/psp.rb +812 -717
- data/generated/nl/linux/rt_addr.rb +513 -243
- data/generated/nl/linux/rt_link.rb +4504 -7238
- data/generated/nl/linux/rt_neigh.rb +935 -847
- data/generated/nl/linux/rt_route.rb +1198 -871
- data/generated/nl/linux/rt_rule.rb +680 -659
- data/generated/nl/linux/sunrpc_cache.rb +323 -321
- data/generated/nl/linux/tc.rb +9058 -10454
- data/generated/nl/linux/tcp_metrics.rb +258 -367
- data/generated/nl/linux/team.rb +327 -345
- data/generated/nl/linux/wireguard.rb +270 -434
- data/lib/nl/linux/nlctrl_resolver.rb +1 -1
- data/lib/nl/linux/version.rb +1 -1
- data/linux/conntrack.yaml +18 -3
- data/linux/devlink.yaml +26 -4
- data/linux/dpll.yaml +19 -0
- data/linux/netdev.yaml +21 -0
- data/linux/nfsd.yaml +111 -0
- data/linux/nl80211.yaml +2 -2
- data/linux/rt-addr.yaml +4 -0
- data/linux/rt-link.yaml +7 -0
- data/linux/rt-neigh.yaml +3 -0
- data/linux/rt-route.yaml +83 -2
- data/sig/generated/nl/linux/binder.rbs +77 -220
- data/sig/generated/nl/linux/conntrack.rbs +770 -1954
- data/sig/generated/nl/linux/dev_energymodel.rbs +207 -291
- data/sig/generated/nl/linux/devlink.rbs +3318 -6068
- data/sig/generated/nl/linux/dpll.rbs +791 -1589
- data/sig/generated/nl/linux/drm_ras.rbs +160 -208
- data/sig/generated/nl/linux/ethtool.rbs +4205 -7581
- data/sig/generated/nl/linux/fou.rbs +139 -254
- data/sig/generated/nl/linux/handshake.rbs +144 -319
- data/sig/generated/nl/linux/lockd.rbs +64 -74
- data/sig/generated/nl/linux/mptcp_pm.rbs +426 -835
- data/sig/generated/nl/linux/net_shaper.rbs +351 -644
- data/sig/generated/nl/linux/netdev.rbs +1151 -2146
- data/sig/generated/nl/linux/nfsd.rbs +1047 -1409
- data/sig/generated/nl/linux/nftables.rbs +2907 -5030
- data/sig/generated/nl/linux/nl80211.rbs +1807 -7964
- data/sig/generated/nl/linux/nlctrl.rbs +220 -544
- data/sig/generated/nl/linux/ovpn.rbs +835 -1859
- data/sig/generated/nl/linux/ovs_datapath.rbs +141 -181
- data/sig/generated/nl/linux/ovs_flow.rbs +817 -2332
- data/sig/generated/nl/linux/ovs_packet.rbs +110 -237
- data/sig/generated/nl/linux/ovs_vport.rbs +174 -294
- data/sig/generated/nl/linux/psp.rbs +550 -741
- data/sig/generated/nl/linux/rt_addr.rbs +188 -226
- data/sig/generated/nl/linux/rt_link.rbs +2687 -8370
- data/sig/generated/nl/linux/rt_neigh.rbs +471 -1005
- data/sig/generated/nl/linux/rt_route.rbs +632 -862
- data/sig/generated/nl/linux/rt_rule.rbs +217 -639
- data/sig/generated/nl/linux/sunrpc_cache.rbs +233 -369
- data/sig/generated/nl/linux/tc.rbs +6199 -13391
- data/sig/generated/nl/linux/tcp_metrics.rbs +179 -421
- data/sig/generated/nl/linux/team.rbs +232 -391
- data/sig/generated/nl/linux/wireguard.rbs +197 -502
- metadata +6 -6
data/generated/nl/linux/fou.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
|
2
2
|
#
|
|
3
|
-
# This file is based on Documentation/netlink/specs/fou.yaml from Linux v7.
|
|
3
|
+
# This file is based on Documentation/netlink/specs/fou.yaml from Linux v7.3.
|
|
4
4
|
#--
|
|
5
5
|
# frozen_string_literal: true
|
|
6
6
|
# This code is generated by Ynl::Generator. DO NOT EDIT.
|
|
@@ -27,7 +27,7 @@ class Fou < ::Nl::Genl::Family
|
|
|
27
27
|
super
|
|
28
28
|
end
|
|
29
29
|
# @private
|
|
30
|
-
MCAST_GROUPS =
|
|
30
|
+
MCAST_GROUPS = {}.freeze #: Hash[::Symbol, ::Nl::McastGroup]
|
|
31
31
|
module Enums
|
|
32
32
|
module EncapType
|
|
33
33
|
Unspec = 0
|
|
@@ -39,158 +39,69 @@ class Fou < ::Nl::Genl::Family
|
|
|
39
39
|
end
|
|
40
40
|
module AttributeSets
|
|
41
41
|
class Fou < ::Nl::AttributeSet
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
module Definitions
|
|
43
|
+
# @rbs return: ::Integer
|
|
44
|
+
# @return [Integer]
|
|
45
|
+
def port; self[:"port"]; end
|
|
46
|
+
# @rbs return: ::Integer
|
|
47
|
+
# @return [Integer]
|
|
48
|
+
def af; self[:"af"]; end
|
|
49
|
+
# @rbs return: ::Integer
|
|
50
|
+
# @return [Integer]
|
|
51
|
+
def ipproto; self[:"ipproto"]; end
|
|
52
|
+
# @rbs return: ::Integer
|
|
53
|
+
# @return [Integer]
|
|
54
|
+
def type; self[:"type"]; end
|
|
55
|
+
# @rbs return: ::Integer
|
|
56
|
+
# @return [Integer]
|
|
57
|
+
def remcsum_nopartial; self[:"remcsum_nopartial"]; end
|
|
58
|
+
# @rbs return: ::Integer
|
|
59
|
+
# @return [Integer]
|
|
60
|
+
def local_v4; self[:"local_v4"]; end
|
|
61
|
+
# @rbs return: ::String
|
|
62
|
+
# @return [String]
|
|
63
|
+
def local_v6; self[:"local_v6"]; end
|
|
64
|
+
# @rbs return: ::Integer
|
|
65
|
+
# @return [Integer]
|
|
66
|
+
def peer_v4; self[:"peer_v4"]; end
|
|
67
|
+
# @rbs return: ::String
|
|
68
|
+
# @return [String]
|
|
69
|
+
def peer_v6; self[:"peer_v6"]; end
|
|
70
|
+
# @rbs return: ::Integer
|
|
71
|
+
# @return [Integer]
|
|
72
|
+
def peer_port; self[:"peer_port"]; end
|
|
73
|
+
# @rbs return: ::Integer
|
|
74
|
+
# @return [Integer]
|
|
75
|
+
def ifindex; self[:"ifindex"]; end
|
|
44
76
|
end
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
# @private
|
|
51
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
|
|
52
|
-
end
|
|
53
|
-
class Af < Attribute
|
|
54
|
-
TYPE = 2
|
|
55
|
-
NAME = :"af"
|
|
56
|
-
# @private
|
|
57
|
-
ORDER = 1
|
|
58
|
-
# @private
|
|
59
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
60
|
-
end
|
|
61
|
-
class Ipproto < Attribute
|
|
62
|
-
TYPE = 3
|
|
63
|
-
NAME = :"ipproto"
|
|
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 })
|
|
68
|
-
end
|
|
69
|
-
class Type < Attribute
|
|
70
|
-
TYPE = 4
|
|
71
|
-
NAME = :"type"
|
|
72
|
-
# @private
|
|
73
|
-
ORDER = 3
|
|
74
|
-
# @private
|
|
75
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
76
|
-
end
|
|
77
|
-
class RemcsumNopartial < Attribute
|
|
78
|
-
TYPE = 5
|
|
79
|
-
NAME = :"remcsum_nopartial"
|
|
80
|
-
# @private
|
|
81
|
-
ORDER = 4
|
|
82
|
-
# @private
|
|
83
|
-
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
84
|
-
end
|
|
85
|
-
class LocalV4 < Attribute
|
|
86
|
-
TYPE = 6
|
|
87
|
-
NAME = :"local_v4"
|
|
88
|
-
# @private
|
|
89
|
-
ORDER = 5
|
|
90
|
-
# @private
|
|
91
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
92
|
-
end
|
|
93
|
-
class LocalV6 < Attribute
|
|
94
|
-
TYPE = 7
|
|
95
|
-
NAME = :"local_v6"
|
|
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 })
|
|
100
|
-
end
|
|
101
|
-
class PeerV4 < Attribute
|
|
102
|
-
TYPE = 8
|
|
103
|
-
NAME = :"peer_v4"
|
|
104
|
-
# @private
|
|
105
|
-
ORDER = 7
|
|
106
|
-
# @private
|
|
107
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
108
|
-
end
|
|
109
|
-
class PeerV6 < Attribute
|
|
110
|
-
TYPE = 9
|
|
111
|
-
NAME = :"peer_v6"
|
|
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 })
|
|
77
|
+
include Definitions
|
|
78
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
79
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
80
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
81
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
116
82
|
end
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
# @private
|
|
123
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U16, check: nil)
|
|
124
|
-
end
|
|
125
|
-
class Ifindex < Attribute
|
|
126
|
-
TYPE = 11
|
|
127
|
-
NAME = :"ifindex"
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
module AttributeSets
|
|
86
|
+
class Fou
|
|
87
|
+
module Definitions
|
|
128
88
|
# @private
|
|
129
|
-
|
|
89
|
+
BY_TYPE = ::Array.new(12).tap do |definitions|
|
|
90
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"port", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new, multi: false, order: 0, selector_slot: nil)
|
|
91
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"af", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, multi: false, order: 1, selector_slot: nil)
|
|
92
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"ipproto", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1 } }), multi: false, order: 2, selector_slot: nil)
|
|
93
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"type", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U8].new, multi: false, order: 3, selector_slot: nil)
|
|
94
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"remcsum_nopartial", datatype: ::Nl::DataTypes::Flag.new, multi: false, order: 4, selector_slot: nil)
|
|
95
|
+
definitions[6] = ::Nl::AttributeSet::Definition.new(id: 6, name: :"local_v4", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 5, selector_slot: nil)
|
|
96
|
+
definitions[7] = ::Nl::AttributeSet::Definition.new(id: 7, name: :"local_v6", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Binary.new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is not equal to length 16" unless it.bytesize == 16 } }), multi: false, order: 6, selector_slot: nil)
|
|
97
|
+
definitions[8] = ::Nl::AttributeSet::Definition.new(id: 8, name: :"peer_v4", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 7, selector_slot: nil)
|
|
98
|
+
definitions[9] = ::Nl::AttributeSet::Definition.new(id: 9, name: :"peer_v6", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Binary.new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is not equal to length 16" unless it.bytesize == 16 } }), multi: false, order: 8, selector_slot: nil)
|
|
99
|
+
definitions[10] = ::Nl::AttributeSet::Definition.new(id: 10, name: :"peer_port", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Big::U16].new, multi: false, order: 9, selector_slot: nil)
|
|
100
|
+
definitions[11] = ::Nl::AttributeSet::Definition.new(id: 11, name: :"ifindex", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::S32].new, multi: false, order: 10, selector_slot: nil)
|
|
101
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
102
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
130
103
|
# @private
|
|
131
|
-
|
|
132
|
-
end
|
|
133
|
-
# @private
|
|
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]
|
|
135
|
-
# @private
|
|
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
|
|
181
|
-
class << self
|
|
182
|
-
# Looks up Attribute class by name.
|
|
183
|
-
# @rbs name: Symbol
|
|
184
|
-
# @rbs return: Attribute
|
|
185
|
-
# @param [Symbol] name
|
|
186
|
-
# @return [Attribute]
|
|
187
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
188
|
-
# Looks up Attribute class by type value.
|
|
189
|
-
# @rbs type: Integer
|
|
190
|
-
# @rbs return: Attribute
|
|
191
|
-
# @param [Integer] type
|
|
192
|
-
# @return [Attribute]
|
|
193
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
104
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
194
105
|
end
|
|
195
106
|
end
|
|
196
107
|
end
|
|
@@ -198,238 +109,306 @@ class Fou < ::Nl::Genl::Family
|
|
|
198
109
|
# Add port.
|
|
199
110
|
#
|
|
200
111
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
201
|
-
class DoAddRequest < ::Nl::
|
|
112
|
+
class DoAddRequest < ::Nl::Message
|
|
202
113
|
TYPE = 1
|
|
203
114
|
FIXED_HEADER = nil
|
|
204
115
|
ATTRIBUTE_SET = AttributeSets::Fou
|
|
205
|
-
ATTRIBUTES =
|
|
116
|
+
ATTRIBUTES = %i[port ipproto type remcsum_nopartial local_v4 local_v6 peer_v4 peer_v6 peer_port ifindex].freeze
|
|
117
|
+
include ATTRIBUTE_SET::Definitions
|
|
118
|
+
def initialize(attributes = [])
|
|
119
|
+
@attributes = attributes
|
|
120
|
+
end
|
|
121
|
+
# @private
|
|
122
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
123
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
124
|
+
new(
|
|
125
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
126
|
+
)
|
|
127
|
+
end
|
|
128
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
129
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
130
|
+
def self.decode(decoder)
|
|
131
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
132
|
+
end
|
|
133
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
134
|
+
encode_attributes(encoder, external_selectors:)
|
|
135
|
+
end
|
|
206
136
|
# @rbs return: ::Integer
|
|
207
137
|
# @return [Integer]
|
|
208
|
-
|
|
209
|
-
def port; attributes[:"port"]&.value; end
|
|
138
|
+
def port; self[:"port"]; end
|
|
210
139
|
# @rbs return: ::Integer
|
|
211
140
|
# @return [Integer]
|
|
212
|
-
|
|
213
|
-
def ipproto; attributes[:"ipproto"]&.value; end
|
|
141
|
+
def ipproto; self[:"ipproto"]; end
|
|
214
142
|
# @rbs return: ::Integer
|
|
215
143
|
# @return [Integer]
|
|
216
|
-
|
|
217
|
-
def type; attributes[:"type"]&.value; end
|
|
144
|
+
def type; self[:"type"]; end
|
|
218
145
|
# @rbs return: ::Integer
|
|
219
146
|
# @return [Integer]
|
|
220
|
-
|
|
221
|
-
def remcsum_nopartial; attributes[:"remcsum_nopartial"]&.value; end
|
|
147
|
+
def remcsum_nopartial; self[:"remcsum_nopartial"]; end
|
|
222
148
|
# @rbs return: ::Integer
|
|
223
149
|
# @return [Integer]
|
|
224
|
-
|
|
225
|
-
def local_v4; attributes[:"local_v4"]&.value; end
|
|
150
|
+
def local_v4; self[:"local_v4"]; end
|
|
226
151
|
# @rbs return: ::String
|
|
227
152
|
# @return [String]
|
|
228
|
-
|
|
229
|
-
def local_v6; attributes[:"local_v6"]&.value; end
|
|
153
|
+
def local_v6; self[:"local_v6"]; end
|
|
230
154
|
# @rbs return: ::Integer
|
|
231
155
|
# @return [Integer]
|
|
232
|
-
|
|
233
|
-
def peer_v4; attributes[:"peer_v4"]&.value; end
|
|
156
|
+
def peer_v4; self[:"peer_v4"]; end
|
|
234
157
|
# @rbs return: ::String
|
|
235
158
|
# @return [String]
|
|
236
|
-
|
|
237
|
-
def peer_v6; attributes[:"peer_v6"]&.value; end
|
|
159
|
+
def peer_v6; self[:"peer_v6"]; end
|
|
238
160
|
# @rbs return: ::Integer
|
|
239
161
|
# @return [Integer]
|
|
240
|
-
|
|
241
|
-
def peer_port; attributes[:"peer_port"]&.value; end
|
|
162
|
+
def peer_port; self[:"peer_port"]; end
|
|
242
163
|
# @rbs return: ::Integer
|
|
243
164
|
# @return [Integer]
|
|
244
|
-
|
|
245
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
165
|
+
def ifindex; self[:"ifindex"]; end
|
|
246
166
|
end
|
|
247
167
|
# Delete port.
|
|
248
168
|
#
|
|
249
169
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
250
|
-
class DoDelRequest < ::Nl::
|
|
170
|
+
class DoDelRequest < ::Nl::Message
|
|
251
171
|
TYPE = 2
|
|
252
172
|
FIXED_HEADER = nil
|
|
253
173
|
ATTRIBUTE_SET = AttributeSets::Fou
|
|
254
|
-
ATTRIBUTES =
|
|
174
|
+
ATTRIBUTES = %i[port af local_v4 local_v6 peer_v4 peer_v6 peer_port ifindex].freeze
|
|
175
|
+
include ATTRIBUTE_SET::Definitions
|
|
176
|
+
def initialize(attributes = [])
|
|
177
|
+
@attributes = attributes
|
|
178
|
+
end
|
|
179
|
+
# @private
|
|
180
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
181
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
182
|
+
new(
|
|
183
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
184
|
+
)
|
|
185
|
+
end
|
|
186
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
187
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
188
|
+
def self.decode(decoder)
|
|
189
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
190
|
+
end
|
|
191
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
192
|
+
encode_attributes(encoder, external_selectors:)
|
|
193
|
+
end
|
|
255
194
|
# @rbs return: ::Integer
|
|
256
195
|
# @return [Integer]
|
|
257
|
-
|
|
258
|
-
def port; attributes[:"port"]&.value; end
|
|
196
|
+
def port; self[:"port"]; end
|
|
259
197
|
# @rbs return: ::Integer
|
|
260
198
|
# @return [Integer]
|
|
261
|
-
|
|
262
|
-
def af; attributes[:"af"]&.value; end
|
|
199
|
+
def af; self[:"af"]; end
|
|
263
200
|
# @rbs return: ::Integer
|
|
264
201
|
# @return [Integer]
|
|
265
|
-
|
|
266
|
-
def local_v4; attributes[:"local_v4"]&.value; end
|
|
202
|
+
def local_v4; self[:"local_v4"]; end
|
|
267
203
|
# @rbs return: ::String
|
|
268
204
|
# @return [String]
|
|
269
|
-
|
|
270
|
-
def local_v6; attributes[:"local_v6"]&.value; end
|
|
205
|
+
def local_v6; self[:"local_v6"]; end
|
|
271
206
|
# @rbs return: ::Integer
|
|
272
207
|
# @return [Integer]
|
|
273
|
-
|
|
274
|
-
def peer_v4; attributes[:"peer_v4"]&.value; end
|
|
208
|
+
def peer_v4; self[:"peer_v4"]; end
|
|
275
209
|
# @rbs return: ::String
|
|
276
210
|
# @return [String]
|
|
277
|
-
|
|
278
|
-
def peer_v6; attributes[:"peer_v6"]&.value; end
|
|
211
|
+
def peer_v6; self[:"peer_v6"]; end
|
|
279
212
|
# @rbs return: ::Integer
|
|
280
213
|
# @return [Integer]
|
|
281
|
-
|
|
282
|
-
def peer_port; attributes[:"peer_port"]&.value; end
|
|
214
|
+
def peer_port; self[:"peer_port"]; end
|
|
283
215
|
# @rbs return: ::Integer
|
|
284
216
|
# @return [Integer]
|
|
285
|
-
|
|
286
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
217
|
+
def ifindex; self[:"ifindex"]; end
|
|
287
218
|
end
|
|
288
219
|
# Get tunnel info.
|
|
289
|
-
class DoGetRequest < ::Nl::
|
|
220
|
+
class DoGetRequest < ::Nl::Message
|
|
290
221
|
TYPE = 3
|
|
291
222
|
FIXED_HEADER = nil
|
|
292
223
|
ATTRIBUTE_SET = AttributeSets::Fou
|
|
293
|
-
ATTRIBUTES =
|
|
224
|
+
ATTRIBUTES = %i[port af local_v4 local_v6 peer_v4 peer_v6 peer_port ifindex].freeze
|
|
225
|
+
include ATTRIBUTE_SET::Definitions
|
|
226
|
+
def initialize(attributes = [])
|
|
227
|
+
@attributes = attributes
|
|
228
|
+
end
|
|
229
|
+
# @private
|
|
230
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
231
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
232
|
+
new(
|
|
233
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
234
|
+
)
|
|
235
|
+
end
|
|
236
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
237
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
238
|
+
def self.decode(decoder)
|
|
239
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
240
|
+
end
|
|
241
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
242
|
+
encode_attributes(encoder, external_selectors:)
|
|
243
|
+
end
|
|
294
244
|
# @rbs return: ::Integer
|
|
295
245
|
# @return [Integer]
|
|
296
|
-
|
|
297
|
-
def port; attributes[:"port"]&.value; end
|
|
246
|
+
def port; self[:"port"]; end
|
|
298
247
|
# @rbs return: ::Integer
|
|
299
248
|
# @return [Integer]
|
|
300
|
-
|
|
301
|
-
def af; attributes[:"af"]&.value; end
|
|
249
|
+
def af; self[:"af"]; end
|
|
302
250
|
# @rbs return: ::Integer
|
|
303
251
|
# @return [Integer]
|
|
304
|
-
|
|
305
|
-
def local_v4; attributes[:"local_v4"]&.value; end
|
|
252
|
+
def local_v4; self[:"local_v4"]; end
|
|
306
253
|
# @rbs return: ::String
|
|
307
254
|
# @return [String]
|
|
308
|
-
|
|
309
|
-
def local_v6; attributes[:"local_v6"]&.value; end
|
|
255
|
+
def local_v6; self[:"local_v6"]; end
|
|
310
256
|
# @rbs return: ::Integer
|
|
311
257
|
# @return [Integer]
|
|
312
|
-
|
|
313
|
-
def peer_v4; attributes[:"peer_v4"]&.value; end
|
|
258
|
+
def peer_v4; self[:"peer_v4"]; end
|
|
314
259
|
# @rbs return: ::String
|
|
315
260
|
# @return [String]
|
|
316
|
-
|
|
317
|
-
def peer_v6; attributes[:"peer_v6"]&.value; end
|
|
261
|
+
def peer_v6; self[:"peer_v6"]; end
|
|
318
262
|
# @rbs return: ::Integer
|
|
319
263
|
# @return [Integer]
|
|
320
|
-
|
|
321
|
-
def peer_port; attributes[:"peer_port"]&.value; end
|
|
264
|
+
def peer_port; self[:"peer_port"]; end
|
|
322
265
|
# @rbs return: ::Integer
|
|
323
266
|
# @return [Integer]
|
|
324
|
-
|
|
325
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
267
|
+
def ifindex; self[:"ifindex"]; end
|
|
326
268
|
end
|
|
327
269
|
# Get tunnel info.
|
|
328
|
-
class DoGetReply < ::Nl::
|
|
270
|
+
class DoGetReply < ::Nl::Message
|
|
329
271
|
TYPE = 3
|
|
330
272
|
FIXED_HEADER = nil
|
|
331
273
|
ATTRIBUTE_SET = AttributeSets::Fou
|
|
332
|
-
ATTRIBUTES =
|
|
274
|
+
ATTRIBUTES = %i[port ipproto type remcsum_nopartial local_v4 local_v6 peer_v4 peer_v6 peer_port ifindex].freeze
|
|
275
|
+
include ATTRIBUTE_SET::Definitions
|
|
276
|
+
def initialize(attributes = [])
|
|
277
|
+
@attributes = attributes
|
|
278
|
+
end
|
|
279
|
+
# @private
|
|
280
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
281
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
282
|
+
new(
|
|
283
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
284
|
+
)
|
|
285
|
+
end
|
|
286
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
287
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
288
|
+
def self.decode(decoder)
|
|
289
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
290
|
+
end
|
|
291
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
292
|
+
encode_attributes(encoder, external_selectors:)
|
|
293
|
+
end
|
|
333
294
|
# @rbs return: ::Integer
|
|
334
295
|
# @return [Integer]
|
|
335
|
-
|
|
336
|
-
def port; attributes[:"port"]&.value; end
|
|
296
|
+
def port; self[:"port"]; end
|
|
337
297
|
# @rbs return: ::Integer
|
|
338
298
|
# @return [Integer]
|
|
339
|
-
|
|
340
|
-
def ipproto; attributes[:"ipproto"]&.value; end
|
|
299
|
+
def ipproto; self[:"ipproto"]; end
|
|
341
300
|
# @rbs return: ::Integer
|
|
342
301
|
# @return [Integer]
|
|
343
|
-
|
|
344
|
-
def type; attributes[:"type"]&.value; end
|
|
302
|
+
def type; self[:"type"]; end
|
|
345
303
|
# @rbs return: ::Integer
|
|
346
304
|
# @return [Integer]
|
|
347
|
-
|
|
348
|
-
def remcsum_nopartial; attributes[:"remcsum_nopartial"]&.value; end
|
|
305
|
+
def remcsum_nopartial; self[:"remcsum_nopartial"]; end
|
|
349
306
|
# @rbs return: ::Integer
|
|
350
307
|
# @return [Integer]
|
|
351
|
-
|
|
352
|
-
def local_v4; attributes[:"local_v4"]&.value; end
|
|
308
|
+
def local_v4; self[:"local_v4"]; end
|
|
353
309
|
# @rbs return: ::String
|
|
354
310
|
# @return [String]
|
|
355
|
-
|
|
356
|
-
def local_v6; attributes[:"local_v6"]&.value; end
|
|
311
|
+
def local_v6; self[:"local_v6"]; end
|
|
357
312
|
# @rbs return: ::Integer
|
|
358
313
|
# @return [Integer]
|
|
359
|
-
|
|
360
|
-
def peer_v4; attributes[:"peer_v4"]&.value; end
|
|
314
|
+
def peer_v4; self[:"peer_v4"]; end
|
|
361
315
|
# @rbs return: ::String
|
|
362
316
|
# @return [String]
|
|
363
|
-
|
|
364
|
-
def peer_v6; attributes[:"peer_v6"]&.value; end
|
|
317
|
+
def peer_v6; self[:"peer_v6"]; end
|
|
365
318
|
# @rbs return: ::Integer
|
|
366
319
|
# @return [Integer]
|
|
367
|
-
|
|
368
|
-
def peer_port; attributes[:"peer_port"]&.value; end
|
|
320
|
+
def peer_port; self[:"peer_port"]; end
|
|
369
321
|
# @rbs return: ::Integer
|
|
370
322
|
# @return [Integer]
|
|
371
|
-
|
|
372
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
323
|
+
def ifindex; self[:"ifindex"]; end
|
|
373
324
|
end
|
|
374
325
|
# Get tunnel info.
|
|
375
|
-
class DumpGetRequest < ::Nl::
|
|
326
|
+
class DumpGetRequest < ::Nl::Message
|
|
376
327
|
TYPE = 3
|
|
377
328
|
FIXED_HEADER = nil
|
|
378
329
|
ATTRIBUTE_SET = AttributeSets::Fou
|
|
379
|
-
ATTRIBUTES =
|
|
330
|
+
ATTRIBUTES = %i[].freeze
|
|
331
|
+
include ATTRIBUTE_SET::Definitions
|
|
332
|
+
def initialize(attributes = [])
|
|
333
|
+
@attributes = attributes
|
|
334
|
+
end
|
|
335
|
+
# @private
|
|
336
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
337
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
338
|
+
new(
|
|
339
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
340
|
+
)
|
|
341
|
+
end
|
|
342
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
343
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
344
|
+
def self.decode(decoder)
|
|
345
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
346
|
+
end
|
|
347
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
348
|
+
encode_attributes(encoder, external_selectors:)
|
|
349
|
+
end
|
|
380
350
|
end
|
|
381
351
|
# Get tunnel info.
|
|
382
|
-
class DumpGetReply < ::Nl::
|
|
352
|
+
class DumpGetReply < ::Nl::Message
|
|
383
353
|
TYPE = 3
|
|
384
354
|
FIXED_HEADER = nil
|
|
385
355
|
ATTRIBUTE_SET = AttributeSets::Fou
|
|
386
|
-
ATTRIBUTES =
|
|
356
|
+
ATTRIBUTES = %i[port ipproto type remcsum_nopartial local_v4 local_v6 peer_v4 peer_v6 peer_port ifindex].freeze
|
|
357
|
+
include ATTRIBUTE_SET::Definitions
|
|
358
|
+
def initialize(attributes = [])
|
|
359
|
+
@attributes = attributes
|
|
360
|
+
end
|
|
361
|
+
# @private
|
|
362
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
363
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
364
|
+
new(
|
|
365
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
366
|
+
)
|
|
367
|
+
end
|
|
368
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
369
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
370
|
+
def self.decode(decoder)
|
|
371
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
372
|
+
end
|
|
373
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
374
|
+
encode_attributes(encoder, external_selectors:)
|
|
375
|
+
end
|
|
387
376
|
# @rbs return: ::Integer
|
|
388
377
|
# @return [Integer]
|
|
389
|
-
|
|
390
|
-
def port; attributes[:"port"]&.value; end
|
|
378
|
+
def port; self[:"port"]; end
|
|
391
379
|
# @rbs return: ::Integer
|
|
392
380
|
# @return [Integer]
|
|
393
|
-
|
|
394
|
-
def ipproto; attributes[:"ipproto"]&.value; end
|
|
381
|
+
def ipproto; self[:"ipproto"]; end
|
|
395
382
|
# @rbs return: ::Integer
|
|
396
383
|
# @return [Integer]
|
|
397
|
-
|
|
398
|
-
def type; attributes[:"type"]&.value; end
|
|
384
|
+
def type; self[:"type"]; end
|
|
399
385
|
# @rbs return: ::Integer
|
|
400
386
|
# @return [Integer]
|
|
401
|
-
|
|
402
|
-
def remcsum_nopartial; attributes[:"remcsum_nopartial"]&.value; end
|
|
387
|
+
def remcsum_nopartial; self[:"remcsum_nopartial"]; end
|
|
403
388
|
# @rbs return: ::Integer
|
|
404
389
|
# @return [Integer]
|
|
405
|
-
|
|
406
|
-
def local_v4; attributes[:"local_v4"]&.value; end
|
|
390
|
+
def local_v4; self[:"local_v4"]; end
|
|
407
391
|
# @rbs return: ::String
|
|
408
392
|
# @return [String]
|
|
409
|
-
|
|
410
|
-
def local_v6; attributes[:"local_v6"]&.value; end
|
|
393
|
+
def local_v6; self[:"local_v6"]; end
|
|
411
394
|
# @rbs return: ::Integer
|
|
412
395
|
# @return [Integer]
|
|
413
|
-
|
|
414
|
-
def peer_v4; attributes[:"peer_v4"]&.value; end
|
|
396
|
+
def peer_v4; self[:"peer_v4"]; end
|
|
415
397
|
# @rbs return: ::String
|
|
416
398
|
# @return [String]
|
|
417
|
-
|
|
418
|
-
def peer_v6; attributes[:"peer_v6"]&.value; end
|
|
399
|
+
def peer_v6; self[:"peer_v6"]; end
|
|
419
400
|
# @rbs return: ::Integer
|
|
420
401
|
# @return [Integer]
|
|
421
|
-
|
|
422
|
-
def peer_port; attributes[:"peer_port"]&.value; end
|
|
402
|
+
def peer_port; self[:"peer_port"]; end
|
|
423
403
|
# @rbs return: ::Integer
|
|
424
404
|
# @return [Integer]
|
|
425
|
-
|
|
426
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
405
|
+
def ifindex; self[:"ifindex"]; end
|
|
427
406
|
end
|
|
428
407
|
end
|
|
429
408
|
module Notifications
|
|
430
409
|
end
|
|
431
410
|
# @private
|
|
432
|
-
NOTIFICATIONS =
|
|
411
|
+
NOTIFICATIONS = {}.freeze #: Hash[::Integer, ::Class]
|
|
433
412
|
# Add port.
|
|
434
413
|
#
|
|
435
414
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|