patch-src_hostmon_c 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. --- iptraf-3.0.1.orig/src/hostmon.c 2007-09-25 11:18:56.000000000 +0200
  2. +++ iptraf-3.0.1/src/hostmon.c 2013-03-04 11:41:08.000000000 +0100
  3. @@ -32,7 +32,6 @@ details.
  4. #include <linux/if_ether.h>
  5. #include <linux/netdevice.h>
  6. #include <linux/if_fddi.h>
  7. -#include <linux/if_tr.h>
  8. #include <net/if_arp.h>
  9. #include <stdlib.h>
  10. #include <time.h>
  11. @@ -294,8 +293,6 @@ void printethent(struct ethtab *table, s
  12. wprintw(table->tabwin, "Ethernet");
  13. else if (entry->un.desc.linktype == LINK_PLIP)
  14. wprintw(table->tabwin, "PLIP");
  15. - else if (entry->un.desc.linktype == LINK_FDDI)
  16. - wprintw(table->tabwin, "FDDI");
  17. wprintw(table->tabwin, " HW addr: %s", entry->un.desc.ascaddr);
  18. @@ -723,7 +720,6 @@ void hostmon(const struct OPTIONS *optio
  19. unsigned long long updtime_usec = 0;
  20. struct desclist elist; /* Ethernet description list */
  21. - struct desclist flist; /* FDDI description list */
  22. struct desclist *list = NULL;
  23. FILE *logfile = NULL;
  24. @@ -787,7 +783,6 @@ void hostmon(const struct OPTIONS *optio
  25. initethtab(&table, options->actmode);
  26. loaddesclist(&elist, LINK_ETHERNET, WITHETCETHERS);
  27. - loaddesclist(&flist, LINK_FDDI, WITHETCETHERS);
  28. if (logging) {
  29. if (strcmp(current_logfile, "") == 0) {
  30. @@ -901,8 +896,7 @@ void hostmon(const struct OPTIONS *optio
  31. if (pkt_result != PACKET_OK)
  32. continue;
  33. - if ((linktype == LINK_ETHERNET) || (linktype == LINK_FDDI)
  34. - || (linktype == LINK_PLIP) || (linktype == LINK_TR) ||
  35. + if ((linktype == LINK_ETHERNET) || (linktype == LINK_PLIP) ||
  36. (linktype == LINK_VLAN)) {
  37. if (fromaddr.sll_protocol == htons(ETH_P_IP))
  38. @@ -921,18 +915,6 @@ void hostmon(const struct OPTIONS *optio
  39. memcpy(scratch_daddr, ((struct ethhdr *) buf)->h_dest,
  40. ETH_ALEN);
  41. list = &elist;
  42. - } else if (linktype == LINK_FDDI) {
  43. - memcpy(scratch_saddr, ((struct fddihdr *) buf)->saddr,
  44. - FDDI_K_ALEN);
  45. - memcpy(scratch_daddr, ((struct fddihdr *) buf)->daddr,
  46. - FDDI_K_ALEN);
  47. - list = &flist;
  48. - } else if (linktype == LINK_TR) {
  49. - memcpy(scratch_saddr, ((struct trh_hdr *) buf)->saddr,
  50. - TR_ALEN);
  51. - memcpy(scratch_daddr, ((struct trh_hdr *) buf)->daddr,
  52. - TR_ALEN);
  53. - list = &flist;
  54. }
  55. entry = in_ethtable(&table, linktype, scratch_saddr);
  56. @@ -999,7 +981,6 @@ void hostmon(const struct OPTIONS *optio
  57. doupdate();
  58. destroyethtab(&table);
  59. destroydesclist(&elist);
  60. - destroydesclist(&flist);
  61. unmark_facility(LANMONIDFILE, ifptr);
  62. strcpy(current_logfile, "");
  63. }