Warpmon - Wireless ARP Monitor

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.

4 Likes

Why dont you unzip it to github gitlab codeberg etc?

I generally don't make posts like this, but really, dude?

I've spent over a month working on this because there is always a new thread either asking how to solve this problem or trying to solve the problem with scripts (and leaving much to be desired).
Then I spent about 4 hours writing this thread in order to include as much necessary information as I could remember.

I come back over 10 hours later, and as usual, no engagement, but someone criticizing me for not creating a repository for something consisting of a single C source code file and a service init script.

You are FREE to use, modify, DISTRIBUTE and build a package WITHOUT ANY REQUIREMENTS.

I've been in these forums for a little over 2 months and I've published three utilities (including this one) and a hacky patch to stop odhcp6c from "DoSing" my cheap router.

Ethernet LEDs control for TP-Link TL-WR1043ND v2/v3 (no engagement)
Cable modem - info shell script (no engagement)
Odhcp6c issue with my ISP's configuration (only engagement is someone telling me to go to the official repository, which is abandoned as no one is replying to issues or merging pull requests and the last commit was over a year ago)

While it's fine that people don't engage with stuff they have no use for, this lack of engagement, combined with criticism that has nothing to do with the application or its quality (and which can be solved by other parties), has very much discouraged me from spending an ungodly amount of time turning future personal utilities into public utilities.

Anyway, that's enough of my rants and I apologize if any of that sounded rude, but that's my current mood about releasing any new public utility for OpenWrt.

3 Likes

Well, your efforts may well be laudable, but we do not know because you have only provided an unknown link that looks, I am sure unintentionally, just like many many scam attempts.

Lack of engagement is in this case driven by a default perceived lack of trust.

A link to Github, for example, (as @brada4 suggested) would be perceived at least as benign.
You can spend "over a month" working on this and 4 hours crafting a thread here, but you cannot spend a few minutes "publishing" on a recognised platform.
Because of this, Red Flags are what everyone sees unfortunately.

2 Likes

Mega is an unknown link/unrecognized platform now? You also understand that you can view the tree of a zip file through its metadata, without having to extract/decompress anything, right? Github gives the option to download the repository as a zip file.
You also understand there are actually malicious binaries and code hosted on github? the xz backdoor was there, and the person that discovered it didn't do so through github.

Mega, while certainly full of flaws, is not owned by big tech, preserves my files without risk of deletion and as long as the files are small, I don't have to worry about users running into download limits.

I won't be creating a new repository on my self hosted work gitlab just to store two files, when I can just keep it forever on mega without ever touching it again.
Besides, what is your explanation for the lack of engagement on my other threads that have no download links, with the code/patch directly inlined in the posts? I also had the same lack of engagement on IRC, also no links.

I mean, I expect these "everything is a virus" comments on non-technical forums and social media, but I am pretty shocked that I got one here, and over a mega link no less.

If you don't agree with me, that's fine, if you also have no reason to engage these threads, that's fine too, but it's really... interesting, that out of all the feedback that I could've gotten, I get one that has nothing to do with the application (and can be solved by anyone else who disagrees with my choice of hosting).

I'll mention however, that this comment:

You can spend "over a month" working on this and 4 hours crafting a thread here, but you cannot spend a few minutes "publishing" on a recognised platform.

sounds extremely entitled, in which a free open source contributor can't even choose where to host his own files.

1 Like

What result you are expecting by attacking anyone trying to help?

2 Likes

Sorry, never heard of it.

A modern misuse of "entitled", meaning "feeling that you have the right to do or have what you want without having to work for it or deserve it, just because of who you are" does seem to fit your attitude.

You can choose to put your files wherever you like, but do not be taken by surprise when you find no-one takes any notice.

2 Likes

Why is the link gone?

Maybe Pouting?

Because the only discussion that ensued after creating this thread was trolling over my choice of hosting, despite giving full permission to redistribute it elsewhere, with or without modification.
I've hosted other hobby projects on mega in the past, e.g. https://mega.nz/folder/wIE1gQ5S#rbpeeX5pcNFAXfV9XVt2bA
Never had a problem being trolled over it, until now. This is puzzling, considering that the people around these parts should be savvy enough to make a proper judgement on malicious content.

I've already run into the same person who started all this, over a different problem. Despite describing the problem to him several times, he just kept replying that I was doing it wrong. Might be a language barrier, but it took a sizeable effort to get it to him, see 5GHz Low performance on TP-Link Archer C6 V2 - #92 by Cthulhu88

A modern misuse of "entitled", meaning "feeling that you have the right to do or have what you want without having to work for it or deserve it, just because of who you are" does seem to fit your attitude.

This did it for me, while also not addressing any of my points, including the fact that I had no engagement on threads that did not involve any hosting.
If this isn't trolling, I don't know what it is.

I know this affects people who have no interest in partaking in this trolling, but if I am not going to have an actual discussion about the application itself, I prefer not to release it to the public. I've very little time and plenty of issues that I've to deal with on a daily basis, I ABSOLUTELY DO NOT want to deal with this.
I silently edited the OP and added a note as to why the link was removed; I didn't want to continue arguing, but here is my verbose response.

Maybe, if someone is interested in taking over this application, I can give him the source code (assuming he hasn't downloaded it before its removal), and he can proceed from then on, but I am not releasing anything anymore in these forums, and this will probably be my final post here aswell.

P.S. I enjoy contributing back, even when I've no engagement (as shown by my previous contributions), but once it becomes such a huge chore to contribute back, that's when it's time for me to leave the scene.

2 Likes

For what it’s worth, your contribution to Gargoyle was appreciated. For that you also didn’t engage via GitHub (for various reasons) and that was fine.
It is my preferred method, but I don’t ignore good ideas/code in other formats.

Don’t be discouraged.

5 Likes