Hello community,
here is the log from the commit of package iftop
checked in at Tue Jul 11 20:29:02 CEST 2006.
--------
--- iftop/iftop.changes 2006-01-25 21:36:35.000000000 +0100
+++ iftop/iftop.changes 2006-07-11 13:36:18.000000000 +0200
@@ -1,0 +2,10 @@
+Mon Jul 10 13:09:10 CEST 2006 - mskibbe@suse.de
+
+- update to version 0.17 which
+ o Added support for ppp interfaces
+ o Fixed segfault bug in config file handling
+ o Fixes to man page
+ o Fix for hash table memory handling bug
+ o Added 802.1q VLAN support
+
+-------------------------------------------------------------------
Old:
----
iftop-0.16.tar.bz2
New:
----
iftop-0.17.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ iftop.spec ++++++
--- /var/tmp/diff_new_pack.iMfPe3/_old 2006-07-11 20:28:38.000000000 +0200
+++ /var/tmp/diff_new_pack.iMfPe3/_new 2006-07-11 20:28:38.000000000 +0200
@@ -1,19 +1,19 @@
#
-# spec file for package iftop (Version 0.16)
+# spec file for package iftop (Version 0.17)
#
-# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
-# Please submit bugfixes or comments via http://www.suse.de/feedback/
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: iftop
BuildRequires: libpcap
-Version: 0.16
-Release: 21
+Version: 0.17
+Release: 1
Source0: %name-%version.tar.bz2
Patch0: %name-manpage.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -58,6 +58,13 @@
%{_mandir}/man8/*
%changelog -n iftop
+* Mon Jul 10 2006 - mskibbe@suse.de
+- update to version 0.17 which
+ o Added support for ppp interfaces
+ o Fixed segfault bug in config file handling
+ o Fixes to man page
+ o Fix for hash table memory handling bug
+ o Added 802.1q VLAN support
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Oct 12 2005 - hvogel@suse.de
++++++ iftop-0.16.tar.bz2 -> iftop-0.17.tar.bz2 ++++++
++++ 3512 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/iftop-0.16/ChangeLog new/iftop-0.17/ChangeLog
--- old/iftop-0.16/ChangeLog 2004-02-28 19:53:37.000000000 +0100
+++ new/iftop-0.17/ChangeLog 2006-02-12 20:22:49.000000000 +0100
@@ -1,9 +1,33 @@
Change log for iftop
-$Id: ChangeLog,v 1.23 2004/02/28 18:53:37 pdw Exp $
+$Id: ChangeLog,v 1.29 2005/12/25 12:15:08 pdw Exp $
Attributions apply to all preceding items up to the next blank line.
Unattributed items are by Paul Warren and Chris Lightfoot.
+0.17 12/02/06
+* Added support for ppp interfaces on FreeBSD (and others using DLT_PPP)
+
+* Fixed segfault bug in config file handling.
+* Fixes to man page
+ William Robinet
+
+* Fix for hash table memory handling bug (caused segfaults on Mac OS X)
+* Header fixes for Mac OS X
+ Ken McLeod
+
+* Fixes for compile time errors apparent on Mac OS 10.4.3
+ Georg Schwarz
+
+* Improvements to configure to support cross-compilation
+* Addition of "NO_SYSTEM" compiler flag to prevent subshell execution
+ Tim Freeman
+
+* Fix to get hardware address on FreeBSD and OpenBSD
+ Nicolas Bernard
+
+* Added 802.1q VLAN support
+ Jacek Konieczny
+
0.16 28/02/04
* Added support for DLT_NULL
* Fix for pthread.c behaviour on Solaris.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/iftop-0.16/Makefile.am new/iftop-0.17/Makefile.am
--- old/iftop-0.16/Makefile.am 2003-11-10 23:16:55.000000000 +0100
+++ new/iftop-0.17/Makefile.am 2004-07-27 10:45:17.000000000 +0200
@@ -7,7 +7,7 @@
# it.
# -- Chris Lightfoot
#
-# $Id: Makefile.am,v 1.8 2003/11/10 22:16:55 pdw Exp $
+# $Id: Makefile.am,v 1.9 2004/07/27 08:45:17 pdw Exp $
#
sbin_PROGRAMS = iftop
@@ -22,7 +22,7 @@
integers.h ip.h llc.h ns_hash.h options.h resolver.h \
screenfilter.h serv_hash.h sll.h sorted_list.h tcp.h \
threadprof.h token.h ui.h dlcommon.h stringmap.h \
- vector.h cfgfile.h
+ vector.h cfgfile.h ppp.h
man_MANS = iftop.8
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/iftop-0.16/addrs_ioctl.c new/iftop-0.17/addrs_ioctl.c
--- old/iftop-0.16/addrs_ioctl.c 2003-10-15 00:33:22.000000000 +0200
+++ new/iftop-0.17/addrs_ioctl.c 2005-12-24 12:37:43.000000000 +0100
@@ -18,6 +18,12 @@
#include
#include
+#if defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
+#include
+#include
+#include
+#endif
+
#include "iftop.h"
/*
@@ -65,8 +71,42 @@
got_hw_addr = 1;
}
#else
+#if defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
+ {
+ int sysctlparam[6] = {CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, 0};
+ size_t needed = 0;
+ char *buf = NULL;
+ struct if_msghdr *msghdr = NULL;
+ sysctlparam[5] = if_nametoindex(interface);
+ if (sysctlparam[5] == 0) {
+ fprintf(stderr, "Error getting hardware address for interface: %s\n", interface);
+ goto ENDHWADDR;
+ }
+ if (sysctl(sysctlparam, 6, NULL, &needed, NULL, 0) < 0) {
+ fprintf(stderr, "Error getting hardware address for interface: %s\n", interface);
+ goto ENDHWADDR;
+ }
+ if ((buf = malloc(needed)) == NULL) {
+ fprintf(stderr, "Error getting hardware address for interface: %s\n", interface);
+ goto ENDHWADDR;
+ }
+ if (sysctl(sysctlparam, 6, buf, &needed, NULL, 0) < 0) {
+ fprintf(stderr, "Error getting hardware address for interface: %s\n", interface);
+ free(buf);
+ goto ENDHWADDR;
+ }
+ msghdr = (struct if_msghdr *) buf;
+ memcpy(if_hw_addr, LLADDR((struct sockaddr_dl *)(buf + sizeof(struct if_msghdr) - sizeof(struct if_data) + sizeof(struct if_data))), 6);
+ free(buf);
+ got_hw_addr = 1;
+
+ ENDHWADDR:
+ 1; /* compiler whines if there is a label at the end of a block...*/
+ }
+#else
fprintf(stderr, "Cannot obtain hardware address on this platform\n");
#endif
+#endif
/* Get the IP address of the interface */
#ifdef SIOCGIFADDR
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/iftop-0.16/cfgfile.c new/iftop-0.17/cfgfile.c
--- old/iftop-0.16/cfgfile.c 2003-11-06 19:22:16.000000000 +0100
+++ new/iftop-0.17/cfgfile.c 2005-12-24 12:37:43.000000000 +0100
@@ -45,9 +45,9 @@
extern options_t options ;
int is_cfgdirective_valid(const char *s) {
- char* t;
- for (t = config_directives[0]; t != NULL; ++t)
- if (strcmp(s, t) == 0) return 1;
+ char **t;
+ for (t = config_directives; *t != NULL; ++t)
+ if (strcmp(s, *t) == 0) return 1;
return 0;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/iftop-0.16/config/pthread.c new/iftop-0.17/config/pthread.c
--- old/iftop-0.16/config/pthread.c 2004-01-20 12:58:45.000000000 +0100
+++ new/iftop-0.17/config/pthread.c 2005-12-24 12:37:43.000000000 +0100
@@ -3,7 +3,7 @@
* Tiny test program to see whether POSIX threads work.
*/
-static const char rcsid[] = "$Id: pthread.c,v 1.3 2004/01/20 09:51:48 pdw Exp $";
+static const char rcsid[] = "$Id: pthread.c,v 1.4 2005/10/26 22:56:05 chris Exp $";
#include
@@ -40,7 +40,7 @@
struct timespec deadline = {0};
if ((res = pthread_mutex_lock(&mtx)) != 0
|| (res = pthread_create(&thr, NULL, worker_thread, NULL)) != 0) {
- fprintf(stderr, "%s\n", strerror(res));
+ fprintf(stderr, "%s\n", strerror(res));
return -1;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/iftop-0.16/configure.in new/iftop-0.17/configure.in
--- old/iftop-0.16/configure.in 2004-02-28 19:53:37.000000000 +0100
+++ new/iftop-0.17/configure.in 2006-02-12 19:34:24.000000000 +0100
@@ -7,9 +7,17 @@
dnl special cases. But that's OK. Paul is going to maintain it :)
dnl -- Chris Lightfoot
dnl
-dnl $Id: configure.in,v 1.23 2004/02/28 18:53:37 pdw Exp $
+dnl $Id: configure.in,v 1.27 2005/12/25 20:42:45 pdw Exp $
dnl
-
+dnl To regenerate everything from source, do:
+dnl autoheader
+dnl aclocal
+dnl automake
+dnl autoconf
+dnl Now you should have good sources to make into a tarball and distribute.
+dnl ./configure (perhaps with some arguments)
+dnl make
+dnl Tested with Automake 1.4 and autoconf 2.59.
dnl
dnl Boilerplate configuration
dnl
@@ -21,7 +29,7 @@
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(iftop, "0.16")
+AM_INIT_AUTOMAKE(iftop, "0.17")
AC_DEFINE_UNQUOTED(IFTOP_VERSION, "$VERSION", [The iftop version number])
@@ -34,15 +42,23 @@
dnl
AC_ARG_WITH(resolver,
- [ --with-resolver=TYPE Technique iftop should use for name resolution. Valid
- options are netdb, netdb_1thread (for systems without
- working gethostbyaddr_r), ares for the MIT ARES
- asynchronous resolver library, forking for the REALLY
- SUCKY forking resolver, or none if you don't need any
- name resolution.
- [default=netdb]],
+ [ --with-resolver=TYPE Technique iftop should use for name resolution.
+ Valid options are:
+ netdb use gethostbyaddr_r in multiple
+ threads.
+ netdb_1thread use gethostbyaddr_r and
+ assume it is not reentrant.
+ ares use the MIT ARES asynchronous
+ resolver library.
+ forking use the REALLY SUCKY forking resolver.
+ guess run experiments to guess a
+ reasonable value. Only works if you
+ aren't cross-compiling. This
+ is the default. guess will
+ either select netdb or netdb_1thread.
+ none don't do name resolution.],
[resolver=$withval],
- [resolver=netdb])
+ [resolver=guess])
AC_ARG_WITH(libpcap,
[ --with-libpcap=WHERE Where the libpcap packet-capture library is found.
@@ -151,7 +167,12 @@
dnl First, the default resolver, which uses getnameinfo or gethostbyaddr_r. If
dnl not available, we fall back to gethostbyaddr. We could fall back to ARES,
dnl but that's probably not available on typical machines.
-if test x$resolver = xnetdb ; then
+
+dnl If we've been asked to guess, remember that fact in specified_resolver.
+dnl From this point on, resolver is our preferred resolver given the
+dnl experiments we've done so far, or "guess" if we have no idea.
+specified_resolver=$resolver
+if test x$specified_resolver = xguess ; then
dnl Best possibility is getnameinfo.
use_getnameinfo=0
AC_SEARCH_LIBS(getnameinfo, [nsl], [use_getnameinfo=1])
@@ -164,75 +185,101 @@
dnl Done.
AC_DEFINE(USE_GETNAMEINFO, 1, [use getnameinfo for name resolution])
else
- dnl Now see if we can use gethostbyaddr_r.
- AC_SEARCH_LIBS(gethostbyaddr_r, [nsl], , [resolver=forking])
+ dnl Best hope is netdb, which presently means gethostbyaddr_r.
+ resolver=netdb
+ fi
+fi
+
+if test x$resolver = xnetdb ; then
+ dnl Can use gethostbyaddr_r?
+ AC_SEARCH_LIBS(gethostbyaddr_r, [nsl], , [resolver=guess])
+ if test x$resolver = xguess && test x$specified_resolver != xguess ; then
+ dnl They wanted gethostbyaddr_r, but they can't have it, so stop.
+ AC_MSG_ERROR([no library defines gethostbyaddr_r])
+ fi
+fi
+
+dnl We still might do gethostbyaddr_r. Figure out whether we have
+dnl glibc-style or Solaris-style gethostbyaddr_r (or neither...).
+dnl Separate determining how to call gethostbyaddr_r from testing
+dnl whether it works so we can support cross-compilation.
+if test x$resolver = xnetdb ; then
+ AC_MSG_CHECKING([how to call gethostbyaddr_r])
+ dnl Try 7 arguments returning a struct hostent*.
+ AC_LINK_IFELSE(AC_LANG_SOURCE([`cat config/hostentp_ghba_r.c`]),
+ [AC_MSG_RESULT([7 args])
+ ghba_args=8
+ AC_DEFINE(GETHOSTBYADDR_R_RETURNS_HOSTENT_P, 1,
+ [7-argument gethostbyaddr_r returns struct hostent*])], [
+ dnl Try 8 arguments returning an int.
+ AC_LINK_IFELSE(AC_LANG_SOURCE([`cat config/int_ghba_r.c`]),
+ [AC_MSG_RESULT([8 args, int return])
+ ghba_args=8
+ AC_DEFINE(GETHOSTBYADDR_R_RETURNS_INT, 1,
+ [8-argument gethostbyaddr_r returns int])], [
+ dnl Neither.
+ AC_MSG_RESULT([don't know how])
+ resolver=guess])])
+ if test x$resolver = xguess && test x$specified_resolver != xguess ; then
+ dnl They wanted gethostbyaddr_r, but they can't have it, so stop.
+ AC_MSG_ERROR([gethostbyaddr_r has no known calling convention])
+ fi
+fi
- dnl Still want gethostbyaddr_r....
- if test x$resolver = xnetdb ; then
- dnl Figure out whether we have glibc-style or Solaris-style
- dnl gethostbyaddr_r (or neither...).
- AC_MSG_CHECKING([how to call gethostbyaddr_r]);
-
- AC_TRY_RUN([`cat config/int_ghba_r.c`], [
- dnl 8-arg, int
- AC_MSG_RESULT([8 args, int return])
- AC_DEFINE(GETHOSTBYADDR_R_RETURNS_INT, 1,
- [8-argument gethostbyaddr_r returns int])
- ], [
- AC_TRY_RUN([`cat config/hostentp_ghba_r.c`], [
- dnl 7-arg, struct hostent*
- AC_MSG_RESULT([7 args, struct hostent* return])
- AC_DEFINE(GETHOSTBYADDR_R_RETURNS_HOSTENT_P, 1,
- [7-argument gethostbyaddr_r returns struct hostent*])
- ], [
- dnl neither
- AC_MSG_RESULT([no idea; dropping back to the forking resolver])
- resolver=forking
- ])
- ])
-
- dnl Found a gethostbyaddr_r we know how to use and which seems to
- dnl work.
- if test x$resolver = xnetdb ; then
- AC_DEFINE(USE_GETHOSTBYADDR_R, 1, [use gethostbyaddr_r for name resolution])
- fi
+dnl If we still want to do gethostbyaddr_r, and we aren't
+dnl cross-compiling, test it.
+if test x$resolver = xnetdb ; then
+ if test x$ghba_args = x8 ; then
+ testfile=int_ghba_r
+ else
+ testfile=hostentp_ghba_r
+ fi
+ AC_MSG_CHECKING(gethostbyaddr_r usability)
+ AC_RUN_IFELSE([`cat config/$testfile.c`],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ resolver=guess],
+ [AC_MSG_RESULT([can't test because we are cross-compiling])])
+ if test x$resolver = xguess ; then
+ if test x$specified_resolver = xguess ; then
+ AC_MSG_RESULT([gethostbyaddr_r doesn't work, so we'll try something else])
+ else
+ dnl They wanted gethostbyaddr_r, but it doesn't work, so stop.
+ AC_MSG_ERROR([gethostbyaddr_r doesn't work])
fi
fi
fi
-dnl If we've been told to use ARES, then see if it's available. If it isn't,
-dnl fall back to gethostbyaddr, since we can probably assume that if the
-dnl machine had a working gethostbyaddr_r, the user wouldn't be pissing about
-dnl with ARES.
+dnl We found a gethostbyaddr_r we know how to use and which seems to
+dnl work.
+if test x$resolver = xnetdb ; then
+ AC_DEFINE(USE_GETHOSTBYADDR_R, 1, [use gethostbyaddr_r for name resolution])
+fi
+
+dnl They may have asked for ares.
if test x$resolver = xares ; then
dnl See if ares is to hand....
AC_SEARCH_LIBS(ares_init, [ares], [
AC_DEFINE(USE_ARES, 1, [use ARES for name resolution])
], [
- dnl no ares
- AC_MSG_RESULT([can't find ARES; dropping back to the forking resolver])
- resolver=forking])
+ dnl They asked for ares, but we can't give it to them, so stop.
+ AC_MSG_ERROR([can't find ARES. Re-run configure and ask for a different resolver.])])
fi
+dnl Last thing to try if we haven't decided yet is netdb_1thread.
+if test x$resolver = xguess ; then
+ resolver=netdb_1thread
+fi
dnl Ugh. Both the single-threaded and the forking resolvers use gethostbyaddr.
if test x$resolver = xnetdb_1thread || test x$resolver = xforking ; then
AC_SEARCH_LIBS(gethostbyaddr, [nsl], , [
- AC_MSG_ERROR([not even gethostbyaddr is available
- What sort of UNIX system is this, anyway?
-
- You will have to recompile with no name resolution at all.
-])
-
- ]
- )
+ AC_MSG_ERROR([gethostbyaddr is not available. You will have to
+ recompile with no name resolution at all.])])
if test x$resolver = xnetdb_1thread ; then
- dnl Oh dear, just use gethostbyaddr; but whine about it
-
AC_MSG_WARN([using single-threaded resolver with gethostbyaddr
Consider obtaining ARES or a machine with a working gethostbyaddr_r.])
-
AC_DEFINE(USE_GETHOSTBYADDR, 1, [use gethostbyaddr for name resolution])
else
AC_DEFINE(USE_FORKING_RESOLVER, 1, [use a REALLY SUCKY forking resolver for name resolution])
@@ -332,7 +379,7 @@
dnl libraries, etc. We use a test program to figure this stuff out.
dnl
-AC_MSG_CHECKING([how to compile a working program with POSIX threads])
+AC_MSG_CHECKING([POSIX threads compilation])
thrfail=1
oldCFLAGS=$CFLAGS
oldLIBS=$LIBS
@@ -340,7 +387,7 @@
CFLAGS="$oldCFLAGS $flag"
for lib in "" -lpthread "-lpthread -lposix4" ; do
LIBS="$oldLIBS $lib"
- AC_TRY_RUN([`cat config/pthread.c`], [
+ AC_LINK_IFELSE(AC_LANG_SOURCE([`cat config/pthread.c`]), [
foundthrlib=$lib
foundthrflag=$flag
thrfail=0
@@ -356,10 +403,16 @@
AC_MSG_RESULT([no idea])
AC_MSG_ERROR([can't figure out how to compile with POSIX threads
If your system actually supports POSIX threads, this means we've messed up.])
-else
- AC_MSG_RESULT([$foundthrflag $foundthrlib])
fi
+AC_MSG_RESULT([CFLAGS=$foundthrflag and LIBS=$foundthrlib])
+AC_MSG_CHECKING([POSIX threads usability])
+AC_RUN_IFELSE([`cat config/pthread.c`],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_ERROR(
+ [it fails. We probably guessed the wrong CFLAGS.])],
+ [AC_MSG_RESULT([can't test because we are cross-compiling])])
+
dnl
dnl Are we on a system (like Solaris) that requires promiscuous mode in order to
dnl see any outgoing packets?
@@ -374,7 +427,8 @@
esac
AC_ARG_ENABLE(default-promiscuous,
- [--enable-default-promiscuous If enabled, iftop will operate in promiscuous mode to capture outgoing packets])
+ [ --enable-default-promiscuous If enabled, iftop will operate in promiscuous mode
+ to capture outgoing packets])
AC_MSG_RESULT([$enable_default_promiscuous])
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/iftop-0.16/ether.h new/iftop-0.17/ether.h
--- old/iftop-0.16/ether.h 2002-10-18 19:29:32.000000000 +0200
+++ new/iftop-0.17/ether.h 2005-03-31 14:08:05.000000000 +0200
@@ -14,4 +14,9 @@
u_int16_t ether_type;
};
+struct vlan_8021q_header {
+ u_int16_t priority_cfi_vid;
+ u_int16_t ether_type;
+};
+
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/iftop-0.16/iftop.8 new/iftop-0.17/iftop.8
--- old/iftop-0.16/iftop.8 2003-10-22 21:28:31.000000000 +0200
+++ new/iftop-0.17/iftop.8 2005-12-25 12:50:21.000000000 +0100
@@ -3,7 +3,7 @@
.\" iftop.8:
.\" Manual page for iftop.
.\"
-.\" $Id: iftop.8,v 1.24 2003/10/22 19:28:31 pdw Exp $
+.\" $Id: iftop.8,v 1.25 2005/12/25 11:50:21 pdw Exp $
.\"
.SH NAME
@@ -29,9 +29,9 @@
By default, \fBiftop\fP counts all IP packets that pass through the filter, and
the direction of the packet is determined according to the direction the packet
-is moving across the interface. Using the \fB-N\fP option it is possible to
+is moving across the interface. Using the \fB-F\fP option it is possible to
get \fBiftop\fP to show packets entering and leaving a given network. For
-example, \fBiftop -N 10.0.0.0/255.0.0.0\fP will analyse packets flowing in and
+example, \fBiftop -F 10.0.0.0/255.0.0.0\fP will analyse packets flowing in and
out of the 10.* network.
Some other filter ideas:
@@ -87,7 +87,7 @@
.TP
\fB-c\fP \fIconfig file\fP
Specifies an alternate config file. If not specified, iftop will use
-\fB~/.iftopc\fP if it exists. See below for a description of config files
+\fB~/.iftoprc\fP if it exists. See below for a description of config files
.SH DISPLAY
@@ -257,12 +257,12 @@
you, but is included in the totals.
A more subtle explanation comes about when running in promiscuous mode
-without specifying a \fB-N\fP option. In this case there is no easy way
+without specifying a \fB-F\fP option. In this case there is no easy way
to assign the direction of traffic between two third parties. For the purposes
of the main display this is done in an arbitrary fashion (by ordering of IP
addresses), but for the sake of totals all traffic between other hosts is
accounted as incoming, because that's what it is from the point of view of your
-interface. The \fB-N\fP option allows you to specify an arbitrary network
+interface. The \fB-F\fP option allows you to specify an arbitrary network
boundary, and to show traffic flowing across it.
\fBPeak totals don't add up\fP
@@ -295,7 +295,7 @@
Paul Warren
.SH VERSION
-$Id: iftop.8,v 1.24 2003/10/22 19:28:31 pdw Exp $
+$Id: iftop.8,v 1.25 2005/12/25 11:50:21 pdw Exp $
.SH COPYING
This program is free software; you can redistribute it and/or modify
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/iftop-0.16/iftop.c new/iftop-0.17/iftop.c
--- old/iftop-0.16/iftop.c 2004-02-28 19:47:54.000000000 +0100
+++ new/iftop-0.17/iftop.c 2005-03-31 14:08:05.000000000 +0200
@@ -43,6 +43,7 @@
#include "extract.h"
#include "ethertype.h"
#include "cfgfile.h"
+#include "ppp.h"
/* ethernet address of interface. */
@@ -75,8 +76,8 @@
-/* Only need ethernet and IP headers (48) + first 2 bytes of tcp/udp header */
-#define CAPTURE_LENGTH 68
+/* Only need ethernet (plus optional 4 byte VLAN) and IP headers (48) + first 2 bytes of tcp/udp header */
+#define CAPTURE_LENGTH 72
void init_history() {
history = addr_hash_create();
@@ -353,6 +354,32 @@
}
}
+static void handle_ppp_packet(unsigned char* args, const struct pcap_pkthdr* pkthdr, const unsigned char* packet)
+{
+ register u_int length = pkthdr->len;
+ register u_int caplen = pkthdr->caplen;
+ u_int proto;
+
+ if (caplen < 2)
+ return;
+
+ if(packet[0] == PPP_ADDRESS) {
+ if (caplen < 4)
+ return;
+
+ packet += 2;
+ length -= 2;
+
+ proto = EXTRACT_16BITS(packet);
+ packet += 2;
+ length -= 2;
+
+ if(proto == PPP_IP || proto == ETHERTYPE_IP) {
+ handle_ip_packet((struct ip*)packet, -1);
+ }
+ }
+}
+
#ifdef DLT_LINUX_SLL
static void handle_cooked_packet(unsigned char *args, const struct pcap_pkthdr * thdr, const unsigned char * packet)
{
@@ -378,11 +405,22 @@
static void handle_eth_packet(unsigned char* args, const struct pcap_pkthdr* pkthdr, const unsigned char* packet)
{
struct ether_header *eptr;
+ int ether_type;
+ const unsigned char *payload;
eptr = (struct ether_header*)packet;
+ ether_type = ntohs(eptr->ether_type);
+ payload = packet + sizeof(struct ether_header);
tick(0);
- if(ntohs(eptr->ether_type) == ETHERTYPE_IP) {
+ if(ether_type == ETHERTYPE_8021Q) {
+ struct vlan_8021q_header* vptr;
+ vptr = (struct vlan_8021q_header*)payload;
+ ether_type = ntohs(vptr->ether_type);
+ payload += sizeof(struct vlan_8021q_header);
+ }
+
+ if(ether_type == ETHERTYPE_IP) {
struct ip* iptr;
int dir = -1;
@@ -402,7 +440,7 @@
dir = 0;
}
- iptr = (struct ip*)(packet + sizeof(struct ether_header) ); /* alignment? */
+ iptr = (struct ip*)(payload); /* alignment? */
handle_ip_packet(iptr, dir);
}
}
@@ -487,6 +525,9 @@
else if(dlt == DLT_IEEE802) {
packet_handler = handle_tokenring_packet;
}
+ else if(dlt == DLT_PPP) {
+ packet_handler = handle_ppp_packet;
+ }
/*
* SLL support not available in older libpcaps
*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/iftop-0.16/iftop.cat new/iftop-0.17/iftop.cat
--- old/iftop-0.16/iftop.cat 2003-11-06 19:28:02.000000000 +0100
+++ new/iftop-0.17/iftop.cat 2005-12-25 13:15:19.000000000 +0100
@@ -2,89 +2,89 @@
-[1mNAME[0m
+NNAAMMEE
iftop - display bandwidth usage on an interface by host
-[1mSYNOPSIS[0m
- [1miftop -h [22m| [[1m-nNpbBP[22m] [[1m-i [4m[22minterface[24m] [[1m-f [4m[22mfilter[24m [4mcode[24m] [[1m-F [4m[22mnet[24m/[4mmask[24m]
+SSYYNNOOPPSSIISS
+ iiffttoopp --hh | [--nnNNppbbBBPP] [--ii _i_n_t_e_r_f_a_c_e] [--ff _f_i_l_t_e_r _c_o_d_e] [--FF _n_e_t/_m_a_s_k]
-[1mDESCRIPTION[0m
- [1miftop [22mlistens to network traffic on a named [4minterface[24m, or on the first
+DDEESSCCRRIIPPTTIIOONN
+ iiffttoopp listens to network traffic on a named _i_n_t_e_r_f_a_c_e, or on the first
interface it can find which looks like an external interface if none is
specified, and displays a table of current bandwidth usage by pairs of
- hosts. [1miftop [22mmust be run with sufficient permissions to monitor all
- network traffic on the [4minterface[24m; see [1mpcap[22m(3) for more information, but
+ hosts. iiffttoopp must be run with sufficient permissions to monitor all
+ network traffic on the _i_n_t_e_r_f_a_c_e; see ppccaapp(3) for more information, but
on most systems this means that it must be run as root.
- By default, [1miftop [22mwill look up the hostnames associated with addresses
+ By default, iiffttoopp will look up the hostnames associated with addresses
it finds in packets. This can cause substantial traffic of itself, and
may result in a confusing display. You may wish to suppress display of
- DNS traffic by using filter code such as [1mnot port domain[22m, or switch it
- off entirely, by using the [1m-n [22moption or by pressing [1mR [22mwhen the program
+ DNS traffic by using filter code such as nnoott ppoorrtt ddoommaaiinn, or switch it
+ off entirely, by using the --nn option or by pressing RR when the program
is running.
- By default, [1miftop [22mcounts all IP packets that pass through the filter,
+ By default, iiffttoopp counts all IP packets that pass through the filter,
and the direction of the packet is determined according to the direc-
- tion the packet is moving across the interface. Using the [1m-N [22moption it
- is possible to get [1miftop [22mto show packets entering and leaving a given
- network. For example, [1miftop -N 10.0.0.0/255.0.0.0 [22mwill analyse packets
+ tion the packet is moving across the interface. Using the --FF option it
+ is possible to get iiffttoopp to show packets entering and leaving a given
+ network. For example, iiffttoopp --FF 1100..00..00..00//225555..00..00..00 will analyse packets
flowing in and out of the 10.* network.
Some other filter ideas:
- [1mnot ether host ff:ff:ff:ff:ff:ff[0m
+ nnoott eetthheerr hhoosstt ffff::ffff::ffff::ffff::ffff::ffff
Ignore ethernet broadcast packets.
- [1mport http and not host [4m[22mwebcache.example.com[0m
+ ppoorrtt hhttttpp aanndd nnoott hhoosstt _w_e_b_c_a_c_h_e_._e_x_a_m_p_l_e_._c_o_m
Count web traffic only, unless it is being directed through a
local web cache.
- [1micmp [22mHow much bandwith are users wasting trying to figure out why the
+ iiccmmpp How much bandwith are users wasting trying to figure out why the
network is slow?
-[1mOPTIONS[0m
- [1m-h [22mPrint a summary of usage.
+OOPPTTIIOONNSS
+ --hh Print a summary of usage.
- [1m-n [22mDon't do hostname lookups.
+ --nn Don't do hostname lookups.
- [1m-N [22mDo not resolve port number to service names
+ --NN Do not resolve port number to service names
- [1m-p [22mRun in promiscuous mode, so that traffic which does not pass
+ --pp Run in promiscuous mode, so that traffic which does not pass
directly through the specified interface is also counted.
- [1m-P [22mTurn on port display.
+ --PP Turn on port display.
- [1m-b [22mDon't display bar graphs of traffic.
+ --bb Don't display bar graphs of traffic.
- [1m-B [22mDisplay bandwidth rates in bytes/sec rather than bits/sec.
+ --BB Display bandwidth rates in bytes/sec rather than bits/sec.
- [1m-i [4m[22minterface[0m
- Listen to packets on [4minterface[24m.
+ --ii _i_n_t_e_r_f_a_c_e
+ Listen to packets on _i_n_t_e_r_f_a_c_e.
- [1m-f [4m[22mfilter[24m [4mcode[0m
- Use [4mfilter[24m [4mcode[24m to select the packets to count. Only IP packets
- are ever counted, so the specified code is evaluated as [1m([4m[22mfilter[0m
- [4mcode[24m[1m) and ip[22m.
+ --ff _f_i_l_t_e_r _c_o_d_e
+ Use _f_i_l_t_e_r _c_o_d_e to select the packets to count. Only IP packets
+ are ever counted, so the specified code is evaluated as ((_f_i_l_t_e_r
+ _c_o_d_e)) aanndd iipp.
- [1m-F [4m[22mnet[24m/[4mmask[0m
+ --FF _n_e_t/_m_a_s_k
Specifies a network for traffic analysis. If specified, iftop
will only include packets flowing in to or out of the given net-
work, and packet direction is determined relative to the network
- boundary, rather than to the interface. You may specify [4mmask[24m as
+ boundary, rather than to the interface. You may specify _m_a_s_k as
a dotted quad, such as /255.255.255.0, or as a single number
specifying the number of bits set in the netmask, such as /24.
- [1m-c [4m[22mconfig[24m [4mfile[0m
+ --cc _c_o_n_f_i_g _f_i_l_e
Specifies an alternate config file. If not specified, iftop
- will use [1m~/.iftopc [22mif it exists. See below for a description of
- config files
+ will use ~~//..iiffttoopprrcc if it exists. See below for a description
+ of config files
-[1mDISPLAY[0m
- When running, [1miftop [22muses the whole screen to display network usage. At
+DDIISSPPLLAAYY
+ When running, iiffttoopp uses the whole screen to display network usage. At
the top of the display is a logarithmic scale for the bar graph which
gives a visual indication of traffic.
@@ -96,14 +96,14 @@
foo.example.com => bar.example.com 1Kb 500b 100b
<= 2Mb 2Mb 2Mb
- shows, on the first line, traffic from [1mfoo.example.com [22mto [1mbar.exam-[0m
- [1mple.com[22m; in the preceding 2 seconds, this averaged 1Kbit/s, around half
+ shows, on the first line, traffic from ffoooo..eexxaammppllee..ccoomm to bbaarr..eexxaamm--
+ ppllee..ccoomm; in the preceding 2 seconds, this averaged 1Kbit/s, around half
that amount over the preceding 10s, and a fifth of that over the whole
of the last 40s. During each of those intervals, the data sent in the
other direction was about 2Mbit/s. On the actual display, part of each
line is inverted to give a visual indication of the 10s average of
- traffic. You might expect to see something like this where host [1mfoo [22mis
- making repeated HTTP requests to [1mbar[22m, which is sending data back which
+ traffic. You might expect to see something like this where host ffoooo is
+ making repeated HTTP requests to bbaarr, which is sending data back which
saturates a 2Mbit/s link.
By default, the pairs of hosts responsible for the most traffic (10
@@ -114,32 +114,32 @@
and total transfer rates averaged over 2s, 10s and 40s.
-[1mSOURCE / DEST AGGREGATION[0m
- By pressing [1ms [22mor [1md [22mwhile [1miftop [22mis running, all traffic for each source
+SSOOUURRCCEE // DDEESSTT AAGGGGRREEGGAATTIIOONN
+ By pressing ss or dd while iiffttoopp is running, all traffic for each source
or destination will be aggregated together. This is most useful when
- [1miftop [22mis run in promiscuous mode, or is run on a gateway machine.
+ iiffttoopp is run in promiscuous mode, or is run on a gateway machine.
-[1mPORT DISPLAY[0m
- [1mS [22mor [1mD [22mtoggle the display of source and destination ports respectively.
- [1mp [22mwill toggle port display on/off.
+PPOORRTT DDIISSPPLLAAYY
+ SS or DD toggle the display of source and destination ports respectively.
+ pp will toggle port display on/off.
-[1mDISPLAY TYPE[0m
- [1mt [22mcycles through the four line display modes; the default 2-line dis-
+DDIISSPPLLAAYY TTYYPPEE
+ tt cycles through the four line display modes; the default 2-line dis-
play, with sent and received traffic on separate lines, and 3 1-line
displays, with sent, received, or total traffic shown.
-[1mDISPLAY ORDER[0m
+DDIISSPPLLAAYY OORRDDEERR
By default, the display is ordered according to the 10s average (2nd
- column). By pressing [1m1[22m, [1m2 [22mor [1m3 [22mit is possible to sort by the 1st, 2nd
- or 3rd column. By pressing [1m< [22mor [1m> [22mthe display will be sorted by
+ column). By pressing 11, 22 or 33 it is possible to sort by the 1st, 2nd
+ or 3rd column. By pressing << or >> the display will be sorted by
source or destination hostname respectively.
-[1mDISPLAY FILTERING[0m
- [1ml [22mallows you to enter a POSIX extended regular expression that will be
+DDIISSPPLLAAYY FFIILLTTEERRIINNGG
+ ll allows you to enter a POSIX extended regular expression that will be
used to filter hostnames shown in the display. This is a good way to
quickly limit what is shown on the display. Note that this happens at
a much later stage than filter code, and does not affect what is actu-
@@ -147,29 +147,29 @@
of the screen.
-[1mPAUSE DISPLAY / FREEZE ORDER[0m
- [1mP [22mwill pause the current display.
+PPAAUUSSEE DDIISSPPLLAAYY // FFRREEEEZZEE OORRDDEERR
+ PP will pause the current display.
- [1mo [22mwill freeze the current screen order. This has the side effect that
+ oo will freeze the current screen order. This has the side effect that
traffic between hosts not shown on the screen at the time will not be
shown at all, although it will be included in the totals at the bottom
of the screen.
-[1mSCROLL DISPLAY[0m
- [1mj [22mand [1mk [22mwill scroll the display of hosts. This feature is most useful
+SSCCRROOLLLL DDIISSPPLLAAYY
+ jj and kk will scroll the display of hosts. This feature is most useful
when the display order is frozen (see above).
-[1mFILTER CODE[0m
- [1mf [22mallows you to edit the filter code whilst iftop running. This can
+FFIILLTTEERR CCOODDEE
+ ff allows you to edit the filter code whilst iftop running. This can
lead to some unexpected behaviour.
-[1mCONFIG FILE[0m
- iftop can read its configuration from a config file. If the [1m-c [22moption
+CCOONNFFIIGG FFIILLEE
+ iftop can read its configuration from a config file. If the --cc option
is not specified, iftop will attempt to read its configuration from
- [1m~/.iftoprc[22m, if it exists. Any command line options specified will
+ ~~//..iiffttoopprrcc, if it exists. Any command line options specified will
override settings in the config file.
The config file consists of one configuration directive per line. Each
@@ -181,65 +181,65 @@
ported:
- [1minterface: [4m[22mif[0m
- Sets the network interface to [4mif[24m.
+ iinntteerrffaaccee:: _i_f
+ Sets the network interface to _i_f.
- [1mdns-resolution: [4m[22m(yes|no)[0m
+ ddnnss--rreessoolluuttiioonn:: _(_y_e_s_|_n_o_)
Controls reverse lookup of IP addresses.
- [1mport-resolution: [4m[22m(yes|no)[0m
+ ppoorrtt--rreessoolluuttiioonn:: _(_y_e_s_|_n_o_)
Controls conversion of port numbers to service names.
- [1mfilter-code: [4m[22mbpf[0m
- Sets the filter code to [4mbpf[24m.
+ ffiilltteerr--ccooddee:: _b_p_f
+ Sets the filter code to _b_p_f.
- [1mshow-bars: [4m[22m(yes|no)[0m
+ sshhooww--bbaarrss:: _(_y_e_s_|_n_o_)
Controls display of bar graphs.
- [1mpromiscuous: [4m[22m(yes|no)[0m
+ pprroommiissccuuoouuss:: _(_y_e_s_|_n_o_)
Puts the interface into promiscuous mode.
- [1mport-display: [4m[22m(off|source-only|destination-only|on)[0m
+ ppoorrtt--ddiissppllaayy:: _(_o_f_f_|_s_o_u_r_c_e_-_o_n_l_y_|_d_e_s_t_i_n_a_t_i_o_n_-_o_n_l_y_|_o_n_)
Controls display of port numbers.
- [1mhide-source: [4m[22m(yes|no)[0m
+ hhiiddee--ssoouurrccee:: _(_y_e_s_|_n_o_)
Hides source host names.
- [1mhide-destination: [4m[22m(yes|no)[0m
+ hhiiddee--ddeessttiinnaattiioonn:: _(_y_e_s_|_n_o_)
Hides destination host names.
- [1muse-bytes: [4m[22m(yes|no)[0m
+ uussee--bbyytteess:: _(_y_e_s_|_n_o_)
Use bytes for bandwidth display, rather than bits.
- [1msort: [4m[22m(2s|10s|40s|source|destination)[0m
+ ssoorrtt:: _(_2_s_|_1_0_s_|_4_0_s_|_s_o_u_r_c_e_|_d_e_s_t_i_n_a_t_i_o_n_)
Sets which column is used to sort the display.
- [1mline-display: [4m[22m(two-line|one-line-both|one-line-sent|one-line-received)[0m
+ lliinnee--ddiissppllaayy:: _(_t_w_o_-_l_i_n_e_|_o_n_e_-_l_i_n_e_-_b_o_t_h_|_o_n_e_-_l_i_n_e_-_s_e_n_t_|_o_n_e_-_l_i_n_e_-_r_e_c_e_i_v_e_d_)
Controls the appearance of each item in the display.
- [1mshow-totals: [4m[22m(yes|no)[0m
+ sshhooww--ttoottaallss:: _(_y_e_s_|_n_o_)
Shows cummulative total for each item.
- [1mlog-scale: [4m[22m(yes|no)[0m
+ lloogg--ssccaallee:: _(_y_e_s_|_n_o_)
Use a logarithmic scale for bar graphs.
- [1mmax-bandwidth: [4m[22mbw[0m
- Fixes the maximum for the bar graph scale to [4mbw[24m, e.g. "10M"
+ mmaaxx--bbaannddwwiiddtthh:: _b_w
+ Fixes the maximum for the bar graph scale to _b_w, e.g. "10M"
- [1mnet-filter: [4m[22mnet/mask[0m
+ nneett--ffiilltteerr:: _n_e_t_/_m_a_s_k
Defines an IP network boundary for determining packet direction.
- [1mscreen-filter: [4m[22mregexp[0m
+ ssccrreeeenn--ffiilltteerr:: _r_e_g_e_x_p
Sets a regular expression to filter screen output.
-[1mQUIRKS (aka they're features, not bugs)[0m
+QQUUIIRRKKSS ((aakkaa tthheeyy''rree ffeeaattuurreess,, nnoott bbuuggss))
There are some circumstances in which iftop may not do what you expect.
In most cases what it is doing is logical, and we believe it is correct
behaviour, although I'm happy to hear reasoned arguments for alterna-
tive behaviour.
- [1mTotals don't add up[0m
+ TToottaallss ddoonn''tt aadddd uupp
There are several reasons why the totals may not appear to add up. The
most obvious is having a screen filter in effect, or screen ordering
@@ -247,22 +247,22 @@
you, but is included in the totals.
A more subtle explanation comes about when running in promiscuous mode
- without specifying a [1m-N [22moption. In this case there is no easy way to
+ without specifying a --FF option. In this case there is no easy way to
assign the direction of traffic between two third parties. For the
purposes of the main display this is done in an arbitrary fashion (by
ordering of IP addresses), but for the sake of totals all traffic
between other hosts is accounted as incoming, because that's what it is
- from the point of view of your interface. The [1m-N [22moption allows you to
+ from the point of view of your interface. The --FF option allows you to
specify an arbitrary network boundary, and to show traffic flowing
across it.
- [1mPeak totals don't add up[0m
+ PPeeaakk ttoottaallss ddoonn''tt aadddd uupp
Again, this is a feature. The peak sent and peak received didn't nec-
essarily happen at the same time. The peak total is the maximum of
sent plus received in each captured time division.
- [1mChanging the filter code doesn't seem to work[0m
+ CChhaannggiinngg tthhee ffiilltteerr ccooddee ddooeessnn''tt sseeeemm ttoo wwoorrkk
Give it time. Changing the filter code affects what is captured from
the time that you entered it, but most of what is on the display is
@@ -272,24 +272,24 @@
diate effect and does not affect what is captured.
-[1mFILES[0m
- [1m~/.iftoprc[0m
+FFIILLEESS
+ ~~//..iiffttoopprrcc
Configuration file for iftop.
-[1mSEE ALSO[0m
- [1mtcpdump[22m(8), [1mpcap[22m(3), [1mdriftnet[22m(1).
+SSEEEE AALLSSOO
+ ttccppdduummpp(8), ppccaapp(3), ddrriiffttnneett(1).
-[1mAUTHOR[0m
+AAUUTTHHOORR
Paul Warren
-[1mVERSION[0m
- $Id: iftop.8,v 1.24 2003/10/22 19:28:31 pdw Exp $
+VVEERRSSIIOONN
+ $Id: iftop.8,v 1.25 2005/12/25 11:50:21 pdw Exp $
-[1mCOPYING[0m
+CCOOPPYYIINNGG
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/iftop-0.16/iftop.spec new/iftop-0.17/iftop.spec
--- old/iftop-0.16/iftop.spec 2004-02-28 19:54:24.000000000 +0100
+++ new/iftop-0.17/iftop.spec 2006-02-12 19:41:25.000000000 +0100
@@ -1,6 +1,6 @@
Summary: iftop - display bandwidth usage on an interface by host
Name: iftop
-Version: 0.16
+Version: 0.17
Release: 1
Source: http://www.ex-parrot.com/~pdw/iftop/%{name}-%{version}.tar.gz
URL: http://www.ex-parrot.com/~pdw/iftop/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/iftop-0.16/options.c new/iftop-0.17/options.c
--- old/iftop-0.16/options.c 2004-01-20 12:33:55.000000000 +0100
+++ new/iftop-0.17/options.c 2006-02-08 03:57:44.000000000 +0100
@@ -22,6 +22,7 @@
#include "iftop.h"
#include "options.h"
#include "cfgfile.h"
+#include "integers.h"
#if !defined(HAVE_INET_ATON) && defined(HAVE_INET_PTON)
# define inet_aton(a, b) inet_pton(AF_INET, (a), (b))
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/iftop-0.16/options.h new/iftop-0.17/options.h
--- old/iftop-0.16/options.h 2003-10-20 23:41:23.000000000 +0200
+++ new/iftop-0.17/options.h 2006-02-08 03:57:43.000000000 +0100
@@ -6,6 +6,7 @@
#ifndef __OPTIONS_H_ /* include guard */
#define __OPTIONS_H_
+#include
#include
#include
#include
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/iftop-0.16/ppp.h new/iftop-0.17/ppp.h
--- old/iftop-0.16/ppp.h 1970-01-01 01:00:00.000000000 +0100
+++ new/iftop-0.17/ppp.h 2005-12-25 21:42:45.000000000 +0100
@@ -0,0 +1,59 @@
+/* @(#) $Header: /home/pdw/vcvs/repos/iftop/ppp.h,v 1.2 2005/12/25 20:42:45 pdw Exp $ (LBL) */
+/*
+ * Point to Point Protocol (PPP) RFC1331
+ *
+ * Copyright 1989 by Carnegie Mellon.
+ *
+ * Permission to use, copy, modify, and distribute this program for any
+ * purpose and without fee is hereby granted, provided that this copyright
+ * and permission notice appear on all copies and supporting documentation,
+ * the name of Carnegie Mellon not be used in advertising or publicity
+ * pertaining to distribution of the program without specific prior
+ * permission, and notice be given in supporting documentation that copying
+ * and distribution is by permission of Carnegie Mellon and Stanford
+ * University. Carnegie Mellon makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ */
+#define PPP_HDRLEN 4 /* length of PPP header */
+
+#define PPP_ADDRESS 0xff /* The address byte value */
+#define PPP_CONTROL 0x03 /* The control byte value */
+
+/* Protocol numbers */
+#define PPP_IP 0x0021 /* Raw IP */
+#define PPP_OSI 0x0023 /* OSI Network Layer */
+#define PPP_NS 0x0025 /* Xerox NS IDP */
+#define PPP_DECNET 0x0027 /* DECnet Phase IV */
+#define PPP_APPLE 0x0029 /* Appletalk */
+#define PPP_IPX 0x002b /* Novell IPX */
+#define PPP_VJC 0x002d /* Van Jacobson Compressed TCP/IP */
+#define PPP_VJNC 0x002f /* Van Jacobson Uncompressed TCP/IP */
+#define PPP_BRPDU 0x0031 /* Bridging PDU */
+#define PPP_STII 0x0033 /* Stream Protocol (ST-II) */
+#define PPP_VINES 0x0035 /* Banyan Vines */
+#define PPP_IPV6 0x0057 /* IPv6 */
+#define PPP_COMP 0x00fd /* Compressed Datagram */
+
+#define PPP_HELLO 0x0201 /* 802.1d Hello Packets */
+#define PPP_LUXCOM 0x0231 /* Luxcom */
+#define PPP_SNS 0x0233 /* Sigma Network Systems */
+
+#define PPP_IPCP 0x8021 /* IP Control Protocol */
+#define PPP_OSICP 0x8023 /* OSI Network Layer Control Protocol */
+#define PPP_NSCP 0x8025 /* Xerox NS IDP Control Protocol */
+#define PPP_DECNETCP 0x8027 /* DECnet Control Protocol */
+#define PPP_APPLECP 0x8029 /* Appletalk Control Protocol */
+#define PPP_IPXCP 0x802b /* Novell IPX Control Protocol */
+#define PPP_STIICP 0x8033 /* Strean Protocol Control Protocol */
+#define PPP_VINESCP 0x8035 /* Banyan Vines Control Protocol */
+#define PPP_IPV6CP 0x8057 /* IPv6 Control Protocol */
+#define PPP_CCP 0x80fd /* Compress Control Protocol */
+
+#define PPP_LCP 0xc021 /* Link Control Protocol */
+#define PPP_PAP 0xc023 /* Password Authentication Protocol */
+#define PPP_LQM 0xc025 /* Link Quality Monitoring */
+#define PPP_CHAP 0xc223 /* Challenge Handshake Authentication Protocol */
+#define PPP_BACP 0xc02b /* Bandwidth Allocation Control Protocol */
+#define PPP_BAP 0xc02d /* BAP */
+#define PPP_MP 0xc03d /* Multi-Link */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/iftop-0.16/resolver.c new/iftop-0.17/resolver.c
--- old/iftop-0.16/resolver.c 2004-02-05 23:53:19.000000000 +0100
+++ new/iftop-0.17/resolver.c 2005-12-24 12:37:43.000000000 +0100
@@ -13,6 +13,7 @@
#include
#include
#include
+#include
#include "ns_hash.h"
#include "iftop.h"
@@ -314,7 +315,7 @@
if (!workerinfo) {
int p[2];
- if (socketpair(AF_UNIX, SOCK_DGRAM, PF_UNSPEC, p) == -1)
+ if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, p) == -1)
return NULL;
workerinfo = xmalloc(sizeof *workerinfo);
@@ -341,7 +342,7 @@
|| read(workerinfo->fd, name, NAMESIZE) != NAMESIZE) {
/* Something went wrong. Just kill the child and get on with it. */
kill(workerinfo->child, SIGKILL);
- wait();
+ wait(NULL);
close(workerinfo->fd);
xfree(workerinfo);
pthread_setspecific(worker_key, NULL);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/iftop-0.16/serv_hash.c new/iftop-0.17/serv_hash.c
--- old/iftop-0.16/serv_hash.c 2002-10-10 16:11:12.000000000 +0200
+++ new/iftop-0.17/serv_hash.c 2005-10-26 22:27:09.000000000 +0200
@@ -19,7 +19,7 @@
int serv_hash_hash(void* key) {
ip_service* serv = (ip_service*)key;
- return serv->protocol;
+ return serv->protocol % hash_table_size;
}
void* serv_hash_copy_key(void* orig) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/iftop-0.16/ui.c new/iftop-0.17/ui.c
--- old/iftop-0.16/ui.c 2004-02-05 23:53:19.000000000 +0100
+++ new/iftop-0.17/ui.c 2005-10-26 22:12:33.000000000 +0200
@@ -1045,6 +1045,7 @@
break;
}
case '!': {
+#ifndef NO_SYSTEM
char *s;
dontshowdisplay = 1;
if ((s = edline(0, "Command", "")) && s[strspn(s, " \t")]) {
@@ -1073,6 +1074,9 @@
xfree(s);
}
dontshowdisplay = 0;
+#else
+ showhelp("Sorry, subshells have been disabled.");
+#endif
break;
}
case 'T':
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit-help@opensuse.org