patch-src_packet_c 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --- iptraf-3.0.1.orig/src/packet.c 2007-09-25 11:21:18.000000000 +0200
  2. +++ iptraf-3.0.1/src/packet.c 2013-03-04 11:42:52.000000000 +0100
  3. @@ -36,7 +36,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 <linux/isdn.h>
  9. #include <linux/sockios.h>
  10. #include <msgboxes.h>
  11. @@ -136,9 +135,6 @@ unsigned short getlinktype(unsigned shor
  12. case ARPHRD_PPP:
  13. result = LINK_PPP;
  14. break;
  15. - case ARPHRD_FDDI:
  16. - result = LINK_FDDI;
  17. - break;
  18. case ARPHRD_IEEE802:
  19. case ARPHRD_IEEE802_TR:
  20. result = LINK_TR;
  21. @@ -194,36 +190,6 @@ void adjustpacket(char *tpacket, unsigne
  22. *packet = tpacket + 4;
  23. *readlen -= 4;
  24. break;
  25. - case LINK_FDDI:
  26. - *packet = tpacket + sizeof(struct fddihdr);
  27. - *readlen -= sizeof(struct fddihdr);
  28. -
  29. - /*
  30. - * Move IP data into an aligned buffer. 96 bytes should be sufficient
  31. - * for IP and TCP headers with reasonable numbers of options and some
  32. - * data.
  33. - */
  34. -
  35. - memmove(aligned_buf, *packet, min(SNAPSHOT_LEN, *readlen));
  36. - *packet = aligned_buf;
  37. - break;
  38. - case LINK_TR:
  39. - /*
  40. - * Token Ring patch supplied by Tomas Dvorak
  41. - */
  42. -
  43. - /*
  44. - * Get the start of the IP packet from the Token Ring frame.
  45. - */
  46. - dataoffset = get_tr_ip_offset(tpacket);
  47. - *packet = tpacket + dataoffset;
  48. - *readlen -= dataoffset;
  49. - /*
  50. - * Move IP datagram into an aligned buffer.
  51. - */
  52. - memmove(aligned_buf, *packet, min(SNAPSHOT_LEN, *readlen));
  53. - *packet = aligned_buf;
  54. - break;
  55. case LINK_IPIP:
  56. *packet = tpacket;
  57. break;