1. 程式人生 > >pf_ring 編譯移植

pf_ring 編譯移植

oca ffi -s projects man org -i -shared sep

下載地址: http://sourceforge.net/projects/ntop/files/PF_RING/

編譯模塊:

cd kernel/

pf_ring.ko

編譯libpcap
cd userland/libpcap-1.7.4 ./configure --target=mips-openwrt-linux --host=mips-openwrt-linux --build=i686-linux-gnu --program-prefix= --program-suffix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls --enable-shared --enable-static --disable-yydebug --with-build-cc=gcc --with-pcap=linux --without-septel --without-dag --without-libnl --without-snf --disable-can --disable-canusb --disable-dbus --disable-bluetooth --disable-bpf

vi Makefile
PF_RING_INCLUDES += -I../nbpf

../lib/libpfring.a: No such file or directory
需要 libpfring.a

編譯完成: libpcap.so.1.7.4

編譯libpfring.acd userland/lib ./configure --target=mips-openwrt-linux --host=mips-openwrt-linux --build=i686-linux-gnu --program-prefix= --program-suffix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls --enable-shared --enable-static --disable-yydebug --with-build-cc=gcc --with-pcap=linux --without-septel --without-dag --without-libnl --without-snf --disable-can --disable-canusb --disable-dbus --disable-bluetooth --disable-bpf

../configure $@
configure: error: cannot run test program while cross compiling for mips-openwrt-linux target
# 將這部分 then 註釋

# 編譯
make CROSS_COMPILE=mips-openwrt-linux-

pf_ring 編譯移植