link to pcap with pf_ring
I'm trying to use libpcap that was compiled with pf_ring. I got the sources from ntop, and compiled it.
However, there's something I don't understand (sorry for the newbie linking question): I wanted to know if my application used the correct pcap version (the one with pfring), so I typed ldd and didn't see pcap at all, only pfring.
I looked at the output and saw only pfring.so and not pcap, although I dynamically linked to both libs.
I looked at the Makefile of libpcap and saw it linked statically with pfring.a. I thought I don't have to link with pfring at all, b开发者_JS百科ecause it's a part of pcap, but got undefined reference.
Does anyone know why I get the undefined reference error and why don't I see libpcap in the ldd output when I link to it dynamically?
Thanks, Ron
First of all make sure you did all of the following steps:
//Installation
sudo su
cd kernel; make install
cd ../userland/lib; make install
insmod ./kernel/pf_ring.ko
then remove the current libpcap and all of its dependencies from your system.
the pfring enabled libpcap is under /userland/libpcapx as you know.
if you are using pf_ring enabled libpcap in your application simply link libpcap.a to your program.
精彩评论