tcpdump mailing list archives
Re: Libpcap reentrancy and PF_RING patch
From: Luca Deri <deri () ntop org>
Date: Thu, 3 Jan 2008 01:17:20 +0100
Guyas I have explained in my previous reply, I don't think you're going to use simultaneously pcap_loop and pcap_next_pkt, so I don't see a problem here. However, this problem can be overcome by an if statement like the one below
if(buf == handle->buffer) { <--- we use the shared buffer hence we have been called by pcap_loop etc.
/* * Has "pcap_breakloop()" been called? */ if (handle->break_loop) { /* * Yes - clear the flag that indicates that it * has, and return -2 as an indication that we * were told to break out of the loop. */ handle->break_loop = 0; return -2; } } What do you think? Regards, Luca On Jan 1, 2008, at 10:24 PM, Guy Harris wrote:
Guy Harris wrote:Unless I'm misinterpreting socket(7), at least on Linux systems with the SO_TIMESTAMP socket option, you can set that option and use recvmsg() to read a packet; the control message for the packet will contain the time stamp....although that doesn't address the issue of the read-modify fields in the pcap handle - which *are* significant, so the reentrancy problem is, as Gregor notes, harder to fix.- This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
- This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- Re: Libpcap reentrancy and PF_RING patch Guy Harris (Jan 01)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 02)
- <Possible follow-ups>
- Re: Libpcap reentrancy and PF_RING patch Paolo Abeni (Jan 02)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 02)
- Re: Libpcap reentrancy and PF_RING patch Paolo Abeni (Jan 03)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 02)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 02)
- Re: Libpcap reentrancy and PF_RING patch Gregor Maier (Jan 07)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 02)
- Re: Libpcap reentrancy and PF_RING patch Guy Harris (Jan 05)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 06)
- Re: Libpcap reentrancy and PF_RING patch Guy Harris (Jan 06)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 06)
- Re: Libpcap reentrancy and PF_RING patch Guy Harris (Jan 05)