All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] batctl: manpage spring cleaning
@ 2021-07-17 11:01 Sven Eckelmann
  2021-07-17 11:01 ` [PATCH 1/9] batctl: man: Fix alignment after json list Sven Eckelmann
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Sven Eckelmann @ 2021-07-17 11:01 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Sven Eckelmann

Hi,

I went through the manpage and tried to clean up the structure of the manpage.
This should make it easier for add new entries to the manpage when subcommands
are added. But also to have a slightly better impression when trying to look
something up in the manpage.

As said, this is mostly about the the structure and not about the texts. So
if anyone wants to improve them too: feel free to submit patches.

Kind regards,
	Sven

Sven Eckelmann (9):
  batctl: man: Fix alignment after json list
  batctl: man: Move commands to own section
  batctl: man: Convert lists to indented paragraph
  batctl: man: Use native list support
  batctl: man: Use tbl groff preprocessor for tables
  batctl: man: Switch to manpage font convention
  batctl: man: Add example section
  batctl: man: Reorder and restructure sections
  batctl: man: Rewrite SEE ALSO list

 man/batctl.8 | 619 ++++++++++++++++++++++++++++-----------------------
 1 file changed, 337 insertions(+), 282 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/9] batctl: man: Fix alignment after json list
  2021-07-17 11:01 [PATCH 0/9] batctl: manpage spring cleaning Sven Eckelmann
@ 2021-07-17 11:01 ` Sven Eckelmann
  2021-07-17 11:01 ` [PATCH 2/9] batctl: man: Move commands to own section Sven Eckelmann
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Sven Eckelmann @ 2021-07-17 11:01 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Sven Eckelmann

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 <sven@narfation.org>
---
 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 <netdev>\fP] \fBtranslate\fP|\fBt\fP \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIP_address\fP"
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/9] batctl: man: Move commands to own section
  2021-07-17 11:01 [PATCH 0/9] batctl: manpage spring cleaning Sven Eckelmann
  2021-07-17 11:01 ` [PATCH 1/9] batctl: man: Fix alignment after json list Sven Eckelmann
@ 2021-07-17 11:01 ` Sven Eckelmann
  2021-07-17 11:01 ` [PATCH 3/9] batctl: man: Convert lists to indented paragraph Sven Eckelmann
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Sven Eckelmann @ 2021-07-17 11:01 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Sven Eckelmann

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 <sven@narfation.org>
---
 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 <netdev>\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
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/9] batctl: man: Convert lists to indented paragraph
  2021-07-17 11:01 [PATCH 0/9] batctl: manpage spring cleaning Sven Eckelmann
  2021-07-17 11:01 ` [PATCH 1/9] batctl: man: Fix alignment after json list Sven Eckelmann
  2021-07-17 11:01 ` [PATCH 2/9] batctl: man: Move commands to own section Sven Eckelmann
@ 2021-07-17 11:01 ` Sven Eckelmann
  2021-07-17 11:01 ` [PATCH 4/9] batctl: man: Use native list support Sven Eckelmann
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Sven Eckelmann @ 2021-07-17 11:01 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Sven Eckelmann

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 <sven@narfation.org>
---
 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 <netdev>\fP] \fBinterface\fP|\fBif\fP [\fB-M\fP] [\fBadd\fP|\fBdel iface(s)\fP]"
+.TP
+[\fBmeshif <netdev>\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 <netdev>\fP] \fBinterface\fP|\fBif\fP \fBcreate\fP [\fBrouting_algo|ra RA_NAME\fP]"
+.TP
+[\fBmeshif <netdev>\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 <netdev>\fP] \fBinterface\fP|\fBif\fP \fBdestroy\fP"
+.TP
+[\fBmeshif <netdev>\fP] \fBinterface\fP|\fBif\fP \fBdestroy\fP
 Remove all attached interfaces and destroy the batman-adv interface.
