tcpdump mailing list archives

buffering captured packets of libpcap


From: arvin jon <a9a9_99 () yahoo com>
Date: Wed, 5 Mar 2003 06:38:14 -0800 (PST)


hi there! im trying to develop a protocol analyzer program using libpcap to capture packets. in order to capture all 
packets and analyze its contents, i used two threads in my program. 1 for capturing and another for analyzing. when a 
packet arrives it is queued to a buffer like structure (link list), after the packet has been analyzed, the memory will 
be freed. the problem is that when heavy load of traffic passes the network, the program uses a lot of the memory 
resources. 

Are there any possible ways to do this program without using too much of the memory and at the same time maintaining 
the accuracy in capturing packets?

tnx!



---------------------------------
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more

Current thread: