#32 Store MAC addresses as well as IP addresses


On most home networks (and some ISP networks), the MAC address is a more stable identifier than the IP address. It would be nice if bandwidthd stored the MAC address in the logged data, in addition to or instead of the IP address.


  • Jean-Philippe Pialasse

    yes it would be a great feature regarding dhcp addressing

  • Alestan

    Alestan - 2011-04-11

    I don't know if there is still any interest in having bandwidthd give the mac address, but there was for my boss, so I've got a working copy that now includes mac lookups, I am working on some speed improvements as my routine for getting the mac address is too slow to handle 10,000+ entries per 200 seconds.
    The issue is libpcap doesn't capture the mac info, so you need to find an alternative source for that information, how you get that is up to you, but making it able to get the answer quickly is important if you are watching more than a few thousand IPs. Anyway, I've embedded the CPython interpreter in bandwidthd, so it can call external python scripts, you then just create a python script and specify in the bandwidthd.conf the location and name of the script, and have it preform the ip to mac lookup, you also could have it easily perform numerous other changes to the data on the fly, as it gives the contents of one IpTable row to the python script at a time, and python returns a modified version of that. This also has the potential to allow support of other database types, instead of returning the modified mac address, simply have it store the entire entry into any database you want. If there is any interest still in this feature, I'll see about making a version of it suitable for general use and making a demo script.



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks