summaryrefslogtreecommitdiff
path: root/openwrt/package/iptraf/patches/02-ifaces.patch
blob: 0b70022f095cfc1323cf0bf682aaf6c61047d904 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
diff -urN iptraf-3.0.0/src/dirs.h iptraf-3.0.0.new/src/dirs.h
--- iptraf-3.0.0/src/dirs.h	2005-09-13 08:42:54.000000000 +0200
+++ iptraf-3.0.0.new/src/dirs.h	2006-04-16 16:08:27.000000000 +0200
@@ -155,7 +155,6 @@
  */
 
 #define ETHFILE		get_path(T_WORKDIR, "ethernet.desc")
-#define FDDIFILE	get_path(T_WORKDIR, "fddi.desc")
 
 /*
  * The rvnamed program file
diff -urN iptraf-3.0.0/src/hostmon.c iptraf-3.0.0.new/src/hostmon.c
--- iptraf-3.0.0/src/hostmon.c	2005-09-13 08:42:54.000000000 +0200
+++ iptraf-3.0.0.new/src/hostmon.c	2006-04-16 16:29:27.000000000 +0200
@@ -30,7 +30,6 @@
 #include <netinet/in.h>
 #include <linux/if_packet.h>
 #include <linux/if_ether.h>
-#include <linux/if_fddi.h>
 #include <linux/if_tr.h>
 #include <net/if_arp.h>
 #include <stdlib.h>
@@ -293,8 +292,6 @@
             wprintw(table->tabwin, "Ethernet");
         else if (entry->un.desc.linktype == LINK_PLIP)
             wprintw(table->tabwin, "PLIP");
-        else if (entry->un.desc.linktype == LINK_FDDI)
-            wprintw(table->tabwin, "FDDI");
 
         wprintw(table->tabwin, " HW addr: %s", entry->un.desc.ascaddr);
 
@@ -722,7 +719,7 @@
     unsigned long long updtime_usec = 0;
 
     struct desclist elist;      /* Ethernet description list */
-    struct desclist flist;      /* FDDI description list */
+    struct desclist flist;	/* Other links description list */
     struct desclist *list = NULL;
 
     FILE *logfile = NULL;
@@ -786,7 +783,6 @@
 
     initethtab(&table, options->actmode);
     loaddesclist(&elist, LINK_ETHERNET, WITHETCETHERS);
