warpmon captures ARP traffic traversing one or more interfaces, parses ARP reply frames and adds MAC-IP address pairs to the system's ARP table.
warpmon's main purpose (and the reason for its development) is for dumb APs to have reliable MAC-IP address association for wireless clients.
Some higher level, but less than ideal, solutions exist; see Associated stations - making hostnames visible across multiple APs and Real-Time Updating Dumb AP Associated Stations! for some examples.
warpmon attempts to solve the shortcomings of such solutions.
=== PERFORMANCE ===
Great care was taken to make warpmon as lightweight as possible, which is one of the reasons it took me so long. I fully understand most dumb APs are running on very limited hardware.
warpmon is written in C (conforming to C89) and is completely standalone, making no use of 3rd party libraries, services or packages.
Because warpmon works locally, the main router device won't be spending any processing power to honor requests coming from devices running it.
=== LOGGING ===
Initialization errors (bad parameters, lack of resources, etc) are written to stderr. Once monitoring starts, warpmon behaves like a daemon and messages are written to the system's log.
Note that the service script redirects stderr to the system's log.
=== LIMITATIONS ===
IPv6 is not supported by ARP, so there is no IPv6 support.
ARP traffic needs to pass through and be visible to the kernel, otherwise it's not possible to capture these frames.
=== COMPILE ===
I am only providing a pre-compiled binary for ath79. Others may share theirs, but I can't guarantee they won't modify the source code before compilation.
Your safest bet will always be compiling it yourself; this can be done in two ways, cross compiling or native compiling within your target device.
For cross compiling, follow these: https://openwrt.org/docs/guide-developer/toolchain/using_the_sdk and https://openwrt.org/docs/guide-developer/toolchain/crosscompile
The included ath79 binary was cross compiled with:
mips-openwrt-linux-musl-gcc -std=c89 -O3 -Wall -Wextra -Wpedantic -o warpmon warpmon.c
openwrt-sdk-23.05.4-ath79-generic_gcc-12.3.0_musl.Linux-x86_64/staging_dir/host/bin/sstrip -z warpmon
Native compiling within your device is probably the simplest, you just need to install the gcc package and compile. If your device doesn't have enough disk space for gcc, install it to the RAM or USB storage.
Here is an example of installing gcc to the RAM and compiling warpmon within your device:
opkg update
opkg -d ram install gcc
export PATH=$PATH:/tmp/bin:/tmp/sbin:/tmp/usr/bin:/tmp/usr/sbin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/lib:/tmp/usr/lib
gcc -std=c89 -O3 -Wall -Wextra -Wpedantic -idirafter /tmp/usr/include -o warpmon warpmon.c
=== SERVICE ===
If you want to run warpmon as a service, I've included an init script, warpmon.service. Move this script to /etc/init.d/warpmon and the warpmon binary to /usr/sbin/warpmon, make sure both of them have execute permission.
You need to setup a configuration at /etc/config/warpmon. Here is an example template for this configuration, using OpenWrt default settings, a 2.4 ghz AP and a 5 ghz AP:
config monitor
list interface 'phy0-ap0'
list interface 'phy1-ap0'
option timeout '-1'
option verbose '1'
config range
option start '192.168.1.1'
option stop '192.168.1.255'
list exclude '192.168.1.1'
Once configured, you can enable and start the service:
service warpmon enable
service warpmon start
=== DOWNLOAD AND LICENSE ===
I don't have the time to maintain a package, so I am shipping warpmon without a license (at least for now). You are free to use, modify, distribute and build a package without any requirements.
The zip file contains the source code, the pre-compiled ath79 binary and the service script.
Link: Removed, see posts below. Can't be bothered to deal with this right now.