Hi,
The current endpoint for batadv_icmp* is implemented in the kernel module and can be accessed via debugfs. But the debugfs cannot be accessed from non- default netns or when debugfs is disabled. Thus it has be possible to use it via the netlink infrastructure to make it compatible with future setups.
The use of the socket file is completely removed and instead raw sockets with BPF filters are used to send/receive batadv_icmp_packet* directly. All information about interfaces and available originators are received via rtnetlink and the batman-adv netlink.
The originators debugfs file is used when the batman-adv netlink commands are not available. The routing of batadv_icmp_packets is still done inside the kernel module.
The patchset is based on the netlink and rtnl patchset for batctl.
Kind regards, Sven
Sven Eckelmann (4): batctl: Replace list implementation with linux-like-list batctl: Use monotonic time source for icmp timing batctl: Add helper to generate instant random bytes batctl: Implement non-routing batadv_icmp in userspace
Makefile | 4 +- bisect_iv.c | 40 ++- bisect_iv.h | 10 +- functions.c | 82 +++++- functions.h | 2 + icmp_helper.c | 633 ++++++++++++++++++++++++++++++++++++++++++++ icmp_helper.h | 58 ++++ list-batman.c | 123 --------- list-batman.h | 120 --------- list.h | 834 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ netlink.c | 178 ++++++++++++- netlink.h | 3 + ping.c | 42 +-- tcpdump.c | 7 +- tcpdump.h | 2 +- traceroute.c | 42 +-- 16 files changed, 1832 insertions(+), 348 deletions(-) create mode 100644 icmp_helper.c create mode 100644 icmp_helper.h delete mode 100644 list-batman.c delete mode 100644 list-batman.h create mode 100644 list.h