-.br
-.IP "[\fBmeshif <netdev>\fP] \fBorig_interval\fP|\fBit\fP [\fBinterval\fP]"
+.TP
+[\fBmeshif <netdev>\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 <netdev>\fP] \fBap_isolation\fP|\fBap\fP [\fB0\fP|\fB1\fP]"
+.TP
+[\fBmeshif <netdev>\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 <vdev>\fP|[\fBmeshif <netdev>\fP] \fBvid <vid>\fP> \fBap_isolation\fP|\fBap\fP [\fB0\fP|\fB1\fP]"
+.TP
+<\fBvlan <vdev>\fP|[\fBmeshif <netdev>\fP] \fBvid <vid>\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 <netdev>\fP] \fBbridge_loop_avoidance\fP|\fBbl\fP [\fB0\fP|\fB1\fP]"
+.TP
+[\fBmeshif <netdev>\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 <netdev>\fP] \fBdistributed_arp_table\fP|\fBdat\fP [\fB0\fP|\fB1\fP]"
+.TP
+[\fBmeshif <netdev>\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 <netdev>\fP] \fBaggregation\fP|\fBag\fP [\fB0\fP|\fB1\fP]"
+.TP
+[\fBmeshif <netdev>\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 <netdev>\fP] \fBbonding\fP|\fBb\fP [\fB0\fP|\fB1\fP]"
+.TP
+[\fBmeshif <netdev>\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 <hardif>\fP \fBelp_interval\fP|\fBet\fP [\fBinterval\fP]"
+.TP
+\fBhardif <hardif>\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 <netdev>\fP] \fBfragmentation\fP|\fBf\fP [\fB0\fP|\fB1\fP]"
+.TP
+[\fBmeshif <netdev>\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 <netdev>\fP] \fBhop_penalty\fP|\fBhp\fP [\fBpenalty\fP]"
+.TP
+[\fBmeshif <netdev>\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 <hardif>\fP] \fBhop_penalty\fP|\fBhp\fP [\fBpenalty\fP]"
+.TP
+[\fBhardif <hardif>\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 <netdev>\fP] \fBnetwork_coding\fP|\fBnc\fP [\fB0\fP|\fB1\fP]"
+.TP
+[\fBmeshif <netdev>\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 <netdev>\fP] \fBmulticast_forceflood\fP|\fBmff\fP [\fB0\fP|\fB1\fP]"
+.TP
+[\fBmeshif <netdev>\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 <netdev>\fP] \fBmulticast_fanout\fP|\fBmo\fP [\fBfanout\fP]"
+.TP
+[\fBmeshif <netdev>\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 <netdev>\fP] \fBloglevel\fP|\fBll\fP [\fBlevel\fP[ \fBlevel\fP[ \fBlevel\fP]] \fB...\fP]"
+.TP
+[\fBmeshif <netdev>\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 <netdev>\fP] \fBgw_mode|gw\fP [\fBoff\fP|\fBclient\fP|\fBserver\fP] [\fBsel_class|bandwidth\fP]\fP"
+.TP
+[\fBmeshif <netdev>\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 <hardif>\fP \fBthroughput_override|to\fP [\fBbandwidth\fP]\fP"
+.TP
+\fBhardif <hardif>\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 <netdev>\fP] \fBisolation_mark\fP|\fBmark\fP"
+.TP
+[\fBmeshif <netdev>\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 <netdev>\fP] \fBtranslate\fP|\fBt\fP \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIP_address\fP"
+.TP
+[\fBmeshif <netdev>\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 <netdev>\fP] \fBstatistics\fP|\fBs\fP"
+.TP
+[\fBmeshif <netdev>\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 <netdev>\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 <netdev>\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 <netdev>\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 <netdev>\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 <interface> \-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 <netdev>\fP] \fBthroughputmeter\fP|\fBtp\fP \fBMAC\fP"
+.TP
+[\fBmeshif <netdev>\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
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/9] batctl: man: Use native list support
  2021-07-17 11:01 [PATCH 0/9] batctl: manpage spring cleaning Sven Eckelmann
                   ` (2 preceding siblings ...)
  2021-07-17 11:01 ` [PATCH 3/9] batctl: man: Convert lists to indented paragraph Sven Eckelmann
@ 2021-07-17 11:01 ` Sven Eckelmann
  2021-07-17 11:01 ` [PATCH 5/9] batctl: man: Use tbl groff preprocessor for tables Sven Eckelmann
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Sven Eckelmann @ 2021-07-17 11:01 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Sven Eckelmann

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 <sven@narfation.org>
---
 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 <netdev>\fP] \fBtranslate\fP|\fBt\fP \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIP_address\fP
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/9] batctl: man: Use tbl groff preprocessor for tables
  2021-07-17 11:01 [PATCH 0/9] batctl: manpage spring cleaning Sven Eckelmann
                   ` (3 preceding siblings ...)
  2021-07-17 11:01 ` [PATCH 4/9] batctl: man: Use native list support Sven Eckelmann
@ 2021-07-17 11:01 ` Sven Eckelmann
  2021-07-17 11:01 ` [PATCH 6/9] batctl: man: Switch to manpage font convention Sven Eckelmann
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Sven Eckelmann @ 2021-07-17 11:01 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Sven Eckelmann

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 <sven@narfation.org>
---
 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 <netdev>\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 <interface> \-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
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 6/9] batctl: man: Switch to manpage font convention
  2021-07-17 11:01 [PATCH 0/9] batctl: manpage spring cleaning Sven Eckelmann
                   ` (4 preceding siblings ...)
  2021-07-17 11:01 ` [PATCH 5/9] batctl: man: Use tbl groff preprocessor for tables Sven Eckelmann
