I'm curious what the resolution was in regards to Pavel Odintsov's post regarding compile time errors with a missing pfring.h as I'm running into similar errors when compiling Suricata 2.0.4 against PF_RING 6.0.2. Any thoughts? Thanks!

Errors below:
In file included from source-pfring.h:31,
                 from runmode-erf-dag.c:25:
/nsm/pfring/include/pfring.h:60:27: error: linux/pf_ring.h: No such file or directory
/nsm/pfring/include/pfring.h:95:1: warning: "likely" redefined
In file included from flow.h:31,
                 from detect.h:29,
                 from detect-engine-alert.h:29,
                 from suricata-common.h:321,
                 from runmode-erf-dag.c:18:
util-optimize.h:32:1: warning: this is the location of the previous definition
In file included from source-pfring.h:31,
                 from runmode-erf-dag.c:25:
/nsm/pfring/include/pfring.h:96:1: warning: "unlikely" redefined
In file included from flow.h:31,
                 from detect.h:29,
                 from detect-engine-alert.h:29,
                 from suricata-common.h:321,
                 from runmode-erf-dag.c:18:
util-optimize.h:35:1: warning: this is the location of the previous definition
In file included from source-pfring.h:31,
                 from runmode-erf-dag.c:25:
/nsm/pfring/include/pfring.h:116: warning: ‘struct pfring_pkthdr’ declared inside parameter list /nsm/pfring/include/pfring.h:116: warning: its scope is only this definition or declaration, which is probably not what you want /nsm/pfring/include/pfring.h:172: error: expected specifier-qualifier-list before ‘packet_direction’
In file included from source-pfring.h:31,
                 from runmode-erf-dag.c:25:
