The other commands are stored in separate files and nc_nodes might also
receive a netlink implementation. The latter would increase the complexity
significantly and thus justify that the command is also added via an extra
file.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
Makefile | 1 +
debug.c | 8 --------
nc_nodes.c | 32 ++++++++++++++++++++++++++++++++
3 files changed, 33 insertions(+), 8 deletions(-)
create mode 100644 nc_nodes.c
@@ -49,6 +49,7 @@ OBJ += loglevel.o
OBJ += log.o
OBJ += main.o
OBJ += mcast_flags.o
+OBJ += nc_nodes.o
OBJ += netlink.o
OBJ += ping.o
OBJ += routing_algo.o
@@ -241,11 +241,3 @@ static struct debug_table_data batctl_debug_table_transglobal = {
COMMAND_NAMED(DEBUGTABLE, transglobal, "tg", handle_debug_table,
COMMAND_FLAG_MESH_IFACE, &batctl_debug_table_transglobal, "");
-
-static struct debug_table_data batctl_debug_table_nc_nodes = {
- .debugfs_name = DEBUG_NC_NODES,
- .header_lines = 0,
-};
-
-COMMAND_NAMED(DEBUGTABLE, nc_nodes, "nn", handle_debug_table,
- COMMAND_FLAG_MESH_IFACE, &batctl_debug_table_nc_nodes, "");
new file mode 100644
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0
+/* Copyright (C) 2009-2018 B.A.T.M.A.N. contributors:
+ *
+ * Marek Lindner <mareklindner@neomailbox.ch>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA
+ *
+ * License-Filename: LICENSES/preferred/GPL-2.0
+ */
+
+#include "debug.h"
+#include "main.h"
+
+static struct debug_table_data batctl_debug_table_nc_nodes = {
+ .debugfs_name = DEBUG_NC_NODES,
+ .header_lines = 0,
+};
+
+COMMAND_NAMED(DEBUGTABLE, nc_nodes, "nn", handle_debug_table,
+ COMMAND_FLAG_MESH_IFACE, &batctl_debug_table_nc_nodes, "");