[netfilter-cvslog] r4513 - in trunk: libnetfilter_conntrack
libnetfilter_log libnetfilter_queue libnfnetlink
laforge at netfilter.org
laforge at netfilter.org
Mon Nov 14 15:50:31 CET 2005
Author: laforge at netfilter.org
Date: 2005-11-14 15:50:30 +0100 (Mon, 14 Nov 2005)
New Revision: 4513
Modified:
trunk/libnetfilter_conntrack/autogen.sh
trunk/libnetfilter_log/autogen.sh
trunk/libnetfilter_queue/autogen.sh
trunk/libnfnetlink/autogen.sh
Log:
This patch add the ability to copy and mangle the kernel headers
required by libnfnetlink and libnetfilter_[queue|log|conntrack] at
autogen.sh stage. (Pablo Neira)
Modified: trunk/libnetfilter_conntrack/autogen.sh
===================================================================
--- trunk/libnetfilter_conntrack/autogen.sh 2005-11-14 14:46:05 UTC (rev 4512)
+++ trunk/libnetfilter_conntrack/autogen.sh 2005-11-14 14:50:30 UTC (rev 4513)
@@ -1,5 +1,27 @@
#!/bin/sh
+include ()
+{
+ # If we keep a copy of the kernel header in the SVN tree, we'll have
+ # to worry about synchronization issues forever. Instead, we just copy
+ # the headers that we need from the lastest kernel version at autogen
+ # stage.
+
+ INCLUDEDIR=/lib/modules/`uname -r`/build/include/linux
+ if [ -f $INCLUDEDIR/netfilter/nfnetlink_conntrack.h ]
+ then
+ TARGET=include/libnetfilter_conntrack/linux_nfnetlink_conntrack.h
+ echo "Copying nfnetlink_conntrack.h to linux_nfnetlink_conntrack.h"
+ cp $INCLUDEDIR/netfilter/nfnetlink_conntrack.h $TARGET
+ TEMP=`tempfile`
+ sed 's/linux\/netfilter\/nfnetlink.h/libnfnetlink\/linux_nfnetlink.h/g' $TARGET > $TEMP
+ mv $TEMP $TARGET
+ else
+ echo "can't find nfnetlink_conntrack.h kernel file"
+ exit 1
+ fi
+}
+
run ()
{
echo "running: $*"
@@ -11,6 +33,7 @@
fi
}
+include
run aclocal
run libtoolize -f
#run autoheader
Modified: trunk/libnetfilter_log/autogen.sh
===================================================================
--- trunk/libnetfilter_log/autogen.sh 2005-11-14 14:46:05 UTC (rev 4512)
+++ trunk/libnetfilter_log/autogen.sh 2005-11-14 14:50:30 UTC (rev 4513)
@@ -1,5 +1,39 @@
#!/bin/sh
+include ()
+{
+ # If we keep a copy of the kernel header in the SVN tree, we'll have
+ # to worry about synchronization issues forever. Instead, we just copy
+ # the headers that we need from the lastest kernel version at autogen
+ # stage.
+
+ INCLUDEDIR=/lib/modules/`uname -r`/build/include/linux
+ if [ -f $INCLUDEDIR/netfilter/nfnetlink_log.h ]
+ then
+ TARGET=include/libnetfilter_log/linux_nfnetlink_log.h
+ echo "Copying nfnetlink_log.h to linux_nfnetlink_log.h"
+ cp $INCLUDEDIR/netfilter/nfnetlink_log.h $TARGET
+ TEMP=`tempfile`
+ sed 's/linux\/netfilter\/nfnetlink.h/libnfnetlink\/linux_nfnetlink.h/g' $TARGET > $TEMP
+ # Add aligned_u64 definition after #define _NFNETLINK_LOG_H
+ awk '{
+ if ( $0 == "#define _NFNETLINK_LOG_H" ) {
+ print $0
+ getline
+ print $0
+ print "#ifndef aligned_u64"
+ print "#define aligned_u64 unsigned long long __attribute__((aligned(8)))"
+ print "#endif"
+ }
+
+ print $0
+ }' $TEMP > $TARGET
+ else
+ echo "can't find nfnetlink_log.h kernel file"
+ exit 1
+ fi
+}
+
run ()
{
echo "running: $*"
@@ -11,6 +45,7 @@
fi
}
+include
run aclocal
#run autoheader
run libtoolize -f
Modified: trunk/libnetfilter_queue/autogen.sh
===================================================================
--- trunk/libnetfilter_queue/autogen.sh 2005-11-14 14:46:05 UTC (rev 4512)
+++ trunk/libnetfilter_queue/autogen.sh 2005-11-14 14:50:30 UTC (rev 4513)
@@ -1,5 +1,39 @@
#!/bin/sh
+include ()
+{
+ # If we keep a copy of the kernel header in the SVN tree, we'll have
+ # to worry about synchronization issues forever. Instead, we just copy
+ # the headers that we need from the lastest kernel version at autogen
+ # stage.
+
+ INCLUDEDIR=/lib/modules/`uname -r`/build/include/linux
+ if [ -f $INCLUDEDIR/netfilter/nfnetlink_queue.h ]
+ then
+ TARGET=include/libnetfilter_queue/linux_nfnetlink_queue.h
+ echo "Copying nfnetlink_queue.h to linux_nfnetlink_queue.h"
+ cp $INCLUDEDIR/netfilter/nfnetlink_queue.h $TARGET
+ TEMP=`tempfile`
+ sed 's/linux\/netfilter\/nfnetlink.h/libnfnetlink\/linux_nfnetlink.h/g' $TARGET > $TEMP
+ # Add aligned_u64 definition after #define _NFNETLINK_QUEUE_H
+ awk '{
+ if ( $0 == "#define _NFNETLINK_QUEUE_H" ) {
+ print $0
+ getline
+ print $0
+ print "#ifndef aligned_u64"
+ print "#define aligned_u64 unsigned long long __attribute__((aligned(8)))"
+ print "#endif"
+ }
+
+ print $0
+ }' $TEMP > $TARGET
+ else
+ echo "can't find nfnetlink_queue.h kernel file"
+ exit 1
+ fi
+}
+
run ()
{
echo "running: $*"
@@ -11,6 +45,7 @@
fi
}
+include
run libtoolize
run aclocal
#run autoheader
Modified: trunk/libnfnetlink/autogen.sh
===================================================================
--- trunk/libnfnetlink/autogen.sh 2005-11-14 14:46:05 UTC (rev 4512)
+++ trunk/libnfnetlink/autogen.sh 2005-11-14 14:50:30 UTC (rev 4513)
@@ -1,5 +1,24 @@
#!/bin/sh
+include ()
+{
+ # If we keep a copy of the kernel header in the SVN tree, we'll have
+ # to worry about synchronization issues forever. Instead, we just copy
+ # the headers that we need from the lastest kernel version at autogen
+ # stage.
+
+ INCLUDEDIR=/lib/modules/`uname -r`/build/include/linux
+ if [ -f $INCLUDEDIR/netfilter/nfnetlink.h ]
+ then
+ TARGET=include/libnfnetlink/linux_nfnetlink.h
+ echo "Copying nfnetlink.h to linux_nfnetlink.h"
+ cp $INCLUDEDIR/netfilter/nfnetlink.h $TARGET
+ else
+ echo "can't find nfnetlink.h kernel file"
+ exit 1
+ fi
+}
+
run ()
{
echo "running: $*"
@@ -11,6 +30,7 @@
fi
}
+include
run aclocal
#run autoheader
run libtoolize -f
More information about the netfilter-cvslog
mailing list