On Tue, Jul 16, 2002 at 04:38:00PM -0400, Przemyslaw Karwasiecki wrote:
> Unfortunatelly, it is blocking....
Then either
1) the Linux (as I infer from the "recvfrom()" in the strace)
socket code is broken and doesn't handle non-blocking mode -
that's extremely unlikely, as that'd break tons of
applications
or
2) non-blocking mode only works on some types of sockets, and
PF_PACKET sockets aren't among them (I suspect that's not the
case, and that it's done in the common socket code)
or
3) non-blocking mode is somehow not getting set on the libpcap
file descriptor.
You might want to
1) check whether the "fcntl()" succeeded (I assume the Perl
"fcntl()" returns a success/failure indication)
and
2) check whether the file descriptor in question actually has
the O_NONBLOCK flag set (note that to set O_NONBLOCK on a
file descriptor, you're supposed to get the flags with
F_GETFL, "or" in O_NONBLOCk, and then set the flags to the
resulting value)
and
3) report what "$pcap_fd" is, to make sure it's the descriptor
on which the "recvfrom()" is blocking.
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe