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 2024-02-25 18:13:41.165645150 +0100
3 @@ -36,8 +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>
12 @@ -107,21 +105,7 @@ unsigned short getlinktype(unsigned shor
13 result = LINK_ETHERNET;
14 else if (strncmp(ifname, "tap", 3) == 0)
15 result = LINK_ETHERNET;
16 - else if ((strncmp(ifname, "isdn", 4) == 0) && (isdn_fd != -1)) {
17 - isdnent = isdn_table_lookup(isdnlist, ifname, isdn_fd);
19 - switch (isdnent->encap) {
20 - case ISDN_NET_ENCAP_RAWIP:
21 - result = LINK_ISDN_RAWIP;
23 - case ISDN_NET_ENCAP_CISCOHDLC:
24 - result = LINK_ISDN_CISCOHDLC;
27 - result = LINK_INVALID;
30 - } else if (accept_unsupported_interfaces)
31 + else if (accept_unsupported_interfaces)
32 result = LINK_ETHERNET;
35 @@ -136,9 +120,6 @@ unsigned short getlinktype(unsigned shor
43 case ARPHRD_IEEE802_TR:
45 @@ -194,36 +175,6 @@ void adjustpacket(char *tpacket, unsigne
46 *packet = tpacket + 4;
50 - *packet = tpacket + sizeof(struct fddihdr);
51 - *readlen -= sizeof(struct fddihdr);
54 - * Move IP data into an aligned buffer. 96 bytes should be sufficient
55 - * for IP and TCP headers with reasonable numbers of options and some
59 - memmove(aligned_buf, *packet, min(SNAPSHOT_LEN, *readlen));
60 - *packet = aligned_buf;
64 - * Token Ring patch supplied by Tomas Dvorak
68 - * Get the start of the IP packet from the Token Ring frame.
70 - dataoffset = get_tr_ip_offset(tpacket);
71 - *packet = tpacket + dataoffset;
72 - *readlen -= dataoffset;
74 - * Move IP datagram into an aligned buffer.
76 - memmove(aligned_buf, *packet, min(SNAPSHOT_LEN, *readlen));
77 - *packet = aligned_buf;
82 @@ -463,5 +414,4 @@ void pkt_cleanup(void)
86 - destroy_isdn_table(&isdntable);