/nsm/pfring/include/pfring.h:389: error: ‘MAX_NUM_RX_CHANNELS’ undeclared here (not in a function) /nsm/pfring/include/pfring.h:449: warning: ‘struct pfring_pkthdr’ declared inside parameter list /nsm/pfring/include/pfring.h:465: warning: ‘struct pfring_pkthdr’ declared inside parameter list /nsm/pfring/include/pfring.h:508: error: expected declaration specifiers or ‘...’ before ‘hw_filtering_rule’ /nsm/pfring/include/pfring.h:608: warning: ‘struct pfring_pkthdr’ declared inside parameter list /nsm/pfring/include/pfring.h:652: error: expected declaration specifiers or ‘...’ before ‘packet_direction’ /nsm/pfring/include/pfring.h:660: error: expected declaration specifiers or ‘...’ before ‘socket_mode’ /nsm/pfring/include/pfring.h:673: error: expected declaration specifiers or ‘...’ before ‘cluster_type’ /nsm/pfring/include/pfring.h:742: error: expected declaration specifiers or ‘...’ before ‘hash_filtering_rule’ /nsm/pfring/include/pfring.h:769: error: expected declaration specifiers or ‘...’ before ‘filtering_rule’ /nsm/pfring/include/pfring.h:806: error: expected declaration specifiers or ‘...’ before ‘hash_filtering_rule’ /nsm/pfring/include/pfring.h:925: error: expected declaration specifiers or ‘...’ before ‘virtual_filtering_device_info’ /nsm/pfring/include/pfring.h:1108: warning: ‘struct pfring_pkthdr’ declared inside parameter list /nsm/pfring/include/pfring.h:1181: warning: ‘struct pfring_pkthdr’ declared inside parameter list /nsm/pfring/include/pfring.h:1209: warning: ‘struct pfring_pkthdr’ declared inside parameter list /nsm/pfring/include/pfring.h:1253: warning: ‘struct pfring_pkthdr’ declared inside parameter list /nsm/pfring/include/pfring.h:1299: warning: ‘struct pfring_pkthdr’ declared inside parameter list
In file included from runmode-erf-dag.c:25:
source-pfring.h:39: error: expected specifier-qualifier-list before ‘cluster_type’
make[3]: *** [runmode-erf-dag.o] Error 1
make[3]: Leaving directory `/nsm/src/suricata-2.0.4/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/nsm/src/suricata-2.0.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/nsm/src/suricata-2.0.4'
make: *** [all] Error 2

On 12/8/2014 2:55 AM, Pavel Odintsov wrote:
Hello!

I'm using PF_RING for my project and tried to use dkms for kernel module:

I did following:
cd /usr/src
wget 
http://sourceforge.net/projects/ntop/files/PF_RING/PF_RING-6.0.2.tar.gz/download
-OPF_RING.6.0.2.tar.gz
tar -xf PF_RING.6.0.2.tar.gz
cd /usr/src/PF_RING-6.0.2

# compile kernel module
cd /usrc/src/PF_RING-6.0.2/kernel
apt-get install dpkg-dev dkms debhelper
make -f Makefile.dkms deb
dpkg -i /var/lib/dkms/pfring/6.0.2/deb/pfring-dkms_6.0.2_all.deb

# compile libs
cd /usr/src/PF_RING-6.0.2/userland/lib
apt-get install -y libnuma-dev
./configure --prefix=/opt/pf_ring_6_0_2
make install

After this I created test example:
cat test_pf_ring.c
#include "pfring.h"

int main() {
}

And tried to compile it but without any success:
LANG=C gcc test_pf_ring.c  -I/opt/pf_ring_6_0_2/include
-L/opt/pf_ring/lib -lpfring

And got following:
LOCALE=C LANG=C gcc test_pf_ring.c  -I/opt/pf_ring_6_0_2/include
-L/opt/pf_ring/lib -lpfring
In file included from test_pf_ring.c:1:
/opt/pf_ring_6_0_2/include/pfring.h:60:27: error: linux/pf_ring.h: No
such file or directory
In file included from test_pf_ring.c:1:
/opt/pf_ring_6_0_2/include/pfring.h:116: warning: ‘struct
pfring_pkthdr’ declared inside parameter list
/opt/pf_ring_6_0_2/include/pfring.h:116: warning: its scope is only
this definition or declaration, which is probably not what you want
/opt/pf_ring_6_0_2/include/pfring.h:172: error: expected
specifier-qualifier-list before ‘packet_direction’
In file included from test_pf_ring.c:1:
/opt/pf_ring_6_0_2/include/pfring.h:389: error: ‘MAX_NUM_RX_CHANNELS’
undeclared here (not in a function)
/opt/pf_ring_6_0_2/include/pfring.h:449: warning: ‘struct
pfring_pkthdr’ declared inside parameter list
/opt/pf_ring_6_0_2/include/pfring.h:465: warning: ‘struct
pfring_pkthdr’ declared inside parameter list
/opt/pf_ring_6_0_2/include/pfring.h:508: error: expected declaration
specifiers or ‘...’ before ‘hw_filtering_rule’
/opt/pf_ring_6_0_2/include/pfring.h:608: warning: ‘struct
pfring_pkthdr’ declared inside parameter list
/opt/pf_ring_6_0_2/include/pfring.h:652: error: expected declaration
specifiers or ‘...’ before ‘packet_direction’
/opt/pf_ring_6_0_2/include/pfring.h:660: error: expected declaration
specifiers or ‘...’ before ‘socket_mode’
/opt/pf_ring_6_0_2/include/pfring.h:673: error: expected declaration
specifiers or ‘...’ before ‘cluster_type’
/opt/pf_ring_6_0_2/include/pfring.h:742: error: expected declaration
specifiers or ‘...’ before ‘hash_filtering_rule’
/opt/pf_ring_6_0_2/include/pfring.h:769: error: expected declaration
specifiers or ‘...’ before ‘filtering_rule’
/opt/pf_ring_6_0_2/include/pfring.h:806: error: expected declaration
specifiers or ‘...’ before ‘hash_filtering_rule’
/opt/pf_ring_6_0_2/include/pfring.h:925: error: expected declaration
specifiers or ‘...’ before ‘virtual_filtering_device_info’
/opt/pf_ring_6_0_2/include/pfring.h:1108: warning: ‘struct
pfring_pkthdr’ declared inside parameter list
/opt/pf_ring_6_0_2/include/pfring.h:1181: warning: ‘struct
pfring_pkthdr’ declared inside parameter list
/opt/pf_ring_6_0_2/include/pfring.h:1209: warning: ‘struct
pfring_pkthdr’ declared inside parameter list
/opt/pf_ring_6_0_2/include/pfring.h:1253: warning: ‘struct
pfring_pkthdr’ declared inside parameter list
/opt/pf_ring_6_0_2/include/pfring.h:1299: warning: ‘struct
pfring_pkthdr’ declared inside parameter list

I tried to investigate this issue and didn't found pf_ring.h header anywhere:
find /usr|grep -v '/usr/src'|grep pf_ring|wc -l
0

Is it possible to add header files to dkms package? Or maybe you can
move this .h file to library?


_______________________________________________
Ntop-misc mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc

Reply via email to