IPTables-P2P
I'm trying to compile Iptables-P2P on my Red Hat 9 and the error messages on compiling are:
There is a RPM package for this app?
=== COMPILING IPTABLES-P2P ======================== [root@firewall ~/iptables-p2p-0.3.0a]# make
make -C iptables
make[1]: Entrando no diretório /root/iptables-p2p-0.3.0a/iptables' make[1]: Nada a ser feito para all'.
make[1]: Saindo do diretório `/root/iptables-p2p-0.3.0a/iptables' make -C kernel linux-2.4
make[1]: Entrando no diretório `/root/iptables-p2p-0.3.0a/kernel' gcc -O3 -D__KERNEL__ -DMODULE -I/root/iptables-p2p-0.3.0a/kernel/../common - I/lib/modules/2.4.20-8/build/include -I/lib/modules/2.4.20-8/build/include/a sm/mach-default -c -o main.o main.c
In file included from /usr/include/linux/fs.h:23,
from /usr/include/linux/capability.h:17,
from /usr/include/linux/binfmts.h:5,
from /usr/include/linux/sched.h:9,
from /usr/include/linux/skbuff.h:19,
from main.c:18:
/usr/include/linux/string.h:8:2: warning: #warning Using kernel header in
userland!
In file included from /usr/include/linux/sched.h:14,
from /usr/include/linux/skbuff.h:19,
from main.c:18:
/usr/include/linux/timex.h:173: field `time' has incomplete type
In file included from /usr/include/linux/bitops.h:69,
from /usr/include/asm/system.h:7,
from /usr/include/linux/sched.h:16,
from /usr/include/linux/skbuff.h:19,
from main.c:18:/usr/include/asm/bitops.h:327:2: warning: #warning This includefile is not available on all architectures. /usr/include/asm/bitops.h:328:2: warning: #warning Using kernel headers in
userspace: atomicity not guaranteed
In file included from /usr/include/linux/signal.h:4,
from /usr/include/linux/sched.h:25,
from /usr/include/linux/skbuff.h:19,
from main.c:18:
/usr/include/asm/signal.h:107: parse error before "sigset_t"
/usr/include/asm/signal.h:110: parse error before '}' token
In file included from /usr/include/linux/sched.h:81,
from /usr/include/linux/skbuff.h:19,
from main.c:18:/usr/include/linux/timer.h:45: parse error before "spinlock_t" /usr/include/linux/timer.h:53: parse error before '}' token /usr/include/linux/timer.h:67: parse error before "tvec_base_t" /usr/include/linux/timer.h:101: parse error before "tvec_bases" /usr/include/linux/timer.h: In function `init_timer':/usr/include/linux/timer.h:105: dereferencing pointer to incomplete type /usr/include/linux/timer.h:105: dereferencing pointer to incomplete type /usr/include/linux/timer.h:106: dereferencing pointer to incomplete type /usr/include/linux/timer.h: In function `timer_pending':/usr/include/linux/timer.h:121: dereferencing pointer to incomplete type In file included from /usr/include/linux/highmem.h:5,
from /usr/include/linux/skbuff.h:26,
from main.c:18:
/usr/include/asm/pgalloc.h:6:24: asm/fixmap.h: Arquivo ou diretório não
encontrado
In file included from /usr/include/linux/highmem.h:5,
from /usr/include/linux/skbuff.h:26,
from main.c:18:/usr/include/asm/pgalloc.h: At top level:/usr/include/asm/pgalloc.h:57: parse error before '*' token /usr/include/asm/pgalloc.h: In function `get_pgd_slow':/usr/include/asm/pgalloc.h:59: `pgd_t' undeclared (first use in this function)/usr/include/asm/pgalloc.h:59: (Each undeclared identifier is reported only once/usr/include/asm/pgalloc.h:59: for each function it appears in.) /usr/include/asm/pgalloc.h:59: pgd' undeclared (first use in this function) /usr/include/asm/pgalloc.h:59: parse error before ')' token /usr/include/asm/pgalloc.h:62: USER_PTRS_PER_PGD' undeclared (first use in this function)/usr/include/asm/pgalloc.h:63: `swapper_pg_dir' undeclared (first use in this function)/usr/include/asm/pgalloc.h:63: `PTRS_PER_PGD' undeclared (first use in this function)/usr/include/asm/pgalloc.h: At top level:/usr/include/asm/pgalloc.h:70: parse error before '*' token /usr/include/asm/pgalloc.h: In function `get_pgd_fast':/usr/include/asm/pgalloc.h:80: `pgd_t' undeclared (first use in this function)/usr/include/asm/pgalloc.h:80: parse error before ')' token /usr/include/asm/pgalloc.h: At top level:/usr/include/asm/pgalloc.h:83: parse error before '*' token /usr/include/asm/pgalloc.h: In function `free_pgd_fast':/usr/include/asm/pgalloc.h:85: `pgd' undeclared (first use in this function) /usr/include/asm/pgalloc.h: At top level:/usr/include/asm/pgalloc.h:90: parse error before '*' token /usr/include/asm/pgalloc.h: In function `free_pgd_slow':/usr/include/asm/pgalloc.h:99: `pgd' undeclared (first use in this function) /usr/include/asm/pgalloc.h: At top level:/usr/include/asm/pgalloc.h:103: parse error before '*' token /usr/include/asm/pgalloc.h: In function `pte_alloc_one':/usr/include/asm/pgalloc.h:105: `pte_t' undeclared (first use in this function)/usr/include/asm/pgalloc.h:105: `pte' undeclared (first use in this function)/usr/include/asm/pgalloc.h:109: parse error before ')' token /usr/include/asm/pgalloc.h: At top level:/usr/include/asm/pgalloc.h:118: parse error before '*' token /usr/include/asm/pgalloc.h: In function `pte_alloc_one_fast':/usr/include/asm/pgalloc.h:127: `pte_t' undeclared (first use in this function)/usr/include/asm/pgalloc.h:127: parse error before ')' token /usr/include/asm/pgalloc.h: At top level:/usr/include/asm/pgalloc.h:130: parse error before '*' token /usr/include/asm/pgalloc.h: In function `pte_free_fast':/usr/include/asm/pgalloc.h:132: `pte' undeclared (first use in this function)/usr/include/asm/pgalloc.h: At top level:/usr/include/asm/pgalloc.h:137: parse error before '*' token /usr/include/asm/pgalloc.h: In function `pte_free_slow':/usr/include/asm/pgalloc.h:139: `pte' undeclared (first use in this function)/usr/include/asm/pgalloc.h: In function `flush_tlb_mm':/usr/include/asm/pgalloc.h:183: `current' undeclared (first use in this function)/usr/include/asm/pgalloc.h: In function `flush_tlb_page':/usr/include/asm/pgalloc.h:190: dereferencing pointer to incomplete type /usr/include/asm/pgalloc.h:190: `current' undeclared (first use in this function)/usr/include/asm/pgalloc.h: In function `flush_tlb_range':/usr/include/asm/pgalloc.h:197: `current' undeclared (first use in this function)
In file included from main.c:18:/usr/include/linux/skbuff.h: At top level:/usr/include/linux/skbuff.h:100: parse error before "spinlock_t" /usr/include/linux/skbuff.h:120: parse error before "atomic_t" /usr/include/linux/skbuff.h:124: parse error before '}' token /usr/include/linux/skbuff.h:183: parse error before "atomic_t" /usr/include/linux/skbuff.h:215: parse error before '}' token
In file included from /usr/include/linux/netfilter_ipv4/ip_tables.h:18,
from main.c:21:
/usr/include/linux/netfilter_ipv4.h:53: `INT_MIN' undeclared here (not in a function)/usr/include/linux/netfilter_ipv4.h:53: enumerator value for NF_IP_PRI_FIRST' not integer constant /usr/include/linux/netfilter_ipv4.h:59: INT_MAX' undeclared here (not in a function)/usr/include/linux/netfilter_ipv4.h:59: enumerator value for `NF_IP_PRI_LAST' not integer constant
In file included from main.c:21:/usr/include/linux/netfilter_ipv4/ip_tables.h:26: field `src' has incomplete type/usr/include/linux/netfilter_ipv4/ip_tables.h:26: field `dst' has incomplete type/usr/include/linux/netfilter_ipv4/ip_tables.h:28: field smsk' has incomplete type /usr/include/linux/netfilter_ipv4/ip_tables.h:28: field dmsk' has incomplete type /usr/include/linux/netfilter_ipv4/ip_tables.h:29: IFNAMSIZ' undeclared here (not in a function) /usr/include/linux/netfilter_ipv4/ip_tables.h:29: IFNAMSIZ' undeclared here (not in a function) /usr/include/linux/netfilter_ipv4/ip_tables.h:30: IFNAMSIZ' undeclared here (not in a function) /usr/include/linux/netfilter_ipv4/ip_tables.h:30: IFNAMSIZ' undeclared here (not in a function)main.c: In function `match':
main.c:96: dereferencing pointer to incomplete type
main.c:108: dereferencing pointer to incomplete type
main.c:108: `IPPROTO_TCP' undeclared (first use in this function) main.c:111: dereferencing pointer to incomplete type
main.c:111: dereferencing pointer to incomplete typemain.c: At top level:
main.c:132: variable p2p_match' has initializer but incomplete type main.c:133: unknown field name' specified in initializer main.c:133: warning: excess elements in struct initializer main.c:133: warning: (near initialization for p2p_match') main.c:134: unknown field match' specified in initializer main.c:134: warning: excess elements in struct initializer main.c:134: warning: (near initialization for p2p_match') main.c:135: unknown field checkentry' specified in initializer main.c:135: warning: excess elements in struct initializer main.c:135: warning: (near initialization for p2p_match') main.c:136: unknown field me' specified in initializer main.c:136: warning: excess elements in struct initializer main.c:136: warning: (near initialization for `p2p_match') main.c:139: parse error before "init"main.c: In function `init':
main.c:141: `KERN_INFO' undeclared (first use in this function) main.c:141: parse error before string constantmain.c: At top level:
main.c:145: parse error before "fini"main.c: In function `fini':
main.c:148: `KERN_INFO' undeclared (first use in this function) main.c:148: parse error before string constantmain.c: At top level:
main.c:151: warning: parameter names (without types) in function declaration main.c:151: warning: data definition has no type or storage class main.c:152: warning: parameter names (without types) in function declaration main.c:152: warning: data definition has no type or storage class main.c:132: storage size of `p2p_match' isn't known
make[1]: ** [main.o] Erro 1
make[1]: Saindo do diretório `/root/iptables-p2p-0.3.0a/kernel'
make: ** [linux-2.4] Erro 2
[root@firewall ~/iptables-p2p-0.3.0a]#