summaryrefslogtreecommitdiff
path: root/package/iptraf/patches/patch-src_hostmon_c
blob: da8d6ff69c19f14322456ac692838eb8e31edf3f (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
--- iptraf-3.0.1.orig/src/hostmon.c	2007-09-25 11:18:56.000000000 +0200
+++ iptraf-3.0.1/src/hostmon.c	2013-03-04 11:41:08.000000000 +0100
@@ -32,7 +32,6 @@ details.
 #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>
 #include <time.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,6 @@ 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 *list = NULL;
 
     FILE *logfile = NULL;
@@ -787,7 +783,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,8 +896,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) ||
+            if ((linktype == LINK_ETHERNET) || (linktype == LINK_PLIP) ||
                 (linktype == LINK_VLAN)) {
 
                 if (fromaddr.sll_protocol == htons(ETH_P_IP))
@@ -921,18 +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);
-                    memcpy(scratch_daddr, ((struct trh_hdr *) buf)->daddr,
-                           TR_ALEN);
-                    list = &flist;
                 }
 
                 entry = in_ethtable(&table, linktype, scratch_saddr);
@@ -999,7 +981,6 @@ void hostmon(const struct OPTIONS *optio
     doupdate();
     destroyethtab(&table);
     destroydesclist(&elist);
-    destroydesclist(&flist);
     unmark_facility(LANMONIDFILE, ifptr);
     strcpy(current_logfile, "");
 }