patch-src_hostmon_c 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- iptraf-3.0.0.orig/src/hostmon.c 2005-09-13 08:42:54.000000000 +0200
  3. +++ iptraf-3.0.0/src/hostmon.c 2008-10-09 17:34:11.000000000 +0200
  4. @@ -30,7 +30,6 @@ details.
  5. #include <netinet/in.h>
  6. #include <linux/if_packet.h>
  7. #include <linux/if_ether.h>
  8. -#include <linux/if_fddi.h>
  9. #include <linux/if_tr.h>
  10. #include <net/if_arp.h>
  11. #include <stdlib.h>
  12. @@ -293,8 +292,6 @@ void printethent(struct ethtab *table, s
  13. wprintw(table->tabwin, "Ethernet");
  14. else if (entry->un.desc.linktype == LINK_PLIP)
  15. wprintw(table->tabwin, "PLIP");
  16. - else if (entry->un.desc.linktype == LINK_FDDI)
  17. - wprintw(table->tabwin, "FDDI");
  18. wprintw(table->tabwin, " HW addr: %s", entry->un.desc.ascaddr);
  19. @@ -722,7 +719,7 @@ void hostmon(const struct OPTIONS *optio
  20. unsigned long long updtime_usec = 0;
  21. struct desclist elist; /* Ethernet description list */
  22. - struct desclist flist; /* FDDI description list */
  23. + struct desclist flist; /* Other links description list */
  24. struct desclist *list = NULL;
  25. FILE *logfile = NULL;
  26. @@ -786,7 +783,6 @@ void hostmon(const struct OPTIONS *optio
  27. initethtab(&table, options->actmode);
  28. loaddesclist(&elist, LINK_ETHERNET, WITHETCETHERS);
  29. - loaddesclist(&flist, LINK_FDDI, WITHETCETHERS);
  30. if (logging) {
  31. if (strcmp(current_logfile, "") == 0) {
  32. @@ -900,9 +896,7 @@ void hostmon(const struct OPTIONS *optio
  33. if (pkt_result != PACKET_OK)
  34. continue;
  35. - if ((linktype == LINK_ETHERNET) || (linktype == LINK_FDDI)
  36. - || (linktype == LINK_PLIP) || (linktype == LINK_TR) ||
  37. - (linktype == LINK_VLAN)) {
  38. + if ((linktype == LINK_ETHERNET) || (linktype == LINK_PLIP) || (linktype == LINK_TR) || (linktype == LINK_VLAN)) {
  39. if (fromaddr.sll_protocol == htons(ETH_P_IP))
  40. is_ip = 1;
  41. @@ -920,12 +914,6 @@ void hostmon(const struct OPTIONS *optio
  42. memcpy(scratch_daddr, ((struct ethhdr *) buf)->h_dest,
  43. ETH_ALEN);
  44. list = &elist;
  45. - } else if (linktype == LINK_FDDI) {
  46. - memcpy(scratch_saddr, ((struct fddihdr *) buf)->saddr,
  47. - FDDI_K_ALEN);
  48. - memcpy(scratch_daddr, ((struct fddihdr *) buf)->daddr,
  49. - FDDI_K_ALEN);
  50. - list = &flist;
  51. } else if (linktype == LINK_TR) {
  52. memcpy(scratch_saddr, ((struct trh_hdr *) buf)->saddr,
  53. TR_ALEN);