Hi everyone,

I'm just wondering, is it ever necessary/desireable to explicitly free memory 
allocated by libpcap (using free() or similar)?

For example, each time pcap_dispatch() or pcap_loop() calls the packet handler 
function, a (u_char *) pointer to the new packet data is passed to the packet handler; 
once I'm done with the packet, should I free() this memory?  Should I do the same for 
the (struct pcap_pkthdr *) pointer that is also passed to the packet handler function?

Or, do pcap_dispatch() and pcap_loop() automatically free the memory once the packet 
handler function returns?  If so, what about pcap_next()?

Thanks,
Nick

-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to