Hello again:
   A week ago I wrote a message explaining my problem
using the pcap_loop function. I supose you don't
renember it, so I will explain it again. Basically,
the callback function passed to pcap_loop is called a
lot of times when I send four packets to the computer,
and I don't know the reason (it's suposed to be called
once per packet).
   You asked me about the type of network I was
working with, and some of the parameters of the
functions I use. I'm sorry. This is my firt mailing
list, and I didn't explain the problem well.
   I'm working with a switched network, with a
computer with Win98 and VC++. In my program, I set the
adapter into promiscuos mode when I call to
pcap_open_live, and I set a filter whose mission is to
accept the packets arriving to my computer (I don't
need a sniffer to do that :-P ). Making it this way
I'n sure that the only packets I receive are those I
send to my computer (and possibily one or two more).
   With all this conditions, I send four packets to
the computer, and this is what happens: if the number
of packets to receive passed to pcap_loop is less than
four, it works fine, but if I set a -1 or a number
higher than four, then the callback function is called
thousands of times. I think it processes the last
packet a lot of times, but I'n not sure.
   Do I need to call a function to clear the buffer,
or especify that the packet has already been processed
and a new one must be captured? Can it be a problem or
a bug with Win98?
   I hope I have especified all the information you
need in order to help me.

Thanks for your help.

Miguel. ( [EMAIL PROTECTED] ) 


_______________________________________________________________
Do You Yahoo!?
Yahoo! Messenger: Comunicaci�n instant�nea gratis con tu gente -
http://messenger.yahoo.es
-
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