Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with timeout_ms at least on Windows 7 #29

Open
GoogleCodeExporter opened this issue Jun 13, 2015 · 0 comments
Open

Problems with timeout_ms at least on Windows 7 #29

GoogleCodeExporter opened this issue Jun 13, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

When I captures packets in iteration mode (for ts, pkt in pc:) or through loop 
I have long delays before recieving packets. This is particularly evident when 
computer gets small amount of packets (if you set filter or network contains 
small amount of computers).

I did some research. I think problem is related to timeout_ms (to_ms for 
winpcap pcap_open_live). As far as I understand a value of 0 means no time out; 
on at least some platforms, this means that you may wait until a sufficient 
number of packets arrive before seeing any packets, so you should use a 
non-zero timeout (http://www.tcpdump.org/pcap.htm). Winpcap documentation is 
not very clear at this point.

I tried to delete lines
  elif n == 0:
    break
for loop and __next__ functions.
And all works fine.

I think this is the right approach - not break loop if timeout is reached. 
Otherwise, you can get problems with timeout_ms values different from 0.

My OS - Windows 7. I uses lastes code from svn.

Original issue reported on code.google.com by andreev....@gmail.com on 5 Oct 2010 at 4:25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant