[CentOS-pt-br] Instalando ipp2p

Rousseau Lobo Braga braga.rousseau em gmail.com
Terça Novembro 10 20:00:40 UTC 2009


Olá a todos estou querendo utlizar o ipp2p, fiz o donwload do pacote em
http://www.ipp2p.org/downloads/ipp2p-0.8.2.tar.gz, mas quando tentei
compilar ele não consegue echar o arquivo iptables.h assim eu fiz mudanças
no arquivo  Makefle abaixo.

ifeq ($(KERNEL_SRC),)
$(error You need to define KERNEL_SRC)
endif

ifneq ($wildcard $(KERNEL_SRC)/include/linux/modversions.h),)
MODVERSIONS = -DMODVERSIONS
endif

_KVER = $(strip $(shell cat $(KERNEL_SRC)/Makefile | grep -e '^VERSION' |
cut -d"=" -f2))
_KPL = $(strip $(shell cat $(KERNEL_SRC)/Makefile | grep -e '^PATCHLEVEL' |
cut -d"=" -f2))
_KSUB = $(strip $(shell cat $(KERNEL_SRC)/Makefile | grep -e '^SUBLEVEL' |
cut -d"=" -f2))
KERNEL_SERIES=$(_KVER).$(_KPL)

ifeq ($(KERNEL_SERIES), 2.6)
    TARGET=ipt_ipp2p.ko
else
    TARGET=ipt_ipp2p.o
endif

SED = sed
IPTABLES_BIN = iptables
IPTABLES_SRC = /usr/src/redhat/BUILD/iptables-1.3.5

ifndef $(IPTABLES_SRC)
IPTVER = \
    $(shell $(IPTABLES_BIN) --version | $(SED) -e 's/^iptables v//')
IPTABLES_SRC = $(wildcard /usr/src/iptables-$(IPTVER))
endif

ifeq ($(IPTABLES_SRC),)
$(warning You need to install iptables sources and maybe set IPTABLES_SRC)
endif

IPTABLES_INCLUDE = -I$(IPTABLES_SRC)/include

ifneq ($(IPTVER),)
    IPTABLES_VERSION = $(IPTVER)
else
    IPTABLES_VERSION = $(shell cat $(IPTABLES_SRC)/Makefile | grep -e
'^IPTABLES_VERSION:=' | cut -d"=" -f2)
endif

IPTABLES_OPTION = -DIPTABLES_VERSION=\"$(IPTABLES_VERSION)\"

CC = gcc
CFLAGS = -O3 -Wall



all: modules libipt_ipp2p.so

modules: $(TARGET)

ipt_ipp2p.o: ipt_ipp2p.h ipt_ipp2p.c
    $(CC) $(CFLAGS) -I$(KERNEL_SRC)/include -c ipt_ipp2p.c -D__KERNEL__
-DMODULE $(MODVERSIONS)

ipt_ipp2p.ko: ipt_ipp2p.h ipt_ipp2p.c
    $(MAKE) -C $(KERNEL_SRC) SUBDIRS=$(PWD) modules


libipt_ipp2p.so: libipt_ipp2p.c ipt_ipp2p.h
    $(CC) $(CFLAGS) $(IPTABLES_OPTION) $(IPTABLES_INCLUDE) -fPIC -c
libipt_ipp2p.c
    ld -shared -o libipt_ipp2p.so libipt_ipp2p.o

clean:
    -rm -f *.o *.so *.ko .*.cmd *.mod.c
endif
 mas no momento da compilação acontece um erro que não foi possível achar o
arquivo iptables.h

[root em bldsrv2 2.6.18-164.el5fsl-x86_64]# locate
iptables.h/usr/include/iptables.h
/usr/share/doc/selinux-policy-2.4.6/html/system_iptables.html
/usr/src/kernels/2.6.18-164.el5fsl-x86_64/include/config/ip/nf/iptables.h
/usr/src/kernels/2.6.18-164.el5fsl-x86_64/include/config/ip6/nf/iptables.h
/usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64/include/config/ip/nf/iptables.h
/usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64/include/config/ip6/nf/iptables.h

Como poderei resolver esse problema..
um abraço
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: http://lists.centos.org/pipermail/centos-pt-br/attachments/20091110/dbae183a/attachment.html 


Mais detalhes sobre a lista de discussão CentOS-pt-br