exported / pypcap

Automatically exported from code.google.com/p/pypcap
Other
0 stars 0 forks source link

immediate = True is ignored #44

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Execute the following testcase while causing network traffic (for example 
with "ping 8.8.8.8"):

#!/usr/bin/python2
# coding=utf-8

import pcap

capture = pcap.pcap('eth0', 1, True, 5000, True)
while True:
    print(capture.next())

What is the expected output? What do you see instead?

capture.next() does only return every 5 seconds but with immediate = True it 
should return every time network traffic is created. The same happens also if 
capture.readpkts() is used instead but I'm not sure if this is maybe intended 
there.

What version of the product are you using? On what operating system?

Operating system: Linux 3.16.3
pypcap: 1.1.2

Please provide any additional information below.

Trying to reproduce this with libpcap in C works as expected (to go sure that 
for example the immediate mode is supported on the system).

Original issue reported on code.google.com by sworddragon2@gmail.com on 2 Oct 2014 at 7:13