--- "S. Krishnan" sri_krishnan@yahoo.com wrote:
Hi,
Has anyone had any problems running libpcap based network packet capture programs on kernel 2.4 based systems?
I have some programs which compile and run perfectly on FreeBSD and even Win NT. However, when I compile and run them on RH 7.1 using the default libpcap which comes installed with the system, the program executes all right, the code enters the pcap_dispatch loop and then goes into pcap_read, but for some reason the callback refuses to trigger. As a cross check, I ran tcpdump and Ethereal, both of which work OK (I verified that tcpdump is a dynamically linked binary, so that it uses the default libpcap shared library to which my code also links).
Any ideas?
Solved the problem, finally. As with much else, the default libpcap library installed by Red Hat is broken, and so any programs linked with it do not work, including libpcap programs downloaded from the net. I then downloaded a fresh copy of libpcap-0.6.2 from tcpdump.org, compiled and installed it in /usr/local/lib and linked my programs against it - and voila! they started working.
Looks like a version issue, or else the RH supplied tcpdump is probably munged a bit to make it work against RH's libpcap, which is why my tcpdump was working.
Caveat Red Hat user!
Rgds,
Krishnan
__________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1