-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
links information according to batman protocol #1055
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1055 +/- ##
==========================================
+ Coverage 79.54% 79.68% +0.14%
==========================================
Files 53 53
Lines 4566 4574 +8
==========================================
+ Hits 3632 3645 +13
+ Misses 934 929 -5 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hard_ifindex
should be removed, it is an internal index not useful for other nodes or the used, and better to not spread it around. Plus see my comments inline.
assert.are.equal(1990, links_info[1].last_seen_msecs) | ||
assert.are.equal("wlan0-mesh_250", links_info[1].iface) | ||
end) | ||
end) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New line missing at the end of file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done !
The last push includes the tq parameter for every neighbor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline comments
function get_bat_links_info() | ||
local batneights_obj={} | ||
local batlinks_obj={} | ||
local batlinks = utils.unsafe_shell("batctl oj") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they aren't links, but all the nodes in the network and their distance, we could keep this variable and derivative named bat_originators_*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
if link_value.hard_ifname == neight_value.iface and | ||
link_value.neigh_address== link_value.orig_address and | ||
link_value.neigh_address== neight_value.dst_mac then | ||
neight_value.tq = link_value.tq |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a comment explaining that tq
stands for Batman Transmit Quality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure !
should be ported to shared-state-async before merging |
At some point in the future, when we will have BATMAN_V working (the
possibility to select it was introduced in
#1004 as @lindnermarek said
it is better than BATMAN_IV. But the first tests failed, as reported on
#1059 . The progress on
this is being tracked here:
#1009 ), we should check
if this works also for BATMAN_V.
…--
Inviato dal mio smartstone
|
Nice ! this package gets info from batctl, I made a small poc and saw that if the network uses batmanV the json changes to this, instead of "tq" you get "throughput" and the information is directly in the originators table. {
"lrprimero": [
{
"last_seen_msecs": 430,
"src_mac": "02:29:0f:1f:72:3a",
"throughput": 1000000,
"dst_mac": "02:29:0f:1f:73:aa",
"iface": "eth1-2_250"
}
],
"lrsegundo": [
{
"last_seen_msecs": 310,
"src_mac": "02:29:0f:1f:73:aa",
"throughput": 1000000,
"dst_mac": "02:29:0f:1f:72:3a",
"iface": "eth1-2_250"
}
]
} |
This module provides per interface links information associated with batman protocol basically using batclt nj command as source. The output is similar to the wifi_links_info to make data parsing easy.
This module depends on batctl-default witch is in use by kmod-batman-adv and batman-adv-auto-gw-mode.
This is a sample output of the command
shared-state-async get bat_links_info
run in one of two librerouters.