According to the (most recent) man page:
pcap_fileno() returns the file descriptor number of the ``savefile.''
Yet, what really happens is when you're pcap_open_live,
pcap_fileno() really does return the fd, but if you're
pcap_open_offline, pcap_fileno() return -1.
savefile.c:332
/*
* Set this field so we don't close stdin in pcap_close!
*/
p->fd = -1;
So pcap_fileno() returns -1 when using a savefile, and returns
the fd of the sniffing stream when pcap_open_live is called.
mts.
-
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