On Thursday 28 April 2016 22:54:57 Andrew Lunn wrote:
The kernel has gained support for exporting information via netlink. Use this when available, rather than debugfs. Netlink has the advantage of being network name space aware, where as debugfs is not.
If netlink is not available, batctl will fall back to debugfs, so should be backwards compatible with older kernel versions.
Signed-off-by: Andrew Lunn andrew@lunn.ch
Makefile | 20 +- debug.c | 19 +- debug.h | 4 +- functions.c | 11 + functions.h | 1 + main.h | 1 + netlink.c | 810 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 862 insertions(+), 4 deletions(-) create mode 100644 netlink.c
It looks like this patch currently only adds the printing of netlink information in a way that looks similar to the output from the legacy debugfs files. This is ok but I find it weird that it claims in the commit message that it uses (for everything?) netlink instead of debugfs when things like translate_mac(...) and ping/traceroute still have to be ported to netlink.
Kind regards, Sven