tcpdump mailing list archives

Segmentation fault while using pcap


From: Jorge Lanza <jlanza () tlmat unican es>
Date: Tue, 12 Aug 2003 13:32:09 +0200

Hi all.
I'm developing using libpcap to make my own sniffing program that adquires some statistics. Well... everything has worked ok, but as the program increase in size I came up with a Segmentation Fault error. I think the problem is in the Callback function, cause it's maybe too big and the buffer overflows as the function cannot dispatch all the packets. I say so, cause when I put some extra code there the program crashes. The error is not in the extra code, I have already tested.

Then my question is: how big should be the callback function? I think it should be the smallest possible, but then.. how I extract the information from the packet? Should I copy the packet and extract the infor using another thread????????

TA.





-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:tcpdump-workers-request () tcpdump org?body=unsubscribe


Current thread: