On Tue, Jul 24, 2001 at 05:01:16PM +0200, Miguel Angel Gomez Sexto wrote:
>    I call the function pcap_loop, with a callback
> function that only displays the number of packets
> received by the adapter.
>    And here is the problem: I ping the computer with
> four packets and the callback function is called a lot
> of times (I have counted more than 32000 times).

When you called "pcap_open_live()", what value did you give the third
argument, the "promisc" argument?

If you gave it a non-zero value, the network interface would probably be
in promiscuous mode; if you're on a non-switched network, this means
it'll receive *all* traffic on the network, not just traffic to or from
your machine. 

If you gave it a zero value, the interface probably won't be in
promiscuous mode (unless some *other* program put it in promiscuous
mode), but if there's a lot of traffic going to or from your machine,
your program will see all that traffic, not just the ping.
-
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

Reply via email to