PDA

View Full Version : pcap_lookupdev - segmentation fault



scuba123
August 22nd, 2008, 07:37 AM
Hi Everybody,

I am a newbee for C/C++ programming. Before reaching following lines, device is (null) and errbuf is empty. After that, I got "segmentation fault"


if (device == NULL)
{
device = pcap_lookupdev(errbuf);
...................

I am attaching the screenshot of the error generated by gdb. I use libpcap 0.9.5. I might have made a mistake in installing the libpcap0.9.5.
The commands that I used to install libpcap0.9.5:
1. ./configure
2. sudo make install
3. sudo make install-shared
4. sudo make install-shared-so
5. copy libpcap.so.0.9.5 to /usr/lib and /usr/local/lib
Please let me know how to detect if the installation of libpcap is wrong. Please advise and help. Thank you.

Regards,

scuba123

scuba123
August 23rd, 2008, 03:29 AM
Hi Everyone,

Originally this program works in Mac computer and some other version of linuxes according to the developer. He just has not tried it on ubuntu. I am running the program on ubuntu and has not had luck yet. Is there a problem between ubuntu and pcap library? Is there a way out for this?

Should I roll back pcap version to 0.9,3 or 0.9.2 ? Could you give me some suggestion, please? Thank you in advance.

Regards,

scuba123