zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

batman_adv.h (16886B) - Raw


      1 /* SPDX-License-Identifier: MIT */
      2 /* Copyright (C) B.A.T.M.A.N. contributors:
      3  *
      4  * Matthias Schiffer
      5  */
      6 
      7 #ifndef _LINUX_BATMAN_ADV_H_
      8 #define _LINUX_BATMAN_ADV_H_
      9 
     10 #define BATADV_NL_NAME "batadv"
     11 
     12 #define BATADV_NL_MCAST_GROUP_CONFIG	"config"
     13 #define BATADV_NL_MCAST_GROUP_TPMETER	"tpmeter"
     14 
     15 /**
     16  * enum batadv_tt_client_flags - TT client specific flags
     17  *
     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  */
     26 enum batadv_tt_client_flags {
     27 	/**
     28 	 * @BATADV_TT_CLIENT_DEL: the client has to be deleted from the table
     29 	 */
     30 	BATADV_TT_CLIENT_DEL     = (1 << 0),
     31 
     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 	 */
     37 	BATADV_TT_CLIENT_ROAM    = (1 << 1),
     38 
     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 	 */
     43 	BATADV_TT_CLIENT_WIFI    = (1 << 4),
     44 
     45 	/**
     46 	 * @BATADV_TT_CLIENT_ISOLA: this client is considered "isolated". This
     47 	 * information is used by the Extended Isolation feature
     48 	 */
     49 	BATADV_TT_CLIENT_ISOLA	 = (1 << 5),
     50 
     51 	/**
     52 	 * @BATADV_TT_CLIENT_NOPURGE: this client should never be removed from
     53 	 * the table
     54 	 */
     55 	BATADV_TT_CLIENT_NOPURGE = (1 << 8),
     56 
     57 	/**
     58 	 * @BATADV_TT_CLIENT_NEW: this client has been added to the local table
     59 	 * but has not been announced yet
     60 	 */
     61 	BATADV_TT_CLIENT_NEW     = (1 << 9),
     62 
     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 	 */
     68 	BATADV_TT_CLIENT_PENDING = (1 << 10),
     69 
     70 	/**
     71 	 * @BATADV_TT_CLIENT_TEMP: this global client has been detected to be
     72 	 * part of the network but no node has already announced it
     73 	 */
     74 	BATADV_TT_CLIENT_TEMP	 = (1 << 11),
     75 };
     76 
     77 /**
     78  * 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  */
     90 enum 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 /**
    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,
    136 };
    137 
    138 /**
    139  * enum batadv_nl_attrs - batman-adv netlink attributes
    140  */
    141 enum batadv_nl_attrs {
    142 	/**
    143 	 * @BATADV_ATTR_UNSPEC: unspecified attribute to catch errors
    144 	 */
    145 	BATADV_ATTR_UNSPEC,
    146 
    147 	/**
    148 	 * @BATADV_ATTR_VERSION: batman-adv version string
    149 	 */
    150 	BATADV_ATTR_VERSION,
    151 
    152 	/**
    153 	 * @BATADV_ATTR_ALGO_NAME: name of routing algorithm
    154 	 */
    155 	BATADV_ATTR_ALGO_NAME,
    156 
    157 	/**
    158 	 * @BATADV_ATTR_MESH_IFINDEX: index of the batman-adv interface
    159 	 */
    160 	BATADV_ATTR_MESH_IFINDEX,
    161 
    162 	/**
    163 	 * @BATADV_ATTR_MESH_IFNAME: name of the batman-adv interface
    164 	 */
    165 	BATADV_ATTR_MESH_IFNAME,
    166 
    167 	/**
    168 	 * @BATADV_ATTR_MESH_ADDRESS: mac address of the batman-adv interface
    169 	 */
    170 	BATADV_ATTR_MESH_ADDRESS,
    171 
    172 	/**
    173 	 * @BATADV_ATTR_HARD_IFINDEX: index of the non-batman-adv interface
    174 	 */
    175 	BATADV_ATTR_HARD_IFINDEX,
    176 
    177 	/**
    178 	 * @BATADV_ATTR_HARD_IFNAME: name of the non-batman-adv interface
    179 	 */
    180 	BATADV_ATTR_HARD_IFNAME,
    181 
    182 	/**
    183 	 * @BATADV_ATTR_HARD_ADDRESS: mac address of the non-batman-adv
    184 	 * interface
    185 	 */
    186 	BATADV_ATTR_HARD_ADDRESS,
    187 
    188 	/**
    189 	 * @BATADV_ATTR_ORIG_ADDRESS: originator mac address
    190 	 */
    191 	BATADV_ATTR_ORIG_ADDRESS,
    192 
    193 	/**
    194 	 * @BATADV_ATTR_TPMETER_RESULT: result of run (see
    195 	 * batadv_tp_meter_status)
    196 	 */
    197 	BATADV_ATTR_TPMETER_RESULT,
    198 
    199 	/**
    200 	 * @BATADV_ATTR_TPMETER_TEST_TIME: time (msec) the run took
    201 	 */
    202 	BATADV_ATTR_TPMETER_TEST_TIME,
    203 
    204 	/**
    205 	 * @BATADV_ATTR_TPMETER_BYTES: amount of acked bytes during run
    206 	 */
    207 	BATADV_ATTR_TPMETER_BYTES,
    208 
    209 	/**
    210 	 * @BATADV_ATTR_TPMETER_COOKIE: session cookie to match tp_meter session
    211 	 */
    212 	BATADV_ATTR_TPMETER_COOKIE,
    213 
    214 	/**
    215 	 * @BATADV_ATTR_PAD: attribute used for padding for 64-bit alignment
    216 	 */
    217 	BATADV_ATTR_PAD,
    218 
    219 	/**
    220 	 * @BATADV_ATTR_ACTIVE: Flag indicating if the hard interface is active
    221 	 */
    222 	BATADV_ATTR_ACTIVE,
    223 
    224 	/**
    225 	 * @BATADV_ATTR_TT_ADDRESS: Client MAC address
    226 	 */
    227 	BATADV_ATTR_TT_ADDRESS,
    228 
    229 	/**
    230 	 * @BATADV_ATTR_TT_TTVN: Translation table version
    231 	 */
    232 	BATADV_ATTR_TT_TTVN,
    233 
    234 	/**
    235 	 * @BATADV_ATTR_TT_LAST_TTVN: Previous translation table version
    236 	 */
    237 	BATADV_ATTR_TT_LAST_TTVN,
    238 
    239 	/**
    240 	 * @BATADV_ATTR_TT_CRC32: CRC32 over translation table
    241 	 */
    242 	BATADV_ATTR_TT_CRC32,
    243 
    244 	/**
    245 	 * @BATADV_ATTR_TT_VID: VLAN ID
    246 	 */
    247 	BATADV_ATTR_TT_VID,
    248 
    249 	/**
    250 	 * @BATADV_ATTR_TT_FLAGS: Translation table client flags
    251 	 */
    252 	BATADV_ATTR_TT_FLAGS,
    253 
    254 	/**
    255 	 * @BATADV_ATTR_FLAG_BEST: Flags indicating entry is the best
    256 	 */
    257 	BATADV_ATTR_FLAG_BEST,
    258 
    259 	/**
    260 	 * @BATADV_ATTR_LAST_SEEN_MSECS: Time in milliseconds since last seen
    261 	 */
    262 	BATADV_ATTR_LAST_SEEN_MSECS,
    263 
    264 	/**
    265 	 * @BATADV_ATTR_NEIGH_ADDRESS: Neighbour MAC address
    266 	 */
    267 	BATADV_ATTR_NEIGH_ADDRESS,
    268 
    269 	/**
    270 	 * @BATADV_ATTR_TQ: TQ to neighbour
    271 	 */
    272 	BATADV_ATTR_TQ,
    273 
    274 	/**
    275 	 * @BATADV_ATTR_THROUGHPUT: Estimated throughput to Neighbour
    276 	 */
    277 	BATADV_ATTR_THROUGHPUT,
    278 
    279 	/**
    280 	 * @BATADV_ATTR_BANDWIDTH_UP: Reported uplink bandwidth
    281 	 */
    282 	BATADV_ATTR_BANDWIDTH_UP,
    283 
    284 	/**
    285 	 * @BATADV_ATTR_BANDWIDTH_DOWN: Reported downlink bandwidth
    286 	 */
    287 	BATADV_ATTR_BANDWIDTH_DOWN,
    288 
    289 	/**
    290 	 * @BATADV_ATTR_ROUTER: Gateway router MAC address
    291 	 */
    292 	BATADV_ATTR_ROUTER,
    293 
    294 	/**
    295 	 * @BATADV_ATTR_BLA_OWN: Flag indicating own originator
    296 	 */
    297 	BATADV_ATTR_BLA_OWN,
    298 
    299 	/**
    300 	 * @BATADV_ATTR_BLA_ADDRESS: Bridge loop avoidance claim MAC address
    301 	 */
    302 	BATADV_ATTR_BLA_ADDRESS,
    303 
    304 	/**
    305 	 * @BATADV_ATTR_BLA_VID: BLA VLAN ID
    306 	 */
    307 	BATADV_ATTR_BLA_VID,
    308 
    309 	/**
    310 	 * @BATADV_ATTR_BLA_BACKBONE: BLA gateway originator MAC address
    311 	 */
    312 	BATADV_ATTR_BLA_BACKBONE,
    313 
    314 	/**
    315 	 * @BATADV_ATTR_BLA_CRC: BLA CRC
    316 	 */
    317 	BATADV_ATTR_BLA_CRC,
    318 
    319 	/**
    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 
    334 	/**
    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 
    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 
    484 	/* add attributes above here, update the policy in netlink.c */
    485 
    486 	/**
    487 	 * @__BATADV_ATTR_AFTER_LAST: internal use
    488 	 */
    489 	__BATADV_ATTR_AFTER_LAST,
    490 
    491 	/**
    492 	 * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available
    493 	 */
    494 	NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST,
    495 
    496 	/**
    497 	 * @BATADV_ATTR_MAX: highest attribute number currently defined
    498 	 */
    499 	BATADV_ATTR_MAX = __BATADV_ATTR_AFTER_LAST - 1
    500 };
    501 
    502 /**
    503  * enum batadv_nl_commands - supported batman-adv netlink commands
    504  */
    505 enum batadv_nl_commands {
    506 	/**
    507 	 * @BATADV_CMD_UNSPEC: unspecified command to catch errors
    508 	 */
    509 	BATADV_CMD_UNSPEC,
    510 
    511 	/**
    512 	 * @BATADV_CMD_GET_MESH: Get attributes from softif/mesh
    513 	 */
    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,
    520 
    521 	/**
    522 	 * @BATADV_CMD_TP_METER: Start a tp meter session
    523 	 */
    524 	BATADV_CMD_TP_METER,
    525 
    526 	/**
    527 	 * @BATADV_CMD_TP_METER_CANCEL: Cancel a tp meter session
    528 	 */
    529 	BATADV_CMD_TP_METER_CANCEL,
    530 
    531 	/**
    532 	 * @BATADV_CMD_GET_ROUTING_ALGOS: Query the list of routing algorithms.
    533 	 */
    534 	BATADV_CMD_GET_ROUTING_ALGOS,
    535 
    536 	/**
    537 	 * @BATADV_CMD_GET_HARDIF: Get attributes from a hardif of the
    538 	 *  current softif
    539 	 */
    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,
    546 
    547 	/**
    548 	 * @BATADV_CMD_GET_TRANSTABLE_LOCAL: Query list of local translations
    549 	 */
    550 	BATADV_CMD_GET_TRANSTABLE_LOCAL,
    551 
    552 	/**
    553 	 * @BATADV_CMD_GET_TRANSTABLE_GLOBAL: Query list of global translations
    554 	 */
    555 	BATADV_CMD_GET_TRANSTABLE_GLOBAL,
    556 
    557 	/**
    558 	 * @BATADV_CMD_GET_ORIGINATORS: Query list of originators
    559 	 */
    560 	BATADV_CMD_GET_ORIGINATORS,
    561 
    562 	/**
    563 	 * @BATADV_CMD_GET_NEIGHBORS: Query list of neighbours
    564 	 */
    565 	BATADV_CMD_GET_NEIGHBORS,
    566 
    567 	/**
    568 	 * @BATADV_CMD_GET_GATEWAYS: Query list of gateways
    569 	 */
    570 	BATADV_CMD_GET_GATEWAYS,
    571 
    572 	/**
    573 	 * @BATADV_CMD_GET_BLA_CLAIM: Query list of bridge loop avoidance claims
    574 	 */
    575 	BATADV_CMD_GET_BLA_CLAIM,
    576 
    577 	/**
    578 	 * @BATADV_CMD_GET_BLA_BACKBONE: Query list of bridge loop avoidance
    579 	 * backbones
    580 	 */
    581 	BATADV_CMD_GET_BLA_BACKBONE,
    582 
    583 	/**
    584 	 * @BATADV_CMD_GET_DAT_CACHE: Query list of DAT cache entries
    585 	 */
    586 	BATADV_CMD_GET_DAT_CACHE,
    587 
    588 	/**
    589 	 * @BATADV_CMD_GET_MCAST_FLAGS: Query list of multicast flags
    590 	 */
    591 	BATADV_CMD_GET_MCAST_FLAGS,
    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 
    616 	/* add new commands above here */
    617 
    618 	/**
    619 	 * @__BATADV_CMD_AFTER_LAST: internal use
    620 	 */
    621 	__BATADV_CMD_AFTER_LAST,
    622 
    623 	/**
    624 	 * @BATADV_CMD_MAX: highest used command number
    625 	 */
    626 	BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1
    627 };
    628 
    629 /**
    630  * enum batadv_tp_meter_reason - reason of a tp meter test run stop
    631  */
    632 enum batadv_tp_meter_reason {
    633 	/**
    634 	 * @BATADV_TP_REASON_COMPLETE: sender finished tp run
    635 	 */
    636 	BATADV_TP_REASON_COMPLETE		= 3,
    637 
    638 	/**
    639 	 * @BATADV_TP_REASON_CANCEL: sender was stopped during run
    640 	 */
    641 	BATADV_TP_REASON_CANCEL			= 4,
    642 
    643 	/* error status >= 128 */
    644 
    645 	/**
    646 	 * @BATADV_TP_REASON_DST_UNREACHABLE: receiver could not be reached or
    647 	 * didn't answer
    648 	 */
    649 	BATADV_TP_REASON_DST_UNREACHABLE	= 128,
    650 
    651 	/**
    652 	 * @BATADV_TP_REASON_RESEND_LIMIT: (unused) sender retry reached limit
    653 	 */
    654 	BATADV_TP_REASON_RESEND_LIMIT		= 129,
    655 
    656 	/**
    657 	 * @BATADV_TP_REASON_ALREADY_ONGOING: test to or from the same node
    658 	 * already ongoing
    659 	 */
    660 	BATADV_TP_REASON_ALREADY_ONGOING	= 130,
    661 
    662 	/**
    663 	 * @BATADV_TP_REASON_MEMORY_ERROR: test was stopped due to low memory
    664 	 */
    665 	BATADV_TP_REASON_MEMORY_ERROR		= 131,
    666 
    667 	/**
    668 	 * @BATADV_TP_REASON_CANT_SEND: failed to send via outgoing interface
    669 	 */
    670 	BATADV_TP_REASON_CANT_SEND		= 132,
    671 
    672 	/**
    673 	 * @BATADV_TP_REASON_TOO_MANY: too many ongoing sessions
    674 	 */
    675 	BATADV_TP_REASON_TOO_MANY		= 133,
    676 };
    677 
    678 /**
    679  * enum batadv_ifla_attrs - batman-adv ifla nested attributes
    680  */
    681 enum batadv_ifla_attrs {
    682 	/**
    683 	 * @IFLA_BATADV_UNSPEC: unspecified attribute which is not parsed by
    684 	 *  rtnetlink
    685 	 */
    686 	IFLA_BATADV_UNSPEC,
    687 
    688 	/**
    689 	 * @IFLA_BATADV_ALGO_NAME: routing algorithm (name) which should be
    690 	 *  used by the newly registered batadv net_device.
    691 	 */
    692 	IFLA_BATADV_ALGO_NAME,
    693 
    694 	/* add attributes above here, update the policy in soft-interface.c */
    695 
    696 	/**
    697 	 * @__IFLA_BATADV_MAX: internal use
    698 	 */
    699 	__IFLA_BATADV_MAX,
    700 };
    701 
    702 #define IFLA_BATADV_MAX (__IFLA_BATADV_MAX - 1)
    703 
    704 #endif /* _LINUX_BATMAN_ADV_H_ */