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

Re2: Iptraff cannot see ath0 interface - patch sent



Dear Jay Fougere,

> Unfortunatelly I am solving one problem.
> iptraff displays all eth devices like eth0:
> eth1:, but it doesn't show wireless device like ath0:.

> I had mentioned the exact same thing quite a while back :)
> 
> http://archives.seul.org/iptraf/users/Feb-2004/msg00003.html
   Fine, but your patch is not complete. You forgot to patch
promisc.c. You also forgot to increment "#define NUM_SUPPORTED_IFACES 20".

   Unfortunatelly things are discovered over and over until
they are inserted into original distribution. Writing into this discussion 
forum I hope to reach original iptraf author.

It would be nice if ath: devices are regularry add into distribution.
Meanwhile I have found iptraff3.0 so I will emit a patch for this.

Jara

diff -r -c iptraf-2.7.0/src/ifaces.c iptraf-2.7.0.fix/src/ifaces.c
*** iptraf-2.7.0/src/ifaces.c	2002-05-08 11:43:27.000000000 +0200
--- iptraf-2.7.0.fix/src/ifaces.c	2007-07-24 08:07:11.000000000 +0200
***************
*** 32,43 ****
  #include "error.h"
  
  extern int accept_unsupported_interfaces;
! #define NUM_SUPPORTED_IFACES 20
  
  extern int daemonized;
  
  char ifaces[][6] =
!     { "lo", "eth", "sl", "ppp", "ippp", "plip", "fddi", "isdn", "dvb",
        "pvc", "hdlc", "ipsec", "sbni", "tr", "wvlan", "wlan", "sm2", "sm3",
        "pent", "lec" };
  
--- 32,43 ----
  #include "error.h"
  
  extern int accept_unsupported_interfaces;
! #define NUM_SUPPORTED_IFACES 21
  
  extern int daemonized;
  
  char ifaces[][6] =
!     { "lo", "eth", "ath", "sl", "ppp", "ippp", "plip", "fddi", "isdn", "dvb",
        "pvc", "hdlc", "ipsec", "sbni", "tr", "wvlan", "wlan", "sm2", "sm3",
        "pent", "lec" };
  
diff -r -c iptraf-2.7.0/src/packet.c iptraf-2.7.0.fix/src/packet.c
*** iptraf-2.7.0/src/packet.c	2002-05-08 11:44:08.000000000 +0200
--- iptraf-2.7.0.fix/src/packet.c	2007-07-24 08:06:37.000000000 +0200
***************
*** 80,85 ****
--- 80,87 ----
      case ARPHRD_ETHER:
  	if (strncmp(ifname, "eth", 3) == 0)
  	    result = LINK_ETHERNET;
+ 	else if (strncmp(ifname, "ath", 3) == 0)    /* For MadWifi */
+ 	    result = LINK_ETHERNET;
  	else if (strncmp(ifname, "plip", 4) == 0)
  	    result = LINK_PLIP;
  	else if (strncmp(ifname, "fddi", 4) == 0)    /* For some Ethernet- */
diff -r -c iptraf-2.7.0/src/promisc.c iptraf-2.7.0.fix/src/promisc.c
*** iptraf-2.7.0/src/promisc.c	2002-01-16 02:51:03.000000000 +0100
--- iptraf-2.7.0.fix/src/promisc.c	2007-07-24 08:08:27.000000000 +0200
***************
*** 81,86 ****
--- 81,87 ----
  	     */
  
  	    if ((strncmp(buf, "eth", 3) == 0) ||
+ 	        (strncmp(buf, "ath", 3) == 0) ||
  		(strncmp(buf, "fddi", 4) == 0) ||
    	        (strncmp(ptmp->params.ifname, "wvlan", 4) == 0) ||
  	        (strncmp(ptmp->params.ifname, "lec", 3) == 0) ||
***************
*** 194,199 ****
--- 195,201 ----
  
      while (ptmp != NULL) {
  	if (((strncmp(ptmp->params.ifname, "eth", 3) == 0) ||
+ 	     (strncmp(ptmp->params.ifname, "ath", 3) == 0) ||
  	     (strncmp(ptmp->params.ifname, "fddi", 4) == 0) ||
  	     (strncmp(ptmp->params.ifname, "wvlan", 4) == 0) ||
  	     (strncmp(ptmp->params.ifname, "lec", 3) == 0)) &&