Christopher Ferris | 0543f74 | 2017-07-26 13:09:46 -0700 | [diff] [blame] | 1 | /* Copyright (C) 2016-2017 B.A.T.M.A.N. contributors: |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 2 | * |
| 3 | * Matthias Schiffer |
| 4 | * |
| 5 | * Permission to use, copy, modify, and/or distribute this software for any |
| 6 | * purpose with or without fee is hereby granted, provided that the above |
| 7 | * copyright notice and this permission notice appear in all copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 16 | */ |
| 17 | |
| 18 | #ifndef _UAPI_LINUX_BATMAN_ADV_H_ |
| 19 | #define _UAPI_LINUX_BATMAN_ADV_H_ |
| 20 | |
| 21 | #define BATADV_NL_NAME "batadv" |
| 22 | |
| 23 | #define BATADV_NL_MCAST_GROUP_TPMETER "tpmeter" |
| 24 | |
| 25 | /** |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 26 | * enum batadv_tt_client_flags - TT client specific flags |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 27 | * |
| 28 | * Bits from 0 to 7 are called _remote flags_ because they are sent on the wire. |
| 29 | * Bits from 8 to 15 are called _local flags_ because they are used for local |
| 30 | * computations only. |
| 31 | * |
| 32 | * Bits from 4 to 7 - a subset of remote flags - are ensured to be in sync with |
| 33 | * the other nodes in the network. To achieve this goal these flags are included |
| 34 | * in the TT CRC computation. |
| 35 | */ |
| 36 | enum batadv_tt_client_flags { |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 37 | /** |
| 38 | * @BATADV_TT_CLIENT_DEL: the client has to be deleted from the table |
| 39 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 40 | BATADV_TT_CLIENT_DEL = (1 << 0), |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 41 | |
| 42 | /** |
| 43 | * @BATADV_TT_CLIENT_ROAM: the client roamed to/from another node and |
| 44 | * the new update telling its new real location has not been |
| 45 | * received/sent yet |
| 46 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 47 | BATADV_TT_CLIENT_ROAM = (1 << 1), |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 48 | |
| 49 | /** |
| 50 | * @BATADV_TT_CLIENT_WIFI: this client is connected through a wifi |
| 51 | * interface. This information is used by the "AP Isolation" feature |
| 52 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 53 | BATADV_TT_CLIENT_WIFI = (1 << 4), |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 54 | |
| 55 | /** |
| 56 | * @BATADV_TT_CLIENT_ISOLA: this client is considered "isolated". This |
| 57 | * information is used by the Extended Isolation feature |
| 58 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 59 | BATADV_TT_CLIENT_ISOLA = (1 << 5), |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 60 | |
| 61 | /** |
| 62 | * @BATADV_TT_CLIENT_NOPURGE: this client should never be removed from |
| 63 | * the table |
| 64 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 65 | BATADV_TT_CLIENT_NOPURGE = (1 << 8), |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 66 | |
| 67 | /** |
| 68 | * @BATADV_TT_CLIENT_NEW: this client has been added to the local table |
| 69 | * but has not been announced yet |
| 70 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 71 | BATADV_TT_CLIENT_NEW = (1 << 9), |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 72 | |
| 73 | /** |
| 74 | * @BATADV_TT_CLIENT_PENDING: this client is marked for removal but it |
| 75 | * is kept in the table for one more originator interval for consistency |
| 76 | * purposes |
| 77 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 78 | BATADV_TT_CLIENT_PENDING = (1 << 10), |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 79 | |
| 80 | /** |
| 81 | * @BATADV_TT_CLIENT_TEMP: this global client has been detected to be |
| 82 | * part of the network but no nnode has already announced it |
| 83 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 84 | BATADV_TT_CLIENT_TEMP = (1 << 11), |
| 85 | }; |
| 86 | |
| 87 | /** |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 88 | * enum batadv_nl_attrs - batman-adv netlink attributes |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 89 | */ |
| 90 | enum batadv_nl_attrs { |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 91 | /** |
| 92 | * @BATADV_ATTR_UNSPEC: unspecified attribute to catch errors |
| 93 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 94 | BATADV_ATTR_UNSPEC, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 95 | |
| 96 | /** |
| 97 | * @BATADV_ATTR_VERSION: batman-adv version string |
| 98 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 99 | BATADV_ATTR_VERSION, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 100 | |
| 101 | /** |
| 102 | * @BATADV_ATTR_ALGO_NAME: name of routing algorithm |
| 103 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 104 | BATADV_ATTR_ALGO_NAME, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 105 | |
| 106 | /** |
| 107 | * @BATADV_ATTR_MESH_IFINDEX: index of the batman-adv interface |
| 108 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 109 | BATADV_ATTR_MESH_IFINDEX, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 110 | |
| 111 | /** |
| 112 | * @BATADV_ATTR_MESH_IFNAME: name of the batman-adv interface |
| 113 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 114 | BATADV_ATTR_MESH_IFNAME, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 115 | |
| 116 | /** |
| 117 | * @BATADV_ATTR_MESH_ADDRESS: mac address of the batman-adv interface |
| 118 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 119 | BATADV_ATTR_MESH_ADDRESS, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 120 | |
| 121 | /** |
| 122 | * @BATADV_ATTR_HARD_IFINDEX: index of the non-batman-adv interface |
| 123 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 124 | BATADV_ATTR_HARD_IFINDEX, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 125 | |
| 126 | /** |
| 127 | * @BATADV_ATTR_HARD_IFNAME: name of the non-batman-adv interface |
| 128 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 129 | BATADV_ATTR_HARD_IFNAME, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 130 | |
| 131 | /** |
| 132 | * @BATADV_ATTR_HARD_ADDRESS: mac address of the non-batman-adv |
| 133 | * interface |
| 134 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 135 | BATADV_ATTR_HARD_ADDRESS, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 136 | |
| 137 | /** |
| 138 | * @BATADV_ATTR_ORIG_ADDRESS: originator mac address |
| 139 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 140 | BATADV_ATTR_ORIG_ADDRESS, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 141 | |
| 142 | /** |
| 143 | * @BATADV_ATTR_TPMETER_RESULT: result of run (see |
| 144 | * batadv_tp_meter_status) |
| 145 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 146 | BATADV_ATTR_TPMETER_RESULT, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 147 | |
| 148 | /** |
| 149 | * @BATADV_ATTR_TPMETER_TEST_TIME: time (msec) the run took |
| 150 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 151 | BATADV_ATTR_TPMETER_TEST_TIME, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 152 | |
| 153 | /** |
| 154 | * @BATADV_ATTR_TPMETER_BYTES: amount of acked bytes during run |
| 155 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 156 | BATADV_ATTR_TPMETER_BYTES, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 157 | |
| 158 | /** |
| 159 | * @BATADV_ATTR_TPMETER_COOKIE: session cookie to match tp_meter session |
| 160 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 161 | BATADV_ATTR_TPMETER_COOKIE, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 162 | |
| 163 | /** |
| 164 | * @BATADV_ATTR_PAD: attribute used for padding for 64-bit alignment |
| 165 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 166 | BATADV_ATTR_PAD, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 167 | |
| 168 | /** |
| 169 | * @BATADV_ATTR_ACTIVE: Flag indicating if the hard interface is active |
| 170 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 171 | BATADV_ATTR_ACTIVE, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 172 | |
| 173 | /** |
| 174 | * @BATADV_ATTR_TT_ADDRESS: Client MAC address |
| 175 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 176 | BATADV_ATTR_TT_ADDRESS, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 177 | |
| 178 | /** |
| 179 | * @BATADV_ATTR_TT_TTVN: Translation table version |
| 180 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 181 | BATADV_ATTR_TT_TTVN, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 182 | |
| 183 | /** |
| 184 | * @BATADV_ATTR_TT_LAST_TTVN: Previous translation table version |
| 185 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 186 | BATADV_ATTR_TT_LAST_TTVN, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 187 | |
| 188 | /** |
| 189 | * @BATADV_ATTR_TT_CRC32: CRC32 over translation table |
| 190 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 191 | BATADV_ATTR_TT_CRC32, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 192 | |
| 193 | /** |
| 194 | * @BATADV_ATTR_TT_VID: VLAN ID |
| 195 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 196 | BATADV_ATTR_TT_VID, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 197 | |
| 198 | /** |
| 199 | * @BATADV_ATTR_TT_FLAGS: Translation table client flags |
| 200 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 201 | BATADV_ATTR_TT_FLAGS, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 202 | |
| 203 | /** |
| 204 | * @BATADV_ATTR_FLAG_BEST: Flags indicating entry is the best |
| 205 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 206 | BATADV_ATTR_FLAG_BEST, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 207 | |
| 208 | /** |
| 209 | * @BATADV_ATTR_LAST_SEEN_MSECS: Time in milliseconds since last seen |
| 210 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 211 | BATADV_ATTR_LAST_SEEN_MSECS, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 212 | |
| 213 | /** |
| 214 | * @BATADV_ATTR_NEIGH_ADDRESS: Neighbour MAC address |
| 215 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 216 | BATADV_ATTR_NEIGH_ADDRESS, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 217 | |
| 218 | /** |
| 219 | * @BATADV_ATTR_TQ: TQ to neighbour |
| 220 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 221 | BATADV_ATTR_TQ, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 222 | |
| 223 | /** |
| 224 | * @BATADV_ATTR_THROUGHPUT: Estimated throughput to Neighbour |
| 225 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 226 | BATADV_ATTR_THROUGHPUT, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 227 | |
| 228 | /** |
| 229 | * @BATADV_ATTR_BANDWIDTH_UP: Reported uplink bandwidth |
| 230 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 231 | BATADV_ATTR_BANDWIDTH_UP, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 232 | |
| 233 | /** |
| 234 | * @BATADV_ATTR_BANDWIDTH_DOWN: Reported downlink bandwidth |
| 235 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 236 | BATADV_ATTR_BANDWIDTH_DOWN, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 237 | |
| 238 | /** |
| 239 | * @BATADV_ATTR_ROUTER: Gateway router MAC address |
| 240 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 241 | BATADV_ATTR_ROUTER, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 242 | |
| 243 | /** |
| 244 | * @BATADV_ATTR_BLA_OWN: Flag indicating own originator |
| 245 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 246 | BATADV_ATTR_BLA_OWN, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 247 | |
| 248 | /** |
| 249 | * @BATADV_ATTR_BLA_ADDRESS: Bridge loop avoidance claim MAC address |
| 250 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 251 | BATADV_ATTR_BLA_ADDRESS, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 252 | |
| 253 | /** |
| 254 | * @BATADV_ATTR_BLA_VID: BLA VLAN ID |
| 255 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 256 | BATADV_ATTR_BLA_VID, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 257 | |
| 258 | /** |
| 259 | * @BATADV_ATTR_BLA_BACKBONE: BLA gateway originator MAC address |
| 260 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 261 | BATADV_ATTR_BLA_BACKBONE, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 262 | |
| 263 | /** |
| 264 | * @BATADV_ATTR_BLA_CRC: BLA CRC |
| 265 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 266 | BATADV_ATTR_BLA_CRC, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 267 | |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 268 | /* add attributes above here, update the policy in netlink.c */ |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 269 | |
| 270 | /** |
| 271 | * @__BATADV_ATTR_AFTER_LAST: internal use |
| 272 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 273 | __BATADV_ATTR_AFTER_LAST, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 274 | |
| 275 | /** |
| 276 | * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available |
| 277 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 278 | NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 279 | |
| 280 | /** |
| 281 | * @BATADV_ATTR_MAX: highest attribute number currently defined |
| 282 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 283 | BATADV_ATTR_MAX = __BATADV_ATTR_AFTER_LAST - 1 |
| 284 | }; |
| 285 | |
| 286 | /** |
| 287 | * enum batadv_nl_commands - supported batman-adv netlink commands |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 288 | */ |
| 289 | enum batadv_nl_commands { |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 290 | /** |
| 291 | * @BATADV_CMD_UNSPEC: unspecified command to catch errors |
| 292 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 293 | BATADV_CMD_UNSPEC, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 294 | |
| 295 | /** |
| 296 | * @BATADV_CMD_GET_MESH_INFO: Query basic information about batman-adv |
| 297 | * device |
| 298 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 299 | BATADV_CMD_GET_MESH_INFO, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 300 | |
| 301 | /** |
| 302 | * @BATADV_CMD_TP_METER: Start a tp meter session |
| 303 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 304 | BATADV_CMD_TP_METER, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 305 | |
| 306 | /** |
| 307 | * @BATADV_CMD_TP_METER_CANCEL: Cancel a tp meter session |
| 308 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 309 | BATADV_CMD_TP_METER_CANCEL, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 310 | |
| 311 | /** |
| 312 | * @BATADV_CMD_GET_ROUTING_ALGOS: Query the list of routing algorithms. |
| 313 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 314 | BATADV_CMD_GET_ROUTING_ALGOS, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 315 | |
| 316 | /** |
| 317 | * @BATADV_CMD_GET_HARDIFS: Query list of hard interfaces |
| 318 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 319 | BATADV_CMD_GET_HARDIFS, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 320 | |
| 321 | /** |
| 322 | * @BATADV_CMD_GET_TRANSTABLE_LOCAL: Query list of local translations |
| 323 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 324 | BATADV_CMD_GET_TRANSTABLE_LOCAL, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 325 | |
| 326 | /** |
| 327 | * @BATADV_CMD_GET_TRANSTABLE_GLOBAL: Query list of global translations |
| 328 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 329 | BATADV_CMD_GET_TRANSTABLE_GLOBAL, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 330 | |
| 331 | /** |
| 332 | * @BATADV_CMD_GET_ORIGINATORS: Query list of originators |
| 333 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 334 | BATADV_CMD_GET_ORIGINATORS, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 335 | |
| 336 | /** |
| 337 | * @BATADV_CMD_GET_NEIGHBORS: Query list of neighbours |
| 338 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 339 | BATADV_CMD_GET_NEIGHBORS, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 340 | |
| 341 | /** |
| 342 | * @BATADV_CMD_GET_GATEWAYS: Query list of gateways |
| 343 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 344 | BATADV_CMD_GET_GATEWAYS, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 345 | |
| 346 | /** |
| 347 | * @BATADV_CMD_GET_BLA_CLAIM: Query list of bridge loop avoidance claims |
| 348 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 349 | BATADV_CMD_GET_BLA_CLAIM, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 350 | |
| 351 | /** |
| 352 | * @BATADV_CMD_GET_BLA_BACKBONE: Query list of bridge loop avoidance |
| 353 | * backbones |
| 354 | */ |
Christopher Ferris | 3318540 | 2017-01-13 13:28:52 -0800 | [diff] [blame] | 355 | BATADV_CMD_GET_BLA_BACKBONE, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 356 | |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 357 | /* add new commands above here */ |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 358 | |
| 359 | /** |
| 360 | * @__BATADV_CMD_AFTER_LAST: internal use |
| 361 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 362 | __BATADV_CMD_AFTER_LAST, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 363 | |
| 364 | /** |
| 365 | * @BATADV_CMD_MAX: highest used command number |
| 366 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 367 | BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1 |
| 368 | }; |
| 369 | |
| 370 | /** |
| 371 | * enum batadv_tp_meter_reason - reason of a tp meter test run stop |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 372 | */ |
| 373 | enum batadv_tp_meter_reason { |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 374 | /** |
| 375 | * @BATADV_TP_REASON_COMPLETE: sender finished tp run |
| 376 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 377 | BATADV_TP_REASON_COMPLETE = 3, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 378 | |
| 379 | /** |
| 380 | * @BATADV_TP_REASON_CANCEL: sender was stopped during run |
| 381 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 382 | BATADV_TP_REASON_CANCEL = 4, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 383 | |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 384 | /* error status >= 128 */ |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 385 | |
| 386 | /** |
| 387 | * @BATADV_TP_REASON_DST_UNREACHABLE: receiver could not be reached or |
| 388 | * didn't answer |
| 389 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 390 | BATADV_TP_REASON_DST_UNREACHABLE = 128, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 391 | |
| 392 | /** |
| 393 | * @BATADV_TP_REASON_RESEND_LIMIT: (unused) sender retry reached limit |
| 394 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 395 | BATADV_TP_REASON_RESEND_LIMIT = 129, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 396 | |
| 397 | /** |
| 398 | * @BATADV_TP_REASON_ALREADY_ONGOING: test to or from the same node |
| 399 | * already ongoing |
| 400 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 401 | BATADV_TP_REASON_ALREADY_ONGOING = 130, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 402 | |
| 403 | /** |
| 404 | * @BATADV_TP_REASON_MEMORY_ERROR: test was stopped due to low memory |
| 405 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 406 | BATADV_TP_REASON_MEMORY_ERROR = 131, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 407 | |
| 408 | /** |
| 409 | * @BATADV_TP_REASON_CANT_SEND: failed to send via outgoing interface |
| 410 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 411 | BATADV_TP_REASON_CANT_SEND = 132, |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 412 | |
| 413 | /** |
| 414 | * @BATADV_TP_REASON_TOO_MANY: too many ongoing sessions |
| 415 | */ |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 416 | BATADV_TP_REASON_TOO_MANY = 133, |
| 417 | }; |
| 418 | |
| 419 | #endif /* _UAPI_LINUX_BATMAN_ADV_H_ */ |