1 From: Sven Eckelmann <sven@narfation.org>
2 Date: Fri, 22 Feb 2019 22:19:59 +0100
3 Subject: batctl: Add hop_penalty command
5 Signed-off-by: Sven Eckelmann <sven@narfation.org>
7 diff --git a/Makefile b/Makefile
8 index 4d8b7095a1e307f0dde7660a718e4ad9c6b11102..55105cc754f546891ba2fcaf57dc8b3ac4c22f71 100755
11 @@ -63,6 +63,7 @@ $(eval $(call add_command,event,y))
12 $(eval $(call add_command,fragmentation,y))
13 $(eval $(call add_command,gateways,y))
14 $(eval $(call add_command,gw_mode,y))
15 +$(eval $(call add_command,hop_penalty,y))
16 $(eval $(call add_command,interface,y))
17 $(eval $(call add_command,isolation_mark,y))
18 $(eval $(call add_command,log,y))
19 diff --git a/hop_penalty.c b/hop_penalty.c
21 index 0000000000000000000000000000000000000000..6e6a06a661e2ffbb76793116fb214396523bbd8d
25 +// SPDX-License-Identifier: GPL-2.0
26 +/* Copyright (C) 2009-2019 B.A.T.M.A.N. contributors:
28 + * Marek Lindner <mareklindner@neomailbox.ch>
30 + * This program is free software; you can redistribute it and/or
31 + * modify it under the terms of version 2 of the GNU General Public
32 + * License as published by the Free Software Foundation.
34 + * This program is distributed in the hope that it will be useful, but
35 + * WITHOUT ANY WARRANTY; without even the implied warranty of
36 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
37 + * General Public License for more details.
39 + * You should have received a copy of the GNU General Public License
40 + * along with this program; if not, write to the Free Software
41 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
44 + * License-Filename: LICENSES/preferred/GPL-2.0
52 +static struct settings_data batctl_settings_hop_penalty = {
53 + .sysfs_name = "hop_penalty",
57 +COMMAND_NAMED(SUBCOMMAND, hop_penalty, "hp", handle_sys_setting,
58 + COMMAND_FLAG_MESH_IFACE, &batctl_settings_hop_penalty,
59 + "[penalty] \tdisplay or modify hop_penalty setting");