batman_adv.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704
  1. /* SPDX-License-Identifier: MIT */
  2. /* Copyright (C) B.A.T.M.A.N. contributors:
  3. *
  4. * Matthias Schiffer
  5. */
  6. #ifndef _LINUX_BATMAN_ADV_H_
  7. #define _LINUX_BATMAN_ADV_H_
  8. #define BATADV_NL_NAME "batadv"
  9. #define BATADV_NL_MCAST_GROUP_CONFIG "config"
  10. #define BATADV_NL_MCAST_GROUP_TPMETER "tpmeter"
  11. /**
  12. * enum batadv_tt_client_flags - TT client specific flags
  13. *
  14. * Bits from 0 to 7 are called _remote flags_ because they are sent on the wire.
  15. * Bits from 8 to 15 are called _local flags_ because they are used for local
  16. * computations only.
  17. *
  18. * Bits from 4 to 7 - a subset of remote flags - are ensured to be in sync with
  19. * the other nodes in the network. To achieve this goal these flags are included
  20. * in the TT CRC computation.
  21. */
  22. enum batadv_tt_client_flags {
  23. /**
  24. * @BATADV_TT_CLIENT_DEL: the client has to be deleted from the table
  25. */
  26. BATADV_TT_CLIENT_DEL = (1 << 0),
  27. /**
  28. * @BATADV_TT_CLIENT_ROAM: the client roamed to/from another node and
  29. * the new update telling its new real location has not been
  30. * received/sent yet
  31. */
  32. BATADV_TT_CLIENT_ROAM = (1 << 1),
  33. /**
  34. * @BATADV_TT_CLIENT_WIFI: this client is connected through a wifi
  35. * interface. This information is used by the "AP Isolation" feature
  36. */
  37. BATADV_TT_CLIENT_WIFI = (1 << 4),
  38. /**
  39. * @BATADV_TT_CLIENT_ISOLA: this client is considered "isolated". This
  40. * information is used by the Extended Isolation feature
  41. */
  42. BATADV_TT_CLIENT_ISOLA = (1 << 5),
  43. /**
  44. * @BATADV_TT_CLIENT_NOPURGE: this client should never be removed from
  45. * the table
  46. */
  47. BATADV_TT_CLIENT_NOPURGE = (1 << 8),
  48. /**
  49. * @BATADV_TT_CLIENT_NEW: this client has been added to the local table
  50. * but has not been announced yet
  51. */
  52. BATADV_TT_CLIENT_NEW = (1 << 9),
  53. /**
  54. * @BATADV_TT_CLIENT_PENDING: this client is marked for removal but it
  55. * is kept in the table for one more originator interval for consistency
  56. * purposes
  57. */
  58. BATADV_TT_CLIENT_PENDING = (1 << 10),
  59. /**
  60. * @BATADV_TT_CLIENT_TEMP: this global client has been detected to be
  61. * part of the network but no node has already announced it
  62. */
  63. BATADV_TT_CLIENT_TEMP = (1 << 11),
  64. };
  65. /**
  66. * enum batadv_mcast_flags_priv - Private, own multicast flags
  67. *
  68. * These are internal, multicast related flags. Currently they describe certain
  69. * multicast related attributes of the segment this originator bridges into the
  70. * mesh.
  71. *
  72. * Those attributes are used to determine the public multicast flags this
  73. * originator is going to announce via TT.
  74. *
  75. * For netlink, if BATADV_MCAST_FLAGS_BRIDGED is unset then all querier
  76. * related flags are undefined.
  77. */
  78. enum batadv_mcast_flags_priv {
  79. /**
  80. * @BATADV_MCAST_FLAGS_BRIDGED: There is a bridge on top of the mesh
  81. * interface.
  82. */
  83. BATADV_MCAST_FLAGS_BRIDGED = (1 << 0),
  84. /**
  85. * @BATADV_MCAST_FLAGS_QUERIER_IPV4_EXISTS: Whether an IGMP querier
  86. * exists in the mesh
  87. */
  88. BATADV_MCAST_FLAGS_QUERIER_IPV4_EXISTS = (1 << 1),
  89. /**
  90. * @BATADV_MCAST_FLAGS_QUERIER_IPV6_EXISTS: Whether an MLD querier
  91. * exists in the mesh
  92. */
  93. BATADV_MCAST_FLAGS_QUERIER_IPV6_EXISTS = (1 << 2),
  94. /**
  95. * @BATADV_MCAST_FLAGS_QUERIER_IPV4_SHADOWING: If an IGMP querier
  96. * exists, whether it is potentially shadowing multicast listeners
  97. * (i.e. querier is behind our own bridge segment)
  98. */
  99. BATADV_MCAST_FLAGS_QUERIER_IPV4_SHADOWING = (1 << 3),
  100. /**
  101. * @BATADV_MCAST_FLAGS_QUERIER_IPV6_SHADOWING: If an MLD querier
  102. * exists, whether it is potentially shadowing multicast listeners
  103. * (i.e. querier is behind our own bridge segment)
  104. */
  105. BATADV_MCAST_FLAGS_QUERIER_IPV6_SHADOWING = (1 << 4),
  106. };
  107. /**
  108. * enum batadv_gw_modes - gateway mode of node
  109. */
  110. enum batadv_gw_modes {
  111. /** @BATADV_GW_MODE_OFF: gw mode disabled */
  112. BATADV_GW_MODE_OFF,
  113. /** @BATADV_GW_MODE_CLIENT: send DHCP requests to gw servers */
  114. BATADV_GW_MODE_CLIENT,
  115. /** @BATADV_GW_MODE_SERVER: announce itself as gateway server */
  116. BATADV_GW_MODE_SERVER,
  117. };
  118. /**
  119. * enum batadv_nl_attrs - batman-adv netlink attributes
  120. */
  121. enum batadv_nl_attrs {
  122. /**
  123. * @BATADV_ATTR_UNSPEC: unspecified attribute to catch errors
  124. */
  125. BATADV_ATTR_UNSPEC,
  126. /**
  127. * @BATADV_ATTR_VERSION: batman-adv version string
  128. */
  129. BATADV_ATTR_VERSION,
  130. /**
  131. * @BATADV_ATTR_ALGO_NAME: name of routing algorithm
  132. */
  133. BATADV_ATTR_ALGO_NAME,
  134. /**
  135. * @BATADV_ATTR_MESH_IFINDEX: index of the batman-adv interface
  136. */
  137. BATADV_ATTR_MESH_IFINDEX,
  138. /**
  139. * @BATADV_ATTR_MESH_IFNAME: name of the batman-adv interface
  140. */
  141. BATADV_ATTR_MESH_IFNAME,
  142. /**
  143. * @BATADV_ATTR_MESH_ADDRESS: mac address of the batman-adv interface
  144. */
  145. BATADV_ATTR_MESH_ADDRESS,
  146. /**
  147. * @BATADV_ATTR_HARD_IFINDEX: index of the non-batman-adv interface
  148. */
  149. BATADV_ATTR_HARD_IFINDEX,
  150. /**
  151. * @BATADV_ATTR_HARD_IFNAME: name of the non-batman-adv interface
  152. */
  153. BATADV_ATTR_HARD_IFNAME,
  154. /**
  155. * @BATADV_ATTR_HARD_ADDRESS: mac address of the non-batman-adv
  156. * interface
  157. */
  158. BATADV_ATTR_HARD_ADDRESS,
  159. /**
  160. * @BATADV_ATTR_ORIG_ADDRESS: originator mac address
  161. */
  162. BATADV_ATTR_ORIG_ADDRESS,
  163. /**
  164. * @BATADV_ATTR_TPMETER_RESULT: result of run (see
  165. * batadv_tp_meter_status)
  166. */
  167. BATADV_ATTR_TPMETER_RESULT,
  168. /**
  169. * @BATADV_ATTR_TPMETER_TEST_TIME: time (msec) the run took
  170. */
  171. BATADV_ATTR_TPMETER_TEST_TIME,
  172. /**
  173. * @BATADV_ATTR_TPMETER_BYTES: amount of acked bytes during run
  174. */
  175. BATADV_ATTR_TPMETER_BYTES,
  176. /**
  177. * @BATADV_ATTR_TPMETER_COOKIE: session cookie to match tp_meter session
  178. */
  179. BATADV_ATTR_TPMETER_COOKIE,
  180. /**
  181. * @BATADV_ATTR_PAD: attribute used for padding for 64-bit alignment
  182. */
  183. BATADV_ATTR_PAD,
  184. /**
  185. * @BATADV_ATTR_ACTIVE: Flag indicating if the hard interface is active
  186. */
  187. BATADV_ATTR_ACTIVE,
  188. /**
  189. * @BATADV_ATTR_TT_ADDRESS: Client MAC address
  190. */
  191. BATADV_ATTR_TT_ADDRESS,
  192. /**
  193. * @BATADV_ATTR_TT_TTVN: Translation table version
  194. */
  195. BATADV_ATTR_TT_TTVN,
  196. /**
  197. * @BATADV_ATTR_TT_LAST_TTVN: Previous translation table version
  198. */
  199. BATADV_ATTR_TT_LAST_TTVN,
  200. /**
  201. * @BATADV_ATTR_TT_CRC32: CRC32 over translation table
  202. */
  203. BATADV_ATTR_TT_CRC32,
  204. /**
  205. * @BATADV_ATTR_TT_VID: VLAN ID
  206. */
  207. BATADV_ATTR_TT_VID,
  208. /**
  209. * @BATADV_ATTR_TT_FLAGS: Translation table client flags
  210. */
  211. BATADV_ATTR_TT_FLAGS,
  212. /**
  213. * @BATADV_ATTR_FLAG_BEST: Flags indicating entry is the best
  214. */
  215. BATADV_ATTR_FLAG_BEST,
  216. /**
  217. * @BATADV_ATTR_LAST_SEEN_MSECS: Time in milliseconds since last seen
  218. */
  219. BATADV_ATTR_LAST_SEEN_MSECS,
  220. /**
  221. * @BATADV_ATTR_NEIGH_ADDRESS: Neighbour MAC address
  222. */
  223. BATADV_ATTR_NEIGH_ADDRESS,
  224. /**
  225. * @BATADV_ATTR_TQ: TQ to neighbour
  226. */
  227. BATADV_ATTR_TQ,
  228. /**
  229. * @BATADV_ATTR_THROUGHPUT: Estimated throughput to Neighbour
  230. */
  231. BATADV_ATTR_THROUGHPUT,
  232. /**
  233. * @BATADV_ATTR_BANDWIDTH_UP: Reported uplink bandwidth
  234. */
  235. BATADV_ATTR_BANDWIDTH_UP,
  236. /**
  237. * @BATADV_ATTR_BANDWIDTH_DOWN: Reported downlink bandwidth
  238. */
  239. BATADV_ATTR_BANDWIDTH_DOWN,
  240. /**
  241. * @BATADV_ATTR_ROUTER: Gateway router MAC address
  242. */
  243. BATADV_ATTR_ROUTER,
  244. /**
  245. * @BATADV_ATTR_BLA_OWN: Flag indicating own originator
  246. */
  247. BATADV_ATTR_BLA_OWN,
  248. /**
  249. * @BATADV_ATTR_BLA_ADDRESS: Bridge loop avoidance claim MAC address
  250. */
  251. BATADV_ATTR_BLA_ADDRESS,
  252. /**
  253. * @BATADV_ATTR_BLA_VID: BLA VLAN ID
  254. */
  255. BATADV_ATTR_BLA_VID,
  256. /**
  257. * @BATADV_ATTR_BLA_BACKBONE: BLA gateway originator MAC address
  258. */
  259. BATADV_ATTR_BLA_BACKBONE,
  260. /**
  261. * @BATADV_ATTR_BLA_CRC: BLA CRC
  262. */
  263. BATADV_ATTR_BLA_CRC,
  264. /**
  265. * @BATADV_ATTR_DAT_CACHE_IP4ADDRESS: Client IPv4 address
  266. */
  267. BATADV_ATTR_DAT_CACHE_IP4ADDRESS,
  268. /**
  269. * @BATADV_ATTR_DAT_CACHE_HWADDRESS: Client MAC address
  270. */
  271. BATADV_ATTR_DAT_CACHE_HWADDRESS,
  272. /**
  273. * @BATADV_ATTR_DAT_CACHE_VID: VLAN ID
  274. */
  275. BATADV_ATTR_DAT_CACHE_VID,
  276. /**
  277. * @BATADV_ATTR_MCAST_FLAGS: Per originator multicast flags
  278. */
  279. BATADV_ATTR_MCAST_FLAGS,
  280. /**
  281. * @BATADV_ATTR_MCAST_FLAGS_PRIV: Private, own multicast flags
  282. */
  283. BATADV_ATTR_MCAST_FLAGS_PRIV,
  284. /**
  285. * @BATADV_ATTR_VLANID: VLAN id on top of soft interface
  286. */
  287. BATADV_ATTR_VLANID,
  288. /**
  289. * @BATADV_ATTR_AGGREGATED_OGMS_ENABLED: whether the batman protocol
  290. * messages of the mesh interface shall be aggregated or not.
  291. */
  292. BATADV_ATTR_AGGREGATED_OGMS_ENABLED,
  293. /**
  294. * @BATADV_ATTR_AP_ISOLATION_ENABLED: whether the data traffic going
  295. * from a wireless client to another wireless client will be silently
  296. * dropped.
  297. */
  298. BATADV_ATTR_AP_ISOLATION_ENABLED,
  299. /**
  300. * @BATADV_ATTR_ISOLATION_MARK: the isolation mark which is used to
  301. * classify clients as "isolated" by the Extended Isolation feature.
  302. */
  303. BATADV_ATTR_ISOLATION_MARK,
  304. /**
  305. * @BATADV_ATTR_ISOLATION_MASK: the isolation (bit)mask which is used to
  306. * classify clients as "isolated" by the Extended Isolation feature.
  307. */
  308. BATADV_ATTR_ISOLATION_MASK,
  309. /**
  310. * @BATADV_ATTR_BONDING_ENABLED: whether the data traffic going through
  311. * the mesh will be sent using multiple interfaces at the same time.
  312. */
  313. BATADV_ATTR_BONDING_ENABLED,
  314. /**
  315. * @BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED: whether the bridge loop
  316. * avoidance feature is enabled. This feature detects and avoids loops
  317. * between the mesh and devices bridged with the soft interface
  318. */
  319. BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED,
  320. /**
  321. * @BATADV_ATTR_DISTRIBUTED_ARP_TABLE_ENABLED: whether the distributed
  322. * arp table feature is enabled. This feature uses a distributed hash
  323. * table to answer ARP requests without flooding the request through
  324. * the whole mesh.
  325. */
  326. BATADV_ATTR_DISTRIBUTED_ARP_TABLE_ENABLED,
  327. /**
  328. * @BATADV_ATTR_FRAGMENTATION_ENABLED: whether the data traffic going
  329. * through the mesh will be fragmented or silently discarded if the
  330. * packet size exceeds the outgoing interface MTU.
  331. */
  332. BATADV_ATTR_FRAGMENTATION_ENABLED,
  333. /**
  334. * @BATADV_ATTR_GW_BANDWIDTH_DOWN: defines the download bandwidth which
  335. * is propagated by this node if %BATADV_ATTR_GW_BANDWIDTH_MODE was set
  336. * to 'server'.
  337. */
  338. BATADV_ATTR_GW_BANDWIDTH_DOWN,
  339. /**
  340. * @BATADV_ATTR_GW_BANDWIDTH_UP: defines the upload bandwidth which
  341. * is propagated by this node if %BATADV_ATTR_GW_BANDWIDTH_MODE was set
  342. * to 'server'.
  343. */
  344. BATADV_ATTR_GW_BANDWIDTH_UP,
  345. /**
  346. * @BATADV_ATTR_GW_MODE: defines the state of the gateway features.
  347. * Possible values are specified in enum batadv_gw_modes
  348. */
  349. BATADV_ATTR_GW_MODE,
  350. /**
  351. * @BATADV_ATTR_GW_SEL_CLASS: defines the selection criteria this node
  352. * will use to choose a gateway if gw_mode was set to 'client'.
  353. */
  354. BATADV_ATTR_GW_SEL_CLASS,
  355. /**
  356. * @BATADV_ATTR_HOP_PENALTY: defines the penalty which will be applied
  357. * to an originator message's tq-field on every hop and/or per
  358. * hard interface
  359. */
  360. BATADV_ATTR_HOP_PENALTY,
  361. /**
  362. * @BATADV_ATTR_LOG_LEVEL: bitmask with to define which debug messages
  363. * should be send to the debug log/trace ring buffer
  364. */
  365. BATADV_ATTR_LOG_LEVEL,
  366. /**
  367. * @BATADV_ATTR_MULTICAST_FORCEFLOOD_ENABLED: whether multicast
  368. * optimizations should be replaced by simple broadcast-like flooding
  369. * of multicast packets. If set to non-zero then all nodes in the mesh
  370. * are going to use classic flooding for any multicast packet with no
  371. * optimizations.
  372. */
  373. BATADV_ATTR_MULTICAST_FORCEFLOOD_ENABLED,
  374. /**
  375. * @BATADV_ATTR_NETWORK_CODING_ENABLED: whether Network Coding (using
  376. * some magic to send fewer wifi packets but still the same content) is
  377. * enabled or not.
  378. */
  379. BATADV_ATTR_NETWORK_CODING_ENABLED,
  380. /**
  381. * @BATADV_ATTR_ORIG_INTERVAL: defines the interval in milliseconds in
  382. * which batman sends its protocol messages.
  383. */
  384. BATADV_ATTR_ORIG_INTERVAL,
  385. /**
  386. * @BATADV_ATTR_ELP_INTERVAL: defines the interval in milliseconds in
  387. * which batman emits probing packets for neighbor sensing (ELP).
  388. */
  389. BATADV_ATTR_ELP_INTERVAL,
  390. /**
  391. * @BATADV_ATTR_THROUGHPUT_OVERRIDE: defines the throughput value to be
  392. * used by B.A.T.M.A.N. V when estimating the link throughput using
  393. * this interface. If the value is set to 0 then batman-adv will try to
  394. * estimate the throughput by itself.
  395. */
  396. BATADV_ATTR_THROUGHPUT_OVERRIDE,
  397. /**
  398. * @BATADV_ATTR_MULTICAST_FANOUT: defines the maximum number of packet
  399. * copies that may be generated for a multicast-to-unicast conversion.
  400. * Once this limit is exceeded distribution will fall back to broadcast.
  401. */
  402. BATADV_ATTR_MULTICAST_FANOUT,
  403. /* add attributes above here, update the policy in netlink.c */
  404. /**
  405. * @__BATADV_ATTR_AFTER_LAST: internal use
  406. */
  407. __BATADV_ATTR_AFTER_LAST,
  408. /**
  409. * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available
  410. */
  411. NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST,
  412. /**
  413. * @BATADV_ATTR_MAX: highest attribute number currently defined
  414. */
  415. BATADV_ATTR_MAX = __BATADV_ATTR_AFTER_LAST - 1
  416. };
  417. /**
  418. * enum batadv_nl_commands - supported batman-adv netlink commands
  419. */
  420. enum batadv_nl_commands {
  421. /**
  422. * @BATADV_CMD_UNSPEC: unspecified command to catch errors
  423. */
  424. BATADV_CMD_UNSPEC,
  425. /**
  426. * @BATADV_CMD_GET_MESH: Get attributes from softif/mesh
  427. */
  428. BATADV_CMD_GET_MESH,
  429. /**
  430. * @BATADV_CMD_GET_MESH_INFO: Alias for @BATADV_CMD_GET_MESH
  431. */
  432. BATADV_CMD_GET_MESH_INFO = BATADV_CMD_GET_MESH,
  433. /**
  434. * @BATADV_CMD_TP_METER: Start a tp meter session
  435. */
  436. BATADV_CMD_TP_METER,
  437. /**
  438. * @BATADV_CMD_TP_METER_CANCEL: Cancel a tp meter session
  439. */
  440. BATADV_CMD_TP_METER_CANCEL,
  441. /**
  442. * @BATADV_CMD_GET_ROUTING_ALGOS: Query the list of routing algorithms.
  443. */
  444. BATADV_CMD_GET_ROUTING_ALGOS,
  445. /**
  446. * @BATADV_CMD_GET_HARDIF: Get attributes from a hardif of the
  447. * current softif
  448. */
  449. BATADV_CMD_GET_HARDIF,
  450. /**
  451. * @BATADV_CMD_GET_HARDIFS: Alias for @BATADV_CMD_GET_HARDIF
  452. */
  453. BATADV_CMD_GET_HARDIFS = BATADV_CMD_GET_HARDIF,
  454. /**
  455. * @BATADV_CMD_GET_TRANSTABLE_LOCAL: Query list of local translations
  456. */
  457. BATADV_CMD_GET_TRANSTABLE_LOCAL,
  458. /**
  459. * @BATADV_CMD_GET_TRANSTABLE_GLOBAL: Query list of global translations
  460. */
  461. BATADV_CMD_GET_TRANSTABLE_GLOBAL,
  462. /**
  463. * @BATADV_CMD_GET_ORIGINATORS: Query list of originators
  464. */
  465. BATADV_CMD_GET_ORIGINATORS,
  466. /**
  467. * @BATADV_CMD_GET_NEIGHBORS: Query list of neighbours
  468. */
  469. BATADV_CMD_GET_NEIGHBORS,
  470. /**
  471. * @BATADV_CMD_GET_GATEWAYS: Query list of gateways
  472. */
  473. BATADV_CMD_GET_GATEWAYS,
  474. /**
  475. * @BATADV_CMD_GET_BLA_CLAIM: Query list of bridge loop avoidance claims
  476. */
  477. BATADV_CMD_GET_BLA_CLAIM,
  478. /**
  479. * @BATADV_CMD_GET_BLA_BACKBONE: Query list of bridge loop avoidance
  480. * backbones
  481. */
  482. BATADV_CMD_GET_BLA_BACKBONE,
  483. /**
  484. * @BATADV_CMD_GET_DAT_CACHE: Query list of DAT cache entries
  485. */
  486. BATADV_CMD_GET_DAT_CACHE,
  487. /**
  488. * @BATADV_CMD_GET_MCAST_FLAGS: Query list of multicast flags
  489. */
  490. BATADV_CMD_GET_MCAST_FLAGS,
  491. /**
  492. * @BATADV_CMD_SET_MESH: Set attributes for softif/mesh
  493. */
  494. BATADV_CMD_SET_MESH,
  495. /**
  496. * @BATADV_CMD_SET_HARDIF: Set attributes for hardif of the
  497. * current softif
  498. */
  499. BATADV_CMD_SET_HARDIF,
  500. /**
  501. * @BATADV_CMD_GET_VLAN: Get attributes from a VLAN of the
  502. * current softif
  503. */
  504. BATADV_CMD_GET_VLAN,
  505. /**
  506. * @BATADV_CMD_SET_VLAN: Set attributes for VLAN of the
  507. * current softif
  508. */
  509. BATADV_CMD_SET_VLAN,
  510. /* add new commands above here */
  511. /**
  512. * @__BATADV_CMD_AFTER_LAST: internal use
  513. */
  514. __BATADV_CMD_AFTER_LAST,
  515. /**
  516. * @BATADV_CMD_MAX: highest used command number
  517. */
  518. BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1
  519. };
  520. /**
  521. * enum batadv_tp_meter_reason - reason of a tp meter test run stop
  522. */
  523. enum batadv_tp_meter_reason {
  524. /**
  525. * @BATADV_TP_REASON_COMPLETE: sender finished tp run
  526. */
  527. BATADV_TP_REASON_COMPLETE = 3,
  528. /**
  529. * @BATADV_TP_REASON_CANCEL: sender was stopped during run
  530. */
  531. BATADV_TP_REASON_CANCEL = 4,
  532. /* error status >= 128 */
  533. /**
  534. * @BATADV_TP_REASON_DST_UNREACHABLE: receiver could not be reached or
  535. * didn't answer
  536. */
  537. BATADV_TP_REASON_DST_UNREACHABLE = 128,
  538. /**
  539. * @BATADV_TP_REASON_RESEND_LIMIT: (unused) sender retry reached limit
  540. */
  541. BATADV_TP_REASON_RESEND_LIMIT = 129,
  542. /**
  543. * @BATADV_TP_REASON_ALREADY_ONGOING: test to or from the same node
  544. * already ongoing
  545. */
  546. BATADV_TP_REASON_ALREADY_ONGOING = 130,
  547. /**
  548. * @BATADV_TP_REASON_MEMORY_ERROR: test was stopped due to low memory
  549. */
  550. BATADV_TP_REASON_MEMORY_ERROR = 131,
  551. /**
  552. * @BATADV_TP_REASON_CANT_SEND: failed to send via outgoing interface
  553. */
  554. BATADV_TP_REASON_CANT_SEND = 132,
  555. /**
  556. * @BATADV_TP_REASON_TOO_MANY: too many ongoing sessions
  557. */
  558. BATADV_TP_REASON_TOO_MANY = 133,
  559. };
  560. /**
  561. * enum batadv_ifla_attrs - batman-adv ifla nested attributes
  562. */
  563. enum batadv_ifla_attrs {
  564. /**
  565. * @IFLA_BATADV_UNSPEC: unspecified attribute which is not parsed by
  566. * rtnetlink
  567. */
  568. IFLA_BATADV_UNSPEC,
  569. /**
  570. * @IFLA_BATADV_ALGO_NAME: routing algorithm (name) which should be
  571. * used by the newly registered batadv net_device.
  572. */
  573. IFLA_BATADV_ALGO_NAME,
  574. /* add attributes above here, update the policy in soft-interface.c */
  575. /**
  576. * @__IFLA_BATADV_MAX: internal use
  577. */
  578. __IFLA_BATADV_MAX,
  579. };
  580. #define IFLA_BATADV_MAX (__IFLA_BATADV_MAX - 1)
  581. #endif /* _LINUX_BATMAN_ADV_H_ */