[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

added new interface....



Sir;

First of all, let me thank you for a great program!!! I have been using iptraf for a couple of years and now I cannot live without it!

This is what led me to my problem (and now a solution!). Over the weekend I purchased an Atheros based 802.11b/g pci card (for those that care, D-Link DWL-G520 rev B1). The driver (http://sourceforge.net/projects/madwifi/) for this card is still in beta and performance issues exist, hence a desire to monitor traffic on the interface. The problem is that the card is listed as device 'athX' rather than 'ethX' or 'wlanX' or whatever. Anyway, from what I understand, it is still (basically) just ethernet.

To make a long story short, I modified two of the source files to support this interface. I am not a programmer (just a hack!) and I don't even know how to make a patch so here is what I did:

1. Change line #40 in src/ifaces.c from:
* { "lo", "eth", "ath", "sl", "ppp", "ippp", "plip", "fddi", "isdn", "dvb",*
to:
* { "lo", "eth", "sl", "ppp", "ippp", "plip", "fddi", "isdn", "dvb",
*so that the "ath" string is parsed from /proc/net/dev/

2. Add below line #82 in src/packet.c another entry as follows:

* else if (strncmp(ifname, "ath", 3) == 0)
result = LINK_ETHERNET;

*This is of course based on the assumption that the packet definition for the wireless is the same as that for regular ethernet. It does appear to be working though =) I am going to do a little testing and see if the reported traffic seems accurate. Please correct me if I have made stupid/foolish assumptions.

I apologize for not just sending a patch, but as I mentioned, I am not a programmer.

Thanks again for an awesome tool!!

Jay Fougere
jay@fougere.us