From patchwork Sun Mar 2 22:18:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Linus_L=C3=BCssing?= X-Patchwork-Id: 3897 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=212.227.15.3; helo=mout.web.de; envelope-from=linus.luessing@web.de; receiver=b.a.t.m.a.n@lists.open-mesh.org Received: from mout.web.de (mout.web.de [212.227.15.3]) by open-mesh.org (Postfix) with ESMTPS id E0BA160219C for ; Sun, 2 Mar 2014 23:18:15 +0100 (CET) Received: from localhost ([95.211.10.3]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0LgYSP-1WyV8d0A6P-00o2Z7 for ; Sun, 02 Mar 2014 23:18:15 +0100 From: =?UTF-8?q?Linus=20L=C3=BCssing?= To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 2 Mar 2014 23:18:01 +0100 Message-Id: <1393798682-7703-3-git-send-email-linus.luessing@web.de> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1393798682-7703-1-git-send-email-linus.luessing@web.de> References: <1393798682-7703-1-git-send-email-linus.luessing@web.de> MIME-Version: 1.0 X-Provags-ID: V03:K0:cwv97ksyhahsYNlDgCYc2zFId7HuaGVluqJDtqbOOOLe9mZSJfs jKe3xeEuFb1n1hMR+I8G7O6esS/HE6GKJSFStxD2Jd67spHlAqcUounVczsCxrl13s+hCDn A9n5x/vsHd0pYcmDqO3/C74uZ7Ydu1kQmfcgzyBG693d5NZimRR/Zp9Y/lEiah0xqWv+vFN gckRl3TokdlAdXxoYEkIQ== Subject: [B.A.T.M.A.N.] [PATCHv2 2/3] batctl: add switch for setting multicast_mode X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 22:18:16 -0000 This patch adds a switch for the new multicast_mode setting in batman-adv. Signed-off-by: Linus Lüssing --- README | 7 +++++++ man/batctl.8 | 4 ++++ sys.c | 6 ++++++ sys.h | 1 + 4 files changed, 18 insertions(+) diff --git a/README b/README index 5af95c8..69c7a07 100644 --- a/README +++ b/README @@ -392,6 +392,13 @@ Usage: batctl network_coding|nc [0|1] Note that network coding requires a working promiscuous mode on all interfaces. +batctl multicast_mode +===================== + +display or modify the multicast mode setting + +Usage: batctl multicast_mode|mm [0|1] + batctl aggregation ================== diff --git a/man/batctl.8 b/man/batctl.8 index 2fe5941..a8e8868 100644 --- a/man/batctl.8 +++ b/man/batctl.8 @@ -88,6 +88,10 @@ disable fragmentation. If no parameter is given the current network coding mode setting is displayed. Otherwise the parameter is used to enable or disable network coding. .br +.IP "\fBmulticast_mode\fP|\fBmm\fP [\fB0\fP|\fB1\fP]" +If no parameter is given the current multicast mode setting is displayed. Otherwise the parameter is used to enable or +disable multicast optimizations (i.e. disabling means always sending own multicast frames via classic flooding). +.br .IP "\fBloglevel\fP|\fBll\fP [\fBlevel\fP[ \fBlevel\fP[ \fBlevel\fP]] \fB...\fP]" If no parameter is given the current log level settings are displayed otherwise the parameter(s) is/are used to set the log level. Level 'none' disables all verbose logging. Level 'batman' enables messages related to routing / flooding / broadcasting. diff --git a/sys.c b/sys.c index 5cebf52..45fb656 100644 --- a/sys.c +++ b/sys.c @@ -96,6 +96,12 @@ const struct settings_data batctl_settings[BATCTL_SETTINGS_NUM] = { .opt_short = "nc", .sysfs_name = "network_coding", .params = sysfs_param_enable, + }, + { + .opt_long = "multicast_mode", + .opt_short = "mm", + .sysfs_name = "multicast_mode", + .params = sysfs_param_enable, } }; diff --git a/sys.h b/sys.h index 2cbbcfb..9016501 100644 --- a/sys.h +++ b/sys.h @@ -46,6 +46,7 @@ enum batctl_settings_list { BATCTL_SETTINGS_BONDING, BATCTL_SETTINGS_FRAGMENTATION, BATCTL_SETTINGS_NETWORK_CODING, + BATCTL_SETTINGS_MULTICAST_MODE, BATCTL_SETTINGS_NUM, };