I'm trying to learn pcap and would //really// love to see a **simple**
example that just works.
Can someone *please* send me any little app that just
captures packets with pcap_next command and prints bytes received??
If it only works on loopback interface that is fine.
Thanks in advance.
Chris
Hi!
Thank you for your answer!
After fixing the program to save the value of the
pcap_dispatch correctly, I found it to be -1.
After expanding the if block of FD_ISSET to include
the pcap_dispatch call :-) , I don't see this message
any more.
Yet, I don't see any packets. I do see packets
in Li
Hi,
The link to pcap-0.9.0-096.tar.gz in www.tcpdump.org
is broken.
Thanks
--ury
-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.
ury segal wrote:
After fixing the program to save the value of the
pcap_dispatch correctly, I found it to be -1.
After expanding the if block of FD_ISSET to include
the pcap_dispatch call :-) , I don't see this message
any more.
Yes - but, as I noted, there's a problem with select() on BPF in some
ury segal wrote:
Any idea what is wrong with my sample program ?
What's wrong with your sample program is that
1) it's using non-blocking I/O and select() with a timeout, and calling
"pcap_dispatch()" regardless of "select()" says input is available on
the pcap_t or not;
2) it's running
ury segal wrote:
The code runs on Solaris 8. Sorry for misinforming
you before.
The code that produces the message is:
if ( (packet_from_pcap= pcap_dispatch(pcpaph,
1,
_pcap_reader,
(u_ch