It doesn't work and I don't know anyone who needs it and is willing to debug it.
If there's an interest, we may restore it or rewrite from scratch.
Signed-off-by: Vitezslav Samel vitezslav@samel.cz --- Documentation/manual.template | 20 ----------- Makefile | 2 - src/detstats.c | 2 - src/hostmon.c | 1 - src/ifaces.c | 8 ---- src/ifaces.h | 1 - src/ifstats.c | 2 - src/iptraf-ng-compat.h | 1 - src/isdntab.c | 73 ----------------------------------------- src/isdntab.h | 20 ----------- src/itrafmon.c | 2 - src/packet.c | 13 ------- src/packet.h | 2 - src/pktsize.c | 1 - src/serv.c | 2 - 15 files changed, 0 insertions(+), 150 deletions(-) delete mode 100644 src/isdntab.c delete mode 100644 src/isdntab.h
diff --git a/Documentation/manual.template b/Documentation/manual.template index 1626331..ba8a1c8 100644 --- a/Documentation/manual.template +++ b/Documentation/manual.template @@ -890,26 +890,6 @@ A SLIP interface. <replaceable>n</replaceable> starts from 0. </para></listitem> </varlistentry> <varlistentry> -<term><filename>ippp<replaceable>n</replaceable></filename></term> -<listitem><para> - A synchronous PPP interface using ISDN. -<replaceable>n</replaceable> starts from 0. -</para> -</listitem> -</varlistentry> -<varlistentry> -<term><filename>isdn<replaceable>n</replaceable</filename></term> -<listitem><para> - ISDN interfaces can be given arbitrary names, but for them to work - with IPTraf, they must - be named <filename>isdn<replaceable>n</replaceable></filename>. - IPTraf supports synchronous PPP - (the <filename>ippp<replaceable>n</replaceable></filename> - interfaces above), raw IP, and Cisco-HDLC encapsulation. -</para> -</listitem> -</varlistentry> -<varlistentry> <term><filename>plip<replaceable>n</replaceable></filename></term> <listitem><para> PLIP interfaces. These are point-to-point IP connections using the PC diff --git a/Makefile b/Makefile index cefc16d..21ebadc 100644 --- a/Makefile +++ b/Makefile @@ -103,7 +103,6 @@ iptraf-h += src/pktsize.h iptraf-h += src/landesc.h iptraf-h += src/dirs.h iptraf-h += src/getpath.h -iptraf-h += src/isdntab.h iptraf-h += src/bar.h iptraf-h += src/options.h iptraf-h += src/promisc.h @@ -139,7 +138,6 @@ iptraf-o += src/timer.o iptraf-o += src/revname.o iptraf-o += src/pktsize.o iptraf-o += src/landesc.o -iptraf-o += src/isdntab.o iptraf-o += src/options.o iptraf-o += src/promisc.o iptraf-o += src/ifaces.o diff --git a/src/detstats.c b/src/detstats.c index b707969..8a8eb8c 100644 --- a/src/detstats.c +++ b/src/detstats.c @@ -13,7 +13,6 @@ detstats.c - the interface statistics module
#include "counters.h" #include "ifaces.h" -#include "isdntab.h" #include "fltdefs.h" #include "fltselect.h" #include "packet.h" @@ -401,7 +400,6 @@ void detstats(char *iface, const struct OPTIONS *options, time_t facilitytime, goto err_close; }
- //isdnfd = -1; exitloop = 0;
PACKET_INIT(pkt); diff --git a/src/hostmon.c b/src/hostmon.c index d3c4028..0fcffda 100644 --- a/src/hostmon.c +++ b/src/hostmon.c @@ -17,7 +17,6 @@ Discovers LAN hosts and displays packet statistics for them #include "deskman.h" #include "fltdefs.h" #include "fltselect.h" -#include "isdntab.h" /* needed by packet.h */ #include "packet.h" #include "ifaces.h" #include "hostmon.h" diff --git a/src/ifaces.c b/src/ifaces.c index d860a0f..d11a857 100644 --- a/src/ifaces.c +++ b/src/ifaces.c @@ -271,14 +271,6 @@ int dev_bind_ifname(const int fd, const char const *ifname) return dev_bind_ifindex(fd, ifr.ifr_ifindex); }
-void isdn_iface_check(int *fd, char *ifname) -{ - if (*fd == -1) { - if (strncmp(ifname, "isdn", 4) == 0) - *fd = open("/dev/isdnctrl", O_RDWR); - } -} - char *gen_iface_msg(char *ifptr) { static char if_msg[20]; diff --git a/src/ifaces.h b/src/ifaces.h index d51044c..d753cac 100644 --- a/src/ifaces.h +++ b/src/ifaces.h @@ -22,7 +22,6 @@ int dev_clear_promisc(char *ifname); int dev_get_ifname(int ifindex, char *ifname); int dev_bind_ifindex(const int fd, const int ifindex); int dev_bind_ifname(const int fd, const char const *ifname); -void isdn_iface_check(int *fd, char *ifname); char *gen_iface_msg(char *ifptr);
#endif /* IPTRAF_NG_IFACES_H */ diff --git a/src/ifstats.c b/src/ifstats.c index 02c4f3a..01148ef 100644 --- a/src/ifstats.c +++ b/src/ifstats.c @@ -15,7 +15,6 @@ ifstats.c - the interface statistics module #include "tui/winops.h"
#include "ifaces.h" -#include "isdntab.h" #include "fltdefs.h" #include "fltselect.h" #include "packet.h" @@ -518,7 +517,6 @@ void ifstats(const struct OPTIONS *options, struct filterstate *ofilter, goto err; }
- //isdnfd = -1; exitloop = 0; gettimeofday(&tv, NULL); start_tv = tv; diff --git a/src/iptraf-ng-compat.h b/src/iptraf-ng-compat.h index d252247..d21b689 100644 --- a/src/iptraf-ng-compat.h +++ b/src/iptraf-ng-compat.h @@ -40,7 +40,6 @@ #include <linux/if_packet.h> #include <linux/if_fddi.h> #include <linux/types.h> -#include <linux/isdn.h>
#include <linux/if.h> #include <linux/if_arp.h> diff --git a/src/isdntab.c b/src/isdntab.c deleted file mode 100644 index a226256..0000000 --- a/src/isdntab.c +++ /dev/null @@ -1,73 +0,0 @@ -/* For terms of usage/redistribution/modification see the LICENSE file */ -/* For authors and contributors see the AUTHORS file */ - -/*** - -isdntab.c - a set of simple routines that collect detected ISDN - interfaces and record their link encapsulation. - -***/ - -#include "iptraf-ng-compat.h" - -#include "isdntab.h" - -void add_isdn_entry(struct isdntab *list, char *ifname, int isdn_fd) -{ - struct isdntabent *new_entry; - isdn_net_ioctl_cfg isdn_cfg; - - new_entry = xmalloc(sizeof(struct isdntabent)); - - strcpy(new_entry->ifname, ifname); - new_entry->next_entry = NULL; - - if (list->head == NULL) - list->head = new_entry; - - if (list->tail != NULL) - list->tail->next_entry = new_entry; - - list->tail = new_entry; - - strcpy(isdn_cfg.name, ifname); - ioctl(isdn_fd, IIOCNETGCF, &isdn_cfg); - new_entry->encap = isdn_cfg.p_encap; -} - -struct isdntabent *isdn_table_lookup(struct isdntab *list, char *ifname, - int isdn_fd) -{ - struct isdntabent *ptmp = list->head; - - while (ptmp != NULL) { - if (strcmp(ptmp->ifname, ifname) == 0) - break; - - ptmp = ptmp->next_entry; - } - - if (ptmp == NULL) { - add_isdn_entry(list, ifname, isdn_fd); - ptmp = list->tail; - } - return ptmp; -} - -void destroy_isdn_table(struct isdntab *list) -{ - struct isdntabent *ptmp = list->head; - struct isdntabent *ctemp = NULL; - - if (ptmp != NULL) - ctemp = ptmp->next_entry; - - while (ptmp != NULL) { - free(ptmp); - - ptmp = ctemp; - - if (ctemp != NULL) - ctemp = ctemp->next_entry; - } -} diff --git a/src/isdntab.h b/src/isdntab.h deleted file mode 100644 index 48cb8ad..0000000 --- a/src/isdntab.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef IPTRAF_NG_ISDNTAB_H -#define IPTRAF_NG_ISDNTAB_H - -struct isdntabent { - char ifname[IFNAMSIZ]; - unsigned int encap; - struct isdntabent *next_entry; -}; - -struct isdntab { - struct isdntabent *head; - struct isdntabent *tail; -}; - -void add_isdn_entry(struct isdntab *list, char *ifname, int isdn_fd); -struct isdntabent *isdn_table_lookup(struct isdntab *list, char *ifname, - int isdn_fd); -void destroy_isdn_table(struct isdntab *list); - -#endif /* IPTRAF_NG_ISDNTAB_H */ diff --git a/src/itrafmon.c b/src/itrafmon.c index fe52dc2..d00d917 100644 --- a/src/itrafmon.c +++ b/src/itrafmon.c @@ -17,7 +17,6 @@ itrafmon.c - the IP traffic monitor module #include "othptab.h" #include "fltdefs.h" #include "fltselect.h" -#include "isdntab.h" #include "packet.h" #include "ifaces.h" #include "promisc.h" @@ -734,7 +733,6 @@ void ipmon(struct OPTIONS *options, struct filterstate *ofilter, goto err_close; }
- //isdnfd = -1; exitloop = 0; gettimeofday(&tv, NULL); starttime = timeint = closedint = tv.tv_sec; diff --git a/src/packet.c b/src/packet.c index c1baf3b..74d045b 100644 --- a/src/packet.c +++ b/src/packet.c @@ -16,20 +16,10 @@ packet.c - routines to open the raw socket, read socket data and #include "fltdefs.h" #include "fltselect.h" #include "ipfilter.h" -#include "isdntab.h" #include "ifaces.h" #include "packet.h" #include "ipfrag.h"
-/* Reimplement again - * Removed PPP, LINK_ISDN - */ - -/* -int isdnfd; -struct isdntab isdntable; -*/ - /* code taken from http://www.faqs.org/rfcs/rfc1071.html. See section 4.1 "C" */ static int in_cksum(u_short * addr, int len) { @@ -303,8 +293,5 @@ again: if (pkt->pkt_protocol == ETH_P_IP) {
void pkt_cleanup(void) { - // close(isdnfd); - // isdnfd = -1; destroyfraglist(); - // destroy_isdn_table(&isdntable); } diff --git a/src/packet.h b/src/packet.h index f194db8..0bed4a0 100644 --- a/src/packet.h +++ b/src/packet.h @@ -22,8 +22,6 @@ packet.h - external declarations for packet.c #define PACKET_FILTERED 3 #define MORE_FRAGMENTS 4
-extern int isdnfd; - struct pkt_hdr { size_t pkt_bufsize; char *pkt_payload; diff --git a/src/pktsize.c b/src/pktsize.c index 03d92df..a8c5d42 100644 --- a/src/pktsize.c +++ b/src/pktsize.c @@ -15,7 +15,6 @@ pktsize.c - the packet size breakdown facility #include "dirs.h" #include "fltdefs.h" #include "fltselect.h" -#include "isdntab.h" #include "ifaces.h" #include "packet.h" #include "deskman.h" diff --git a/src/serv.c b/src/serv.c index b64acec..6777460 100644 --- a/src/serv.c +++ b/src/serv.c @@ -16,7 +16,6 @@ serv.c - TCP/UDP port statistics module
#include "dirs.h" #include "deskman.h" -#include "isdntab.h" #include "fltdefs.h" #include "fltselect.h" #include "packet.h" @@ -903,7 +902,6 @@ void servmon(char *ifname, const struct OPTIONS *options, "******** TCP/UDP service monitor started ********"); }
- //isdnfd = -1; exitloop = 0; gettimeofday(&tv, NULL); starttime = startlog = timeint = tv.tv_sec;
Vitezslav Samel vitezslav@samel.cz writes:
It doesn't work and I don't know anyone who needs it and is willing to debug it.
If there's an interest, we may restore it or rewrite from scratch.
Signed-off-by: Vitezslav Samel vitezslav@samel.cz
Documentation/manual.template | 20 ----------- Makefile | 2 - src/detstats.c | 2 - src/hostmon.c | 1 - src/ifaces.c | 8 ---- src/ifaces.h | 1 - src/ifstats.c | 2 - src/iptraf-ng-compat.h | 1 - src/isdntab.c | 73 ----------------------------------------- src/isdntab.h | 20 ----------- src/itrafmon.c | 2 - src/packet.c | 13 ------- src/packet.h | 2 - src/pktsize.c | 1 - src/serv.c | 2 - 15 files changed, 0 insertions(+), 150 deletions(-) delete mode 100644 src/isdntab.c delete mode 100644 src/isdntab.h
applied. thanks.
iptraf-ng@lists.fedorahosted.org