This patchset adds the network wide multi interface optimization as
proposed in our wiki [1] for BATMAN IV. The main purpose is to do
interface alternating and bonding by considering multi interface
capabilities globally and not just for the (next) link, otherwise
non-optimal links may be chosen.
This patchset needs to change a lot of core data structures and
routing, please review it carefully. A local development branch
exists on the public git repo [2].
Changes from RFCv1 in May are:
* rebase on current master including routing abstraction
* use routing abstraction and change some of the API calls for the
new multi interface usage
* check bonding candidates using the new API
* changed wifi penalty to use the double hop penalty, default hop
penalty changed to 15 to make no effective change in single station
networks
* fixed seqno protection window troubles (changed to protection window
per interface for OGMs)
* various smaller changes, including locking and NULL checking
I've tested the patchset in my VMs to confirm that bonding and alternating
works as expected.
As always, any comments are appreciated!
Thanks,
Simon
[1] http://www.open-mesh.org/projects/batman-adv/wiki/network-wide-multi-link-o…
[2] http://git.open-mesh.org/batman-adv.git/shortlog/refs/heads/simon/network-w…
Simon Wunderlich (6):
batman-adv: remove bonding and interface alternating
batman-adv: split tq information in neigh_node struct
batman-adv: split out router from orig_node
batman-adv: add WiFi penalty
batman-adv: consider outgoing interface in OGM sending
batman-adv: add bonding again
bat_iv_ogm.c | 732 +++++++++++++++++++++++++++++++----------------
distributed-arp-table.c | 3 +-
gateway_client.c | 79 ++++-
hard-interface.c | 2 +-
hard-interface.h | 1 +
icmp_socket.c | 2 +-
main.c | 2 +-
network-coding.c | 9 +-
originator.c | 304 +++++++++++++++++---
originator.h | 14 +-
routing.c | 432 +++++++++-------------------
routing.h | 12 +-
send.c | 13 +-
soft-interface.c | 2 +-
translation-table.c | 5 +-
types.h | 110 ++++---
16 files changed, 1073 insertions(+), 649 deletions(-)
--
1.7.10.4
The *.d depends files for make just list the files used when building an object
file. Removing a file listed in such a dependency file causes make to search
for a way to recreate it. This usually cannot work because these files aren't
autogenerated.
The gcc option -MP can be used to generate empty rule for these files. Removing
a file in a dependency list will then execute this empty rule and continue with
the execution of the creation of the object file. This compilation process will
then automatically correct the dependency file.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
---
Makefile | 2 +-
vis/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index aeee2e8..ec9dc11 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ BINARY_NAME = alfred
OBJ = main.o server.o client.o netsock.o send.o recv.o hash.o unix_sock.o util.o debugfs.o batadv_query.o
# alfred flags and options
-CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD
+CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP
LDLIBS += -lrt
# disable verbose output
diff --git a/vis/Makefile b/vis/Makefile
index 8585f9a..9bf72c9 100644
--- a/vis/Makefile
+++ b/vis/Makefile
@@ -23,7 +23,7 @@ BINARY_NAME = vis
OBJ = vis.o debugfs.o
# alfred flags and options
-CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD
+CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP
LDLIBS += -lrt
# disable verbose output
--
1.8.4.rc3
c760fb3c8029edf40657d283dc47af2fef9b3a6f ("batctl: Add support for IPv6 to
address resolver") added support for translating IPv6 addresses to mac adresses
but didn't update the documentation.
Reported-by: Antonio Quartulli <antonio(a)meshcoding.com>
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
---
README | 12 +++++++-----
man/batctl.8 | 20 ++++++++++----------
2 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/README b/README
index f3eb4b3..5af95c8 100644
--- a/README
+++ b/README
@@ -78,10 +78,10 @@ $ batctl statistics
batctl translate
================
-Translates a destination (hostname, IPv4, MAC, bat_host-name) to the originator
-mac address responsible for it.
+Translates a destination (hostname, IPv4, IPv6, MAC, bat_host-name) to the
+originator mac address responsible for it.
-Usage: batctl translate mac|bat-host|host-name|IPv4-address
+Usage: batctl translate mac|bat-host|host-name|IP-address
Example:
@@ -93,13 +93,15 @@ $ batctl translate 192.168.1.2
02:ca:fe:af:fe:05
$ batctl translate fe:fe:00:00:09:01
02:ca:fe:af:fe:05
+$ batctl translate 2001::1
+02:ca:fe:af:fe:05
batctl ping
============
Sends a Layer 2 batman-adv ping to check round trip time and connectivity
-Usage: batctl ping [parameters] mac|bat-host|host-name|IPv4-address
+Usage: batctl ping [parameters] mac|bat-host|host-name|IP-address
parameters:
-c ping packet count
-h print this help
@@ -125,7 +127,7 @@ batctl traceroute
Traceroute sends 3 packets to each hop, awaits the answers and prints out the
response times.
-Usage: batctl traceroute [parameters] mac|bat-host|host-name|IPv4-address
+Usage: batctl traceroute [parameters] mac|bat-host|host-name|IP-address
Example:
diff --git a/man/batctl.8 b/man/batctl.8
index 157f96d..af2729b 100644
--- a/man/batctl.8
+++ b/man/batctl.8
@@ -201,9 +201,9 @@ List of debug tables:
.RE
.RE
.br
-.IP "\fBtranslate\fP|\fBt\fP \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIPv4_address\fP"
+.IP "\fBtranslate\fP|\fBt\fP \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIP_address\fP"
-Translates a destination (hostname, IPv4, MAC, bat_host-name) to the originator
+Translates a destination (hostname, IP, MAC, bat_host-name) to the originator
mac address responsible for it.
.br
.IP "\fBstatistics\fP|\fBs\fP"
@@ -221,22 +221,22 @@ tt - translation table counters
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][\fB\-T\fP] \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIPv4_address\fP"
+.IP "\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 address or a hostname when
-the IPv4 address was configured on top of the batman-adv interface of the destination device and both source and
-destination devices are in the same IPv4 subnet.
+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.
.br
-.IP "\fBtraceroute\fP|\fBtr\fP [\fB\-n\fP][\fB\-T\fP] \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIPv4_address\fP"
+.IP "\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 address or a hostname when
-the IPv4 address was configured on top of the batman-adv interface of the destination device and both source and
-destination devices are in the same IPv4 subnet.
+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.
--
1.8.4.rc3
Introduced by: 0b6aa0d43767889eeda43a132cf5e73df4e63bf2
("batman-adv: tvlv - basic infrastructure")
Signed-off-by: Antonio Quartulli <antonio(a)meshcoding.com>
---
v2:
- properly align also the rest of the text
main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/main.c b/main.c
index 5c5e64b..5ee2abb 100644
--- a/main.c
+++ b/main.c
@@ -1014,10 +1014,10 @@ void batadv_tvlv_ogm_receive(struct batadv_priv *bat_priv,
* payload
* @bat_priv: the bat priv with all the soft interface information
* @optr: ogm tvlv handler callback function. This function receives the orig
- * node, flags and the tvlv content as argument to process.
- * uptr: unicast tvlv handler callback function. This function receives the
- * source & destination of the unicast packet as well as the tvlv content
- * to process.
+ * node, flags and the tvlv content as argument to process.
+ * @uptr: unicast tvlv handler callback function. This function receives the
+ * source & destination of the unicast packet as well as the tvlv content
+ * to process.
* @type: tvlv handler type to be registered
* @version: tvlv handler version to be registered
* @flags: flags to enable or disable TVLV API behavior
--
1.8.1.5