[Iftop-users] iftop on openbsd

Michael admin at ntworks.org
Fri, 29 Aug 2003 12:24:09 -0700


Thanks for the quick reply, this patch compiles successfully

However it still wont accept any keystrokes once iftop is started..
I've tried the keys to change the display while in iftop, and q to quit, =
and
ctrl-z, c, and x, and Break and ctrl-just-about-everything =3D/  but I
appreciate the help!




-----Original Message-----
From: Chris Lightfoot [mailto:chris@ex-parrot.com]=20
Sent: Friday, August 29, 2003 10:13 AM
To: Michael
Cc: iftop-users@lists.beasts.org
Subject: Re: [Iftop-users] iftop on openbsd

On Fri, Aug 29, 2003 at 12:07:30PM -0700, Michael wrote:
>=20
> Ok the make for the patched iftop.c failed :

sorry, first patch was broken. try this on the unpatched
iftop.c:

diff -u -r1.44 iftop.c
--- iftop.c     2003/05/20 21:14:37     1.44
+++ iftop.c     2003/08/29 17:12:25
@@ -528,7 +528,9 @@
 /* packet_loop:
  * Worker function for packet capture thread. */
 void packet_loop(void* ptr) {
-    pcap_loop(pd,-1,(pcap_handler)packet_handler,NULL);
+    /* Make sure that this thread is cancellable. */
+    while (pcap_dispatch(pd, -1, (pcap_handler)packet_handler, NULL) =
!=3D -1)
+        pthread_testcancel();
 }

--=20
``Like any Englishman armed with a cricket bat, he was doomed to fail.''
  (Guy Ladenburg, prosecuting, comments on Paul Kelleher's
   first attempt to behead a statue of Margaret Thatcher)