blob: a4dadafe08dd0e8ebea125781f7de610441da7b9 [file] [log] [blame]
Sven Eckelmanna0105792017-11-19 15:05:16 +01001/* SPDX-License-Identifier: MIT */
Sven Eckelmann7a79d712018-12-31 23:59:59 +01002/* Copyright (C) 2016-2019 B.A.T.M.A.N. contributors:
Matthias Schiffer09748a22016-05-09 18:41:08 +02003 *
4 * Matthias Schiffer
5 *
Sven Eckelmanna0105792017-11-19 15:05:16 +01006 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
Matthias Schiffer09748a22016-05-09 18:41:08 +020012 *
Sven Eckelmanna0105792017-11-19 15:05:16 +010013 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
Matthias Schiffer09748a22016-05-09 18:41:08 +020023 */
24
25#ifndef _UAPI_LINUX_BATMAN_ADV_H_
26#define _UAPI_LINUX_BATMAN_ADV_H_
27
28#define BATADV_NL_NAME "batadv"
29
Sven Eckelmann60040512018-11-23 12:14:56 +010030#define BATADV_NL_MCAST_GROUP_CONFIG "config"
Antonio Quartulli33a3bb42016-05-05 13:09:43 +020031#define BATADV_NL_MCAST_GROUP_TPMETER "tpmeter"
32
Matthias Schiffer09748a22016-05-09 18:41:08 +020033/**
Matthias Schifferd34f0552016-07-03 13:31:37 +020034 * enum batadv_tt_client_flags - TT client specific flags
Matthias Schifferd34f0552016-07-03 13:31:37 +020035 *
36 * Bits from 0 to 7 are called _remote flags_ because they are sent on the wire.
37 * Bits from 8 to 15 are called _local flags_ because they are used for local
38 * computations only.
39 *
40 * Bits from 4 to 7 - a subset of remote flags - are ensured to be in sync with
41 * the other nodes in the network. To achieve this goal these flags are included
42 * in the TT CRC computation.
43 */
44enum batadv_tt_client_flags {
Sven Eckelmann40b16b92017-10-21 11:45:46 +020045 /**
46 * @BATADV_TT_CLIENT_DEL: the client has to be deleted from the table
47 */
Matthias Schifferd34f0552016-07-03 13:31:37 +020048 BATADV_TT_CLIENT_DEL = (1 << 0),
Sven Eckelmann40b16b92017-10-21 11:45:46 +020049
50 /**
51 * @BATADV_TT_CLIENT_ROAM: the client roamed to/from another node and
52 * the new update telling its new real location has not been
53 * received/sent yet
54 */
Matthias Schifferd34f0552016-07-03 13:31:37 +020055 BATADV_TT_CLIENT_ROAM = (1 << 1),
Sven Eckelmann40b16b92017-10-21 11:45:46 +020056
57 /**
58 * @BATADV_TT_CLIENT_WIFI: this client is connected through a wifi
59 * interface. This information is used by the "AP Isolation" feature
60 */
Matthias Schifferd34f0552016-07-03 13:31:37 +020061 BATADV_TT_CLIENT_WIFI = (1 << 4),
Sven Eckelmann40b16b92017-10-21 11:45:46 +020062
63 /**
64 * @BATADV_TT_CLIENT_ISOLA: this client is considered "isolated". This
65 * information is used by the Extended Isolation feature
66 */
Matthias Schifferd34f0552016-07-03 13:31:37 +020067 BATADV_TT_CLIENT_ISOLA = (1 << 5),
Sven Eckelmann40b16b92017-10-21 11:45:46 +020068
69 /**
70 * @BATADV_TT_CLIENT_NOPURGE: this client should never be removed from
71 * the table
72 */
Matthias Schifferd34f0552016-07-03 13:31:37 +020073 BATADV_TT_CLIENT_NOPURGE = (1 << 8),
Sven Eckelmann40b16b92017-10-21 11:45:46 +020074
75 /**
76 * @BATADV_TT_CLIENT_NEW: this client has been added to the local table
77 * but has not been announced yet
78 */
Matthias Schifferd34f0552016-07-03 13:31:37 +020079 BATADV_TT_CLIENT_NEW = (1 << 9),
Sven Eckelmann40b16b92017-10-21 11:45:46 +020080
81 /**
82 * @BATADV_TT_CLIENT_PENDING: this client is marked for removal but it
83 * is kept in the table for one more originator interval for consistency
84 * purposes
85 */
Matthias Schifferd34f0552016-07-03 13:31:37 +020086 BATADV_TT_CLIENT_PENDING = (1 << 10),
Sven Eckelmann40b16b92017-10-21 11:45:46 +020087
88 /**
89 * @BATADV_TT_CLIENT_TEMP: this global client has been detected to be
90 * part of the network but no nnode has already announced it
91 */
Matthias Schifferd34f0552016-07-03 13:31:37 +020092 BATADV_TT_CLIENT_TEMP = (1 << 11),
93};
94
95/**
Linus Lüssing53dd9a62018-03-13 11:41:13 +010096 * enum batadv_mcast_flags_priv - Private, own multicast flags
97 *
98 * These are internal, multicast related flags. Currently they describe certain
99 * multicast related attributes of the segment this originator bridges into the
100 * mesh.
101 *
102 * Those attributes are used to determine the public multicast flags this
103 * originator is going to announce via TT.
104 *
105 * For netlink, if BATADV_MCAST_FLAGS_BRIDGED is unset then all querier
106 * related flags are undefined.
107 */
108enum batadv_mcast_flags_priv {
109 /**
110 * @BATADV_MCAST_FLAGS_BRIDGED: There is a bridge on top of the mesh
111 * interface.
112 */
113 BATADV_MCAST_FLAGS_BRIDGED = (1 << 0),
114
115 /**
116 * @BATADV_MCAST_FLAGS_QUERIER_IPV4_EXISTS: Whether an IGMP querier
117 * exists in the mesh
118 */
119 BATADV_MCAST_FLAGS_QUERIER_IPV4_EXISTS = (1 << 1),
120
121 /**
122 * @BATADV_MCAST_FLAGS_QUERIER_IPV6_EXISTS: Whether an MLD querier
123 * exists in the mesh
124 */
125 BATADV_MCAST_FLAGS_QUERIER_IPV6_EXISTS = (1 << 2),
126
127 /**
128 * @BATADV_MCAST_FLAGS_QUERIER_IPV4_SHADOWING: If an IGMP querier
129 * exists, whether it is potentially shadowing multicast listeners
130 * (i.e. querier is behind our own bridge segment)
131 */
132 BATADV_MCAST_FLAGS_QUERIER_IPV4_SHADOWING = (1 << 3),
133
134 /**
135 * @BATADV_MCAST_FLAGS_QUERIER_IPV6_SHADOWING: If an MLD querier
136 * exists, whether it is potentially shadowing multicast listeners
137 * (i.e. querier is behind our own bridge segment)
138 */
139 BATADV_MCAST_FLAGS_QUERIER_IPV6_SHADOWING = (1 << 4),
140};
141
142/**
Matthias Schiffer09748a22016-05-09 18:41:08 +0200143 * enum batadv_nl_attrs - batman-adv netlink attributes
Matthias Schiffer09748a22016-05-09 18:41:08 +0200144 */
145enum batadv_nl_attrs {
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200146 /**
147 * @BATADV_ATTR_UNSPEC: unspecified attribute to catch errors
148 */
Matthias Schiffer09748a22016-05-09 18:41:08 +0200149 BATADV_ATTR_UNSPEC,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200150
151 /**
152 * @BATADV_ATTR_VERSION: batman-adv version string
153 */
Matthias Schiffer5da0aef2016-05-09 18:41:09 +0200154 BATADV_ATTR_VERSION,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200155
156 /**
157 * @BATADV_ATTR_ALGO_NAME: name of routing algorithm
158 */
Matthias Schiffer5da0aef2016-05-09 18:41:09 +0200159 BATADV_ATTR_ALGO_NAME,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200160
161 /**
162 * @BATADV_ATTR_MESH_IFINDEX: index of the batman-adv interface
163 */
Matthias Schiffer5da0aef2016-05-09 18:41:09 +0200164 BATADV_ATTR_MESH_IFINDEX,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200165
166 /**
167 * @BATADV_ATTR_MESH_IFNAME: name of the batman-adv interface
168 */
Matthias Schiffer5da0aef2016-05-09 18:41:09 +0200169 BATADV_ATTR_MESH_IFNAME,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200170
171 /**
172 * @BATADV_ATTR_MESH_ADDRESS: mac address of the batman-adv interface
173 */
Matthias Schiffer5da0aef2016-05-09 18:41:09 +0200174 BATADV_ATTR_MESH_ADDRESS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200175
176 /**
177 * @BATADV_ATTR_HARD_IFINDEX: index of the non-batman-adv interface
178 */
Matthias Schiffer5da0aef2016-05-09 18:41:09 +0200179 BATADV_ATTR_HARD_IFINDEX,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200180
181 /**
182 * @BATADV_ATTR_HARD_IFNAME: name of the non-batman-adv interface
183 */
Matthias Schiffer5da0aef2016-05-09 18:41:09 +0200184 BATADV_ATTR_HARD_IFNAME,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200185
186 /**
187 * @BATADV_ATTR_HARD_ADDRESS: mac address of the non-batman-adv
188 * interface
189 */
Matthias Schiffer5da0aef2016-05-09 18:41:09 +0200190 BATADV_ATTR_HARD_ADDRESS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200191
192 /**
193 * @BATADV_ATTR_ORIG_ADDRESS: originator mac address
194 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200195 BATADV_ATTR_ORIG_ADDRESS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200196
197 /**
198 * @BATADV_ATTR_TPMETER_RESULT: result of run (see
199 * batadv_tp_meter_status)
200 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200201 BATADV_ATTR_TPMETER_RESULT,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200202
203 /**
204 * @BATADV_ATTR_TPMETER_TEST_TIME: time (msec) the run took
205 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200206 BATADV_ATTR_TPMETER_TEST_TIME,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200207
208 /**
209 * @BATADV_ATTR_TPMETER_BYTES: amount of acked bytes during run
210 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200211 BATADV_ATTR_TPMETER_BYTES,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200212
213 /**
214 * @BATADV_ATTR_TPMETER_COOKIE: session cookie to match tp_meter session
215 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200216 BATADV_ATTR_TPMETER_COOKIE,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200217
218 /**
219 * @BATADV_ATTR_PAD: attribute used for padding for 64-bit alignment
220 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200221 BATADV_ATTR_PAD,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200222
223 /**
224 * @BATADV_ATTR_ACTIVE: Flag indicating if the hard interface is active
225 */
Matthias Schifferb60620c2016-07-03 13:31:36 +0200226 BATADV_ATTR_ACTIVE,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200227
228 /**
229 * @BATADV_ATTR_TT_ADDRESS: Client MAC address
230 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200231 BATADV_ATTR_TT_ADDRESS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200232
233 /**
234 * @BATADV_ATTR_TT_TTVN: Translation table version
235 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200236 BATADV_ATTR_TT_TTVN,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200237
238 /**
239 * @BATADV_ATTR_TT_LAST_TTVN: Previous translation table version
240 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200241 BATADV_ATTR_TT_LAST_TTVN,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200242
243 /**
244 * @BATADV_ATTR_TT_CRC32: CRC32 over translation table
245 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200246 BATADV_ATTR_TT_CRC32,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200247
248 /**
249 * @BATADV_ATTR_TT_VID: VLAN ID
250 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200251 BATADV_ATTR_TT_VID,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200252
253 /**
254 * @BATADV_ATTR_TT_FLAGS: Translation table client flags
255 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200256 BATADV_ATTR_TT_FLAGS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200257
258 /**
259 * @BATADV_ATTR_FLAG_BEST: Flags indicating entry is the best
260 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200261 BATADV_ATTR_FLAG_BEST,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200262
263 /**
264 * @BATADV_ATTR_LAST_SEEN_MSECS: Time in milliseconds since last seen
265 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200266 BATADV_ATTR_LAST_SEEN_MSECS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200267
268 /**
269 * @BATADV_ATTR_NEIGH_ADDRESS: Neighbour MAC address
270 */
Matthias Schiffer024f99c2016-07-03 13:31:40 +0200271 BATADV_ATTR_NEIGH_ADDRESS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200272
273 /**
274 * @BATADV_ATTR_TQ: TQ to neighbour
275 */
Matthias Schiffer024f99c2016-07-03 13:31:40 +0200276 BATADV_ATTR_TQ,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200277
278 /**
279 * @BATADV_ATTR_THROUGHPUT: Estimated throughput to Neighbour
280 */
Matthias Schifferf02a4782016-07-03 13:31:41 +0200281 BATADV_ATTR_THROUGHPUT,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200282
283 /**
284 * @BATADV_ATTR_BANDWIDTH_UP: Reported uplink bandwidth
285 */
Sven Eckelmannd7129da2016-07-03 13:31:42 +0200286 BATADV_ATTR_BANDWIDTH_UP,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200287
288 /**
289 * @BATADV_ATTR_BANDWIDTH_DOWN: Reported downlink bandwidth
290 */
Sven Eckelmannd7129da2016-07-03 13:31:42 +0200291 BATADV_ATTR_BANDWIDTH_DOWN,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200292
293 /**
294 * @BATADV_ATTR_ROUTER: Gateway router MAC address
295 */
Sven Eckelmannd7129da2016-07-03 13:31:42 +0200296 BATADV_ATTR_ROUTER,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200297
298 /**
299 * @BATADV_ATTR_BLA_OWN: Flag indicating own originator
300 */
Andrew Lunn04f3f5b2016-07-03 13:31:45 +0200301 BATADV_ATTR_BLA_OWN,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200302
303 /**
304 * @BATADV_ATTR_BLA_ADDRESS: Bridge loop avoidance claim MAC address
305 */
Andrew Lunn04f3f5b2016-07-03 13:31:45 +0200306 BATADV_ATTR_BLA_ADDRESS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200307
308 /**
309 * @BATADV_ATTR_BLA_VID: BLA VLAN ID
310 */
Andrew Lunn04f3f5b2016-07-03 13:31:45 +0200311 BATADV_ATTR_BLA_VID,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200312
313 /**
314 * @BATADV_ATTR_BLA_BACKBONE: BLA gateway originator MAC address
315 */
Andrew Lunn04f3f5b2016-07-03 13:31:45 +0200316 BATADV_ATTR_BLA_BACKBONE,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200317
318 /**
319 * @BATADV_ATTR_BLA_CRC: BLA CRC
320 */
Andrew Lunn04f3f5b2016-07-03 13:31:45 +0200321 BATADV_ATTR_BLA_CRC,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200322
Linus Lüssing41aeefc2018-03-13 11:41:12 +0100323 /**
324 * @BATADV_ATTR_DAT_CACHE_IP4ADDRESS: Client IPv4 address
325 */
326 BATADV_ATTR_DAT_CACHE_IP4ADDRESS,
327
328 /**
329 * @BATADV_ATTR_DAT_CACHE_HWADDRESS: Client MAC address
330 */
331 BATADV_ATTR_DAT_CACHE_HWADDRESS,
332
333 /**
334 * @BATADV_ATTR_DAT_CACHE_VID: VLAN ID
335 */
336 BATADV_ATTR_DAT_CACHE_VID,
337
Linus Lüssing53dd9a62018-03-13 11:41:13 +0100338 /**
339 * @BATADV_ATTR_MCAST_FLAGS: Per originator multicast flags
340 */
341 BATADV_ATTR_MCAST_FLAGS,
342
343 /**
344 * @BATADV_ATTR_MCAST_FLAGS_PRIV: Private, own multicast flags
345 */
346 BATADV_ATTR_MCAST_FLAGS_PRIV,
347
Sven Eckelmann49e7e372018-11-23 12:41:08 +0100348 /**
349 * @BATADV_ATTR_VLANID: VLAN id on top of soft interface
350 */
351 BATADV_ATTR_VLANID,
352
Sven Eckelmann9ab4cee2018-11-23 12:46:14 +0100353 /**
354 * @BATADV_ATTR_AGGREGATED_OGMS_ENABLED: whether the batman protocol
355 * messages of the mesh interface shall be aggregated or not.
356 */
357 BATADV_ATTR_AGGREGATED_OGMS_ENABLED,
358
Sven Eckelmanne43d16b2018-11-23 12:51:55 +0100359 /**
360 * @BATADV_ATTR_AP_ISOLATION_ENABLED: whether the data traffic going
361 * from a wireless client to another wireless client will be silently
362 * dropped.
363 */
364 BATADV_ATTR_AP_ISOLATION_ENABLED,
365
366 /**
367 * @BATADV_ATTR_ISOLATION_MARK: the isolation mark which is used to
368 * classify clients as "isolated" by the Extended Isolation feature.
369 */
370 BATADV_ATTR_ISOLATION_MARK,
371
372 /**
373 * @BATADV_ATTR_ISOLATION_MASK: the isolation (bit)mask which is used to
374 * classify clients as "isolated" by the Extended Isolation feature.
375 */
376 BATADV_ATTR_ISOLATION_MASK,
377
Matthias Schiffer09748a22016-05-09 18:41:08 +0200378 /* add attributes above here, update the policy in netlink.c */
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200379
380 /**
381 * @__BATADV_ATTR_AFTER_LAST: internal use
382 */
Matthias Schiffer09748a22016-05-09 18:41:08 +0200383 __BATADV_ATTR_AFTER_LAST,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200384
385 /**
386 * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available
387 */
Matthias Schiffer09748a22016-05-09 18:41:08 +0200388 NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200389
390 /**
391 * @BATADV_ATTR_MAX: highest attribute number currently defined
392 */
Matthias Schiffer09748a22016-05-09 18:41:08 +0200393 BATADV_ATTR_MAX = __BATADV_ATTR_AFTER_LAST - 1
394};
395
396/**
397 * enum batadv_nl_commands - supported batman-adv netlink commands
Matthias Schiffer09748a22016-05-09 18:41:08 +0200398 */
399enum batadv_nl_commands {
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200400 /**
401 * @BATADV_CMD_UNSPEC: unspecified command to catch errors
402 */
Matthias Schiffer09748a22016-05-09 18:41:08 +0200403 BATADV_CMD_UNSPEC,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200404
405 /**
Sven Eckelmann60040512018-11-23 12:14:56 +0100406 * @BATADV_CMD_GET_MESH: Get attributes from softif/mesh
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200407 */
Sven Eckelmann60040512018-11-23 12:14:56 +0100408 BATADV_CMD_GET_MESH,
409
410 /**
411 * @BATADV_CMD_GET_MESH_INFO: Alias for @BATADV_CMD_GET_MESH
412 */
413 BATADV_CMD_GET_MESH_INFO = BATADV_CMD_GET_MESH,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200414
415 /**
416 * @BATADV_CMD_TP_METER: Start a tp meter session
417 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200418 BATADV_CMD_TP_METER,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200419
420 /**
421 * @BATADV_CMD_TP_METER_CANCEL: Cancel a tp meter session
422 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200423 BATADV_CMD_TP_METER_CANCEL,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200424
425 /**
426 * @BATADV_CMD_GET_ROUTING_ALGOS: Query the list of routing algorithms.
427 */
Matthias Schiffer07a30612016-07-03 13:31:35 +0200428 BATADV_CMD_GET_ROUTING_ALGOS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200429
430 /**
Sven Eckelmann5c55a402018-11-23 12:33:17 +0100431 * @BATADV_CMD_GET_HARDIF: Get attributes from a hardif of the
432 * current softif
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200433 */
Sven Eckelmann5c55a402018-11-23 12:33:17 +0100434 BATADV_CMD_GET_HARDIF,
435
436 /**
437 * @BATADV_CMD_GET_HARDIFS: Alias for @BATADV_CMD_GET_HARDIF
438 */
439 BATADV_CMD_GET_HARDIFS = BATADV_CMD_GET_HARDIF,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200440
441 /**
442 * @BATADV_CMD_GET_TRANSTABLE_LOCAL: Query list of local translations
443 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200444 BATADV_CMD_GET_TRANSTABLE_LOCAL,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200445
446 /**
447 * @BATADV_CMD_GET_TRANSTABLE_GLOBAL: Query list of global translations
448 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200449 BATADV_CMD_GET_TRANSTABLE_GLOBAL,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200450
451 /**
452 * @BATADV_CMD_GET_ORIGINATORS: Query list of originators
453 */
Matthias Schiffer85cf8c82016-07-03 13:31:39 +0200454 BATADV_CMD_GET_ORIGINATORS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200455
456 /**
457 * @BATADV_CMD_GET_NEIGHBORS: Query list of neighbours
458 */
Matthias Schiffer85cf8c82016-07-03 13:31:39 +0200459 BATADV_CMD_GET_NEIGHBORS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200460
461 /**
462 * @BATADV_CMD_GET_GATEWAYS: Query list of gateways
463 */
Sven Eckelmannd7129da2016-07-03 13:31:42 +0200464 BATADV_CMD_GET_GATEWAYS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200465
466 /**
467 * @BATADV_CMD_GET_BLA_CLAIM: Query list of bridge loop avoidance claims
468 */
Andrew Lunn04f3f5b2016-07-03 13:31:45 +0200469 BATADV_CMD_GET_BLA_CLAIM,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200470
471 /**
472 * @BATADV_CMD_GET_BLA_BACKBONE: Query list of bridge loop avoidance
473 * backbones
474 */
Simon Wunderlichea4152e2016-07-03 13:31:47 +0200475 BATADV_CMD_GET_BLA_BACKBONE,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200476
Linus Lüssing41aeefc2018-03-13 11:41:12 +0100477 /**
478 * @BATADV_CMD_GET_DAT_CACHE: Query list of DAT cache entries
479 */
480 BATADV_CMD_GET_DAT_CACHE,
481
Linus Lüssing53dd9a62018-03-13 11:41:13 +0100482 /**
483 * @BATADV_CMD_GET_MCAST_FLAGS: Query list of multicast flags
484 */
485 BATADV_CMD_GET_MCAST_FLAGS,
486
Sven Eckelmann60040512018-11-23 12:14:56 +0100487 /**
488 * @BATADV_CMD_SET_MESH: Set attributes for softif/mesh
489 */
490 BATADV_CMD_SET_MESH,
491
Sven Eckelmann5c55a402018-11-23 12:33:17 +0100492 /**
493 * @BATADV_CMD_SET_HARDIF: Set attributes for hardif of the
494 * current softif
495 */
496 BATADV_CMD_SET_HARDIF,
497
Sven Eckelmann49e7e372018-11-23 12:41:08 +0100498 /**
499 * @BATADV_CMD_GET_VLAN: Get attributes from a VLAN of the
500 * current softif
501 */
502 BATADV_CMD_GET_VLAN,
503
504 /**
505 * @BATADV_CMD_SET_VLAN: Set attributes for VLAN of the
506 * current softif
507 */
508 BATADV_CMD_SET_VLAN,
509
Matthias Schiffer09748a22016-05-09 18:41:08 +0200510 /* add new commands above here */
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200511
512 /**
513 * @__BATADV_CMD_AFTER_LAST: internal use
514 */
Matthias Schiffer09748a22016-05-09 18:41:08 +0200515 __BATADV_CMD_AFTER_LAST,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200516
517 /**
518 * @BATADV_CMD_MAX: highest used command number
519 */
Matthias Schiffer09748a22016-05-09 18:41:08 +0200520 BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1
521};
522
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200523/**
524 * enum batadv_tp_meter_reason - reason of a tp meter test run stop
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200525 */
526enum batadv_tp_meter_reason {
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200527 /**
528 * @BATADV_TP_REASON_COMPLETE: sender finished tp run
529 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200530 BATADV_TP_REASON_COMPLETE = 3,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200531
532 /**
533 * @BATADV_TP_REASON_CANCEL: sender was stopped during run
534 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200535 BATADV_TP_REASON_CANCEL = 4,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200536
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200537 /* error status >= 128 */
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200538
539 /**
540 * @BATADV_TP_REASON_DST_UNREACHABLE: receiver could not be reached or
541 * didn't answer
542 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200543 BATADV_TP_REASON_DST_UNREACHABLE = 128,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200544
545 /**
546 * @BATADV_TP_REASON_RESEND_LIMIT: (unused) sender retry reached limit
547 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200548 BATADV_TP_REASON_RESEND_LIMIT = 129,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200549
550 /**
551 * @BATADV_TP_REASON_ALREADY_ONGOING: test to or from the same node
552 * already ongoing
553 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200554 BATADV_TP_REASON_ALREADY_ONGOING = 130,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200555
556 /**
557 * @BATADV_TP_REASON_MEMORY_ERROR: test was stopped due to low memory
558 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200559 BATADV_TP_REASON_MEMORY_ERROR = 131,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200560
561 /**
562 * @BATADV_TP_REASON_CANT_SEND: failed to send via outgoing interface
563 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200564 BATADV_TP_REASON_CANT_SEND = 132,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200565
566 /**
567 * @BATADV_TP_REASON_TOO_MANY: too many ongoing sessions
568 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200569 BATADV_TP_REASON_TOO_MANY = 133,
570};
571
Matthias Schiffer09748a22016-05-09 18:41:08 +0200572#endif /* _UAPI_LINUX_BATMAN_ADV_H_ */