Hi,

I have a Debian squeeze base system and tried installing PF_RING. Here is what 
i did

$ apt-get install  build-essential libpcre3-dev libpcap-dev libnet1-dev 
libyamldev libnetfilter-queue-dev zlib1g-dev htp subversion flex bison 
linux-headers-2.6.32-5-686 dkms libcap-ng-dev
$ svn co https://svn.ntop.org/svn/ntop/trunk/PF_RING/
$ cd PF_RING/kernel
$ $ make
make -C /lib/modules/2.6.32-5-686/build SUBDIRS=/home/oguz/PF_RING/kernel 
EXTRA_CFLAGS='-I/home/oguz/PF_RING/kernel -DSVN_REV="\"5743\""' modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-5-686'
  CC [M]  /home/oguz/PF_RING/kernel/pf_ring.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/oguz/PF_RING/kernel/pf_ring.mod.o
  LD [M]  /home/oguz/PF_RING/kernel/pf_ring.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-5-686'
cd plugins; make
make[1]: Entering directory `/home/oguz/PF_RING/kernel/plugins'
make -C /lib/modules/2.6.32-5-686/build 
SUBDIRS=/home/oguz/PF_RING/kernel/plugins modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.32-5-686'
  CC [M]  /home/oguz/PF_RING/kernel/plugins/dummy_plugin.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "pf_ring_add_module_dependency" 
[/home/oguz/PF_RING/kernel/plugins/dummy_plugin.ko] undefined!
  CC      /home/oguz/PF_RING/kernel/plugins/dummy_plugin.mod.o
  LD [M]  /home/oguz/PF_RING/kernel/plugins/dummy_plugin.ko
make[2]: Leaving directory `/usr/src/linux-headers-2.6.32-5-686'
make[1]: Leaving directory `/home/oguz/PF_RING/kernel/plugins'

$ sudo make install
mkdir -p /lib/modules/2.6.32-5-686/kernel/net/pf_ring
cp *.ko /lib/modules/2.6.32-5-686/kernel/net/pf_ring
cp linux/pf_ring.h /usr/include/linux
/sbin/depmod 2.6.32-5-686

The problem occurs when i tried to compile the userlad/lib files

$ cd ..
$ cd userland/lib
$ make
ar x libs/libpfring_zero_i686.a
ar x libs/libpfring_dna_i686.a
ar x libs/libpfring_mod_virtual_i686.a
gcc -Wall -fPIC -I../../kernel -I../../vPF_RING/guest/kernel -I../libpcap -D 
HAVE_ZERO -D HAVE_DNA -D HAVE_VIRTUAL  -D ENABLE_BPF -D ENABLE_HW_TIMESTAMP   
-O2  -c pfring.c -o pfring.o
In file included from /usr/include/bits/errno.h:25,
                 from /usr/include/errno.h:36,
                 from pfring.h:27,
                 from pfring.c:21:
/usr/include/linux/errno.h:4:23: error: asm/errno.h: No such file or directory
In file included from /usr/include/sys/socket.h:40,
                 from pfring.h:29,
                 from pfring.c:21:
/usr/include/bits/socket.h:370:24: error: asm/socket.h: No such file or 
directory
In file included from pfring.h:30,
                 from pfring.c:21:
/usr/include/linux/sockios.h:21:25: error: asm/sockios.h: No such file or 
directory
In file included from /usr/include/linux/if_packet.h:4,
                 from pfring.h:33,
                 from pfring.c:21:
/usr/include/linux/types.h:4:23: error: asm/types.h: No such file or directory
In file included from /usr/include/linux/types.h:8,
                 from /usr/include/linux/if_packet.h:4,
                 from pfring.h:33,
                 from pfring.c:21:
/usr/include/linux/posix_types.h:47:29: error: asm/posix_types.h: No such file 
or directory
In file included from /usr/include/linux/if_packet.h:4,
                 from pfring.h:33,
                 from pfring.c:21:
/usr/include/linux/types.h:27: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘__le16’
/usr/include/linux/types.h:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘__be16’
/usr/include/linux/types.h:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘__le32’
/usr/include/linux/types.h:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘__be32’
/usr/include/linux/types.h:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘__le64’
/usr/include/linux/types.h:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘__be64’
/usr/include/linux/types.h:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘__sum16’
/usr/include/linux/types.h:35: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘__wsum’
In file included from pfring.h:33,
                 from pfring.c:21:
/usr/include/linux/if_packet.h:9: error: expected specifier-qualifier-list 
before ‘__be16’
/usr/include/linux/if_packet.h:14: error: expected specifier-qualifier-list 
before ‘__be16’
/usr/include/linux/if_packet.h:59: error: expected specifier-qualifier-list 
before ‘__u32’
/usr/include/linux/if_packet.h:97: error: expected specifier-qualifier-list 
before ‘__u32’
In file included from /usr/include/sys/ioctl.h:27,
                 from pfring.h:35,
                 from pfring.c:21:
/usr/include/bits/ioctls.h:24:24: error: asm/ioctls.h: No such file or directory
In file included from pfring.h:44,
                 from pfring.c:21:
/usr/include/linux/if_ether.h:122: error: expected specifier-qualifier-list 
before ‘__be16’
make: *** [pfring.o] Error 1

I googled a bit just found an entry at the date 2011 saying to copy pfring.h to 
approptiate place which i tried and didn't helped.

Indeed i am not stich to Debian, any system that is known working with current 
PF_RING source and TNAPI is fine for me

Here is my ethernet card information:

# ethtool eth3
Settings for eth3:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: g
        Wake-on: g
        Link detected: yes

lspci output
04:00.1 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet 
Controller (rev 06)

# dmesg | grep 04:00.1
[    0.515404] pci 0000:04:00.1: reg 10 32bit mmio: [0xfbfa0000-0xfbfbffff]
[    0.515411] pci 0000:04:00.1: reg 14 32bit mmio: [0xfbf80000-0xfbf9ffff]
[    0.515417] pci 0000:04:00.1: reg 18 io port: [0x5020-0x503f]
[    0.515436] pci 0000:04:00.1: reg 30 32bit mmio pref: [0x000000-0x01ffff]
[    0.515476] pci 0000:04:00.1: PME# supported from D0 D3hot D3cold
[    0.515480] pci 0000:04:00.1: PME# disabled
[    1.476704] e1000e 0000:04:00.1: Disabling ASPM  L1
[    1.476722] e1000e 0000:04:00.1: PCI INT B -> GSI 42 (level, low) -> IRQ 42
[    1.476741] e1000e 0000:04:00.1: setting latency timer to 64
[    1.476831] e1000e 0000:04:00.1: irq 63 for MSI/MSI-X
[    1.658101] e1000e 0000:04:00.1: eth3: (PCI Express:2.5GB/s:Width x4) 
00:26:55:d9:9e:1f
[    1.658104] e1000e 0000:04:00.1: eth3: Intel(R) PRO/1000 Network Connection
[    1.658183] e1000e 0000:04:00.1: eth3: MAC: 0, PHY: 4, PBA No: D51930-007

Will be happy if someone help. Suggesting another os that is known to work at 
compile and install process is also fine.

Cheers.

-- 
Oguz Yarimtepe <[email protected]>
http://about.me/oguzy
_______________________________________________
Ntop-misc mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc

Reply via email to