[-]
[+]
|
Changed |
ulogd.changes
|
|
[-]
[+]
|
Changed |
ulogd.spec
^
|
|
|
Changed |
ulogd-2.0.2.tar.bz2.sig
^
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/Makefile.in
^
|
@@ -55,10 +55,10 @@
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/Rules.make.in \
$(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
- TODO build-aux/config.guess build-aux/config.sub \
- build-aux/depcomp build-aux/install-sh build-aux/ltmain.sh \
- build-aux/missing config.guess config.sub depcomp install-sh \
- ltmain.sh missing
+ TODO build-aux/ar-lib build-aux/config.guess \
+ build-aux/config.sub build-aux/depcomp build-aux/install-sh \
+ build-aux/ltmain.sh build-aux/missing config.guess config.sub \
+ depcomp install-sh ltmain.sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/README
^
|
@@ -1,7 +1,5 @@
Userspace logging daemon for netfilter/iptables
-$Id$
-
Project Homepage: http://www.gnumonks.org/projects/ulogd
Mailinglist: http://lists.gnumonks.org/mailman/listinfo/ulogd/
@@ -17,30 +15,9 @@
- logging of connection startup/teardown (kernel 2.6.14+)
- connection-based accounting (kernel 2.6.14+)
-The to-be-logged information
-
-from passing packets from the kernel to userspace
-to do some logging there. It should work like that:
-
-- Register a target called ULOG with iptables
-- if the target is hit:
- - send the packet out using netlink multicast facility
- - return NF_CONTINUE immediately
-
-New with ipt_ULOG 0.8 we can accumulate packets in userspace and send
-them in small batches (1-50) to userspace. This reduces the amount of
-expensive context switches.
-
-More than one logging daemon may listen to the netlink multicast address.
-
===> CONTENTS
-= Ulog library (libipulog.a)
-Just a little library like libipq.a which provides a convenient way to
-write userspace logging daemons. The functions provided are described
-in the source code, a small demo program (ulog_test) is also included.
-
-= ulogd daemon (ulogd)
+= ulogd daemon (ulogd)
A sophisticated logging daemon core which uses a plugin for about anything. The
daemon provides a plugin API for
- input plugins
@@ -53,56 +30,84 @@
===> USAGE
-The kernel part of the userspace logging facility (ipt_ULOG.o) is included
-in kernels >= 2.4.18-pre8. If you are running older kernel versions, you MUST
-install the ulog-patch from netfilter patch-o-matic FIRST !!
-
-Please go to the netfilter homepage (http://www.netfilter.org/)
-and download the latest iptables package. There is a system called
-patch-o-matic, which manages recent netfilter development, which has
-not been included in the stock kernel yet.
-
-Just apply the ulog-patch from patch-o-matic (there is some documentation
-included in the iptables package how to use patch-o-matic).
-
-Next you have to enable the kernel config option CONFIG_IP_NF_TARGET_ULOG in
-the netfilter subsection of the network options.
-
-Then recompile the kernel or just recompile the netfilter modules using 'make
-modules SUBDIRS=net/ipv4/netfilter'. Next step is installing the module using
-'make modules_install'
-
-It is also a good idea to recompile and re-install the iptables package,
-if you don't already have libipt_ULOG.so in /usr/local/lib/iptables or
-/usr/lib/iptables
+To be able to build ulogd, you need to have working developement files and
+and libraries for:
+ - libnfnetlink
+ - libmnl
+ - libnetfilter_log [optional]
+ - libnetfilter_conntrack [optional]
+ - libnetfilter_acct [optional]
+
+Output plugins are build if the needed library and headers are found. This
+includes:
+ - PCAP: libpcap
+ - PGSQL: libpq
+ - MySQL: libmysqlclient
+ - SQLITE3: libsqlite3
+ - DBI: libdbi
+
+The build procedure is standard:
+ $ ./configure
+ $ make
+ $ sudo make install
-Now You are ready to go. You may now insert logging rules to every chain.
-To see the full syntax, type 'iptables -j ULOG -h'
+After build, you need to edit the ulogd.conf file to define a stack or more
+to use.
===> EXAMPLES
-At first a simple example, which passes every outgoing packet to the
-userspace logging, using netlink multicast group 3.
+= NFLOG usage
-iptables -A OUTPUT -j ULOG --ulog-nlgroup 3
+At first a simple example, which passes every outgoing packet to the
+userspace logging, using nfnetlink group 3.
-A more advanced one, passing all incoming tcp packets with destination
-port 80 to the userspace logging daemon listening on netlink multicast
+iptables -A OUTPUT -j NFLOG --nflog-group 3
+
+A more advanced one, passing all incoming tcp packets with destination
+port 80 to the userspace logging daemon listening on netlink multicast
group 32. All packets get tagged with the ulog prefix "inp"
-iptables -A INPUT -j ULOG -p tcp --dport 80 --ulog-nlgroup 32 --ulog-prefix inp
+iptables -A INPUT -j NFLOG -p tcp --dport 80 --nflog-group 32 --nflog-prefix inp
+
+See iptables -j NFLOG -h for complete information about NFLOG.
+
+= NFCT usage
+
+To use connection logging, simply activate in ulogd.conf one stack using
+the NFCT plugin.
+
+For example, the following stack will do flow-based logging via
+LOGEMU:
+
+ stack=ct1:NFCT,ip2str1:IP2STR,print1:PRINTFLOW,emu1:LOGEMU
+
+= NFACCT usage
+
+On ulogd side, activate a stack using the NFACCT module.
+
+You then need to create counters:
+ # nfacct add ipv4.tcp
+ # nfacct add ipv6.tcp.443
+
+Once this is done, you can then create iptables matching rule that will increment
+each time a packet hit them:
+
+ # iptables -A FORWARD -p tcp -m nfacct --nfacct-name ipv4.tcp
+ # ip6tables -A FORWARD -p tcp --dport 443 -m nfacct --nfacct-name ipv6.tcp.443
+ # ip6tables -A FORWARD -p tcp --sport 443 -m nfacct --nfacct-name ipv6.tcp.443
-Since version 0.2, I added another parameter (--ulog-cprange).
-Using this parameter You are able to specify how much octets of the
-packet should be copied from the kernel to userspace.
-Setting --ulog-cprange to 0 does always copy the whole packet. Default is 0
+NFACCT plugin will then dump periodically the counters and trigger an update of the
+output corresponding to the active stacks.
===> COPYRIGHT + CREDITS
-The code and documentation is (C) 2000-2005 by Harald Welte <laforge@gnumonks.org>
+The code and documentation is
+ (C) 2000-2006 by Harald Welte <laforge@gnumonks.org>
+ (C) 2008-2012 Pablo Neira Ayuso <pablo@netfilter.org>
+ (C) 2008-2013 Eric Leblond <eric@regit.org>
Thanks also to the valuable contributions of Daniel Stone, Alexander Janssen,
Michael Stolovitzsky and Jozsef Kadlecsik.
-Credits to Rusty Russell, James Morris, Marc Boucher and all the other
-netfilter hackers.
+Credits to Rusty Russell, James Morris, Marc Boucher and all the other
+netfilter hackers.
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/TODO
^
|
@@ -1,11 +1,4 @@
-- autoconf/automake detection of libnetfilter_{log,conntrack}, mysql, pgsql, sqlite3, pcap
-- conditional compilation of NFLOG, CTNL, PGSQL, MYSQL, SQLITE3, PCAP plugins
- add support for capabilities to run as non-root
-- IPv6 support (core and extensions)
- support for static linking
- issues with ulogd_BASE and partially copied packets (--ulog-cprange)
- problem wrt. ulogd_BASE and fragments
-- cleanup keys after we've propagatet through the whole stack (RETF_VALID, FREE)
-- port SQLITE3 plugin
-- convert db layer and pgsql + mysql plugin to a 'parameter bind' scheme for efficiency
-- autoconf detection of SCTP / DCCP support
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/aclocal.m4
^
|
@@ -219,6 +219,67 @@
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_PROG_AR([ACT-IF-FAIL])
+# -------------------------
+# Try to determine the archiver interface, and trigger the ar-lib wrapper
+# if it is needed. If the detection of archiver interface fails, run
+# ACT-IF-FAIL (default is to abort configure with a proper error message).
+AC_DEFUN([AM_PROG_AR],
+[AC_BEFORE([$0], [LT_INIT])dnl
+AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([ar-lib])dnl
+AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
+: ${AR=ar}
+
+AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
+ [am_cv_ar_interface=ar
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
+ [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+ AC_TRY_EVAL([am_ar_try])
+ if test "$ac_status" -eq 0; then
+ am_cv_ar_interface=ar
+ else
+ am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+ AC_TRY_EVAL([am_ar_try])
+ if test "$ac_status" -eq 0; then
+ am_cv_ar_interface=lib
+ else
+ am_cv_ar_interface=unknown
+ fi
+ fi
+ rm -f conftest.lib libconftest.a
+ ])
+ ])
+
+case $am_cv_ar_interface in
+ar)
+ ;;
+lib)
+ # Microsoft lib, so override with the ar-lib wrapper script.
+ # FIXME: It is wrong to rewrite AR.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__AR in this case,
+ # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+ # similar.
+ AR="$am_aux_dir/ar-lib $AR"
+ ;;
+unknown)
+ m4_default([$1],
+ [AC_MSG_ERROR([could not determine $AR interface])])
+ ;;
+esac
+AC_SUBST([AR])dnl
+])
+
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
|
[-]
[+]
|
Added |
ulogd-2.0.2.tar.bz2/build-aux/ar-lib
^
|
@@ -0,0 +1,270 @@
+#! /bin/sh
+# Wrapper for Microsoft lib.exe
+
+me=ar-lib
+scriptversion=2012-03-01.08; # UTC
+
+# Copyright (C) 2010, 2012 Free Software Foundation, Inc.
+# Written by Peter Rosin <peda@lysator.liu.se>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+
+# func_error message
+func_error ()
+{
+ echo "$me: $1" 1>&2
+ exit 1
+}
+
+file_conv=
+
+# func_file_conv build_file
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv in
+ mingw)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_at_file at_file operation archive
+# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
+# for each of them.
+# When interpreting the content of the @FILE, do NOT use func_file_conv,
+# since the user would need to supply preconverted file names to
+# binutils ar, at least for MinGW.
+func_at_file ()
+{
+ operation=$2
+ archive=$3
+ at_file_contents=`cat "$1"`
+ eval set x "$at_file_contents"
+ shift
+
+ for member
+ do
+ $AR -NOLOGO $operation:"$member" "$archive" || exit $?
+ done
+}
+
+case $1 in
+ '')
+ func_error "no command. Try '$0 --help' for more information."
+ ;;
+ -h | --h*)
+ cat <<EOF
+Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
+
+Members may be specified in a file named with @FILE.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "$me, version $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test $# -lt 3; then
+ func_error "you must specify a program, an action and an archive"
+fi
+
+AR=$1
+shift
+while :
+do
+ if test $# -lt 2; then
+ func_error "you must specify a program, an action and an archive"
+ fi
+ case $1 in
+ -lib | -LIB \
+ | -ltcg | -LTCG \
+ | -machine* | -MACHINE* \
+ | -subsystem* | -SUBSYSTEM* \
+ | -verbose | -VERBOSE \
+ | -wx* | -WX* )
+ AR="$AR $1"
+ shift
+ ;;
+ *)
+ action=$1
+ shift
+ break
+ ;;
+ esac
+done
+orig_archive=$1
+shift
+func_file_conv "$orig_archive"
+archive=$file
+
+# strip leading dash in $action
+action=${action#-}
+
+delete=
+extract=
+list=
+quick=
+replace=
+index=
+create=
+
+while test -n "$action"
+do
+ case $action in
+ d*) delete=yes ;;
+ x*) extract=yes ;;
+ t*) list=yes ;;
+ q*) quick=yes ;;
+ r*) replace=yes ;;
+ s*) index=yes ;;
+ S*) ;; # the index is always updated implicitly
+ c*) create=yes ;;
+ u*) ;; # TODO: don't ignore the update modifier
+ v*) ;; # TODO: don't ignore the verbose modifier
+ *)
+ func_error "unknown action specified"
+ ;;
+ esac
+ action=${action#?}
+done
+
+case $delete$extract$list$quick$replace,$index in
+ yes,* | ,yes)
+ ;;
+ yesyes*)
+ func_error "more than one action specified"
+ ;;
+ *)
+ func_error "no action specified"
+ ;;
+esac
+
+if test -n "$delete"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ for member
+ do
+ case $1 in
+ @*)
+ func_at_file "${1#@}" -REMOVE "$archive"
+ ;;
+ *)
+ func_file_conv "$1"
+ $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
+ ;;
+ esac
+ done
+
+elif test -n "$extract"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ if test $# -gt 0; then
+ for member
+ do
+ case $1 in
+ @*)
+ func_at_file "${1#@}" -EXTRACT "$archive"
+ ;;
+ *)
+ func_file_conv "$1"
+ $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
+ ;;
+ esac
+ done
+ else
+ $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
+ do
+ $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
+ done
+ fi
+
+elif test -n "$quick$replace"; then
+ if test ! -f "$orig_archive"; then
+ if test -z "$create"; then
+ echo "$me: creating $orig_archive"
+ fi
+ orig_archive=
+ else
+ orig_archive=$archive
+ fi
+
+ for member
+ do
+ case $1 in
+ @*)
+ func_file_conv "${1#@}"
+ set x "$@" "@$file"
+ ;;
+ *)
+ func_file_conv "$1"
+ set x "$@" "$file"
+ ;;
+ esac
+ shift
+ shift
+ done
+
+ if test -n "$orig_archive"; then
+ $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
+ else
+ $AR -NOLOGO -OUT:"$archive" "$@" || exit $?
+ fi
+
+elif test -n "$list"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ $AR -NOLOGO -LIST "$archive" || exit $?
+fi
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/config.h.in
^
|
@@ -1,5 +1,14 @@
/* config.h.in. Generated from configure.ac by autoheader. */
+/* Building nfacct module */
+#undef BUILD_NFACCT
+
+/* Building nfct module */
+#undef BUILD_NFCT
+
+/* Building nflog module */
+#undef BUILD_NFLOG
+
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#undef HAVE_DIRENT_H
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/configure
^
|
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for ulogd 2.0.1.
+# Generated by GNU Autoconf 2.69 for ulogd 2.0.2.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@
# Identity of this package.
PACKAGE_NAME='ulogd'
PACKAGE_TARNAME='ulogd'
-PACKAGE_VERSION='2.0.1'
-PACKAGE_STRING='ulogd 2.0.1'
+PACKAGE_VERSION='2.0.2'
+PACKAGE_STRING='ulogd 2.0.2'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -649,12 +649,18 @@
PQLIBS
PQLIBPATH
PQINCPATH
-LIBNETFILTER_LOG_LIBS
-LIBNETFILTER_LOG_CFLAGS
-LIBNETFILTER_CONNTRACK_LIBS
-LIBNETFILTER_CONNTRACK_CFLAGS
+BUILD_NFACCT_FALSE
+BUILD_NFACCT_TRUE
LIBNETFILTER_ACCT_LIBS
LIBNETFILTER_ACCT_CFLAGS
+BUILD_NFCT_FALSE
+BUILD_NFCT_TRUE
+LIBNETFILTER_CONNTRACK_LIBS
+LIBNETFILTER_CONNTRACK_CFLAGS
+BUILD_NFLOG_FALSE
+BUILD_NFLOG_TRUE
+LIBNETFILTER_LOG_LIBS
+LIBNETFILTER_LOG_CFLAGS
LIBMNL_LIBS
LIBMNL_CFLAGS
LIBNFNETLINK_LIBS
@@ -675,8 +681,6 @@
DSYMUTIL
MANIFEST_TOOL
RANLIB
-ac_ct_AR
-AR
DLLTOOL
OBJDUMP
LN_S
@@ -697,6 +701,10 @@
build_cpu
build
LIBTOOL
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
@@ -714,10 +722,8 @@
LDFLAGS
CFLAGS
CC
-AM_BACKSLASH
-AM_DEFAULT_VERBOSITY
-AM_DEFAULT_V
-AM_V
+ac_ct_AR
+AR
am__untar
am__tar
AMTAR
@@ -782,8 +788,8 @@
ac_subst_files=''
ac_user_opts='
enable_option_checking
-enable_silent_rules
enable_dependency_tracking
+enable_silent_rules
enable_static
enable_shared
with_pic
@@ -792,6 +798,9 @@
with_sysroot
enable_libtool_lock
enable_largefile
+enable_nflog
+enable_nfct
+enable_nfacct
with_pgsql
with_pgsql_inc
with_pgsql_lib
@@ -818,12 +827,12 @@
LIBNFNETLINK_LIBS
LIBMNL_CFLAGS
LIBMNL_LIBS
-LIBNETFILTER_ACCT_CFLAGS
-LIBNETFILTER_ACCT_LIBS
-LIBNETFILTER_CONNTRACK_CFLAGS
-LIBNETFILTER_CONNTRACK_LIBS
LIBNETFILTER_LOG_CFLAGS
LIBNETFILTER_LOG_LIBS
+LIBNETFILTER_CONNTRACK_CFLAGS
+LIBNETFILTER_CONNTRACK_LIBS
+LIBNETFILTER_ACCT_CFLAGS
+LIBNETFILTER_ACCT_LIBS
libsqlite3_CFLAGS
libsqlite3_LIBS'
@@ -1366,7 +1375,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ulogd 2.0.1 to adapt to many kinds of systems.
+\`configure' configures ulogd 2.0.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1436,7 +1445,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ulogd 2.0.1:";;
+ short | recursive ) echo "Configuration of ulogd 2.0.2:";;
esac
cat <<\_ACEOF
@@ -1444,16 +1453,19 @@
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-silent-rules less verbose build output (undo: `make V=1')
- --disable-silent-rules verbose build output (undo: `make V=0')
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
+ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')
--enable-static[=PKGS] build static libraries [default=no]
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--disable-largefile omit support for large files
+ --enable-nflog Enable nflog module [default=yes]
+ --enable-nfct Enable nfct module [default=yes]
+ --enable-nfacct Enable nfacct module [default=yes]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1494,19 +1506,19 @@
LIBMNL_CFLAGS
C compiler flags for LIBMNL, overriding pkg-config
LIBMNL_LIBS linker flags for LIBMNL, overriding pkg-config
- LIBNETFILTER_ACCT_CFLAGS
- C compiler flags for LIBNETFILTER_ACCT, overriding pkg-config
- LIBNETFILTER_ACCT_LIBS
- linker flags for LIBNETFILTER_ACCT, overriding pkg-config
+ LIBNETFILTER_LOG_CFLAGS
+ C compiler flags for LIBNETFILTER_LOG, overriding pkg-config
+ LIBNETFILTER_LOG_LIBS
+ linker flags for LIBNETFILTER_LOG, overriding pkg-config
LIBNETFILTER_CONNTRACK_CFLAGS
C compiler flags for LIBNETFILTER_CONNTRACK, overriding
pkg-config
LIBNETFILTER_CONNTRACK_LIBS
linker flags for LIBNETFILTER_CONNTRACK, overriding pkg-config
- LIBNETFILTER_LOG_CFLAGS
- C compiler flags for LIBNETFILTER_LOG, overriding pkg-config
- LIBNETFILTER_LOG_LIBS
- linker flags for LIBNETFILTER_LOG, overriding pkg-config
+ LIBNETFILTER_ACCT_CFLAGS
+ C compiler flags for LIBNETFILTER_ACCT, overriding pkg-config
+ LIBNETFILTER_ACCT_LIBS
+ linker flags for LIBNETFILTER_ACCT, overriding pkg-config
libsqlite3_CFLAGS
C compiler flags for libsqlite3, overriding pkg-config
libsqlite3_LIBS
@@ -1578,7 +1590,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ulogd configure 2.0.1
+ulogd configure 2.0.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1997,7 +2009,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ulogd $as_me 2.0.1, which was
+It was created by ulogd $as_me 2.0.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2813,7 +2825,7 @@
# Define the identity of the package.
PACKAGE='ulogd'
- VERSION='2.0.1'
+ VERSION='2.0.2'
cat >>confdefs.h <<_ACEOF
@@ -2938,77 +2950,69 @@
-# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
- enableval=$enable_silent_rules;
-fi
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no) AM_DEFAULT_VERBOSITY=1;;
-*) AM_DEFAULT_VERBOSITY=0;;
-esac
am_make=${MAKE-make}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
-$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
-if ${am_cv_make_support_nested_variables+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if $as_echo 'TRUE=$(BAR$(V))
-BAR0=false
-BAR1=true
-V=1
+cat > confinc << 'END'
am__doit:
- @$(TRUE)
-.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
- am_cv_make_support_nested_variables=yes
-else
- am_cv_make_support_nested_variables=no
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
-$as_echo "$am_cv_make_support_nested_variables" >&6; }
-if test $am_cv_make_support_nested_variables = yes; then
- AM_V='$(V)'
- AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
- AM_V=$AM_DEFAULT_VERBOSITY
- AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
fi
-AM_BACKSLASH='\'
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
- @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
- *@@@%%%=?*=@@@%%%*)
- eval ac_cv_prog_make_${ac_make}_set=yes;;
- *)
- eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- SET_MAKE=
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- SET_MAKE="MAKE=${MAKE-make}"
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
fi
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3560,33 +3564,932 @@
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ar lib "link -lib"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AR" && break
+ done
+fi
+if test -z "$AR"; then
+ ac_ct_AR=$AR
+ for ac_prog in ar lib "link -lib"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_AR" && break
+done
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+fi
+
+: ${AR=ar}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
+$as_echo_n "checking the archiver ($AR) interface... " >&6; }
+if ${am_cv_ar_interface+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ am_cv_ar_interface=ar
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int some_variable = 0;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
+ (eval $am_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test "$ac_status" -eq 0; then
+ am_cv_ar_interface=ar
+ else
+ am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
+ (eval $am_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test "$ac_status" -eq 0; then
+ am_cv_ar_interface=lib
+ else
+ am_cv_ar_interface=unknown
+ fi
+ fi
+ rm -f conftest.lib libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
+$as_echo "$am_cv_ar_interface" >&6; }
+
+case $am_cv_ar_interface in
+ar)
+ ;;
+lib)
+ # Microsoft lib, so override with the ar-lib wrapper script.
+ # FIXME: It is wrong to rewrite AR.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__AR in this case,
+ # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+ # similar.
+ AR="$am_aux_dir/ar-lib $AR"
+ ;;
+unknown)
+ as_fn_error $? "could not determine $AR interface" "$LINENO" 5
+ ;;
+esac
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=0;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- for ac_file in conftest.o conftest.obj conftest.*; do
- test -f "$ac_file" || continue;
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
+ test $ac_status = 0; }
done
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
if ${ac_cv_c_compiler_gnu+:} false; then :
@@ -3797,69 +4700,6 @@
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
- am__include=include
- am__quote=
- _am_result=GNU
- ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- case `$am_make -s -f confmf 2> /dev/null` in #(
- *the\ am__doit\ target*)
- am__include=.include
- am__quote="\""
- _am_result=BSD
- ;;
- esac
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
- enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
- am__nodep='_no'
-fi
- if test "x$enable_dependency_tracking" != xno; then
- AMDEP_TRUE=
- AMDEP_FALSE='#'
-else
- AMDEP_TRUE='#'
- AMDEP_FALSE=
-fi
-
-
depcc="$CC" am_compiler_list=
@@ -5607,7 +6447,6 @@
-
if test -n "$ac_tool_prefix"; then
for ac_prog in ar
do
@@ -11689,7 +12528,7 @@
fi
- if test -n "$libpcap_LIBS"]; then
+ if test -n "$libpcap_LIBS"; then
HAVE_PCAP_TRUE=
HAVE_PCAP_FALSE='#'
else
@@ -11697,6 +12536,11 @@
HAVE_PCAP_FALSE=
fi
+if test "x$libpcap_LIBS" != "x"; then
+ enable_pcap="yes"
+else
+ enable_pcap="no"
+fi
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
@@ -12647,21 +13491,30 @@
$as_echo "yes" >&6; }
fi
+# Check whether --enable-nflog was given.
+if test "${enable_nflog+set}" = set; then :
+ enableval=$enable_nflog;
+else
+ enable_nflog=yes
+fi
+
+if test "x$enable_nflog" = "xyes"; then :
+
pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBNETFILTER_ACCT" >&5
-$as_echo_n "checking for LIBNETFILTER_ACCT... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBNETFILTER_LOG" >&5
+$as_echo_n "checking for LIBNETFILTER_LOG... " >&6; }
-if test -n "$LIBNETFILTER_ACCT_CFLAGS"; then
- pkg_cv_LIBNETFILTER_ACCT_CFLAGS="$LIBNETFILTER_ACCT_CFLAGS"
+if test -n "$LIBNETFILTER_LOG_CFLAGS"; then
+ pkg_cv_LIBNETFILTER_LOG_CFLAGS="$LIBNETFILTER_LOG_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnetfilter_acct >= 1.0.1\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libnetfilter_acct >= 1.0.1") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnetfilter_log >= 1.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libnetfilter_log >= 1.0.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_LIBNETFILTER_ACCT_CFLAGS=`$PKG_CONFIG --cflags "libnetfilter_acct >= 1.0.1" 2>/dev/null`
+ pkg_cv_LIBNETFILTER_LOG_CFLAGS=`$PKG_CONFIG --cflags "libnetfilter_log >= 1.0.0" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -12669,16 +13522,16 @@
else
pkg_failed=untried
fi
-if test -n "$LIBNETFILTER_ACCT_LIBS"; then
- pkg_cv_LIBNETFILTER_ACCT_LIBS="$LIBNETFILTER_ACCT_LIBS"
+if test -n "$LIBNETFILTER_LOG_LIBS"; then
+ pkg_cv_LIBNETFILTER_LOG_LIBS="$LIBNETFILTER_LOG_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnetfilter_acct >= 1.0.1\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libnetfilter_acct >= 1.0.1") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnetfilter_log >= 1.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libnetfilter_log >= 1.0.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_LIBNETFILTER_ACCT_LIBS=`$PKG_CONFIG --libs "libnetfilter_acct >= 1.0.1" 2>/dev/null`
+ pkg_cv_LIBNETFILTER_LOG_LIBS=`$PKG_CONFIG --libs "libnetfilter_log >= 1.0.0" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -12699,22 +13552,22 @@
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- LIBNETFILTER_ACCT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnetfilter_acct >= 1.0.1" 2>&1`
+ LIBNETFILTER_LOG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnetfilter_log >= 1.0.0" 2>&1`
else
- LIBNETFILTER_ACCT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnetfilter_acct >= 1.0.1" 2>&1`
+ LIBNETFILTER_LOG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnetfilter_log >= 1.0.0" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
- echo "$LIBNETFILTER_ACCT_PKG_ERRORS" >&5
+ echo "$LIBNETFILTER_LOG_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (libnetfilter_acct >= 1.0.1) were not met:
+ as_fn_error $? "Package requirements (libnetfilter_log >= 1.0.0) were not met:
-$LIBNETFILTER_ACCT_PKG_ERRORS
+$LIBNETFILTER_LOG_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
-Alternatively, you may set the environment variables LIBNETFILTER_ACCT_CFLAGS
-and LIBNETFILTER_ACCT_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables LIBNETFILTER_LOG_CFLAGS
+and LIBNETFILTER_LOG_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -12725,20 +13578,42 @@
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
-Alternatively, you may set the environment variables LIBNETFILTER_ACCT_CFLAGS
-and LIBNETFILTER_ACCT_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables LIBNETFILTER_LOG_CFLAGS
+and LIBNETFILTER_LOG_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details" "$LINENO" 5; }
else
- LIBNETFILTER_ACCT_CFLAGS=$pkg_cv_LIBNETFILTER_ACCT_CFLAGS
- LIBNETFILTER_ACCT_LIBS=$pkg_cv_LIBNETFILTER_ACCT_LIBS
+ LIBNETFILTER_LOG_CFLAGS=$pkg_cv_LIBNETFILTER_LOG_CFLAGS
+ LIBNETFILTER_LOG_LIBS=$pkg_cv_LIBNETFILTER_LOG_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
+$as_echo "#define BUILD_NFLOG 1" >>confdefs.h
+
+
+fi
+ if test "x$enable_nflog" = "xyes"; then
+ BUILD_NFLOG_TRUE=
+ BUILD_NFLOG_FALSE='#'
+else
+ BUILD_NFLOG_TRUE='#'
+ BUILD_NFLOG_FALSE=
+fi
+
+# Check whether --enable-nfct was given.
+if test "${enable_nfct+set}" = set; then :
+ enableval=$enable_nfct;
+else
+ enable_nfct=yes
+fi
+
+if test "x$enable_nfct" = "xyes"; then :
+
+
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBNETFILTER_CONNTRACK" >&5
$as_echo_n "checking for LIBNETFILTER_CONNTRACK... " >&6; }
@@ -12830,20 +13705,42 @@
fi
+$as_echo "#define BUILD_NFCT 1" >>confdefs.h
+
+
+fi
+ if test "x$enable_nfct" = "xyes"; then
+ BUILD_NFCT_TRUE=
+ BUILD_NFCT_FALSE='#'
+else
+ BUILD_NFCT_TRUE='#'
+ BUILD_NFCT_FALSE=
+fi
+
+# Check whether --enable-nfacct was given.
+if test "${enable_nfacct+set}" = set; then :
+ enableval=$enable_nfacct;
+else
+ enable_nfacct=yes
+fi
+
+if test "x$enable_nfacct" = "xyes"; then :
+
+
pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBNETFILTER_LOG" >&5
-$as_echo_n "checking for LIBNETFILTER_LOG... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBNETFILTER_ACCT" >&5
+$as_echo_n "checking for LIBNETFILTER_ACCT... " >&6; }
-if test -n "$LIBNETFILTER_LOG_CFLAGS"; then
- pkg_cv_LIBNETFILTER_LOG_CFLAGS="$LIBNETFILTER_LOG_CFLAGS"
+if test -n "$LIBNETFILTER_ACCT_CFLAGS"; then
+ pkg_cv_LIBNETFILTER_ACCT_CFLAGS="$LIBNETFILTER_ACCT_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnetfilter_log >= 1.0.0\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libnetfilter_log >= 1.0.0") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnetfilter_acct >= 1.0.1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libnetfilter_acct >= 1.0.1") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_LIBNETFILTER_LOG_CFLAGS=`$PKG_CONFIG --cflags "libnetfilter_log >= 1.0.0" 2>/dev/null`
+ pkg_cv_LIBNETFILTER_ACCT_CFLAGS=`$PKG_CONFIG --cflags "libnetfilter_acct >= 1.0.1" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -12851,16 +13748,16 @@
else
pkg_failed=untried
fi
-if test -n "$LIBNETFILTER_LOG_LIBS"; then
- pkg_cv_LIBNETFILTER_LOG_LIBS="$LIBNETFILTER_LOG_LIBS"
+if test -n "$LIBNETFILTER_ACCT_LIBS"; then
+ pkg_cv_LIBNETFILTER_ACCT_LIBS="$LIBNETFILTER_ACCT_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnetfilter_log >= 1.0.0\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libnetfilter_log >= 1.0.0") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnetfilter_acct >= 1.0.1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libnetfilter_acct >= 1.0.1") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_LIBNETFILTER_LOG_LIBS=`$PKG_CONFIG --libs "libnetfilter_log >= 1.0.0" 2>/dev/null`
+ pkg_cv_LIBNETFILTER_ACCT_LIBS=`$PKG_CONFIG --libs "libnetfilter_acct >= 1.0.1" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -12881,22 +13778,22 @@
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- LIBNETFILTER_LOG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnetfilter_log >= 1.0.0" 2>&1`
+ LIBNETFILTER_ACCT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnetfilter_acct >= 1.0.1" 2>&1`
else
- LIBNETFILTER_LOG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnetfilter_log >= 1.0.0" 2>&1`
+ LIBNETFILTER_ACCT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnetfilter_acct >= 1.0.1" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
- echo "$LIBNETFILTER_LOG_PKG_ERRORS" >&5
+ echo "$LIBNETFILTER_ACCT_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (libnetfilter_log >= 1.0.0) were not met:
+ as_fn_error $? "Package requirements (libnetfilter_acct >= 1.0.1) were not met:
-$LIBNETFILTER_LOG_PKG_ERRORS
+$LIBNETFILTER_ACCT_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
-Alternatively, you may set the environment variables LIBNETFILTER_LOG_CFLAGS
-and LIBNETFILTER_LOG_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables LIBNETFILTER_ACCT_CFLAGS
+and LIBNETFILTER_ACCT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -12907,20 +13804,33 @@
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
-Alternatively, you may set the environment variables LIBNETFILTER_LOG_CFLAGS
-and LIBNETFILTER_LOG_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables LIBNETFILTER_ACCT_CFLAGS
+and LIBNETFILTER_ACCT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details" "$LINENO" 5; }
else
- LIBNETFILTER_LOG_CFLAGS=$pkg_cv_LIBNETFILTER_LOG_CFLAGS
- LIBNETFILTER_LOG_LIBS=$pkg_cv_LIBNETFILTER_LOG_LIBS
+ LIBNETFILTER_ACCT_CFLAGS=$pkg_cv_LIBNETFILTER_ACCT_CFLAGS
+ LIBNETFILTER_ACCT_LIBS=$pkg_cv_LIBNETFILTER_ACCT_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
+$as_echo "#define BUILD_NFACCT 1" >>confdefs.h
+
+
+fi
+ if test "x$enable_nfacct" = "xyes"; then
+ BUILD_NFACCT_TRUE=
+ BUILD_NFACCT_FALSE='#'
+else
+ BUILD_NFACCT_TRUE='#'
+ BUILD_NFACCT_FALSE=
+fi
+
+
@@ -13095,6 +14005,11 @@
HAVE_PGSQL_FALSE=
fi
+if test "x$PQLIBPATH" != "x"; then
+ enable_pgsql="yes"
+else
+ enable_pgsql="no"
+fi
@@ -13268,6 +14183,11 @@
HAVE_MYSQL_FALSE=
fi
+if test "x$MYSQL_LIB" != "x"; then
+ enable_mysql="yes"
+else
+ enable_mysql="no"
+fi
pkg_failed=no
@@ -13348,6 +14268,11 @@
HAVE_SQLITE3_FALSE=
fi
+if test "x$libsqlite3_LIBS" != "x"; then
+ enable_sqlite3="yes"
+else
+ enable_sqlite3="no"
+fi
@@ -13511,8 +14436,11 @@
HAVE_DBI_FALSE=
fi
-
-
+if test "x$DBI_LIB" != "x"; then
+ enable_dbi="yes"
+else
+ enable_dbi="no"
+fi
@@ -13644,10 +14572,26 @@
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${HAVE_PCAP_TRUE}" && test -z "${HAVE_PCAP_FALSE}"; then
as_fn_error $? "conditional \"HAVE_PCAP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${BUILD_NFLOG_TRUE}" && test -z "${BUILD_NFLOG_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_NFLOG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_NFCT_TRUE}" && test -z "${BUILD_NFCT_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_NFCT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_NFACCT_TRUE}" && test -z "${BUILD_NFACCT_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_NFACCT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${HAVE_PGSQL_TRUE}" && test -z "${HAVE_PGSQL_FALSE}"; then
as_fn_error $? "conditional \"HAVE_PGSQL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -14061,7 +15005,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ulogd $as_me 2.0.1, which was
+This file was extended by ulogd $as_me 2.0.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14127,7 +15071,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ulogd config.status 2.0.1
+ulogd config.status 2.0.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -15916,3 +16860,18 @@
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
+
+echo "
+Ulogd configuration:
+ Input plugins:
+ NFLOG plugin: ${enable_nflog}
+ NFCT plugin: ${enable_nfct}
+ NFACCT plugin: ${enable_nfacct}
+ Output plugins:
+ PCAP plugin: ${enable_pcap}
+ PGSQL plugin: ${enable_pgsql}
+ MySQL plugin: ${enable_mysql}
+ SQLITE3 plugin: ${enable_sqlite3}
+ DBI plugin: ${enable_dbi}
+"
+echo "You can now run 'make' and 'make install'"
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/configure.ac
^
|
@@ -1,11 +1,12 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([ulogd], [2.0.1])
+AC_INIT([ulogd], [2.0.2])
AC_PREREQ([2.50])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([-Wall foreign tar-pax no-dist-gzip dist-bzip2 1.10b])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([m4])
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
dnl kernel style compile messages
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -21,7 +22,12 @@
AC_SUBST([libdl_LIBS])
AC_SEARCH_LIBS([pcap_close], [pcap], [libpcap_LIBS="-lpcap"; LIBS=""])
AC_SUBST([libpcap_LIBS])
-AM_CONDITIONAL([HAVE_PCAP], test -n "$libpcap_LIBS"])
+AM_CONDITIONAL([HAVE_PCAP], [test -n "$libpcap_LIBS"])
+if test "x$libpcap_LIBS" != "x"; then
+ enable_pcap="yes"
+else
+ enable_pcap="no"
+fi
dnl Checks for header files.
AC_HEADER_DIRENT
@@ -44,23 +50,59 @@
dnl Check for the right nfnetlink version
PKG_CHECK_MODULES([LIBNFNETLINK], [libnfnetlink >= 1.0.1])
PKG_CHECK_MODULES([LIBMNL], [libmnl >= 1.0.3])
-PKG_CHECK_MODULES([LIBNETFILTER_ACCT], [libnetfilter_acct >= 1.0.1])
-PKG_CHECK_MODULES([LIBNETFILTER_CONNTRACK], [libnetfilter_conntrack >= 1.0.2])
-PKG_CHECK_MODULES([LIBNETFILTER_LOG], [libnetfilter_log >= 1.0.0])
+AC_ARG_ENABLE(nflog,
+ AS_HELP_STRING([--enable-nflog], [Enable nflog module [default=yes]]),,[enable_nflog=yes])
+AS_IF([test "x$enable_nflog" = "xyes"], [
+ PKG_CHECK_MODULES([LIBNETFILTER_LOG], [libnetfilter_log >= 1.0.0])
+ AC_DEFINE([BUILD_NFLOG], [1], [Building nflog module])
+])
+AM_CONDITIONAL([BUILD_NFLOG], [test "x$enable_nflog" = "xyes"])
+AC_ARG_ENABLE(nfct,
+ AS_HELP_STRING([--enable-nfct], [Enable nfct module [default=yes]]),,[enable_nfct=yes])
+AS_IF([test "x$enable_nfct" = "xyes"], [
+ PKG_CHECK_MODULES([LIBNETFILTER_CONNTRACK], [libnetfilter_conntrack >= 1.0.2])
+ AC_DEFINE([BUILD_NFCT], [1], [Building nfct module])
+])
+AM_CONDITIONAL([BUILD_NFCT], [test "x$enable_nfct" = "xyes"])
+AC_ARG_ENABLE(nfacct,
+ AS_HELP_STRING([--enable-nfacct], [Enable nfacct module [default=yes]]),,[enable_nfacct=yes])
+AS_IF([test "x$enable_nfacct" = "xyes"], [
+ PKG_CHECK_MODULES([LIBNETFILTER_ACCT], [libnetfilter_acct >= 1.0.1])
+ AC_DEFINE([BUILD_NFACCT], [1], [Building nfacct module])
+])
+AM_CONDITIONAL([BUILD_NFACCT], [test "x$enable_nfacct" = "xyes"])
CT_CHECK_POSTGRES_DB()
AM_CONDITIONAL(HAVE_PGSQL, test "x$PQLIBPATH" != "x")
+if test "x$PQLIBPATH" != "x"; then
+ enable_pgsql="yes"
+else
+ enable_pgsql="no"
+fi
CT_CHECK_MYSQL_DB()
AM_CONDITIONAL(HAVE_MYSQL, test "x$MYSQL_LIB" != "x")
+if test "x$MYSQL_LIB" != "x"; then
+ enable_mysql="yes"
+else
+ enable_mysql="no"
+fi
PKG_CHECK_MODULES([libsqlite3], [sqlite3], [], [:])
AM_CONDITIONAL([HAVE_SQLITE3], [test -n "$libsqlite3_LIBS"])
+if test "x$libsqlite3_LIBS" != "x"; then
+ enable_sqlite3="yes"
+else
+ enable_sqlite3="no"
+fi
CT_CHECK_DBI()
AM_CONDITIONAL(HAVE_DBI, test "x$DBI_LIB" != "x")
-
-
+if test "x$DBI_LIB" != "x"; then
+ enable_dbi="yes"
+else
+ enable_dbi="no"
+fi
dnl AC_SUBST(DATABASE_DIR)
dnl AC_SUBST(DATABASE_LIB)
@@ -84,3 +126,18 @@
output/dbi/Makefile \
src/Makefile Makefile Rules.make)
AC_OUTPUT
+
+echo "
+Ulogd configuration:
+ Input plugins:
+ NFLOG plugin: ${enable_nflog}
+ NFCT plugin: ${enable_nfct}
+ NFACCT plugin: ${enable_nfacct}
+ Output plugins:
+ PCAP plugin: ${enable_pcap}
+ PGSQL plugin: ${enable_pgsql}
+ MySQL plugin: ${enable_mysql}
+ SQLITE3 plugin: ${enable_sqlite3}
+ DBI plugin: ${enable_dbi}
+"
+echo "You can now run 'make' and 'make install'"
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/doc/mysql-ulogd2-flat.sql
^
|
@@ -42,6 +42,12 @@
`ip_csum` smallint(5) unsigned default NULL,
`ip_id` smallint(5) unsigned default NULL,
`ip_fragoff` smallint(5) unsigned default NULL,
+ `ip6_payloadlen` smallint(5) unsigned default NULL,
+ `ip6_priority` tinyint(3) unsigned default NULL,
+ `ip6_hoplimit` tinyint(3) unsigned default NULL,
+ `ip6_flowlabel` int(10) default NULL,
+ `ip6_fragoff` smallint(5) default NULL,
+ `ip6_fragid` int(10) unsigned default NULL,
`raw_label` tinyint(3) unsigned default NULL,
`mac_saddr_str` varchar(32) default NULL,
`mac_daddr_str` varchar(32) default NULL,
@@ -146,6 +152,12 @@
ip_csum,
ip_id,
ip_fragoff,
+ ip6_payloadlen,
+ ip6_priority,
+ ip6_hoplimit,
+ ip6_flowlabel,
+ ip6_fragoff,
+ ip6_fragid,
tcp_sport,
tcp_dport,
tcp_seq,
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/doc/mysql-ulogd2.sql
^
|
@@ -60,6 +60,12 @@
`ip_csum` smallint(5) unsigned default NULL,
`ip_id` smallint(5) unsigned default NULL,
`ip_fragoff` smallint(5) unsigned default NULL,
+ `ip6_payloadlen` smallint(5) unsigned default NULL,
+ `ip6_priority` tinyint(3) unsigned default NULL,
+ `ip6_hoplimit` tinyint(3) unsigned default NULL,
+ `ip6_flowlabel` int(10) default NULL,
+ `ip6_fragoff` smallint(5) default NULL,
+ `ip6_fragid` int(10) unsigned default NULL,
`label` tinyint(3) unsigned default NULL,
`mac_id` bigint unsigned default NULL,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
@@ -214,6 +220,12 @@
ip_csum,
ip_id,
ip_fragoff,
+ ip6_payloadlen,
+ ip6_priority,
+ ip6_hoplimit,
+ ip6_flowlabel,
+ ip6_fragoff,
+ ip6_fragid,
tcp_sport,
tcp_dport,
tcp_seq,
@@ -502,7 +514,7 @@
READS SQL DATA
BEGIN
INSERT INTO ulog2 (oob_time_sec, oob_time_usec, oob_hook, oob_prefix, oob_mark, oob_in, oob_out, oob_family,
- ip_saddr, ip_daddr, ip_protocol) VALUES
+ ip_saddr, ip_daddr, ip_protocol) VALUES
(_oob_time_sec, _oob_time_usec, _oob_hook, _oob_prefix, _oob_mark, _oob_in, _oob_out, _oob_family,
_ip_saddr, _ip_daddr, _ip_protocol);
RETURN LAST_INSERT_ID();
@@ -524,13 +536,19 @@
_ip_saddr binary(16),
_ip_daddr binary(16),
_ip_protocol tinyint(3) unsigned,
- _ip_tos tinyint(3) unsigned,
- _ip_ttl tinyint(3) unsigned,
- _ip_totlen smallint(5) unsigned,
- _ip_ihl tinyint(3) unsigned,
- _ip_csum smallint(5) unsigned,
- _ip_id smallint(5) unsigned,
- _ip_fragoff smallint(5) unsigned,
+ _ip_tos tinyint(3) unsigned,
+ _ip_ttl tinyint(3) unsigned,
+ _ip_totlen smallint(5) unsigned,
+ _ip_ihl tinyint(3) unsigned,
+ _ip_csum smallint(5) unsigned,
+ _ip_id smallint(5) unsigned,
+ _ip_fragoff smallint(5) unsigned,
+ _ip6_payloadlen smallint unsigned,
+ _ip6_priority tinyint unsigned,
+ _ip6_hoplimit tinyint unsigned,
+ _ip6_flowlabel integer,
+ _ip6_fragoff smallint,
+ _ip6_fragid integer unsigned,
_label tinyint(4) unsigned
) RETURNS int(10) unsigned
SQL SECURITY INVOKER
@@ -539,10 +557,12 @@
BEGIN
INSERT INTO ulog2 (oob_time_sec, oob_time_usec, oob_hook, oob_prefix, oob_mark, oob_in, oob_out, oob_family,
ip_saddr, ip_daddr, ip_protocol, ip_tos, ip_ttl, ip_totlen, ip_ihl,
- ip_csum, ip_id, ip_fragoff, label ) VALUES
+ ip_csum, ip_id, ip_fragoff, ip6_payloadlen, ip6_priority, ip6_hoplimit, ip6_flowlabel,
+ ip6_fragoff, ip6_fragid, label ) VALUES
(_oob_time_sec, _oob_time_usec, _oob_hook, _oob_prefix, _oob_mark, _oob_in, _oob_out, _oob_family,
_ip_saddr, _ip_daddr, _ip_protocol, _ip_tos, _ip_ttl, _ip_totlen, _ip_ihl,
- _ip_csum, _ip_id, _ip_fragoff, _label);
+ _ip_csum, _ip_id, _ip_fragoff, _ip6_payloadlen, _ip6_priority, _ip6_hoplimit, _ip6_flowlabel,
+ _ip6_fragoff, _ip6_fragid, _label);
RETURN LAST_INSERT_ID();
END
$$
@@ -701,13 +721,19 @@
_ip_saddr binary(16),
_ip_daddr binary(16),
_ip_protocol tinyint(3) unsigned,
- _ip_tos tinyint(3) unsigned,
- _ip_ttl tinyint(3) unsigned,
- _ip_totlen smallint(5) unsigned,
- _ip_ihl tinyint(3) unsigned,
- _ip_csum smallint(5) unsigned,
- _ip_id smallint(5) unsigned,
- _ip_fragoff smallint(5) unsigned,
+ _ip_tos tinyint(3) unsigned,
+ _ip_ttl tinyint(3) unsigned,
+ _ip_totlen smallint(5) unsigned,
+ _ip_ihl tinyint(3) unsigned,
+ _ip_csum smallint(5) unsigned,
+ _ip_id smallint(5) unsigned,
+ _ip_fragoff smallint(5) unsigned,
+ _ip6_payloadlen smallint unsigned,
+ _ip6_priority tinyint unsigned,
+ _ip6_hoplimit tinyint unsigned,
+ _ip6_flowlabel integer,
+ _ip6_fragoff smallint,
+ _ip6_fragid integer unsigned,
tcp_sport smallint(5) unsigned,
tcp_dport smallint(5) unsigned,
tcp_seq int(10) unsigned,
@@ -750,7 +776,8 @@
_oob_mark, _oob_in, _oob_out, _oob_family,
_ip_saddr, _ip_daddr, _ip_protocol, _ip_tos,
_ip_ttl, _ip_totlen, _ip_ihl, _ip_csum, _ip_id,
- _ip_fragoff, _label);
+ _ip_fragoff, _ip6_payloadlen, _ip6_priority, _ip6_hoplimit,
+ _ip6_flowlabel, _ip6_fragoff, _ip6_fragid, _label);
IF _ip_protocol = 6 THEN
CALL PACKET_ADD_TCP_FULL(@lastid, tcp_sport, tcp_dport, tcp_seq, tcp_ackseq,
tcp_window, tcp_urg, tcp_urgp, tcp_ack, tcp_psh,
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/doc/pgsql-ulogd2-flat.sql
^
|
@@ -48,6 +48,12 @@
ip_csum integer default NULL,
ip_id integer default NULL,
ip_fragoff smallint default NULL,
+ ip6_payloadlen bigint default NULL,
+ ip6_priority smallint default NULL,
+ ip6_hoplimit smallint default NULL,
+ ip6_flowlabel bigint default NULL,
+ ip6_fragoff integer default NULL,
+ ip6_fragid bigint default NULL,
raw_label smallint default NULL,
-- timestamp timestamp NOT NULL default 'now',
mac_saddr_str macaddr default NULL,
@@ -140,6 +146,12 @@
ip_csum,
ip_id,
ip_fragoff,
+ ip6_payloadlen,
+ ip6_priority,
+ ip6_hoplimit,
+ ip6_flowlabel,
+ ip6_fragoff,
+ ip6_fragid,
tcp_sport,
tcp_dport,
tcp_seq,
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/doc/pgsql-ulogd2.sql
^
|
@@ -60,6 +60,12 @@
ip_csum integer default NULL,
ip_id integer default NULL,
ip_fragoff smallint default NULL,
+ ip6_payloadlen bigint default NULL,
+ ip6_priority smallint default NULL,
+ ip6_hoplimit smallint default NULL,
+ ip6_flowlabel bigint default NULL,
+ ip6_fragoff integer default NULL,
+ ip6_fragid bigint default NULL,
label smallint default NULL,
mac_id bigint default NULL,
timestamp timestamp NOT NULL default now()
@@ -197,6 +203,12 @@
ip_csum,
ip_id,
ip_fragoff,
+ ip6_payloadlen,
+ ip6_priority,
+ ip6_hoplimit,
+ ip6_flowlabel,
+ ip6_fragoff,
+ ip6_fragid,
tcp_sport,
tcp_dport,
tcp_seq,
@@ -403,13 +415,21 @@
IN ip_csum integer,
IN ip_id integer,
IN ip_fragoff integer,
+ IN ip6_payloadlen integer,
+ IN ip6_priority integer,
+ IN ip6_hoplimit integer,
+ IN ip6_flowlabel bigint,
+ IN ip6_fragoff integer,
+ IN ip6_fragid bigint,
IN label integer
)
RETURNS bigint AS $$
INSERT INTO ulog2 (oob_time_sec,oob_time_usec,oob_hook,oob_prefix,oob_mark,
oob_in,oob_out,oob_family,ip_saddr_str,ip_daddr_str,ip_protocol,
- ip_tos,ip_ttl,ip_totlen,ip_ihl,ip_csum,ip_id,ip_fragoff,label)
- VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19);
+ ip_tos,ip_ttl,ip_totlen,ip_ihl,ip_csum,ip_id,ip_fragoff,
+ ip6_payloadlen,ip6_priority,ip6_hoplimit,ip6_flowlabel,
+ ip6_fragoff,ip6_fragid,label)
+ VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25);
SELECT currval('ulog2__id_seq');
$$ LANGUAGE SQL SECURITY INVOKER;
@@ -542,6 +562,12 @@
IN ip_csum integer,
IN ip_id integer,
IN ip_fragoff integer,
+ IN ip6_payloadlen integer,
+ IN ip6_priority integer,
+ IN ip6_hoplimit integer,
+ IN ip6_flowlabel bigint,
+ IN ip6_fragoff integer,
+ IN ip6_fragid bigint,
IN tcp_sport integer,
IN tcp_dport integer,
IN tcp_seq bigint,
@@ -583,23 +609,23 @@
t_id bigint;
t_mac_id bigint;
BEGIN
- t_id := INSERT_IP_PACKET_FULL($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$50);
+ t_id := INSERT_IP_PACKET_FULL($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$56);
IF (ip_protocol = 6) THEN
- PERFORM INSERT_TCP_FULL(t_id,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30);
+ PERFORM INSERT_TCP_FULL(t_id,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36);
ELSIF (ip_protocol = 17) THEN
- PERFORM INSERT_UDP(t_id,$31,$32,$33);
+ PERFORM INSERT_UDP(t_id,$37,$38,$39);
ELSIF (ip_protocol = 132) THEN
- PERFORM INSERT_SCTP(t_id,$51,$52,$53);
+ PERFORM INSERT_SCTP(t_id,$57,$58,$59);
ELSIF (ip_protocol = 1) THEN
- PERFORM INSERT_ICMP(t_id,$34,$35,$36,$37,$38,$39);
+ PERFORM INSERT_ICMP(t_id,$40,$41,$42,$43,$44,$45);
ELSIF (ip_protocol = 58) THEN
- PERFORM INSERT_ICMPV6(t_id,$40,$41,$42,$43,$44);
+ PERFORM INSERT_ICMPV6(t_id,$46,$47,$48,$49,$50);
END IF;
IF (raw_type = 1) THEN
- t_mac_id = INSERT_OR_SELECT_MAC($47::macaddr,$48::macaddr,$49);
+ t_mac_id = INSERT_OR_SELECT_MAC($53::macaddr,$54::macaddr,$55);
UPDATE ulog2 SET mac_id = t_mac_id WHERE _id = t_id;
ELSE
- PERFORM INSERT_HARDWARE_HEADER(t_id,$45,$46);
+ PERFORM INSERT_HARDWARE_HEADER(t_id,$51,$52);
END IF;
RETURN t_id;
END
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/doc/ulogd.sgml
^
|
@@ -1,7 +1,5 @@
<!doctype linuxdoc system>
-<!-- $Id$ -->
-
<article>
<title>ULOGD 2.x - the Netfilter Userspace Logging Daemon</title>
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/filter/Makefile.am
^
|
@@ -1,7 +1,7 @@
SUBDIRS = raw2packet packet2flow
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = ${regular_CFLAGS} ${LIBNFNETLINK_CFLAGS}
+AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNFNETLINK_CFLAGS}
+AM_CFLAGS = ${regular_CFLAGS}
pkglib_LTLIBRARIES = ulogd_filter_IFINDEX.la ulogd_filter_PWSNIFF.la \
ulogd_filter_PRINTPKT.la ulogd_filter_PRINTFLOW.la \
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/filter/Makefile.in
^
|
@@ -397,8 +397,8 @@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = raw2packet packet2flow
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = ${regular_CFLAGS} ${LIBNFNETLINK_CFLAGS}
+AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNFNETLINK_CFLAGS}
+AM_CFLAGS = ${regular_CFLAGS}
pkglib_LTLIBRARIES = ulogd_filter_IFINDEX.la ulogd_filter_PWSNIFF.la \
ulogd_filter_PRINTPKT.la ulogd_filter_PRINTFLOW.la \
ulogd_filter_IP2STR.la ulogd_filter_IP2BIN.la \
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/filter/raw2packet/ulogd_raw2packet_BASE.c
^
|
@@ -1,4 +1,4 @@
-/* ulogd_MAC.c, Version $Revision$
+/* ulogd_MAC.c
*
* ulogd interpreter plugin for
* o MAC addresses
@@ -26,8 +26,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- * $Id$
*
*/
@@ -209,7 +207,7 @@
[KEY_IP6_PAYLOAD_LEN] = {
.type = ULOGD_RET_UINT16,
.flags = ULOGD_RETF_NONE,
- .name = "ip6.payload_len",
+ .name = "ip6.payloadlen",
.ipfix = {
.vendor = IPFIX_VENDOR_IETF,
.field_id = IPFIX_payloadLengthIPv6,
@@ -784,9 +782,9 @@
okey_set_u128(&ret[KEY_IP_DADDR], &ipv6h->ip6_dst);
okey_set_u16(&ret[KEY_IP6_PAYLOAD_LEN], ntohs(ipv6h->ip6_plen));
okey_set_u8(&ret[KEY_IP6_PRIORITY],
- ntohl(ipv6h->ip6_flow & 0x0ff00000) >> 20);
+ (ntohl(ipv6h->ip6_flow) & 0x0ff00000) >> 20);
okey_set_u32(&ret[KEY_IP6_FLOWLABEL],
- ntohl(ipv6h->ip6_flow & 0x000fffff));
+ ntohl(ipv6h->ip6_flow) & 0x000fffff);
okey_set_u8(&ret[KEY_IP6_HOPLIMIT], ipv6h->ip6_hlim);
curhdr = ipv6h->ip6_nxt;
@@ -897,10 +895,10 @@
okey_set_u16(&ret[KEY_ARP_PTYPE], ntohs(arph->arp_pro));
okey_set_u16(&ret[KEY_ARP_OPCODE], ntohs(arph->arp_op));
- okey_set_ptr(&ret[KEY_ARP_SHA], &arph->arp_sha);
- okey_set_ptr(&ret[KEY_ARP_SPA], &arph->arp_spa),
- okey_set_ptr(&ret[KEY_ARP_THA], &arph->arp_tha);
- okey_set_ptr(&ret[KEY_ARP_TPA], &arph->arp_tpa);
+ okey_set_ptr(&ret[KEY_ARP_SHA], (void *)&arph->arp_sha);
+ okey_set_ptr(&ret[KEY_ARP_SPA], (void *)&arph->arp_spa),
+ okey_set_ptr(&ret[KEY_ARP_THA], (void *)&arph->arp_tha);
+ okey_set_ptr(&ret[KEY_ARP_TPA], (void *)&arph->arp_tpa);
return ULOGD_IRET_OK;
}
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/filter/ulogd_filter_HWHDR.c
^
|
@@ -1,4 +1,4 @@
-/* ulogd_filter_HWHDR.c, Version $Revision: 1500 $
+/* ulogd_filter_HWHDR.c
*
* ulogd interpreter plugin for HWMAC
*
@@ -20,7 +20,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: ulogd_filter_IFINDEX.c 1500 2005-10-03 16:54:02Z laforge $
*/
#include <stdio.h>
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/filter/ulogd_filter_IFINDEX.c
^
|
@@ -1,4 +1,4 @@
-/* ulogd_filter_IFINDEX.c, Version $Revision: 1500 $
+/* ulogd_filter_IFINDEX.c
*
* ulogd interpreter plugin for ifindex to ifname conversion
*
@@ -18,8 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: ulogd_filter_IFINDEX.c 1500 2005-10-03 16:54:02Z laforge $
- *
*/
#include <stdio.h>
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/filter/ulogd_filter_IP2BIN.c
^
|
@@ -19,7 +19,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: ulogd_filter_IFINDEX.c 1500 2005-10-03 16:54:02Z laforge $
*/
#include <stdio.h>
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/filter/ulogd_filter_IP2STR.c
^
|
@@ -1,4 +1,4 @@
-/* ulogd_filter_IP2STR.c, Version $Revision: 1500 $
+/* ulogd_filter_IP2STR.c
*
* ulogd interpreter plugin for internal IP storage format to string conversion
*
@@ -19,7 +19,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: ulogd_filter_IFINDEX.c 1500 2005-10-03 16:54:02Z laforge $
*/
#include <stdio.h>
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/filter/ulogd_filter_MARK.c
^
|
@@ -1,4 +1,4 @@
-/* ulogd_filter_MARK.c, Version $Revision: 1500 $
+/* ulogd_filter_MARK.c
*
* ulogd interpreter plugin for internal IP storage format to string conversion
*
@@ -19,7 +19,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: ulogd_filter_IFINDEX.c 1500 2005-10-03 16:54:02Z laforge $
*/
#include <stdio.h>
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/filter/ulogd_filter_PWSNIFF.c
^
|
@@ -17,8 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id$
- *
*/
#include <stdio.h>
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/include/libipulog/libipulog.h
^
|
@@ -1,8 +1,6 @@
#ifndef _LIBIPULOG_H
#define _LIBIPULOG_H
-/* $Id$ */
-
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/include/ulogd/Makefile.am
^
|
@@ -1,2 +1,2 @@
-noinst_HEADERS = conffile.h db.h ipfix_protocol.h linuxlist.h ulogd.h printpkt.h printflow.h common.h linux_rbtree.h timer.h slist.h hash.h jhash.h
+noinst_HEADERS = conffile.h db.h ipfix_protocol.h linuxlist.h ulogd.h printpkt.h printflow.h common.h linux_rbtree.h timer.h slist.h hash.h jhash.h addr.h
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/include/ulogd/Makefile.in
^
|
@@ -221,7 +221,7 @@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-noinst_HEADERS = conffile.h db.h ipfix_protocol.h linuxlist.h ulogd.h printpkt.h printflow.h common.h linux_rbtree.h timer.h slist.h hash.h jhash.h
+noinst_HEADERS = conffile.h db.h ipfix_protocol.h linuxlist.h ulogd.h printpkt.h printflow.h common.h linux_rbtree.h timer.h slist.h hash.h jhash.h addr.h
all: all-am
.SUFFIXES:
|
[-]
[+]
|
Added |
ulogd-2.0.2.tar.bz2/include/ulogd/addr.h
^
|
@@ -0,0 +1,25 @@
+/* IP address handling functions
+ *
+ * (C) 2012 by Pablo Neira Ayuso <pablo@netfilter.org>
+ * (C) 2012 by Eric Leblond <eric@regit.org>
+ *
+ * This code is distributed under the terms of GNU GPL version 2 */
+
+#ifndef _ADDR_H
+#define _ADDR_H
+
+u_int32_t ulogd_bits2netmask(int bits);
+void ulogd_ipv6_cidr2mask_host(uint8_t cidr, uint32_t *res);
+void ulogd_ipv6_addr2addr_host(uint32_t *addr, uint32_t *res);
+
+struct ulogd_addr {
+ union {
+ uint32_t ipv4;
+ uint32_t ipv6[4];
+ } in;
+ uint32_t netmask;
+};
+
+int ulogd_parse_addr(char *string, size_t len, struct ulogd_addr *addr);
+
+#endif
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/include/ulogd/conffile.h
^
|
@@ -2,8 +2,6 @@
*
* (C) 2000 by Harald Welte <laforge@gnumonks.org>
*
- * $Id$
- *
* This code is distributed under the terms of GNU GPL */
#ifndef _CONFFILE_H
@@ -20,15 +18,16 @@
ERRMAND, /* mandatory option not found */
ERRUNKN, /* unknown config key */
ERRSECTION, /* section not found */
+ ERRTOOLONG, /* string too long */
};
-/* maximum line lenght of config file entries */
+/* maximum line length of config file entries */
#define LINE_LEN 255
-/* maximum lenght of config key name */
+/* maximum length of config key name */
#define CONFIG_KEY_LEN 30
-/* maximum lenght of string config value */
+/* maximum length of string config value */
#define CONFIG_VAL_STRING_LEN 225
/* valid config types */
@@ -41,11 +40,15 @@
#define CONFIG_OPT_MANDATORY 0x0001
#define CONFIG_OPT_MULTI 0x0002
+/* valid flag part */
+#define CONFIG_FLAG_VAL_PROTECTED (1<<0)
+
struct config_entry {
char key[CONFIG_KEY_LEN]; /* name of config directive */
u_int8_t type; /* type; see above */
u_int8_t options; /* options; see above */
u_int8_t hit; /* found? */
+ u_int8_t flag; /* tune setup of option */
union {
char string[CONFIG_VAL_STRING_LEN];
int value;
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/include/ulogd/db.h
^
|
@@ -1,3 +1,10 @@
+/* DB handling functions
+ *
+ * (C) 2000-2005 by Harald Welte <laforge@gnumonks.org>
+ *
+ * This code is distributed under the terms of GNU GPL version 2 */
+
+
#ifndef _ULOGD_DB_H
#define _ULOGD_DB_H
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/include/ulogd/ulogd.h
^
|
@@ -1,6 +1,6 @@
#ifndef _ULOGD_H
#define _ULOGD_H
-/* ulogd, Version $Revision$
+/* ulogd
*
* userspace logging daemon for netfilter ULOG target
* of the linux 2.4/2.6 netfilter subsystem.
@@ -9,7 +9,6 @@
*
* this code is released under the terms of GNU GPL
*
- * $Id$
*/
#include <ulogd/linuxlist.h>
@@ -184,6 +183,11 @@
return key->u.source->u.value.ui32;
}
+static inline u_int64_t ikey_get_u64(struct ulogd_key *key)
+{
+ return key->u.source->u.value.ui64;
+}
+
static inline void *ikey_get_u128(struct ulogd_key *key)
{
return &key->u.source->u.value.ui128;
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/input/flow/Makefile.am
^
|
@@ -1,12 +1,13 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNETFILTER_CONNTRACK_CFLAGS}
AM_CFLAGS = ${regular_CFLAGS}
+if BUILD_NFCT
pkglib_LTLIBRARIES = ulogd_inpflow_NFCT.la # ulogd_inpflow_IPFIX.la
ulogd_inpflow_NFCT_la_SOURCES = ulogd_inpflow_NFCT.c
ulogd_inpflow_NFCT_la_LDFLAGS = -avoid-version -module $(LIBNETFILTER_CONNTRACK_LIBS)
-ulogd_inpflow_NFCT_la_CFLAGS = $(AM_CFLAGS) $(LIBNETFILTER_CONNTRACK_CFLAGS)
+endif
#ulogd_inpflow_IPFIX_la_SOURCES = ulogd_inpflow_IPFIX.c
#ulogd_inpflow_IPFIX_la_LDFLAGS = -avoid-version -module
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/input/flow/Makefile.in
^
|
@@ -94,16 +94,18 @@
am__installdirs = "$(DESTDIR)$(pkglibdir)"
LTLIBRARIES = $(pkglib_LTLIBRARIES)
ulogd_inpflow_NFCT_la_LIBADD =
-am_ulogd_inpflow_NFCT_la_OBJECTS = \
- ulogd_inpflow_NFCT_la-ulogd_inpflow_NFCT.lo
+am__ulogd_inpflow_NFCT_la_SOURCES_DIST = ulogd_inpflow_NFCT.c
+@BUILD_NFCT_TRUE@am_ulogd_inpflow_NFCT_la_OBJECTS = \
+@BUILD_NFCT_TRUE@ ulogd_inpflow_NFCT.lo
ulogd_inpflow_NFCT_la_OBJECTS = $(am_ulogd_inpflow_NFCT_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
ulogd_inpflow_NFCT_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(ulogd_inpflow_NFCT_la_CFLAGS) $(CFLAGS) \
- $(ulogd_inpflow_NFCT_la_LDFLAGS) $(LDFLAGS) -o $@
+ $(AM_CFLAGS) $(CFLAGS) $(ulogd_inpflow_NFCT_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
+@BUILD_NFCT_TRUE@am_ulogd_inpflow_NFCT_la_rpath = -rpath $(pkglibdir)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
@@ -131,7 +133,7 @@
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(ulogd_inpflow_NFCT_la_SOURCES)
-DIST_SOURCES = $(ulogd_inpflow_NFCT_la_SOURCES)
+DIST_SOURCES = $(am__ulogd_inpflow_NFCT_la_SOURCES_DIST)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -279,12 +281,11 @@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNETFILTER_CONNTRACK_CFLAGS}
AM_CFLAGS = ${regular_CFLAGS}
-pkglib_LTLIBRARIES = ulogd_inpflow_NFCT.la # ulogd_inpflow_IPFIX.la
-ulogd_inpflow_NFCT_la_SOURCES = ulogd_inpflow_NFCT.c
-ulogd_inpflow_NFCT_la_LDFLAGS = -avoid-version -module $(LIBNETFILTER_CONNTRACK_LIBS)
-ulogd_inpflow_NFCT_la_CFLAGS = $(AM_CFLAGS) $(LIBNETFILTER_CONNTRACK_CFLAGS)
+@BUILD_NFCT_TRUE@pkglib_LTLIBRARIES = ulogd_inpflow_NFCT.la # ulogd_inpflow_IPFIX.la
+@BUILD_NFCT_TRUE@ulogd_inpflow_NFCT_la_SOURCES = ulogd_inpflow_NFCT.c
+@BUILD_NFCT_TRUE@ulogd_inpflow_NFCT_la_LDFLAGS = -avoid-version -module $(LIBNETFILTER_CONNTRACK_LIBS)
all: all-am
.SUFFIXES:
@@ -352,7 +353,7 @@
rm -f "$${dir}/so_locations"; \
done
ulogd_inpflow_NFCT.la: $(ulogd_inpflow_NFCT_la_OBJECTS) $(ulogd_inpflow_NFCT_la_DEPENDENCIES) $(EXTRA_ulogd_inpflow_NFCT_la_DEPENDENCIES)
- $(AM_V_CCLD)$(ulogd_inpflow_NFCT_la_LINK) -rpath $(pkglibdir) $(ulogd_inpflow_NFCT_la_OBJECTS) $(ulogd_inpflow_NFCT_la_LIBADD) $(LIBS)
+ $(AM_V_CCLD)$(ulogd_inpflow_NFCT_la_LINK) $(am_ulogd_inpflow_NFCT_la_rpath) $(ulogd_inpflow_NFCT_la_OBJECTS) $(ulogd_inpflow_NFCT_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -360,7 +361,7 @@
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulogd_inpflow_NFCT_la-ulogd_inpflow_NFCT.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulogd_inpflow_NFCT.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -383,13 +384,6 @@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-ulogd_inpflow_NFCT_la-ulogd_inpflow_NFCT.lo: ulogd_inpflow_NFCT.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ulogd_inpflow_NFCT_la_CFLAGS) $(CFLAGS) -MT ulogd_inpflow_NFCT_la-ulogd_inpflow_NFCT.lo -MD -MP -MF $(DEPDIR)/ulogd_inpflow_NFCT_la-ulogd_inpflow_NFCT.Tpo -c -o ulogd_inpflow_NFCT_la-ulogd_inpflow_NFCT.lo `test -f 'ulogd_inpflow_NFCT.c' || echo '$(srcdir)/'`ulogd_inpflow_NFCT.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ulogd_inpflow_NFCT_la-ulogd_inpflow_NFCT.Tpo $(DEPDIR)/ulogd_inpflow_NFCT_la-ulogd_inpflow_NFCT.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ulogd_inpflow_NFCT.c' object='ulogd_inpflow_NFCT_la-ulogd_inpflow_NFCT.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ulogd_inpflow_NFCT_la_CFLAGS) $(CFLAGS) -c -o ulogd_inpflow_NFCT_la-ulogd_inpflow_NFCT.lo `test -f 'ulogd_inpflow_NFCT.c' || echo '$(srcdir)/'`ulogd_inpflow_NFCT.c
-
mostlyclean-libtool:
-rm -f *.lo
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/input/flow/ulogd_inpflow_NFCT.c
^
|
@@ -36,6 +36,7 @@
#include <sys/time.h>
#include <time.h>
#include <netinet/in.h>
+#include <netdb.h>
#include <ulogd/linuxlist.h>
#include <ulogd/jhash.h>
#include <ulogd/hash.h>
@@ -43,6 +44,7 @@
#include <ulogd/ulogd.h>
#include <ulogd/timer.h>
#include <ulogd/ipfix_protocol.h>
+#include <ulogd/addr.h>
#include <libnetfilter_conntrack/libnetfilter_conntrack.h>
@@ -72,7 +74,7 @@
#define EVENT_MASK NF_NETLINK_CONNTRACK_NEW | NF_NETLINK_CONNTRACK_DESTROY
static struct config_keyset nfct_kset = {
- .num_ces = 9,
+ .num_ces = 12,
.ces = {
{
.key = "pollinterval",
@@ -128,6 +130,21 @@
.options = CONFIG_OPT_NONE,
.u.value = 0,
},
+ {
+ .key = "accept_src_filter",
+ .type = CONFIG_TYPE_STRING,
+ .options = CONFIG_OPT_NONE,
+ },
+ {
+ .key = "accept_dst_filter",
+ .type = CONFIG_TYPE_STRING,
+ .options = CONFIG_OPT_NONE,
+ },
+ {
+ .key = "accept_proto_filter",
+ .type = CONFIG_TYPE_STRING,
+ .options = CONFIG_OPT_NONE,
+ },
},
};
#define pollint_ce(x) (x->ces[0])
@@ -139,6 +156,9 @@
#define nlsockbufmaxsize_ce(x) (x->ces[6])
#define nlresynctimeout_ce(x) (x->ces[7])
#define reliable_ce(x) (x->ces[8])
+#define src_filter_ce(x) ((x)->ces[9])
+#define dst_filter_ce(x) ((x)->ces[10])
+#define proto_filter_ce(x) ((x)->ces[11])
enum nfct_keys {
NFCT_ORIG_IP_SADDR = 0,
@@ -993,11 +1013,248 @@
nfct_send(cpi->ovh, NFCT_Q_DUMP, &family);
}
+
+#define NFCT_SRC_DIR 1
+#define NFCT_DST_DIR 2
+
+static inline int nfct_set_dir(int dir, int *filter_dir_ipv4, int *filter_dir_ipv6)
+{
+ switch (dir) {
+ case NFCT_DST_DIR:
+ *filter_dir_ipv4 = NFCT_FILTER_DST_IPV4;
+ *filter_dir_ipv6 = NFCT_FILTER_DST_IPV6;
+ break;
+ case NFCT_SRC_DIR:
+ *filter_dir_ipv4 = NFCT_FILTER_SRC_IPV4;
+ *filter_dir_ipv6 = NFCT_FILTER_SRC_IPV6;
+ break;
+ default:
+ ulogd_log(ULOGD_FATAL,
+ "Invalid direction %d\n",
+ dir);
+ return -1;
+ }
+ return 0;
+}
+
+static int nfct_add_to_filter(struct nfct_filter *filter,
+ struct ulogd_addr *addr,
+ int l3, int dir)
+{
+ int filter_dir_ipv4;
+ int filter_dir_ipv6;
+
+ if (nfct_set_dir(dir, &filter_dir_ipv4, &filter_dir_ipv6) == -1)
+ return -1;
+
+ switch (l3) {
+ case AF_INET6:
+ {
+ struct nfct_filter_ipv6 filter_ipv6;
+ /* BSF always wants data in host-byte order */
+ ulogd_ipv6_addr2addr_host(addr->in.ipv6, filter_ipv6.addr);
+ ulogd_ipv6_cidr2mask_host(addr->netmask, filter_ipv6.mask);
+
+ nfct_filter_set_logic(filter,
+ filter_dir_ipv6,
+ NFCT_FILTER_LOGIC_POSITIVE);
+ nfct_filter_add_attr(filter,
+ filter_dir_ipv6,
+ &filter_ipv6);
+ }
+ break;
+ case AF_INET:
+ {
+ /* BSF always wants data in host-byte order */
+ struct nfct_filter_ipv4 filter_ipv4 = {
+ .addr = ntohl(addr->in.ipv4),
+ .mask = ulogd_bits2netmask(addr->netmask),
+ };
+
+ nfct_filter_set_logic(filter,
+ filter_dir_ipv4,
+ NFCT_FILTER_LOGIC_POSITIVE);
+ nfct_filter_add_attr(filter, filter_dir_ipv4,
+ &filter_ipv4);
+ }
+ break;
+ default:
+ ulogd_log(ULOGD_FATAL, "Invalid protocol %d\n", l3);
+ return -1;
+ }
+ return 0;
+}
+
+static int build_nfct_filter_dir(struct nfct_filter *filter, char* filter_string, int dir)
+{
+ char *from = filter_string;
+ char *comma;
+ struct ulogd_addr addr;
+ int has_ipv4 = 0;
+ int has_ipv6 = 0;
+
+ while ((comma = strchr(from, ',')) != NULL) {
+ size_t len = comma - from;
+ switch(ulogd_parse_addr(from, len, &addr)) {
+ case AF_INET:
+ nfct_add_to_filter(filter, &addr, AF_INET, dir);
+ has_ipv4 = 1;
+ break;
+ case AF_INET6:
+ nfct_add_to_filter(filter, &addr, AF_INET6, dir);
+ has_ipv6 = 1;
+ break;
+ default:
+ return -1;
+ }
+ from += len + 1;
+ }
+ switch(ulogd_parse_addr(from, strlen(from), &addr)) {
+ case AF_INET:
+ nfct_add_to_filter(filter, &addr, AF_INET, dir);
+ has_ipv4 = 1;
+ break;
+ case AF_INET6:
+ nfct_add_to_filter(filter, &addr, AF_INET6, dir);
+ has_ipv6 = 1;
+ break;
+ default:
+ return -1;
+ }
+
+ if (!has_ipv6) {
+ struct nfct_filter_ipv6 filter_ipv6;
+ int filter_dir_ipv4;
+ int filter_dir_ipv6;
+ if (nfct_set_dir(dir, &filter_dir_ipv4, &filter_dir_ipv6) == -1)
+ return -1;
+ nfct_filter_set_logic(filter,
+ filter_dir_ipv6,
+ NFCT_FILTER_LOGIC_NEGATIVE);
+ nfct_filter_add_attr(filter, filter_dir_ipv6,
+ &filter_ipv6);
+ }
+ if (!has_ipv4) {
+ struct nfct_filter_ipv4 filter_ipv4;
+ int filter_dir_ipv4;
+ int filter_dir_ipv6;
+ if (nfct_set_dir(dir, &filter_dir_ipv4, &filter_dir_ipv6) == -1)
+ return -1;
+ nfct_filter_set_logic(filter,
+ filter_dir_ipv4,
+ NFCT_FILTER_LOGIC_NEGATIVE);
+ nfct_filter_add_attr(filter, filter_dir_ipv4,
+ &filter_ipv4);
+ }
+
+ return 0;
+}
+
+static int build_nfct_filter_proto(struct nfct_filter *filter, char* filter_string)
+{
+ char *from = filter_string;
+ char *comma;
+ struct protoent * pent = NULL;
+
+ while ((comma = strchr(from, ',')) != NULL) {
+ size_t len = comma - from;
+ *comma = 0;
+ pent = getprotobyname(from);
+ if (pent == NULL) {
+ ulogd_log(ULOGD_FATAL, "Unknown protocol\n");
+ endprotoent();
+ return -1;
+ }
+ ulogd_log(ULOGD_NOTICE, "adding proto to filter: \"%s\" (%d)\n",
+ pent->p_name, pent->p_proto
+ );
+ nfct_filter_add_attr_u32(filter, NFCT_FILTER_L4PROTO,
+ pent->p_proto);
+ from += len + 1;
+ }
+ pent = getprotobyname(from);
+ if (pent == NULL) {
+ ulogd_log(ULOGD_FATAL, "Unknown protocol %s\n", from);
+ endprotoent();
+ return -1;
+ }
+ ulogd_log(ULOGD_NOTICE, "adding proto to filter: \"%s (%d)\"\n",
+ pent->p_name, pent->p_proto
+ );
+ nfct_filter_add_attr_u32(filter, NFCT_FILTER_L4PROTO,
+ pent->p_proto);
+
+
+ endprotoent();
+ return 0;
+}
+
+
+static int build_nfct_filter(struct ulogd_pluginstance *upi)
+{
+ struct nfct_pluginstance *cpi =
+ (struct nfct_pluginstance *)upi->private;
+ struct nfct_filter *filter = NULL;
+
+ if (!cpi->cth) {
+ ulogd_log(ULOGD_FATAL, "Refusing to attach NFCT filter to NULL handler\n");
+ goto err_init;
+ }
+
+ filter = nfct_filter_create();
+ if (!filter) {
+ ulogd_log(ULOGD_FATAL, "error creating NFCT filter\n");
+ goto err_init;
+ }
+
+ if (strlen(src_filter_ce(upi->config_kset).u.string) != 0) {
+ char *filter_string = src_filter_ce(upi->config_kset).u.string;
+ if (build_nfct_filter_dir(filter, filter_string, NFCT_SRC_DIR) != 0) {
+ ulogd_log(ULOGD_FATAL,
+ "Unable to create src filter\n");
+ goto err_filter;
+ }
+ }
+ if (strlen(dst_filter_ce(upi->config_kset).u.string) != 0) {
+ char *filter_string = dst_filter_ce(upi->config_kset).u.string;
+ if (build_nfct_filter_dir(filter, filter_string, NFCT_DST_DIR) != 0) {
+ ulogd_log(ULOGD_FATAL,
+ "Unable to create dst filter\n");
+ goto err_filter;
+ }
+ }
+ if (strlen(proto_filter_ce(upi->config_kset).u.string) != 0) {
+ char *filter_string = proto_filter_ce(upi->config_kset).u.string;
+ if (build_nfct_filter_proto(filter, filter_string) != 0) {
+ ulogd_log(ULOGD_FATAL,
+ "Unable to create proto filter\n");
+ goto err_filter;
+ }
+ }
+
+ if (filter) {
+ if (nfct_filter_attach(nfct_fd(cpi->cth), filter) == -1) {
+ ulogd_log(ULOGD_FATAL, "nfct_filter_attach");
+ }
+
+ /* release the filter object, this does not detach the filter */
+ nfct_filter_destroy(filter);
+ }
+
+ return 0;
+
+err_filter:
+ nfct_filter_destroy(filter);
+err_init:
+ return -1;
+}
+
static int constructor_nfct_events(struct ulogd_pluginstance *upi)
{
struct nfct_pluginstance *cpi =
(struct nfct_pluginstance *)upi->private;
+
cpi->cth = nfct_open(NFNL_SUBSYS_CTNETLINK,
eventmask_ce(upi->config_kset).u.value);
if (!cpi->cth) {
@@ -1005,9 +1262,20 @@
goto err_cth;
}
+ if ((strlen(src_filter_ce(upi->config_kset).u.string) != 0) ||
+ (strlen(dst_filter_ce(upi->config_kset).u.string) != 0) ||
+ (strlen(proto_filter_ce(upi->config_kset).u.string) != 0)
+ ) {
+ if (build_nfct_filter(upi) != 0) {
+ ulogd_log(ULOGD_FATAL, "error creating NFCT filter\n");
+ goto err_cth;
+ }
+ }
+
+
if (usehash_ce(upi->config_kset).u.value != 0) {
nfct_callback_register(cpi->cth, NFCT_T_ALL,
- &event_handler_hashtable, upi);
+ &event_handler_hashtable, upi);
} else {
nfct_callback_register(cpi->cth, NFCT_T_ALL,
&event_handler_no_hashtable, upi);
@@ -1063,7 +1331,7 @@
ulogd_log(ULOGD_FATAL, "error opening ctnetlink\n");
goto err_ovh;
}
- nfct_callback_register(cpi->cth, NFCT_T_ALL,
+ nfct_callback_register(h, NFCT_T_ALL,
&event_handler_hashtable, upi);
nfct_query(h, NFCT_Q_DUMP, &family);
nfct_close(h);
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/input/packet/Makefile.am
^
|
@@ -1,13 +1,14 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNETFILTER_LOG_CFLAGS}
AM_CFLAGS = ${regular_CFLAGS}
-pkglib_LTLIBRARIES = ulogd_inppkt_NFLOG.la ulogd_inppkt_ULOG.la \
- ulogd_inppkt_UNIXSOCK.la
+pkglib_LTLIBRARIES = ulogd_inppkt_ULOG.la ulogd_inppkt_UNIXSOCK.la
+if BUILD_NFLOG
+pkglib_LTLIBRARIES += ulogd_inppkt_NFLOG.la
+endif
ulogd_inppkt_NFLOG_la_SOURCES = ulogd_inppkt_NFLOG.c
ulogd_inppkt_NFLOG_la_LDFLAGS = -avoid-version -module $(LIBNETFILTER_LOG_LIBS)
-ulogd_inppkt_NFLOG_la_CFLAGS = $(AM_CFLAGS) $(LIBNETFILTER_LOG_CFLAGS)
ulogd_inppkt_ULOG_la_SOURCES = ulogd_inppkt_ULOG.c
ulogd_inppkt_ULOG_la_LDFLAGS = -avoid-version -module
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/input/packet/Makefile.in
^
|
@@ -51,6 +51,7 @@
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+@BUILD_NFLOG_TRUE@am__append_1 = ulogd_inppkt_NFLOG.la
subdir = input/packet
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -94,16 +95,16 @@
am__installdirs = "$(DESTDIR)$(pkglibdir)"
LTLIBRARIES = $(pkglib_LTLIBRARIES)
ulogd_inppkt_NFLOG_la_LIBADD =
-am_ulogd_inppkt_NFLOG_la_OBJECTS = \
- ulogd_inppkt_NFLOG_la-ulogd_inppkt_NFLOG.lo
+am_ulogd_inppkt_NFLOG_la_OBJECTS = ulogd_inppkt_NFLOG.lo
ulogd_inppkt_NFLOG_la_OBJECTS = $(am_ulogd_inppkt_NFLOG_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
ulogd_inppkt_NFLOG_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(ulogd_inppkt_NFLOG_la_CFLAGS) $(CFLAGS) \
- $(ulogd_inppkt_NFLOG_la_LDFLAGS) $(LDFLAGS) -o $@
+ $(AM_CFLAGS) $(CFLAGS) $(ulogd_inppkt_NFLOG_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
+@BUILD_NFLOG_TRUE@am_ulogd_inppkt_NFLOG_la_rpath = -rpath $(pkglibdir)
ulogd_inppkt_ULOG_la_DEPENDENCIES = ../../libipulog/libipulog.la
am_ulogd_inppkt_ULOG_la_OBJECTS = ulogd_inppkt_ULOG.lo
ulogd_inppkt_ULOG_la_OBJECTS = $(am_ulogd_inppkt_ULOG_la_OBJECTS)
@@ -298,14 +299,12 @@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNETFILTER_LOG_CFLAGS}
AM_CFLAGS = ${regular_CFLAGS}
-pkglib_LTLIBRARIES = ulogd_inppkt_NFLOG.la ulogd_inppkt_ULOG.la \
- ulogd_inppkt_UNIXSOCK.la
-
+pkglib_LTLIBRARIES = ulogd_inppkt_ULOG.la ulogd_inppkt_UNIXSOCK.la \
+ $(am__append_1)
ulogd_inppkt_NFLOG_la_SOURCES = ulogd_inppkt_NFLOG.c
ulogd_inppkt_NFLOG_la_LDFLAGS = -avoid-version -module $(LIBNETFILTER_LOG_LIBS)
-ulogd_inppkt_NFLOG_la_CFLAGS = $(AM_CFLAGS) $(LIBNETFILTER_LOG_CFLAGS)
ulogd_inppkt_ULOG_la_SOURCES = ulogd_inppkt_ULOG.c
ulogd_inppkt_ULOG_la_LDFLAGS = -avoid-version -module
ulogd_inppkt_ULOG_la_LIBADD = ../../libipulog/libipulog.la
@@ -378,7 +377,7 @@
rm -f "$${dir}/so_locations"; \
done
ulogd_inppkt_NFLOG.la: $(ulogd_inppkt_NFLOG_la_OBJECTS) $(ulogd_inppkt_NFLOG_la_DEPENDENCIES) $(EXTRA_ulogd_inppkt_NFLOG_la_DEPENDENCIES)
- $(AM_V_CCLD)$(ulogd_inppkt_NFLOG_la_LINK) -rpath $(pkglibdir) $(ulogd_inppkt_NFLOG_la_OBJECTS) $(ulogd_inppkt_NFLOG_la_LIBADD) $(LIBS)
+ $(AM_V_CCLD)$(ulogd_inppkt_NFLOG_la_LINK) $(am_ulogd_inppkt_NFLOG_la_rpath) $(ulogd_inppkt_NFLOG_la_OBJECTS) $(ulogd_inppkt_NFLOG_la_LIBADD) $(LIBS)
ulogd_inppkt_ULOG.la: $(ulogd_inppkt_ULOG_la_OBJECTS) $(ulogd_inppkt_ULOG_la_DEPENDENCIES) $(EXTRA_ulogd_inppkt_ULOG_la_DEPENDENCIES)
$(AM_V_CCLD)$(ulogd_inppkt_ULOG_la_LINK) -rpath $(pkglibdir) $(ulogd_inppkt_ULOG_la_OBJECTS) $(ulogd_inppkt_ULOG_la_LIBADD) $(LIBS)
ulogd_inppkt_UNIXSOCK.la: $(ulogd_inppkt_UNIXSOCK_la_OBJECTS) $(ulogd_inppkt_UNIXSOCK_la_DEPENDENCIES) $(EXTRA_ulogd_inppkt_UNIXSOCK_la_DEPENDENCIES)
@@ -390,7 +389,7 @@
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulogd_inppkt_NFLOG_la-ulogd_inppkt_NFLOG.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulogd_inppkt_NFLOG.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulogd_inppkt_ULOG.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulogd_inppkt_UNIXSOCK.Plo@am__quote@
@@ -415,13 +414,6 @@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-ulogd_inppkt_NFLOG_la-ulogd_inppkt_NFLOG.lo: ulogd_inppkt_NFLOG.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ulogd_inppkt_NFLOG_la_CFLAGS) $(CFLAGS) -MT ulogd_inppkt_NFLOG_la-ulogd_inppkt_NFLOG.lo -MD -MP -MF $(DEPDIR)/ulogd_inppkt_NFLOG_la-ulogd_inppkt_NFLOG.Tpo -c -o ulogd_inppkt_NFLOG_la-ulogd_inppkt_NFLOG.lo `test -f 'ulogd_inppkt_NFLOG.c' || echo '$(srcdir)/'`ulogd_inppkt_NFLOG.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ulogd_inppkt_NFLOG_la-ulogd_inppkt_NFLOG.Tpo $(DEPDIR)/ulogd_inppkt_NFLOG_la-ulogd_inppkt_NFLOG.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ulogd_inppkt_NFLOG.c' object='ulogd_inppkt_NFLOG_la-ulogd_inppkt_NFLOG.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ulogd_inppkt_NFLOG_la_CFLAGS) $(CFLAGS) -c -o ulogd_inppkt_NFLOG_la-ulogd_inppkt_NFLOG.lo `test -f 'ulogd_inppkt_NFLOG.c' || echo '$(srcdir)/'`ulogd_inppkt_NFLOG.c
-
mostlyclean-libtool:
-rm -f *.lo
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/input/packet/ulogd_inppkt_NFLOG.c
^
|
@@ -339,7 +339,6 @@
label_ce(upi->config_kset).u.value);
if (ph) {
- /* FIXME */
okey_set_u8(&ret[NFLOG_KEY_OOB_HOOK], ph->hook);
okey_set_u16(&ret[NFLOG_KEY_OOB_PROTOCOL],
ntohs(ph->hw_protocol));
@@ -376,7 +375,6 @@
if (! (nflog_get_timestamp(ldata, &ts) == 0 && ts.tv_sec))
gettimeofday(&ts, NULL);
- /* FIXME: convert endianness */
okey_set_u32(&ret[NFLOG_KEY_OOB_TIME_SEC], ts.tv_sec & 0xffffffff);
okey_set_u32(&ret[NFLOG_KEY_OOB_TIME_USEC], ts.tv_usec & 0xffffffff);
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/input/sum/Makefile.am
^
|
@@ -1,8 +1,8 @@
AM_CPPFLAGS = -I$(top_srcdir)/include $(LIBNETFILTER_ACCT_CFLAGS) $(LIBMNL_CFLAGS)
AM_CFLAGS = ${regular_CFLAGS}
-
+if BUILD_NFACCT
pkglib_LTLIBRARIES = ulogd_inpflow_NFACCT.la
-
ulogd_inpflow_NFACCT_la_SOURCES = ulogd_inpflow_NFACCT.c
ulogd_inpflow_NFACCT_la_LDFLAGS = -avoid-version -module
ulogd_inpflow_NFACCT_la_LIBADD = $(LIBMNL_LIBS) $(LIBNETFILTER_ACCT_LIBS)
+endif
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/input/sum/Makefile.in
^
|
@@ -94,9 +94,11 @@
am__installdirs = "$(DESTDIR)$(pkglibdir)"
LTLIBRARIES = $(pkglib_LTLIBRARIES)
am__DEPENDENCIES_1 =
-ulogd_inpflow_NFACCT_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
-am_ulogd_inpflow_NFACCT_la_OBJECTS = ulogd_inpflow_NFACCT.lo
+@BUILD_NFACCT_TRUE@ulogd_inpflow_NFACCT_la_DEPENDENCIES = \
+@BUILD_NFACCT_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am__ulogd_inpflow_NFACCT_la_SOURCES_DIST = ulogd_inpflow_NFACCT.c
+@BUILD_NFACCT_TRUE@am_ulogd_inpflow_NFACCT_la_OBJECTS = \
+@BUILD_NFACCT_TRUE@ ulogd_inpflow_NFACCT.lo
ulogd_inpflow_NFACCT_la_OBJECTS = \
$(am_ulogd_inpflow_NFACCT_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
@@ -106,6 +108,8 @@
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(AM_CFLAGS) $(CFLAGS) $(ulogd_inpflow_NFACCT_la_LDFLAGS) \
$(LDFLAGS) -o $@
+@BUILD_NFACCT_TRUE@am_ulogd_inpflow_NFACCT_la_rpath = -rpath \
+@BUILD_NFACCT_TRUE@ $(pkglibdir)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
@@ -133,7 +137,7 @@
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(ulogd_inpflow_NFACCT_la_SOURCES)
-DIST_SOURCES = $(ulogd_inpflow_NFACCT_la_SOURCES)
+DIST_SOURCES = $(am__ulogd_inpflow_NFACCT_la_SOURCES_DIST)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -283,10 +287,10 @@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I$(top_srcdir)/include $(LIBNETFILTER_ACCT_CFLAGS) $(LIBMNL_CFLAGS)
AM_CFLAGS = ${regular_CFLAGS}
-pkglib_LTLIBRARIES = ulogd_inpflow_NFACCT.la
-ulogd_inpflow_NFACCT_la_SOURCES = ulogd_inpflow_NFACCT.c
-ulogd_inpflow_NFACCT_la_LDFLAGS = -avoid-version -module
-ulogd_inpflow_NFACCT_la_LIBADD = $(LIBMNL_LIBS) $(LIBNETFILTER_ACCT_LIBS)
+@BUILD_NFACCT_TRUE@pkglib_LTLIBRARIES = ulogd_inpflow_NFACCT.la
+@BUILD_NFACCT_TRUE@ulogd_inpflow_NFACCT_la_SOURCES = ulogd_inpflow_NFACCT.c
+@BUILD_NFACCT_TRUE@ulogd_inpflow_NFACCT_la_LDFLAGS = -avoid-version -module
+@BUILD_NFACCT_TRUE@ulogd_inpflow_NFACCT_la_LIBADD = $(LIBMNL_LIBS) $(LIBNETFILTER_ACCT_LIBS)
all: all-am
.SUFFIXES:
@@ -354,7 +358,7 @@
rm -f "$${dir}/so_locations"; \
done
ulogd_inpflow_NFACCT.la: $(ulogd_inpflow_NFACCT_la_OBJECTS) $(ulogd_inpflow_NFACCT_la_DEPENDENCIES) $(EXTRA_ulogd_inpflow_NFACCT_la_DEPENDENCIES)
- $(AM_V_CCLD)$(ulogd_inpflow_NFACCT_la_LINK) -rpath $(pkglibdir) $(ulogd_inpflow_NFACCT_la_OBJECTS) $(ulogd_inpflow_NFACCT_la_LIBADD) $(LIBS)
+ $(AM_V_CCLD)$(ulogd_inpflow_NFACCT_la_LINK) $(am_ulogd_inpflow_NFACCT_la_rpath) $(ulogd_inpflow_NFACCT_la_OBJECTS) $(ulogd_inpflow_NFACCT_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/libipulog/libipulog.c
^
|
@@ -1,5 +1,5 @@
-/*
- * libipulog.c, $Revision$
+/*
+ * libipulog.c
*
* netfilter ULOG userspace library.
*
@@ -21,7 +21,6 @@
* This library is still under development, so be aware of sudden interface
* changes
*
- * $Id$
*/
#include <stdlib.h>
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/output/Makefile.am
^
|
@@ -1,12 +1,13 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = ${regular_CFLAGS} ${LIBNETFILTER_LOG_CFLAGS} \
- ${LIBNETFILTER_CONNTRACK_CFLAGS}
+AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNETFILTER_ACCT_CFLAGS} \
+ ${LIBNETFILTER_CONNTRACK_CFLAGS} ${LIBNETFILTER_LOG_CFLAGS}
+AM_CFLAGS = ${regular_CFLAGS}
SUBDIRS= pcap mysql pgsql sqlite3 dbi
pkglib_LTLIBRARIES = ulogd_output_LOGEMU.la ulogd_output_SYSLOG.la \
ulogd_output_OPRINT.la ulogd_output_GPRINT.la \
- ulogd_output_NACCT.la ulogd_output_XML.la
+ ulogd_output_NACCT.la ulogd_output_XML.la \
+ ulogd_output_GRAPHITE.la
ulogd_output_GPRINT_la_SOURCES = ulogd_output_GPRINT.c
ulogd_output_GPRINT_la_LDFLAGS = -avoid-version -module
@@ -28,3 +29,6 @@
${LIBNETFILTER_CONNTRACK_LIBS} \
${LIBNETFILTER_ACCT_LIBS}
ulogd_output_XML_la_LDFLAGS = -avoid-version -module
+
+ulogd_output_GRAPHITE_la_SOURCES = ulogd_output_GRAPHITE.c
+ulogd_output_GRAPHITE_la_LDFLAGS = -avoid-version -module
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/output/Makefile.in
^
|
@@ -103,6 +103,14 @@
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(AM_CFLAGS) $(CFLAGS) $(ulogd_output_GPRINT_la_LDFLAGS) \
$(LDFLAGS) -o $@
+ulogd_output_GRAPHITE_la_LIBADD =
+am_ulogd_output_GRAPHITE_la_OBJECTS = ulogd_output_GRAPHITE.lo
+ulogd_output_GRAPHITE_la_OBJECTS = \
+ $(am_ulogd_output_GRAPHITE_la_OBJECTS)
+ulogd_output_GRAPHITE_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(ulogd_output_GRAPHITE_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
ulogd_output_LOGEMU_la_LIBADD =
am_ulogd_output_LOGEMU_la_OBJECTS = ulogd_output_LOGEMU.lo
ulogd_output_LOGEMU_la_OBJECTS = $(am_ulogd_output_LOGEMU_la_OBJECTS)
@@ -167,12 +175,14 @@
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(ulogd_output_GPRINT_la_SOURCES) \
+ $(ulogd_output_GRAPHITE_la_SOURCES) \
$(ulogd_output_LOGEMU_la_SOURCES) \
$(ulogd_output_NACCT_la_SOURCES) \
$(ulogd_output_OPRINT_la_SOURCES) \
$(ulogd_output_SYSLOG_la_SOURCES) \
$(ulogd_output_XML_la_SOURCES)
DIST_SOURCES = $(ulogd_output_GPRINT_la_SOURCES) \
+ $(ulogd_output_GRAPHITE_la_SOURCES) \
$(ulogd_output_LOGEMU_la_SOURCES) \
$(ulogd_output_NACCT_la_SOURCES) \
$(ulogd_output_OPRINT_la_SOURCES) \
@@ -363,14 +373,15 @@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = ${regular_CFLAGS} ${LIBNETFILTER_LOG_CFLAGS} \
- ${LIBNETFILTER_CONNTRACK_CFLAGS}
+AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNETFILTER_ACCT_CFLAGS} \
+ ${LIBNETFILTER_CONNTRACK_CFLAGS} ${LIBNETFILTER_LOG_CFLAGS}
+AM_CFLAGS = ${regular_CFLAGS}
SUBDIRS = pcap mysql pgsql sqlite3 dbi
pkglib_LTLIBRARIES = ulogd_output_LOGEMU.la ulogd_output_SYSLOG.la \
ulogd_output_OPRINT.la ulogd_output_GPRINT.la \
- ulogd_output_NACCT.la ulogd_output_XML.la
+ ulogd_output_NACCT.la ulogd_output_XML.la \
+ ulogd_output_GRAPHITE.la
ulogd_output_GPRINT_la_SOURCES = ulogd_output_GPRINT.c
ulogd_output_GPRINT_la_LDFLAGS = -avoid-version -module
@@ -388,6 +399,8 @@
${LIBNETFILTER_ACCT_LIBS}
ulogd_output_XML_la_LDFLAGS = -avoid-version -module
+ulogd_output_GRAPHITE_la_SOURCES = ulogd_output_GRAPHITE.c
+ulogd_output_GRAPHITE_la_LDFLAGS = -avoid-version -module
all: all-recursive
.SUFFIXES:
@@ -456,6 +469,8 @@
done
ulogd_output_GPRINT.la: $(ulogd_output_GPRINT_la_OBJECTS) $(ulogd_output_GPRINT_la_DEPENDENCIES) $(EXTRA_ulogd_output_GPRINT_la_DEPENDENCIES)
$(AM_V_CCLD)$(ulogd_output_GPRINT_la_LINK) -rpath $(pkglibdir) $(ulogd_output_GPRINT_la_OBJECTS) $(ulogd_output_GPRINT_la_LIBADD) $(LIBS)
+ulogd_output_GRAPHITE.la: $(ulogd_output_GRAPHITE_la_OBJECTS) $(ulogd_output_GRAPHITE_la_DEPENDENCIES) $(EXTRA_ulogd_output_GRAPHITE_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(ulogd_output_GRAPHITE_la_LINK) -rpath $(pkglibdir) $(ulogd_output_GRAPHITE_la_OBJECTS) $(ulogd_output_GRAPHITE_la_LIBADD) $(LIBS)
ulogd_output_LOGEMU.la: $(ulogd_output_LOGEMU_la_OBJECTS) $(ulogd_output_LOGEMU_la_DEPENDENCIES) $(EXTRA_ulogd_output_LOGEMU_la_DEPENDENCIES)
$(AM_V_CCLD)$(ulogd_output_LOGEMU_la_LINK) -rpath $(pkglibdir) $(ulogd_output_LOGEMU_la_OBJECTS) $(ulogd_output_LOGEMU_la_LIBADD) $(LIBS)
ulogd_output_NACCT.la: $(ulogd_output_NACCT_la_OBJECTS) $(ulogd_output_NACCT_la_DEPENDENCIES) $(EXTRA_ulogd_output_NACCT_la_DEPENDENCIES)
@@ -474,6 +489,7 @@
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulogd_output_GPRINT.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulogd_output_GRAPHITE.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulogd_output_LOGEMU.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulogd_output_NACCT.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulogd_output_OPRINT.Plo@am__quote@
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/output/mysql/ulogd_output_MYSQL.c
^
|
@@ -16,8 +16,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * $Id$
*
* 15 May 2001, Alex Janssen <alex@ynfonatic.de>:
* Added a compability option for older MySQL-servers, which
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/output/pcap/ulogd_output_PCAP.c
^
|
@@ -17,8 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id$
- *
*/
#include <stdio.h>
@@ -139,7 +137,7 @@
.name = "oob.family" },
{ .type = ULOGD_RET_UINT16,
.flags = ULOGD_RETF_NONE,
- .name = "ip6.payload_len" },
+ .name = "ip6.payloadlen" },
};
#define GET_FLAGS(res, x) (res[x].u.source->flags)
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/output/pgsql/ulogd_output_PGSQL.c
^
|
@@ -105,9 +105,16 @@
}
if (PQresultStatus(pi->pgres) == PGRES_TUPLES_OK) {
- ulogd_log(ULOGD_DEBUG, "using schema %s\n",
- schema_ce(upi->config_kset).u.string);
- pi->db_inst.schema = schema_ce(upi->config_kset).u.string;
+ if (PQntuples(pi->pgres)) {
+ ulogd_log(ULOGD_DEBUG, "using schema %s\n",
+ schema_ce(upi->config_kset).u.string);
+ pi->db_inst.schema = schema_ce(upi->config_kset).u.string;
+ } else {
+ ulogd_log(ULOGD_ERROR, "schema %s not found: %s\n",
+ schema_ce(upi->config_kset).u.string, PQerrorMessage(pi->dbh));
+ PQclear(pi->pgres);
+ return -1;
+ }
} else {
pi->db_inst.schema = NULL;
}
@@ -223,6 +230,8 @@
char *user = user_ce(upi->config_kset).u.string;
char *pass = pass_ce(upi->config_kset).u.string;
char *db = db_ce(upi->config_kset).u.string;
+ char *schema = NULL;
+ char pgbuf[128];
/* 80 is more than what we need for the fixed parts below */
len = 80 + strlen(user) + strlen(db);
@@ -270,11 +279,29 @@
}
if (pgsql_namespace(upi)) {
- ulogd_log(ULOGD_ERROR, "unable to test for pgsql schemas\n");
+ ulogd_log(ULOGD_ERROR, "problem testing for pgsql schemas\n");
close_db_pgsql(upi);
return -1;
}
+ pi=(struct pgsql_instance *)upi->private;
+ schema = pi->db_inst.schema;
+
+ if (!(schema == NULL) && (strcmp(schema,"public"))) {
+ snprintf(pgbuf, 128, "SET search_path='%.63s', \"$user\", 'public'", schema);
+ pi->pgres = PQexec(pi->dbh, pgbuf);
+ if ((PQresultStatus(pi->pgres) == PGRES_COMMAND_OK)) {
+ PQclear(pi->pgres);
+ } else {
+ ulogd_log(ULOGD_ERROR, "could not set search path to (%s): %s\n",
+ schema, PQerrorMessage(pi->dbh));
+ PQclear(pi->pgres);
+ close_db_pgsql(upi);
+ return -1;
+ }
+
+ }
+
return 0;
}
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/output/sqlite3/Makefile.am
^
|
@@ -1,5 +1,5 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = ${regular_CFLAGS} ${libsqlite3_CFLAGS}
+AM_CPPFLAGS = -I$(top_srcdir)/include ${libsqlite3_CFLAGS}
+AM_CFLAGS = ${regular_CFLAGS}
if HAVE_SQLITE3
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/output/sqlite3/Makefile.in
^
|
@@ -286,8 +286,8 @@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = ${regular_CFLAGS} ${libsqlite3_CFLAGS}
+AM_CPPFLAGS = -I$(top_srcdir)/include ${libsqlite3_CFLAGS}
+AM_CFLAGS = ${regular_CFLAGS}
@HAVE_SQLITE3_TRUE@pkglib_LTLIBRARIES = ulogd_output_SQLITE3.la
@HAVE_SQLITE3_TRUE@ulogd_output_SQLITE3_la_SOURCES = ulogd_output_SQLITE3.c ../../util/db.c
@HAVE_SQLITE3_TRUE@ulogd_output_SQLITE3_la_LIBADD = ${libsqlite3_LIBS}
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/output/ulogd_output_GPRINT.c
^
|
@@ -26,6 +26,7 @@
#include <string.h>
#include <time.h>
#include <errno.h>
+#include <inttypes.h>
#include <ulogd/ulogd.h>
#include <ulogd/conffile.h>
@@ -148,7 +149,7 @@
rem -= ret;
size += ret;
- ret = snprintf(buf+size, rem, "%lu,",
+ ret = snprintf(buf+size, rem, "%" PRIu64 ",",
key->u.value.ui64);
if (ret < 0)
break;
|
[-]
[+]
|
Added |
ulogd-2.0.2.tar.bz2/output/ulogd_output_GRAPHITE.c
^
|
@@ -0,0 +1,246 @@
+/* ulogd_GRAPHITE.c
+ *
+ * ulogd output target to feed data to a graphite system
+ *
+ * (C) 2012 by Eric Leblond <eric@regit.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <inttypes.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <ulogd/ulogd.h>
+#include <ulogd/conffile.h>
+
+
+enum {
+ KEY_SUM_NAME,
+ KEY_SUM_PKTS,
+ KEY_SUM_BYTES,
+ KEY_OOB_TIME_SEC,
+};
+
+
+static struct ulogd_key graphite_inp[] = {
+ [KEY_SUM_NAME] = {
+ .type = ULOGD_RET_STRING,
+ .name = "sum.name",
+ },
+ [KEY_SUM_PKTS] = {
+ .type = ULOGD_RET_UINT64,
+ .name = "sum.pkts",
+ },
+ [KEY_SUM_BYTES] = {
+ .type = ULOGD_RET_UINT64,
+ .name = "sum.bytes",
+ },
+ [KEY_OOB_TIME_SEC] = {
+ .type = ULOGD_RET_UINT32,
+ .name = "oob.time.sec",
+ },
+};
+
+
+static struct config_keyset graphite_kset = {
+ .num_ces = 3,
+ .ces = {
+ {
+ .key = "host",
+ .type = CONFIG_TYPE_STRING,
+ .options = CONFIG_OPT_NONE,
+ },
+ {
+ .key = "port",
+ .type = CONFIG_TYPE_STRING,
+ .options = CONFIG_OPT_NONE,
+ },
+ {
+ .key = "prefix",
+ .type = CONFIG_TYPE_STRING,
+ .options = CONFIG_OPT_NONE,
+ },
+ },
+};
+
+#define host_ce(x) (x->ces[0])
+#define port_ce(x) (x->ces[1])
+#define prefix_ce(x) (x->ces[2])
+
+struct graphite_instance {
+ int sck;
+};
+
+static int _connect_graphite(struct ulogd_pluginstance *pi)
+{
+ struct graphite_instance *li = (struct graphite_instance *) &pi->private;
+ char *host;
+ char * port;
+ struct addrinfo hints;
+ struct addrinfo *result, *rp;
+ int sfd, s;
+
+ ulogd_log(ULOGD_DEBUG, "connecting to graphite\n");
+
+ memset(&hints, 0, sizeof(struct addrinfo));
+ hints.ai_family = AF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = 0;
+ hints.ai_protocol = 0;
+
+ host = host_ce(pi->config_kset).u.string;
+ port = port_ce(pi->config_kset).u.string;
+ s = getaddrinfo(host, port, &hints, &result);
+ if (s != 0) {
+ ulogd_log(ULOGD_ERROR, "getaddrinfo: %s\n", gai_strerror(s));
+ return -1;
+ }
+
+ for (rp = result; rp != NULL; rp = rp->ai_next) {
+ int on = 1;
+
+ sfd = socket(rp->ai_family, rp->ai_socktype,
+ rp->ai_protocol);
+ if (sfd == -1)
+ continue;
+
+ setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR,
+ (char *) &on, sizeof(on));
+
+ if (connect(sfd, rp->ai_addr, rp->ai_addrlen) != -1)
+ break;
+
+ close(sfd);
+ }
+
+ freeaddrinfo(result);
+
+ if (rp == NULL) {
+ ulogd_log(ULOGD_ERROR, "Could not connect\n");
+ return -1;
+ }
+
+ li->sck = sfd;
+
+ return 0;
+}
+
+static int _output_graphite(struct ulogd_pluginstance *upi)
+{
+ struct graphite_instance *li = (struct graphite_instance *) &upi->private;
+ struct ulogd_key *inp = upi->input.keys;
+ static char buf[256];
+ int ret;
+
+ time_t now;
+ int msg_size = 0;
+
+ if (ikey_get_u32(&inp[KEY_OOB_TIME_SEC]))
+ now = (time_t) ikey_get_u32(&inp[KEY_OOB_TIME_SEC]);
+ else
+ now = time(NULL);
+
+ msg_size = snprintf(buf, sizeof(buf), "%s.%s.pkts %" PRIu64
+ " %" PRIu64 "\n%s.%s.bytes %" PRIu64 " %" PRIu64 "\n",
+ prefix_ce(upi->config_kset).u.string,
+ (char *)ikey_get_ptr(&inp[KEY_SUM_NAME]),
+ ikey_get_u64(&inp[KEY_SUM_PKTS]),
+ (uint64_t) now,
+ prefix_ce(upi->config_kset).u.string,
+ (char *)ikey_get_ptr(&inp[KEY_SUM_NAME]),
+ ikey_get_u64(&inp[KEY_SUM_BYTES]),
+ (uint64_t) now
+ );
+ if (msg_size == -1) {
+ ulogd_log(ULOGD_ERROR, "Could not create message\n");
+ return ULOGD_IRET_ERR;
+ }
+ ret = send(li->sck, buf, msg_size, MSG_NOSIGNAL);
+ if (ret != msg_size) {
+ ulogd_log(ULOGD_ERROR, "Failure sending message\n");
+ if (ret == -1) {
+ return _connect_graphite(upi);
+ }
+ }
+
+ return ULOGD_IRET_OK;
+}
+
+static int start_graphite(struct ulogd_pluginstance *pi)
+{
+ char *host;
+ char *port;
+
+ ulogd_log(ULOGD_DEBUG, "starting graphite\n");
+
+ host = host_ce(pi->config_kset).u.string;
+ if (host == NULL)
+ return -1;
+ port = port_ce(pi->config_kset).u.string;
+ if (port == NULL)
+ return -1;
+ return _connect_graphite(pi);
+}
+
+static int fini_graphite(struct ulogd_pluginstance *pi) {
+ struct graphite_instance *li = (struct graphite_instance *) &pi->private;
+
+ close(li->sck);
+ li->sck = 0;
+
+ return 0;
+}
+
+static int configure_graphite(struct ulogd_pluginstance *pi,
+ struct ulogd_pluginstance_stack *stack)
+{
+ ulogd_log(ULOGD_DEBUG, "parsing config file section %s\n", pi->id);
+ return config_parse_file(pi->id, pi->config_kset);
+}
+
+static struct ulogd_plugin graphite_plugin = {
+ .name = "GRAPHITE",
+ .input = {
+ .keys = graphite_inp,
+ .num_keys = ARRAY_SIZE(graphite_inp),
+ .type = ULOGD_DTYPE_SUM,
+ },
+ .output = {
+ .type = ULOGD_DTYPE_SINK,
+ },
+ .config_kset = &graphite_kset,
+ .priv_size = sizeof(struct graphite_instance),
+
+ .configure = &configure_graphite,
+ .start = &start_graphite,
+ .stop = &fini_graphite,
+
+ .interp = &_output_graphite,
+ .version = VERSION,
+};
+
+void __attribute__ ((constructor)) init(void);
+
+void init(void)
+{
+ ulogd_register_plugin(&graphite_plugin);
+}
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/output/ulogd_output_LOGEMU.c
^
|
@@ -1,4 +1,4 @@
-/* ulogd_LOGEMU.c, Version $Revision$
+/* ulogd_LOGEMU.c
*
* ulogd output target for syslog logging emulation
*
@@ -20,8 +20,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id$
- *
*/
#include <limits.h>
#include <stdio.h>
@@ -179,11 +177,8 @@
static int configure_logemu(struct ulogd_pluginstance *pi,
struct ulogd_pluginstance_stack *stack)
{
- /* FIXME: error handling */
ulogd_log(ULOGD_DEBUG, "parsing config file section %s\n", pi->id);
- config_parse_file(pi->id, pi->config_kset);
-
- return 0;
+ return config_parse_file(pi->id, pi->config_kset);
}
static struct ulogd_plugin logemu_plugin = {
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/output/ulogd_output_OPRINT.c
^
|
@@ -1,4 +1,4 @@
-/* ulogd_MAC.c, Version $Revision$
+/* ulogd_OPRINT.C
*
* ulogd output target for logging to a file
*
@@ -17,14 +17,13 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id$
- *
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
+#include <inttypes.h>
#include <ulogd/ulogd.h>
#include <ulogd/conffile.h>
@@ -82,7 +81,7 @@
fprintf(opi->of, "%u\n", ret->u.value.ui32);
break;
case ULOGD_RET_UINT64:
- fprintf(opi->of, "%lu\n", ret->u.value.ui64);
+ fprintf(opi->of, "%" PRIu64 "\n", ret->u.value.ui64);
break;
case ULOGD_RET_IPADDR:
fprintf(opi->of, "%u.%u.%u.%u\n",
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/output/ulogd_output_SYSLOG.c
^
|
@@ -19,8 +19,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id$
- *
*/
#include <stdio.h>
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/output/ulogd_output_XML.c
^
|
@@ -18,9 +18,18 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <libnetfilter_conntrack/libnetfilter_conntrack.h>
+#include <sys/types.h>
+#include <inttypes.h>
+#include "../config.h"
+#ifdef BUILD_NFLOG
#include <libnetfilter_log/libnetfilter_log.h>
+#endif
+#ifdef BUILD_NFCT
+#include <libnetfilter_conntrack/libnetfilter_conntrack.h>
+#endif
+#ifdef BUILD_NFACCT
#include <libnetfilter_acct/libnetfilter_acct.h>
+#endif
#include <ulogd/ulogd.h>
#include <sys/param.h>
#include <time.h>
@@ -91,6 +100,7 @@
static int
xml_output_flow(struct ulogd_key *inp, char *buf, ssize_t size)
{
+#ifdef BUILD_NFCT
struct nf_conntrack *ct = ikey_get_ptr(&inp[KEY_CT]);
int tmp;
@@ -100,11 +110,15 @@
return -1;
return 0;
+#else
+ return -1;
+#endif
}
static int
xml_output_packet(struct ulogd_key *inp, char *buf, ssize_t size)
{
+#ifdef BUILD_NFLOG
struct nflog_data *ldata = ikey_get_ptr(&inp[KEY_PCKT]);
int tmp;
@@ -113,11 +127,15 @@
return -1;
return 0;
+#else
+ return -1;
+#endif
}
static int
xml_output_sum(struct ulogd_key *inp, char *buf, ssize_t size)
{
+#ifdef BUILD_NFACCT
struct nfacct *nfacct = ikey_get_ptr(&inp[KEY_SUM]);
int tmp;
@@ -125,10 +143,13 @@
NFACCT_SNPRINTF_F_TIME);
if (tmp < 0 || tmp >= size)
return -1;
-
return 0;
+#else
+ return -1;
+#endif
}
+
static int xml_output(struct ulogd_pluginstance *upi)
{
struct ulogd_key *inp = upi->input.keys;
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/src/Makefile.am
^
|
@@ -6,6 +6,6 @@
sbin_PROGRAMS = ulogd
-ulogd_SOURCES = ulogd.c select.c timer.c rbtree.c conffile.c hash.c
+ulogd_SOURCES = ulogd.c select.c timer.c rbtree.c conffile.c hash.c addr.c
ulogd_LDADD = ${libdl_LIBS}
ulogd_LDFLAGS = -export-dynamic
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/src/Makefile.in
^
|
@@ -68,7 +68,8 @@
am__installdirs = "$(DESTDIR)$(sbindir)"
PROGRAMS = $(sbin_PROGRAMS)
am_ulogd_OBJECTS = ulogd.$(OBJEXT) select.$(OBJEXT) timer.$(OBJEXT) \
- rbtree.$(OBJEXT) conffile.$(OBJEXT) hash.$(OBJEXT)
+ rbtree.$(OBJEXT) conffile.$(OBJEXT) hash.$(OBJEXT) \
+ addr.$(OBJEXT)
ulogd_OBJECTS = $(am_ulogd_OBJECTS)
am__DEPENDENCIES_1 =
ulogd_DEPENDENCIES = $(am__DEPENDENCIES_1)
@@ -258,7 +259,7 @@
-DULOGD_LOGFILE_DEFAULT="\"$(localstatedir)/log/ulogd.log\""
AM_CFLAGS = ${regular_CFLAGS}
-ulogd_SOURCES = ulogd.c select.c timer.c rbtree.c conffile.c hash.c
+ulogd_SOURCES = ulogd.c select.c timer.c rbtree.c conffile.c hash.c addr.c
ulogd_LDADD = ${libdl_LIBS}
ulogd_LDFLAGS = -export-dynamic
all: all-am
@@ -351,6 +352,7 @@
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conffile.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rbtree.Po@am__quote@
|
[-]
[+]
|
Added |
ulogd-2.0.2.tar.bz2/src/addr.c
^
|
@@ -0,0 +1,110 @@
+/* IP address handling functions
+ *
+ * (C) 2012 by Pablo Neira Ayuso <pablo@netfilter.org>
+ * (C) 2012 by Eric Leblond <eric@regit.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <arpa/inet.h>
+
+#include <ulogd/ulogd.h>
+#include <ulogd/addr.h>
+
+u_int32_t ulogd_bits2netmask(int bits)
+{
+ u_int32_t netmask, bm;
+
+ if (bits >= 32 || bits < 0)
+ return(~0);
+ for (netmask = 0, bm = 0x80000000; bits; bits--, bm >>= 1)
+ netmask |= bm;
+ return netmask;
+}
+
+
+void ulogd_ipv6_cidr2mask_host(uint8_t cidr, uint32_t *res)
+{
+ int i, j;
+
+ memset(res, 0, sizeof(uint32_t)*4);
+ for (i = 0; i < 4 && cidr > 32; i++) {
+ res[i] = 0xFFFFFFFF;
+ cidr -= 32;
+ }
+ res[i] = 0xFFFFFFFF << (32 - cidr);
+ for (j = i+1; j < 4; j++) {
+ res[j] = 0;
+ }
+}
+
+/* I need this function because I initially defined an IPv6 address as
+ * uint32 u[4]. Using char u[16] instead would allow to remove this. */
+void ulogd_ipv6_addr2addr_host(uint32_t *addr, uint32_t *res)
+{
+ int i;
+
+ memset(res, 0, sizeof(uint32_t)*4);
+ for (i = 0; i < 4; i++) {
+ res[i] = ntohl(addr[i]);
+ }
+}
+
+int ulogd_parse_addr(char *string, size_t len, struct ulogd_addr *addr)
+{
+ char filter_addr[128];
+ char *slash;
+ char *ddash;
+ if ((ddash = strchr(string, ':')) && (ddash < string + len)) {
+ struct in6_addr raddr;
+ int i;
+ slash = strchr(string, '/');
+ if (slash == NULL) {
+ ulogd_log(ULOGD_FATAL,
+ "No network specified\n");
+ return -1;
+ }
+
+ strncpy(filter_addr, string,
+ slash - string);
+ filter_addr[slash - string] = 0;
+ if (inet_pton(AF_INET6, filter_addr, (void *)&raddr)
+ != 1) {
+ ulogd_log(ULOGD_FATAL,
+ "error reading address\n");
+ return -1;
+ }
+ for(i = 0; i < 4; i++)
+ addr->in.ipv6[i] = raddr.s6_addr32[i];
+ addr->netmask = atoi(slash + 1);
+
+ return AF_INET6;
+ }
+ if ((ddash = strchr(string, '.')) && (ddash < string + len)) {
+ slash = strchr(string, '/');
+ if (slash == NULL) {
+ ulogd_log(ULOGD_FATAL,
+ "No network specified\n");
+ return -1;
+ }
+ strncpy(filter_addr, string,
+ slash - string);
+ filter_addr[slash - string] = 0;
+ addr->in.ipv4 = inet_addr(filter_addr);
+ addr->netmask = atoi(slash + 1);
+
+ return AF_INET;
+ }
+ return -1;
+}
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/src/conffile.c
^
|
@@ -1,9 +1,8 @@
/* config file parser functions
*
* (C) 2000-2005 by Harald Welte <laforge@gnumonks.org>
+ * (C) 2013 by Eric Leblond <eric@regit.org>
*
- * $Id$
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation
@@ -17,9 +16,11 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+
#include <ulogd/ulogd.h>
#include <ulogd/common.h>
#include <ulogd/conffile.h>
+#include <unistd.h>
/* points to config entry with error */
@@ -90,10 +91,17 @@
/* register config file with us */
int config_register_file(const char *file)
{
- /* FIXME: stat of file */
if (fname)
return 1;
+ if (access(file, R_OK) != 0) {
+ ulogd_log(ULOGD_ERROR,
+ "unable to read configfile \"%s\": %s\n",
+ file,
+ strerror(errno));
+ return 1;
+ }
+
pr_debug("%s: registered config file '%s'\n", __func__, file);
fname = (char *) malloc(strlen(file)+1);
@@ -115,6 +123,7 @@
unsigned int i;
char linebuf[LINE_LEN+1];
char *line = linebuf;
+ int linenum = 0;
pr_debug("%s: section='%s' file='%s'\n", __func__, section, fname);
@@ -127,9 +136,16 @@
char wordbuf[LINE_LEN];
char *wordend;
+ linenum++;
if (*line == '#')
continue;
+ /* if line was fetch completely, string ends with '\n' */
+ if (! strchr(line, '\n')) {
+ ulogd_log(ULOGD_ERROR, "line %d too long.\n", linenum);
+ return -ERRTOOLONG;
+ }
+
if (!(wordend = get_word(line, " \t\n[]", (char *) wordbuf)))
continue;
pr_debug("word: \"%s\"\n", wordbuf);
@@ -151,10 +167,17 @@
char wordbuf[LINE_LEN];
char *wordend;
+ linenum++;
pr_debug("line read: %s\n", line);
if (*line == '#')
continue;
+ /* if line was fetch completely, string ends with '\n' */
+ if (! strchr(line, '\n')) {
+ ulogd_log(ULOGD_ERROR, "line %d too long.\n", linenum);
+ return -ERRTOOLONG;
+ }
+
if (!(wordend = get_word(line, " =\t\n", (char *) &wordbuf)))
continue;
@@ -167,7 +190,8 @@
for (i = 0; i < kset->num_ces; i++) {
struct config_entry *ce = &kset->ces[i];
pr_debug("parse main loop, key: %s\n", ce->key);
- if (strcmp(ce->key, (char *) &wordbuf)) {
+ if ((strcmp(ce->key, (char *) &wordbuf)) ||
+ ce->flag & CONFIG_FLAG_VAL_PROTECTED) {
continue;
}
@@ -188,7 +212,10 @@
if (strlen(args) <
CONFIG_VAL_STRING_LEN ) {
strcpy(ce->u.string, args);
- /* FIXME: what if not ? */
+ } else {
+ config_errce = ce;
+ err = -ERRTOOLONG;
+ goto cpf_error;
}
break;
case CONFIG_TYPE_INT:
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/src/select.c
^
|
@@ -1,9 +1,4 @@
-/* ulogd, Version $LastChangedRevision: 476 $
- *
- * $Id: ulogd.c 476 2004-07-23 03:19:35Z laforge $
- *
- * userspace logging daemon for the iptables ULOG target
- * of the linux 2.4 netfilter subsystem.
+/* select related functions
*
* (C) 2000-2005 by Harald Welte <laforge@gnumonks.org>
*
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/src/timer.c
^
|
@@ -1,6 +1,4 @@
-/* ulogd, Version $LastChangedRevision: 476 $
- *
- * $Id: ulogd.c 476 2004-07-23 03:19:35Z laforge $
+/* timer implementation
*
* userspace logging daemon for the netfilter subsystem
*
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/src/ulogd.c
^
|
@@ -1,10 +1,9 @@
-/* ulogd, Version $LastChangedRevision$
- *
- * $Id$
+/* ulogd
*
* unified network logging daemon for Linux.
*
* (C) 2000-2005 by Harald Welte <laforge@gnumonks.org>
+ * (C) 2013 by Eric Leblond <eric@regit.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
@@ -83,6 +82,8 @@
static int info_mode = 0;
+static int verbose = 0;
+
/* linked list for all registered plugins */
static LLIST_HEAD(ulogd_plugins);
/* linked list for all plugins handle */
@@ -430,31 +431,42 @@
else
outfd = stderr;
- va_start(ap, format);
-
tm = time(NULL);
timestr = ctime(&tm);
timestr[strlen(timestr)-1] = '\0';
fprintf(outfd, "%s <%1.1d> %s:%d ", timestr, level, file, line);
+ if (verbose)
+ fprintf(stderr, "%s <%1.1d> %s:%d ", timestr, level, file, line);
+
+ va_start(ap, format);
vfprintf(outfd, format, ap);
va_end(ap);
-
/* flush glibc's buffer */
fflush(outfd);
+
+ if (verbose) {
+ va_start(ap, format);
+ vfprintf(stderr, format, ap);
+ va_end(ap);
+ fflush(stderr);
+ }
+
}
}
static void warn_and_exit(int daemonize)
{
if (!daemonize) {
- if (logfile)
- fprintf(stderr, "Fatal error, check logfile \"%s\".\n",
+ if (logfile && !verbose) {
+ fprintf(stderr, "Fatal error, check logfile \"%s\""
+ " or use '-v' flag.\n",
ulogd_logfile);
- else
+
+ } else
fprintf(stderr, "Fatal error.\n");
}
- exit(1);
+exit(1);
}
/* clean results (set all values to 0 and free pointers) */
@@ -977,6 +989,15 @@
ulogd_log(ULOGD_ERROR,
"section \"%s\" not found\n", section);
break;
+ case -ERRTOOLONG:
+ if (config_errce->key)
+ ulogd_log(ULOGD_ERROR,
+ "string value too long for key \"%s\"\n",
+ config_errce->key);
+ else
+ ulogd_log(ULOGD_ERROR,
+ "string value is too long\n");
+ break;
}
return 1;
}
@@ -1090,7 +1111,6 @@
static void print_usage(void)
{
- /* FIXME */
printf("ulogd Version %s\n", VERSION);
printf(COPYRIGHT);
printf("This is free software with ABSOLUTELY NO WARRANTY.\n\n");
@@ -1098,6 +1118,8 @@
printf("\t-h --help\tThis help page\n");
printf("\t-V --version\tPrint version information\n");
printf("\t-d --daemon\tDaemonize (fork into background)\n");
+ printf("\t-v --verbose\tOutput info on standard output\n");
+ printf("\t-l --loglevel\tSet log level\n");
printf("\t-c --configfile\tUse alternative Configfile\n");
printf("\t-u --uid\tChange UID/GID\n");
printf("\t-i --info\tDisplay infos about plugin\n");
@@ -1110,6 +1132,8 @@
{ "configfile", 1, NULL, 'c'},
{ "uid", 1, NULL, 'u' },
{ "info", 1, NULL, 'i' },
+ { "verbose", 0, NULL, 'v' },
+ { "loglevel", 1, NULL, 'l' },
{NULL, 0, NULL, 0}
};
@@ -1122,10 +1146,11 @@
struct passwd *pw;
uid_t uid = 0;
gid_t gid = 0;
+ int loglevel = 0;
ulogd_logfile = strdup(ULOGD_LOGFILE_DEFAULT);
- while ((argch = getopt_long(argc, argv, "c:dh::Vu:i:", opts, NULL)) != -1) {
+ while ((argch = getopt_long(argc, argv, "c:dvl:h::Vu:i:", opts, NULL)) != -1) {
switch (argch) {
default:
case '?':
@@ -1171,18 +1196,36 @@
load_plugin(optarg);
exit(0);
break;
+ case 'v':
+ verbose = 1;
+ break;
+ case 'l':
+ loglevel = atoi(optarg);
+ break;
}
}
+ /* command line has precedence on config file */
+ if (loglevel)
+ loglevel_ce.u.value = loglevel;
+ loglevel_ce.flag |= CONFIG_FLAG_VAL_PROTECTED;
+
+ if (daemonize && verbose) {
+ verbose = 0;
+ ulogd_log(ULOGD_ERROR,
+ "suppressing verbose output (not compatible"
+ " with daemon mode).\n");
+ }
+
if (config_register_file(ulogd_configfile)) {
ulogd_log(ULOGD_FATAL, "error registering configfile \"%s\"\n",
ulogd_configfile);
warn_and_exit(daemonize);
}
-
+
/* parse config file */
if (parse_conffile("global", &ulogd_kset)) {
- ulogd_log(ULOGD_FATAL, "parse_conffile\n");
+ ulogd_log(ULOGD_FATAL, "unable to parse config file\n");
warn_and_exit(daemonize);
}
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/ulogd.8
^
|
@@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
-.TH ULOGD 8 "September 11, 2008" "Linux Netfilter"
+.TH ULOGD 8 "February 20, 2013" "Linux Netfilter"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@@ -22,14 +22,15 @@
.SH DESCRIPTION
.B ulogd
is a logging daemon that reads event messages coming from the Netfilter
-connection tracking and the Netfilter packet logging subsystem. You have
-to enable support for connection tracking event delivery; ctnetlink and
-the NFLOG target in your Linux kernel 2.6.x or load their respective modules.
-The deprecated ULOG target (which has been superseded by NFLOG) is also
+connection tracking, the Netfilter packet logging subsystem and from
+the Netfilter accounting subsystem. You have to enable support for
+connection tracking event delivery; ctnetlink and the NFLOG target in
+your Linux kernel 2.6.x or load their respective modules. The deprecated
+ULOG target (which has been superseded by NFLOG) is also
supported.
.PP
-The received messages can be logged into files or into a mySQL or
-PostgreSQL database.
+The received messages can be logged into files or into a mySQL, sqlite3
+or PostgreSQL database. IPFIX and Graphite output are also supported.
.SH OPTIONS
.TP
.B -d, --daemon
@@ -45,6 +46,12 @@
.B -V, --version
show version information and copyright
.TP
+.B -v, --verbose
+verbose output on stdout when not running as daemon
+.TP
+.B -l, --loglevel <level>
+set log level to <level>: debug(1), info(3), notice(5), error(7) or fatal(8) (default 5)
+.TP
.B -u <UID>, --uid <UID>
change UID/GID
.TP
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/ulogd.conf.in
^
|
@@ -1,5 +1,4 @@
# Example configuration for ulogd
-# $Id$
# Adapted to Debian by Achilleas Kotsis <achille@debian.gr>
[global]
@@ -11,8 +10,8 @@
# logfile for status messages
logfile="/var/log/ulogd.log"
-# loglevel: debug(1), info(3), notice(5), error(7) or fatal(8)
-loglevel=1
+# loglevel: debug(1), info(3), notice(5), error(7) or fatal(8) (default 5)
+# loglevel=1
######################################################################
# PLUGIN OPTIONS
@@ -49,6 +48,7 @@
#plugin="@pkglibdir@/ulogd_output_DBI.so"
plugin="@pkglibdir@/ulogd_raw2packet_BASE.so"
plugin="@pkglibdir@/ulogd_inpflow_NFACCT.so"
+plugin="@pkglibdir@/ulogd_output_GRAPHITE.so"
# this is a stack for logging packet send by system via LOGEMU
#stack=log1:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU
@@ -80,6 +80,9 @@
# this is a stack for accounting-based logging via XML
#stack=acct1:NFACCT,xml1:XML
+# this is a stack for accounting-based logging to a Graphite server
+#stack=acct1:NFACCT,graphite1:GRAPHITE
+
# this is a stack for NFLOG packet-based logging to PCAP
#stack=log2:NFLOG,base1:BASE,pcap1:PCAP
@@ -121,6 +124,11 @@
#netlink_socket_buffer_maxsize=1085440
#netlink_resync_timeout=60 # seconds to wait to perform resynchronization
#pollinterval=10 # use poll-based logging instead of event-driven
+# If pollinterval is not set, NFCT plugin will work in event mode
+# In this case, you can use the following filters on events:
+#accept_src_filter=192.168.1.0/24,1:2::/64 # source ip of connection must belong to these networks
+#accept_dst_filter=192.168.1.0/24 # destination ip of connection must belong to these networks
+#accept_proto_filter=tcp,sctp # layer 4 proto of connections
[ct2]
#netlink_socket_buffer_size=217088
@@ -213,6 +221,7 @@
host="localhost"
user="nupik"
table="ulog"
+#schema="public"
pass="changeme"
procedure="INSERT_PACKET_FULL"
@@ -221,6 +230,7 @@
host="localhost"
user="nupik"
table="ulog2_ct"
+#schema="public"
pass="changeme"
procedure="INSERT_CT"
@@ -229,6 +239,7 @@
host="localhost"
user="nupik"
table="ulog2_ct"
+#schema="public"
pass="changeme"
procedure="INSERT_OR_REPLACE_CT"
@@ -237,6 +248,7 @@
host="localhost"
user="nupik"
table="nfacct"
+#schema="public"
pass="changeme"
procedure="INSERT_NFACCT"
@@ -276,3 +288,9 @@
# Set timestamp (default is 0, which means not set). This timestamp can be
# interpreted by the output plugin.
#timestamp = 1
+
+[graphite1]
+host="127.0.0.1"
+port="2003"
+# Prefix of data name sent to graphite server
+prefix="netfilter.nfacct"
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/util/db.c
^
|
@@ -1,4 +1,4 @@
-/* db.c, Version $Revision: 6304 $
+/* db.c
*
* ulogd helper functions for Database / SQL output plugins
*
@@ -22,7 +22,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: ulogd_output_MYSQL.c 6304 2005-12-08 09:43:19Z /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org $
*/
#include <unistd.h>
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/util/printflow.c
^
|
@@ -17,8 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: printflow.c,v 1.1 2006/05/16 01:57:31 philipc Exp $
- *
*/
#include <string.h>
|
[-]
[+]
|
Changed |
ulogd-2.0.2.tar.bz2/util/printpkt.c
^
|
@@ -17,8 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id$
- *
*/
#include <stdio.h>
@@ -62,7 +60,7 @@
[KEY_IP_ID] = { .name = "ip.id", },
[KEY_IP_FRAGOFF] = { .name = "ip.fragoff", },
[KEY_IP_PROTOCOL] = { .name = "ip.protocol", },
- [KEY_IP6_PAYLOAD_LEN] = { .name = "ip6.payload_len" },
+ [KEY_IP6_PAYLOAD_LEN] = { .name = "ip6.payloadlen" },
[KEY_IP6_PRIORITY] = { .name = "ip6.priority" },
[KEY_IP6_HOPLIMIT] = { .name = "ip6.hoplimit" },
[KEY_IP6_FLOWLABEL] = { .name = "ip6.flowlabel" },
@@ -301,7 +299,7 @@
(char *) ikey_get_ptr(&res[KEY_IP_DADDR]));
if (pp_is_valid(res, KEY_IP6_PAYLOAD_LEN))
- buf_cur += sprintf(buf_cur, "LEN=%Zu ",
+ buf_cur += sprintf(buf_cur, "LEN=%zu ",
ikey_get_u16(&res[KEY_IP6_PAYLOAD_LEN]) +
sizeof(struct ip6_hdr));
|