[packages] iptraf: add patch to make iptraf recognize athX interfaces - thanks Jose...
[openwrt/svn-archive/archive.git] / net / iptraf / patches / 005-atheros.patch
1 --- a/src/ifaces.c 2009-11-28 18:45:44.000000000 +0000
2 +++ b/src/ifaces.c 2009-11-28 18:47:46.000000000 +0000
3 @@ -32,14 +32,14 @@
4 #include "error.h"
5
6 extern int accept_unsupported_interfaces;
7 -#define NUM_SUPPORTED_IFACES 26
8 +#define NUM_SUPPORTED_IFACES 27
9
10 extern int daemonized;
11
12 char ifaces[][6] =
13 { "lo", "eth", "sl", "ppp", "ippp", "plip", "isdn", "dvb",
14 "pvc", "hdlc", "ipsec", "sbni", "tr", "wvlan", "wlan", "sm2", "sm3",
15 - "pent", "lec", "brg", "tun", "tap", "cipcb", "tunl", "vlan"
16 + "pent", "lec", "brg", "tun", "tap", "cipcb", "tunl", "vlan", "ath"
17 };
18
19 char *ltrim(char *buf)
20 --- a/src/packet.c 2009-11-28 18:45:44.000000000 +0000
21 +++ b/src/packet.c 2009-11-28 18:48:06.000000000 +0000
22 @@ -104,6 +104,8 @@
23 result = LINK_ETHERNET;
24 else if (strncmp(ifname, "tap", 3) == 0)
25 result = LINK_ETHERNET;
26 + else if (strncmp(ifname, "ath", 3) == 0)
27 + result = LINK_ETHERNET;
28 else if ((strncmp(ifname, "isdn", 4) == 0) && (isdn_fd != -1)) {
29 isdnent = isdn_table_lookup(isdnlist, ifname, isdn_fd);
30
31 --- a/src/promisc.c 2009-11-28 18:45:44.000000000 +0000
32 +++ b/src/promisc.c 2009-11-28 18:48:28.000000000 +0000
33 @@ -82,6 +82,7 @@
34
35 if ((strncmp(buf, "eth", 3) == 0) ||
36 (strncmp(buf, "tr", 2) == 0) ||
37 + (strncmp(buf, "ath", 3) == 0) ||
38 (strncmp(buf, "vlan", 4) == 0) ||
39 (strncmp(ptmp->params.ifname, "wvlan", 4) == 0) ||
40 (strncmp(ptmp->params.ifname, "lec", 3) == 0) ||