blob: 67f4636758af9bf6f667a1d2f7dcdf42e71170b1 [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
Matthias Schiffer09748a22016-05-09 18:41:08 +02005 */
6
7#ifndef _UAPI_LINUX_BATMAN_ADV_H_
8#define _UAPI_LINUX_BATMAN_ADV_H_
9
10#define BATADV_NL_NAME "batadv"
11
Sven Eckelmann60040512018-11-23 12:14:56 +010012#define BATADV_NL_MCAST_GROUP_CONFIG "config"
Antonio Quartulli33a3bb42016-05-05 13:09:43 +020013#define BATADV_NL_MCAST_GROUP_TPMETER "tpmeter"
14
Matthias Schiffer09748a22016-05-09 18:41:08 +020015/**
Matthias Schifferd34f0552016-07-03 13:31:37 +020016 * enum batadv_tt_client_flags - TT client specific flags
Matthias Schifferd34f0552016-07-03 13:31:37 +020017 *
18 * Bits from 0 to 7 are called _remote flags_ because they are sent on the wire.
19 * Bits from 8 to 15 are called _local flags_ because they are used for local
20 * computations only.
21 *
22 * Bits from 4 to 7 - a subset of remote flags - are ensured to be in sync with
23 * the other nodes in the network. To achieve this goal these flags are included
24 * in the TT CRC computation.
25 */
26enum batadv_tt_client_flags {
Sven Eckelmann40b16b92017-10-21 11:45:46 +020027 /**
28 * @BATADV_TT_CLIENT_DEL: the client has to be deleted from the table
29 */
Matthias Schifferd34f0552016-07-03 13:31:37 +020030 BATADV_TT_CLIENT_DEL = (1 << 0),
Sven Eckelmann40b16b92017-10-21 11:45:46 +020031
32 /**
33 * @BATADV_TT_CLIENT_ROAM: the client roamed to/from another node and
34 * the new update telling its new real location has not been
35 * received/sent yet
36 */
Matthias Schifferd34f0552016-07-03 13:31:37 +020037 BATADV_TT_CLIENT_ROAM = (1 << 1),
Sven Eckelmann40b16b92017-10-21 11:45:46 +020038
39 /**
40 * @BATADV_TT_CLIENT_WIFI: this client is connected through a wifi
41 * interface. This information is used by the "AP Isolation" feature
42 */
Matthias Schifferd34f0552016-07-03 13:31:37 +020043 BATADV_TT_CLIENT_WIFI = (1 << 4),
Sven Eckelmann40b16b92017-10-21 11:45:46 +020044
45 /**
46 * @BATADV_TT_CLIENT_ISOLA: this client is considered "isolated". This
47 * information is used by the Extended Isolation feature
48 */
Matthias Schifferd34f0552016-07-03 13:31:37 +020049 BATADV_TT_CLIENT_ISOLA = (1 << 5),
Sven Eckelmann40b16b92017-10-21 11:45:46 +020050
51 /**
52 * @BATADV_TT_CLIENT_NOPURGE: this client should never be removed from
53 * the table
54 */
Matthias Schifferd34f0552016-07-03 13:31:37 +020055 BATADV_TT_CLIENT_NOPURGE = (1 << 8),
Sven Eckelmann40b16b92017-10-21 11:45:46 +020056
57 /**
58 * @BATADV_TT_CLIENT_NEW: this client has been added to the local table
59 * but has not been announced yet
60 */
Matthias Schifferd34f0552016-07-03 13:31:37 +020061 BATADV_TT_CLIENT_NEW = (1 << 9),
Sven Eckelmann40b16b92017-10-21 11:45:46 +020062
63 /**
64 * @BATADV_TT_CLIENT_PENDING: this client is marked for removal but it
65 * is kept in the table for one more originator interval for consistency
66 * purposes
67 */
Matthias Schifferd34f0552016-07-03 13:31:37 +020068 BATADV_TT_CLIENT_PENDING = (1 << 10),
Sven Eckelmann40b16b92017-10-21 11:45:46 +020069
70 /**
71 * @BATADV_TT_CLIENT_TEMP: this global client has been detected to be
72 * part of the network but no nnode has already announced it
73 */
Matthias Schifferd34f0552016-07-03 13:31:37 +020074 BATADV_TT_CLIENT_TEMP = (1 << 11),
75};
76
77/**
Linus Lüssing53dd9a62018-03-13 11:41:13 +010078 * enum batadv_mcast_flags_priv - Private, own multicast flags
79 *
80 * These are internal, multicast related flags. Currently they describe certain
81 * multicast related attributes of the segment this originator bridges into the
82 * mesh.
83 *
84 * Those attributes are used to determine the public multicast flags this
85 * originator is going to announce via TT.
86 *
87 * For netlink, if BATADV_MCAST_FLAGS_BRIDGED is unset then all querier
88 * related flags are undefined.
89 */
90enum batadv_mcast_flags_priv {
91 /**
92 * @BATADV_MCAST_FLAGS_BRIDGED: There is a bridge on top of the mesh
93 * interface.
94 */
95 BATADV_MCAST_FLAGS_BRIDGED = (1 << 0),
96
97 /**
98 * @BATADV_MCAST_FLAGS_QUERIER_IPV4_EXISTS: Whether an IGMP querier
99 * exists in the mesh
100 */
101 BATADV_MCAST_FLAGS_QUERIER_IPV4_EXISTS = (1 << 1),
102
103 /**
104 * @BATADV_MCAST_FLAGS_QUERIER_IPV6_EXISTS: Whether an MLD querier
105 * exists in the mesh
106 */
107 BATADV_MCAST_FLAGS_QUERIER_IPV6_EXISTS = (1 << 2),
108
109 /**
110 * @BATADV_MCAST_FLAGS_QUERIER_IPV4_SHADOWING: If an IGMP querier
111 * exists, whether it is potentially shadowing multicast listeners
112 * (i.e. querier is behind our own bridge segment)
113 */
114 BATADV_MCAST_FLAGS_QUERIER_IPV4_SHADOWING = (1 << 3),
115
116 /**
117 * @BATADV_MCAST_FLAGS_QUERIER_IPV6_SHADOWING: If an MLD querier
118 * exists, whether it is potentially shadowing multicast listeners
119 * (i.e. querier is behind our own bridge segment)
120 */
121 BATADV_MCAST_FLAGS_QUERIER_IPV6_SHADOWING = (1 << 4),
122};
123
124/**
Sven Eckelmanne2d0d352018-11-23 13:15:00 +0100125 * enum batadv_gw_modes - gateway mode of node
126 */
127enum batadv_gw_modes {
128 /** @BATADV_GW_MODE_OFF: gw mode disabled */
129 BATADV_GW_MODE_OFF,
130
131 /** @BATADV_GW_MODE_CLIENT: send DHCP requests to gw servers */
132 BATADV_GW_MODE_CLIENT,
133
134 /** @BATADV_GW_MODE_SERVER: announce itself as gatway server */
135 BATADV_GW_MODE_SERVER,
136};
137
138/**
Matthias Schiffer09748a22016-05-09 18:41:08 +0200139 * enum batadv_nl_attrs - batman-adv netlink attributes
Matthias Schiffer09748a22016-05-09 18:41:08 +0200140 */
141enum batadv_nl_attrs {
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200142 /**
143 * @BATADV_ATTR_UNSPEC: unspecified attribute to catch errors
144 */
Matthias Schiffer09748a22016-05-09 18:41:08 +0200145 BATADV_ATTR_UNSPEC,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200146
147 /**
148 * @BATADV_ATTR_VERSION: batman-adv version string
149 */
Matthias Schiffer5da0aef2016-05-09 18:41:09 +0200150 BATADV_ATTR_VERSION,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200151
152 /**
153 * @BATADV_ATTR_ALGO_NAME: name of routing algorithm
154 */
Matthias Schiffer5da0aef2016-05-09 18:41:09 +0200155 BATADV_ATTR_ALGO_NAME,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200156
157 /**
158 * @BATADV_ATTR_MESH_IFINDEX: index of the batman-adv interface
159 */
Matthias Schiffer5da0aef2016-05-09 18:41:09 +0200160 BATADV_ATTR_MESH_IFINDEX,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200161
162 /**
163 * @BATADV_ATTR_MESH_IFNAME: name of the batman-adv interface
164 */
Matthias Schiffer5da0aef2016-05-09 18:41:09 +0200165 BATADV_ATTR_MESH_IFNAME,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200166
167 /**
168 * @BATADV_ATTR_MESH_ADDRESS: mac address of the batman-adv interface
169 */
Matthias Schiffer5da0aef2016-05-09 18:41:09 +0200170 BATADV_ATTR_MESH_ADDRESS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200171
172 /**
173 * @BATADV_ATTR_HARD_IFINDEX: index of the non-batman-adv interface
174 */
Matthias Schiffer5da0aef2016-05-09 18:41:09 +0200175 BATADV_ATTR_HARD_IFINDEX,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200176
177 /**
178 * @BATADV_ATTR_HARD_IFNAME: name of the non-batman-adv interface
179 */
Matthias Schiffer5da0aef2016-05-09 18:41:09 +0200180 BATADV_ATTR_HARD_IFNAME,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200181
182 /**
183 * @BATADV_ATTR_HARD_ADDRESS: mac address of the non-batman-adv
184 * interface
185 */
Matthias Schiffer5da0aef2016-05-09 18:41:09 +0200186 BATADV_ATTR_HARD_ADDRESS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200187
188 /**
189 * @BATADV_ATTR_ORIG_ADDRESS: originator mac address
190 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200191 BATADV_ATTR_ORIG_ADDRESS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200192
193 /**
194 * @BATADV_ATTR_TPMETER_RESULT: result of run (see
195 * batadv_tp_meter_status)
196 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200197 BATADV_ATTR_TPMETER_RESULT,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200198
199 /**
200 * @BATADV_ATTR_TPMETER_TEST_TIME: time (msec) the run took
201 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200202 BATADV_ATTR_TPMETER_TEST_TIME,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200203
204 /**
205 * @BATADV_ATTR_TPMETER_BYTES: amount of acked bytes during run
206 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200207 BATADV_ATTR_TPMETER_BYTES,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200208
209 /**
210 * @BATADV_ATTR_TPMETER_COOKIE: session cookie to match tp_meter session
211 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200212 BATADV_ATTR_TPMETER_COOKIE,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200213
214 /**
215 * @BATADV_ATTR_PAD: attribute used for padding for 64-bit alignment
216 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200217 BATADV_ATTR_PAD,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200218
219 /**
220 * @BATADV_ATTR_ACTIVE: Flag indicating if the hard interface is active
221 */
Matthias Schifferb60620c2016-07-03 13:31:36 +0200222 BATADV_ATTR_ACTIVE,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200223
224 /**
225 * @BATADV_ATTR_TT_ADDRESS: Client MAC address
226 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200227 BATADV_ATTR_TT_ADDRESS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200228
229 /**
230 * @BATADV_ATTR_TT_TTVN: Translation table version
231 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200232 BATADV_ATTR_TT_TTVN,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200233
234 /**
235 * @BATADV_ATTR_TT_LAST_TTVN: Previous translation table version
236 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200237 BATADV_ATTR_TT_LAST_TTVN,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200238
239 /**
240 * @BATADV_ATTR_TT_CRC32: CRC32 over translation table
241 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200242 BATADV_ATTR_TT_CRC32,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200243
244 /**
245 * @BATADV_ATTR_TT_VID: VLAN ID
246 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200247 BATADV_ATTR_TT_VID,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200248
249 /**
250 * @BATADV_ATTR_TT_FLAGS: Translation table client flags
251 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200252 BATADV_ATTR_TT_FLAGS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200253
254 /**
255 * @BATADV_ATTR_FLAG_BEST: Flags indicating entry is the best
256 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200257 BATADV_ATTR_FLAG_BEST,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200258
259 /**
260 * @BATADV_ATTR_LAST_SEEN_MSECS: Time in milliseconds since last seen
261 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200262 BATADV_ATTR_LAST_SEEN_MSECS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200263
264 /**
265 * @BATADV_ATTR_NEIGH_ADDRESS: Neighbour MAC address
266 */
Matthias Schiffer024f99c2016-07-03 13:31:40 +0200267 BATADV_ATTR_NEIGH_ADDRESS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200268
269 /**
270 * @BATADV_ATTR_TQ: TQ to neighbour
271 */
Matthias Schiffer024f99c2016-07-03 13:31:40 +0200272 BATADV_ATTR_TQ,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200273
274 /**
275 * @BATADV_ATTR_THROUGHPUT: Estimated throughput to Neighbour
276 */
Matthias Schifferf02a4782016-07-03 13:31:41 +0200277 BATADV_ATTR_THROUGHPUT,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200278
279 /**
280 * @BATADV_ATTR_BANDWIDTH_UP: Reported uplink bandwidth
281 */
Sven Eckelmannd7129da2016-07-03 13:31:42 +0200282 BATADV_ATTR_BANDWIDTH_UP,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200283
284 /**
285 * @BATADV_ATTR_BANDWIDTH_DOWN: Reported downlink bandwidth
286 */
Sven Eckelmannd7129da2016-07-03 13:31:42 +0200287 BATADV_ATTR_BANDWIDTH_DOWN,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200288
289 /**
290 * @BATADV_ATTR_ROUTER: Gateway router MAC address
291 */
Sven Eckelmannd7129da2016-07-03 13:31:42 +0200292 BATADV_ATTR_ROUTER,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200293
294 /**
295 * @BATADV_ATTR_BLA_OWN: Flag indicating own originator
296 */
Andrew Lunn04f3f5b2016-07-03 13:31:45 +0200297 BATADV_ATTR_BLA_OWN,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200298
299 /**
300 * @BATADV_ATTR_BLA_ADDRESS: Bridge loop avoidance claim MAC address
301 */
Andrew Lunn04f3f5b2016-07-03 13:31:45 +0200302 BATADV_ATTR_BLA_ADDRESS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200303
304 /**
305 * @BATADV_ATTR_BLA_VID: BLA VLAN ID
306 */
Andrew Lunn04f3f5b2016-07-03 13:31:45 +0200307 BATADV_ATTR_BLA_VID,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200308
309 /**
310 * @BATADV_ATTR_BLA_BACKBONE: BLA gateway originator MAC address
311 */
Andrew Lunn04f3f5b2016-07-03 13:31:45 +0200312 BATADV_ATTR_BLA_BACKBONE,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200313
314 /**
315 * @BATADV_ATTR_BLA_CRC: BLA CRC
316 */
Andrew Lunn04f3f5b2016-07-03 13:31:45 +0200317 BATADV_ATTR_BLA_CRC,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200318
Linus Lüssing41aeefc2018-03-13 11:41:12 +0100319 /**
320 * @BATADV_ATTR_DAT_CACHE_IP4ADDRESS: Client IPv4 address
321 */
322 BATADV_ATTR_DAT_CACHE_IP4ADDRESS,
323
324 /**
325 * @BATADV_ATTR_DAT_CACHE_HWADDRESS: Client MAC address
326 */
327 BATADV_ATTR_DAT_CACHE_HWADDRESS,
328
329 /**
330 * @BATADV_ATTR_DAT_CACHE_VID: VLAN ID
331 */
332 BATADV_ATTR_DAT_CACHE_VID,
333
Linus Lüssing53dd9a62018-03-13 11:41:13 +0100334 /**
335 * @BATADV_ATTR_MCAST_FLAGS: Per originator multicast flags
336 */
337 BATADV_ATTR_MCAST_FLAGS,
338
339 /**
340 * @BATADV_ATTR_MCAST_FLAGS_PRIV: Private, own multicast flags
341 */
342 BATADV_ATTR_MCAST_FLAGS_PRIV,
343
Sven Eckelmann49e7e372018-11-23 12:41:08 +0100344 /**
345 * @BATADV_ATTR_VLANID: VLAN id on top of soft interface
346 */
347 BATADV_ATTR_VLANID,
348
Sven Eckelmann9ab4cee2018-11-23 12:46:14 +0100349 /**
350 * @BATADV_ATTR_AGGREGATED_OGMS_ENABLED: whether the batman protocol
351 * messages of the mesh interface shall be aggregated or not.
352 */
353 BATADV_ATTR_AGGREGATED_OGMS_ENABLED,
354
Sven Eckelmanne43d16b2018-11-23 12:51:55 +0100355 /**
356 * @BATADV_ATTR_AP_ISOLATION_ENABLED: whether the data traffic going
357 * from a wireless client to another wireless client will be silently
358 * dropped.
359 */
360 BATADV_ATTR_AP_ISOLATION_ENABLED,
361
362 /**
363 * @BATADV_ATTR_ISOLATION_MARK: the isolation mark which is used to
364 * classify clients as "isolated" by the Extended Isolation feature.
365 */
366 BATADV_ATTR_ISOLATION_MARK,
367
368 /**
369 * @BATADV_ATTR_ISOLATION_MASK: the isolation (bit)mask which is used to
370 * classify clients as "isolated" by the Extended Isolation feature.
371 */
372 BATADV_ATTR_ISOLATION_MASK,
373
Sven Eckelmannd7e52502018-11-23 12:55:44 +0100374 /**
375 * @BATADV_ATTR_BONDING_ENABLED: whether the data traffic going through
376 * the mesh will be sent using multiple interfaces at the same time.
377 */
378 BATADV_ATTR_BONDING_ENABLED,
379
Sven Eckelmann43ff6102018-11-23 13:03:39 +0100380 /**
381 * @BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED: whether the bridge loop
382 * avoidance feature is enabled. This feature detects and avoids loops
383 * between the mesh and devices bridged with the soft interface
384 */
385 BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED,
386
Sven Eckelmanna1c8de82018-11-23 13:06:42 +0100387 /**
388 * @BATADV_ATTR_DISTRIBUTED_ARP_TABLE_ENABLED: whether the distributed
389 * arp table feature is enabled. This feature uses a distributed hash
390 * table to answer ARP requests without flooding the request through
391 * the whole mesh.
392 */
393 BATADV_ATTR_DISTRIBUTED_ARP_TABLE_ENABLED,
394
Sven Eckelmann3e15b062018-11-23 13:09:49 +0100395 /**
396 * @BATADV_ATTR_FRAGMENTATION_ENABLED: whether the data traffic going
397 * through the mesh will be fragmented or silently discarded if the
398 * packet size exceeds the outgoing interface MTU.
399 */
400 BATADV_ATTR_FRAGMENTATION_ENABLED,
401
Sven Eckelmanne2d0d352018-11-23 13:15:00 +0100402 /**
403 * @BATADV_ATTR_GW_BANDWIDTH_DOWN: defines the download bandwidth which
404 * is propagated by this node if %BATADV_ATTR_GW_BANDWIDTH_MODE was set
405 * to 'server'.
406 */
407 BATADV_ATTR_GW_BANDWIDTH_DOWN,
408
409 /**
410 * @BATADV_ATTR_GW_BANDWIDTH_UP: defines the upload bandwidth which
411 * is propagated by this node if %BATADV_ATTR_GW_BANDWIDTH_MODE was set
412 * to 'server'.
413 */
414 BATADV_ATTR_GW_BANDWIDTH_UP,
415
416 /**
417 * @BATADV_ATTR_GW_MODE: defines the state of the gateway features.
418 * Possible values are specified in enum batadv_gw_modes
419 */
420 BATADV_ATTR_GW_MODE,
421
422 /**
423 * @BATADV_ATTR_GW_SEL_CLASS: defines the selection criteria this node
424 * will use to choose a gateway if gw_mode was set to 'client'.
425 */
426 BATADV_ATTR_GW_SEL_CLASS,
427
Sven Eckelmannbfc7f1b2018-11-23 13:19:38 +0100428 /**
429 * @BATADV_ATTR_HOP_PENALTY: defines the penalty which will be applied
430 * to an originator message's tq-field on every hop.
431 */
432 BATADV_ATTR_HOP_PENALTY,
433
Sven Eckelmannb85bd092018-11-23 13:22:33 +0100434 /**
435 * @BATADV_ATTR_LOG_LEVEL: bitmask with to define which debug messages
436 * should be send to the debug log/trace ring buffer
437 */
438 BATADV_ATTR_LOG_LEVEL,
439
Sven Eckelmannf75b56b2018-11-23 13:25:05 +0100440 /**
441 * @BATADV_ATTR_MULTICAST_FORCEFLOOD_ENABLED: whether multicast
442 * optimizations should be replaced by simple broadcast-like flooding
443 * of multicast packets. If set to non-zero then all nodes in the mesh
444 * are going to use classic flooding for any multicast packet with no
445 * optimizations.
446 */
447 BATADV_ATTR_MULTICAST_FORCEFLOOD_ENABLED,
448
Sven Eckelmann6c57cde2018-11-23 13:26:14 +0100449 /**
450 * @BATADV_ATTR_NETWORK_CODING_ENABLED: whether Network Coding (using
451 * some magic to send fewer wifi packets but still the same content) is
452 * enabled or not.
453 */
454 BATADV_ATTR_NETWORK_CODING_ENABLED,
455
Sven Eckelmann7b751b32018-11-23 13:28:02 +0100456 /**
457 * @BATADV_ATTR_ORIG_INTERVAL: defines the interval in milliseconds in
458 * which batman sends its protocol messages.
459 */
460 BATADV_ATTR_ORIG_INTERVAL,
461
Sven Eckelmanna1080082018-11-23 13:30:04 +0100462 /**
463 * @BATADV_ATTR_ELP_INTERVAL: defines the interval in milliseconds in
464 * which batman emits probing packets for neighbor sensing (ELP).
465 */
466 BATADV_ATTR_ELP_INTERVAL,
467
Sven Eckelmann9a182242018-11-23 13:31:23 +0100468 /**
469 * @BATADV_ATTR_THROUGHPUT_OVERRIDE: defines the throughput value to be
470 * used by B.A.T.M.A.N. V when estimating the link throughput using
471 * this interface. If the value is set to 0 then batman-adv will try to
472 * estimate the throughput by itself.
473 */
474 BATADV_ATTR_THROUGHPUT_OVERRIDE,
475
Linus Lüssing32e72742019-03-23 05:47:41 +0100476 /**
477 * @BATADV_ATTR_MULTICAST_FANOUT: defines the maximum number of packet
478 * copies that may be generated for a multicast-to-unicast conversion.
479 * Once this limit is exceeded distribution will fall back to broadcast.
480 */
481 BATADV_ATTR_MULTICAST_FANOUT,
482
Matthias Schiffer09748a22016-05-09 18:41:08 +0200483 /* add attributes above here, update the policy in netlink.c */
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200484
485 /**
486 * @__BATADV_ATTR_AFTER_LAST: internal use
487 */
Matthias Schiffer09748a22016-05-09 18:41:08 +0200488 __BATADV_ATTR_AFTER_LAST,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200489
490 /**
491 * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available
492 */
Matthias Schiffer09748a22016-05-09 18:41:08 +0200493 NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200494
495 /**
496 * @BATADV_ATTR_MAX: highest attribute number currently defined
497 */
Matthias Schiffer09748a22016-05-09 18:41:08 +0200498 BATADV_ATTR_MAX = __BATADV_ATTR_AFTER_LAST - 1
499};
500
501/**
502 * enum batadv_nl_commands - supported batman-adv netlink commands
Matthias Schiffer09748a22016-05-09 18:41:08 +0200503 */
504enum batadv_nl_commands {
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200505 /**
506 * @BATADV_CMD_UNSPEC: unspecified command to catch errors
507 */
Matthias Schiffer09748a22016-05-09 18:41:08 +0200508 BATADV_CMD_UNSPEC,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200509
510 /**
Sven Eckelmann60040512018-11-23 12:14:56 +0100511 * @BATADV_CMD_GET_MESH: Get attributes from softif/mesh
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200512 */
Sven Eckelmann60040512018-11-23 12:14:56 +0100513 BATADV_CMD_GET_MESH,
514
515 /**
516 * @BATADV_CMD_GET_MESH_INFO: Alias for @BATADV_CMD_GET_MESH
517 */
518 BATADV_CMD_GET_MESH_INFO = BATADV_CMD_GET_MESH,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200519
520 /**
521 * @BATADV_CMD_TP_METER: Start a tp meter session
522 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200523 BATADV_CMD_TP_METER,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200524
525 /**
526 * @BATADV_CMD_TP_METER_CANCEL: Cancel a tp meter session
527 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200528 BATADV_CMD_TP_METER_CANCEL,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200529
530 /**
531 * @BATADV_CMD_GET_ROUTING_ALGOS: Query the list of routing algorithms.
532 */
Matthias Schiffer07a30612016-07-03 13:31:35 +0200533 BATADV_CMD_GET_ROUTING_ALGOS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200534
535 /**
Sven Eckelmann5c55a402018-11-23 12:33:17 +0100536 * @BATADV_CMD_GET_HARDIF: Get attributes from a hardif of the
537 * current softif
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200538 */
Sven Eckelmann5c55a402018-11-23 12:33:17 +0100539 BATADV_CMD_GET_HARDIF,
540
541 /**
542 * @BATADV_CMD_GET_HARDIFS: Alias for @BATADV_CMD_GET_HARDIF
543 */
544 BATADV_CMD_GET_HARDIFS = BATADV_CMD_GET_HARDIF,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200545
546 /**
547 * @BATADV_CMD_GET_TRANSTABLE_LOCAL: Query list of local translations
548 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200549 BATADV_CMD_GET_TRANSTABLE_LOCAL,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200550
551 /**
552 * @BATADV_CMD_GET_TRANSTABLE_GLOBAL: Query list of global translations
553 */
Matthias Schifferd34f0552016-07-03 13:31:37 +0200554 BATADV_CMD_GET_TRANSTABLE_GLOBAL,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200555
556 /**
557 * @BATADV_CMD_GET_ORIGINATORS: Query list of originators
558 */
Matthias Schiffer85cf8c82016-07-03 13:31:39 +0200559 BATADV_CMD_GET_ORIGINATORS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200560
561 /**
562 * @BATADV_CMD_GET_NEIGHBORS: Query list of neighbours
563 */
Matthias Schiffer85cf8c82016-07-03 13:31:39 +0200564 BATADV_CMD_GET_NEIGHBORS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200565
566 /**
567 * @BATADV_CMD_GET_GATEWAYS: Query list of gateways
568 */
Sven Eckelmannd7129da2016-07-03 13:31:42 +0200569 BATADV_CMD_GET_GATEWAYS,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200570
571 /**
572 * @BATADV_CMD_GET_BLA_CLAIM: Query list of bridge loop avoidance claims
573 */
Andrew Lunn04f3f5b2016-07-03 13:31:45 +0200574 BATADV_CMD_GET_BLA_CLAIM,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200575
576 /**
577 * @BATADV_CMD_GET_BLA_BACKBONE: Query list of bridge loop avoidance
578 * backbones
579 */
Simon Wunderlichea4152e2016-07-03 13:31:47 +0200580 BATADV_CMD_GET_BLA_BACKBONE,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200581
Linus Lüssing41aeefc2018-03-13 11:41:12 +0100582 /**
583 * @BATADV_CMD_GET_DAT_CACHE: Query list of DAT cache entries
584 */
585 BATADV_CMD_GET_DAT_CACHE,
586
Linus Lüssing53dd9a62018-03-13 11:41:13 +0100587 /**
588 * @BATADV_CMD_GET_MCAST_FLAGS: Query list of multicast flags
589 */
590 BATADV_CMD_GET_MCAST_FLAGS,
591
Sven Eckelmann60040512018-11-23 12:14:56 +0100592 /**
593 * @BATADV_CMD_SET_MESH: Set attributes for softif/mesh
594 */
595 BATADV_CMD_SET_MESH,
596
Sven Eckelmann5c55a402018-11-23 12:33:17 +0100597 /**
598 * @BATADV_CMD_SET_HARDIF: Set attributes for hardif of the
599 * current softif
600 */
601 BATADV_CMD_SET_HARDIF,
602
Sven Eckelmann49e7e372018-11-23 12:41:08 +0100603 /**
604 * @BATADV_CMD_GET_VLAN: Get attributes from a VLAN of the
605 * current softif
606 */
607 BATADV_CMD_GET_VLAN,
608
609 /**
610 * @BATADV_CMD_SET_VLAN: Set attributes for VLAN of the
611 * current softif
612 */
613 BATADV_CMD_SET_VLAN,
614
Matthias Schiffer09748a22016-05-09 18:41:08 +0200615 /* add new commands above here */
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200616
617 /**
618 * @__BATADV_CMD_AFTER_LAST: internal use
619 */
Matthias Schiffer09748a22016-05-09 18:41:08 +0200620 __BATADV_CMD_AFTER_LAST,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200621
622 /**
623 * @BATADV_CMD_MAX: highest used command number
624 */
Matthias Schiffer09748a22016-05-09 18:41:08 +0200625 BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1
626};
627
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200628/**
629 * enum batadv_tp_meter_reason - reason of a tp meter test run stop
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200630 */
631enum batadv_tp_meter_reason {
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200632 /**
633 * @BATADV_TP_REASON_COMPLETE: sender finished tp run
634 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200635 BATADV_TP_REASON_COMPLETE = 3,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200636
637 /**
638 * @BATADV_TP_REASON_CANCEL: sender was stopped during run
639 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200640 BATADV_TP_REASON_CANCEL = 4,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200641
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200642 /* error status >= 128 */
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200643
644 /**
645 * @BATADV_TP_REASON_DST_UNREACHABLE: receiver could not be reached or
646 * didn't answer
647 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200648 BATADV_TP_REASON_DST_UNREACHABLE = 128,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200649
650 /**
651 * @BATADV_TP_REASON_RESEND_LIMIT: (unused) sender retry reached limit
652 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200653 BATADV_TP_REASON_RESEND_LIMIT = 129,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200654
655 /**
656 * @BATADV_TP_REASON_ALREADY_ONGOING: test to or from the same node
657 * already ongoing
658 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200659 BATADV_TP_REASON_ALREADY_ONGOING = 130,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200660
661 /**
662 * @BATADV_TP_REASON_MEMORY_ERROR: test was stopped due to low memory
663 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200664 BATADV_TP_REASON_MEMORY_ERROR = 131,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200665
666 /**
667 * @BATADV_TP_REASON_CANT_SEND: failed to send via outgoing interface
668 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200669 BATADV_TP_REASON_CANT_SEND = 132,
Sven Eckelmann40b16b92017-10-21 11:45:46 +0200670
671 /**
672 * @BATADV_TP_REASON_TOO_MANY: too many ongoing sessions
673 */
Antonio Quartulli33a3bb42016-05-05 13:09:43 +0200674 BATADV_TP_REASON_TOO_MANY = 133,
675};
676
Matthias Schiffer09748a22016-05-09 18:41:08 +0200677#endif /* _UAPI_LINUX_BATMAN_ADV_H_ */