aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio.quartulli@open-mesh.com>2016-05-05 07:09:43 -0400
committerSimon Wunderlich <sw@simonwunderlich.de>2016-07-04 06:37:18 -0400
commit33a3bb4a3345bb511f9c69c913da95d4693e2a4e (patch)
tree45ad5212db48b55eef6567ea69245fdaa40f1ea7 /include/uapi/linux
parentf50ca95a691e9fd1fce530aade58c98d621cb1fe (diff)
batman-adv: throughput meter implementation
The throughput meter module is a simple, kernel-space replacement for throughtput measurements tool like iperf and netperf. It is intended to approximate TCP behaviour. It is invoked through batctl: the protocol is connection oriented, with cumulative acknowledgment and a dynamic-size sliding window. The test *can* be interrupted by batctl. A receiver side timeout avoids unlimited waitings for sender packets: after one second of inactivity, the receiver abort the ongoing test. Based on a prototype from Edo Monticelli <montik@autistici.org> Signed-off-by: Antonio Quartulli <antonio.quartulli@open-mesh.com> Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/batman_adv.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/uapi/linux/batman_adv.h b/include/uapi/linux/batman_adv.h
index c39623c7109e..0fbf6fd4711b 100644
--- a/include/uapi/linux/batman_adv.h
+++ b/include/uapi/linux/batman_adv.h
@@ -20,6 +20,8 @@
20 20
21#define BATADV_NL_NAME "batadv" 21#define BATADV_NL_NAME "batadv"
22 22
23#define BATADV_NL_MCAST_GROUP_TPMETER "tpmeter"
24
23/** 25/**
24 * enum batadv_nl_attrs - batman-adv netlink attributes 26 * enum batadv_nl_attrs - batman-adv netlink attributes
25 * 27 *
@@ -32,6 +34,12 @@
32 * @BATADV_ATTR_HARD_IFINDEX: index of the non-batman-adv interface 34 * @BATADV_ATTR_HARD_IFINDEX: index of the non-batman-adv interface
33 * @BATADV_ATTR_HARD_IFNAME: name of the non-batman-adv interface 35 * @BATADV_ATTR_HARD_IFNAME: name of the non-batman-adv interface
34 * @BATADV_ATTR_HARD_ADDRESS: mac address of the non-batman-adv interface 36 * @BATADV_ATTR_HARD_ADDRESS: mac address of the non-batman-adv interface
37 * @BATADV_ATTR_ORIG_ADDRESS: originator mac address
38 * @BATADV_ATTR_TPMETER_RESULT: result of run (see batadv_tp_meter_status)
39 * @BATADV_ATTR_TPMETER_TEST_TIME: time (msec) the run took
40 * @BATADV_ATTR_TPMETER_BYTES: amount of acked bytes during run
41 * @BATADV_ATTR_TPMETER_COOKIE: session cookie to match tp_meter session
42 * @BATADV_ATTR_PAD: attribute used for padding for 64-bit alignment
35 * @__BATADV_ATTR_AFTER_LAST: internal use 43 * @__BATADV_ATTR_AFTER_LAST: internal use
36 * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available 44 * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available
37 * @BATADV_ATTR_MAX: highest attribute number currently defined 45 * @BATADV_ATTR_MAX: highest attribute number currently defined
@@ -46,6 +54,12 @@ enum batadv_nl_attrs {
46 BATADV_ATTR_HARD_IFINDEX, 54 BATADV_ATTR_HARD_IFINDEX,
47 BATADV_ATTR_HARD_IFNAME, 55 BATADV_ATTR_HARD_IFNAME,
48 BATADV_ATTR_HARD_ADDRESS, 56 BATADV_ATTR_HARD_ADDRESS,
57 BATADV_ATTR_ORIG_ADDRESS,
58 BATADV_ATTR_TPMETER_RESULT,
59 BATADV_ATTR_TPMETER_TEST_TIME,
60 BATADV_ATTR_TPMETER_BYTES,
61 BATADV_ATTR_TPMETER_COOKIE,
62 BATADV_ATTR_PAD,
49 /* add attributes above here, update the policy in netlink.c */ 63 /* add attributes above here, update the policy in netlink.c */
50 __BATADV_ATTR_AFTER_LAST, 64 __BATADV_ATTR_AFTER_LAST,
51 NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST, 65 NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST,
@@ -57,15 +71,44 @@ enum batadv_nl_attrs {
57 * 71 *
58 * @BATADV_CMD_UNSPEC: unspecified command to catch errors 72 * @BATADV_CMD_UNSPEC: unspecified command to catch errors
59 * @BATADV_CMD_GET_MESH_INFO: Query basic information about batman-adv device 73 * @BATADV_CMD_GET_MESH_INFO: Query basic information about batman-adv device
74 * @BATADV_CMD_TP_METER: Start a tp meter session
75 * @BATADV_CMD_TP_METER_CANCEL: Cancel a tp meter session
60 * @__BATADV_CMD_AFTER_LAST: internal use 76 * @__BATADV_CMD_AFTER_LAST: internal use
61 * @BATADV_CMD_MAX: highest used command number 77 * @BATADV_CMD_MAX: highest used command number
62 */ 78 */
63enum batadv_nl_commands { 79enum batadv_nl_commands {
64 BATADV_CMD_UNSPEC, 80 BATADV_CMD_UNSPEC,
65 BATADV_CMD_GET_MESH_INFO, 81 BATADV_CMD_GET_MESH_INFO,
82 BATADV_CMD_TP_METER,
83 BATADV_CMD_TP_METER_CANCEL,
66 /* add new commands above here */ 84 /* add new commands above here */
67 __BATADV_CMD_AFTER_LAST, 85 __BATADV_CMD_AFTER_LAST,
68 BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1 86 BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1
69}; 87};
70 88
89/**
90 * enum batadv_tp_meter_reason - reason of a tp meter test run stop
91 * @BATADV_TP_REASON_COMPLETE: sender finished tp run
92 * @BATADV_TP_REASON_CANCEL: sender was stopped during run
93 * @BATADV_TP_REASON_DST_UNREACHABLE: receiver could not be reached or didn't
94 * answer
95 * @BATADV_TP_REASON_RESEND_LIMIT: (unused) sender retry reached limit
96 * @BATADV_TP_REASON_ALREADY_ONGOING: test to or from the same node already
97 * ongoing
98 * @BATADV_TP_REASON_MEMORY_ERROR: test was stopped due to low memory
99 * @BATADV_TP_REASON_CANT_SEND: failed to send via outgoing interface
100 * @BATADV_TP_REASON_TOO_MANY: too many ongoing sessions
101 */
102enum batadv_tp_meter_reason {
103 BATADV_TP_REASON_COMPLETE = 3,
104 BATADV_TP_REASON_CANCEL = 4,
105 /* error status >= 128 */
106 BATADV_TP_REASON_DST_UNREACHABLE = 128,
107 BATADV_TP_REASON_RESEND_LIMIT = 129,
108 BATADV_TP_REASON_ALREADY_ONGOING = 130,
109 BATADV_TP_REASON_MEMORY_ERROR = 131,
110 BATADV_TP_REASON_CANT_SEND = 132,
111 BATADV_TP_REASON_TOO_MANY = 133,
112};
113
71#endif /* _UAPI_LINUX_BATMAN_ADV_H_ */ 114#endif /* _UAPI_LINUX_BATMAN_ADV_H_ */