@ 2021-07-17 11:01 ` Sven Eckelmann
  2021-07-17 11:01 ` [PATCH 7/9] batctl: man: Add example section Sven Eckelmann
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Sven Eckelmann @ 2021-07-17 11:01 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Sven Eckelmann

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 <sven@narfation.org>
---
 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 <netdev>\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 <netdev>\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 <netdev>\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 <netdev>\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 <netdev>\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 <vdev>\fP|[\fBmeshif <netdev>\fP] \fBvid <vid>\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 <vid>\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 <netdev>\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 <netdev>\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 <netdev>\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 <netdev>\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 <hardif>\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 <netdev>\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 <netdev>\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 <hardif>\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 <netdev>\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 <netdev>\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 <netdev>\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 <netdev>\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 <netdev>\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 <hardif>\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 <netdev>\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 <netdev>\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 <netdev>\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 <netdev>\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 <netdev>\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 <interface> \-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 <netdev>\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
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 7/9] batctl: man: Add example section
  2021-07-17 11:01 [PATCH 0/9] batctl: manpage spring cleaning Sven Eckelmann
                   ` (5 preceding siblings ...)
  2021-07-17 11:01 ` [PATCH 6/9] batctl: man: Switch to manpage font convention Sven Eckelmann
@ 2021-07-17 11:01 ` Sven Eckelmann
  2021-07-17 11:01 ` [PATCH 8/9] batctl: man: Reorder and restructure sections Sven Eckelmann
  2021-07-17 11:01 ` [PATCH 9/9] batctl: man: Rewrite SEE ALSO list Sven Eckelmann
  8 siblings, 0 replies; 10+ messages in thread
From: Sven Eckelmann @ 2021-07-17 11:01 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Sven Eckelmann

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 <sven@narfation.org>
---
 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),
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 8/9] batctl: man: Reorder and restructure sections
  2021-07-17 11:01 [PATCH 0/9] batctl: manpage spring cleaning Sven Eckelmann
                   ` (6 preceding siblings ...)
  2021-07-17 11:01 ` [PATCH 7/9] batctl: man: Add example section Sven Eckelmann
@ 2021-07-17 11:01 ` Sven Eckelmann
  2021-07-17 11:01 ` [PATCH 9/9] batctl: man: Rewrite SEE ALSO list Sven Eckelmann
  8 siblings, 0 replies; 10+ messages in thread
From: Sven Eckelmann @ 2021-07-17 11:01 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Sven Eckelmann

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 <sven@narfation.org>
---
 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 <interface> \-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 <interface> \-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 <vid>\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
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 9/9] batctl: man: Rewrite SEE ALSO list
  2021-07-17 11:01 [PATCH 0/9] batctl: manpage spring cleaning Sven Eckelmann
                   ` (7 preceding siblings ...)
  2021-07-17 11:01 ` [PATCH 8/9] batctl: man: Reorder and restructure sections Sven Eckelmann
@ 2021-07-17 11:01 ` Sven Eckelmann
  8 siblings, 0 replies; 10+ messages in thread
From: Sven Eckelmann @ 2021-07-17 11:01 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Sven Eckelmann

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 <sven@narfation.org>
---
 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 <an.langer@gmx.de> and Marek Lindner <mareklindner@neomailbox.ch>.
 .PP
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-07-17 11:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-17 11:01 [PATCH 0/9] batctl: manpage spring cleaning Sven Eckelmann
2021-07-17 11:01 ` [PATCH 1/9] batctl: man: Fix alignment after json list Sven Eckelmann
2021-07-17 11:01 ` [PATCH 2/9] batctl: man: Move commands to own section Sven Eckelmann
2021-07-17 11:01 ` [PATCH 3/9] batctl: man: Convert lists to indented paragraph Sven Eckelmann
2021-07-17 11:01 ` [PATCH 4/9] batctl: man: Use native list support Sven Eckelmann
2021-07-17 11:01 ` [PATCH 5/9] batctl: man: Use tbl groff preprocessor for tables Sven Eckelmann
2021-07-17 11:01 ` [PATCH 6/9] batctl: man: Switch to manpage font convention Sven Eckelmann
2021-07-17 11:01 ` [PATCH 7/9] batctl: man: Add example section Sven Eckelmann
2021-07-17 11:01 ` [PATCH 8/9] batctl: man: Reorder and restructure sections Sven Eckelmann
2021-07-17 11:01 ` [PATCH 9/9] batctl: man: Rewrite SEE ALSO list Sven Eckelmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.