Wcollector

Wcollector is a patch to enable event notification from the mac80211 linux driver to user-space. The mac80211 driver can signal events happening inside the kernel to a service running in userspace. Events currently trapped at the kernel level and signaled to userspace are:

  • EVENT_START_TX: Frame transmission start
  • EVENT_END_TX: Frame transmission end
  • EVENT_END_RX: Frame reception end (both successful and unsuccesful)

Each event is signaled to userspace through netlink. In user-space a program or a service can run to handle the events. This can be used for statistics collection or rapid prototyping, e.g. number of packets lost on a link, reacting to link degradation with some new policy.

The tool is composed by a kernel patch and a simple user-space program. The latter at this stage is only a simple program to catch the event and print a message in the buffer of the kernel.

  • Kernel patch. The patch is tailored for compat wireless 2012-09-07 mac80211 driver included into OpenWrt attitude adjustment. The patch can be easily applied with very minor modifications to any kernel version, e.g. the patch applies without moodifications to linux kernel 3.3.8.
  • User-space program. The user-space program is ready to be compiled inside the OpenWrt toolchain. The Makefile can be easily modified to be compiled outside the toolchain as simple program.

If you have questions, comments or you want just to tell me that you use Wcollector drop me an email!