-    loaddesclist(&flist, LINK_FDDI, WITHETCETHERS);
 
     if (logging) {
         if (strcmp(current_logfile, "") == 0) {
@@ -900,9 +896,7 @@
             if (pkt_result != PACKET_OK)
                 continue;
 
-            if ((linktype == LINK_ETHERNET) || (linktype == LINK_FDDI)
-                || (linktype == LINK_PLIP) || (linktype == LINK_TR) ||
-                (linktype == LINK_VLAN)) {
+            if ((linktype == LINK_ETHERNET) || (linktype == LINK_PLIP) || (linktype == LINK_TR) || (linktype == LINK_VLAN)) {
 
                 if (fromaddr.sll_protocol == htons(ETH_P_IP))
                     is_ip = 1;
@@ -920,12 +914,6 @@
                     memcpy(scratch_daddr, ((struct ethhdr *) buf)->h_dest,
                            ETH_ALEN);
                     list = &elist;
-                } else if (linktype == LINK_FDDI) {
-                    memcpy(scratch_saddr, ((struct fddihdr *) buf)->saddr,
-                           FDDI_K_ALEN);
-                    memcpy(scratch_daddr, ((struct fddihdr *) buf)->daddr,
-                           FDDI_K_ALEN);
-                    list = &flist;
                 } else if (linktype == LINK_TR) {
                     memcpy(scratch_saddr, ((struct trh_hdr *) buf)->saddr,
                            TR_ALEN);
diff -urN iptraf-3.0.0/src/ifaces.c iptraf-3.0.0.new/src/ifaces.c
--- iptraf-3.0.0/src/ifaces.c	2005-09-13 08:42:54.000000000 +0200
+++ iptraf-3.0.0.new/src/ifaces.c	2006-04-16 16:10:10.000000000 +0200
@@ -37,7 +37,7 @@
 extern int daemonized;
 
 char ifaces[][6] =
-    { "lo", "eth", "sl", "ppp", "ippp", "plip", "fddi", "isdn", "dvb",
+    { "lo", "eth", "sl", "ppp", "ippp", "plip", "isdn", "dvb",
     "pvc", "hdlc", "ipsec", "sbni", "tr", "wvlan", "wlan", "sm2", "sm3",
     "pent", "lec", "brg", "tun", "tap", "cipcb", "tunl", "vlan"
 };
diff -urN iptraf-3.0.0/src/landesc.c iptraf-3.0.0.new/src/landesc.c
--- iptraf-3.0.0/src/landesc.c	2005-09-13 08:42:54.000000000 +0200
+++ iptraf-3.0.0.new/src/landesc.c	2006-04-16 16:10:29.000000000 +0200
@@ -83,8 +83,6 @@
 
     if (linktype == LINK_ETHERNET)
         fd = fopen(ETHFILE, "r");
-    else if (linktype == LINK_FDDI)
-        fd = fopen(FDDIFILE, "r");
 
     if (fd == NULL) {
         return;
@@ -205,8 +203,6 @@
 
     if (linktype == LINK_ETHERNET)
         fd = fopen(ETHFILE, "w");
-    else if (linktype == LINK_FDDI)
-        fd = fopen(FDDIFILE, "w");
 
     if (fd < 0) {
         etherr();
diff -urN iptraf-3.0.0/src/links.h iptraf-3.0.0.new/src/links.h
--- iptraf-3.0.0/src/links.h	2005-09-13 08:42:54.000000000 +0200
+++ iptraf-3.0.0.new/src/links.h	2006-04-16 16:10:39.000000000 +0200
@@ -6,7 +6,6 @@
 #define LINK_ISDN_RAWIP		6
 #define LINK_ISDN_CISCOHDLC	7
 #define LINK_CISCOHDLC  7
-#define LINK_FDDI		8
 #define LINK_FRAD		9
 #define LINK_DLCI		10
 #define LINK_TR			11
diff -urN iptraf-3.0.0/src/log.c iptraf-3.0.0.new/src/log.c
--- iptraf-3.0.0/src/log.c	2005-09-13 08:42:54.000000000 +0200
+++ iptraf-3.0.0.new/src/log.c	2006-04-16 16:10:53.000000000 +0200
@@ -491,8 +491,6 @@
                         ptmp->un.desc.ascaddr);
             else if (ptmp->un.desc.linktype == LINK_PLIP)
                 fprintf(fd, "\nPLIP address: %s", ptmp->un.desc.ascaddr);
-            else if (ptmp->un.desc.linktype == LINK_FDDI)
-                fprintf(fd, "\nFDDI address: %s", ptmp->un.desc.ascaddr);
 
             if (ptmp->un.desc.withdesc)
                 fprintf(fd, " (%s)", ptmp->un.desc.desc);
diff -urN iptraf-3.0.0/src/options.c iptraf-3.0.0.new/src/options.c
--- iptraf-3.0.0/src/options.c	2005-09-13 08:42:54.000000000 +0200
+++ iptraf-3.0.0.new/src/options.c	2006-04-16 16:23:52.000000000 +0200
@@ -68,8 +68,6 @@
     tx_additem(menu, NULL, NULL);
     tx_additem(menu, " ^E^thernet/PLIP host descriptions...",
                "Manages descriptions for Ethernet and PLIP addresses");
-    tx_additem(menu, " ^F^DDI/Token Ring host descriptions...",
-               "Manages descriptions for FDDI and FDDI addresses");
     tx_additem(menu, NULL, NULL);
     tx_additem(menu, " E^x^it configuration", "Returns to main menu");
 }
@@ -371,9 +369,6 @@
         case 14:
             ethdescmgr(LINK_ETHERNET);
             break;
-        case 15:
-            ethdescmgr(LINK_FDDI);
-            break;
         }
 
         indicatesetting(row, options, statwin);
diff -urN iptraf-3.0.0/src/othptab.c iptraf-3.0.0.new/src/othptab.c
--- iptraf-3.0.0/src/othptab.c	2005-09-13 08:42:54.000000000 +0200
+++ iptraf-3.0.0.new/src/othptab.c	2006-04-16 16:24:21.000000000 +0200
@@ -19,7 +19,6 @@
 #include <asm/types.h>
 #include <linux/if_ether.h>
 #include <linux/if_tr.h>
-#include <linux/if_fddi.h>
 #include <winops.h>
 #include "arphdr.h"
 #include "options.h"
@@ -139,11 +138,6 @@
                         new_entry->smacaddr);
             convmacaddr(((struct ethhdr *) packet)->h_dest,
                         new_entry->dmacaddr);
-        } else if (linkproto == LINK_FDDI) {
-            convmacaddr(((struct fddihdr *) packet)->saddr,
-                        new_entry->smacaddr);
-            convmacaddr(((struct fddihdr *) packet)->daddr,
-                        new_entry->dmacaddr);
         } else if (linkproto == LINK_TR) {
             convmacaddr(((struct trh_hdr *) packet)->saddr,
                         new_entry->smacaddr);
@@ -373,8 +367,7 @@
         strcat(msgstring, scratchpad);
 
         if ((entry->linkproto == LINK_ETHERNET) ||
-            (entry->linkproto == LINK_PLIP) ||
-            (entry->linkproto == LINK_FDDI)) {
+            (entry->linkproto == LINK_PLIP)) {
             sprintf(scratchpad, " from %s to %s on %s",
                     entry->smacaddr, entry->dmacaddr, entry->iface);
 
diff -urN iptraf-3.0.0/src/packet.c iptraf-3.0.0.new/src/packet.c
--- iptraf-3.0.0/src/packet.c	2005-09-13 08:42:54.000000000 +0200
+++ iptraf-3.0.0.new/src/packet.c	2006-04-16 16:11:55.000000000 +0200
@@ -35,7 +35,6 @@
 #include <sys/ioctl.h>
 #include <linux/if_packet.h>
 #include <linux/if_ether.h>
-#include <linux/if_fddi.h>
 #include <linux/if_tr.h>
 #include <linux/isdn.h>
 #include <linux/sockios.h>
@@ -81,8 +80,6 @@
             result = LINK_ETHERNET;
         else if (strncmp(ifname, "plip", 4) == 0)
             result = LINK_PLIP;
-        else if (strncmp(ifname, "fddi", 4) == 0)       /* For some Ethernet- */
-            result = LINK_ETHERNET;     /* emulated FDDI ifaces */
         else if (strncmp(ifname, "dvb", 3) == 0)
             result = LINK_ETHERNET;
         else if (strncmp(ifname, "sbni", 4) == 0)
@@ -136,9 +133,6 @@
     case ARPHRD_PPP:
         result = LINK_PPP;
         break;
-    case ARPHRD_FDDI:
-        result = LINK_FDDI;
-        break;
     case ARPHRD_IEEE802:
     case ARPHRD_IEEE802_TR:
         result = LINK_TR;
@@ -194,19 +188,6 @@
         *packet = tpacket + 4;
         *readlen -= 4;
         break;
-    case LINK_FDDI:
-        *packet = tpacket + sizeof(struct fddihdr);
-        *readlen -= sizeof(struct fddihdr);
-
-        /*
-         * Move IP data into an aligned buffer.  96 bytes should be sufficient
-         * for IP and TCP headers with reasonable numbers of options and some
-         * data.
-         */
-
-        memmove(aligned_buf, *packet, min(SNAPSHOT_LEN, *readlen));
-        *packet = aligned_buf;
-        break;
     case LINK_TR:
         /*
          * Token Ring patch supplied by Tomas Dvorak 
diff -urN iptraf-3.0.0/src/promisc.c iptraf-3.0.0.new/src/promisc.c
--- iptraf-3.0.0/src/promisc.c	2005-09-13 08:42:54.000000000 +0200
+++ iptraf-3.0.0.new/src/promisc.c	2006-04-16 16:12:56.000000000 +0200
@@ -81,8 +81,8 @@
              */
 
             if ((strncmp(buf, "eth", 3) == 0) ||
-                (strncmp(buf, "fddi", 4) == 0) ||
                 (strncmp(buf, "tr", 2) == 0) ||
+		(strncmp(buf, "vlan", 4) == 0) ||
                 (strncmp(ptmp->params.ifname, "wvlan", 4) == 0) ||
                 (strncmp(ptmp->params.ifname, "lec", 3) == 0) ||
                 (accept_unsupported_interfaces)) {
@@ -195,7 +195,7 @@
 
     while (ptmp != NULL) {
         if (((strncmp(ptmp->params.ifname, "eth", 3) == 0) ||
-             (strncmp(ptmp->params.ifname, "fddi", 4) == 0) ||
+             (strncmp(ptmp->params.ifname, "vlan", 4) == 0) ||
              (strncmp(ptmp->params.ifname, "tr", 2) == 0) ||
              (strncmp(ptmp->params.ifname, "wvlan", 4) == 0) ||
              (strncmp(ptmp->params.ifname, "lec", 3) == 0)) &&
diff -urN iptraf-3.0.0/src/rvnamed.h iptraf-3.0.0.new/src/rvnamed.h
--- iptraf-3.0.0/src/rvnamed.h	2005-09-13 08:42:54.000000000 +0200
+++ iptraf-3.0.0.new/src/rvnamed.h	2006-04-16 16:13:39.000000000 +0200
@@ -1,9 +1,9 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
-#define CHILDSOCKNAME "/dev/rvndcldcomsk"
-#define PARENTSOCKNAME "/dev/rvndpntcomsk"
-#define IPTSOCKNAME "/dev/rvndiptcomsk"
+#define CHILDSOCKNAME "/tmp/rvndcldcomsk"
+#define PARENTSOCKNAME "/tmp/rvndpntcomsk"
+#define IPTSOCKNAME "/tmp/rvndiptcomsk"
 
 #define SOCKET_PREFIX	"isock"
 
diff -urN iptraf-3.0.0/src/tcptable.c iptraf-3.0.0.new/src/tcptable.c
--- iptraf-3.0.0/src/tcptable.c	2005-09-13 08:42:54.000000000 +0200
+++ iptraf-3.0.0.new/src/tcptable.c	2006-04-16 16:13:54.000000000 +0200
@@ -600,8 +600,6 @@
 
         if ((linkproto == LINK_ETHERNET) || (linkproto == LINK_PLIP)) {
             convmacaddr(((struct ethhdr *) packet)->h_source, newmacaddr);
-        } else if (linkproto == LINK_FDDI) {
-            convmacaddr(((struct fddihdr *) packet)->saddr, newmacaddr);
         } else if (linkproto == LINK_TR) {
             convmacaddr(((struct trh_hdr *) packet)->saddr, newmacaddr);
         }
diff -urN iptraf-3.0.0/src/tcptable.h iptraf-3.0.0.new/src/tcptable.h
--- iptraf-3.0.0/src/tcptable.h	2005-09-13 08:42:54.000000000 +0200
+++ iptraf-3.0.0.new/src/tcptable.h	2006-04-16 16:14:03.000000000 +0200
@@ -22,7 +22,6 @@
 #include <asm/types.h>
 #include <linux/if_packet.h>
 #include <linux/if_ether.h>
-#include <linux/if_fddi.h>
 #include <linux/if_tr.h>
 #include <net/if.h>
 #include <netinet/ip.h>