[tcpdump-workers] WHERE tiny pcap example code that just uses pcap_next???...

2005-04-22 Thread seberino
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

Re: [tcpdump-workers] EAGAIN from pcap_dispatch

2005-04-22 Thread ury segal
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

[tcpdump-workers] Link to pcap-0.9.0 broken

2005-04-22 Thread ury segal
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.

Re: [tcpdump-workers] EAGAIN from pcap_dispatch

2005-04-22 Thread Guy Harris
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

Re: [tcpdump-workers] EAGAIN from pcap_dispatch

2005-04-22 Thread Guy Harris
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

Re: [tcpdump-workers] EAGAIN from pcap_dispatch

2005-04-22 Thread Guy Harris
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