This adds the commands BATADV_CMD_GET_TRANSTABLE_LOCAL and BATADV_CMD_GET_TRANSTABLE_GLOBAL, which correspond to the transtable_local and transtable_global debugfs files. The batadv_tt_client_flags enum is moved to the UAPI to expose it as part of the netlink API.
Showing the changes to include/uapi/linux (1 of 6 files). Show all
Unified · Split
| @@ -22,6 +22,42 @@ · 21 unmodified lines | |||
| 22 | 22 | ||
| 23 | #define BATADV_NL_MCAST_GROUP_TPMETER "tpmeter" | 23 | #define BATADV_NL_MCAST_GROUP_TPMETER "tpmeter" |
| 24 | 24 | ||
| 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 | |||
| 25 | /** | 61 | /** |
| 26 | * enum batadv_nl_attrs - batman-adv netlink attributes | 62 | * enum batadv_nl_attrs - batman-adv netlink attributes |
| 27 | * | 63 | * |
| @@ -41,6 +77,14 @@ · 13 unmodified lines | |||
| 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 |
| 43 | * @BATADV_ATTR_ACTIVE: Flag indicating if the hard interface is active | 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 | ||
| 44 | * @__BATADV_ATTR_AFTER_LAST: internal use | 88 | * @__BATADV_ATTR_AFTER_LAST: internal use |
| 45 | * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available | 89 | * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available |
| 46 | * @BATADV_ATTR_MAX: highest attribute number currently defined | 90 | * @BATADV_ATTR_MAX: highest attribute number currently defined |
| @@ -62,6 +106,14 @@ enum batadv_nl_attrs { · 15 unmodified lines | |||
| 62 | BATADV_ATTR_TPMETER_COOKIE, | 106 | BATADV_ATTR_TPMETER_COOKIE, |
| 63 | BATADV_ATTR_PAD, | 107 | BATADV_ATTR_PAD, |
| 64 | BATADV_ATTR_ACTIVE, | 108 | BATADV_ATTR_ACTIVE, |
| 109 | BATADV_ATTR_TT_ADDRESS, | ||
| 110 | BATADV_ATTR_TT_TTVN, | ||
| 111 | BATADV_ATTR_TT_LAST_TTVN, | ||
| 112 | BATADV_ATTR_TT_CRC32, | ||
| 113 | BATADV_ATTR_TT_VID, | ||
| 114 | BATADV_ATTR_TT_FLAGS, | ||
| 115 | BATADV_ATTR_FLAG_BEST, | ||
| 116 | BATADV_ATTR_LAST_SEEN_MSECS, | ||
| 65 | /* add attributes above here, update the policy in netlink.c */ | 117 | /* add attributes above here, update the policy in netlink.c */ |
| 66 | __BATADV_ATTR_AFTER_LAST, | 118 | __BATADV_ATTR_AFTER_LAST, |
| 67 | NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST, | 119 | NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST, |
| @@ -77,6 +129,8 @@ enum batadv_nl_attrs { · 9 unmodified lines | |||
| 77 | * @BATADV_CMD_TP_METER_CANCEL: Cancel a tp meter session | 129 | * @BATADV_CMD_TP_METER_CANCEL: Cancel a tp meter session |
| 78 | * @BATADV_CMD_GET_ROUTING_ALGOS: Query the list of routing algorithms. | 130 | * @BATADV_CMD_GET_ROUTING_ALGOS: Query the list of routing algorithms. |
| 79 | * @BATADV_CMD_GET_HARDIFS: Query list of hard interfaces | 131 | * @BATADV_CMD_GET_HARDIFS: Query list of hard interfaces |
| 132 | * @BATADV_CMD_GET_TRANSTABLE_LOCAL: Query list of local translations | ||
| 133 | * @BATADV_CMD_GET_TRANSTABLE_GLOBAL Query list of global translations | ||
| 80 | * @__BATADV_CMD_AFTER_LAST: internal use | 134 | * @__BATADV_CMD_AFTER_LAST: internal use |
| 81 | * @BATADV_CMD_MAX: highest used command number | 135 | * @BATADV_CMD_MAX: highest used command number |
| 82 | */ | 136 | */ |
| @@ -87,6 +141,8 @@ enum batadv_nl_commands { · 4 unmodified lines | |||
| 87 | BATADV_CMD_TP_METER_CANCEL, | 141 | BATADV_CMD_TP_METER_CANCEL, |
| 88 | BATADV_CMD_GET_ROUTING_ALGOS, | 142 | BATADV_CMD_GET_ROUTING_ALGOS, |
| 89 | BATADV_CMD_GET_HARDIFS, | 143 | BATADV_CMD_GET_HARDIFS, |
| 144 | BATADV_CMD_GET_TRANSTABLE_LOCAL, | ||
| 145 | BATADV_CMD_GET_TRANSTABLE_GLOBAL, | ||
| 90 | /* add new commands above here */ | 146 | /* add new commands above here */ |
| 91 | __BATADV_CMD_AFTER_LAST, | 147 | __BATADV_CMD_AFTER_LAST, |
| 92 | BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1 | 148 | BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1 |