The following commit has been merged in the master branch: commit ee6d266caf12e41f64b8435b9b4c13be5bfe087a Merge: 203b1070fddbd3ca6bbe3377b1a9f46e11e99263 d37cdf6e2d7d67c9f0c4e9919fa30e59705bf692 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Jun 12 04:15:28 2012 +0800
Merge branch 'next'
diff --combined README index 44e1ac7,64ee152..b06aacf --- a/README +++ b/README @@@ -34,48 -34,6 +34,48 @@@ address to your provided host name. Hos MAC addresses. ;)
+batctl statistics +================= + +The batman-adv kernel module maintains a number of traffic counters which are exported +to user space. With batctl these counters can be easily retrieved. The output may vary +depending on which features have been compiled into the kernel module. For example, if +the distributed arp table (short: dat) wasn't selected as an option at compile time +its counters won't be shown. +Each module subsystem has its own counters which are indicated by their prefixes: + * mgmt - mesh protocol counters + * tt - translation table counters + * dat - distributed arp table counters +All counters without a prefix concern payload (pure user data) traffic. + +Usage: batctl statistics + +Example: + +$ batctl statistics + tx: 14 + tx_bytes: 1316 + tx_errors: 0 + rx: 14 + rx_bytes: 1316 + forward: 0 + forward_bytes: 0 + mgmt_tx: 18 + mgmt_tx_bytes: 762 + mgmt_rx: 17 + mgmt_rx_bytes: 1020 + tt_request_tx: 0 + tt_request_rx: 0 + tt_response_tx: 0 + tt_response_rx: 0 + tt_roam_adv_tx: 0 + tt_roam_adv_rx: 0 + dat_request_tx: 0 + dat_request_rx: 0 + dat_reply_tx: 1 + dat_reply_rx: 0 + + batctl ping ============
@@@ -130,7 -88,6 +130,7 @@@ tcpdump layer 2 and/or layer 3 traffic
Usage: batctl tcpdump [options] interface [interface] options: + -c compat filter - only display packets matching own compat version (14) -h print this help -n don't convert addresses to bat-host names -p dump specific packet type @@@ -344,7 -301,6 +344,6 @@@ $ batctl logleve [ ] messages related to route added / changed / deleted (routes) [ ] messages related to translation table operations (tt) [ ] messages related to bridge loop avoidance (bla) - [ ] messages related to the distributed arp table (dat)
batctl aggregation ================== diff --combined man/batctl.8 index 8c38d74,08893a7..714f50a --- a/man/batctl.8 +++ b/man/batctl.8 @@@ -65,7 -65,7 +65,7 @@@ Once started batctl will display the li 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 "\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 translation table operations. Level 'bla' enables messages related to the bridge loop avoidance. Level 'dat' enables messages related to the distributed arp table (DHT messages, ARP snooping and other debug logs). Level 'all' enables all messages. The messages are sent to the batman-adv debug log. Use \fBbatctl log\fP to see them. Make sure to have debugging output enabled when compiling the module otherwise the output as well as the loglevel options won't be available. + 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 'all' enables all messages. The messages are sent to the batman-adv debug log. Use \fBbatctl log\fP to see them. Make sure to have debugging output enabled when compiling the module otherwise the output as well as the loglevel options won't be available. .br .IP "\fBlog\fP|\fBl\fP [\fB-n\fP]\fP" batctl will read the batman-adv debug log which has to be compiled into the kernel module. If "-n" is given batctl will not replace the MAC addresses with bat-host names in the output. @@@ -158,25 -158,6 +158,25 @@@ If no parameter is given the current fr .IP "\fBap_isolation\fP|\fBap\fP [\fB1\fP|\fB0\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 "\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. For example, if the distributed arp table (short: dat) wasn't selected +as an option at compile time its counters won't be shown. +.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 16 +dat - distributed arp table counters +.RE +.RS 7 +All counters without a prefix concern payload (pure user data) traffic. +.RE +.br .IP "\fBping\fP|\fBp\fP [\fB-c count\fP][\fB-i interval\fP][\fB-t time\fP][\fB-R\fP] \fBMAC_address\fP|\fBbat-host_name\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 @@@ -194,39 -175,15 +194,39 @@@ address. batctl will send 3 packets to response time. If "-n" is given batctl will not replace the MAC addresses with bat-host names in the output. .br -.IP "\fBtcpdump\fP|\fBtd\fP [\fB-p filter\fP][\fB-n\fP] \fBinterface ...\fP" -batctl will display all packets that are seen on the given -interface(s). The "-p" options allows the filtering of certain packet -types: 1 - batman ogm packets, 2 - batman icmp packets, 4 - unicast -packets, 8 - broadcast packets, 16 - vis packets, and 32 - none batman -packets. These numbers can be added to filter more than one packet -type, e.g. use "-p 3" to display batman ogm packets and batman icmp -packets only. If "-n" is given batctl will not replace the MAC -addresses with bat-host names in the output. +.IP "\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 +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 vis 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 +Example: batctl td <interface> -p 129 -> only display batman ogm packets and non batman packets +.RE .br .IP "\fBbisect\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 logfiles to build a small internal database of all sent