Hi,

I am using pcap_next_ex() in my application in a loop to capture all packets 
on an ethernet device. I have compared the amount of packets that my 
application captures to what ethereal captures and my calls to pcap_next_ex() 
are just not picking up everything. More importantly, the packets I need it 
to capture are not being captured all the time. My application is in constant 
communication with a device to monitor its status. I used ethereal to verify 
the device was always replying to my application. The code snippets below are 
written in Delphi. Here is my call to pcap_open():

  fp := pcap_open(PAnsiChar(ADeviceName), 65536, PCAP_OPENFLAG_PROMISCUOUS,
    1, nil, errorbuf);

Here is my call to pcap_next_ex() which is in a loop:

  ret := pcap_next_ex(fp, @pktheader, @pktdata);

I can provide more code if you want it. pcap_next_ex() times out a lot. Am I 
doing something wrong here? Are there other reasons that pcap_next_ex() would 
timeout instead of capturing packets? Any ideas would be appreciated.

Thanks,
Tom


==================================================================
 This is the WinPcap users list. It is archived at
 http://www.mail-archive.com/[email protected]/

 To unsubscribe use 
 mailto: [EMAIL PROTECTED]
==================================================================

Reply via email to