![]() |
| | #1 |
| Registered User Join Date: Apr 2008
Posts: 2
| pcap "packet" processing and storage |
| ForensicsGuy817 is offline | |
| | #2 |
| and the hat of vanishing Join Date: Aug 2001 Location: The edge of the known universe
Posts: 21,214
| Since pcap is in essence tracking live data, I would say that it has either none or minimal ability to queue data internally. So I would suggest you do the minimum amount of work necessary in your callback before returning to pcap. The documentation should explain this.
__________________ If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut. Up to 8Mb PlusNet broadband from only £5.99 a month! |
| Salem is offline | |
| | #3 |
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,381
| Unless libpcap is multithreaded, I don't see how this is possible. By doing too much processing in the callback, you could potentially end up dropping packets due to the raw socket queue getting filled, but I don't think you could see data corruption in memory. I think you're probably causing that yourself somewhere. At any rate, just restructuring your code isn't going to solve the issue of not being able to keep up with packets. No matter how you do things, if the CPU isn't able to keep up with the raw packet flow, you're stuck. |
| brewbuck is offline | |
| | #4 |
| Registered User Join Date: Apr 2008
Posts: 2
| I'll just implement my own queue to store packets from the callback. |
| ForensicsGuy817 is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is Kazaa being greedy? | minesweeper | A Brief History of Cprogramming.com | 29 | 11-05-2002 04:39 PM |