nl-linux 0.3.0 → 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/.yardopts +5 -0
- data/CHANGELOG.md +6 -0
- data/Rakefile +14 -2
- data/generated/nl/linux/binder.rb +172 -44
- data/generated/nl/linux/conntrack.rb +1293 -370
- data/generated/nl/linux/dev_energymodel.rb +278 -93
- data/generated/nl/linux/devlink.rb +5654 -1954
- data/generated/nl/linux/dpll.rb +1838 -669
- data/generated/nl/linux/drm_ras.rb +234 -72
- data/generated/nl/linux/ethtool.rb +6683 -2885
- data/generated/nl/linux/fou.rb +308 -129
- data/generated/nl/linux/handshake.rb +277 -99
- data/generated/nl/linux/lockd.rb +88 -33
- data/generated/nl/linux/mptcp_pm.rb +639 -186
- data/generated/nl/linux/net_shaper.rb +782 -224
- data/generated/nl/linux/netdev.rb +2105 -631
- data/generated/nl/linux/nfsd.rb +1030 -358
- data/generated/nl/linux/nftables.rb +5041 -1612
- data/generated/nl/linux/nl80211.rb +4531 -871
- data/generated/nl/linux/nlctrl.rb +411 -119
- data/generated/nl/linux/ovpn.rb +1211 -293
- data/generated/nl/linux/ovs_datapath.rb +271 -106
- data/generated/nl/linux/ovs_flow.rb +1819 -354
- data/generated/nl/linux/ovs_packet.rb +257 -82
- data/generated/nl/linux/ovs_vport.rb +334 -132
- data/generated/nl/linux/psp.rb +916 -281
- data/generated/nl/linux/rt_addr.rb +369 -166
- data/generated/nl/linux/rt_link.rb +6708 -1450
- data/generated/nl/linux/rt_neigh.rb +919 -364
- data/generated/nl/linux/rt_route.rb +1034 -448
- data/generated/nl/linux/rt_rule.rb +775 -395
- data/generated/nl/linux/sunrpc_cache.rb +297 -102
- data/generated/nl/linux/tc.rb +9989 -1780
- data/generated/nl/linux/tcp_metrics.rb +327 -105
- data/generated/nl/linux/team.rb +279 -93
- data/generated/nl/linux/wireguard.rb +432 -95
- 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 +46 -7
|
@@ -3,34 +3,67 @@
|
|
|
3
3
|
# This file is based on Documentation/netlink/specs/rt-rule.yaml from Linux v7.2.
|
|
4
4
|
#--
|
|
5
5
|
# frozen_string_literal: true
|
|
6
|
-
# rbs_inline: enabled
|
|
7
6
|
# This code is generated by Ynl::Generator. DO NOT EDIT.
|
|
8
7
|
require 'nl'
|
|
9
8
|
module Nl; module Linux
|
|
10
9
|
# FIB rule management over rtnetlink.
|
|
11
|
-
class RtRule < ::Nl::Family
|
|
10
|
+
class RtRule < ::Nl::Raw::Family
|
|
12
11
|
NAME = "rt-rule"
|
|
13
|
-
|
|
12
|
+
PROTONUM = 0
|
|
13
|
+
# @rbs (?executor: executor?, ?notification_capacity: ::Integer?) -> (::Nl::Family::Session & instance)
|
|
14
|
+
# @rbs | [R] (?executor: executor?, ?notification_capacity: ::Integer?) { (instance) -> R } -> R
|
|
15
|
+
# @overload open(executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
|
|
16
|
+
# @param [Symbol, nil] executor
|
|
17
|
+
# @param [Integer, nil] notification_capacity
|
|
18
|
+
# @return [RtRule]
|
|
19
|
+
# @overload open(executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY, &block)
|
|
20
|
+
# @param [Symbol, nil] executor
|
|
21
|
+
# @param [Integer, nil] notification_capacity
|
|
22
|
+
# @yieldparam [RtRule] family
|
|
23
|
+
# @return [Object] the result of the block
|
|
24
|
+
def self.open(executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
|
|
25
|
+
super
|
|
26
|
+
end
|
|
27
|
+
# @private
|
|
14
28
|
MCAST_GROUPS = Ractor.make_shareable({:"rtnlgrp_ipv4_rule" => ::Nl::McastGroup.new("rtnlgrp-ipv4-rule", 8), :"rtnlgrp_ipv6_rule" => ::Nl::McastGroup.new("rtnlgrp-ipv6-rule", 19)}) #: Hash[::Symbol, ::Nl::McastGroup]
|
|
29
|
+
module Enums
|
|
30
|
+
module FrAct
|
|
31
|
+
Unspec = 0
|
|
32
|
+
ToTbl = 1
|
|
33
|
+
Goto = 2
|
|
34
|
+
Nop = 3
|
|
35
|
+
Res3 = 4
|
|
36
|
+
Res4 = 5
|
|
37
|
+
Blackhole = 6
|
|
38
|
+
Unreachable = 7
|
|
39
|
+
Prohibit = 8
|
|
40
|
+
end
|
|
41
|
+
end
|
|
15
42
|
module Structs
|
|
16
43
|
Rtgenmsg = Struct.new(
|
|
17
44
|
:"family", #: ::Integer
|
|
18
45
|
:"pad", #: nil
|
|
19
46
|
)
|
|
20
47
|
class Rtgenmsg
|
|
21
|
-
#
|
|
22
|
-
|
|
48
|
+
# @!attribute [rw] family
|
|
49
|
+
# @return [Integer]
|
|
50
|
+
# @!attribute [rw] pad
|
|
51
|
+
# @return [nil]
|
|
52
|
+
# @private
|
|
53
|
+
MEMBERS = Ractor.make_shareable({family: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), pad: ::Nl::DataTypes::Pad.new(3)}) #: Hash[::Symbol, ::Nl::_DataType]
|
|
23
54
|
# Decodes the struct.
|
|
24
|
-
#--
|
|
25
55
|
# @rbs decoder: ::Nl::Decoder
|
|
26
56
|
# @rbs return: instance
|
|
57
|
+
# @param [Nl::Decoder] decoder
|
|
58
|
+
# @return [self]
|
|
27
59
|
def self.decode(decoder)
|
|
28
60
|
self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
|
|
29
61
|
end
|
|
30
62
|
# Encodes the struct.
|
|
31
|
-
#--
|
|
32
63
|
# @rbs encoder: ::Nl::Encoder
|
|
33
64
|
# @rbs return: void
|
|
65
|
+
# @param [Nl::Encoder] encoder
|
|
66
|
+
# @return [void]
|
|
34
67
|
def encode(encoder)
|
|
35
68
|
MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
|
|
36
69
|
end
|
|
@@ -47,19 +80,39 @@ class RtRule < ::Nl::Family
|
|
|
47
80
|
:"flags", #: ::Integer
|
|
48
81
|
)
|
|
49
82
|
class FibRuleHdr
|
|
50
|
-
#
|
|
51
|
-
|
|
83
|
+
# @!attribute [rw] family
|
|
84
|
+
# @return [Integer]
|
|
85
|
+
# @!attribute [rw] dst_len
|
|
86
|
+
# @return [Integer]
|
|
87
|
+
# @!attribute [rw] src_len
|
|
88
|
+
# @return [Integer]
|
|
89
|
+
# @!attribute [rw] tos
|
|
90
|
+
# @return [Integer]
|
|
91
|
+
# @!attribute [rw] table
|
|
92
|
+
# @return [Integer]
|
|
93
|
+
# @!attribute [rw] res1
|
|
94
|
+
# @return [nil]
|
|
95
|
+
# @!attribute [rw] res2
|
|
96
|
+
# @return [nil]
|
|
97
|
+
# @!attribute [rw] action
|
|
98
|
+
# @return [Integer]
|
|
99
|
+
# @!attribute [rw] flags
|
|
100
|
+
# @return [Integer]
|
|
101
|
+
# @private
|
|
102
|
+
MEMBERS = Ractor.make_shareable({family: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), dst_len: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), src_len: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), tos: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), table: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), res1: ::Nl::DataTypes::Pad.new(1), res2: ::Nl::DataTypes::Pad.new(1), action: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil), flags: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
|
|
52
103
|
# Decodes the struct.
|
|
53
|
-
#--
|
|
54
104
|
# @rbs decoder: ::Nl::Decoder
|
|
55
105
|
# @rbs return: instance
|
|
106
|
+
# @param [Nl::Decoder] decoder
|
|
107
|
+
# @return [self]
|
|
56
108
|
def self.decode(decoder)
|
|
57
109
|
self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
|
|
58
110
|
end
|
|
59
111
|
# Encodes the struct.
|
|
60
|
-
#--
|
|
61
112
|
# @rbs encoder: ::Nl::Encoder
|
|
62
113
|
# @rbs return: void
|
|
114
|
+
# @param [Nl::Encoder] encoder
|
|
115
|
+
# @return [void]
|
|
63
116
|
def encode(encoder)
|
|
64
117
|
MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
|
|
65
118
|
end
|
|
@@ -69,19 +122,25 @@ class RtRule < ::Nl::Family
|
|
|
69
122
|
:"end", #: ::Integer
|
|
70
123
|
)
|
|
71
124
|
class FibRulePortRange
|
|
72
|
-
#
|
|
73
|
-
|
|
125
|
+
# @!attribute [rw] start
|
|
126
|
+
# @return [Integer]
|
|
127
|
+
# @!attribute [rw] end
|
|
128
|
+
# @return [Integer]
|
|
129
|
+
# @private
|
|
130
|
+
MEMBERS = Ractor.make_shareable({start: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil), end: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
|
|
74
131
|
# Decodes the struct.
|
|
75
|
-
#--
|
|
76
132
|
# @rbs decoder: ::Nl::Decoder
|
|
77
133
|
# @rbs return: instance
|
|
134
|
+
# @param [Nl::Decoder] decoder
|
|
135
|
+
# @return [self]
|
|
78
136
|
def self.decode(decoder)
|
|
79
137
|
self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
|
|
80
138
|
end
|
|
81
139
|
# Encodes the struct.
|
|
82
|
-
#--
|
|
83
140
|
# @rbs encoder: ::Nl::Encoder
|
|
84
141
|
# @rbs return: void
|
|
142
|
+
# @param [Nl::Encoder] encoder
|
|
143
|
+
# @return [void]
|
|
85
144
|
def encode(encoder)
|
|
86
145
|
MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
|
|
87
146
|
end
|
|
@@ -91,907 +150,1228 @@ class RtRule < ::Nl::Family
|
|
|
91
150
|
:"end", #: ::Integer
|
|
92
151
|
)
|
|
93
152
|
class FibRuleUidRange
|
|
94
|
-
#
|
|
95
|
-
|
|
153
|
+
# @!attribute [rw] start
|
|
154
|
+
# @return [Integer]
|
|
155
|
+
# @!attribute [rw] end
|
|
156
|
+
# @return [Integer]
|
|
157
|
+
# @private
|
|
158
|
+
MEMBERS = Ractor.make_shareable({start: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil), end: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)}) #: Hash[::Symbol, ::Nl::_DataType]
|
|
96
159
|
# Decodes the struct.
|
|
97
|
-
#--
|
|
98
160
|
# @rbs decoder: ::Nl::Decoder
|
|
99
161
|
# @rbs return: instance
|
|
162
|
+
# @param [Nl::Decoder] decoder
|
|
163
|
+
# @return [self]
|
|
100
164
|
def self.decode(decoder)
|
|
101
165
|
self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
|
|
102
166
|
end
|
|
103
167
|
# Encodes the struct.
|
|
104
|
-
#--
|
|
105
168
|
# @rbs encoder: ::Nl::Encoder
|
|
106
169
|
# @rbs return: void
|
|
170
|
+
# @param [Nl::Encoder] encoder
|
|
171
|
+
# @return [void]
|
|
107
172
|
def encode(encoder)
|
|
108
173
|
MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
|
|
109
174
|
end
|
|
110
175
|
end
|
|
111
176
|
end
|
|
112
177
|
module AttributeSets
|
|
113
|
-
class FibRuleAttrs < ::Nl::
|
|
178
|
+
class FibRuleAttrs < ::Nl::AttributeSet
|
|
114
179
|
# Abstract class
|
|
115
|
-
class Attribute < ::Nl::
|
|
180
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
116
181
|
end
|
|
117
182
|
class Dst < Attribute
|
|
118
183
|
TYPE = 1
|
|
119
184
|
NAME = :"dst"
|
|
120
|
-
|
|
185
|
+
# @private
|
|
186
|
+
ORDER = 0
|
|
187
|
+
# @private
|
|
188
|
+
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
121
189
|
end
|
|
122
190
|
class Src < Attribute
|
|
123
191
|
TYPE = 2
|
|
124
192
|
NAME = :"src"
|
|
125
|
-
|
|
193
|
+
# @private
|
|
194
|
+
ORDER = 1
|
|
195
|
+
# @private
|
|
196
|
+
DATATYPE = ::Nl::DataTypes::Binary.new(check: nil)
|
|
126
197
|
end
|
|
127
198
|
class Iifname < Attribute
|
|
128
199
|
TYPE = 3
|
|
129
200
|
NAME = :"iifname"
|
|
130
|
-
|
|
201
|
+
# @private
|
|
202
|
+
ORDER = 2
|
|
203
|
+
# @private
|
|
204
|
+
DATATYPE = ::Nl::DataTypes::String.new(check: nil)
|
|
131
205
|
end
|
|
132
206
|
class Goto < Attribute
|
|
133
207
|
TYPE = 4
|
|
134
208
|
NAME = :"goto"
|
|
135
|
-
|
|
209
|
+
# @private
|
|
210
|
+
ORDER = 3
|
|
211
|
+
# @private
|
|
212
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
136
213
|
end
|
|
137
214
|
class Unused2 < Attribute
|
|
138
215
|
TYPE = 5
|
|
139
216
|
NAME = :"unused2"
|
|
140
|
-
|
|
217
|
+
# @private
|
|
218
|
+
ORDER = 4
|
|
219
|
+
# @private
|
|
220
|
+
DATATYPE = ::Nl::DataTypes::Pad.new()
|
|
141
221
|
end
|
|
142
222
|
class Priority < Attribute
|
|
143
223
|
TYPE = 6
|
|
144
224
|
NAME = :"priority"
|
|
145
|
-
|
|
225
|
+
# @private
|
|
226
|
+
ORDER = 5
|
|
227
|
+
# @private
|
|
228
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
146
229
|
end
|
|
147
230
|
class Unused3 < Attribute
|
|
148
231
|
TYPE = 7
|
|
149
232
|
NAME = :"unused3"
|
|
150
|
-
|
|
233
|
+
# @private
|
|
234
|
+
ORDER = 6
|
|
235
|
+
# @private
|
|
236
|
+
DATATYPE = ::Nl::DataTypes::Pad.new()
|
|
151
237
|
end
|
|
152
238
|
class Unused4 < Attribute
|
|
153
239
|
TYPE = 8
|
|
154
240
|
NAME = :"unused4"
|
|
155
|
-
|
|
241
|
+
# @private
|
|
242
|
+
ORDER = 7
|
|
243
|
+
# @private
|
|
244
|
+
DATATYPE = ::Nl::DataTypes::Pad.new()
|
|
156
245
|
end
|
|
157
246
|
class Unused5 < Attribute
|
|
158
247
|
TYPE = 9
|
|
159
248
|
NAME = :"unused5"
|
|
160
|
-
|
|
249
|
+
# @private
|
|
250
|
+
ORDER = 8
|
|
251
|
+
# @private
|
|
252
|
+
DATATYPE = ::Nl::DataTypes::Pad.new()
|
|
161
253
|
end
|
|
162
254
|
class Fwmark < Attribute
|
|
163
255
|
TYPE = 10
|
|
164
256
|
NAME = :"fwmark"
|
|
165
|
-
|
|
257
|
+
# @private
|
|
258
|
+
ORDER = 9
|
|
259
|
+
# @private
|
|
260
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
166
261
|
end
|
|
167
262
|
class Flow < Attribute
|
|
168
263
|
TYPE = 11
|
|
169
264
|
NAME = :"flow"
|
|
170
|
-
|
|
265
|
+
# @private
|
|
266
|
+
ORDER = 10
|
|
267
|
+
# @private
|
|
268
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
171
269
|
end
|
|
172
270
|
class TunId < Attribute
|
|
173
271
|
TYPE = 12
|
|
174
272
|
NAME = :"tun_id"
|
|
175
|
-
|
|
273
|
+
# @private
|
|
274
|
+
ORDER = 11
|
|
275
|
+
# @private
|
|
276
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
176
277
|
end
|
|
177
278
|
class SuppressIfgroup < Attribute
|
|
178
279
|
TYPE = 13
|
|
179
280
|
NAME = :"suppress_ifgroup"
|
|
180
|
-
|
|
281
|
+
# @private
|
|
282
|
+
ORDER = 12
|
|
283
|
+
# @private
|
|
284
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
181
285
|
end
|
|
182
286
|
class SuppressPrefixlen < Attribute
|
|
183
287
|
TYPE = 14
|
|
184
288
|
NAME = :"suppress_prefixlen"
|
|
185
|
-
|
|
289
|
+
# @private
|
|
290
|
+
ORDER = 13
|
|
291
|
+
# @private
|
|
292
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
186
293
|
end
|
|
187
294
|
class Table < Attribute
|
|
188
295
|
TYPE = 15
|
|
189
296
|
NAME = :"table"
|
|
190
|
-
|
|
297
|
+
# @private
|
|
298
|
+
ORDER = 14
|
|
299
|
+
# @private
|
|
300
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
191
301
|
end
|
|
192
302
|
class Fwmask < Attribute
|
|
193
303
|
TYPE = 16
|
|
194
304
|
NAME = :"fwmask"
|
|
195
|
-
|
|
305
|
+
# @private
|
|
306
|
+
ORDER = 15
|
|
307
|
+
# @private
|
|
308
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
196
309
|
end
|
|
197
310
|
class Oifname < Attribute
|
|
198
311
|
TYPE = 17
|
|
199
312
|
NAME = :"oifname"
|
|
200
|
-
|
|
313
|
+
# @private
|
|
314
|
+
ORDER = 16
|
|
315
|
+
# @private
|
|
316
|
+
DATATYPE = ::Nl::DataTypes::String.new(check: nil)
|
|
201
317
|
end
|
|
202
318
|
class Pad < Attribute
|
|
203
319
|
TYPE = 18
|
|
204
320
|
NAME = :"pad"
|
|
205
|
-
|
|
321
|
+
# @private
|
|
322
|
+
ORDER = 17
|
|
323
|
+
# @private
|
|
324
|
+
DATATYPE = ::Nl::DataTypes::Pad.new()
|
|
206
325
|
end
|
|
207
326
|
class L3mdev < Attribute
|
|
208
327
|
TYPE = 19
|
|
209
328
|
NAME = :"l3mdev"
|
|
210
|
-
|
|
329
|
+
# @private
|
|
330
|
+
ORDER = 18
|
|
331
|
+
# @private
|
|
332
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
211
333
|
end
|
|
212
334
|
class UidRange < Attribute
|
|
213
335
|
TYPE = 20
|
|
214
336
|
NAME = :"uid_range"
|
|
215
|
-
|
|
337
|
+
# @private
|
|
338
|
+
ORDER = 19
|
|
339
|
+
# @private
|
|
340
|
+
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::FibRuleUidRange, check: nil, consume_remaining: true)
|
|
216
341
|
end
|
|
217
342
|
class Protocol < Attribute
|
|
218
343
|
TYPE = 21
|
|
219
344
|
NAME = :"protocol"
|
|
220
|
-
|
|
345
|
+
# @private
|
|
346
|
+
ORDER = 20
|
|
347
|
+
# @private
|
|
348
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
221
349
|
end
|
|
222
350
|
class IpProto < Attribute
|
|
223
351
|
TYPE = 22
|
|
224
352
|
NAME = :"ip_proto"
|
|
225
|
-
|
|
353
|
+
# @private
|
|
354
|
+
ORDER = 21
|
|
355
|
+
# @private
|
|
356
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
226
357
|
end
|
|
227
358
|
class SportRange < Attribute
|
|
228
359
|
TYPE = 23
|
|
229
360
|
NAME = :"sport_range"
|
|
230
|
-
|
|
361
|
+
# @private
|
|
362
|
+
ORDER = 22
|
|
363
|
+
# @private
|
|
364
|
+
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::FibRulePortRange, check: nil, consume_remaining: true)
|
|
231
365
|
end
|
|
232
366
|
class DportRange < Attribute
|
|
233
367
|
TYPE = 24
|
|
234
368
|
NAME = :"dport_range"
|
|
235
|
-
|
|
369
|
+
# @private
|
|
370
|
+
ORDER = 23
|
|
371
|
+
# @private
|
|
372
|
+
DATATYPE = ::Nl::DataTypes::Struct.new(Structs::FibRulePortRange, check: nil, consume_remaining: true)
|
|
236
373
|
end
|
|
237
374
|
class Dscp < Attribute
|
|
238
375
|
TYPE = 25
|
|
239
376
|
NAME = :"dscp"
|
|
240
|
-
|
|
377
|
+
# @private
|
|
378
|
+
ORDER = 24
|
|
379
|
+
# @private
|
|
380
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
241
381
|
end
|
|
242
382
|
class Flowlabel < Attribute
|
|
243
383
|
TYPE = 26
|
|
244
384
|
NAME = :"flowlabel"
|
|
245
|
-
|
|
385
|
+
# @private
|
|
386
|
+
ORDER = 25
|
|
387
|
+
# @private
|
|
388
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)
|
|
246
389
|
end
|
|
247
390
|
class FlowlabelMask < Attribute
|
|
248
391
|
TYPE = 27
|
|
249
392
|
NAME = :"flowlabel_mask"
|
|
250
|
-
|
|
393
|
+
# @private
|
|
394
|
+
ORDER = 26
|
|
395
|
+
# @private
|
|
396
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Big::U32, check: nil)
|
|
251
397
|
end
|
|
252
398
|
class SportMask < Attribute
|
|
253
399
|
TYPE = 28
|
|
254
400
|
NAME = :"sport_mask"
|
|
255
|
-
|
|
401
|
+
# @private
|
|
402
|
+
ORDER = 27
|
|
403
|
+
# @private
|
|
404
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
|
|
256
405
|
end
|
|
257
406
|
class DportMask < Attribute
|
|
258
407
|
TYPE = 29
|
|
259
408
|
NAME = :"dport_mask"
|
|
260
|
-
|
|
409
|
+
# @private
|
|
410
|
+
ORDER = 28
|
|
411
|
+
# @private
|
|
412
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)
|
|
261
413
|
end
|
|
262
414
|
class DscpMask < Attribute
|
|
263
415
|
TYPE = 30
|
|
264
416
|
NAME = :"dscp_mask"
|
|
265
|
-
|
|
417
|
+
# @private
|
|
418
|
+
ORDER = 29
|
|
419
|
+
# @private
|
|
420
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U8, check: nil)
|
|
266
421
|
end
|
|
267
|
-
#
|
|
422
|
+
# @private
|
|
268
423
|
BY_NAME = Ractor.make_shareable({:"dst" => Dst, :"src" => Src, :"iifname" => Iifname, :"goto" => Goto, :"unused2" => Unused2, :"priority" => Priority, :"unused3" => Unused3, :"unused4" => Unused4, :"unused5" => Unused5, :"fwmark" => Fwmark, :"flow" => Flow, :"tun_id" => TunId, :"suppress_ifgroup" => SuppressIfgroup, :"suppress_prefixlen" => SuppressPrefixlen, :"table" => Table, :"fwmask" => Fwmask, :"oifname" => Oifname, :"pad" => Pad, :"l3mdev" => L3mdev, :"uid_range" => UidRange, :"protocol" => Protocol, :"ip_proto" => IpProto, :"sport_range" => SportRange, :"dport_range" => DportRange, :"dscp" => Dscp, :"flowlabel" => Flowlabel, :"flowlabel_mask" => FlowlabelMask, :"sport_mask" => SportMask, :"dport_mask" => DportMask, :"dscp_mask" => DscpMask}) #: Hash[::Symbol, Attribute]
|
|
269
|
-
#
|
|
424
|
+
# @private
|
|
270
425
|
BY_TYPE = Ractor.make_shareable({1 => Dst, 2 => Src, 3 => Iifname, 4 => Goto, 5 => Unused2, 6 => Priority, 7 => Unused3, 8 => Unused4, 9 => Unused5, 10 => Fwmark, 11 => Flow, 12 => TunId, 13 => SuppressIfgroup, 14 => SuppressPrefixlen, 15 => Table, 16 => Fwmask, 17 => Oifname, 18 => Pad, 19 => L3mdev, 20 => UidRange, 21 => Protocol, 22 => IpProto, 23 => SportRange, 24 => DportRange, 25 => Dscp, 26 => Flowlabel, 27 => FlowlabelMask, 28 => SportMask, 29 => DportMask, 30 => DscpMask}) #: Hash[::Integer, Attribute]
|
|
426
|
+
# @rbs return: ::String
|
|
427
|
+
# @return [String]
|
|
428
|
+
# @see Dst
|
|
429
|
+
def dst; self[:"dst"]&.value; end
|
|
430
|
+
# @rbs return: ::String
|
|
431
|
+
# @return [String]
|
|
432
|
+
# @see Src
|
|
433
|
+
def src; self[:"src"]&.value; end
|
|
434
|
+
# @rbs return: ::String
|
|
435
|
+
# @return [String]
|
|
436
|
+
# @see Iifname
|
|
437
|
+
def iifname; self[:"iifname"]&.value; end
|
|
438
|
+
# @rbs return: ::Integer
|
|
439
|
+
# @return [Integer]
|
|
440
|
+
# @see Goto
|
|
441
|
+
def goto; self[:"goto"]&.value; end
|
|
442
|
+
# @rbs return: ::Integer
|
|
443
|
+
# @return [Integer]
|
|
444
|
+
# @see Priority
|
|
445
|
+
def priority; self[:"priority"]&.value; end
|
|
446
|
+
# @rbs return: ::Integer
|
|
447
|
+
# @return [Integer]
|
|
448
|
+
# @see Fwmark
|
|
449
|
+
def fwmark; self[:"fwmark"]&.value; end
|
|
450
|
+
# @rbs return: ::Integer
|
|
451
|
+
# @return [Integer]
|
|
452
|
+
# @see Flow
|
|
453
|
+
def flow; self[:"flow"]&.value; end
|
|
454
|
+
# @rbs return: ::Integer
|
|
455
|
+
# @return [Integer]
|
|
456
|
+
# @see TunId
|
|
457
|
+
def tun_id; self[:"tun_id"]&.value; end
|
|
458
|
+
# @rbs return: ::Integer
|
|
459
|
+
# @return [Integer]
|
|
460
|
+
# @see SuppressIfgroup
|
|
461
|
+
def suppress_ifgroup; self[:"suppress_ifgroup"]&.value; end
|
|
462
|
+
# @rbs return: ::Integer
|
|
463
|
+
# @return [Integer]
|
|
464
|
+
# @see SuppressPrefixlen
|
|
465
|
+
def suppress_prefixlen; self[:"suppress_prefixlen"]&.value; end
|
|
466
|
+
# @rbs return: ::Integer
|
|
467
|
+
# @return [Integer]
|
|
468
|
+
# @see Table
|
|
469
|
+
def table; self[:"table"]&.value; end
|
|
470
|
+
# @rbs return: ::Integer
|
|
471
|
+
# @return [Integer]
|
|
472
|
+
# @see Fwmask
|
|
473
|
+
def fwmask; self[:"fwmask"]&.value; end
|
|
474
|
+
# @rbs return: ::String
|
|
475
|
+
# @return [String]
|
|
476
|
+
# @see Oifname
|
|
477
|
+
def oifname; self[:"oifname"]&.value; end
|
|
478
|
+
# @rbs return: ::Integer
|
|
479
|
+
# @return [Integer]
|
|
480
|
+
# @see L3mdev
|
|
481
|
+
def l3mdev; self[:"l3mdev"]&.value; end
|
|
482
|
+
# @rbs return: Structs::FibRuleUidRange
|
|
483
|
+
# @return [Structs::FibRuleUidRange]
|
|
484
|
+
# @see UidRange
|
|
485
|
+
def uid_range; self[:"uid_range"]&.value; end
|
|
486
|
+
# @rbs return: ::Integer
|
|
487
|
+
# @return [Integer]
|
|
488
|
+
# @see Protocol
|
|
489
|
+
def protocol; self[:"protocol"]&.value; end
|
|
490
|
+
# @rbs return: ::Integer
|
|
491
|
+
# @return [Integer]
|
|
492
|
+
# @see IpProto
|
|
493
|
+
def ip_proto; self[:"ip_proto"]&.value; end
|
|
494
|
+
# @rbs return: Structs::FibRulePortRange
|
|
495
|
+
# @return [Structs::FibRulePortRange]
|
|
496
|
+
# @see SportRange
|
|
497
|
+
def sport_range; self[:"sport_range"]&.value; end
|
|
498
|
+
# @rbs return: Structs::FibRulePortRange
|
|
499
|
+
# @return [Structs::FibRulePortRange]
|
|
500
|
+
# @see DportRange
|
|
501
|
+
def dport_range; self[:"dport_range"]&.value; end
|
|
502
|
+
# @rbs return: ::Integer
|
|
503
|
+
# @return [Integer]
|
|
504
|
+
# @see Dscp
|
|
505
|
+
def dscp; self[:"dscp"]&.value; end
|
|
506
|
+
# @rbs return: ::Integer
|
|
507
|
+
# @return [Integer]
|
|
508
|
+
# @see Flowlabel
|
|
509
|
+
def flowlabel; self[:"flowlabel"]&.value; end
|
|
510
|
+
# @rbs return: ::Integer
|
|
511
|
+
# @return [Integer]
|
|
512
|
+
# @see FlowlabelMask
|
|
513
|
+
def flowlabel_mask; self[:"flowlabel_mask"]&.value; end
|
|
514
|
+
# @rbs return: ::Integer
|
|
515
|
+
# @return [Integer]
|
|
516
|
+
# @see SportMask
|
|
517
|
+
def sport_mask; self[:"sport_mask"]&.value; end
|
|
518
|
+
# @rbs return: ::Integer
|
|
519
|
+
# @return [Integer]
|
|
520
|
+
# @see DportMask
|
|
521
|
+
def dport_mask; self[:"dport_mask"]&.value; end
|
|
522
|
+
# @rbs return: ::Integer
|
|
523
|
+
# @return [Integer]
|
|
524
|
+
# @see DscpMask
|
|
525
|
+
def dscp_mask; self[:"dscp_mask"]&.value; end
|
|
271
526
|
class << self
|
|
272
527
|
# Looks up Attribute class by name.
|
|
273
|
-
#--
|
|
274
528
|
# @rbs name: Symbol
|
|
275
529
|
# @rbs return: Attribute
|
|
530
|
+
# @param [Symbol] name
|
|
531
|
+
# @return [Attribute]
|
|
276
532
|
def by_name(name); BY_NAME.fetch(name); end
|
|
277
533
|
# Looks up Attribute class by type value.
|
|
278
|
-
#--
|
|
279
534
|
# @rbs type: Integer
|
|
280
535
|
# @rbs return: Attribute
|
|
536
|
+
# @param [Integer] type
|
|
537
|
+
# @return [Attribute]
|
|
281
538
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
282
539
|
end
|
|
283
540
|
end
|
|
284
541
|
end
|
|
285
542
|
module Messages
|
|
286
543
|
# Add new FIB rule
|
|
287
|
-
class DoNewruleRequest < ::Nl::
|
|
544
|
+
class DoNewruleRequest < ::Nl::Raw::Message
|
|
288
545
|
TYPE = 32
|
|
289
546
|
FIXED_HEADER = Structs::FibRuleHdr
|
|
290
547
|
ATTRIBUTE_SET = AttributeSets::FibRuleAttrs
|
|
291
548
|
ATTRIBUTES = Ractor.make_shareable(%i[iifname goto priority fwmark flow tun_id suppress_ifgroup suppress_prefixlen table fwmask oifname l3mdev uid_range protocol ip_proto sport_range dport_range dscp flowlabel flowlabel_mask sport_mask dport_mask dscp_mask])
|
|
292
|
-
# Gets the value of `family` field in the message's fixed header.
|
|
293
|
-
#--
|
|
294
549
|
# @rbs return: ::Integer
|
|
550
|
+
# @return [Integer]
|
|
295
551
|
def family; fixed_header.family; end
|
|
296
|
-
# Gets the value of `dst-len` field in the message's fixed header.
|
|
297
|
-
#--
|
|
298
552
|
# @rbs return: ::Integer
|
|
553
|
+
# @return [Integer]
|
|
299
554
|
def dst_len; fixed_header.dst_len; end
|
|
300
|
-
# Gets the value of `src-len` field in the message's fixed header.
|
|
301
|
-
#--
|
|
302
555
|
# @rbs return: ::Integer
|
|
556
|
+
# @return [Integer]
|
|
303
557
|
def src_len; fixed_header.src_len; end
|
|
304
|
-
# Gets the value of `tos` field in the message's fixed header.
|
|
305
|
-
#--
|
|
306
558
|
# @rbs return: ::Integer
|
|
559
|
+
# @return [Integer]
|
|
307
560
|
def tos; fixed_header.tos; end
|
|
308
|
-
# Gets the value of `action` field in the message's fixed header.
|
|
309
|
-
#--
|
|
310
561
|
# @rbs return: ::Integer
|
|
562
|
+
# @return [Integer]
|
|
311
563
|
def action; fixed_header.action; end
|
|
312
|
-
# Gets the value of `flags` field in the message's fixed header.
|
|
313
|
-
#--
|
|
314
564
|
# @rbs return: ::Integer
|
|
565
|
+
# @return [Integer]
|
|
315
566
|
def flags; fixed_header.flags; end
|
|
316
|
-
# Gets the value of `iifname` attribute in the message.
|
|
317
|
-
#--
|
|
318
567
|
# @rbs return: ::String
|
|
568
|
+
# @return [String]
|
|
569
|
+
# @see AttributeSets::FibRuleAttrs::Iifname
|
|
319
570
|
def iifname; attributes[:"iifname"]&.value; end
|
|
320
|
-
# Gets the value of `goto` attribute in the message.
|
|
321
|
-
#--
|
|
322
571
|
# @rbs return: ::Integer
|
|
572
|
+
# @return [Integer]
|
|
573
|
+
# @see AttributeSets::FibRuleAttrs::Goto
|
|
323
574
|
def goto; attributes[:"goto"]&.value; end
|
|
324
|
-
# Gets the value of `priority` attribute in the message.
|
|
325
|
-
#--
|
|
326
575
|
# @rbs return: ::Integer
|
|
576
|
+
# @return [Integer]
|
|
577
|
+
# @see AttributeSets::FibRuleAttrs::Priority
|
|
327
578
|
def priority; attributes[:"priority"]&.value; end
|
|
328
|
-
# Gets the value of `fwmark` attribute in the message.
|
|
329
|
-
#--
|
|
330
579
|
# @rbs return: ::Integer
|
|
580
|
+
# @return [Integer]
|
|
581
|
+
# @see AttributeSets::FibRuleAttrs::Fwmark
|
|
331
582
|
def fwmark; attributes[:"fwmark"]&.value; end
|
|
332
|
-
# Gets the value of `flow` attribute in the message.
|
|
333
|
-
#--
|
|
334
583
|
# @rbs return: ::Integer
|
|
584
|
+
# @return [Integer]
|
|
585
|
+
# @see AttributeSets::FibRuleAttrs::Flow
|
|
335
586
|
def flow; attributes[:"flow"]&.value; end
|
|
336
|
-
# Gets the value of `tun-id` attribute in the message.
|
|
337
|
-
#--
|
|
338
587
|
# @rbs return: ::Integer
|
|
588
|
+
# @return [Integer]
|
|
589
|
+
# @see AttributeSets::FibRuleAttrs::TunId
|
|
339
590
|
def tun_id; attributes[:"tun_id"]&.value; end
|
|
340
|
-
# Gets the value of `suppress-ifgroup` attribute in the message.
|
|
341
|
-
#--
|
|
342
591
|
# @rbs return: ::Integer
|
|
592
|
+
# @return [Integer]
|
|
593
|
+
# @see AttributeSets::FibRuleAttrs::SuppressIfgroup
|
|
343
594
|
def suppress_ifgroup; attributes[:"suppress_ifgroup"]&.value; end
|
|
344
|
-
# Gets the value of `suppress-prefixlen` attribute in the message.
|
|
345
|
-
#--
|
|
346
595
|
# @rbs return: ::Integer
|
|
596
|
+
# @return [Integer]
|
|
597
|
+
# @see AttributeSets::FibRuleAttrs::SuppressPrefixlen
|
|
347
598
|
def suppress_prefixlen; attributes[:"suppress_prefixlen"]&.value; end
|
|
348
|
-
# Gets the value of `table` attribute or fixed header in the message.
|
|
349
|
-
#--
|
|
350
599
|
# @rbs return: ::Integer
|
|
600
|
+
# @return [Integer]
|
|
601
|
+
# @see AttributeSets::FibRuleAttrs::Table
|
|
351
602
|
def table; attributes[:"table"]&.value || fixed_header.table; end
|
|
352
|
-
# Gets the value of `fwmask` attribute in the message.
|
|
353
|
-
#--
|
|
354
603
|
# @rbs return: ::Integer
|
|
604
|
+
# @return [Integer]
|
|
605
|
+
# @see AttributeSets::FibRuleAttrs::Fwmask
|
|
355
606
|
def fwmask; attributes[:"fwmask"]&.value; end
|
|
356
|
-
# Gets the value of `oifname` attribute in the message.
|
|
357
|
-
#--
|
|
358
607
|
# @rbs return: ::String
|
|
608
|
+
# @return [String]
|
|
609
|
+
# @see AttributeSets::FibRuleAttrs::Oifname
|
|
359
610
|
def oifname; attributes[:"oifname"]&.value; end
|
|
360
|
-
# Gets the value of `l3mdev` attribute in the message.
|
|
361
|
-
#--
|
|
362
611
|
# @rbs return: ::Integer
|
|
612
|
+
# @return [Integer]
|
|
613
|
+
# @see AttributeSets::FibRuleAttrs::L3mdev
|
|
363
614
|
def l3mdev; attributes[:"l3mdev"]&.value; end
|
|
364
|
-
#
|
|
365
|
-
|
|
366
|
-
# @
|
|
615
|
+
# @rbs return: Structs::FibRuleUidRange
|
|
616
|
+
# @return [Structs::FibRuleUidRange]
|
|
617
|
+
# @see AttributeSets::FibRuleAttrs::UidRange
|
|
367
618
|
def uid_range; attributes[:"uid_range"]&.value; end
|
|
368
|
-
# Gets the value of `protocol` attribute in the message.
|
|
369
|
-
#--
|
|
370
619
|
# @rbs return: ::Integer
|
|
620
|
+
# @return [Integer]
|
|
621
|
+
# @see AttributeSets::FibRuleAttrs::Protocol
|
|
371
622
|
def protocol; attributes[:"protocol"]&.value; end
|
|
372
|
-
# Gets the value of `ip-proto` attribute in the message.
|
|
373
|
-
#--
|
|
374
623
|
# @rbs return: ::Integer
|
|
624
|
+
# @return [Integer]
|
|
625
|
+
# @see AttributeSets::FibRuleAttrs::IpProto
|
|
375
626
|
def ip_proto; attributes[:"ip_proto"]&.value; end
|
|
376
|
-
#
|
|
377
|
-
|
|
378
|
-
# @
|
|
627
|
+
# @rbs return: Structs::FibRulePortRange
|
|
628
|
+
# @return [Structs::FibRulePortRange]
|
|
629
|
+
# @see AttributeSets::FibRuleAttrs::SportRange
|
|
379
630
|
def sport_range; attributes[:"sport_range"]&.value; end
|
|
380
|
-
#
|
|
381
|
-
|
|
382
|
-
# @
|
|
631
|
+
# @rbs return: Structs::FibRulePortRange
|
|
632
|
+
# @return [Structs::FibRulePortRange]
|
|
633
|
+
# @see AttributeSets::FibRuleAttrs::DportRange
|
|
383
634
|
def dport_range; attributes[:"dport_range"]&.value; end
|
|
384
|
-
# Gets the value of `dscp` attribute in the message.
|
|
385
|
-
#--
|
|
386
635
|
# @rbs return: ::Integer
|
|
636
|
+
# @return [Integer]
|
|
637
|
+
# @see AttributeSets::FibRuleAttrs::Dscp
|
|
387
638
|
def dscp; attributes[:"dscp"]&.value; end
|
|
388
|
-
# Gets the value of `flowlabel` attribute in the message.
|
|
389
|
-
#--
|
|
390
639
|
# @rbs return: ::Integer
|
|
640
|
+
# @return [Integer]
|
|
641
|
+
# @see AttributeSets::FibRuleAttrs::Flowlabel
|
|
391
642
|
def flowlabel; attributes[:"flowlabel"]&.value; end
|
|
392
|
-
# Gets the value of `flowlabel-mask` attribute in the message.
|
|
393
|
-
#--
|
|
394
643
|
# @rbs return: ::Integer
|
|
644
|
+
# @return [Integer]
|
|
645
|
+
# @see AttributeSets::FibRuleAttrs::FlowlabelMask
|
|
395
646
|
def flowlabel_mask; attributes[:"flowlabel_mask"]&.value; end
|
|
396
|
-
# Gets the value of `sport-mask` attribute in the message.
|
|
397
|
-
#--
|
|
398
647
|
# @rbs return: ::Integer
|
|
648
|
+
# @return [Integer]
|
|
649
|
+
# @see AttributeSets::FibRuleAttrs::SportMask
|
|
399
650
|
def sport_mask; attributes[:"sport_mask"]&.value; end
|
|
400
|
-
# Gets the value of `dport-mask` attribute in the message.
|
|
401
|
-
#--
|
|
402
651
|
# @rbs return: ::Integer
|
|
652
|
+
# @return [Integer]
|
|
653
|
+
# @see AttributeSets::FibRuleAttrs::DportMask
|
|
403
654
|
def dport_mask; attributes[:"dport_mask"]&.value; end
|
|
404
|
-
# Gets the value of `dscp-mask` attribute in the message.
|
|
405
|
-
#--
|
|
406
655
|
# @rbs return: ::Integer
|
|
656
|
+
# @return [Integer]
|
|
657
|
+
# @see AttributeSets::FibRuleAttrs::DscpMask
|
|
407
658
|
def dscp_mask; attributes[:"dscp_mask"]&.value; end
|
|
408
659
|
end
|
|
409
660
|
# Remove an existing FIB rule
|
|
410
|
-
class DoDelruleRequest < ::Nl::
|
|
661
|
+
class DoDelruleRequest < ::Nl::Raw::Message
|
|
411
662
|
TYPE = 33
|
|
412
663
|
FIXED_HEADER = Structs::FibRuleHdr
|
|
413
664
|
ATTRIBUTE_SET = AttributeSets::FibRuleAttrs
|
|
414
665
|
ATTRIBUTES = Ractor.make_shareable(%i[iifname goto priority fwmark flow tun_id suppress_ifgroup suppress_prefixlen table fwmask oifname l3mdev uid_range protocol ip_proto sport_range dport_range dscp flowlabel flowlabel_mask sport_mask dport_mask dscp_mask])
|
|
415
|
-
# Gets the value of `family` field in the message's fixed header.
|
|
416
|
-
#--
|
|
417
666
|
# @rbs return: ::Integer
|
|
667
|
+
# @return [Integer]
|
|
418
668
|
def family; fixed_header.family; end
|
|
419
|
-
# Gets the value of `dst-len` field in the message's fixed header.
|
|
420
|
-
#--
|
|
421
669
|
# @rbs return: ::Integer
|
|
670
|
+
# @return [Integer]
|
|
422
671
|
def dst_len; fixed_header.dst_len; end
|
|
423
|
-
# Gets the value of `src-len` field in the message's fixed header.
|
|
424
|
-
#--
|
|
425
672
|
# @rbs return: ::Integer
|
|
673
|
+
# @return [Integer]
|
|
426
674
|
def src_len; fixed_header.src_len; end
|
|
427
|
-
# Gets the value of `tos` field in the message's fixed header.
|
|
428
|
-
#--
|
|
429
675
|
# @rbs return: ::Integer
|
|
676
|
+
# @return [Integer]
|
|
430
677
|
def tos; fixed_header.tos; end
|
|
431
|
-
# Gets the value of `action` field in the message's fixed header.
|
|
432
|
-
#--
|
|
433
678
|
# @rbs return: ::Integer
|
|
679
|
+
# @return [Integer]
|
|
434
680
|
def action; fixed_header.action; end
|
|
435
|
-
# Gets the value of `flags` field in the message's fixed header.
|
|
436
|
-
#--
|
|
437
681
|
# @rbs return: ::Integer
|
|
682
|
+
# @return [Integer]
|
|
438
683
|
def flags; fixed_header.flags; end
|
|
439
|
-
# Gets the value of `iifname` attribute in the message.
|
|
440
|
-
#--
|
|
441
684
|
# @rbs return: ::String
|
|
685
|
+
# @return [String]
|
|
686
|
+
# @see AttributeSets::FibRuleAttrs::Iifname
|
|
442
687
|
def iifname; attributes[:"iifname"]&.value; end
|
|
443
|
-
# Gets the value of `goto` attribute in the message.
|
|
444
|
-
#--
|
|
445
688
|
# @rbs return: ::Integer
|
|
689
|
+
# @return [Integer]
|
|
690
|
+
# @see AttributeSets::FibRuleAttrs::Goto
|
|
446
691
|
def goto; attributes[:"goto"]&.value; end
|
|
447
|
-
# Gets the value of `priority` attribute in the message.
|
|
448
|
-
#--
|
|
449
692
|
# @rbs return: ::Integer
|
|
693
|
+
# @return [Integer]
|
|
694
|
+
# @see AttributeSets::FibRuleAttrs::Priority
|
|
450
695
|
def priority; attributes[:"priority"]&.value; end
|
|
451
|
-
# Gets the value of `fwmark` attribute in the message.
|
|
452
|
-
#--
|
|
453
696
|
# @rbs return: ::Integer
|
|
697
|
+
# @return [Integer]
|
|
698
|
+
# @see AttributeSets::FibRuleAttrs::Fwmark
|
|
454
699
|
def fwmark; attributes[:"fwmark"]&.value; end
|
|
455
|
-
# Gets the value of `flow` attribute in the message.
|
|
456
|
-
#--
|
|
457
700
|
# @rbs return: ::Integer
|
|
701
|
+
# @return [Integer]
|
|
702
|
+
# @see AttributeSets::FibRuleAttrs::Flow
|
|
458
703
|
def flow; attributes[:"flow"]&.value; end
|
|
459
|
-
# Gets the value of `tun-id` attribute in the message.
|
|
460
|
-
#--
|
|
461
704
|
# @rbs return: ::Integer
|
|
705
|
+
# @return [Integer]
|
|
706
|
+
# @see AttributeSets::FibRuleAttrs::TunId
|
|
462
707
|
def tun_id; attributes[:"tun_id"]&.value; end
|
|
463
|
-
# Gets the value of `suppress-ifgroup` attribute in the message.
|
|
464
|
-
#--
|
|
465
708
|
# @rbs return: ::Integer
|
|
709
|
+
# @return [Integer]
|
|
710
|
+
# @see AttributeSets::FibRuleAttrs::SuppressIfgroup
|
|
466
711
|
def suppress_ifgroup; attributes[:"suppress_ifgroup"]&.value; end
|
|
467
|
-
# Gets the value of `suppress-prefixlen` attribute in the message.
|
|
468
|
-
#--
|
|
469
712
|
# @rbs return: ::Integer
|
|
713
|
+
# @return [Integer]
|
|
714
|
+
# @see AttributeSets::FibRuleAttrs::SuppressPrefixlen
|
|
470
715
|
def suppress_prefixlen; attributes[:"suppress_prefixlen"]&.value; end
|
|
471
|
-
# Gets the value of `table` attribute or fixed header in the message.
|
|
472
|
-
#--
|
|
473
716
|
# @rbs return: ::Integer
|
|
717
|
+
# @return [Integer]
|
|
718
|
+
# @see AttributeSets::FibRuleAttrs::Table
|
|
474
719
|
def table; attributes[:"table"]&.value || fixed_header.table; end
|
|
475
|
-
# Gets the value of `fwmask` attribute in the message.
|
|
476
|
-
#--
|
|
477
720
|
# @rbs return: ::Integer
|
|
721
|
+
# @return [Integer]
|
|
722
|
+
# @see AttributeSets::FibRuleAttrs::Fwmask
|
|
478
723
|
def fwmask; attributes[:"fwmask"]&.value; end
|
|
479
|
-
# Gets the value of `oifname` attribute in the message.
|
|
480
|
-
#--
|
|
481
724
|
# @rbs return: ::String
|
|
725
|
+
# @return [String]
|
|
726
|
+
# @see AttributeSets::FibRuleAttrs::Oifname
|
|
482
727
|
def oifname; attributes[:"oifname"]&.value; end
|
|
483
|
-
# Gets the value of `l3mdev` attribute in the message.
|
|
484
|
-
#--
|
|
485
728
|
# @rbs return: ::Integer
|
|
729
|
+
# @return [Integer]
|
|
730
|
+
# @see AttributeSets::FibRuleAttrs::L3mdev
|
|
486
731
|
def l3mdev; attributes[:"l3mdev"]&.value; end
|
|
487
|
-
#
|
|
488
|
-
|
|
489
|
-
# @
|
|
732
|
+
# @rbs return: Structs::FibRuleUidRange
|
|
733
|
+
# @return [Structs::FibRuleUidRange]
|
|
734
|
+
# @see AttributeSets::FibRuleAttrs::UidRange
|
|
490
735
|
def uid_range; attributes[:"uid_range"]&.value; end
|
|
491
|
-
# Gets the value of `protocol` attribute in the message.
|
|
492
|
-
#--
|
|
493
736
|
# @rbs return: ::Integer
|
|
737
|
+
# @return [Integer]
|
|
738
|
+
# @see AttributeSets::FibRuleAttrs::Protocol
|
|
494
739
|
def protocol; attributes[:"protocol"]&.value; end
|
|
495
|
-
# Gets the value of `ip-proto` attribute in the message.
|
|
496
|
-
#--
|
|
497
740
|
# @rbs return: ::Integer
|
|
741
|
+
# @return [Integer]
|
|
742
|
+
# @see AttributeSets::FibRuleAttrs::IpProto
|
|
498
743
|
def ip_proto; attributes[:"ip_proto"]&.value; end
|
|
499
|
-
#
|
|
500
|
-
|
|
501
|
-
# @
|
|
744
|
+
# @rbs return: Structs::FibRulePortRange
|
|
745
|
+
# @return [Structs::FibRulePortRange]
|
|
746
|
+
# @see AttributeSets::FibRuleAttrs::SportRange
|
|
502
747
|
def sport_range; attributes[:"sport_range"]&.value; end
|
|
503
|
-
#
|
|
504
|
-
|
|
505
|
-
# @
|
|
748
|
+
# @rbs return: Structs::FibRulePortRange
|
|
749
|
+
# @return [Structs::FibRulePortRange]
|
|
750
|
+
# @see AttributeSets::FibRuleAttrs::DportRange
|
|
506
751
|
def dport_range; attributes[:"dport_range"]&.value; end
|
|
507
|
-
# Gets the value of `dscp` attribute in the message.
|
|
508
|
-
#--
|
|
509
752
|
# @rbs return: ::Integer
|
|
753
|
+
# @return [Integer]
|
|
754
|
+
# @see AttributeSets::FibRuleAttrs::Dscp
|
|
510
755
|
def dscp; attributes[:"dscp"]&.value; end
|
|
511
|
-
# Gets the value of `flowlabel` attribute in the message.
|
|
512
|
-
#--
|
|
513
756
|
# @rbs return: ::Integer
|
|
757
|
+
# @return [Integer]
|
|
758
|
+
# @see AttributeSets::FibRuleAttrs::Flowlabel
|
|
514
759
|
def flowlabel; attributes[:"flowlabel"]&.value; end
|
|
515
|
-
# Gets the value of `flowlabel-mask` attribute in the message.
|
|
516
|
-
#--
|
|
517
760
|
# @rbs return: ::Integer
|
|
761
|
+
# @return [Integer]
|
|
762
|
+
# @see AttributeSets::FibRuleAttrs::FlowlabelMask
|
|
518
763
|
def flowlabel_mask; attributes[:"flowlabel_mask"]&.value; end
|
|
519
|
-
# Gets the value of `sport-mask` attribute in the message.
|
|
520
|
-
#--
|
|
521
764
|
# @rbs return: ::Integer
|
|
765
|
+
# @return [Integer]
|
|
766
|
+
# @see AttributeSets::FibRuleAttrs::SportMask
|
|
522
767
|
def sport_mask; attributes[:"sport_mask"]&.value; end
|
|
523
|
-
# Gets the value of `dport-mask` attribute in the message.
|
|
524
|
-
#--
|
|
525
768
|
# @rbs return: ::Integer
|
|
769
|
+
# @return [Integer]
|
|
770
|
+
# @see AttributeSets::FibRuleAttrs::DportMask
|
|
526
771
|
def dport_mask; attributes[:"dport_mask"]&.value; end
|
|
527
|
-
# Gets the value of `dscp-mask` attribute in the message.
|
|
528
|
-
#--
|
|
529
772
|
# @rbs return: ::Integer
|
|
773
|
+
# @return [Integer]
|
|
774
|
+
# @see AttributeSets::FibRuleAttrs::DscpMask
|
|
530
775
|
def dscp_mask; attributes[:"dscp_mask"]&.value; end
|
|
531
776
|
end
|
|
532
777
|
# Dump all FIB rules
|
|
533
|
-
class DumpGetruleRequest < ::Nl::
|
|
778
|
+
class DumpGetruleRequest < ::Nl::Raw::Message
|
|
534
779
|
TYPE = 34
|
|
535
780
|
FIXED_HEADER = Structs::FibRuleHdr
|
|
536
781
|
ATTRIBUTE_SET = AttributeSets::FibRuleAttrs
|
|
537
782
|
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
538
|
-
# Gets the value of `family` field in the message's fixed header.
|
|
539
|
-
#--
|
|
540
783
|
# @rbs return: ::Integer
|
|
784
|
+
# @return [Integer]
|
|
541
785
|
def family; fixed_header.family; end
|
|
542
|
-
# Gets the value of `dst-len` field in the message's fixed header.
|
|
543
|
-
#--
|
|
544
786
|
# @rbs return: ::Integer
|
|
787
|
+
# @return [Integer]
|
|
545
788
|
def dst_len; fixed_header.dst_len; end
|
|
546
|
-
# Gets the value of `src-len` field in the message's fixed header.
|
|
547
|
-
#--
|
|
548
789
|
# @rbs return: ::Integer
|
|
790
|
+
# @return [Integer]
|
|
549
791
|
def src_len; fixed_header.src_len; end
|
|
550
|
-
# Gets the value of `tos` field in the message's fixed header.
|
|
551
|
-
#--
|
|
552
792
|
# @rbs return: ::Integer
|
|
793
|
+
# @return [Integer]
|
|
553
794
|
def tos; fixed_header.tos; end
|
|
554
|
-
# Gets the value of `table` field in the message's fixed header.
|
|
555
|
-
#--
|
|
556
795
|
# @rbs return: ::Integer
|
|
796
|
+
# @return [Integer]
|
|
557
797
|
def table; fixed_header.table; end
|
|
558
|
-
# Gets the value of `action` field in the message's fixed header.
|
|
559
|
-
#--
|
|
560
798
|
# @rbs return: ::Integer
|
|
799
|
+
# @return [Integer]
|
|
561
800
|
def action; fixed_header.action; end
|
|
562
|
-
# Gets the value of `flags` field in the message's fixed header.
|
|
563
|
-
#--
|
|
564
801
|
# @rbs return: ::Integer
|
|
802
|
+
# @return [Integer]
|
|
565
803
|
def flags; fixed_header.flags; end
|
|
566
804
|
end
|
|
567
805
|
# Dump all FIB rules
|
|
568
|
-
class DumpGetruleReply < ::Nl::
|
|
806
|
+
class DumpGetruleReply < ::Nl::Raw::Message
|
|
569
807
|
TYPE = 32
|
|
570
808
|
FIXED_HEADER = Structs::FibRuleHdr
|
|
571
809
|
ATTRIBUTE_SET = AttributeSets::FibRuleAttrs
|
|
572
810
|
ATTRIBUTES = Ractor.make_shareable(%i[iifname goto priority fwmark flow tun_id suppress_ifgroup suppress_prefixlen table fwmask oifname l3mdev uid_range protocol ip_proto sport_range dport_range dscp flowlabel flowlabel_mask sport_mask dport_mask dscp_mask])
|
|
573
|
-
# Gets the value of `family` field in the message's fixed header.
|
|
574
|
-
#--
|
|
575
811
|
# @rbs return: ::Integer
|
|
812
|
+
# @return [Integer]
|
|
576
813
|
def family; fixed_header.family; end
|
|
577
|
-
# Gets the value of `dst-len` field in the message's fixed header.
|
|
578
|
-
#--
|
|
579
814
|
# @rbs return: ::Integer
|
|
815
|
+
# @return [Integer]
|
|
580
816
|
def dst_len; fixed_header.dst_len; end
|
|
581
|
-
# Gets the value of `src-len` field in the message's fixed header.
|
|
582
|
-
#--
|
|
583
817
|
# @rbs return: ::Integer
|
|
818
|
+
# @return [Integer]
|
|
584
819
|
def src_len; fixed_header.src_len; end
|
|
585
|
-
# Gets the value of `tos` field in the message's fixed header.
|
|
586
|
-
#--
|
|
587
820
|
# @rbs return: ::Integer
|
|
821
|
+
# @return [Integer]
|
|
588
822
|
def tos; fixed_header.tos; end
|
|
589
|
-
# Gets the value of `action` field in the message's fixed header.
|
|
590
|
-
#--
|
|
591
823
|
# @rbs return: ::Integer
|
|
824
|
+
# @return [Integer]
|
|
592
825
|
def action; fixed_header.action; end
|
|
593
|
-
# Gets the value of `flags` field in the message's fixed header.
|
|
594
|
-
#--
|
|
595
826
|
# @rbs return: ::Integer
|
|
827
|
+
# @return [Integer]
|
|
596
828
|
def flags; fixed_header.flags; end
|
|
597
|
-
# Gets the value of `iifname` attribute in the message.
|
|
598
|
-
#--
|
|
599
829
|
# @rbs return: ::String
|
|
830
|
+
# @return [String]
|
|
831
|
+
# @see AttributeSets::FibRuleAttrs::Iifname
|
|
600
832
|
def iifname; attributes[:"iifname"]&.value; end
|
|
601
|
-
# Gets the value of `goto` attribute in the message.
|
|
602
|
-
#--
|
|
603
833
|
# @rbs return: ::Integer
|
|
834
|
+
# @return [Integer]
|
|
835
|
+
# @see AttributeSets::FibRuleAttrs::Goto
|
|
604
836
|
def goto; attributes[:"goto"]&.value; end
|
|
605
|
-
# Gets the value of `priority` attribute in the message.
|
|
606
|
-
#--
|
|
607
837
|
# @rbs return: ::Integer
|
|
838
|
+
# @return [Integer]
|
|
839
|
+
# @see AttributeSets::FibRuleAttrs::Priority
|
|
608
840
|
def priority; attributes[:"priority"]&.value; end
|
|
609
|
-
# Gets the value of `fwmark` attribute in the message.
|
|
610
|
-
#--
|
|
611
841
|
# @rbs return: ::Integer
|
|
842
|
+
# @return [Integer]
|
|
843
|
+
# @see AttributeSets::FibRuleAttrs::Fwmark
|
|
612
844
|
def fwmark; attributes[:"fwmark"]&.value; end
|
|
613
|
-
# Gets the value of `flow` attribute in the message.
|
|
614
|
-
#--
|
|
615
845
|
# @rbs return: ::Integer
|
|
846
|
+
# @return [Integer]
|
|
847
|
+
# @see AttributeSets::FibRuleAttrs::Flow
|
|
616
848
|
def flow; attributes[:"flow"]&.value; end
|
|
617
|
-
# Gets the value of `tun-id` attribute in the message.
|
|
618
|
-
#--
|
|
619
849
|
# @rbs return: ::Integer
|
|
850
|
+
# @return [Integer]
|
|
851
|
+
# @see AttributeSets::FibRuleAttrs::TunId
|
|
620
852
|
def tun_id; attributes[:"tun_id"]&.value; end
|
|
621
|
-
# Gets the value of `suppress-ifgroup` attribute in the message.
|
|
622
|
-
#--
|
|
623
853
|
# @rbs return: ::Integer
|
|
854
|
+
# @return [Integer]
|
|
855
|
+
# @see AttributeSets::FibRuleAttrs::SuppressIfgroup
|
|
624
856
|
def suppress_ifgroup; attributes[:"suppress_ifgroup"]&.value; end
|
|
625
|
-
# Gets the value of `suppress-prefixlen` attribute in the message.
|
|
626
|
-
#--
|
|
627
857
|
# @rbs return: ::Integer
|
|
858
|
+
# @return [Integer]
|
|
859
|
+
# @see AttributeSets::FibRuleAttrs::SuppressPrefixlen
|
|
628
860
|
def suppress_prefixlen; attributes[:"suppress_prefixlen"]&.value; end
|
|
629
|
-
# Gets the value of `table` attribute or fixed header in the message.
|
|
630
|
-
#--
|
|
631
861
|
# @rbs return: ::Integer
|
|
862
|
+
# @return [Integer]
|
|
863
|
+
# @see AttributeSets::FibRuleAttrs::Table
|
|
632
864
|
def table; attributes[:"table"]&.value || fixed_header.table; end
|
|
633
|
-
# Gets the value of `fwmask` attribute in the message.
|
|
634
|
-
#--
|
|
635
865
|
# @rbs return: ::Integer
|
|
866
|
+
# @return [Integer]
|
|
867
|
+
# @see AttributeSets::FibRuleAttrs::Fwmask
|
|
636
868
|
def fwmask; attributes[:"fwmask"]&.value; end
|
|
637
|
-
# Gets the value of `oifname` attribute in the message.
|
|
638
|
-
#--
|
|
639
869
|
# @rbs return: ::String
|
|
870
|
+
# @return [String]
|
|
871
|
+
# @see AttributeSets::FibRuleAttrs::Oifname
|
|
640
872
|
def oifname; attributes[:"oifname"]&.value; end
|
|
641
|
-
# Gets the value of `l3mdev` attribute in the message.
|
|
642
|
-
#--
|
|
643
873
|
# @rbs return: ::Integer
|
|
874
|
+
# @return [Integer]
|
|
875
|
+
# @see AttributeSets::FibRuleAttrs::L3mdev
|
|
644
876
|
def l3mdev; attributes[:"l3mdev"]&.value; end
|
|
645
|
-
#
|
|
646
|
-
|
|
647
|
-
# @
|
|
877
|
+
# @rbs return: Structs::FibRuleUidRange
|
|
878
|
+
# @return [Structs::FibRuleUidRange]
|
|
879
|
+
# @see AttributeSets::FibRuleAttrs::UidRange
|
|
648
880
|
def uid_range; attributes[:"uid_range"]&.value; end
|
|
649
|
-
# Gets the value of `protocol` attribute in the message.
|
|
650
|
-
#--
|
|
651
881
|
# @rbs return: ::Integer
|
|
882
|
+
# @return [Integer]
|
|
883
|
+
# @see AttributeSets::FibRuleAttrs::Protocol
|
|
652
884
|
def protocol; attributes[:"protocol"]&.value; end
|
|
653
|
-
# Gets the value of `ip-proto` attribute in the message.
|
|
654
|
-
#--
|
|
655
885
|
# @rbs return: ::Integer
|
|
886
|
+
# @return [Integer]
|
|
887
|
+
# @see AttributeSets::FibRuleAttrs::IpProto
|
|
656
888
|
def ip_proto; attributes[:"ip_proto"]&.value; end
|
|
657
|
-
#
|
|
658
|
-
|
|
659
|
-
# @
|
|
889
|
+
# @rbs return: Structs::FibRulePortRange
|
|
890
|
+
# @return [Structs::FibRulePortRange]
|
|
891
|
+
# @see AttributeSets::FibRuleAttrs::SportRange
|
|
660
892
|
def sport_range; attributes[:"sport_range"]&.value; end
|
|
661
|
-
#
|
|
662
|
-
|
|
663
|
-
# @
|
|
893
|
+
# @rbs return: Structs::FibRulePortRange
|
|
894
|
+
# @return [Structs::FibRulePortRange]
|
|
895
|
+
# @see AttributeSets::FibRuleAttrs::DportRange
|
|
664
896
|
def dport_range; attributes[:"dport_range"]&.value; end
|
|
665
|
-
# Gets the value of `dscp` attribute in the message.
|
|
666
|
-
#--
|
|
667
897
|
# @rbs return: ::Integer
|
|
898
|
+
# @return [Integer]
|
|
899
|
+
# @see AttributeSets::FibRuleAttrs::Dscp
|
|
668
900
|
def dscp; attributes[:"dscp"]&.value; end
|
|
669
|
-
# Gets the value of `flowlabel` attribute in the message.
|
|
670
|
-
#--
|
|
671
901
|
# @rbs return: ::Integer
|
|
902
|
+
# @return [Integer]
|
|
903
|
+
# @see AttributeSets::FibRuleAttrs::Flowlabel
|
|
672
904
|
def flowlabel; attributes[:"flowlabel"]&.value; end
|
|
673
|
-
# Gets the value of `flowlabel-mask` attribute in the message.
|
|
674
|
-
#--
|
|
675
905
|
# @rbs return: ::Integer
|
|
906
|
+
# @return [Integer]
|
|
907
|
+
# @see AttributeSets::FibRuleAttrs::FlowlabelMask
|
|
676
908
|
def flowlabel_mask; attributes[:"flowlabel_mask"]&.value; end
|
|
677
|
-
# Gets the value of `sport-mask` attribute in the message.
|
|
678
|
-
#--
|
|
679
909
|
# @rbs return: ::Integer
|
|
910
|
+
# @return [Integer]
|
|
911
|
+
# @see AttributeSets::FibRuleAttrs::SportMask
|
|
680
912
|
def sport_mask; attributes[:"sport_mask"]&.value; end
|
|
681
|
-
# Gets the value of `dport-mask` attribute in the message.
|
|
682
|
-
#--
|
|
683
913
|
# @rbs return: ::Integer
|
|
914
|
+
# @return [Integer]
|
|
915
|
+
# @see AttributeSets::FibRuleAttrs::DportMask
|
|
684
916
|
def dport_mask; attributes[:"dport_mask"]&.value; end
|
|
685
|
-
# Gets the value of `dscp-mask` attribute in the message.
|
|
686
|
-
#--
|
|
687
917
|
# @rbs return: ::Integer
|
|
918
|
+
# @return [Integer]
|
|
919
|
+
# @see AttributeSets::FibRuleAttrs::DscpMask
|
|
688
920
|
def dscp_mask; attributes[:"dscp_mask"]&.value; end
|
|
689
921
|
end
|
|
690
922
|
end
|
|
691
923
|
module Notifications
|
|
692
924
|
# Notify a rule creation
|
|
693
|
-
class NewruleNtf < ::Nl::
|
|
925
|
+
class NewruleNtf < ::Nl::Raw::Message
|
|
694
926
|
TYPE = 32
|
|
695
927
|
FIXED_HEADER = Structs::FibRuleHdr
|
|
696
928
|
ATTRIBUTE_SET = AttributeSets::FibRuleAttrs
|
|
697
929
|
ATTRIBUTES = Ractor.make_shareable(%i[iifname goto priority fwmark flow tun_id suppress_ifgroup suppress_prefixlen table fwmask oifname l3mdev uid_range protocol ip_proto sport_range dport_range dscp flowlabel flowlabel_mask sport_mask dport_mask dscp_mask])
|
|
698
|
-
# Gets the value of `family` field in the message's fixed header.
|
|
699
|
-
#--
|
|
700
930
|
# @rbs return: ::Integer
|
|
931
|
+
# @return [Integer]
|
|
701
932
|
def family; fixed_header.family; end
|
|
702
|
-
# Gets the value of `dst-len` field in the message's fixed header.
|
|
703
|
-
#--
|
|
704
933
|
# @rbs return: ::Integer
|
|
934
|
+
# @return [Integer]
|
|
705
935
|
def dst_len; fixed_header.dst_len; end
|
|
706
|
-
# Gets the value of `src-len` field in the message's fixed header.
|
|
707
|
-
#--
|
|
708
936
|
# @rbs return: ::Integer
|
|
937
|
+
# @return [Integer]
|
|
709
938
|
def src_len; fixed_header.src_len; end
|
|
710
|
-
# Gets the value of `tos` field in the message's fixed header.
|
|
711
|
-
#--
|
|
712
939
|
# @rbs return: ::Integer
|
|
940
|
+
# @return [Integer]
|
|
713
941
|
def tos; fixed_header.tos; end
|
|
714
|
-
# Gets the value of `action` field in the message's fixed header.
|
|
715
|
-
#--
|
|
716
942
|
# @rbs return: ::Integer
|
|
943
|
+
# @return [Integer]
|
|
717
944
|
def action; fixed_header.action; end
|
|
718
|
-
# Gets the value of `flags` field in the message's fixed header.
|
|
719
|
-
#--
|
|
720
945
|
# @rbs return: ::Integer
|
|
946
|
+
# @return [Integer]
|
|
721
947
|
def flags; fixed_header.flags; end
|
|
722
|
-
# Gets the value of `iifname` attribute in the message.
|
|
723
|
-
#--
|
|
724
948
|
# @rbs return: ::String
|
|
949
|
+
# @return [String]
|
|
950
|
+
# @see AttributeSets::FibRuleAttrs::Iifname
|
|
725
951
|
def iifname; attributes[:"iifname"]&.value; end
|
|
726
|
-
# Gets the value of `goto` attribute in the message.
|
|
727
|
-
#--
|
|
728
952
|
# @rbs return: ::Integer
|
|
953
|
+
# @return [Integer]
|
|
954
|
+
# @see AttributeSets::FibRuleAttrs::Goto
|
|
729
955
|
def goto; attributes[:"goto"]&.value; end
|
|
730
|
-
# Gets the value of `priority` attribute in the message.
|
|
731
|
-
#--
|
|
732
956
|
# @rbs return: ::Integer
|
|
957
|
+
# @return [Integer]
|
|
958
|
+
# @see AttributeSets::FibRuleAttrs::Priority
|
|
733
959
|
def priority; attributes[:"priority"]&.value; end
|
|
734
|
-
# Gets the value of `fwmark` attribute in the message.
|
|
735
|
-
#--
|
|
736
960
|
# @rbs return: ::Integer
|
|
961
|
+
# @return [Integer]
|
|
962
|
+
# @see AttributeSets::FibRuleAttrs::Fwmark
|
|
737
963
|
def fwmark; attributes[:"fwmark"]&.value; end
|
|
738
|
-
# Gets the value of `flow` attribute in the message.
|
|
739
|
-
#--
|
|
740
964
|
# @rbs return: ::Integer
|
|
965
|
+
# @return [Integer]
|
|
966
|
+
# @see AttributeSets::FibRuleAttrs::Flow
|
|
741
967
|
def flow; attributes[:"flow"]&.value; end
|
|
742
|
-
# Gets the value of `tun-id` attribute in the message.
|
|
743
|
-
#--
|
|
744
968
|
# @rbs return: ::Integer
|
|
969
|
+
# @return [Integer]
|
|
970
|
+
# @see AttributeSets::FibRuleAttrs::TunId
|
|
745
971
|
def tun_id; attributes[:"tun_id"]&.value; end
|
|
746
|
-
# Gets the value of `suppress-ifgroup` attribute in the message.
|
|
747
|
-
#--
|
|
748
972
|
# @rbs return: ::Integer
|
|
973
|
+
# @return [Integer]
|
|
974
|
+
# @see AttributeSets::FibRuleAttrs::SuppressIfgroup
|
|
749
975
|
def suppress_ifgroup; attributes[:"suppress_ifgroup"]&.value; end
|
|
750
|
-
# Gets the value of `suppress-prefixlen` attribute in the message.
|
|
751
|
-
#--
|
|
752
976
|
# @rbs return: ::Integer
|
|
977
|
+
# @return [Integer]
|
|
978
|
+
# @see AttributeSets::FibRuleAttrs::SuppressPrefixlen
|
|
753
979
|
def suppress_prefixlen; attributes[:"suppress_prefixlen"]&.value; end
|
|
754
|
-
# Gets the value of `table` attribute or fixed header in the message.
|
|
755
|
-
#--
|
|
756
980
|
# @rbs return: ::Integer
|
|
981
|
+
# @return [Integer]
|
|
982
|
+
# @see AttributeSets::FibRuleAttrs::Table
|
|
757
983
|
def table; attributes[:"table"]&.value || fixed_header.table; end
|
|
758
|
-
# Gets the value of `fwmask` attribute in the message.
|
|
759
|
-
#--
|
|
760
984
|
# @rbs return: ::Integer
|
|
985
|
+
# @return [Integer]
|
|
986
|
+
# @see AttributeSets::FibRuleAttrs::Fwmask
|
|
761
987
|
def fwmask; attributes[:"fwmask"]&.value; end
|
|
762
|
-
# Gets the value of `oifname` attribute in the message.
|
|
763
|
-
#--
|
|
764
988
|
# @rbs return: ::String
|
|
989
|
+
# @return [String]
|
|
990
|
+
# @see AttributeSets::FibRuleAttrs::Oifname
|
|
765
991
|
def oifname; attributes[:"oifname"]&.value; end
|
|
766
|
-
# Gets the value of `l3mdev` attribute in the message.
|
|
767
|
-
#--
|
|
768
992
|
# @rbs return: ::Integer
|
|
993
|
+
# @return [Integer]
|
|
994
|
+
# @see AttributeSets::FibRuleAttrs::L3mdev
|
|
769
995
|
def l3mdev; attributes[:"l3mdev"]&.value; end
|
|
770
|
-
#
|
|
771
|
-
|
|
772
|
-
# @
|
|
996
|
+
# @rbs return: Structs::FibRuleUidRange
|
|
997
|
+
# @return [Structs::FibRuleUidRange]
|
|
998
|
+
# @see AttributeSets::FibRuleAttrs::UidRange
|
|
773
999
|
def uid_range; attributes[:"uid_range"]&.value; end
|
|
774
|
-
# Gets the value of `protocol` attribute in the message.
|
|
775
|
-
#--
|
|
776
1000
|
# @rbs return: ::Integer
|
|
1001
|
+
# @return [Integer]
|
|
1002
|
+
# @see AttributeSets::FibRuleAttrs::Protocol
|
|
777
1003
|
def protocol; attributes[:"protocol"]&.value; end
|
|
778
|
-
# Gets the value of `ip-proto` attribute in the message.
|
|
779
|
-
#--
|
|
780
1004
|
# @rbs return: ::Integer
|
|
1005
|
+
# @return [Integer]
|
|
1006
|
+
# @see AttributeSets::FibRuleAttrs::IpProto
|
|
781
1007
|
def ip_proto; attributes[:"ip_proto"]&.value; end
|
|
782
|
-
#
|
|
783
|
-
|
|
784
|
-
# @
|
|
1008
|
+
# @rbs return: Structs::FibRulePortRange
|
|
1009
|
+
# @return [Structs::FibRulePortRange]
|
|
1010
|
+
# @see AttributeSets::FibRuleAttrs::SportRange
|
|
785
1011
|
def sport_range; attributes[:"sport_range"]&.value; end
|
|
786
|
-
#
|
|
787
|
-
|
|
788
|
-
# @
|
|
1012
|
+
# @rbs return: Structs::FibRulePortRange
|
|
1013
|
+
# @return [Structs::FibRulePortRange]
|
|
1014
|
+
# @see AttributeSets::FibRuleAttrs::DportRange
|
|
789
1015
|
def dport_range; attributes[:"dport_range"]&.value; end
|
|
790
|
-
# Gets the value of `dscp` attribute in the message.
|
|
791
|
-
#--
|
|
792
1016
|
# @rbs return: ::Integer
|
|
1017
|
+
# @return [Integer]
|
|
1018
|
+
# @see AttributeSets::FibRuleAttrs::Dscp
|
|
793
1019
|
def dscp; attributes[:"dscp"]&.value; end
|
|
794
|
-
# Gets the value of `flowlabel` attribute in the message.
|
|
795
|
-
#--
|
|
796
1020
|
# @rbs return: ::Integer
|
|
1021
|
+
# @return [Integer]
|
|
1022
|
+
# @see AttributeSets::FibRuleAttrs::Flowlabel
|
|
797
1023
|
def flowlabel; attributes[:"flowlabel"]&.value; end
|
|
798
|
-
# Gets the value of `flowlabel-mask` attribute in the message.
|
|
799
|
-
#--
|
|
800
1024
|
# @rbs return: ::Integer
|
|
1025
|
+
# @return [Integer]
|
|
1026
|
+
# @see AttributeSets::FibRuleAttrs::FlowlabelMask
|
|
801
1027
|
def flowlabel_mask; attributes[:"flowlabel_mask"]&.value; end
|
|
802
|
-
# Gets the value of `sport-mask` attribute in the message.
|
|
803
|
-
#--
|
|
804
1028
|
# @rbs return: ::Integer
|
|
1029
|
+
# @return [Integer]
|
|
1030
|
+
# @see AttributeSets::FibRuleAttrs::SportMask
|
|
805
1031
|
def sport_mask; attributes[:"sport_mask"]&.value; end
|
|
806
|
-
# Gets the value of `dport-mask` attribute in the message.
|
|
807
|
-
#--
|
|
808
1032
|
# @rbs return: ::Integer
|
|
1033
|
+
# @return [Integer]
|
|
1034
|
+
# @see AttributeSets::FibRuleAttrs::DportMask
|
|
809
1035
|
def dport_mask; attributes[:"dport_mask"]&.value; end
|
|
810
|
-
# Gets the value of `dscp-mask` attribute in the message.
|
|
811
|
-
#--
|
|
812
1036
|
# @rbs return: ::Integer
|
|
1037
|
+
# @return [Integer]
|
|
1038
|
+
# @see AttributeSets::FibRuleAttrs::DscpMask
|
|
813
1039
|
def dscp_mask; attributes[:"dscp_mask"]&.value; end
|
|
814
1040
|
end
|
|
815
1041
|
# Notify a rule deletion
|
|
816
|
-
class DelruleNtf < ::Nl::
|
|
1042
|
+
class DelruleNtf < ::Nl::Raw::Message
|
|
817
1043
|
TYPE = 33
|
|
818
1044
|
FIXED_HEADER = Structs::FibRuleHdr
|
|
819
1045
|
ATTRIBUTE_SET = AttributeSets::FibRuleAttrs
|
|
820
1046
|
ATTRIBUTES = Ractor.make_shareable(%i[iifname goto priority fwmark flow tun_id suppress_ifgroup suppress_prefixlen table fwmask oifname l3mdev uid_range protocol ip_proto sport_range dport_range dscp flowlabel flowlabel_mask sport_mask dport_mask dscp_mask])
|
|
821
|
-
# Gets the value of `family` field in the message's fixed header.
|
|
822
|
-
#--
|
|
823
1047
|
# @rbs return: ::Integer
|
|
1048
|
+
# @return [Integer]
|
|
824
1049
|
def family; fixed_header.family; end
|
|
825
|
-
# Gets the value of `dst-len` field in the message's fixed header.
|
|
826
|
-
#--
|
|
827
1050
|
# @rbs return: ::Integer
|
|
1051
|
+
# @return [Integer]
|
|
828
1052
|
def dst_len; fixed_header.dst_len; end
|
|
829
|
-
# Gets the value of `src-len` field in the message's fixed header.
|
|
830
|
-
#--
|
|
831
1053
|
# @rbs return: ::Integer
|
|
1054
|
+
# @return [Integer]
|
|
832
1055
|
def src_len; fixed_header.src_len; end
|
|
833
|
-
# Gets the value of `tos` field in the message's fixed header.
|
|
834
|
-
#--
|
|
835
1056
|
# @rbs return: ::Integer
|
|
1057
|
+
# @return [Integer]
|
|
836
1058
|
def tos; fixed_header.tos; end
|
|
837
|
-
# Gets the value of `action` field in the message's fixed header.
|
|
838
|
-
#--
|
|
839
1059
|
# @rbs return: ::Integer
|
|
1060
|
+
# @return [Integer]
|
|
840
1061
|
def action; fixed_header.action; end
|
|
841
|
-
# Gets the value of `flags` field in the message's fixed header.
|
|
842
|
-
#--
|
|
843
1062
|
# @rbs return: ::Integer
|
|
1063
|
+
# @return [Integer]
|
|
844
1064
|
def flags; fixed_header.flags; end
|
|
845
|
-
# Gets the value of `iifname` attribute in the message.
|
|
846
|
-
#--
|
|
847
1065
|
# @rbs return: ::String
|
|
1066
|
+
# @return [String]
|
|
1067
|
+
# @see AttributeSets::FibRuleAttrs::Iifname
|
|
848
1068
|
def iifname; attributes[:"iifname"]&.value; end
|
|
849
|
-
# Gets the value of `goto` attribute in the message.
|
|
850
|
-
#--
|
|
851
1069
|
# @rbs return: ::Integer
|
|
1070
|
+
# @return [Integer]
|
|
1071
|
+
# @see AttributeSets::FibRuleAttrs::Goto
|
|
852
1072
|
def goto; attributes[:"goto"]&.value; end
|
|
853
|
-
# Gets the value of `priority` attribute in the message.
|
|
854
|
-
#--
|
|
855
1073
|
# @rbs return: ::Integer
|
|
1074
|
+
# @return [Integer]
|
|
1075
|
+
# @see AttributeSets::FibRuleAttrs::Priority
|
|
856
1076
|
def priority; attributes[:"priority"]&.value; end
|
|
857
|
-
# Gets the value of `fwmark` attribute in the message.
|
|
858
|
-
#--
|
|
859
1077
|
# @rbs return: ::Integer
|
|
1078
|
+
# @return [Integer]
|
|
1079
|
+
# @see AttributeSets::FibRuleAttrs::Fwmark
|
|
860
1080
|
def fwmark; attributes[:"fwmark"]&.value; end
|
|
861
|
-
# Gets the value of `flow` attribute in the message.
|
|
862
|
-
#--
|
|
863
1081
|
# @rbs return: ::Integer
|
|
1082
|
+
# @return [Integer]
|
|
1083
|
+
# @see AttributeSets::FibRuleAttrs::Flow
|
|
864
1084
|
def flow; attributes[:"flow"]&.value; end
|
|
865
|
-
# Gets the value of `tun-id` attribute in the message.
|
|
866
|
-
#--
|
|
867
1085
|
# @rbs return: ::Integer
|
|
1086
|
+
# @return [Integer]
|
|
1087
|
+
# @see AttributeSets::FibRuleAttrs::TunId
|
|
868
1088
|
def tun_id; attributes[:"tun_id"]&.value; end
|
|
869
|
-
# Gets the value of `suppress-ifgroup` attribute in the message.
|
|
870
|
-
#--
|
|
871
1089
|
# @rbs return: ::Integer
|
|
1090
|
+
# @return [Integer]
|
|
1091
|
+
# @see AttributeSets::FibRuleAttrs::SuppressIfgroup
|
|
872
1092
|
def suppress_ifgroup; attributes[:"suppress_ifgroup"]&.value; end
|
|
873
|
-
# Gets the value of `suppress-prefixlen` attribute in the message.
|
|
874
|
-
#--
|
|
875
1093
|
# @rbs return: ::Integer
|
|
1094
|
+
# @return [Integer]
|
|
1095
|
+
# @see AttributeSets::FibRuleAttrs::SuppressPrefixlen
|
|
876
1096
|
def suppress_prefixlen; attributes[:"suppress_prefixlen"]&.value; end
|
|
877
|
-
# Gets the value of `table` attribute or fixed header in the message.
|
|
878
|
-
#--
|
|
879
1097
|
# @rbs return: ::Integer
|
|
1098
|
+
# @return [Integer]
|
|
1099
|
+
# @see AttributeSets::FibRuleAttrs::Table
|
|
880
1100
|
def table; attributes[:"table"]&.value || fixed_header.table; end
|
|
881
|
-
# Gets the value of `fwmask` attribute in the message.
|
|
882
|
-
#--
|
|
883
1101
|
# @rbs return: ::Integer
|
|
1102
|
+
# @return [Integer]
|
|
1103
|
+
# @see AttributeSets::FibRuleAttrs::Fwmask
|
|
884
1104
|
def fwmask; attributes[:"fwmask"]&.value; end
|
|
885
|
-
# Gets the value of `oifname` attribute in the message.
|
|
886
|
-
#--
|
|
887
1105
|
# @rbs return: ::String
|
|
1106
|
+
# @return [String]
|
|
1107
|
+
# @see AttributeSets::FibRuleAttrs::Oifname
|
|
888
1108
|
def oifname; attributes[:"oifname"]&.value; end
|
|
889
|
-
# Gets the value of `l3mdev` attribute in the message.
|
|
890
|
-
#--
|
|
891
1109
|
# @rbs return: ::Integer
|
|
1110
|
+
# @return [Integer]
|
|
1111
|
+
# @see AttributeSets::FibRuleAttrs::L3mdev
|
|
892
1112
|
def l3mdev; attributes[:"l3mdev"]&.value; end
|
|
893
|
-
#
|
|
894
|
-
|
|
895
|
-
# @
|
|
1113
|
+
# @rbs return: Structs::FibRuleUidRange
|
|
1114
|
+
# @return [Structs::FibRuleUidRange]
|
|
1115
|
+
# @see AttributeSets::FibRuleAttrs::UidRange
|
|
896
1116
|
def uid_range; attributes[:"uid_range"]&.value; end
|
|
897
|
-
# Gets the value of `protocol` attribute in the message.
|
|
898
|
-
#--
|
|
899
1117
|
# @rbs return: ::Integer
|
|
1118
|
+
# @return [Integer]
|
|
1119
|
+
# @see AttributeSets::FibRuleAttrs::Protocol
|
|
900
1120
|
def protocol; attributes[:"protocol"]&.value; end
|
|
901
|
-
# Gets the value of `ip-proto` attribute in the message.
|
|
902
|
-
#--
|
|
903
1121
|
# @rbs return: ::Integer
|
|
1122
|
+
# @return [Integer]
|
|
1123
|
+
# @see AttributeSets::FibRuleAttrs::IpProto
|
|
904
1124
|
def ip_proto; attributes[:"ip_proto"]&.value; end
|
|
905
|
-
#
|
|
906
|
-
|
|
907
|
-
# @
|
|
1125
|
+
# @rbs return: Structs::FibRulePortRange
|
|
1126
|
+
# @return [Structs::FibRulePortRange]
|
|
1127
|
+
# @see AttributeSets::FibRuleAttrs::SportRange
|
|
908
1128
|
def sport_range; attributes[:"sport_range"]&.value; end
|
|
909
|
-
#
|
|
910
|
-
|
|
911
|
-
# @
|
|
1129
|
+
# @rbs return: Structs::FibRulePortRange
|
|
1130
|
+
# @return [Structs::FibRulePortRange]
|
|
1131
|
+
# @see AttributeSets::FibRuleAttrs::DportRange
|
|
912
1132
|
def dport_range; attributes[:"dport_range"]&.value; end
|
|
913
|
-
# Gets the value of `dscp` attribute in the message.
|
|
914
|
-
#--
|
|
915
1133
|
# @rbs return: ::Integer
|
|
1134
|
+
# @return [Integer]
|
|
1135
|
+
# @see AttributeSets::FibRuleAttrs::Dscp
|
|
916
1136
|
def dscp; attributes[:"dscp"]&.value; end
|
|
917
|
-
# Gets the value of `flowlabel` attribute in the message.
|
|
918
|
-
#--
|
|
919
1137
|
# @rbs return: ::Integer
|
|
1138
|
+
# @return [Integer]
|
|
1139
|
+
# @see AttributeSets::FibRuleAttrs::Flowlabel
|
|
920
1140
|
def flowlabel; attributes[:"flowlabel"]&.value; end
|
|
921
|
-
# Gets the value of `flowlabel-mask` attribute in the message.
|
|
922
|
-
#--
|
|
923
1141
|
# @rbs return: ::Integer
|
|
1142
|
+
# @return [Integer]
|
|
1143
|
+
# @see AttributeSets::FibRuleAttrs::FlowlabelMask
|
|
924
1144
|
def flowlabel_mask; attributes[:"flowlabel_mask"]&.value; end
|
|
925
|
-
# Gets the value of `sport-mask` attribute in the message.
|
|
926
|
-
#--
|
|
927
1145
|
# @rbs return: ::Integer
|
|
1146
|
+
# @return [Integer]
|
|
1147
|
+
# @see AttributeSets::FibRuleAttrs::SportMask
|
|
928
1148
|
def sport_mask; attributes[:"sport_mask"]&.value; end
|
|
929
|
-
# Gets the value of `dport-mask` attribute in the message.
|
|
930
|
-
#--
|
|
931
1149
|
# @rbs return: ::Integer
|
|
1150
|
+
# @return [Integer]
|
|
1151
|
+
# @see AttributeSets::FibRuleAttrs::DportMask
|
|
932
1152
|
def dport_mask; attributes[:"dport_mask"]&.value; end
|
|
933
|
-
# Gets the value of `dscp-mask` attribute in the message.
|
|
934
|
-
#--
|
|
935
1153
|
# @rbs return: ::Integer
|
|
1154
|
+
# @return [Integer]
|
|
1155
|
+
# @see AttributeSets::FibRuleAttrs::DscpMask
|
|
936
1156
|
def dscp_mask; attributes[:"dscp_mask"]&.value; end
|
|
937
1157
|
end
|
|
938
1158
|
end
|
|
1159
|
+
# @private
|
|
939
1160
|
NOTIFICATIONS = Ractor.make_shareable({32 => Notifications::NewruleNtf, 33 => Notifications::DelruleNtf}) #: Hash[::Integer, ::Class]
|
|
940
1161
|
# Add new FIB rule
|
|
941
|
-
|
|
942
|
-
# @
|
|
1162
|
+
# @rbs (?family: ::Integer, ?dst_len: ::Integer, ?src_len: ::Integer, ?tos: ::Integer, ?table: ::Integer, ?action: ::Integer, ?flags: ::Integer, ?iifname: ::String, ?goto: ::Integer, ?priority: ::Integer, ?fwmark: ::Integer, ?flow: ::Integer, ?tun_id: ::Integer, ?suppress_ifgroup: ::Integer, ?suppress_prefixlen: ::Integer, ?fwmask: ::Integer, ?oifname: ::String, ?l3mdev: ::Integer, ?uid_range: (Structs::FibRuleUidRange | ::Hash[::Symbol, untyped]), ?protocol: ::Integer, ?ip_proto: ::Integer, ?sport_range: (Structs::FibRulePortRange | ::Hash[::Symbol, untyped]), ?dport_range: (Structs::FibRulePortRange | ::Hash[::Symbol, untyped]), ?dscp: ::Integer, ?flowlabel: ::Integer, ?flowlabel_mask: ::Integer, ?sport_mask: ::Integer, ?dport_mask: ::Integer, ?dscp_mask: ::Integer) -> void
|
|
1163
|
+
# @param [Hash] args
|
|
1164
|
+
# @option args [Integer] family
|
|
1165
|
+
# @option args [Integer] dst_len
|
|
1166
|
+
# @option args [Integer] src_len
|
|
1167
|
+
# @option args [Integer] tos
|
|
1168
|
+
# @option args [Integer] table
|
|
1169
|
+
# @option args [Integer] action
|
|
1170
|
+
# @option args [Integer] flags
|
|
1171
|
+
# @option args [String] iifname
|
|
1172
|
+
# @option args [Integer] goto
|
|
1173
|
+
# @option args [Integer] priority
|
|
1174
|
+
# @option args [Integer] fwmark
|
|
1175
|
+
# @option args [Integer] flow
|
|
1176
|
+
# @option args [Integer] tun_id
|
|
1177
|
+
# @option args [Integer] suppress_ifgroup
|
|
1178
|
+
# @option args [Integer] suppress_prefixlen
|
|
1179
|
+
# @option args [Integer] fwmask
|
|
1180
|
+
# @option args [String] oifname
|
|
1181
|
+
# @option args [Integer] l3mdev
|
|
1182
|
+
# @option args [Structs::FibRuleUidRange, Hash<Symbol, Object>] uid_range
|
|
1183
|
+
# @option args [Integer] protocol
|
|
1184
|
+
# @option args [Integer] ip_proto
|
|
1185
|
+
# @option args [Structs::FibRulePortRange, Hash<Symbol, Object>] sport_range
|
|
1186
|
+
# @option args [Structs::FibRulePortRange, Hash<Symbol, Object>] dport_range
|
|
1187
|
+
# @option args [Integer] dscp
|
|
1188
|
+
# @option args [Integer] flowlabel
|
|
1189
|
+
# @option args [Integer] flowlabel_mask
|
|
1190
|
+
# @option args [Integer] sport_mask
|
|
1191
|
+
# @option args [Integer] dport_mask
|
|
1192
|
+
# @option args [Integer] dscp_mask
|
|
1193
|
+
# @return [void]
|
|
1194
|
+
# @see Messages::DoNewruleRequest
|
|
943
1195
|
def do_newrule(**args)
|
|
944
1196
|
exchange_message(:"do", Messages::DoNewruleRequest, nil, args)
|
|
945
1197
|
end
|
|
946
1198
|
# Remove an existing FIB rule
|
|
947
|
-
|
|
948
|
-
# @
|
|
1199
|
+
# @rbs (?family: ::Integer, ?dst_len: ::Integer, ?src_len: ::Integer, ?tos: ::Integer, ?table: ::Integer, ?action: ::Integer, ?flags: ::Integer, ?iifname: ::String, ?goto: ::Integer, ?priority: ::Integer, ?fwmark: ::Integer, ?flow: ::Integer, ?tun_id: ::Integer, ?suppress_ifgroup: ::Integer, ?suppress_prefixlen: ::Integer, ?fwmask: ::Integer, ?oifname: ::String, ?l3mdev: ::Integer, ?uid_range: (Structs::FibRuleUidRange | ::Hash[::Symbol, untyped]), ?protocol: ::Integer, ?ip_proto: ::Integer, ?sport_range: (Structs::FibRulePortRange | ::Hash[::Symbol, untyped]), ?dport_range: (Structs::FibRulePortRange | ::Hash[::Symbol, untyped]), ?dscp: ::Integer, ?flowlabel: ::Integer, ?flowlabel_mask: ::Integer, ?sport_mask: ::Integer, ?dport_mask: ::Integer, ?dscp_mask: ::Integer) -> void
|
|
1200
|
+
# @param [Hash] args
|
|
1201
|
+
# @option args [Integer] family
|
|
1202
|
+
# @option args [Integer] dst_len
|
|
1203
|
+
# @option args [Integer] src_len
|
|
1204
|
+
# @option args [Integer] tos
|
|
1205
|
+
# @option args [Integer] table
|
|
1206
|
+
# @option args [Integer] action
|
|
1207
|
+
# @option args [Integer] flags
|
|
1208
|
+
# @option args [String] iifname
|
|
1209
|
+
# @option args [Integer] goto
|
|
1210
|
+
# @option args [Integer] priority
|
|
1211
|
+
# @option args [Integer] fwmark
|
|
1212
|
+
# @option args [Integer] flow
|
|
1213
|
+
# @option args [Integer] tun_id
|
|
1214
|
+
# @option args [Integer] suppress_ifgroup
|
|
1215
|
+
# @option args [Integer] suppress_prefixlen
|
|
1216
|
+
# @option args [Integer] fwmask
|
|
1217
|
+
# @option args [String] oifname
|
|
1218
|
+
# @option args [Integer] l3mdev
|
|
1219
|
+
# @option args [Structs::FibRuleUidRange, Hash<Symbol, Object>] uid_range
|
|
1220
|
+
# @option args [Integer] protocol
|
|
1221
|
+
# @option args [Integer] ip_proto
|
|
1222
|
+
# @option args [Structs::FibRulePortRange, Hash<Symbol, Object>] sport_range
|
|
1223
|
+
# @option args [Structs::FibRulePortRange, Hash<Symbol, Object>] dport_range
|
|
1224
|
+
# @option args [Integer] dscp
|
|
1225
|
+
# @option args [Integer] flowlabel
|
|
1226
|
+
# @option args [Integer] flowlabel_mask
|
|
1227
|
+
# @option args [Integer] sport_mask
|
|
1228
|
+
# @option args [Integer] dport_mask
|
|
1229
|
+
# @option args [Integer] dscp_mask
|
|
1230
|
+
# @return [void]
|
|
1231
|
+
# @see Messages::DoDelruleRequest
|
|
949
1232
|
def do_delrule(**args)
|
|
950
1233
|
exchange_message(:"do", Messages::DoDelruleRequest, nil, args)
|
|
951
1234
|
end
|
|
952
1235
|
# Dump all FIB rules
|
|
953
|
-
|
|
954
|
-
# @rbs (?family: ::Integer, ?dst_len: ::Integer, ?src_len: ::Integer, ?tos: ::Integer, ?table: ::Integer, ?action: ::Integer, ?flags: ::Integer) -> Enumerable[Messages::DumpGetruleReply]
|
|
1236
|
+
# @rbs (?family: ::Integer, ?dst_len: ::Integer, ?src_len: ::Integer, ?tos: ::Integer, ?table: ::Integer, ?action: ::Integer, ?flags: ::Integer) -> Array[Messages::DumpGetruleReply]
|
|
955
1237
|
# | (?family: ::Integer, ?dst_len: ::Integer, ?src_len: ::Integer, ?tos: ::Integer, ?table: ::Integer, ?action: ::Integer, ?flags: ::Integer) { (Messages::DumpGetruleReply) -> void } -> void
|
|
1238
|
+
# @overload dump_getrule(**args)
|
|
1239
|
+
# Returns an array when no block is given.
|
|
1240
|
+
# @param [Hash] args
|
|
1241
|
+
# @option args [Integer] family
|
|
1242
|
+
# @option args [Integer] dst_len
|
|
1243
|
+
# @option args [Integer] src_len
|
|
1244
|
+
# @option args [Integer] tos
|
|
1245
|
+
# @option args [Integer] table
|
|
1246
|
+
# @option args [Integer] action
|
|
1247
|
+
# @option args [Integer] flags
|
|
1248
|
+
# @return [Array<Messages::DumpGetruleReply>]
|
|
1249
|
+
# @overload dump_getrule(**args, &block)
|
|
1250
|
+
# Yields each reply when a block is given.
|
|
1251
|
+
# @param [Hash] args
|
|
1252
|
+
# @option args [Integer] family
|
|
1253
|
+
# @option args [Integer] dst_len
|
|
1254
|
+
# @option args [Integer] src_len
|
|
1255
|
+
# @option args [Integer] tos
|
|
1256
|
+
# @option args [Integer] table
|
|
1257
|
+
# @option args [Integer] action
|
|
1258
|
+
# @option args [Integer] flags
|
|
1259
|
+
# @yieldparam [Messages::DumpGetruleReply] reply
|
|
1260
|
+
# @return [void]
|
|
1261
|
+
# @see Messages::DumpGetruleRequest
|
|
956
1262
|
def dump_getrule(**args, &block)
|
|
957
1263
|
exchange_message(:"dump", Messages::DumpGetruleRequest, Messages::DumpGetruleReply, args, &block)
|
|
958
1264
|
end
|
|
959
1265
|
class AsyncOperations
|
|
960
|
-
#
|
|
1266
|
+
# @private
|
|
961
1267
|
def initialize(&exchange)
|
|
962
1268
|
@exchange = exchange
|
|
963
1269
|
end
|
|
964
1270
|
# Add new FIB rule
|
|
965
|
-
|
|
966
|
-
# @
|
|
1271
|
+
# @rbs (?family: ::Integer, ?dst_len: ::Integer, ?src_len: ::Integer, ?tos: ::Integer, ?table: ::Integer, ?action: ::Integer, ?flags: ::Integer, ?iifname: ::String, ?goto: ::Integer, ?priority: ::Integer, ?fwmark: ::Integer, ?flow: ::Integer, ?tun_id: ::Integer, ?suppress_ifgroup: ::Integer, ?suppress_prefixlen: ::Integer, ?fwmask: ::Integer, ?oifname: ::String, ?l3mdev: ::Integer, ?uid_range: (Structs::FibRuleUidRange | ::Hash[::Symbol, untyped]), ?protocol: ::Integer, ?ip_proto: ::Integer, ?sport_range: (Structs::FibRulePortRange | ::Hash[::Symbol, untyped]), ?dport_range: (Structs::FibRulePortRange | ::Hash[::Symbol, untyped]), ?dscp: ::Integer, ?flowlabel: ::Integer, ?flowlabel_mask: ::Integer, ?sport_mask: ::Integer, ?dport_mask: ::Integer, ?dscp_mask: ::Integer) -> ::Nl::Async::Future[void]
|
|
1272
|
+
# @param [Hash] args
|
|
1273
|
+
# @option args [Integer] family
|
|
1274
|
+
# @option args [Integer] dst_len
|
|
1275
|
+
# @option args [Integer] src_len
|
|
1276
|
+
# @option args [Integer] tos
|
|
1277
|
+
# @option args [Integer] table
|
|
1278
|
+
# @option args [Integer] action
|
|
1279
|
+
# @option args [Integer] flags
|
|
1280
|
+
# @option args [String] iifname
|
|
1281
|
+
# @option args [Integer] goto
|
|
1282
|
+
# @option args [Integer] priority
|
|
1283
|
+
# @option args [Integer] fwmark
|
|
1284
|
+
# @option args [Integer] flow
|
|
1285
|
+
# @option args [Integer] tun_id
|
|
1286
|
+
# @option args [Integer] suppress_ifgroup
|
|
1287
|
+
# @option args [Integer] suppress_prefixlen
|
|
1288
|
+
# @option args [Integer] fwmask
|
|
1289
|
+
# @option args [String] oifname
|
|
1290
|
+
# @option args [Integer] l3mdev
|
|
1291
|
+
# @option args [Structs::FibRuleUidRange, Hash<Symbol, Object>] uid_range
|
|
1292
|
+
# @option args [Integer] protocol
|
|
1293
|
+
# @option args [Integer] ip_proto
|
|
1294
|
+
# @option args [Structs::FibRulePortRange, Hash<Symbol, Object>] sport_range
|
|
1295
|
+
# @option args [Structs::FibRulePortRange, Hash<Symbol, Object>] dport_range
|
|
1296
|
+
# @option args [Integer] dscp
|
|
1297
|
+
# @option args [Integer] flowlabel
|
|
1298
|
+
# @option args [Integer] flowlabel_mask
|
|
1299
|
+
# @option args [Integer] sport_mask
|
|
1300
|
+
# @option args [Integer] dport_mask
|
|
1301
|
+
# @option args [Integer] dscp_mask
|
|
1302
|
+
# @return [Nl::Async::Future<void>]
|
|
1303
|
+
# @see Messages::DoNewruleRequest
|
|
967
1304
|
def do_newrule(**args)
|
|
968
1305
|
@exchange.call(:"do", Messages::DoNewruleRequest, nil, args)
|
|
969
1306
|
end
|
|
970
1307
|
# Remove an existing FIB rule
|
|
971
|
-
|
|
972
|
-
# @
|
|
1308
|
+
# @rbs (?family: ::Integer, ?dst_len: ::Integer, ?src_len: ::Integer, ?tos: ::Integer, ?table: ::Integer, ?action: ::Integer, ?flags: ::Integer, ?iifname: ::String, ?goto: ::Integer, ?priority: ::Integer, ?fwmark: ::Integer, ?flow: ::Integer, ?tun_id: ::Integer, ?suppress_ifgroup: ::Integer, ?suppress_prefixlen: ::Integer, ?fwmask: ::Integer, ?oifname: ::String, ?l3mdev: ::Integer, ?uid_range: (Structs::FibRuleUidRange | ::Hash[::Symbol, untyped]), ?protocol: ::Integer, ?ip_proto: ::Integer, ?sport_range: (Structs::FibRulePortRange | ::Hash[::Symbol, untyped]), ?dport_range: (Structs::FibRulePortRange | ::Hash[::Symbol, untyped]), ?dscp: ::Integer, ?flowlabel: ::Integer, ?flowlabel_mask: ::Integer, ?sport_mask: ::Integer, ?dport_mask: ::Integer, ?dscp_mask: ::Integer) -> ::Nl::Async::Future[void]
|
|
1309
|
+
# @param [Hash] args
|
|
1310
|
+
# @option args [Integer] family
|
|
1311
|
+
# @option args [Integer] dst_len
|
|
1312
|
+
# @option args [Integer] src_len
|
|
1313
|
+
# @option args [Integer] tos
|
|
1314
|
+
# @option args [Integer] table
|
|
1315
|
+
# @option args [Integer] action
|
|
1316
|
+
# @option args [Integer] flags
|
|
1317
|
+
# @option args [String] iifname
|
|
1318
|
+
# @option args [Integer] goto
|
|
1319
|
+
# @option args [Integer] priority
|
|
1320
|
+
# @option args [Integer] fwmark
|
|
1321
|
+
# @option args [Integer] flow
|
|
1322
|
+
# @option args [Integer] tun_id
|
|
1323
|
+
# @option args [Integer] suppress_ifgroup
|
|
1324
|
+
# @option args [Integer] suppress_prefixlen
|
|
1325
|
+
# @option args [Integer] fwmask
|
|
1326
|
+
# @option args [String] oifname
|
|
1327
|
+
# @option args [Integer] l3mdev
|
|
1328
|
+
# @option args [Structs::FibRuleUidRange, Hash<Symbol, Object>] uid_range
|
|
1329
|
+
# @option args [Integer] protocol
|
|
1330
|
+
# @option args [Integer] ip_proto
|
|
1331
|
+
# @option args [Structs::FibRulePortRange, Hash<Symbol, Object>] sport_range
|
|
1332
|
+
# @option args [Structs::FibRulePortRange, Hash<Symbol, Object>] dport_range
|
|
1333
|
+
# @option args [Integer] dscp
|
|
1334
|
+
# @option args [Integer] flowlabel
|
|
1335
|
+
# @option args [Integer] flowlabel_mask
|
|
1336
|
+
# @option args [Integer] sport_mask
|
|
1337
|
+
# @option args [Integer] dport_mask
|
|
1338
|
+
# @option args [Integer] dscp_mask
|
|
1339
|
+
# @return [Nl::Async::Future<void>]
|
|
1340
|
+
# @see Messages::DoDelruleRequest
|
|
973
1341
|
def do_delrule(**args)
|
|
974
1342
|
@exchange.call(:"do", Messages::DoDelruleRequest, nil, args)
|
|
975
1343
|
end
|
|
976
1344
|
# Dump all FIB rules
|
|
977
|
-
#--
|
|
978
1345
|
# @rbs (?family: ::Integer, ?dst_len: ::Integer, ?src_len: ::Integer, ?tos: ::Integer, ?table: ::Integer, ?action: ::Integer, ?flags: ::Integer) -> ::Nl::Async::Stream[Messages::DumpGetruleReply]
|
|
1346
|
+
# @param [Hash] args
|
|
1347
|
+
# @option args [Integer] family
|
|
1348
|
+
# @option args [Integer] dst_len
|
|
1349
|
+
# @option args [Integer] src_len
|
|
1350
|
+
# @option args [Integer] tos
|
|
1351
|
+
# @option args [Integer] table
|
|
1352
|
+
# @option args [Integer] action
|
|
1353
|
+
# @option args [Integer] flags
|
|
1354
|
+
# @return [Nl::Async::Stream<Messages::DumpGetruleReply>]
|
|
1355
|
+
# @see Messages::DumpGetruleRequest
|
|
979
1356
|
def dump_getrule(**args)
|
|
980
1357
|
@exchange.call(:"dump", Messages::DumpGetruleRequest, Messages::DumpGetruleReply, args)
|
|
981
1358
|
end
|
|
982
1359
|
end
|
|
983
1360
|
# Returns the asynchronous operation facade for this family.
|
|
984
|
-
#--
|
|
985
1361
|
# @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
|
|
1362
|
+
# @param [::Integer, nil] stream_capacity
|
|
1363
|
+
# @return [AsyncOperations]
|
|
986
1364
|
def async(stream_capacity: nil)
|
|
987
1365
|
return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
|
|
988
1366
|
build_async_facade(AsyncOperations, stream_capacity:)
|
|
989
1367
|
end
|
|
990
|
-
#--
|
|
991
1368
|
# @rbs (*(:rtnlgrp_ipv4_rule | :rtnlgrp_ipv6_rule) groups) -> self
|
|
1369
|
+
# @param [Array<:rtnlgrp_ipv4_rule, :rtnlgrp_ipv6_rule>] groups
|
|
1370
|
+
# @return [self]
|
|
992
1371
|
def subscribe(*groups) = super
|
|
993
|
-
#--
|
|
994
1372
|
# @rbs (*(:rtnlgrp_ipv4_rule | :rtnlgrp_ipv6_rule) groups) -> self
|
|
1373
|
+
# @param [Array<:rtnlgrp_ipv4_rule, :rtnlgrp_ipv6_rule>] groups
|
|
1374
|
+
# @return [self]
|
|
995
1375
|
def unsubscribe(*groups) = super
|
|
996
1376
|
end
|
|
997
1377
|
end; end
|