.. | .. |
---|
1 | 1 | /* SPDX-License-Identifier: MIT */ |
---|
2 | | -/* Copyright (C) 2016-2018 B.A.T.M.A.N. contributors: |
---|
| 2 | +/* Copyright (C) 2016-2020 B.A.T.M.A.N. contributors: |
---|
3 | 3 | * |
---|
4 | 4 | * Matthias Schiffer |
---|
5 | | - * |
---|
6 | | - * 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: |
---|
12 | | - * |
---|
13 | | - * 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. |
---|
23 | 5 | */ |
---|
24 | 6 | |
---|
25 | 7 | #ifndef _UAPI_LINUX_BATMAN_ADV_H_ |
---|
.. | .. |
---|
27 | 9 | |
---|
28 | 10 | #define BATADV_NL_NAME "batadv" |
---|
29 | 11 | |
---|
| 12 | +#define BATADV_NL_MCAST_GROUP_CONFIG "config" |
---|
30 | 13 | #define BATADV_NL_MCAST_GROUP_TPMETER "tpmeter" |
---|
31 | 14 | |
---|
32 | 15 | /** |
---|
.. | .. |
---|
86 | 69 | |
---|
87 | 70 | /** |
---|
88 | 71 | * @BATADV_TT_CLIENT_TEMP: this global client has been detected to be |
---|
89 | | - * part of the network but no nnode has already announced it |
---|
| 72 | + * part of the network but no node has already announced it |
---|
90 | 73 | */ |
---|
91 | 74 | BATADV_TT_CLIENT_TEMP = (1 << 11), |
---|
92 | 75 | }; |
---|
.. | .. |
---|
136 | 119 | * (i.e. querier is behind our own bridge segment) |
---|
137 | 120 | */ |
---|
138 | 121 | BATADV_MCAST_FLAGS_QUERIER_IPV6_SHADOWING = (1 << 4), |
---|
| 122 | +}; |
---|
| 123 | + |
---|
| 124 | +/** |
---|
| 125 | + * enum batadv_gw_modes - gateway mode of node |
---|
| 126 | + */ |
---|
| 127 | +enum 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 gateway server */ |
---|
| 135 | + BATADV_GW_MODE_SERVER, |
---|
139 | 136 | }; |
---|
140 | 137 | |
---|
141 | 138 | /** |
---|
.. | .. |
---|
344 | 341 | */ |
---|
345 | 342 | BATADV_ATTR_MCAST_FLAGS_PRIV, |
---|
346 | 343 | |
---|
| 344 | + /** |
---|
| 345 | + * @BATADV_ATTR_VLANID: VLAN id on top of soft interface |
---|
| 346 | + */ |
---|
| 347 | + BATADV_ATTR_VLANID, |
---|
| 348 | + |
---|
| 349 | + /** |
---|
| 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 | + |
---|
| 355 | + /** |
---|
| 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 | + |
---|
| 374 | + /** |
---|
| 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 | + |
---|
| 380 | + /** |
---|
| 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 | + |
---|
| 387 | + /** |
---|
| 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 | + |
---|
| 395 | + /** |
---|
| 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 | + |
---|
| 402 | + /** |
---|
| 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 | + |
---|
| 428 | + /** |
---|
| 429 | + * @BATADV_ATTR_HOP_PENALTY: defines the penalty which will be applied |
---|
| 430 | + * to an originator message's tq-field on every hop and/or per |
---|
| 431 | + * hard interface |
---|
| 432 | + */ |
---|
| 433 | + BATADV_ATTR_HOP_PENALTY, |
---|
| 434 | + |
---|
| 435 | + /** |
---|
| 436 | + * @BATADV_ATTR_LOG_LEVEL: bitmask with to define which debug messages |
---|
| 437 | + * should be send to the debug log/trace ring buffer |
---|
| 438 | + */ |
---|
| 439 | + BATADV_ATTR_LOG_LEVEL, |
---|
| 440 | + |
---|
| 441 | + /** |
---|
| 442 | + * @BATADV_ATTR_MULTICAST_FORCEFLOOD_ENABLED: whether multicast |
---|
| 443 | + * optimizations should be replaced by simple broadcast-like flooding |
---|
| 444 | + * of multicast packets. If set to non-zero then all nodes in the mesh |
---|
| 445 | + * are going to use classic flooding for any multicast packet with no |
---|
| 446 | + * optimizations. |
---|
| 447 | + */ |
---|
| 448 | + BATADV_ATTR_MULTICAST_FORCEFLOOD_ENABLED, |
---|
| 449 | + |
---|
| 450 | + /** |
---|
| 451 | + * @BATADV_ATTR_NETWORK_CODING_ENABLED: whether Network Coding (using |
---|
| 452 | + * some magic to send fewer wifi packets but still the same content) is |
---|
| 453 | + * enabled or not. |
---|
| 454 | + */ |
---|
| 455 | + BATADV_ATTR_NETWORK_CODING_ENABLED, |
---|
| 456 | + |
---|
| 457 | + /** |
---|
| 458 | + * @BATADV_ATTR_ORIG_INTERVAL: defines the interval in milliseconds in |
---|
| 459 | + * which batman sends its protocol messages. |
---|
| 460 | + */ |
---|
| 461 | + BATADV_ATTR_ORIG_INTERVAL, |
---|
| 462 | + |
---|
| 463 | + /** |
---|
| 464 | + * @BATADV_ATTR_ELP_INTERVAL: defines the interval in milliseconds in |
---|
| 465 | + * which batman emits probing packets for neighbor sensing (ELP). |
---|
| 466 | + */ |
---|
| 467 | + BATADV_ATTR_ELP_INTERVAL, |
---|
| 468 | + |
---|
| 469 | + /** |
---|
| 470 | + * @BATADV_ATTR_THROUGHPUT_OVERRIDE: defines the throughput value to be |
---|
| 471 | + * used by B.A.T.M.A.N. V when estimating the link throughput using |
---|
| 472 | + * this interface. If the value is set to 0 then batman-adv will try to |
---|
| 473 | + * estimate the throughput by itself. |
---|
| 474 | + */ |
---|
| 475 | + BATADV_ATTR_THROUGHPUT_OVERRIDE, |
---|
| 476 | + |
---|
| 477 | + /** |
---|
| 478 | + * @BATADV_ATTR_MULTICAST_FANOUT: defines the maximum number of packet |
---|
| 479 | + * copies that may be generated for a multicast-to-unicast conversion. |
---|
| 480 | + * Once this limit is exceeded distribution will fall back to broadcast. |
---|
| 481 | + */ |
---|
| 482 | + BATADV_ATTR_MULTICAST_FANOUT, |
---|
| 483 | + |
---|
347 | 484 | /* add attributes above here, update the policy in netlink.c */ |
---|
348 | 485 | |
---|
349 | 486 | /** |
---|
.. | .. |
---|
372 | 509 | BATADV_CMD_UNSPEC, |
---|
373 | 510 | |
---|
374 | 511 | /** |
---|
375 | | - * @BATADV_CMD_GET_MESH_INFO: Query basic information about batman-adv |
---|
376 | | - * device |
---|
| 512 | + * @BATADV_CMD_GET_MESH: Get attributes from softif/mesh |
---|
377 | 513 | */ |
---|
378 | | - BATADV_CMD_GET_MESH_INFO, |
---|
| 514 | + BATADV_CMD_GET_MESH, |
---|
| 515 | + |
---|
| 516 | + /** |
---|
| 517 | + * @BATADV_CMD_GET_MESH_INFO: Alias for @BATADV_CMD_GET_MESH |
---|
| 518 | + */ |
---|
| 519 | + BATADV_CMD_GET_MESH_INFO = BATADV_CMD_GET_MESH, |
---|
379 | 520 | |
---|
380 | 521 | /** |
---|
381 | 522 | * @BATADV_CMD_TP_METER: Start a tp meter session |
---|
.. | .. |
---|
393 | 534 | BATADV_CMD_GET_ROUTING_ALGOS, |
---|
394 | 535 | |
---|
395 | 536 | /** |
---|
396 | | - * @BATADV_CMD_GET_HARDIFS: Query list of hard interfaces |
---|
| 537 | + * @BATADV_CMD_GET_HARDIF: Get attributes from a hardif of the |
---|
| 538 | + * current softif |
---|
397 | 539 | */ |
---|
398 | | - BATADV_CMD_GET_HARDIFS, |
---|
| 540 | + BATADV_CMD_GET_HARDIF, |
---|
| 541 | + |
---|
| 542 | + /** |
---|
| 543 | + * @BATADV_CMD_GET_HARDIFS: Alias for @BATADV_CMD_GET_HARDIF |
---|
| 544 | + */ |
---|
| 545 | + BATADV_CMD_GET_HARDIFS = BATADV_CMD_GET_HARDIF, |
---|
399 | 546 | |
---|
400 | 547 | /** |
---|
401 | 548 | * @BATADV_CMD_GET_TRANSTABLE_LOCAL: Query list of local translations |
---|
.. | .. |
---|
443 | 590 | */ |
---|
444 | 591 | BATADV_CMD_GET_MCAST_FLAGS, |
---|
445 | 592 | |
---|
| 593 | + /** |
---|
| 594 | + * @BATADV_CMD_SET_MESH: Set attributes for softif/mesh |
---|
| 595 | + */ |
---|
| 596 | + BATADV_CMD_SET_MESH, |
---|
| 597 | + |
---|
| 598 | + /** |
---|
| 599 | + * @BATADV_CMD_SET_HARDIF: Set attributes for hardif of the |
---|
| 600 | + * current softif |
---|
| 601 | + */ |
---|
| 602 | + BATADV_CMD_SET_HARDIF, |
---|
| 603 | + |
---|
| 604 | + /** |
---|
| 605 | + * @BATADV_CMD_GET_VLAN: Get attributes from a VLAN of the |
---|
| 606 | + * current softif |
---|
| 607 | + */ |
---|
| 608 | + BATADV_CMD_GET_VLAN, |
---|
| 609 | + |
---|
| 610 | + /** |
---|
| 611 | + * @BATADV_CMD_SET_VLAN: Set attributes for VLAN of the |
---|
| 612 | + * current softif |
---|
| 613 | + */ |
---|
| 614 | + BATADV_CMD_SET_VLAN, |
---|
| 615 | + |
---|
446 | 616 | /* add new commands above here */ |
---|
447 | 617 | |
---|
448 | 618 | /** |
---|