diff options
| author | David S. Miller <davem@davemloft.net> | 2016-08-17 19:22:13 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-08-17 19:22:13 -0400 |
| commit | 00062a934b7d0c6c5a1a4d774abdba6ebf3af81e (patch) | |
| tree | 5319fbee0cf656f4d6af6af6fc56c2aa8a9ac306 /include/uapi/linux | |
| parent | 268ef4b78ca48de269dbdaaab0c7a33e853ab2fd (diff) | |
| parent | 4c09a08b47ffac9aa3bc91870aa54c9ae39d9674 (diff) | |
Merge tag 'batadv-next-for-davem-20160816' of git://git.open-mesh.org/linux-merge
Simon Wunderlich says:
====================
pull request for net-next: batman-adv 2016-08-16
This feature patchset is all about adding netlink support, which should
supersede our debugfs configuration interface in the long run. It is
especially necessary when batman-adv should be used in different
namespaces, since debugfs can not differentiate between those.
More specifically, the following changes are included:
- Two fixes for namespace handling by Andrew Lunn, checking also the
namespaces for parent interfaces, and supress debugfs entries
for non-default netns
- Implement various netlink commands for the new interface, by
Matthias Schiffer, Andrew Lunn, Sven Eckelmann and Simon Wunderlich
(13 patches):
* routing algorithm list
* hardif list
* translation tables (local and global)
* TTVN for the translation tables
* originator and neighbor tables for B.A.T.M.A.N. IV
and B.A.T.M.A.N. V
* gateway dump functionality for B.A.T.M.A.N. IV
and B.A.T.M.A.N. V
* Bridge Loop Avoidance claims, and corresponding BLA group
* Bridge Loop Avoidance backbone tables
- Finally, mark batman-adv as netns compatible, by Andrew Lunn (1 patch)
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/batman_adv.h | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/include/uapi/linux/batman_adv.h b/include/uapi/linux/batman_adv.h index 0fbf6fd4711b..734fe83ab645 100644 --- a/include/uapi/linux/batman_adv.h +++ b/include/uapi/linux/batman_adv.h | |||
| @@ -23,6 +23,42 @@ | |||
| 23 | #define BATADV_NL_MCAST_GROUP_TPMETER "tpmeter" | 23 | #define BATADV_NL_MCAST_GROUP_TPMETER "tpmeter" |
| 24 | 24 | ||
| 25 | /** | 25 | /** |
| 26 | * enum batadv_tt_client_flags - TT client specific flags | ||
| 27 | * @BATADV_TT_CLIENT_DEL: the client has to be deleted from the table | ||
| 28 | * @BATADV_TT_CLIENT_ROAM: the client roamed to/from another node and the new | ||
| 29 | * update telling its new real location has not been received/sent yet | ||
| 30 | * @BATADV_TT_CLIENT_WIFI: this client is connected through a wifi interface. | ||
| 31 | * This information is used by the "AP Isolation" feature | ||
| 32 | * @BATADV_TT_CLIENT_ISOLA: this client is considered "isolated". This | ||
| 33 | * information is used by the Extended Isolation feature | ||
| 34 | * @BATADV_TT_CLIENT_NOPURGE: this client should never be removed from the table | ||
| 35 | * @BATADV_TT_CLIENT_NEW: this client has been added to the local table but has | ||
| 36 | * not been announced yet | ||
| 37 | * @BATADV_TT_CLIENT_PENDING: this client is marked for removal but it is kept | ||
| 38 | * in the table for one more originator interval for consistency purposes | ||
| 39 | * @BATADV_TT_CLIENT_TEMP: this global client has been detected to be part of | ||
| 40 | * the network but no nnode has already announced it | ||
| 41 | * | ||
| 42 | * Bits from 0 to 7 are called _remote flags_ because they are sent on the wire. | ||
| 43 | * Bits from 8 to 15 are called _local flags_ because they are used for local | ||
| 44 | * computations only. | ||
| 45 | * | ||
| 46 | * Bits from 4 to 7 - a subset of remote flags - are ensured to be in sync with | ||
| 47 | * the other nodes in the network. To achieve this goal these flags are included | ||
| 48 | * in the TT CRC computation. | ||
| 49 | */ | ||
| 50 | enum batadv_tt_client_flags { | ||
| 51 | BATADV_TT_CLIENT_DEL = (1 << 0), | ||
| 52 | BATADV_TT_CLIENT_ROAM = (1 << 1), | ||
| 53 | BATADV_TT_CLIENT_WIFI = (1 << 4), | ||
| 54 | BATADV_TT_CLIENT_ISOLA = (1 << 5), | ||
| 55 | BATADV_TT_CLIENT_NOPURGE = (1 << 8), | ||
| 56 | BATADV_TT_CLIENT_NEW = (1 << 9), | ||
| 57 | BATADV_TT_CLIENT_PENDING = (1 << 10), | ||
| 58 | BATADV_TT_CLIENT_TEMP = (1 << 11), | ||
| 59 | }; | ||
| 60 | |||
| 61 | /** | ||
| 26 | * enum batadv_nl_attrs - batman-adv netlink attributes | 62 | * enum batadv_nl_attrs - batman-adv netlink attributes |
| 27 | * | 63 | * |
| 28 | * @BATADV_ATTR_UNSPEC: unspecified attribute to catch errors | 64 | * @BATADV_ATTR_UNSPEC: unspecified attribute to catch errors |
| @@ -40,6 +76,26 @@ | |||
| 40 | * @BATADV_ATTR_TPMETER_BYTES: amount of acked bytes during run | 76 | * @BATADV_ATTR_TPMETER_BYTES: amount of acked bytes during run |
| 41 | * @BATADV_ATTR_TPMETER_COOKIE: session cookie to match tp_meter session | 77 | * @BATADV_ATTR_TPMETER_COOKIE: session cookie to match tp_meter session |
| 42 | * @BATADV_ATTR_PAD: attribute used for padding for 64-bit alignment | 78 | * @BATADV_ATTR_PAD: attribute used for padding for 64-bit alignment |
| 79 | * @BATADV_ATTR_ACTIVE: Flag indicating if the hard interface is active | ||
| 80 | * @BATADV_ATTR_TT_ADDRESS: Client MAC address | ||
| 81 | * @BATADV_ATTR_TT_TTVN: Translation table version | ||
| 82 | * @BATADV_ATTR_TT_LAST_TTVN: Previous translation table version | ||
| 83 | * @BATADV_ATTR_TT_CRC32: CRC32 over translation table | ||
| 84 | * @BATADV_ATTR_TT_VID: VLAN ID | ||
| 85 | * @BATADV_ATTR_TT_FLAGS: Translation table client flags | ||
| 86 | * @BATADV_ATTR_FLAG_BEST: Flags indicating entry is the best | ||
| 87 | * @BATADV_ATTR_LAST_SEEN_MSECS: Time in milliseconds since last seen | ||
| 88 | * @BATADV_ATTR_NEIGH_ADDRESS: Neighbour MAC address | ||
| 89 | * @BATADV_ATTR_TQ: TQ to neighbour | ||
| 90 | * @BATADV_ATTR_THROUGHPUT: Estimated throughput to Neighbour | ||
| 91 | * @BATADV_ATTR_BANDWIDTH_UP: Reported uplink bandwidth | ||
| 92 | * @BATADV_ATTR_BANDWIDTH_DOWN: Reported downlink bandwidth | ||
| 93 | * @BATADV_ATTR_ROUTER: Gateway router MAC address | ||
| 94 | * @BATADV_ATTR_BLA_OWN: Flag indicating own originator | ||
| 95 | * @BATADV_ATTR_BLA_ADDRESS: Bridge loop avoidance claim MAC address | ||
| 96 | * @BATADV_ATTR_BLA_VID: BLA VLAN ID | ||
| 97 | * @BATADV_ATTR_BLA_BACKBONE: BLA gateway originator MAC address | ||
| 98 | * @BATADV_ATTR_BLA_CRC: BLA CRC | ||
| 43 | * @__BATADV_ATTR_AFTER_LAST: internal use | 99 | * @__BATADV_ATTR_AFTER_LAST: internal use |
| 44 | * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available | 100 | * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available |
| 45 | * @BATADV_ATTR_MAX: highest attribute number currently defined | 101 | * @BATADV_ATTR_MAX: highest attribute number currently defined |
| @@ -60,6 +116,26 @@ enum batadv_nl_attrs { | |||
| 60 | BATADV_ATTR_TPMETER_BYTES, | 116 | BATADV_ATTR_TPMETER_BYTES, |
| 61 | BATADV_ATTR_TPMETER_COOKIE, | 117 | BATADV_ATTR_TPMETER_COOKIE, |
| 62 | BATADV_ATTR_PAD, | 118 | BATADV_ATTR_PAD, |
| 119 | BATADV_ATTR_ACTIVE, | ||
| 120 | BATADV_ATTR_TT_ADDRESS, | ||
| 121 | BATADV_ATTR_TT_TTVN, | ||
| 122 | BATADV_ATTR_TT_LAST_TTVN, | ||
| 123 | BATADV_ATTR_TT_CRC32, | ||
| 124 | BATADV_ATTR_TT_VID, | ||
| 125 | BATADV_ATTR_TT_FLAGS, | ||
| 126 | BATADV_ATTR_FLAG_BEST, | ||
| 127 | BATADV_ATTR_LAST_SEEN_MSECS, | ||
| 128 | BATADV_ATTR_NEIGH_ADDRESS, | ||
| 129 | BATADV_ATTR_TQ, | ||
| 130 | BATADV_ATTR_THROUGHPUT, | ||
| 131 | BATADV_ATTR_BANDWIDTH_UP, | ||
| 132 | BATADV_ATTR_BANDWIDTH_DOWN, | ||
| 133 | BATADV_ATTR_ROUTER, | ||
| 134 | BATADV_ATTR_BLA_OWN, | ||
| 135 | BATADV_ATTR_BLA_ADDRESS, | ||
| 136 | BATADV_ATTR_BLA_VID, | ||
| 137 | BATADV_ATTR_BLA_BACKBONE, | ||
| 138 | BATADV_ATTR_BLA_CRC, | ||
| 63 | /* add attributes above here, update the policy in netlink.c */ | 139 | /* add attributes above here, update the policy in netlink.c */ |
| 64 | __BATADV_ATTR_AFTER_LAST, | 140 | __BATADV_ATTR_AFTER_LAST, |
| 65 | NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST, | 141 | NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST, |
| @@ -73,6 +149,15 @@ enum batadv_nl_attrs { | |||
| 73 | * @BATADV_CMD_GET_MESH_INFO: Query basic information about batman-adv device | 149 | * @BATADV_CMD_GET_MESH_INFO: Query basic information about batman-adv device |
| 74 | * @BATADV_CMD_TP_METER: Start a tp meter session | 150 | * @BATADV_CMD_TP_METER: Start a tp meter session |
| 75 | * @BATADV_CMD_TP_METER_CANCEL: Cancel a tp meter session | 151 | * @BATADV_CMD_TP_METER_CANCEL: Cancel a tp meter session |
| 152 | * @BATADV_CMD_GET_ROUTING_ALGOS: Query the list of routing algorithms. | ||
| 153 | * @BATADV_CMD_GET_HARDIFS: Query list of hard interfaces | ||
| 154 | * @BATADV_CMD_GET_TRANSTABLE_LOCAL: Query list of local translations | ||
| 155 | * @BATADV_CMD_GET_TRANSTABLE_GLOBAL Query list of global translations | ||
| 156 | * @BATADV_CMD_GET_ORIGINATORS: Query list of originators | ||
| 157 | * @BATADV_CMD_GET_NEIGHBORS: Query list of neighbours | ||
| 158 | * @BATADV_CMD_GET_GATEWAYS: Query list of gateways | ||
| 159 | * @BATADV_CMD_GET_BLA_CLAIM: Query list of bridge loop avoidance claims | ||
| 160 | * @BATADV_CMD_GET_BLA_BACKBONE: Query list of bridge loop avoidance backbones | ||
| 76 | * @__BATADV_CMD_AFTER_LAST: internal use | 161 | * @__BATADV_CMD_AFTER_LAST: internal use |
| 77 | * @BATADV_CMD_MAX: highest used command number | 162 | * @BATADV_CMD_MAX: highest used command number |
| 78 | */ | 163 | */ |
| @@ -81,6 +166,15 @@ enum batadv_nl_commands { | |||
| 81 | BATADV_CMD_GET_MESH_INFO, | 166 | BATADV_CMD_GET_MESH_INFO, |
| 82 | BATADV_CMD_TP_METER, | 167 | BATADV_CMD_TP_METER, |
| 83 | BATADV_CMD_TP_METER_CANCEL, | 168 | BATADV_CMD_TP_METER_CANCEL, |
| 169 | BATADV_CMD_GET_ROUTING_ALGOS, | ||
| 170 | BATADV_CMD_GET_HARDIFS, | ||
| 171 | BATADV_CMD_GET_TRANSTABLE_LOCAL, | ||
| 172 | BATADV_CMD_GET_TRANSTABLE_GLOBAL, | ||
| 173 | BATADV_CMD_GET_ORIGINATORS, | ||
| 174 | BATADV_CMD_GET_NEIGHBORS, | ||
| 175 | BATADV_CMD_GET_GATEWAYS, | ||
| 176 | BATADV_CMD_GET_BLA_CLAIM, | ||
| 177 | BATADV_CMD_GET_BLA_BACKBONE, | ||
| 84 | /* add new commands above here */ | 178 | /* add new commands above here */ |
| 85 | __BATADV_CMD_AFTER_LAST, | 179 | __BATADV_CMD_AFTER_LAST, |
| 86 | BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1 | 180 | BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1 |
