![]() |
| | #1 |
| Dogbert Join Date: Mar 2004
Posts: 25
| libpcap: How to timeout pcap_loop() ? I'm using pcap_loop() to capture packets, but pcap_loop() waits until a packet is captured before returning to the calling function. Is there any way to force it to only listen for a specified amount of time? I'd like to loop the main program while just checking each loop for new packets, rather than having to wait for a new packet to arrive before doing anything. I've looked around and am pretty sure there's no built-in feature for this (that works on Linux) so might there exist some type of work-around?
__________________ "Cryptographically secure linear feedback shift register based stream ciphers" -- a phrase that'll get any party started. |
| B-Con is offline | |
| | #2 |
| CSharpener Join Date: Oct 2006
Posts: 5,242
| probably you want to look something in inet like http://www.tcpdump.org/lists/workers.../msg00178.html Haven't read it throughoutly but seems to me they are talking about same type of problems
__________________ If I have eight hours for cutting wood, I spend six sharpening my axe. |
| vart is offline | |
| | #3 | |
| Dogbert Join Date: Mar 2004
Posts: 25
| From the link: Quote:
(BTW, sorry for taking so long to return, holidays+travel+start of school kept me busy. :P )
__________________ "Cryptographically secure linear feedback shift register based stream ciphers" -- a phrase that'll get any party started. | |
| B-Con is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| TCP TimeOut | vishal_askqns | Windows Programming | 1 | 04-28-2009 07:02 PM |
| Function argument assignment between types "unsigned int*" and "unsigned long*" | nadeer78 | C Programming | 8 | 03-10-2008 11:57 AM |
| how to setup C# TCPClient timeout | George2 | C# Programming | 1 | 08-13-2007 12:09 PM |
| rsh timeout | jlai | Windows Programming | 0 | 06-03-2005 07:18 AM |
| connect timeout | X PaYnE X | Networking/Device Communication | 8 | 05-14-2005 09:30 PM |