This is a normal scenario:
-- %< --
originator last-seen (quality) nexthop [interface]: .. possible nexthops ..
A 0.270s (134) A [ w2mesh]: C ( 79) A (134)
B 0.170s (245) B [ w2mesh]: B (245)
C 1.850s (152) C [ w2mesh]: A ( 83) C (152)
-- >% --
Nodewatcher will send only the originator, last-seen, quality, nexthop
and the interface. Nothing about the possible nexthops. Because Netmon
can't show every Originator (to bad performance), we need some filtering,
to only see direct neighbors. At the moment Netmon stores only
originator == nexthop entries. And there is no other way to filter,
because Netmon has only this information.
But this may fail. The problem occurs, if A has a better connection
(e.g. via eth0) with leads to an quality of 255:
-- %< --
A 0.270s (255) A [ eth0]: C ( 79) A (255)
B 0.170s (245) B [ w2mesh]: B (245)
C 1.850s (204) A [ eth0]: A (204) C (152)
-- >% --
In this example, Netmon wouldn't show the connection to C.
This patch doesn't use the originator == nexthop filter. Instead a
filter like "originator is anywhere in the possible nexthops" is used.
With this, we can disable the filtering in Netmon and show at least that
there is directly connection. With the "batctl o" command it is not
possible to show the correct interface for this direct connection.
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
The nodewatcher.sh got a diet. :)
Stats from DIR300
Old nodewatcher:
real 1m 43.86s
user 0m 5.59s
sys 0m 32.78s
Memory consumption.. over ~1.5MB
New nodewatcher:
real 0m 17.17s
user 0m 0.99s
sys 0m 4.33s
Memory consumption.. below ~0.5MB
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Sometimes the interfaces have shorter names, then batctl adds some
spaces just before the iface name. With cut we can get this right.
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
When the link_quality is below below 100 there is a little whitespace
between the value an the bracket like ( 99). This confused the awk
skript and is fixed by filtering all brackets.
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
The new build_script uses a bsp-style interface. Now it's possible
to work on more than one board at the same time. Just select the
selected_bsp with the build_script and start over.
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>