From patchwork Thu Oct 25 16:22:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 17576 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id B337F831CC; Thu, 25 Oct 2018 18:23:56 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=narfation.org header.i=@narfation.org header.b="TR43s/Ny"; dkim-atps=neutral Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=79.140.41.39; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver= Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id DBFFD8312E for ; Thu, 25 Oct 2018 18:23:25 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p200300C593D355EE7FED32DEE9F3DCBB.dip0.t-ipconnect.de [IPv6:2003:c5:93d3:55ee:7fed:32de:e9f3:dcbb]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id AD4C11100DC; Thu, 25 Oct 2018 18:23:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1540484603; bh=bkPdPHirxD/KbHsY8z3+jrWrRjFcR6Q9a9Vne2zXqi8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TR43s/NyDdif3NV+AaRhaG6VvPjx84cbKvr36WYDEnwpK2kZlb0B0Tue/cgB+FtLH MRuswmUc//jHIwoQS1lw7EdJPPU6b1KyVafDGtOc6rwxVGtVRFwid73N5bqi6YKSP7 edowgsZ0IOAw+4wWX9Bwxb6a7mCqXNqwFcAoYo+I= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Thu, 25 Oct 2018 18:22:26 +0200 Message-Id: <20181025162245.19389-24-sven@narfation.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181025162245.19389-1-sven@narfation.org> References: <20181025162245.19389-1-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH v3 23/42] batctl: Move nc_nodes debug table to own file X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" 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 --- Makefile | 1 + debug.c | 8 -------- nc_nodes.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 8 deletions(-) create mode 100644 nc_nodes.c diff --git a/Makefile b/Makefile index a725986..ac4824b 100755 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/debug.c b/debug.c index 4b480a3..531c6aa 100644 --- a/debug.c +++ b/debug.c @@ -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, ""); diff --git a/nc_nodes.c b/nc_nodes.c new file mode 100644 index 0000000..9cf437d --- /dev/null +++ b/nc_nodes.c @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0 +/* Copyright (C) 2009-2018 B.A.T.M.A.N. contributors: + * + * Marek Lindner + * + * 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, "");