summaryrefslogtreecommitdiffstats
path: root/net/iptraf/patches/002-ifaces.patch
blob: e4b0b1cdabe33640b1daf9d1990984e180b4cbea (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
--- a/src/dirs.h
+++ b/src/dirs.h
@@ -155,7 +155,6 @@
  */
 
 #define ETHFILE		get_path(T_WORKDIR, "ethernet.desc")
-#define FDDIFILE	get_path(T_WORKDIR, "fddi.desc")
 
 /*
  * The rvnamed program file
--- a/src/hostmon.c
+++ b/src/hostmon.c
@@ -31,7 +31,6 @@ details.
 #include <linux/if_packet.h>
 #include <linux/if_ether.h>
 #include <linux/netdevice.h>
-#include <linux/if_fddi.h>
 #include <linux/if_tr.h>
 #include <net/if_arp.h>
 #include <stdlib.h>
@@ -294,8 +293,6 @@ void printethent(struct ethtab *table, s
             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);
 
@@ -723,7 +720,7 @@ void hostmon(const struct OPTIONS *optio
     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;
@@ -787,7 +784,6 @@ void hostmon(const struct OPTIONS *optio
 
     initethtab(&table, options->actmode);
     loaddesclist(&elist, LINK_ETHERNET, WITHETCETHERS);
-    loaddesclist(&flist, LINK_FDDI, WITHETCETHERS);
 
     if (logging) {
         if (strcmp(current_logfile, "") == 0) {
@@ -901,9 +897,7 @@ void hostmon(const struct OPTIONS *optio
             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;
@@ -921,12 +915,6 @@ void hostmon(const struct OPTIONS *optio
                     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);
--- a/src/ifaces.c
+++ b/src/ifaces.c
@@ -37,7 +37,7 @@ extern int accept_unsupported_interfaces
 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"
 };
--- a/src/landesc.c
+++ b/src/landesc.c
@@ -83,8 +83,6 @@ void loaddesclist(struct desclist *list,
 
     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 @@ void savedesclist(struct desclist *list,
 
     if (linktype == LINK_ETHERNET)
         fd = fopen(ETHFILE, "w");
-    else if (linktype == LINK_FDDI)
-        fd = fopen(FDDIFILE, "w");
 
     if (fd < 0) {
         etherr();
--- a/src/links.h
+++ b/src/links.h
@@ -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
--- a/src/log.c
+++ b/src/log.c
@@ -491,8 +491,6 @@ void writeethlog(struct ethtabent *list,
                         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);
--- a/src/options.c
+++ b/src/options.c
@@ -68,8 +68,6 @@ void makeoptionmenu(struct MENU *menu)
     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 @@ void setoptions(struct OPTIONS *options,
         case 14:
             ethdescmgr(LINK_ETHERNET);
             break;
-        case 15:
-            ethdescmgr(LINK_FDDI);
-            break;
         }
 
         indicatesetting(row, options, statwin);
--- a/src/othptab.c
+++ b/src/othptab.c
@@ -22,7 +22,6 @@ details.
 #include <linux/if_ether.h>
 #include <linux/if_tr.h>
 #include <linux/netdevice.h>
-#include <linux/if_fddi.h>
 #include <winops.h>
 #include "arphdr.h"
 #include "options.h"
@@ -142,11 +141,6 @@ struct othptabent *add_othp_entry(struct
                         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);
@@ -376,8 +370,7 @@ void printothpentry(struct othptable *ta
         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);
 
--- a/src/packet.c
+++ b/src/packet.c
@@ -35,7 +35,6 @@ details.
 #include <linux/if_packet.h>
 #include <linux/if_ether.h>
 #include <linux/netdevice.h>
-#include <linux/if_fddi.h>
 #include <linux/if_tr.h>
 #include <linux/isdn.h>
 #include <linux/sockios.h>
@@ -81,8 +80,6 @@ unsigned short getlinktype(unsigned shor
             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 @@ unsigned short getlinktype(unsigned shor
     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 @@ void adjustpacket(char *tpacket, unsigne
         *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 
--- a/src/promisc.c
+++ b/src/promisc.c
@@ -81,8 +81,8 @@ void init_promisc_list(struct promisc_st
              */
 
             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 @@ void srpromisc(int mode, struct promisc_
 
     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)) &&
--- a/src/rvnamed.h
+++ b/src/rvnamed.h
@@ -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"
 
--- a/src/tcptable.c
+++ b/src/tcptable.c
@@ -600,8 +600,6 @@ void updateentry(struct tcptable *table,
 
         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);
         }
--- a/src/tcptable.h
+++ b/src/tcptable.h
@@ -23,7 +23,6 @@
 #include <linux/if_packet.h>
 #include <linux/if_ether.h>
 #include <linux/netdevice.h>
-#include <linux/if_fddi.h>
 #include <linux/if_tr.h>
 // #include <net/if.h>
 #include <netinet/ip.h>