aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2016-05-09 12:41:08 -0400
committerSimon Wunderlich <sw@simonwunderlich.de>2016-07-04 06:37:17 -0400
commit09748a22f4ab7b0ab5a83c432f6e18f65f18e09b (patch)
tree292aa3df79676ddf2cf06b9d8fb9ae6ea8e376de /include/uapi/linux
parenta2d0816608df1ca69fcdbb9135a2b6df0c65d954 (diff)
batman-adv: add generic netlink family for batman-adv
debugfs is currently severely broken virtually everywhere in the kernel where files are dynamically added and removed (see http://lkml.iu.edu/hypermail/linux/kernel/1506.1/02196.html for some details). In addition to that, debugfs is not namespace-aware. Instead of adding new debugfs entries, the whole infrastructure should be moved to netlink. This will fix the long standing problem of large buffers for debug tables and hard to parse text files. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> Signed-off-by: Andrew Lunn <andrew@lunn.ch> [sven.eckelmann@open-mesh.com: Strip down patch to only add genl family, add missing kerneldoc] 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.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/include/uapi/linux/batman_adv.h b/include/uapi/linux/batman_adv.h
new file mode 100644
index 000000000000..79f797281b87
--- /dev/null
+++ b/include/uapi/linux/batman_adv.h
@@ -0,0 +1,53 @@
1/* Copyright (C) 2016 B.A.T.M.A.N. contributors:
2 *
3 * Matthias Schiffer
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18#ifndef _UAPI_LINUX_BATMAN_ADV_H_
19#define _UAPI_LINUX_BATMAN_ADV_H_
20
21#define BATADV_NL_NAME "batadv"
22
23/**
24 * enum batadv_nl_attrs - batman-adv netlink attributes
25 *
26 * @BATADV_ATTR_UNSPEC: unspecified attribute to catch errors
27 * @__BATADV_ATTR_AFTER_LAST: internal use
28 * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available
29 * @BATADV_ATTR_MAX: highest attribute number currently defined
30 */
31enum batadv_nl_attrs {
32 BATADV_ATTR_UNSPEC,
33 /* add attributes above here, update the policy in netlink.c */
34 __BATADV_ATTR_AFTER_LAST,
35 NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST,
36 BATADV_ATTR_MAX = __BATADV_ATTR_AFTER_LAST - 1
37};
38
39/**
40 * enum batadv_nl_commands - supported batman-adv netlink commands
41 *
42 * @BATADV_CMD_UNSPEC: unspecified command to catch errors
43 * @__BATADV_CMD_AFTER_LAST: internal use
44 * @BATADV_CMD_MAX: highest used command number
45 */
46enum batadv_nl_commands {
47 BATADV_CMD_UNSPEC,
48 /* add new commands above here */
49 __BATADV_CMD_AFTER_LAST,
50 BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1
51};
52
53#endif /* _UAPI_LINUX_BATMAN_ADV_H_ */