[Iftop-users] iftop on openbsd
Chris Lightfoot
chris at ex-parrot.com
Fri, 29 Aug 2003 18:13:19 +0100
On Fri, Aug 29, 2003 at 12:07:30PM -0700, Michael wrote:
>
> 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) != -1)
+ pthread_testcancel();
}
--
``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)