From patchwork Sat Jul 17 11:01:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 18359 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from diktynna.open-mesh.org (localhost [IPv6:::1]) by diktynna.open-mesh.org (Postfix) with ESMTP id 8F86E8238D; Sat, 17 Jul 2021 13:11:19 +0200 (CEST) Received: from dvalin.narfation.org (dvalin.narfation.org [IPv6:2a00:17d8:100::8b1]) by diktynna.open-mesh.org (Postfix) with ESMTPS id 8211181535 for ; Sat, 17 Jul 2021 13:11:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org; s=20121; t=1626519691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JnqKvBk3Pl+zDzXyO2+N3Mr8wzUJs/ROwp/sFqcNlnw=; b=CbiH4etfU+o6aWdMlxUrxMinCPzfrc4dF19UnWrkLpSxEWhdO8OLVowkVc8JxukjIpJBg/ umM6+kPBST02BTX8JSgr81Yt7INkyZuH4q3M7qMYo4o9MbAs53PfqQZ+vejxX2XQb3ComL hmg/jiflXtnGDTz1RYU8YALQKiVWCIY= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Cc: Sven Eckelmann Subject: [PATCH 1/9] batctl: man: Fix alignment after json list Date: Sat, 17 Jul 2021 13:01:21 +0200 Message-Id: <20210717110129.25539-2-sven@narfation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210717110129.25539-1-sven@narfation.org> References: <20210717110129.25539-1-sven@narfation.org> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1626520274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=JnqKvBk3Pl+zDzXyO2+N3Mr8wzUJs/ROwp/sFqcNlnw=; b=0rqVWmD76V4+EOuR8kWeRFtVVAdpua5RAsq21S7G2bdYkfyHwCo0vVKBXW9e/QgKauggJl /IpTAw4m1HbCQqb4QqYYqdWlij5cX99gD0b4nJ9BOgmK3vr0C0yODnmn+D3/AxO5ZWocNh FBgF6ENNYekqPi7gfG99tLkQ1Ba5+x0= ARC-Seal: i=1; s=20121; d=open-mesh.org; t=1626520274; a=rsa-sha256; cv=none; b=VinpqdlSs4WNE3Rt3YR7gQqvJGDnCDrzhcbD8xwWqNcOdq//FeNB1OO8mNfq3huHOsQIPw FXMdj9ic/IqqdyR9tNCzkaZvVdtfluG6wNH9d+VLH7qpKAVM6ngPH7n84D4Bw0GJ2DZr1/ toSToUaHw1fgoiJ/RniGU3eGCDyiiq0= ARC-Authentication-Results: i=1; diktynna.open-mesh.org; dkim=pass header.d=narfation.org header.s=20121 header.b=CbiH4etf; spf=pass (diktynna.open-mesh.org: domain of sven@narfation.org designates 2a00:17d8:100::8b1 as permitted sender) smtp.mailfrom=sven@narfation.org Message-ID-Hash: B3OWKQCOG7R2QGT6UA6GGEJXFX5AVGU5 X-Message-ID-Hash: B3OWKQCOG7R2QGT6UA6GGEJXFX5AVGU5 X-MailFrom: sven@narfation.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-b.a.t.m.a.n.lists.open-mesh.org-0; header-match-b.a.t.m.a.n.lists.open-mesh.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 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 Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: The manpage uses RS macro to indent elements of a list and the resets the indentation again with RE. ut the usage of these macros were mixed up for the last entries. This caused a misalignment of the following entries. Fixes: 20086d207940 ("batctl: Add transtable_local_json command") Fixes: 35d8327f9d98 ("batctl: Add vlan_json command") Signed-off-by: Sven Eckelmann --- man/batctl.8 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/man/batctl.8 b/man/batctl.8 index 80077bb..a820e6e 100644 --- a/man/batctl.8 +++ b/man/batctl.8 @@ -338,13 +338,13 @@ List of available JSON queries: .RS 10 \- transtable_global_json|tgj .RE -.RE +.RS 10 \- transtable_local_json|tlj .RE -.RE +.RS 10 \- vlan_json|vj .RE -.RS 10 +.RE .br .IP "[\fBmeshif \fP] \fBtranslate\fP|\fBt\fP \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIP_address\fP" From patchwork Sat Jul 17 11:01:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 18357 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from diktynna.open-mesh.org (localhost [IPv6:::1]) by diktynna.open-mesh.org (Postfix) with ESMTP id 5BC5B81D25; Sat, 17 Jul 2021 13:11:18 +0200 (CEST) Received: from dvalin.narfation.org (dvalin.narfation.org [IPv6:2a00:17d8:100::8b1]) by diktynna.open-mesh.org (Postfix) with ESMTPS id 6C66681242 for ; Sat, 17 Jul 2021 13:11:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org; s=20121; t=1626519692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ijs/x6PIBwAhr3iItB7fjFtORAZZG8QfsotEiM0Ladw=; b=OeO5HzBQU0MVTAk+/Ev19ql5dxmCivuaLwcEB8hy97dc9iJbcAFpwPuQHHKBmeKHGXldfs QjwD2xAKPF8k999dy0y8tJLa5uuP5uDwHzXQfQ/Rp1CLpehxufg/u0RoHL45r+PJYakDxL M5QqfPP86wr8enactCUJtqD3beaeclI= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Cc: Sven Eckelmann Subject: [PATCH 2/9] batctl: man: Move commands to own section Date: Sat, 17 Jul 2021 13:01:22 +0200 Message-Id: <20210717110129.25539-3-sven@narfation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210717110129.25539-1-sven@narfation.org> References: <20210717110129.25539-1-sven@narfation.org> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1626520274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ijs/x6PIBwAhr3iItB7fjFtORAZZG8QfsotEiM0Ladw=; b=RaQWGoMnnitSaIQpcCr5ffwCZURt7X8MohsYg4xdMDIIVolWPuI/4+yUPqnOr2fmcEAcol SR5Lg55QvU1gOyo5/92vB82fxwif32M7gIqQ3dlA/shMNXQVh/qbW0nMyNlu0i0dE8QOHQ KXfkeolVibQ73mcb85Cik3sXGi72PMY= ARC-Seal: i=1; s=20121; d=open-mesh.org; t=1626520274; a=rsa-sha256; cv=none; b=2WfmEKTaUypi8oWrV8IpltqSNW38Iy3mjRzqP7NZO12C/FtfzGK3eKbTVigJCP8g7Uz/bi CZa5vG/ZJIS7LMs2lsvxlF3g4aEQSz7irgp4RaCbutb7I3JmCV8kIwu02/M5yBm6qSPuxz 6moVsbdYyziIR6+5e5wxoSuGia4lus0= ARC-Authentication-Results: i=1; diktynna.open-mesh.org; dkim=pass header.d=narfation.org header.s=20121 header.b=OeO5HzBQ; spf=pass (diktynna.open-mesh.org: domain of sven@narfation.org designates 2a00:17d8:100::8b1 as permitted sender) smtp.mailfrom=sven@narfation.org Message-ID-Hash: L2UKSCAF3MIZ6R7LMDPLIAA4DRIJ2BHT X-Message-ID-Hash: L2UKSCAF3MIZ6R7LMDPLIAA4DRIJ2BHT X-MailFrom: sven@narfation.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-b.a.t.m.a.n.lists.open-mesh.org-0; header-match-b.a.t.m.a.n.lists.open-mesh.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 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 Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: The commands were implemented as paragraph with specific style in the options section. But it should actually be a complete new section because it is not really related to the options at all. Signed-off-by: Sven Eckelmann --- man/batctl.8 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/man/batctl.8 b/man/batctl.8 index a820e6e..58656eb 100644 --- a/man/batctl.8 +++ b/man/batctl.8 @@ -41,19 +41,16 @@ functionality to the normal \fBping\fP(1), \fBtraceroute\fP(1), \fBtcpdump\fP(1) behaviour or using the B.A.T.M.A.N. advanced protocol. For similar reasons, \fBthroughputmeter\fP, a command to test network performances, is also included. -.PP -.PP .SH OPTIONS -.TP -.I \fBoptions: \-m specify mesh interface (default 'bat0') .br \-h print general batctl help .br \-v print batctl version and batman-adv version (if the module is loaded) .br -.TP -.I \fBcommands: + +.SH COMMANDS + .IP "[\fBmeshif \fP] \fBinterface\fP|\fBif\fP [\fB-M\fP] [\fBadd\fP|\fBdel iface(s)\fP]" If no parameter is given or the first parameter is neither "add" nor "del" the current interface settings are displayed. In order to add or delete interfaces specify "add" or "del" as first argument and append the interface names you wish to From patchwork Sat Jul 17 11:01:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 18360 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from diktynna.open-mesh.org (localhost [IPv6:::1]) by diktynna.open-mesh.org (Postfix) with ESMTP id 2978F823C1; Sat, 17 Jul 2021 13:11:25 +0200 (CEST) Received: from dvalin.narfation.org (dvalin.narfation.org [213.160.73.56]) by diktynna.open-mesh.org (Postfix) with ESMTPS id 69D988035A for ; Sat, 17 Jul 2021 13:11:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org; s=20121; t=1626519693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=P3lCCbH1E/eA39qdlKFi2ynszSIf5S/55sf7enfNhQ8=; b=QkFJKbUQ+RnmL51aJXTP3nt97NqioQi9WwWxuy3/Pn9UTPsCm/stSq9GMB02Yoviw56I4q rhn0p6Gp2CTIOnbRqO12rCiVzdPp1XWdcq6Ms0S4mySOzcdjsFyYPh99PrC4UFPxdPryWi 0vV4AjEt3Fuu8WAxiiDghQEdYS8csPQ= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Cc: Sven Eckelmann Subject: [PATCH 3/9] batctl: man: Convert lists to indented paragraph Date: Sat, 17 Jul 2021 13:01:23 +0200 Message-Id: <20210717110129.25539-4-sven@narfation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210717110129.25539-1-sven@narfation.org> References: <20210717110129.25539-1-sven@narfation.org> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1626520274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=P3lCCbH1E/eA39qdlKFi2ynszSIf5S/55sf7enfNhQ8=; b=m6tVPxe7l85Szinxr/EgSJTG6GUcYwk92kM9Svcfm9LxrBcnS5O7bvrjOKIIkJieV8fQf2 mpY/fxybIXmaBN3e0HqJLcGJ4pPvvV5MDBpo+6cQSbBx/MHFjGLpn/CYZhH8vL0aCVBK9Z t1X8hVoFQ3oWe+mrHkqBUp11N+ara9g= ARC-Seal: i=1; s=20121; d=open-mesh.org; t=1626520274; a=rsa-sha256; cv=none; b=PilSoGWZqV5Vu4ptD578Up5y39h25ck3pCm6FB2F6okXWRuAY4cNMO7BAZ8D3lQ6bQIRLJ /ptygnLu4C7Qag2r8OnXA6nZUjGtFAITNH/QEKVVGHXpEb0POOlKo0XW1GolJbx01++OzU 6NXFkpqXsWkaG2qlF9zFwU0N9O07ClY= ARC-Authentication-Results: i=1; diktynna.open-mesh.org; dkim=pass header.d=narfation.org header.s=20121 header.b=QkFJKbUQ; spf=pass (diktynna.open-mesh.org: domain of sven@narfation.org designates 213.160.73.56 as permitted sender) smtp.mailfrom=sven@narfation.org Message-ID-Hash: TKIYD7C4B43IKESVFOIGJW5GMJFXCFLP X-Message-ID-Hash: TKIYD7C4B43IKESVFOIGJW5GMJFXCFLP X-MailFrom: sven@narfation.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-b.a.t.m.a.n.lists.open-mesh.org-0; header-match-b.a.t.m.a.n.lists.open-mesh.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 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 Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: The lists macro was misused to manually implement indented paragraphs with a label. But groff already provides the .TP macro to support this directly. Signed-off-by: Sven Eckelmann --- man/batctl.8 | 132 +++++++++++++++++++++++++-------------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/man/batctl.8 b/man/batctl.8 index 58656eb..39fac88 100644 --- a/man/batctl.8 +++ b/man/batctl.8 @@ -51,83 +51,86 @@ performances, is also included. .SH COMMANDS -.IP "[\fBmeshif \fP] \fBinterface\fP|\fBif\fP [\fB-M\fP] [\fBadd\fP|\fBdel iface(s)\fP]" +.TP +[\fBmeshif \fP] \fBinterface\fP|\fBif\fP [\fB-M\fP] [\fBadd\fP|\fBdel iface(s)\fP] If no parameter is given or the first parameter is neither "add" nor "del" the current interface settings are displayed. In order to add or delete interfaces specify "add" or "del" as first argument and append the interface names you wish to add or delete. Multiple interfaces can be specified. The "\-M" option tells batctl to not automatically create the batman-adv interface on "add". It can also be used to suppress the warning about the manual destruction when "del" removed all interfaces which belonged to it. -.IP "[\fBmeshif \fP] \fBinterface\fP|\fBif\fP \fBcreate\fP [\fBrouting_algo|ra RA_NAME\fP]" +.TP +[\fBmeshif \fP] \fBinterface\fP|\fBif\fP \fBcreate\fP [\fBrouting_algo|ra RA_NAME\fP] A batman-adv interface without attached interfaces can be created using "create". The parameter routing_algo can be used to overwrite the (default) routing algorithm. -.IP "[\fBmeshif \fP] \fBinterface\fP|\fBif\fP \fBdestroy\fP" +.TP +[\fBmeshif \fP] \fBinterface\fP|\fBif\fP \fBdestroy\fP Remove all attached interfaces and destroy the batman-adv interface. -.br -.IP "[\fBmeshif \fP] \fBorig_interval\fP|\fBit\fP [\fBinterval\fP]" +.TP +[\fBmeshif \fP] \fBorig_interval\fP|\fBit\fP [\fBinterval\fP] If no parameter is given the current originator interval setting is displayed otherwise the parameter is used to set the originator interval. The interval is in units of milliseconds. -.br -.IP "[\fBmeshif \fP] \fBap_isolation\fP|\fBap\fP [\fB0\fP|\fB1\fP]" +.TP +[\fBmeshif \fP] \fBap_isolation\fP|\fBap\fP [\fB0\fP|\fB1\fP] If no parameter is given the current ap isolation setting is displayed. Otherwise the parameter is used to enable or disable ap isolation. -.br -.IP "<\fBvlan \fP|[\fBmeshif \fP] \fBvid \fP> \fBap_isolation\fP|\fBap\fP [\fB0\fP|\fB1\fP]" +.TP +<\fBvlan \fP|[\fBmeshif \fP] \fBvid \fP> \fBap_isolation\fP|\fBap\fP [\fB0\fP|\fB1\fP] If no parameter is given the current ap isolation setting for the specified VLAN is displayed. Otherwise the parameter is used to enable or disable ap isolation for the specified VLAN. -.br -.IP "[\fBmeshif \fP] \fBbridge_loop_avoidance\fP|\fBbl\fP [\fB0\fP|\fB1\fP]" +.TP +[\fBmeshif \fP] \fBbridge_loop_avoidance\fP|\fBbl\fP [\fB0\fP|\fB1\fP] If no parameter is given the current bridge loop avoidance setting is displayed. Otherwise the parameter is used to enable or disable the bridge loop avoidance. Bridge loop avoidance support has to be enabled when compiling the module otherwise this option won't be available. -.br -.IP "[\fBmeshif \fP] \fBdistributed_arp_table\fP|\fBdat\fP [\fB0\fP|\fB1\fP]" +.TP +[\fBmeshif \fP] \fBdistributed_arp_table\fP|\fBdat\fP [\fB0\fP|\fB1\fP] If no parameter is given the current distributed arp table setting is displayed. Otherwise the parameter is used to enable or disable the distributed arp table. -.br -.IP "[\fBmeshif \fP] \fBaggregation\fP|\fBag\fP [\fB0\fP|\fB1\fP]" +.TP +[\fBmeshif \fP] \fBaggregation\fP|\fBag\fP [\fB0\fP|\fB1\fP] If no parameter is given the current aggregation setting is displayed. Otherwise the parameter is used to enable or disable OGM packet aggregation. -.br -.IP "[\fBmeshif \fP] \fBbonding\fP|\fBb\fP [\fB0\fP|\fB1\fP]" +.TP +[\fBmeshif \fP] \fBbonding\fP|\fBb\fP [\fB0\fP|\fB1\fP] If no parameter is given the current bonding mode setting is displayed. Otherwise the parameter is used to enable or disable the bonding mode. -.br -.IP "\fBevent\fP|\fBe\fP [\fB\-t\fP|\fB\-r\fP]" +.TP +\fBevent\fP|\fBe\fP [\fB\-t\fP|\fB\-r\fP] batctl will monitor for events from the netlink kernel interface of batman-adv. The local timestamp of the event will be printed when parameter \fB\-t\fP is specified. Parameter \fB\-r\fP will do the same but with relative timestamps. -.br -.IP "\fBhardif \fP \fBelp_interval\fP|\fBet\fP [\fBinterval\fP]" +.TP +\fBhardif \fP \fBelp_interval\fP|\fBet\fP [\fBinterval\fP] If no parameter is given the current ELP interval setting of the hard interface is displayed otherwise the parameter is used to set the ELP interval. The interval is in units of milliseconds. -.br -.IP "[\fBmeshif \fP] \fBfragmentation\fP|\fBf\fP [\fB0\fP|\fB1\fP]" +.TP +[\fBmeshif \fP] \fBfragmentation\fP|\fBf\fP [\fB0\fP|\fB1\fP] If no parameter is given the current fragmentation mode setting is displayed. Otherwise the parameter is used to enable or disable fragmentation. -.br -.IP "[\fBmeshif \fP] \fBhop_penalty\fP|\fBhp\fP [\fBpenalty\fP]" +.TP +[\fBmeshif \fP] \fBhop_penalty\fP|\fBhp\fP [\fBpenalty\fP] If no parameter is given the current hop penalty setting is displayed. Otherwise the parameter is used to set the hop penalty. The penalty is can be 0-255 (255 sets originator message's TQ to zero when forwarded by this hop). -.br -.IP "[\fBhardif \fP] \fBhop_penalty\fP|\fBhp\fP [\fBpenalty\fP]" +.TP +[\fBhardif \fP] \fBhop_penalty\fP|\fBhp\fP [\fBpenalty\fP] If no parameter is given the current hop penalty setting of the hard interface is displayed. Otherwise the parameter is used to set the hop penalty. The penalty can be 0-255 (255 sets originator message's TQ to zero when forwarded over this interface). -.br -.IP "[\fBmeshif \fP] \fBnetwork_coding\fP|\fBnc\fP [\fB0\fP|\fB1\fP]" +.TP +[\fBmeshif \fP] \fBnetwork_coding\fP|\fBnc\fP [\fB0\fP|\fB1\fP] 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 "[\fBmeshif \fP] \fBmulticast_forceflood\fP|\fBmff\fP [\fB0\fP|\fB1\fP]" +.TP +[\fBmeshif \fP] \fBmulticast_forceflood\fP|\fBmff\fP [\fB0\fP|\fB1\fP] If no parameter is given the current multicast forceflood setting is displayed. Otherwise the parameter is used to enable or disable multicast forceflood. This setting defines whether multicast optimizations should be replaced by simple broadcast-like flooding of multicast packets. If set to non-zero then all nodes in the mesh are going to use classic flooding for any multicast packet with no optimizations. -.br -.IP "[\fBmeshif \fP] \fBmulticast_fanout\fP|\fBmo\fP [\fBfanout\fP]" +.TP +[\fBmeshif \fP] \fBmulticast_fanout\fP|\fBmo\fP [\fBfanout\fP] If no parameter is given the current multicast fanout setting is displayed. Otherwise the parameter is used to set the multicast fanout. The multicast fanout defines the maximum number of packet copies that may be generated for a multicast-to-unicast conversion. Once this limit is exceeded distribution will fall back to broadcast. -.br -.IP "[\fBmeshif \fP] \fBloglevel\fP|\fBll\fP [\fBlevel\fP[ \fBlevel\fP[ \fBlevel\fP]] \fB...\fP]" +.TP +[\fBmeshif \fP] \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. Level 'routes' enables messages related to routes being added / changed / deleted. Level 'tt' enables messages related to @@ -136,8 +139,8 @@ messages related to ARP snooping and the Distributed Arp Table. Level 'nc' enabl Level 'mcast' enables messages related to multicast optimizations. Level 'tp' enables messages related to throughput meter. Level 'all' enables all messages. The messages are sent to the kernels trace buffers. Use \fBtrace-cmd stream -e batadv:batadv_dbg\fP to receive the system wide log messages. -.br -.IP "[\fBmeshif \fP] \fBgw_mode|gw\fP [\fBoff\fP|\fBclient\fP|\fBserver\fP] [\fBsel_class|bandwidth\fP]\fP" +.TP +[\fBmeshif \fP] \fBgw_mode|gw\fP [\fBoff\fP|\fBclient\fP|\fBserver\fP] [\fBsel_class|bandwidth\fP]\fP If no parameter is given the current gateway mode is displayed otherwise the parameter is used to set the gateway mode. The second (optional) argument specifies the selection class (if 'client' was the first argument) or the gateway bandwidth (if 'server' was the first argument). If the node is a server this parameter is used to inform other nodes in the network about @@ -203,19 +206,20 @@ gateway or the maximum bandwidth across the entire path. .RE .RE .br -.IP "\fBrouting_algo\fP|\fBra\fP [\fBalgorithm\fP]\fP" +.TP +\fBrouting_algo\fP|\fBra\fP [\fBalgorithm\fP]\fP If no parameter is given the current routing algorithm configuration as well as supported routing algorithms are displayed. Otherwise the parameter is used to select the routing algorithm for the following batX interface to be created. -.br -.IP "\fBhardif \fP \fBthroughput_override|to\fP [\fBbandwidth\fP]\fP" +.TP +\fBhardif \fP \fBthroughput_override|to\fP [\fBbandwidth\fP]\fP If no parameter is given the current througput override is displayed otherwise the parameter is used to set the throughput override for the specified hard interface. Just enter any number (optionally followed by "kbit" or "mbit"). -.br -.IP "[\fBmeshif \fP] \fBisolation_mark\fP|\fBmark\fP" +.TP +[\fBmeshif \fP] \fBisolation_mark\fP|\fBmark\fP If no parameter is given the current isolation mark value is displayed. Otherwise the parameter is used to set or unset the isolation mark used by the Extended Isolation feature. @@ -234,10 +238,8 @@ Example 2: 0x00040000/0xffff0000 .br Example 3: 16 or 0x0F .br -.br -.PP -.I \fBdebug tables: -.IP +.TP +\fBdebug tables:\fP The batman-adv kernel module comes with a variety of debug tables containing various information about the state of the mesh seen by each individual node. @@ -291,9 +293,8 @@ List of debug tables: .RE .br .br -.PP -.I \fBJSON queries: -.IP +.TP +\fBJSON queries:\fP The generic netlink family provided by the batman-adv kernel module can be queried (read-only) by batctl and automatically translated to JSON. This can be used to monitor the state of the system without the need of parsing @@ -342,13 +343,13 @@ List of available JSON queries: \- vlan_json|vj .RE .RE -.br -.IP "[\fBmeshif \fP] \fBtranslate\fP|\fBt\fP \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIP_address\fP" +.TP +[\fBmeshif \fP] \fBtranslate\fP|\fBt\fP \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIP_address\fP Translates a destination (hostname, IP, MAC, bat_host-name) to the originator mac address responsible for it. -.br -.IP "[\fBmeshif \fP] \fBstatistics\fP|\fBs\fP" +.TP +[\fBmeshif \fP] \fBstatistics\fP|\fBs\fP Retrieve traffic counters from batman-adv kernel module. The output may vary depending on which features have been compiled into the kernel module. .br @@ -362,8 +363,8 @@ tt - translation table counters .RS 7 All counters without a prefix concern payload (pure user data) traffic. .RE -.br -.IP "[\fBmeshif \fP] \fBping\fP|\fBp\fP [\fB\-c count\fP][\fB\-i interval\fP][\fB\-t time\fP][\fB\-R\fP][\fB\-T\fP] \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIP_address\fP" +.TP +[\fBmeshif \fP] \fBping\fP|\fBp\fP [\fB\-c count\fP][\fB\-i interval\fP][\fB\-t time\fP][\fB\-R\fP][\fB\-T\fP] \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIP_address\fP Layer 2 ping of a MAC address or bat\-host name. batctl will try to find the bat\-host name if the given parameter was not a MAC address. It can also try to guess the MAC address using an IPv4/IPv6 address or a hostname when the IPv4/IPv6 address was configured on top of the batman-adv interface of the destination device and both source and @@ -373,8 +374,8 @@ option batctl will continue pinging without end. Use CTRL + C to stop it. With interval between pings and the timeout time for replies, both in seconds. When run with "\-R", the route taken by the ping messages will be recorded. With "\-T" you can disable the automatic translation of a client MAC address to the originator address which is responsible for this client. -.br -.IP "[\fBmeshif \fP] \fBtraceroute\fP|\fBtr\fP [\fB\-n\fP][\fB\-T\fP] \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIP_address\fP" +.TP +[\fBmeshif \fP] \fBtraceroute\fP|\fBtr\fP [\fB\-n\fP][\fB\-T\fP] \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIP_address\fP Layer 2 traceroute to a MAC address or bat\-host name. batctl will try to find the bat\-host name if the given parameter was not a MAC address. It can also try to guess the MAC address using an IPv4/IPv6 address or a hostname when the IPv4/IPv6 address was configured on top of the batman-adv interface of the destination device and both source and @@ -382,8 +383,8 @@ destination devices are in the same IP subnet. batctl will send 3 packets to each host and display the response time. If "\-n" is given batctl will not replace the MAC addresses with bat\-host names in the output. With "\-T" you can disable the automatic translation of a client MAC address to the originator address which is responsible for this client. -.br -.IP "\fBtcpdump\fP|\fBtd\fP [\fB\-c\fP][\fB\-n\fP][\fB\-p filter\fP][\fB\-x filter\fP] \fBinterface ...\fP" +.TP +\fBtcpdump\fP|\fBtd\fP [\fB\-c\fP][\fB\-n\fP][\fB\-p filter\fP][\fB\-x filter\fP] \fBinterface ...\fP batctl will display all packets that are seen on the given interface(s). A variety of options to filter the output are available: To only print packets that match the compatibility number of batctl specify the "\-c" (compat filter) option. If "\-n" is given batctl will not replace the MAC addresses with bat\-host names in the output. To filter @@ -416,8 +417,8 @@ except specified). The following packet types are available: .RS 7 Example: batctl td \-p 129 \-> only display batman ogm packets and non batman packets .RE -.br -.IP "\fBbisect_iv\fP [\fB\-l MAC\fP][\fB\-t MAC\fP][\fB\-r MAC\fP][\fB\-s min\fP [\fB\- max\fP]][\fB\-o MAC\fP][\fB\-n\fP] \fBlogfile1\fP [\fBlogfile2\fP ... \fBlogfileN\fP]" +.TP +\fBbisect_iv\fP [\fB\-l MAC\fP][\fB\-t MAC\fP][\fB\-r MAC\fP][\fB\-s min\fP [\fB\- max\fP]][\fB\-o MAC\fP][\fB\-n\fP] \fBlogfile1\fP [\fBlogfile2\fP ... \fBlogfileN\fP] Analyses the B.A.T.M.A.N. IV logfiles to build a small internal database of all sent sequence numbers and routing table changes. This database can then be analyzed in a number of different ways. With "\-l" the database can be used to search for routing loops. Use "\-t" to trace OGMs of a host throughout the network. Use "\-r" to display routing tables of the @@ -425,8 +426,8 @@ nodes. The option "\-s" can be used to limit the output to a range of sequence n specific sequence number, min. Furthermore using "\-o" you can filter the output to a specified originator. If "\-n" is given batctl will not replace the MAC addresses with bat\-host names in the output. .RE -.br -.IP "[\fBmeshif \fP] \fBthroughputmeter\fP|\fBtp\fP \fBMAC\fP" +.TP +[\fBmeshif \fP] \fBthroughputmeter\fP|\fBtp\fP \fBMAC\fP This command starts a throughput test entirely controlled by batman module in kernel space: the computational resources needed to align memory and copy data between user and kernel space that are required by other user space tools may @@ -441,11 +442,10 @@ of a successful experiment the throughput in KBytes per second is returned, together with the experiment duration in millisecond and the amount of bytes transferred. If too many packets are lost or the specified MAC address is not reachable, a message notifying the error is returned instead of the result. -.RE -.br + .SH FILES .TP -.I "\fBbat-hosts\fP" +\fBbat-hosts\fP This file is similar to the /etc/hosts file. You can write one MAC address and one host name per line. batctl will search for bat-hosts in /etc, your home directory and the current directory. The found data is used to match MAC address to your provided host name or replace MAC addresses in debug output and logs. Host names are much easier to remember than MAC From patchwork Sat Jul 17 11:01:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 18365 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from diktynna.open-mesh.org (localhost [IPv6:::1]) by diktynna.open-mesh.org (Postfix) with ESMTP id 7899D824D9; Sat, 17 Jul 2021 13:11:49 +0200 (CEST) Received: from dvalin.narfation.org (dvalin.narfation.org [213.160.73.56]) by diktynna.open-mesh.org (Postfix) with ESMTPS id 47F0B81575 for ; Sat, 17 Jul 2021 13:11:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org; s=20121; t=1626519693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RiYXewCksOckQYVDxVxk2bz+XsFVVij4eSzjhJVORPs=; b=RyPBJb1OmWWHqBuZGzcJ7gJqwRG2oT7Z7UZYId661+ojiQ3opBzbptLWWOpSDrqXMO2nD6 KpADx0/ycCNLDs/OaXVtQqh19Q1rYA1eQOnbr+oijWLwu/+zHcjTgf4gRGDpZZnuJT7dKW kuczLtDbbgf3kmDZE6r27kW/zQHuVyI= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Cc: Sven Eckelmann Subject: [PATCH 4/9] batctl: man: Use native list support Date: Sat, 17 Jul 2021 13:01:24 +0200 Message-Id: <20210717110129.25539-5-sven@narfation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210717110129.25539-1-sven@narfation.org> References: <20210717110129.25539-1-sven@narfation.org> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1626520275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=RiYXewCksOckQYVDxVxk2bz+XsFVVij4eSzjhJVORPs=; b=i1YSieVMDkXzqP719xP7lkWOZKUkdP4NKnam+GMagPbr4korWbAPBMTjsoLxac+gImejao Qw3JsLH8SMJxrgcBjtN1RSLPFtet2JGQh5LKlXrcyKUhhqxDYz8DITITeisg3UpeMjXdHz E8HxIz/Va/DX+bYaIyMTXEgqOak86tw= ARC-Seal: i=1; s=20121; d=open-mesh.org; t=1626520275; a=rsa-sha256; cv=none; b=NgJt5sq7ziqq/JFFPZkpSamJPf4PxW+iq9HEmSwA7CAKfO4biRI0ILbSKYsXfopK8dy1Ei eSHAE/LBvDq0EiiAF6dVhf7e0e6CX19Hdott3F7++YE55zpV3Sb8MHYqtTeAwWWnQ25W9o /+7QwNMtwvhjugPJJsd0+leRm29C2O0= ARC-Authentication-Results: i=1; diktynna.open-mesh.org; dkim=pass header.d=narfation.org header.s=20121 header.b=RyPBJb1O; spf=pass (diktynna.open-mesh.org: domain of sven@narfation.org designates 213.160.73.56 as permitted sender) smtp.mailfrom=sven@narfation.org Message-ID-Hash: AZRUNHDA3BKBWE7C7XV54DTUB3MLUIAH X-Message-ID-Hash: AZRUNHDA3BKBWE7C7XV54DTUB3MLUIAH X-MailFrom: sven@narfation.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-b.a.t.m.a.n.lists.open-mesh.org-0; header-match-b.a.t.m.a.n.lists.open-mesh.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 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 Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: The lists were manually implemented by shifting the content to the right and then adding a prefix to it. This turned out to be the source of various errors which affected the whole document after the "list". The .IP list macro can be used instead to simplify these kind of lists. Signed-off-by: Sven Eckelmann --- man/batctl.8 | 110 +++++++++++++++++++++------------------------------ 1 file changed, 44 insertions(+), 66 deletions(-) diff --git a/man/batctl.8 b/man/batctl.8 index 39fac88..831a7e8 100644 --- a/man/batctl.8 +++ b/man/batctl.8 @@ -263,33 +263,24 @@ is printed. The local and global translation tables also support the "\-u" and "\-m" option to only display unicast or multicast translation table announcements respectively. List of debug tables: -.RS 10 -\- neighbors|n -.RE -.RS 10 -\- originators|o -.RE -.RS 10 -\- gateways|gwl -.RE -.RS 10 -\- translocal|tl -.RE -.RS 10 -\- transglobal|tg -.RE -.RS 10 -\- claimtable|cl (compile time option) -.RE -.RS 10 -\- backbonetable|bbt (compile time option) -.RE -.RS 10 -\- dat_cache|dc (compile time option) -.RE -.RS 10 -\- mcast_flags|mf (compile time option) -.RE +.IP \(bu 2 +neighbors|n +.IP \(bu 2 +originators|o +.IP \(bu 2 +gateways|gwl +.IP \(bu 2 +translocal|tl +.IP \(bu 2 +transglobal|tg +.IP \(bu 2 +claimtable|cl (compile time option) +.IP \(bu 2 +backbonetable|bbt (compile time option) +.IP \(bu 2 +dat_cache|dc (compile time option) +.IP \(bu 2 +mcast_flags|mf (compile time option) .RE .br .br @@ -303,45 +294,32 @@ the freeform debug tables or the native netlink messages. .RS 7 List of available JSON queries: -.RS 10 -\- bla_backbone_json|bbj -.RE -.RS 10 -\- bla_claim_json|clj -.RE -.RS 10 -\- dat_cache_json|dcj -.RE -.RS 10 -\- gateways_json|gwj -.RE -.RS 10 -\- hardif_json|hj -.RE -.RS 10 -\- hardifs_json|hj -.RE -.RS 10 -\- mcast_flags_json|mfj -.RE -.RS 10 -\- mesh_json|mj -.RE -.RS 10 -\- neighbors_json|nj -.RE -.RS 10 -\- originators_json|oj -.RE -.RS 10 -\- transtable_global_json|tgj -.RE -.RS 10 -\- transtable_local_json|tlj -.RE -.RS 10 -\- vlan_json|vj -.RE +.IP \(bu 2 +bla_backbone_json|bbj +.IP \(bu 2 +bla_claim_json|clj +.IP \(bu 2 +dat_cache_json|dcj +.IP \(bu 2 +gateways_json|gwj +.IP \(bu 2 +hardif_json|hj +.IP \(bu 2 +hardifs_json|hj +.IP \(bu 2 +mcast_flags_json|mfj +.IP \(bu 2 +mesh_json|mj +.IP \(bu 2 +neighbors_json|nj +.IP \(bu 2 +originators_json|oj +.IP \(bu 2 +transtable_global_json|tgj +.IP \(bu 2 +transtable_local_json|tlj +.IP \(bu 2 +vlan_json|vj .RE .TP [\fBmeshif \fP] \fBtranslate\fP|\fBt\fP \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIP_address\fP From patchwork Sat Jul 17 11:01:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 18363 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from diktynna.open-mesh.org (localhost [IPv6:::1]) by diktynna.open-mesh.org (Postfix) with ESMTP id 59CC182452; Sat, 17 Jul 2021 13:11:37 +0200 (CEST) Received: from dvalin.narfation.org (dvalin.narfation.org [213.160.73.56]) by diktynna.open-mesh.org (Postfix) with ESMTPS id 04E9081595 for ; Sat, 17 Jul 2021 13:11:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org; s=20121; t=1626519694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d9cZ5jh2Oa1UGTNPJRzRUkadhgWBf4WdPlSwHigBe1A=; b=zp6PKsceJBWDzRBcIEIi+uYIxPmTR/woFgJcyDFFhK2M5wTsq+WDPxIxrXrDIlxr380sHs Zr7m9VNlNz28gV2Q0U3IZyUOnXtjhdY2nIlV2JVPQmWGlNhbaEIO6zPhIJQmw35kVZI0ZF hbj6l6L6WPb3H5NLKzTN1WMwpXMV63o= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Cc: Sven Eckelmann Subject: [PATCH 5/9] batctl: man: Use tbl groff preprocessor for tables Date: Sat, 17 Jul 2021 13:01:25 +0200 Message-Id: <20210717110129.25539-6-sven@narfation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210717110129.25539-1-sven@narfation.org> References: <20210717110129.25539-1-sven@narfation.org> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1626520275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=d9cZ5jh2Oa1UGTNPJRzRUkadhgWBf4WdPlSwHigBe1A=; b=M9jl1pE/HDe1zhLJ+nMK4g0z3lseW2mpVeATYbPqY9c0gwjs4L/wh0AkG9p+xZuCWsyEfq wpWye/tDCI4oSw/JaOyI49z8Fo9usGPLlr+nI1ioU+GXVHd7K9k56B1JpDZbIsxX+8J2ye glc7l5wR5NuVqXRUATp4XCQeHipNewM= ARC-Seal: i=1; s=20121; d=open-mesh.org; t=1626520275; a=rsa-sha256; cv=none; b=lgzF0uTduKzMv04ytO4PA5IrwaLijv0jXQiSFIZ0x2zZFfm208viz0GDE81U/jzWndBU75 VoMaPFWAQSJnV5NgDNUKZmpCuEGi+SxKKd4wdwM0UtBBXZqJoGZNXuuoqD/TawsMTFjTBP ChewtWOmbwETLskc2EPUkwI2wn+vOT8= ARC-Authentication-Results: i=1; diktynna.open-mesh.org; dkim=pass header.d=narfation.org header.s=20121 header.b=zp6PKsce; spf=pass (diktynna.open-mesh.org: domain of sven@narfation.org designates 213.160.73.56 as permitted sender) smtp.mailfrom=sven@narfation.org Message-ID-Hash: CFRCK26ZHWLCRTCPGXA677HMJB4FBJEE X-Message-ID-Hash: CFRCK26ZHWLCRTCPGXA677HMJB4FBJEE X-MailFrom: sven@narfation.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-b.a.t.m.a.n.lists.open-mesh.org-0; header-match-b.a.t.m.a.n.lists.open-mesh.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 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 Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Instead of emulating tables with manual identations, it is easier to just use the groff standard preprocessor tbl to build a table and let it automatically render. Signed-off-by: Sven Eckelmann --- man/batctl.8 | 74 ++++++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 34 deletions(-) diff --git a/man/batctl.8 b/man/batctl.8 index 831a7e8..079cc0a 100644 --- a/man/batctl.8 +++ b/man/batctl.8 @@ -332,15 +332,17 @@ Retrieve traffic counters from batman-adv kernel module. The output may vary dep into the kernel module. .br Each module subsystem has its own counters which are indicated by their prefixes: -.RS 15 -mgmt - mesh protocol counters -.RE -.RS 17 -tt - translation table counters -.RE -.RS 7 +.TS +tab (@); +r lx. +mgmt@T{ +mesh protocol counters +T} +tt@T{ +translation table counters +T} +.TE All counters without a prefix concern payload (pure user data) traffic. -.RE .TP [\fBmeshif \fP] \fBping\fP|\fBp\fP [\fB\-c count\fP][\fB\-i interval\fP][\fB\-t time\fP][\fB\-R\fP][\fB\-T\fP] \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIP_address\fP Layer 2 ping of a MAC address or bat\-host name. batctl will try to find the bat\-host name if the given parameter was @@ -368,33 +370,37 @@ are available: To only print packets that match the compatibility number of batc option. If "\-n" is given batctl will not replace the MAC addresses with bat\-host names in the output. To filter the shown packet types you can either use "\-p" (dump only specified packet types) or "\-x" (dump all packet types except specified). The following packet types are available: -.RS 17 -1 - batman ogm packets -.RE -.RS 17 -2 - batman icmp packets -.RE -.RS 17 -4 - batman unicast packets -.RE -.RS 17 -8 - batman broadcast packets -.RE -.RS 16 -16 - batman unicast tvlv packets -.RE -.RS 16 -32 - batman fragmented packets -.RE -.RS 16 -64 - batman tt / roaming packets -.RE -.RS 15 -128 - non batman packets -.RE -.RS 7 + +.TS +tab (@); +r lx. +1@T{ +batman ogm packets +T} +2@T{ +batman icmp packets +T} +4@T{ +batman unicast packets +T} +8@T{ +batman broadcast packets +T} +16@T{ +batman unicast tvlv packets +T} +32@T{ +batman fragmented packets +T} +64@T{ +batman tt / roaming packets +T} +128@T{ +non batman packets +T} +.TE Example: batctl td \-p 129 \-> only display batman ogm packets and non batman packets -.RE + .TP \fBbisect_iv\fP [\fB\-l MAC\fP][\fB\-t MAC\fP][\fB\-r MAC\fP][\fB\-s min\fP [\fB\- max\fP]][\fB\-o MAC\fP][\fB\-n\fP] \fBlogfile1\fP [\fBlogfile2\fP ... \fBlogfileN\fP] Analyses the B.A.T.M.A.N. IV logfiles to build a small internal database of all sent sequence numbers and routing table From patchwork Sat Jul 17 11:01:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 18362 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from diktynna.open-mesh.org (localhost [IPv6:::1]) by diktynna.open-mesh.org (Postfix) with ESMTP id CCDCA8248F; Sat, 17 Jul 2021 13:11:36 +0200 (CEST) Received: from dvalin.narfation.org (dvalin.narfation.org [213.160.73.56]) by diktynna.open-mesh.org (Postfix) with ESMTPS id 746E88129F for ; Sat, 17 Jul 2021 13:11:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org; s=20121; t=1626519694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qwDQqH8Rl3AyUNLTcOdCZlK+ID9AJcJ/WawcnrB6u+c=; b=X8N9Ks3KhrAB2U0XpXCipepSHwJUc9ssIEkDd6kOrxVZn1zZcTwfK2RovAGubBCUPrOba4 qFkTobfSlx7C7xGdcAYIfKJem7aeRlRzQuoU1z2spQFX3yNhgHiMgtUwYFBh3vrFCto+ik 4qTPwia1TqkJEmfeWQg01c0lp0dFMTg= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Cc: Sven Eckelmann Subject: [PATCH 6/9] batctl: man: Switch to manpage font convention Date: Sat, 17 Jul 2021 13:01:26 +0200 Message-Id: <20210717110129.25539-7-sven@narfation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210717110129.25539-1-sven@narfation.org> References: <20210717110129.25539-1-sven@narfation.org> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1626520274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=qwDQqH8Rl3AyUNLTcOdCZlK+ID9AJcJ/WawcnrB6u+c=; b=SItfKUN0mFTEGzR6QwqhqIaa4MLXyBcF6sv0/lTfaSgsVAUK6cr6aLCOAehMxnSsA6Z8aS dpl9GBOPhbVRwVhQq2n3Dr8u/Bx4+xfKDXC6rVQ8pKJlblEuk5j27NzDRC7QCYwQt0wEtR GJ2GePARxD83OC9wJQpIg90MM6LDZRc= ARC-Seal: i=1; s=20121; d=open-mesh.org; t=1626520274; a=rsa-sha256; cv=none; b=2kGPRd7YwvdKrUIbxzx3HDYVa7aTCvc+HN09I83cg34/G9WOPoEQBikPf86n0kHPk4Or3B izmt5HOjEwqevfezvLG4qsUE7KOtLlMM0DJuPiDc1twqLBV7cUUfGX8j0IO/FQTE6Do2YV /uHwQGKWxyyZ5a49a4u4I8RlxQq8pYU= ARC-Authentication-Results: i=1; diktynna.open-mesh.org; dkim=pass header.d=narfation.org header.s=20121 header.b=X8N9Ks3K; spf=pass (diktynna.open-mesh.org: domain of sven@narfation.org designates 213.160.73.56 as permitted sender) smtp.mailfrom=sven@narfation.org Message-ID-Hash: ZT2MU4WZPPGHJ74MKLFA4PLXPZNORSQB X-Message-ID-Hash: ZT2MU4WZPPGHJ74MKLFA4PLXPZNORSQB X-MailFrom: sven@narfation.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-b.a.t.m.a.n.lists.open-mesh.org-0; header-match-b.a.t.m.a.n.lists.open-mesh.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 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 Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: The manpage specifies following convention to make the reading of command synopses: bold text type exactly as shown. italic text replace with appropriate argument. [-abc] any or all arguments within [ ] are optional. -a|-b options delimited by | cannot be used together. argument ... argument is repeatable. [expression] ... entire expression within [ ] is repeatable. But the batctl manpage make basically everything bold and thus made it harder to differentiate user defined parameters and keywords. Signed-off-by: Sven Eckelmann --- man/batctl.8 | 80 +++++++++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 35 deletions(-) diff --git a/man/batctl.8 b/man/batctl.8 index 079cc0a..009494f 100644 --- a/man/batctl.8 +++ b/man/batctl.8 @@ -42,56 +42,66 @@ behaviour or using the B.A.T.M.A.N. advanced protocol. For similar reasons, \fBt performances, is also included. .SH OPTIONS -\-m specify mesh interface (default 'bat0') -.br -\-h print general batctl help -.br -\-v print batctl version and batman-adv version (if the module is loaded) -.br + +.TP +\fB\-m\fP +specify mesh interface (default 'bat0') +.TP +\fB\-h\fP +print general batctl help +.TP +\fB-v\fP +print batctl version and batman-adv version (if the module is loaded) .SH COMMANDS .TP -[\fBmeshif \fP] \fBinterface\fP|\fBif\fP [\fB-M\fP] [\fBadd\fP|\fBdel iface(s)\fP] +[\fBmeshif\fP \fInetdev\fP] \fBinterface\fP|\fBif\fP +.TQ +[\fBmeshif\fP \fInetdev\fP] \fBinterface\fP|\fBif\fP [\fB-M\fP] \fBadd\fP|\fBdel\fP \fIiface\fP ... If no parameter is given or the first parameter is neither "add" nor "del" the current interface settings are displayed. In order to add or delete interfaces specify "add" or "del" as first argument and append the interface names you wish to add or delete. Multiple interfaces can be specified. The "\-M" option tells batctl to not automatically create the batman-adv interface on "add". It can also be used to suppress the warning about the manual destruction when "del" removed all interfaces which belonged to it. .TP -[\fBmeshif \fP] \fBinterface\fP|\fBif\fP \fBcreate\fP [\fBrouting_algo|ra RA_NAME\fP] +[\fBmeshif\fP \fInetdev\fP] \fBinterface\fP|\fBif\fP \fBcreate\fP [\fBrouting_algo\fP|\fBra\fP \fIRA_NAME\fP] A batman-adv interface without attached interfaces can be created using "create". The parameter routing_algo can be used to overwrite the (default) routing algorithm. .TP -[\fBmeshif \fP] \fBinterface\fP|\fBif\fP \fBdestroy\fP +[\fBmeshif\fP \fInetdev\fP] \fBinterface\fP|\fBif\fP \fBdestroy\fP Remove all attached interfaces and destroy the batman-adv interface. .TP -[\fBmeshif \fP] \fBorig_interval\fP|\fBit\fP [\fBinterval\fP] +[\fBmeshif\fP \fInetdev\fP] \fBorig_interval\fP|\fBit\fP [\fIinterval\fP] If no parameter is given the current originator interval setting is displayed otherwise the parameter is used to set the originator interval. The interval is in units of milliseconds. .TP -[\fBmeshif \fP] \fBap_isolation\fP|\fBap\fP [\fB0\fP|\fB1\fP] +[\fBmeshif\fP \fInetdev\fP] \fBap_isolation\fP|\fBap\fP [\fI0\fP|\fI1\fP] If no parameter is given the current ap isolation setting is displayed. Otherwise the parameter is used to enable or disable ap isolation. .TP -<\fBvlan \fP|[\fBmeshif \fP] \fBvid \fP> \fBap_isolation\fP|\fBap\fP [\fB0\fP|\fB1\fP] +[\fBmeshif\fP \fInetdev\fP] \fBap_isolation\fP|\fBap\fP [\fI0\fP|\fI1\fP] +.TQ +[\fBmeshif\fP \fInetdev\fP] \fBvid \fP \fBap_isolation\fP|\fBap\fP [\fI0\fP|\fI1\fP] +.TQ +\fBvlan\fP \fIvdev\fP \fBap_isolation\fP|\fBap\fP [\fI0\fP|\fI1\fP] If no parameter is given the current ap isolation setting for the specified VLAN is displayed. Otherwise the parameter is used to enable or disable ap isolation for the specified VLAN. .TP -[\fBmeshif \fP] \fBbridge_loop_avoidance\fP|\fBbl\fP [\fB0\fP|\fB1\fP] +[\fBmeshif\fP \fInetdev\fP] \fBbridge_loop_avoidance\fP|\fBbl\fP [\fI0\fP|\fI1\fP] If no parameter is given the current bridge loop avoidance setting is displayed. Otherwise the parameter is used to enable or disable the bridge loop avoidance. Bridge loop avoidance support has to be enabled when compiling the module otherwise this option won't be available. .TP -[\fBmeshif \fP] \fBdistributed_arp_table\fP|\fBdat\fP [\fB0\fP|\fB1\fP] +[\fBmeshif\fP \fInetdev\fP] \fBdistributed_arp_table\fP|\fBdat\fP [\fI0\fP|\fI1\fP] If no parameter is given the current distributed arp table setting is displayed. Otherwise the parameter is used to enable or disable the distributed arp table. .TP -[\fBmeshif \fP] \fBaggregation\fP|\fBag\fP [\fB0\fP|\fB1\fP] +[\fBmeshif\fP \fInetdev\fP] \fBaggregation\fP|\fBag\fP [\fI0\fP|\fI1\fP] If no parameter is given the current aggregation setting is displayed. Otherwise the parameter is used to enable or disable OGM packet aggregation. .TP -[\fBmeshif \fP] \fBbonding\fP|\fBb\fP [\fB0\fP|\fB1\fP] +[\fBmeshif\fP \fInetdev\fP] \fBbonding\fP|\fBb\fP [\fI0\fP|\fI1\fP] If no parameter is given the current bonding mode setting is displayed. Otherwise the parameter is used to enable or disable the bonding mode. .TP @@ -99,38 +109,38 @@ the bonding mode. batctl will monitor for events from the netlink kernel interface of batman-adv. The local timestamp of the event will be printed when parameter \fB\-t\fP is specified. Parameter \fB\-r\fP will do the same but with relative timestamps. .TP -\fBhardif \fP \fBelp_interval\fP|\fBet\fP [\fBinterval\fP] +\fBhardif\fP \fIhardif\fP \fBelp_interval\fP|\fBet\fP [\fIinterval\fP] If no parameter is given the current ELP interval setting of the hard interface is displayed otherwise the parameter is used to set the ELP interval. The interval is in units of milliseconds. .TP -[\fBmeshif \fP] \fBfragmentation\fP|\fBf\fP [\fB0\fP|\fB1\fP] +[\fBmeshif\fP \fInetdev\fP] \fBfragmentation\fP|\fBf\fP [\fI0\fP|\fI1\fP] If no parameter is given the current fragmentation mode setting is displayed. Otherwise the parameter is used to enable or disable fragmentation. .TP -[\fBmeshif \fP] \fBhop_penalty\fP|\fBhp\fP [\fBpenalty\fP] +[\fBmeshif\fP \fInetdev\fP] \fBhop_penalty\fP|\fBhp\fP [\fIpenalty\fP] If no parameter is given the current hop penalty setting is displayed. Otherwise the parameter is used to set the hop penalty. The penalty is can be 0-255 (255 sets originator message's TQ to zero when forwarded by this hop). .TP -[\fBhardif \fP] \fBhop_penalty\fP|\fBhp\fP [\fBpenalty\fP] +[\fBhardif\fP \fIhardif\fP] \fBhop_penalty\fP|\fBhp\fP [\fIpenalty\fP] If no parameter is given the current hop penalty setting of the hard interface is displayed. Otherwise the parameter is used to set the hop penalty. The penalty can be 0-255 (255 sets originator message's TQ to zero when forwarded over this interface). .TP -[\fBmeshif \fP] \fBnetwork_coding\fP|\fBnc\fP [\fB0\fP|\fB1\fP] +[\fBmeshif\fP \fInetdev\fP] \fBnetwork_coding\fP|\fBnc\fP [\fI0\fP|\fI1\fP] If no parameter is given the current network coding mode setting is displayed. Otherwise the parameter is used to enable or disable network coding. .TP -[\fBmeshif \fP] \fBmulticast_forceflood\fP|\fBmff\fP [\fB0\fP|\fB1\fP] +[\fBmeshif\fP \fInetdev\fP] \fBmulticast_forceflood\fP|\fBmff\fP [\fI0\fP|\fI1\fP] If no parameter is given the current multicast forceflood setting is displayed. Otherwise the parameter is used to enable or disable multicast forceflood. This setting defines whether multicast optimizations should be replaced by simple broadcast-like flooding of multicast packets. If set to non-zero then all nodes in the mesh are going to use classic flooding for any multicast packet with no optimizations. .TP -[\fBmeshif \fP] \fBmulticast_fanout\fP|\fBmo\fP [\fBfanout\fP] +[\fBmeshif\fP \fInetdev\fP] \fBmulticast_fanout\fP|\fBmo\fP [\fIfanout\fP] If no parameter is given the current multicast fanout setting is displayed. Otherwise the parameter is used to set the multicast fanout. The multicast fanout defines the maximum number of packet copies that may be generated for a multicast-to-unicast conversion. Once this limit is exceeded distribution will fall back to broadcast. .TP -[\fBmeshif \fP] \fBloglevel\fP|\fBll\fP [\fBlevel\fP[ \fBlevel\fP[ \fBlevel\fP]] \fB...\fP] +[\fBmeshif\fP \fInetdev\fP] \fBloglevel\fP|\fBll\fP [\fIlevel\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. Level 'routes' enables messages related to routes being added / changed / deleted. Level 'tt' enables messages related to @@ -140,7 +150,7 @@ Level 'mcast' enables messages related to multicast optimizations. Level 'tp' en Level 'all' enables all messages. The messages are sent to the kernels trace buffers. Use \fBtrace-cmd stream -e batadv:batadv_dbg\fP to receive the system wide log messages. .TP -[\fBmeshif \fP] \fBgw_mode|gw\fP [\fBoff\fP|\fBclient\fP|\fBserver\fP] [\fBsel_class|bandwidth\fP]\fP +[\fBmeshif\fP \fInetdev\fP] \fBgw_mode|gw\fP [\fBoff\fP|\fBclient\fP|\fBserver\fP] [\fIsel_class\fP|\fIbandwidth\fP] If no parameter is given the current gateway mode is displayed otherwise the parameter is used to set the gateway mode. The second (optional) argument specifies the selection class (if 'client' was the first argument) or the gateway bandwidth (if 'server' was the first argument). If the node is a server this parameter is used to inform other nodes in the network about @@ -207,19 +217,19 @@ gateway or the maximum bandwidth across the entire path. .RE .br .TP -\fBrouting_algo\fP|\fBra\fP [\fBalgorithm\fP]\fP +\fBrouting_algo\fP|\fBra\fP [\fIalgorithm\fP] If no parameter is given the current routing algorithm configuration as well as supported routing algorithms are displayed. Otherwise the parameter is used to select the routing algorithm for the following batX interface to be created. .TP -\fBhardif \fP \fBthroughput_override|to\fP [\fBbandwidth\fP]\fP +\fBhardif\fP \fIhardif\fP \fBthroughput_override|to\fP [\fIbandwidth\fP] If no parameter is given the current througput override is displayed otherwise the parameter is used to set the throughput override for the specified hard interface. Just enter any number (optionally followed by "kbit" or "mbit"). .TP -[\fBmeshif \fP] \fBisolation_mark\fP|\fBmark\fP +[\fBmeshif\fP \fInetdev\fP] \fBisolation_mark\fP|\fBmark\fP [\fIvalue\fP[/\fImask\fP]] If no parameter is given the current isolation mark value is displayed. Otherwise the parameter is used to set or unset the isolation mark used by the Extended Isolation feature. @@ -322,12 +332,12 @@ transtable_local_json|tlj vlan_json|vj .RE .TP -[\fBmeshif \fP] \fBtranslate\fP|\fBt\fP \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIP_address\fP +[\fBmeshif\fP \fInetdev\fP] \fBtranslate\fP|\fBt\fP \fIMAC_address\fP|\fIbat\-host_name\fP|\fIhost_name\fP|\fIIP_address\fP Translates a destination (hostname, IP, MAC, bat_host-name) to the originator mac address responsible for it. .TP -[\fBmeshif \fP] \fBstatistics\fP|\fBs\fP +[\fBmeshif\fP \fInetdev\fP] \fBstatistics\fP|\fBs\fP Retrieve traffic counters from batman-adv kernel module. The output may vary depending on which features have been compiled into the kernel module. .br @@ -344,7 +354,7 @@ T} .TE All counters without a prefix concern payload (pure user data) traffic. .TP -[\fBmeshif \fP] \fBping\fP|\fBp\fP [\fB\-c count\fP][\fB\-i interval\fP][\fB\-t time\fP][\fB\-R\fP][\fB\-T\fP] \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIP_address\fP +[\fBmeshif\fP \fInetdev\fP] \fBping\fP|\fBp\fP [\fB\-c\fP \fIcount\fP][\fB\-i\fP \fIinterval\fP][\fB\-t\fP \fItime\fP][\fB\-R\fP][\fB\-T\fP] \fIMAC_address\fP|\fIbat\-host_name\fP|\fIhost_name\fP|\fIIP_address\fP Layer 2 ping of a MAC address or bat\-host name. batctl will try to find the bat\-host name if the given parameter was not a MAC address. It can also try to guess the MAC address using an IPv4/IPv6 address or a hostname when the IPv4/IPv6 address was configured on top of the batman-adv interface of the destination device and both source and @@ -355,7 +365,7 @@ interval between pings and the timeout time for replies, both in seconds. When r messages will be recorded. With "\-T" you can disable the automatic translation of a client MAC address to the originator address which is responsible for this client. .TP -[\fBmeshif \fP] \fBtraceroute\fP|\fBtr\fP [\fB\-n\fP][\fB\-T\fP] \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIP_address\fP +[\fBmeshif\fP \fInetdev\fP] \fBtraceroute\fP|\fBtr\fP [\fB\-n\fP][\fB\-T\fP] \fIMAC_address\fP|\fIbat\-host_name\fP|\fIhost_name\fP|\fIIP_address\fP Layer 2 traceroute to a MAC address or bat\-host name. batctl will try to find the bat\-host name if the given parameter was not a MAC address. It can also try to guess the MAC address using an IPv4/IPv6 address or a hostname when the IPv4/IPv6 address was configured on top of the batman-adv interface of the destination device and both source and @@ -364,7 +374,7 @@ batctl will send 3 packets to each host and display the response time. If "\-n" not replace the MAC addresses with bat\-host names in the output. With "\-T" you can disable the automatic translation of a client MAC address to the originator address which is responsible for this client. .TP -\fBtcpdump\fP|\fBtd\fP [\fB\-c\fP][\fB\-n\fP][\fB\-p filter\fP][\fB\-x filter\fP] \fBinterface ...\fP +\fBtcpdump\fP|\fBtd\fP [\fB\-c\fP][\fB\-n\fP][\fB\-p\fP \fIfilter\fP][\fB\-x\fP \fIfilter\fP] \fBinterface ...\fP batctl will display all packets that are seen on the given interface(s). A variety of options to filter the output are available: To only print packets that match the compatibility number of batctl specify the "\-c" (compat filter) option. If "\-n" is given batctl will not replace the MAC addresses with bat\-host names in the output. To filter @@ -402,7 +412,7 @@ T} Example: batctl td \-p 129 \-> only display batman ogm packets and non batman packets .TP -\fBbisect_iv\fP [\fB\-l MAC\fP][\fB\-t MAC\fP][\fB\-r MAC\fP][\fB\-s min\fP [\fB\- max\fP]][\fB\-o MAC\fP][\fB\-n\fP] \fBlogfile1\fP [\fBlogfile2\fP ... \fBlogfileN\fP] +\fBbisect_iv\fP [\fB\-l MAC\fP][\fB\-t\fP \fIMAC\fP][\fB\-r\fP \fIMAC\fP][\fB\-s\fP \fImin\fP [\- \fImax\fP]][\fB\-o\fP \fIMAC\fP][\fB\-n\fP] \fIlogfile1\fP ... Analyses the B.A.T.M.A.N. IV logfiles to build a small internal database of all sent sequence numbers and routing table changes. This database can then be analyzed in a number of different ways. With "\-l" the database can be used to search for routing loops. Use "\-t" to trace OGMs of a host throughout the network. Use "\-r" to display routing tables of the @@ -411,7 +421,7 @@ specific sequence number, min. Furthermore using "\-o" you can filter the output given batctl will not replace the MAC addresses with bat\-host names in the output. .RE .TP -[\fBmeshif \fP] \fBthroughputmeter\fP|\fBtp\fP \fBMAC\fP +[\fBmeshif\fP \fInetdev\fP] \fBthroughputmeter\fP|\fBtp\fP \fIMAC\fP This command starts a throughput test entirely controlled by batman module in kernel space: the computational resources needed to align memory and copy data between user and kernel space that are required by other user space tools may From patchwork Sat Jul 17 11:01:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 18366 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from diktynna.open-mesh.org (localhost [IPv6:::1]) by diktynna.open-mesh.org (Postfix) with ESMTP id E646D824C0; Sat, 17 Jul 2021 13:12:00 +0200 (CEST) Received: from dvalin.narfation.org (dvalin.narfation.org [213.160.73.56]) by diktynna.open-mesh.org (Postfix) with ESMTPS id 39ECF8129F for ; Sat, 17 Jul 2021 13:11:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org; s=20121; t=1626519695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+JirC6zJp36OVaNL5uLrBLjtPdWMIPSYEIZ4P0dOHbQ=; b=gopO5wAuUOQPBllEV8OdfLv5wpi2O1m88tMtN+vLV7usOuDMnchh9lpohQyzSwVqpZUYDH G3kIa/iYc8G5IeooCuu9tzImlMqx67S+FUKglSepF3VOo8/NhCo59ti8v4cZtTY3Uz9d2W eQ2AVS6lmfh4s5W3SyiWdaBXPzAdCjQ= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Cc: Sven Eckelmann Subject: [PATCH 7/9] batctl: man: Add example section Date: Sat, 17 Jul 2021 13:01:27 +0200 Message-Id: <20210717110129.25539-8-sven@narfation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210717110129.25539-1-sven@narfation.org> References: <20210717110129.25539-1-sven@narfation.org> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1626520275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=+JirC6zJp36OVaNL5uLrBLjtPdWMIPSYEIZ4P0dOHbQ=; b=TdX+osAPE9lgao6o3xYM0BPm4GM1DyXVU/5dFaCb153OkY2Mwq0XaQO1pKYFQIPBo5yczn 0UWw1p2FiljzJnCKrWYP/UZzr/UvoX4kotvdHTKxBqq9n7QFQbDCyAHTRR8SW2pPfKfktQ Kc2m4mt3gBj6q3toZILQEkolx9wu74Q= ARC-Seal: i=1; s=20121; d=open-mesh.org; t=1626520275; a=rsa-sha256; cv=none; b=TxQPSLERa1xg4o7nW7o3SM4TJymSlcXt59UIr5qLxs1DW/Rc4LVWFIhIAOV+5lbiMQkhKo g25Eg0JUcQA8kWDXZ6o5N+ZNA3Iao3RmPovs2Md8VHi/y24e/ATvoa3RqUdIPbIE1TCArc Zoj+VHFboYJp5EhtGEG3xprScnrMep0= ARC-Authentication-Results: i=1; diktynna.open-mesh.org; dkim=pass header.d=narfation.org header.s=20121 header.b=gopO5wAu; spf=pass (diktynna.open-mesh.org: domain of sven@narfation.org designates 213.160.73.56 as permitted sender) smtp.mailfrom=sven@narfation.org Message-ID-Hash: 3TF2LFJIA43O6NKIM6Z7UVHRLOQ7JTTC X-Message-ID-Hash: 3TF2LFJIA43O6NKIM6Z7UVHRLOQ7JTTC X-MailFrom: sven@narfation.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-b.a.t.m.a.n.lists.open-mesh.org-0; header-match-b.a.t.m.a.n.lists.open-mesh.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 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 Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: A very simple example can help users to figure out how to get a very simple mesh running. This allows to figure out the correct order of commands directly from the manpage without needing additional (maybe currently unreachable) resources from the internet. Signed-off-by: Sven Eckelmann --- man/batctl.8 | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/man/batctl.8 b/man/batctl.8 index 009494f..4cc55f9 100644 --- a/man/batctl.8 +++ b/man/batctl.8 @@ -437,6 +437,65 @@ together with the experiment duration in millisecond and the amount of bytes transferred. If too many packets are lost or the specified MAC address is not reachable, a message notifying the error is returned instead of the result. +.SH EXAMPLES +The setup of a batadv interface usually consists of creation of the the main +interface, attaching of the (lower) hard-interface, adjusting of settings +and bringup of the interface: +.PP +.in +4n +.EX +# create batadv (mesh) interface bat0 with routing algorithm B.A.T.M.A.N. IV +.RB "$" " batctl meshif bat0 interface create routing_algo BATMAN_IV" +# add the (already up and running) mesh0 interface as lower (hard) interface to bat0 +.RB "$" " batctl meshif bat0 interface -M add mesh0" +# change some settings to better match the requirements of the user +.RB "$" " batctl meshif bat0 orig_interval 5000" +.RB "$" " batctl meshif bat0 distributed_arp_table disable" +.RB "..." +# set the batadv (mesh) interface up before it is possible to use it +.RB "$" " ip link set up dev bat0" +.EE +.in + +This only makes sure that the layer 2 functionality of bat0 is started up. It +is the responsibility of the user to make sure that the bat0 device itself +gets attached to a bridge, configured with an IP address (manually/DHCP client/...) +or integrated in other parts of the system before it gets used. +.PP +Also the attached (lower) hard-interfaces attached to the batadv interface must +be configured by the user to support transportation of ethernet unicast and +broadcast packets between its linked peers. The most common reason for a not +working batman-adv mesh are incorrect configurations of the hard-interfaces, +hardware, firmware or driver bugs which prevent that some of the packet types +are correctly exchanged. +.PP +The current status of interface can be checked using the debug tables. It is +often relevant to check from which direct neighbors discovery packets were +received. +The next step is to check the (preferred) routes to originators. These will +only be established when the metric has detected bidirectional connections +between neighbors and might have forwarded discovery packets from not directly +reachable nodes/originators. +.PP +.in +4n +.EX +# get list of neighbors from which the current node was able to receive discovery packets +.RB "$" " batctl meshif bat0 neighbors" +# get (preferred) routes the routing algorithm found +.RB "$" " batctl meshif bat0 originators" +.EE +.in +.PP +If the bat0 interface should no longer used by the system, it can be destroyed +again: +.PP +.in +4n +.EX +# destroy the interface and let the system remove its state +.RB "$" " batctl meshif bat0 interface destroy" +.EE +.in + .SH FILES .TP \fBbat-hosts\fP @@ -444,6 +503,7 @@ This file is similar to the /etc/hosts file. You can write one MAC address and o for bat-hosts in /etc, your home directory and the current directory. The found data is used to match MAC address to your provided host name or replace MAC addresses in debug output and logs. Host names are much easier to remember than MAC addresses. + .SH SEE ALSO .BR ping (1), .BR traceroute (1), From patchwork Sat Jul 17 11:01:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 18364 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from diktynna.open-mesh.org (localhost [IPv6:::1]) by diktynna.open-mesh.org (Postfix) with ESMTP id DB877824A5; Sat, 17 Jul 2021 13:11:48 +0200 (CEST) Received: from dvalin.narfation.org (dvalin.narfation.org [213.160.73.56]) by diktynna.open-mesh.org (Postfix) with ESMTPS id 3DE44814EE for ; Sat, 17 Jul 2021 13:11:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org; s=20121; t=1626519695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=guX0RuJ7i89DXn6ZTkyHmh+5COUaOHj+NzGHGDRfuA8=; b=dKBZDnebUcYR6qUo4zzBHHH71ojYdCHwBGo0FRBZMqs4v+EybTbHl/rM85p6tfgfGraBN4 IIwjXASTkzAIXdtMZai+wDBcd766ATkZGbRS0Vy6BLYuVJDuZFYkptz8cnESAeKmV1uAyd ggglmbvKqQro6KH32diYe9jl7+2rvwU= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Cc: Sven Eckelmann Subject: [PATCH 8/9] batctl: man: Reorder and restructure sections Date: Sat, 17 Jul 2021 13:01:28 +0200 Message-Id: <20210717110129.25539-9-sven@narfation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210717110129.25539-1-sven@narfation.org> References: <20210717110129.25539-1-sven@narfation.org> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1626520275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=guX0RuJ7i89DXn6ZTkyHmh+5COUaOHj+NzGHGDRfuA8=; b=EdqCYqycrYDe2B2d6/4NShNW1N9lSNWWFoYdeXe+jTPqEVriXm93AwxRO6+A3lTbTdZZhx g11wptv//0O1DCec5BRPL8WoJgdN654deGLdWzeBNEUxTrU8mk0h/vhPPmptkdqr66KJRN ZRs9jfdhYD7dBjz/q+PgKP/hRW1yIVY= ARC-Seal: i=1; s=20121; d=open-mesh.org; t=1626520275; a=rsa-sha256; cv=none; b=m/+hnUq7GFl8uDyUF+nctXAl2rqm2rrt+SDAERokQtupi3wGWHyZRlbqeZcdkw+23C/Tjm imx/v9yj6AbANpkNmABQdSM8UigG1KeJbW/GNOvbi3OVtwUaTvvOwQ7ABug4SdXgyv7FvR ttymnUzZSBbcGWS+756tT5EHmZDb3Y0= ARC-Authentication-Results: i=1; diktynna.open-mesh.org; dkim=pass header.d=narfation.org header.s=20121 header.b=dKBZDneb; spf=pass (diktynna.open-mesh.org: domain of sven@narfation.org designates 213.160.73.56 as permitted sender) smtp.mailfrom=sven@narfation.org Message-ID-Hash: 5QZBRHKERRC327K6FG4IYZSI52PKCN5T X-Message-ID-Hash: 5QZBRHKERRC327K6FG4IYZSI52PKCN5T X-MailFrom: sven@narfation.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-b.a.t.m.a.n.lists.open-mesh.org-0; header-match-b.a.t.m.a.n.lists.open-mesh.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 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 Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: The number of subcommands in batctl increased dramatically in the recent years. But the documentation to the various commands was just added to random positions in the manpage. This made it harder than necessary to look things up. This can be improved by: * split the subcommand types in different classes to keep similar functionality next to each other * order subcommands alphabetically Signed-off-by: Sven Eckelmann --- man/batctl.8 | 441 ++++++++++++++++++++++++++------------------------- 1 file changed, 221 insertions(+), 220 deletions(-) diff --git a/man/batctl.8 b/man/batctl.8 index 4cc55f9..1470beb 100644 --- a/man/batctl.8 +++ b/man/batctl.8 @@ -55,6 +55,19 @@ print batctl version and batman-adv version (if the module is loaded) .SH COMMANDS +.TP +\fBbisect_iv\fP [\fB\-l MAC\fP][\fB\-t\fP \fIMAC\fP][\fB\-r\fP \fIMAC\fP][\fB\-s\fP \fImin\fP [\- \fImax\fP]][\fB\-o\fP \fIMAC\fP][\fB\-n\fP] \fIlogfile1\fP ... +Analyses the B.A.T.M.A.N. IV logfiles to build a small internal database of all sent sequence numbers and routing table +changes. This database can then be analyzed in a number of different ways. With "\-l" the database can be used to search +for routing loops. Use "\-t" to trace OGMs of a host throughout the network. Use "\-r" to display routing tables of the +nodes. The option "\-s" can be used to limit the output to a range of sequence numbers, between min and max, or to one +specific sequence number, min. Furthermore using "\-o" you can filter the output to a specified originator. If "\-n" is +given batctl will not replace the MAC addresses with bat\-host names in the output. +.RE +.TP +\fBevent\fP|\fBe\fP [\fB\-t\fP|\fB\-r\fP] +batctl will monitor for events from the netlink kernel interface of batman-adv. The local timestamp of the event will be printed +when parameter \fB\-t\fP is specified. Parameter \fB\-r\fP will do the same but with relative timestamps. .TP [\fBmeshif\fP \fInetdev\fP] \fBinterface\fP|\fBif\fP .TQ @@ -72,9 +85,112 @@ can be used to overwrite the (default) routing algorithm. [\fBmeshif\fP \fInetdev\fP] \fBinterface\fP|\fBif\fP \fBdestroy\fP Remove all attached interfaces and destroy the batman-adv interface. .TP -[\fBmeshif\fP \fInetdev\fP] \fBorig_interval\fP|\fBit\fP [\fIinterval\fP] -If no parameter is given the current originator interval setting is displayed otherwise the parameter is used to set the -originator interval. The interval is in units of milliseconds. +[\fBmeshif\fP \fInetdev\fP] \fBping\fP|\fBp\fP [\fB\-c\fP \fIcount\fP][\fB\-i\fP \fIinterval\fP][\fB\-t\fP \fItime\fP][\fB\-R\fP][\fB\-T\fP] \fIMAC_address\fP|\fIbat\-host_name\fP|\fIhost_name\fP|\fIIP_address\fP +Layer 2 ping of a MAC address or bat\-host name. batctl will try to find the bat\-host name if the given parameter was +not a MAC address. It can also try to guess the MAC address using an IPv4/IPv6 address or a hostname when +the IPv4/IPv6 address was configured on top of the batman-adv interface of the destination device and both source and +destination devices are in the same IP subnet. +The "\-c" option tells batctl how man pings should be sent before the program exits. Without the "\-c" +option batctl will continue pinging without end. Use CTRL + C to stop it. With "\-i" and "\-t" you can set the default +interval between pings and the timeout time for replies, both in seconds. When run with "\-R", the route taken by the ping +messages will be recorded. With "\-T" you can disable the automatic translation of a client MAC address to the originator +address which is responsible for this client. +.TP +\fBrouting_algo\fP|\fBra\fP [\fIalgorithm\fP] +If no parameter is given the current routing algorithm configuration as well as +supported routing algorithms are displayed. +Otherwise the parameter is used to select the routing algorithm for the following +batX interface to be created. +.TP +[\fBmeshif\fP \fInetdev\fP] \fBstatistics\fP|\fBs\fP +Retrieve traffic counters from batman-adv kernel module. The output may vary depending on which features have been compiled +into the kernel module. +.br +Each module subsystem has its own counters which are indicated by their prefixes: +.TS +tab (@); +r lx. +mgmt@T{ +mesh protocol counters +T} +tt@T{ +translation table counters +T} +.TE +All counters without a prefix concern payload (pure user data) traffic. +.TP +\fBtcpdump\fP|\fBtd\fP [\fB\-c\fP][\fB\-n\fP][\fB\-p\fP \fIfilter\fP][\fB\-x\fP \fIfilter\fP] \fBinterface ...\fP +batctl will display all packets that are seen on the given interface(s). A variety of options to filter the output +are available: To only print packets that match the compatibility number of batctl specify the "\-c" (compat filter) +option. If "\-n" is given batctl will not replace the MAC addresses with bat\-host names in the output. To filter +the shown packet types you can either use "\-p" (dump only specified packet types) or "\-x" (dump all packet types +except specified). The following packet types are available: + +.TS +tab (@); +r lx. +1@T{ +batman ogm packets +T} +2@T{ +batman icmp packets +T} +4@T{ +batman unicast packets +T} +8@T{ +batman broadcast packets +T} +16@T{ +batman unicast tvlv packets +T} +32@T{ +batman fragmented packets +T} +64@T{ +batman tt / roaming packets +T} +128@T{ +non batman packets +T} +.TE +Example: batctl td \-p 129 \-> only display batman ogm packets and non batman packets +.TP +[\fBmeshif\fP \fInetdev\fP] \fBthroughputmeter\fP|\fBtp\fP \fIMAC\fP +This command starts a throughput test entirely controlled by batman module in +kernel space: the computational resources needed to align memory and copy data +between user and kernel space that are required by other user space tools may +represent a bottleneck on some low profile device. + +The test consist of the transfer of 14 MB of data between the two nodes. The +protocol used to transfer the data is somehow similar to TCP, but simpler: some +TCP features are still missing, thus protocol performances could be worst. Since +a fixed amount of data is transferred the experiment duration depends on the +network conditions. The experiment can be interrupted with CTRL + C. At the end +of a successful experiment the throughput in KBytes per second is returned, +together with the experiment duration in millisecond and the amount of bytes +transferred. If too many packets are lost or the specified MAC address is not +reachable, a message notifying the error is returned instead of the result. +.TP +[\fBmeshif\fP \fInetdev\fP] \fBtraceroute\fP|\fBtr\fP [\fB\-n\fP][\fB\-T\fP] \fIMAC_address\fP|\fIbat\-host_name\fP|\fIhost_name\fP|\fIIP_address\fP +Layer 2 traceroute to a MAC address or bat\-host name. batctl will try to find the bat\-host name if the given parameter +was not a MAC address. It can also try to guess the MAC address using an IPv4/IPv6 address or a hostname when +the IPv4/IPv6 address was configured on top of the batman-adv interface of the destination device and both source and +destination devices are in the same IP subnet. +batctl will send 3 packets to each host and display the response time. If "\-n" is given batctl will +not replace the MAC addresses with bat\-host names in the output. With "\-T" you can disable the automatic translation +of a client MAC address to the originator address which is responsible for this client. +.TP +[\fBmeshif\fP \fInetdev\fP] \fBtranslate\fP|\fBt\fP \fIMAC_address\fP|\fIbat\-host_name\fP|\fIhost_name\fP|\fIIP_address\fP +Translates a destination (hostname, IP, MAC, bat_host-name) to the originator +mac address responsible for it. + +.SH SETTINGS + +.TP +[\fBmeshif\fP \fInetdev\fP] \fBaggregation\fP|\fBag\fP [\fI0\fP|\fI1\fP] +If no parameter is given the current aggregation setting is displayed. Otherwise the parameter is used to enable or disable +OGM packet aggregation. .TP [\fBmeshif\fP \fInetdev\fP] \fBap_isolation\fP|\fBap\fP [\fI0\fP|\fI1\fP] If no parameter is given the current ap isolation setting is displayed. Otherwise the parameter is used to enable or @@ -88,6 +204,10 @@ disable ap isolation. If no parameter is given the current ap isolation setting for the specified VLAN is displayed. Otherwise the parameter is used to enable or disable ap isolation for the specified VLAN. .TP +[\fBmeshif\fP \fInetdev\fP] \fBbonding\fP|\fBb\fP [\fI0\fP|\fI1\fP] +If no parameter is given the current bonding mode setting is displayed. Otherwise the parameter is used to enable or disable +the bonding mode. +.TP [\fBmeshif\fP \fInetdev\fP] \fBbridge_loop_avoidance\fP|\fBbl\fP [\fI0\fP|\fI1\fP] If no parameter is given the current bridge loop avoidance setting is displayed. Otherwise the parameter is used to enable or disable the bridge loop avoidance. Bridge loop avoidance support has to be enabled when compiling the module otherwise @@ -97,18 +217,6 @@ this option won't be available. If no parameter is given the current distributed arp table setting is displayed. Otherwise the parameter is used to enable or disable the distributed arp table. .TP -[\fBmeshif\fP \fInetdev\fP] \fBaggregation\fP|\fBag\fP [\fI0\fP|\fI1\fP] -If no parameter is given the current aggregation setting is displayed. Otherwise the parameter is used to enable or disable -OGM packet aggregation. -.TP -[\fBmeshif\fP \fInetdev\fP] \fBbonding\fP|\fBb\fP [\fI0\fP|\fI1\fP] -If no parameter is given the current bonding mode setting is displayed. Otherwise the parameter is used to enable or disable -the bonding mode. -.TP -\fBevent\fP|\fBe\fP [\fB\-t\fP|\fB\-r\fP] -batctl will monitor for events from the netlink kernel interface of batman-adv. The local timestamp of the event will be printed -when parameter \fB\-t\fP is specified. Parameter \fB\-r\fP will do the same but with relative timestamps. -.TP \fBhardif\fP \fIhardif\fP \fBelp_interval\fP|\fBet\fP [\fIinterval\fP] If no parameter is given the current ELP interval setting of the hard interface is displayed otherwise the parameter is used to set the ELP interval. The interval is in units of milliseconds. @@ -117,39 +225,6 @@ ELP interval. The interval is in units of milliseconds. If no parameter is given the current fragmentation mode setting is displayed. Otherwise the parameter is used to enable or disable fragmentation. .TP -[\fBmeshif\fP \fInetdev\fP] \fBhop_penalty\fP|\fBhp\fP [\fIpenalty\fP] -If no parameter is given the current hop penalty setting is displayed. Otherwise the parameter is used to set the -hop penalty. The penalty is can be 0-255 (255 sets originator message's TQ to zero when forwarded by this hop). -.TP -[\fBhardif\fP \fIhardif\fP] \fBhop_penalty\fP|\fBhp\fP [\fIpenalty\fP] -If no parameter is given the current hop penalty setting of the hard interface is displayed. Otherwise the parameter is used to set the -hop penalty. The penalty can be 0-255 (255 sets originator message's TQ to zero when forwarded over this interface). -.TP -[\fBmeshif\fP \fInetdev\fP] \fBnetwork_coding\fP|\fBnc\fP [\fI0\fP|\fI1\fP] -If no parameter is given the current network coding mode setting is displayed. Otherwise the parameter is used to enable or -disable network coding. -.TP -[\fBmeshif\fP \fInetdev\fP] \fBmulticast_forceflood\fP|\fBmff\fP [\fI0\fP|\fI1\fP] -If no parameter is given the current multicast forceflood setting is displayed. Otherwise the parameter is used to enable or -disable multicast forceflood. This setting defines whether multicast optimizations should be replaced by simple broadcast-like -flooding of multicast packets. If set to non-zero then all nodes in the mesh are going to use classic flooding for any -multicast packet with no optimizations. -.TP -[\fBmeshif\fP \fInetdev\fP] \fBmulticast_fanout\fP|\fBmo\fP [\fIfanout\fP] -If no parameter is given the current multicast fanout setting is displayed. Otherwise the parameter is used to set -the multicast fanout. The multicast fanout defines the maximum number of packet copies that may be generated for a -multicast-to-unicast conversion. Once this limit is exceeded distribution will fall back to broadcast. -.TP -[\fBmeshif\fP \fInetdev\fP] \fBloglevel\fP|\fBll\fP [\fIlevel\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. -Level 'routes' enables messages related to routes being added / changed / deleted. Level 'tt' enables messages related to -translation table operations. Level 'bla' enables messages related to the bridge loop avoidance. Level 'dat' enables -messages related to ARP snooping and the Distributed Arp Table. Level 'nc' enables messages related to network coding. -Level 'mcast' enables messages related to multicast optimizations. Level 'tp' enables messages related to throughput meter. -Level 'all' enables all messages. The messages are sent to the kernels trace buffers. Use \fBtrace-cmd stream -e batadv:batadv_dbg\fP -to receive the system wide log messages. -.TP [\fBmeshif\fP \fInetdev\fP] \fBgw_mode|gw\fP [\fBoff\fP|\fBclient\fP|\fBserver\fP] [\fIsel_class\fP|\fIbandwidth\fP] If no parameter is given the current gateway mode is displayed otherwise the parameter is used to set the gateway mode. The second (optional) argument specifies the selection class (if 'client' was the first argument) or the gateway bandwidth (if 'server' @@ -217,17 +292,13 @@ gateway or the maximum bandwidth across the entire path. .RE .br .TP -\fBrouting_algo\fP|\fBra\fP [\fIalgorithm\fP] -If no parameter is given the current routing algorithm configuration as well as -supported routing algorithms are displayed. -Otherwise the parameter is used to select the routing algorithm for the following -batX interface to be created. +[\fBmeshif\fP \fInetdev\fP] \fBhop_penalty\fP|\fBhp\fP [\fIpenalty\fP] +If no parameter is given the current hop penalty setting is displayed. Otherwise the parameter is used to set the +hop penalty. The penalty is can be 0-255 (255 sets originator message's TQ to zero when forwarded by this hop). .TP -\fBhardif\fP \fIhardif\fP \fBthroughput_override|to\fP [\fIbandwidth\fP] -If no parameter is given the current througput override is displayed otherwise -the parameter is used to set the throughput override for the specified hard -interface. -Just enter any number (optionally followed by "kbit" or "mbit"). +[\fBhardif\fP \fIhardif\fP] \fBhop_penalty\fP|\fBhp\fP [\fIpenalty\fP] +If no parameter is given the current hop penalty setting of the hard interface is displayed. Otherwise the parameter is used to set the +hop penalty. The penalty can be 0-255 (255 sets originator message's TQ to zero when forwarded over this interface). .TP [\fBmeshif\fP \fInetdev\fP] \fBisolation_mark\fP|\fBmark\fP [\fIvalue\fP[/\fImask\fP]] If no parameter is given the current isolation mark value is displayed. @@ -249,22 +320,58 @@ Example 2: 0x00040000/0xffff0000 Example 3: 16 or 0x0F .br .TP -\fBdebug tables:\fP +[\fBmeshif\fP \fInetdev\fP] \fBloglevel\fP|\fBll\fP [\fIlevel\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. +Level 'routes' enables messages related to routes being added / changed / deleted. Level 'tt' enables messages related to +translation table operations. Level 'bla' enables messages related to the bridge loop avoidance. Level 'dat' enables +messages related to ARP snooping and the Distributed Arp Table. Level 'nc' enables messages related to network coding. +Level 'mcast' enables messages related to multicast optimizations. Level 'tp' enables messages related to throughput meter. +Level 'all' enables all messages. The messages are sent to the kernels trace buffers. Use \fBtrace-cmd stream -e batadv:batadv_dbg\fP +to receive the system wide log messages. +.TP +[\fBmeshif\fP \fInetdev\fP] \fBmulticast_fanout\fP|\fBmo\fP [\fIfanout\fP] +If no parameter is given the current multicast fanout setting is displayed. Otherwise the parameter is used to set +the multicast fanout. The multicast fanout defines the maximum number of packet copies that may be generated for a +multicast-to-unicast conversion. Once this limit is exceeded distribution will fall back to broadcast. +.TP +[\fBmeshif\fP \fInetdev\fP] \fBmulticast_forceflood\fP|\fBmff\fP [\fI0\fP|\fI1\fP] +If no parameter is given the current multicast forceflood setting is displayed. Otherwise the parameter is used to enable or +disable multicast forceflood. This setting defines whether multicast optimizations should be replaced by simple broadcast-like +flooding of multicast packets. If set to non-zero then all nodes in the mesh are going to use classic flooding for any +multicast packet with no optimizations. +.TP +[\fBmeshif\fP \fInetdev\fP] \fBnetwork_coding\fP|\fBnc\fP [\fI0\fP|\fI1\fP] +If no parameter is given the current network coding mode setting is displayed. Otherwise the parameter is used to enable or +disable network coding. +.TP +[\fBmeshif\fP \fInetdev\fP] \fBorig_interval\fP|\fBit\fP [\fIinterval\fP] +If no parameter is given the current originator interval setting is displayed otherwise the parameter is used to set the +originator interval. The interval is in units of milliseconds. +.TP +\fBhardif\fP \fIhardif\fP \fBthroughput_override|to\fP [\fIbandwidth\fP] +If no parameter is given the current througput override is displayed otherwise +the parameter is used to set the throughput override for the specified hard +interface. +Just enter any number (optionally followed by "kbit" or "mbit"). + +.SH DEBUG TABLES + The batman-adv kernel module comes with a variety of debug tables containing various information about the state of the mesh seen by each individual node. All of the debug tables support the following options: -.RS 10 -\-w refresh the list every second or add a number to let it refresh at a custom interval in seconds (with optional decimal places) -.RE -.RS 10 -\-n do not replace the MAC addresses with bat\-host names in the output -.RE -.RS 10 -\-H do not show the header of the debug table -.RE +.TP +\fB-w\fP +refresh the list every second or add a number to let it refresh at a custom interval in seconds (with optional decimal places) +.TP +\fB-n\fP +do not replace the MAC addresses with bat\-host names in the output +.TP +\fB-H\fP +do not show the header of the debug table -.RS 7 +.PP The originator table also supports the "\-t" filter option to remove all originators from the output that have not been seen for the specified amount of seconds (with optional decimal places). It furthermore supports the "\-i" parameter to specify an interface for which the originator table should be printed. If this parameter is not supplied, the default originator table @@ -272,170 +379,64 @@ is printed. The local and global translation tables also support the "\-u" and "\-m" option to only display unicast or multicast translation table announcements respectively. -List of debug tables: -.IP \(bu 2 -neighbors|n -.IP \(bu 2 -originators|o -.IP \(bu 2 -gateways|gwl -.IP \(bu 2 -translocal|tl -.IP \(bu 2 -transglobal|tg -.IP \(bu 2 -claimtable|cl (compile time option) -.IP \(bu 2 -backbonetable|bbt (compile time option) -.IP \(bu 2 -dat_cache|dc (compile time option) -.IP \(bu 2 -mcast_flags|mf (compile time option) -.RE -.br -.br .TP -\fBJSON queries:\fP +[\fBmeshif\fP \fInetdev\fP] \fBbackbonetable\fP|\fBbbt\fP [\fB-n\fP] [\fB-H\fP] [\fB-w\fP \fIinterval\fP] +(compile time option) +.TP +[\fBmeshif\fP \fInetdev\fP] \fBclaimtable\fP|\fBcl\fP [\fB-n\fP] [\fB-H\fP] [\fB-w\fP \fIinterval\fP] +.TP +[\fBmeshif\fP \fInetdev\fP] \fBdat_cache\fP|\fBdc\fP [\fB-n\fP] [\fB-H\fP] [\fB-w\fP \fIinterval\fP] +(compile time option) +.TP +[\fBmeshif\fP \fInetdev\fP] \fBgateways\fP|\fBgwl\fP [\fB-n\fP] [\fB-H\fP] [\fB-w\fP \fIinterval\fP] +.TP +[\fBmeshif\fP \fInetdev\fP] \fBmcast_flags\fP|\fBmf\fP [\fB-n\fP] [\fB-H\fP] [\fB-w\fP \fIinterval\fP] +(compile time option) +.TP +[\fBmeshif\fP \fInetdev\fP] \fBneighbors\fP|\fBn\fP [\fB-n\fP] [\fB-H\fP] [\fB-w\fP \fIinterval\fP] +.TP +[\fBmeshif\fP \fInetdev\fP] \fBoriginators\fP|\fBo\fP [\fB-n\fP] [\fB-H\fP] [\fB-w\fP \fIinterval\fP] [\fB-t\fP \fItimeout_interval\fP] [\fB-i\fP \fIinterface\fP] +.TP +[\fBmeshif\fP \fInetdev\fP] \fBtransglobal\fP|\fBtg\fP [\fB-n\fP] [\fB-H\fP] [\fB-w\fP \fIinterval\fP] [\fB-u\fP] [\fB-m\fP] +(compile time option) +.TP +[\fBmeshif\fP \fInetdev\fP] \fBtranslocal\fP|\fBtl\fP [\fB-n\fP] [\fB-H\fP] [\fB-w\fP \fIinterval\fP] [\fB-u\fP] [\fB-m\fP] + +.SH JSON QUERIES + The generic netlink family provided by the batman-adv kernel module can be queried (read-only) by batctl and automatically translated to JSON. This can be used to monitor the state of the system without the need of parsing the freeform debug tables or the native netlink messages. - -.RS 7 -List of available JSON queries: -.IP \(bu 2 -bla_backbone_json|bbj -.IP \(bu 2 -bla_claim_json|clj -.IP \(bu 2 -dat_cache_json|dcj -.IP \(bu 2 -gateways_json|gwj -.IP \(bu 2 -hardif_json|hj -.IP \(bu 2 -hardifs_json|hj -.IP \(bu 2 -mcast_flags_json|mfj -.IP \(bu 2 -mesh_json|mj -.IP \(bu 2 -neighbors_json|nj -.IP \(bu 2 -originators_json|oj -.IP \(bu 2 -transtable_global_json|tgj -.IP \(bu 2 -transtable_local_json|tlj -.IP \(bu 2 -vlan_json|vj -.RE .TP -[\fBmeshif\fP \fInetdev\fP] \fBtranslate\fP|\fBt\fP \fIMAC_address\fP|\fIbat\-host_name\fP|\fIhost_name\fP|\fIIP_address\fP - -Translates a destination (hostname, IP, MAC, bat_host-name) to the originator -mac address responsible for it. +[\fBmeshif\fP \fInetdev\fP] \fBbla_backbone_json\fP|\fBbbj\fP .TP -[\fBmeshif\fP \fInetdev\fP] \fBstatistics\fP|\fBs\fP -Retrieve traffic counters from batman-adv kernel module. The output may vary depending on which features have been compiled -into the kernel module. -.br -Each module subsystem has its own counters which are indicated by their prefixes: -.TS -tab (@); -r lx. -mgmt@T{ -mesh protocol counters -T} -tt@T{ -translation table counters -T} -.TE -All counters without a prefix concern payload (pure user data) traffic. +[\fBmeshif\fP \fInetdev\fP] \fBbla_claim_json\fP|\fBclj\fP .TP -[\fBmeshif\fP \fInetdev\fP] \fBping\fP|\fBp\fP [\fB\-c\fP \fIcount\fP][\fB\-i\fP \fIinterval\fP][\fB\-t\fP \fItime\fP][\fB\-R\fP][\fB\-T\fP] \fIMAC_address\fP|\fIbat\-host_name\fP|\fIhost_name\fP|\fIIP_address\fP -Layer 2 ping of a MAC address or bat\-host name. batctl will try to find the bat\-host name if the given parameter was -not a MAC address. It can also try to guess the MAC address using an IPv4/IPv6 address or a hostname when -the IPv4/IPv6 address was configured on top of the batman-adv interface of the destination device and both source and -destination devices are in the same IP subnet. -The "\-c" option tells batctl how man pings should be sent before the program exits. Without the "\-c" -option batctl will continue pinging without end. Use CTRL + C to stop it. With "\-i" and "\-t" you can set the default -interval between pings and the timeout time for replies, both in seconds. When run with "\-R", the route taken by the ping -messages will be recorded. With "\-T" you can disable the automatic translation of a client MAC address to the originator -address which is responsible for this client. +[\fBmeshif\fP \fInetdev\fP] \fBdat_cache_json\fP|\fBdcj\fP .TP -[\fBmeshif\fP \fInetdev\fP] \fBtraceroute\fP|\fBtr\fP [\fB\-n\fP][\fB\-T\fP] \fIMAC_address\fP|\fIbat\-host_name\fP|\fIhost_name\fP|\fIIP_address\fP -Layer 2 traceroute to a MAC address or bat\-host name. batctl will try to find the bat\-host name if the given parameter -was not a MAC address. It can also try to guess the MAC address using an IPv4/IPv6 address or a hostname when -the IPv4/IPv6 address was configured on top of the batman-adv interface of the destination device and both source and -destination devices are in the same IP subnet. -batctl will send 3 packets to each host and display the response time. If "\-n" is given batctl will -not replace the MAC addresses with bat\-host names in the output. With "\-T" you can disable the automatic translation -of a client MAC address to the originator address which is responsible for this client. +[\fBmeshif\fP \fInetdev\fP] \fBgateways_json\fP|\fBgwj\fP .TP -\fBtcpdump\fP|\fBtd\fP [\fB\-c\fP][\fB\-n\fP][\fB\-p\fP \fIfilter\fP][\fB\-x\fP \fIfilter\fP] \fBinterface ...\fP -batctl will display all packets that are seen on the given interface(s). A variety of options to filter the output -are available: To only print packets that match the compatibility number of batctl specify the "\-c" (compat filter) -option. If "\-n" is given batctl will not replace the MAC addresses with bat\-host names in the output. To filter -the shown packet types you can either use "\-p" (dump only specified packet types) or "\-x" (dump all packet types -except specified). The following packet types are available: - -.TS -tab (@); -r lx. -1@T{ -batman ogm packets -T} -2@T{ -batman icmp packets -T} -4@T{ -batman unicast packets -T} -8@T{ -batman broadcast packets -T} -16@T{ -batman unicast tvlv packets -T} -32@T{ -batman fragmented packets -T} -64@T{ -batman tt / roaming packets -T} -128@T{ -non batman packets -T} -.TE -Example: batctl td \-p 129 \-> only display batman ogm packets and non batman packets - +\fBhardif\fP \fIhardif\fP \fBhardif_json\fP|\fBhj\fP .TP -\fBbisect_iv\fP [\fB\-l MAC\fP][\fB\-t\fP \fIMAC\fP][\fB\-r\fP \fIMAC\fP][\fB\-s\fP \fImin\fP [\- \fImax\fP]][\fB\-o\fP \fIMAC\fP][\fB\-n\fP] \fIlogfile1\fP ... -Analyses the B.A.T.M.A.N. IV logfiles to build a small internal database of all sent sequence numbers and routing table -changes. This database can then be analyzed in a number of different ways. With "\-l" the database can be used to search -for routing loops. Use "\-t" to trace OGMs of a host throughout the network. Use "\-r" to display routing tables of the -nodes. The option "\-s" can be used to limit the output to a range of sequence numbers, between min and max, or to one -specific sequence number, min. Furthermore using "\-o" you can filter the output to a specified originator. If "\-n" is -given batctl will not replace the MAC addresses with bat\-host names in the output. -.RE +[\fBmeshif\fP \fInetdev\fP] \fBhardifs_json\fP|\fBhj\fP .TP -[\fBmeshif\fP \fInetdev\fP] \fBthroughputmeter\fP|\fBtp\fP \fIMAC\fP -This command starts a throughput test entirely controlled by batman module in -kernel space: the computational resources needed to align memory and copy data -between user and kernel space that are required by other user space tools may -represent a bottleneck on some low profile device. - -The test consist of the transfer of 14 MB of data between the two nodes. The -protocol used to transfer the data is somehow similar to TCP, but simpler: some -TCP features are still missing, thus protocol performances could be worst. Since -a fixed amount of data is transferred the experiment duration depends on the -network conditions. The experiment can be interrupted with CTRL + C. At the end -of a successful experiment the throughput in KBytes per second is returned, -together with the experiment duration in millisecond and the amount of bytes -transferred. If too many packets are lost or the specified MAC address is not -reachable, a message notifying the error is returned instead of the result. +[\fBmeshif\fP \fInetdev\fP] \fBmcast_flags_json\fP|\fBmfj\fP +.TP +[\fBmeshif\fP \fInetdev\fP] \fBmesh_json\fP|\fBmj\fP +.TP +[\fBmeshif\fP \fInetdev\fP] \fBneighbors_json\fP|\fBnj\fP +.TP +[\fBmeshif\fP \fInetdev\fP] \fBoriginators_json\fP|\fBoj\fP +.TP +[\fBmeshif\fP \fInetdev\fP] \fBtranstable_global_json\fP|\fBtgj\fP +.TP +[\fBmeshif\fP \fInetdev\fP] \fBtranstable_local_json\fP|\fBtlj\fP +.TP +[\fBmeshif\fP \fInetdev\fP] \fBvid \fP \fBvlan_json\fP|\fBvj\fP +.TQ +\fBvlan\fP \fIvdev\fP \fBvlan_json\fP|\fBvj\fP .SH EXAMPLES The setup of a batadv interface usually consists of creation of the the main From patchwork Sat Jul 17 11:01:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 18361 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from diktynna.open-mesh.org (localhost [IPv6:::1]) by diktynna.open-mesh.org (Postfix) with ESMTP id 2D3458129F; Sat, 17 Jul 2021 13:11:31 +0200 (CEST) Received: from dvalin.narfation.org (dvalin.narfation.org [IPv6:2a00:17d8:100::8b1]) by diktynna.open-mesh.org (Postfix) with ESMTPS id 7A9F3814EE for ; Sat, 17 Jul 2021 13:11:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org; s=20121; t=1626519696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sDXQi2Mx1YcVOxhxbVnrI9+t9oFvqMn0qot5+27g/yA=; b=fcAMe1TkNJKK3f6O3HG0LLvpVoViJVgi7Pfh3ZYwHDj0FU5Ij4cwQcjBKZc3e0EjHV3VDv LhceX66w0JUNFCNkY4jnDpMN9yD740JoXBA71jZ8WvUg1Xpw1cBg+KXh+XG83AR6Y/QUkp w0ehWoAtRC0XIJs+Gg69rRKvuMei7Uo= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Cc: Sven Eckelmann Subject: [PATCH 9/9] batctl: man: Rewrite SEE ALSO list Date: Sat, 17 Jul 2021 13:01:29 +0200 Message-Id: <20210717110129.25539-10-sven@narfation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210717110129.25539-1-sven@narfation.org> References: <20210717110129.25539-1-sven@narfation.org> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1626520274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=sDXQi2Mx1YcVOxhxbVnrI9+t9oFvqMn0qot5+27g/yA=; b=pY2LW9UcD76eD0r6neaYcn9OUoQcmTM5Lvlekgk6EKtAbWSWqfy/XcjpzzGugWrynS961y 34P0944hWWW6FN+KtGQiUxnbEK6nTASxGkltB90fPR2cIqHRbFeD3LL+Os9MDJ1v8BaPMS srrT1qSR4Cfqm1e2NJw0AlVYHZ/ekec= ARC-Seal: i=1; s=20121; d=open-mesh.org; t=1626520274; a=rsa-sha256; cv=none; b=lCQZed1+BdR4b8f1Ssgu6KLQRlLs7kOk/iZ98EC5RM0P/h5GdFY8khMRbiqu66pdL5NZNT o3oUq4xP8O/JGZAo+G+sMqKx7YllNHRrnNJ133ntjoYC+eSmW1cceZ8jSoS7jVTxQNmuuv SFDPwwfZX3ffS5jDSl1W6ezkjsYmPrY= ARC-Authentication-Results: i=1; diktynna.open-mesh.org; dkim=pass header.d=narfation.org header.s=20121 header.b=fcAMe1Tk; spf=pass (diktynna.open-mesh.org: domain of sven@narfation.org designates 2a00:17d8:100::8b1 as permitted sender) smtp.mailfrom=sven@narfation.org Message-ID-Hash: G2OAJFAQC65H7USABLLK2ZARRVLQY5LE X-Message-ID-Hash: G2OAJFAQC65H7USABLLK2ZARRVLQY5LE X-MailFrom: sven@narfation.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-b.a.t.m.a.n.lists.open-mesh.org-0; header-match-b.a.t.m.a.n.lists.open-mesh.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 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 Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: The dot command is not relevant anymore to batctl because the vis command is no longer provided by batctl/batman-adv. The ip and ip-link are the main tools to handle the kernel net_devices via rtnetlink. They are therefore a must for anyone trying to use the batadv interfaces. The trace-cmd is the tool which has to be used to gather the logs from the kernel when batctl enabled the various loglevels for an batadv interface. The bridge utility is the main tool to configure bridges over the batman-adv interfaces. It must also be used to read out the mdb state in case the multicast handling of batman-adv has to be debugged. Signed-off-by: Sven Eckelmann --- man/batctl.8 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/man/batctl.8 b/man/batctl.8 index 1470beb..b5be0b8 100644 --- a/man/batctl.8 +++ b/man/batctl.8 @@ -506,11 +506,14 @@ provided host name or replace MAC addresses in debug output and logs. Host names addresses. .SH SEE ALSO -.BR ping (1), -.BR traceroute (1), -.BR tcpdump (1), +.BR bridge (8), .BR dmesg (1), -.BR dot (1) +.BR ip (8), +.BR ip-link (8), +.BR ping (8), +.BR tcpdump (8), +.BR traceroute (1), +.BR trace-cmd (1) .SH AUTHOR batctl was written by Andreas Langer and Marek Lindner . .PP