Repository : ssh://git@open-mesh.org/batctl
On branch : master
commit be1b94761c518eca7e4a917a9e94f06ec25b5b76 Author: Sven Eckelmann sven@narfation.org Date: Thu Oct 25 18:22:35 2018 +0200
batctl: Move distributed_arp_table setting to own file
The sysfs settings are planned to get also be implemented in netlink. To avoid cluttering up netlink.c again, it should be stored in a separate file. This also allows to order the usage lines using the Makefile.
Signed-off-by: Sven Eckelmann sven@narfation.org
be1b94761c518eca7e4a917a9e94f06ec25b5b76 Makefile | 1 + ap_isolation.c => distributed_arp_table.c | 10 +++++----- sys.c | 9 --------- 3 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/Makefile b/Makefile index 6664aa0..9cbef82 100755 --- a/Makefile +++ b/Makefile @@ -42,6 +42,7 @@ OBJ += claimtable.o OBJ += dat_cache.o OBJ += debugfs.o OBJ += debug.o +OBJ += distributed_arp_table.o OBJ += functions.o OBJ += gateways.o OBJ += genl.o diff --git a/ap_isolation.c b/distributed_arp_table.c similarity index 74% copy from ap_isolation.c copy to distributed_arp_table.c index 2d16c68..ba6e5b7 100644 --- a/ap_isolation.c +++ b/distributed_arp_table.c @@ -23,11 +23,11 @@ #include "main.h" #include "sys.h"
-static struct settings_data batctl_settings_ap_isolation = { - .sysfs_name = "ap_isolation", +static struct settings_data batctl_settings_distributed_arp_table = { + .sysfs_name = SYS_DAT, .params = sysfs_param_enable, };
-COMMAND_NAMED(SUBCOMMAND, ap_isolation, "ap", handle_sys_setting, - COMMAND_FLAG_MESH_IFACE, &batctl_settings_ap_isolation, - "[0|1] \tdisplay or modify ap_isolation setting"); +COMMAND_NAMED(SUBCOMMAND, distributed_arp_table, "dat", handle_sys_setting, + COMMAND_FLAG_MESH_IFACE, &batctl_settings_distributed_arp_table, + "[0|1] \tdisplay or modify distributed_arp_table setting"); diff --git a/sys.c b/sys.c index e08738d..9ce7a90 100644 --- a/sys.c +++ b/sys.c @@ -146,15 +146,6 @@ COMMAND_NAMED(SUBCOMMAND, orig_interval, "it", handle_sys_setting, COMMAND_FLAG_MESH_IFACE, &batctl_settings_orig_interval, "[interval] \tdisplay or modify orig_interval setting");
-static struct settings_data batctl_settings_distributed_arp_table = { - .sysfs_name = SYS_DAT, - .params = sysfs_param_enable, -}; - -COMMAND_NAMED(SUBCOMMAND, distributed_arp_table, "dat", handle_sys_setting, - COMMAND_FLAG_MESH_IFACE, &batctl_settings_distributed_arp_table, - "[0|1] \tdisplay or modify distributed_arp_table setting"); - static struct settings_data batctl_settings_fragmentation = { .sysfs_name = "fragmentation", .params = sysfs_param_enable,