LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Building libpcap with pf_ring (https://www.linuxquestions.org/questions/linux-software-2/building-libpcap-with-pf_ring-322632/)

Machiaveli 05-12-2005 01:48 AM

Building libpcap with pf_ring
 
I don't know if this is the right forum to post this, but I'll give it a go anyway.

I'm trying to compile libpcap with support for pf_ring (www.ntop.org), in order to speed up packetcapturing.

The documentation is pretty non-existant and all I can find is a summary of how everything should be done.
I've downloaded a kernel, patched it, built it and it's working, no problem there. Downloaded libpcap and here's when it gets tricky for me.

The documentation in the ring folder states:
-------------------------------------------------------------------------------------------
1. download libpcap-0.8.1
2. override the original libpcap files (pcap-int.h and pcap-linux.c) with the files enclosed
3. rebuild libpcap as usual
4. make sure that your libpcap-based application (e.g. ntop/tcpdump) is linked against this library
-------------------------------------------------------------------------------------------

Another note found in a README file in the ring folder.
-------------------------------------------------------------------------------------------
8. Now build libpcap-ring and you networking applications against libpcap-ring. Note that it is a common mistake to run
applications dynamically linked with libcap-ring with the old legacy libpcap.
-------------------------------------------------------------------------------------------

So I copied the files to the libpcap-0.8.1-ring folder, overwriting the old ones and issued a ./configure. Next step was to run "make", which failed, leaving a long error message on my screen. "make > make.log reports the following "gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./pcap-linux.c". pcap-linux.c being one of the files I just copied over to the libpcap folder.

So I guess I would need to "Build the libpcap-ring library using the files included in the PF_RING source code" (as found on the webpage www.ntop.org) which leads to my question,
-How?

Yeah, I'm a newbie, I know.

Any help would be appreciated!
Sorry for any spelling errors.


-------------------------------------
Solved!

Shame on me. All I had to do was to COPY the included files to the appropriate directories and then run make.

Well well, lesson learned!

kuttappa 12-15-2005 05:58 AM

hello Machiaveli
I am also trying to build the pcap library along with PF_RING but I am not able to, this is when i found ur post, U say it is so simple.
I am a complete newbie to this and i am not to sure how to go about it.
I have downloaded the patch and applied the patch but it made a directory - linux-2.6.5 and it installed some directories inside which i found Makefile.org, ring and core .Inside the ring directory i found the ring_packet.c, Makefile and the Kconfig file.
Please help me out and tell me how i go about building the libpcap library to work with the PF_RING. I am completly lost and stuck, maybe i did not do something right or i have not understood the doc, which i did not find , but when i read ur post i am feelong like a fool but i still am lost :)
please help , i need to do this ASAP :(
Kuttappa


All times are GMT -5. The time now is 02:32 AM.