flow-tools-0.68/ 0000777 0000766 0000766 00000000000 10240421704 007327 5 flow-tools-0.68/acconfig.h 0000644 0000766 0000766 00000000506 10236562402 011174
/* Name of package. */
#undef PACKAGE
/* Version of package. */
#undef VERSION
/* Linux */
#undef _BSD_SOURCE
/* Linux */
#undef HAVE_FEATURES_H
/* BSD socket */
#undef HAVE_SOCK_SIN_LEN
/* MYSQL */
#undef HAVE_MYSQL
/* PGSQL */
#undef HAVE_PGSQL
/* DEC */
#undef HAVE_LL_STRTOUL
/* OPENSSL */
#undef HAVE_OPENSSL
flow-tools-0.68/aclocal.m4 0000644 0000766 0000766 00000076310 10240411626 011114 # aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
# 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.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# Do all the work for Automake. -*- Autoconf -*-
# This macro actually does too much some checks are only needed if
# your package does certain things. But this isn't really a big deal.
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 8
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
AC_PREREQ([2.52])
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
# the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
# The call with PACKAGE and VERSION arguments is the old style
# call (pre autoconf-2.50), which is being phased out. PACKAGE
# and VERSION should now be passed to AC_INIT and removed from
# the call to AM_INIT_AUTOMAKE.
# We support both call styles for the transition. After
# the next Automake release, Autoconf can make the AC_INIT
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
# test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
AM_MISSING_PROG(AMTAR, tar)
AM_PROG_INSTALL_SH
AM_PROG_INSTALL_STRIP
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_][CC],
[_AM_DEPENDENCIES(CC)],
[define([AC_PROG_][CC],
defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
[_AM_DEPENDENCIES(CXX)],
[define([AC_PROG_][CXX],
defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
])
])
# Copyright 2002 Free Software Foundation, Inc.
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.6.3])])
# Helper functions for option handling. -*- Autoconf -*-
# Copyright 2001, 2002 Free Software Foundation, Inc.
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
# ------------------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
# ----------------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
#
# Check to make sure that the build environment is sane.
#
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftest.file`
fi
rm -f conftest.file
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
test "$[2]" = conftest.file
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
AC_MSG_RESULT(yes)])
# -*- Autoconf -*-
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
[AC_REQUIRE([AM_MISSING_HAS_RUN])
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
# AM_MISSING_HAS_RUN
# ------------------
# Define MISSING if not defined so far and test if it supports --run.
# If it does, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
AC_MSG_WARN([`missing' script is too old or missing])
fi
])
# AM_AUX_DIR_EXPAND
# Copyright 2001 Free Software Foundation, Inc.
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
# therefore $ac_aux_dir as well) can be either absolute or relative,
# depending on how configure is run. This is pretty annoying, since
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
# source directory, any form will work fine, but in subdirectories a
# relative path needs to be adjusted first.
#
# $ac_aux_dir/missing
# fails when called from a subdirectory if $ac_aux_dir is relative
# $top_srcdir/$ac_aux_dir/missing
# fails if $ac_aux_dir is absolute,
# fails when called from a subdirectory in a VPATH build with
# a relative $ac_aux_dir
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
# harmless because $srcdir is `.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
# and then we would define $MISSING as
# MISSING="\${SHELL} $am_aux_dir/missing"
# This will work as long as MISSING is not called from configure, because
# unfortunately $(top_srcdir) has no meaning in configure.
# However there are other variables, like CC, which are often used in
# configure, and could therefore not use this "fixed" $ac_aux_dir.
#
# Another solution, used here, is to always expand $ac_aux_dir to an
# absolute PATH. The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration.
# Rely on autoconf to set up CDPATH properly.
AC_PREREQ([2.50])
AC_DEFUN([AM_AUX_DIR_EXPAND], [
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
])
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
# Copyright 2001 Free Software Foundation, Inc.
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
# AM_PROG_INSTALL_STRIP
# Copyright 2001 Free Software Foundation, Inc.
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
# always use install-sh in `make install-strip', and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the `STRIP' environment variable to overrule this program.
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# serial 4 -*- Autoconf -*-
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
# NAME is "CC", "CXX", "GCJ", or "OBJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
# dependency, and given that the user is not expected to run this macro,
# just rely on AC_PROG_CC.
AC_DEFUN([_AM_DEPENDENCIES],
[AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
[$1], CXX, [depcc="$CXX" am_compiler_list=],
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
[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'.
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
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
for depmode in $am_compiler_list; do
# 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.
echo '#include "conftest.h"' > conftest.c
echo 'int i;' > conftest.h
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
case $depmode in
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
;;
none) break ;;
esac
# 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.
if depmode=$depmode \
source=conftest.c object=conftest.o \
depfile=conftest.Po tmpdepfile=conftest.TPo \
$SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
grep conftest.h conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
am_cv_$1_dependencies_compiler_type=$depmode
break
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_$1_dependencies_compiler_type=none
fi
])
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
])
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
AC_DEFUN([AM_SET_DEPDIR],
[rm -f .deps 2>/dev/null
mkdir .deps 2>/dev/null
if test -d .deps; then
DEPDIR=.deps
else
# MS-DOS does not allow filenames that begin with a dot.
DEPDIR=_deps
fi
rmdir .deps 2>/dev/null
AC_SUBST([DEPDIR])
])
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
[AC_ARG_ENABLE(dependency-tracking,
[ --disable-dependency-tracking Speeds up one-time builds
--enable-dependency-tracking Do not reject slow dependency extractors])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#serial 2
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[for mf in $CONFIG_FILES; do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named `Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# So let's grep whole file.
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
fi
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
# Extract the definition of DEP_FILES from the Makefile without
# running `make'.
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
test -z "$DEPDIR" && continue
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n -e '/^U = / s///p' < "$mf"`
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
# We invoke sed twice because it is the simplest approach to
# changing $(DEPDIR) to its actual value in the expansion.
for file in `sed -n -e '
/^DEP_FILES = .*\\\\$/ {
s/^DEP_FILES = //
:loop
s/\\\\$//
p
n
/\\\\$/ b loop
p
}
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
# AM_OUTPUT_DEPENDENCY_COMMANDS
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
# This code is only required when automatic dependency tracking
# is enabled. FIXME. This creates each `.P' file that we will
# need in order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
doit:
@echo done
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# We grep out `Entering directory' and `Leaving directory'
# messages which can occur if `w' ends up in MAKEFLAGS.
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
am__include=include
am__quote=
_am_result=GNU
fi
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
am__include=.include
am__quote="\""
_am_result=BSD
fi
fi
AC_SUBST(am__include)
AC_SUBST(am__quote)
AC_MSG_RESULT($_am_result)
rm -f confinc confmf
])
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 5
AC_PREREQ(2.52)
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])
AC_SUBST([$1_FALSE])
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([conditional \"$1\" was never defined.
Usually this means the macro was only invoked conditionally.])
fi])])
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
AC_PREREQ([2.52])
# serial 6
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. We must strip everything past the first ":",
# and everything past the last "/".
# _AM_DIRNAME(PATH)
# -----------------
# Like AS_DIRNAME, only do it during macro expansion
AC_DEFUN([_AM_DIRNAME],
[m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
m4_if(regexp([$1], [^/.*]), -1,
[.],
patsubst([$1], [^\(/\).*], [\1])),
patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
])# _AM_DIRNAME
# The stamp files are numbered to have different names.
# We could number them on a directory basis, but that's additional
# complications, let's have a unique counter.
m4_define([_AM_STAMP_Count], [0])
# _AM_STAMP(HEADER)
# -----------------
# The name of the stamp file for HEADER.
AC_DEFUN([_AM_STAMP],
[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
[:.*])))/stamp-h[]_AM_STAMP_Count])
# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
# ------------------------------------------------------------
# We used to try to get a real timestamp in stamp-h. But the fear is that
# that will cause unnecessary cvs conflicts.
AC_DEFUN([_AM_CONFIG_HEADER],
[# Add the stamp file to the list of files AC keeps track of,
# along with our hook.
AC_CONFIG_HEADERS([$1],
[# update the timestamp
echo 'timestamp for $1' >"_AM_STAMP([$1])"
$2],
[$3])
])# _AM_CONFIG_HEADER
# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
# --------------------------------------------------------------
AC_DEFUN([AM_CONFIG_HEADER],
[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
])# AM_CONFIG_HEADER
# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3
AC_PREREQ(2.50)
# AM_PROG_LEX
# -----------
# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
# "missing" invocation, for better error output.
AC_DEFUN([AM_PROG_LEX],
[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
AC_REQUIRE([AC_PROG_LEX])dnl
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi])
flow-tools-0.68/AUTHORS 0000644 0000766 0000766 00000000000 07241363005 010307 flow-tools-0.68/bin/ 0000777 0000766 0000766 00000000000 10240421704 010077 5 flow-tools-0.68/bin/flow-log2rrd 0000755 0000766 0000766 00000004274 10240163374 012276 #!/usr/local/bin/python
import getopt
import os
import rrdtool
import sys
import string
#
# process syslog output from flow-capture and flow-fanout into a rrd
# Requires flow-tools-0.66 or above.
#
# -p allows configuration of the path to the rrd file
#
# rrd's have a DS of flows, pkts, and lost. When processing the output of
# flow-fanout an additional send_nobufs DS is used.
#
# default to cwd
rrdPath = '.'
opts, args = getopt.getopt(sys.argv[1:], 'p:')
for o, v in opts:
if o == '-p' :
rrdPath = v;
testFile = {}
line = sys.stdin.readline()
while line :
fields = line.split()
if (len(fields) < 6) or (fields[5] != 'STAT:'):
line = sys.stdin.readline()
continue
if fields[4][5:11] == 'fanout' :
name='fanout'
elif fields[4][5:12] == 'capture' :
name='capture'
else :
raise ValueError, "Expecting flow-capture or flow-fanout logs, got %s" %\
fields[4]
tv = {}
for f in fields :
try :
type, value = f.split('=')
except ValueError :
continue
tv[type] = value
rrdFile = '%s/%s.%s.%s.%s.%s.rrd' %\
(rrdPath, name, fields[3],tv['src_ip'],tv['dst_ip'],tv['d_ver'])
update = '%s:%s:%s:%s' % (tv['now'],tv['flows'],tv['pkts'],tv['lost'])
if name == 'fanout' :
update = '%s:%s' % (update, tv['send_nobufs'])
if not testFile.get(rrdFile, 0):
if not os.access(rrdFile, os.F_OK) :
print 'Creating RRD ', rrdFile
if name == 'capture' :
# 7 days of 5 minute averages (no averaging)
# 365 days of 1 day averages
rrdtool.create(rrdFile, '--start', str(int(tv['now']) - 300),
'DS:flows:COUNTER:600:U:U',
'DS:pkts:COUNTER:600:U:U',
'DS:lost:COUNTER:600:U:U',
'RRA:AVERAGE:0.5:1:2016',
'RRA:AVERAGE:0.5:288:365')
testFile[rrdFile] = 1
elif (name == 'fanout') :
rrdtool.create(rrdFile, '--start', str(int(tv['now']) - 300),
'DS:flows:COUNTER:600:U:U',
'DS:pkts:COUNTER:600:U:U',
'DS:lost:COUNTER:600:U:U',
'DS:nobufs:COUNTER:600:U:U',
'RRA:AVERAGE:0.5:1:2016',
'RRA:AVERAGE:0.5:288:365')
testFile[rrdFile] = 1
rrdtool.update(rrdFile, update)
line = sys.stdin.readline()
flow-tools-0.68/bin/flow-rpt2rrd 0000755 0000766 0000766 00000023214 10240246661 012316 #!/usr/local/bin/python
import getopt
import os
import rrdtool
import sys
import string
#
# flow-rpt2rrd - convert flow-report output to rrd format
#
# TODO
# work with time-series flow-report output
# relax 5 minute sample requirement.
#
# load key file
#
def load_keyfile(fname):
keys = []
f = open(fname, "r")
line = f.readline().strip()
while line:
if line[0:1] == '#':
line = f.readline()
continue
keys.append(line)
line = f.readline().strip()
f.close()
return string.join(keys, ',')
#
# Class: ftsym
# load a symbol table from a file in value symbol format, provide
# access methods findbyname and findbyval
#
class ftsym:
#
# load symbols
#
def __init__(self,field):
self.sv = {}
self.vs = {}
__symbol_lookup = { 'ip-source-port' : 'tcp-port.sym',
'ip-destination-port' : 'tcp-port.sym',
'ip-protocol' : 'ip-prot.sym',
'source-as' : 'asn.sym',
'destination-as' : 'asn.sym',
'source-tag' : 'tag.sym',
'destination-tag' : 'tag.sym',
'ip-address-type' : 'ip-type.sym',
}
fname = "/usr/local/netflow/var/sym/%s" % __symbol_lookup[field]
f = open(fname, "r")
line = f.readline().strip()
while line:
(v,s) = line.split();
self.vs[v] = s
self.sv[s] = v
line = f.readline().strip()
f.close()
#
# access by name, return value. If the name does not exist return the name.
#
def findbyname(self, name):
return self.sv.get(name,name)
#
# access by value, return name. If the value does not exist return the value.
#
def findbyval(self, val):
return self.vs.get(val,val)
#
# Class: ftrpt2rrd
#
# Read in output of flow-report, make suitable for rrd
#
# pickfields - pick flows,octets,packets for inclusion into new rrd
# pickkeys - pick keys for inclusion into new rrds.
# mapsym() - replace key values with symbols
# setrrd() - set rrd params
# convert(stream) - convert to rrd format
#
class ftrpt2rrd:
#
#
#
def __init__(self):
# not in data area
self.debug = 0
self.verbose = 0
self.in_data = 0
self.use_key_names = {}
self.use_key_names_special = {}
self.use_key_names_total = 0
self.use_fields = {'flows' : 1, 'octets' : 1, 'packets' : 1}
self.mapsym = 0
self.rrd_5min = 0
self.rrd_30min = 0
self.rrd_2hr = 0
self.rrd_1day = 0
self.rrd_path = '.'
self.rrd_postfix = ''
self.field_names = {}
self.field_names2 = {}
self.field_total = 0
self.field_keys = {}
self.field_vals = {}
self.start_time = 0
self.sym = {}
self.records_processed = 0
def set_use_fields(self,f):
self.use_fields = {}
for i in string.split(f, ','):
self.use_fields[i] = 1
def set_use_key_names(self,f):
self.use_key_names = {}
self.use_key_names_special = {}
for i in string.split(f, ','):
if i[:6] == 'total_':
self.use_key_names_special[i] = 1
else:
self.use_key_names[i] = 1
self.use_key_names_total += 1
def set_mapsym(self):
self.mapsym = 1
def set_debug(self, debug):
self.debug = debug
def set_verbose(self, verbose):
self.verbose = verbose
def setrrd(self, storage, path, postfix):
(self.rrd_5min, self.rrd_30min, self.rrd_2hr, self.rrd_1day) = \
string.split(storage,':')
self.rrd_path = path
self.rrd_postfix = postfix
def update_rrd(self, key, vals, use_fields_index):
# / in the key maps to - for files
key = key.replace('/','-')
# open an rrd, it it doesn't exist create it.
rrdFile = "%s/%s%s.rrd" % (self.rrd_path, key, self.rrd_postfix)
# exists?
if not os.access(rrdFile, os.F_OK):
print "Creating RRD", rrdFile
rrdParams = []
t = str(int(self.start_time) - 300)
rrdParams.append('--start')
rrdParams.append(t)
for i in use_fields_index.keys():
rrdParams.append("DS:%s:ABSOLUTE:600:U:U" % use_fields_index[i])
if (self.rrd_5min):
rrdParams.append('RRA:AVERAGE:0.5:1:%s' % self.rrd_5min)
rrdParams.append('RRA:MAX:0.5:1:%s' % self.rrd_5min)
if (self.rrd_30min):
rrdParams.append('RRA:AVERAGE:0.5:6:%s' % self.rrd_30min)
rrdParams.append('RRA:MAX:0.5:6:%s' % self.rrd_30min)
if (self.rrd_2hr):
rrdParams.append('RRA:AVERAGE:0.5:24:%s' % self.rrd_2hr)
rrdParams.append('RRA:MAX:0.5:24:%s' % self.rrd_2hr)
if (self.rrd_1day):
rrdParams.append('RRA:AVERAGE:0.5:288:%s' % self.rrd_1day)
rrdParams.append('RRA:MAX:0.5:288:%s' % self.rrd_1day)
rrdtool.create(rrdFile, *rrdParams)
if self.debug:
print >>sys.stderr, string.join(rrdParams,' ')
# foreach value
update = self.start_time
for i in use_fields_index.keys():
update = "%s:%s" % (update,vals[i])
if self.debug:
print >>sys.stderr, "update", update
if (self.verbose):
print "Updating RRD", rrdFile
rrdtool.update(rrdFile,update)
#
#
#
def convert(self, f):
# first line
line = f.readline().strip()
while line:
# report data starts after recn comment
if (not self.in_data) :
if line[:13] == '# first-flow:':
self.start_time = (string.split(line[14:]))[0]
# handle the totals record differently
if line[:53] == '# rec1: records,ignores,flows,octets,packets,duration':
tmp = string.split(line[8:], ',')
line = f.readline().strip()
tmp_use_fields_index = {}
tmp_splt = string.split(line, ',')
x = 0
ds = 0
for i in tmp:
if self.use_key_names_special.get("total_%s" % i,0):
tmp_use_fields_index[x] = i
ds = ds + 1
x = x + 1
if ds:
self.update_rrd('totals', tmp_splt, tmp_use_fields_index)
del tmp_splt, tmp_use_fields_index, i, x, ds
continue
if line[:6] == '# recn':
self.in_data = 1
# foreach element in field names
for i in string.split(line[8:],','):
# remove key designators
if i[-1:] == '*':
i = i[:-1]
self.field_keys[self.field_total] = 1
else:
self.field_vals[self.field_total] = 1
# store the field names
self.field_names[self.field_total] = i
self.field_names2[i] = self.field_total
self.field_total += 1
# start time must be set by now
if (self.start_time == 0):
raise ValueError, "Start time not found, make sure flow-report is including the header"
# load symbol tables
if self.mapsym == 1:
for i in self.field_keys.keys():
self.sym[i] = ftsym(self.field_names[i])
# convert use_fields to use_fields_index for easier access
self.use_fields_index = {}
for i in self.use_fields.keys():
if self.use_fields[i] and self.field_names2.get(i,'x') != 'x':
self.use_fields_index[self.field_names2[i]] = i
else :
# if in the data area and not a comment, store it
if self.in_data and line [:1] != '#':
splt = string.split(line, ',')
# combine the key fields to form one key
k = ''
for i in self.field_keys.keys():
# try a symbol table lookup
if self.mapsym == 1:
t = self.sym[i].findbyval(splt[i])
else:
t = splt[i]
k = "%s-%s" % (k, t)
# done if all entries in key_names list have been stored.
if self.use_key_names_total:
if self.records_processed == self.use_key_names_total:
break
# if set, only allow specified keys
if self.use_key_names.get(k[1:],0) == 0:
line = f.readline().strip()
continue
# mark this key as processed
self.use_key_names[k[1:]] |= 2
self.records_processed += 1
self.update_rrd(k[1:], splt, self.use_fields_index)
# next line
line = f.readline().strip()
# keys which were not available in the report also need to be
# updated with 0 values.
for i in xrange(len(splt)):
splt[i] = 0
for x in self.use_key_names.keys():
if not (self.use_key_names[x] & 2):
self.update_rrd(x, splt, self.use_fields_index)
#
# main
#
(opts,rags) = getopt.getopt(sys.argv[1:], "dhk:K:f:np:P:r:v")
# mrtg defaults
opt_rrd_storage = "600:600:600:732"
opt_keys = ''
opt_fields = 'flows,octets,packets'
opt_names = 0
opt_rrd_path = './'
opt_keyfile = ''
opt_debug = 0
opt_rrd_postfix = ''
opt_verbose = 0
for o,v in opts:
if o == '-d':
opt_debug = 1
elif o == '-k':
opt_keys = v
elif o == '-K':
opt_keys = load_keyfile(v)
elif o == '-f':
opt_fields = v
elif o == '-n':
opt_names = 1
elif o == '-p':
opt_rrd_path = v
elif o == '-P':
opt_rrd_postfix = v
elif o == '-r':
opt_rrd_storage = v
elif o == '-v':
opt_verbose = 1
elif o == '-h':
print "Usage: flow-rpt2rrd [-nv] [-k keys] [-K keyfile] [-f fields]"
print " [-p rrd_path] [-P fname_postfix]"
print " [-r rrd_storage 5_min:30_min:2_hr:1_day ]"
sys.exit(0)
if opt_keys == '':
print >>sys.stderr, "Keys must be defined with -k or -K."
sys.exit(1)
ftrrd = ftrpt2rrd()
if (opt_names == 1):
ftrrd.set_mapsym()
ftrrd.setrrd(opt_rrd_storage, opt_rrd_path, opt_rrd_postfix)
ftrrd.set_use_key_names(opt_keys)
ftrrd.set_use_fields(opt_fields)
ftrrd.set_debug(opt_debug)
ftrrd.set_verbose(opt_verbose)
ftrrd.convert(sys.stdin)
flow-tools-0.68/bin/flow-rptfmt 0000755 0000766 0000766 00000034636 10240376315 012245 #!/usr/local/bin/python
import sys
import string
import getopt
import signal
#
# flow-rptfmt - pretty print flow-report output
#
# $Id: flow-rptfmt,v 1.3 2005/05/11 12:38:37 maf Exp $
#
# TODO:
# speed up sorting by first mapping array to long/floats.
# better support for older flow-reports with internal list of
# key fields.
# use the 'totals' line if available. Then don't have to
# load entire report for percent totals.
#
# Class: ftsym
# load a symbol table from a file in value symbol format, provide
# access methods findbyname and findbyval
#
class ftsym:
#
# load symbols
#
def __init__(self,field):
self.sv = {}
self.vs = {}
__symbol_lookup = { 'ip-source-port' : 'tcp-port.sym',
'ip-destination-port' : 'tcp-port.sym',
'ip-protocol' : 'ip-prot.sym',
'source-as' : 'asn.sym',
'destination-as' : 'asn.sym',
'source-tag' : 'tag.sym',
'destination-tag' : 'tag.sym',
'ip-address-type' : 'ip-type.sym',
}
fname = "/usr/local/netflow/var/sym/%s" % __symbol_lookup[field]
f = open(fname, "r")
line = f.readline()
while line:
line.strip()
(v,s) = line.split();
self.vs[v] = s
self.sv[s] = v
line = f.readline()
f.close()
#
# access by name, return value. If the name does not exist return the name.
#
def findbyname(self, name):
return self.sv.get(name,name)
#
# access by value, return name. If the value does not exist return the value.
#
def findbyval(self, val):
return self.vs.get(val,val)
#
# Class: ftrptfmt
#
# Read in output of flow-report.
#
# load(stream) - read from the stream
# pickdisplay(fields) - configure a comma seperated list of fields to display
# sort(field) - sort report -descending or +ascending on field
# mapsym() - replace key values with symbols
# percent() - replace non key fields with percent totals
# dump(format, header, max_lines) - dump output in format (ascii/html).
# if header is != 0, then list the header values too.
#
class ftrptfmt:
#
#
#
def __init__(self):
# not in data area
self.in_data = 0
# no header info yet
self.header_info = []
self.field_totals = {}
self.field_lens = {}
self.field_names = {}
self.field_vals = {}
self.field_avals = []
self.field_idx = {}
self.field_iter = []
self.field_total = 0
self.field_use = {'all' : 1}
self.field_display = {}
self.field_keys = {}
self.recno = int(0)
self.display_summary_detail = 0
self.max_lines = 0
self.display_header = 0
self.got_totals = 0
self.soft_field = ''
#
#
#
def _fmt_summary_detail(self):
if self.got_totals:
print "Ignores: %s" % self.field_vals['ignores']
print "Total Flows: %s" % self.field_vals['flows']
print "Total Octets: %s" % self.field_vals['octets']
print "Total Packets: %s" % self.field_vals['packets']
print "Total Duration (ms): %s" % self.field_vals['duration']
print "Real Time: %s" % self.field_vals['time_real']
print "Average Flow Time: %s" % self.field_vals['aflowtime']
print "Average Packets/Second: %s" % self.field_vals['aps']
print "Average Flows/Second: %s" % self.field_vals['afs']
print "Average Packets/Flow: %s" % self.field_vals['apf']
print "Flows/Second: %s" % self.field_vals['fps']
print "Flows/Second (real): %s" % self.field_vals['fps_real']
print "\nAverage IP packet size distribution:"
print "\n 1-32 64 96 128 160 192 224 256 288 320 352 384 416 448 480\n ",
for x in range(7,22):
print ("%-3.3f" % float(self.field_vals[x]))[1:],
print "\n\n 512 544 576 1024 1536 2048 2560 3072 3584 4096 4608\n ",
for x in range(22,33):
print ("%-3.3f" % float(self.field_vals[x]))[1:],
print "\n\nPackets per flow distribution:"
print "\n 1 2 4 8 12 16 20 24 28 32 36 40 44 48 52\n ",
for x in range(33,48):
print ("%-3.3f" % float(self.field_vals[x]))[1:],
print "\n\n 60 100 200 300 400 500 600 700 800 900 >900\n ",
for x in range(48,59):
print ("%-3.3f" % float(self.field_vals[x]))[1:],
print "\n\nOctets per flow distribution:"
print "\n 32 64 128 256 512 1280 2048 2816 3584 4352 5120 5888 6656 7424 8192\n ",
for x in range(59,74):
print ("%-3.3f" % float(self.field_vals[x]))[1:],
print "\n\n 8960 9728 10496 11264 12032 12800 13568 14336 15104 15872 >15872\n ",
print ("%-3.3f" % float(self.field_vals[74]))[1:],
for x in range(75,85):
print ("%-3.3f " % float(self.field_vals[x]))[1:],
print "\n\nFlow Time Distribution (ms):"
print "\n 10 50 100 200 500 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000\n ",
for x in range(85,100):
print ("%-3.3f" % float(self.field_vals[x]))[1:],
print "\n\n 12000 14000 16000 18000 20000 22000 24000 26000 28000 30000 >30000\n ",
for x in range(100,111):
print ("%-3.3f " % float(self.field_vals[x]))[1:],
print
#
#
#
def fmt_ascii_lines(self) :
# summary-detail is a special format
if self.display_summary_detail != 1:
line = int(self.max_lines)
for x in self.field_iter:
for y in xrange(self.field_total):
if self.field_display[y]:
# print "x=",x,"y=",y,"#"
i = self.field_avals[x][y]
print i.ljust(self.field_lens[y]),
if line:
line = line - 1
if not line:
break
print
else:
self._fmt_summary_detail()
#
#
#
def fmt_ascii_header(self) :
if not self.display_header:
return
for i in self.header_info:
if i[0:7] == '# rec1:':
break
print i;
print "# ", sys.argv
# summary-detail is a special format
if self.display_summary_detail != 1:
for x in xrange(self.field_total):
if self.field_display[x]:
i = self.field_names[x]
l = self.field_lens[x]
print i.ljust(l),
print
#
#
#
def fmt_ascii_footer(self) :
print "\n",
#
# HTML
#
def fmt_html_header(self) :
if self.display_header:
print '''
'''
for i in self.header_info:
if i[0:7] == '#rec1:':
break
print i
print '''
'''
print ""
print ""
if self.display_summary_detail != 1:
for x in xrange(self.field_total):
if self.field_display[x]:
print " ", self.field_names[x], ''' | '''
print '''
'''
#
#
#
def fmt_html_lines(self) :
if self.display_summary_detail != 1:
line = int(self.max_lines)
for x in self.field_iter:
print ""
for y in xrange(self.field_total):
if self.field_display[y]:
i = self.field_avals[x][y]
print " ", i, ''' | '''
if line:
line = line - 1
if not line:
break
print '''
'''
else:
print ''''''
self._fmt_summary_detail()
print '''
'''
#
#
#
def fmt_html_footer(self) :
print '''
'''
#
# load data in flow-report format
#
def load(self, f, sort_field, max_lines, opt_percent):
self.max_lines = int(max_lines)
self.sort_field = sort_field
# first line
line = f.readline()
while line:
# lop off trailing and extra whitespace
line = line.strip()
# report data starts after recn comment
if (not self.in_data) :
if line[:5] == '# rec' and line[:10] != '# records:':
# special totals record
if line[:6] == '# rec1':
self.got_totals = 1
line2 = f.readline()
line2 = line2.strip()
splt = string.split(line2,',')
x = 0
for i in string.split(line[8:],','):
self.field_vals[i] = splt[x]
x += 1
elif line[:6] == '# rec2':
self.display_summary_detail = 1
line2 = f.readline()
line2 = line2.strip()
splt = string.split(line2,',')
x = 0
for i in string.split(line[8:],','):
self.field_vals[i] = splt[x]
self.field_vals[x] = splt[x]
x += 1
else:
if line[:6] == '# recn':
self.in_data = 1
# foreach element in field names
x = 0
for i in string.split(line[8:],','):
# remove key designators
if i[-1:] == '*':
i = i[:-1]
self.field_keys[self.field_total] = 1
i = string.lower(i)
self.field_idx[i] = self.field_total
# default to the length of the header
self.field_lens[self.field_total] = len(i)
# append the header name
self.field_names[self.field_total] = i
self.field_total += 1
else:
self.header_info.append(line)
else :
# if in the data area and not a comment, store it
if self.in_data and line [:1] != '#':
splt = string.split(line, ',')
for i in xrange(self.field_total):
if len(splt[i]) > self.field_lens[i]:
self.field_lens[i] = len(splt[i])
self.field_avals.append(splt)
self.recno += 1
# next line
line = f.readline()
# short cut, if not sorting and max lines is defined then can stop early
if self.max_lines and (self.sort_field == '') and (opt_percent == 0) and (self.recno == self.max_lines):
break;
# default to sequentially as read
self.field_iter = range(self.recno)
#
#
#
def pickdisplay(self, f):
self.field_use['all'] = 0
for i in string.split(f, ','):
self.field_use[i] = 1
# figure out which fields are okay to print
if self.field_use['all'] == 1:
for x in xrange(self.field_total):
self.field_display[x] = 1
else:
for x in xrange(self.field_total):
self.field_display[x] = self.field_use.get(self.field_names[x],0)
#
#
#
def sort(self):
sort_field = self.sort_field
if self.sort_field != '':
i = self.field_idx[sort_field[1:]]
if sort_field[0] == '+':
if sort_field[1:] == 'pps' or sort_field[1:] == 'bps':
self.field_iter.sort(lambda a,b: cmp(float(self.field_avals[a][i]),
float(self.field_avals[b][i])))
elif sort_field[1:] == 'ip-next-hop-address' or sort_field[1:] == 'ip-source-address' or sort_field[1:] == 'ip-destination-address' or sort_field[1:] == 'ip-exporter-address':
self.field_iter.sort(lambda a,b: cmp(self.field_avals[a][i],
self.field_avals[b][i]))
else:
self.field_iter.sort(lambda a,b: cmp(long(self.field_avals[a][i]),
long(self.field_avals[b][i])))
elif sort_field[0] == '-':
if sort_field[1:] == 'pps' or sort_field[1:] == 'bps':
self.field_iter.sort(lambda b,a: cmp(float(self.field_avals[a][i]),
float(self.field_avals[b][i])))
elif sort_field[1:] == 'ip-next-hop-address' or sort_field[1:] == 'ip-source-address' or sort_field[1:] == 'ip-destination-address' or sort_field[1:] == 'ip-exporter-address':
self.field_iter.sort(lambda b,a: cmp(self.field_avals[a][i],
self.field_avals[b][i]))
else:
self.field_iter.sort(lambda b,a: cmp(long(self.field_avals[a][i]),
long(self.field_avals[b][i])))
#
#
#
def mapsym(self):
# foreach key field try to map in symbols
for i in self.field_keys.keys():
if self.field_display[i] != 1:
continue
n = self.field_names[i]
sym = ftsym(n)
for j in self.field_iter:
self.field_avals[j][i] = sym.findbyval(self.field_avals[j][i])
# readjust field len
if len(self.field_avals[j][i]) > self.field_lens[i]:
self.field_lens[i] = len(self.field_avals[j][i])
#
#
#
def percent(self):
# foreach field
for i in xrange(self.field_total):
# skip key fields
if self.field_keys.get(i,0) == 1:
continue
# for each value for the field
self.field_totals[i] = 0
for j in self.field_iter:
self.field_totals[i] += long(self.field_avals[j][i])
for j in self.field_iter:
self.field_avals[j][i] = "%5.6f" % (float(self.field_avals[j][i]) / float(self.field_totals[i]) * 100)
# readjust field len
if len(self.field_avals[j][i]) > self.field_lens[i]:
self.field_lens[i] = len(self.field_avals[j][i])
#
#
#
def dump(self, format, display_header):
self.display_header = display_header
if format == 'ascii':
fmt_header = ftrptfmt.fmt_ascii_header
fmt_lines = ftrptfmt.fmt_ascii_lines
fmt_footer = ftrptfmt.fmt_ascii_footer
if format == 'html':
fmt_header = ftrptfmt.fmt_html_header
fmt_lines = ftrptfmt.fmt_html_lines
fmt_footer = ftrptfmt.fmt_html_footer
fmt_header(self)
fmt_lines(self)
fmt_footer(self)
#
# main
#
(opts,rags) = getopt.getopt(sys.argv[1:], "a:f:F:ghHps:m:n")
opt_display_header = 1
opt_display = 'all'
opt_format = 'ascii'
opt_sort_field = ''
opt_mapsym = 0
opt_percent = 0
opt_max_lines = 0
opt_alarm = int(0)
for o,v in opts:
if o == '-a':
opt_alarm = int(v)
elif o == '-f':
opt_format = v
elif o == '-F':
opt_display = v
elif o == '-H':
opt_display_header = 0
elif o == '-m':
opt_max_lines = v
elif o == '-n':
opt_mapsym = 1
elif o == '-p':
opt_percent = 1
elif o == '-s':
opt_sort_field = v
elif o == '-h':
print "Usage: flow-rptfmt [-hHnp] [-a alarm] [-f format] [-F display_fields]"
print " [-m max_lines] [-s sort_field]"
sys.exit(0)
def sig_alarm(sig, stack):
print "flow-rptfmt exceeded CPU time, consider running report offline."
sys.exit(0)
signal.signal(signal.SIGALRM, sig_alarm)
if opt_alarm:
signal.alarm(opt_alarm)
rpt = ftrptfmt()
rpt.load(sys.stdin, opt_sort_field, opt_max_lines, opt_percent)
rpt.pickdisplay(opt_display)
rpt.sort()
if (opt_mapsym == 1):
rpt.mapsym()
if (opt_percent == 1):
rpt.percent()
try:
rpt.dump(opt_format, opt_display_header)
except IOError:
sys.exit(0)
flow-tools-0.68/bin/Makefile.am 0000644 0000766 0000766 00000000073 10240421456 012053 dist_bin_SCRIPTS = flow-log2rrd flow-rptfmt flow-rpt2rrd
flow-tools-0.68/bin/Makefile.in 0000644 0000766 0000766 00000014510 10240421461 012061 # Makefile.in generated by automake 1.6.3 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This Makefile.in 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.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
PATH_SEPARATOR = @PATH_SEPARATOR@
AMTAR = @AMTAR@
AWK = @AWK@
CC = @CC@
CRYPTOLIB = @CRYPTOLIB@
DEPDIR = @DEPDIR@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
MYSQLCFLAGS = @MYSQLCFLAGS@
MYSQLINCLUDE = @MYSQLINCLUDE@
MYSQLLIB = @MYSQLLIB@
OPENSSLINCLUDE = @OPENSSLINCLUDE@
PACKAGE = @PACKAGE@
PGSQLCFLAGS = @PGSQLCFLAGS@
PGSQLINCLUDE = @PGSQLINCLUDE@
PGSQLLIB = @PGSQLLIB@
RANLIB = @RANLIB@
STRIP = @STRIP@
VERSION = @VERSION@
YACC = @YACC@
YLIB = @YLIB@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
dist_bin_SCRIPTS = flow-log2rrd flow-rptfmt flow-rpt2rrd
subdir = bin
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/lib/ftconfig.h
CONFIG_CLEAN_FILES =
SCRIPTS = $(dist_bin_SCRIPTS)
DIST_SOURCES =
DIST_COMMON = $(dist_bin_SCRIPTS) Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu bin/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
dist_binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f $$d$$p; then \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " $(dist_binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \
$(dist_binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \
else :; fi; \
done
uninstall-dist_binSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
uninstall-info-am:
tags: TAGS
TAGS:
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@list='$(DISTFILES)'; for file in $$list; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(SCRIPTS)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir)
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am:
install-exec-am: install-dist_binSCRIPTS
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-dist_binSCRIPTS uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am info info-am install \
install-am install-data install-data-am install-dist_binSCRIPTS \
install-exec install-exec-am install-info install-info-am \
install-man install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic uninstall uninstall-am \
uninstall-dist_binSCRIPTS uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
flow-tools-0.68/ChangeLog 0000644 0000766 0000766 00000071266 10240376213 011035 * 5-11-2005 flow-tools 0.68 released.
* added flow-rpt2rrd - post process flow-report into RRD's.
* added flow-log2rrd - post process logs from
* added flow-rptfmt - post process flow-report into readable and HTML.
* ftstat.c s/psizr256/psize256/ - uebelacker@tuhh.de
* rec_v5->engine_id not set properly in ftdecode.c
- baldwinL@mynetwatchman.com
* --enable-lfs set flags for large file support - alexbrennen@gmail.com
* Added CryptoPAn support to flow-xlate
req by Abilene
* mailing list archive is available at mail-archive.com
req by spork@bway.net
* flow-cat.c: progress debug output - weinhold@berbee.com
* portability: gcc no longer supports goto label which label is at the
end of a compound statement - Andreas Jochens
* flow-stat.c: protect from divize by zero - should only happen on invalid
flows - - Espen.Breivik@uninett.no
* flow-filter.c: exaddr filter - Espen.Breivik@uninett.no
* ftxlate.c: tag-mask eval_tag_mask() not using correct offsets
- Cougar & kgraham@valueclick.com
* flow-send: default tx_delay to 0 like flow-fanout - rjd@merit.edu
* flow-export: debug should be global - dwatanab@uci.edu
* flow-report: path will accept spaces, ie |flow-rpt2rrd -p rrd -k 25
* flow-report: records is in rec1
* flow-fanout: did not set address family for receive fd - noted by
fingers@fingers.co.za
* docs: add FILES section to man pages
* flow-report: -hh to list available reports
* flow-report, flow-tag, flow-xlate, flow-nfilter. Run-time variable
expansion of the form @VAR or @{VAR:default} for config files.
* flow-receive: dropped inline tagging and nfilter support
* 12-4-2003 flow-tools 0.67 released.
* flow-export: pgsql support from wyu@ateneo.edu
* docs: flow-report: Added description of reports.
* ftlib: ftfil.c - match_end_time() broken - noted by
"Joe Loiacono"
* ftlib: fttag.c - better syntax checking for or-src/dst and set-src/dst
* ftlib: ftlib.h FT_TAG_TYPE_MATCH_NEXTHOP duplicated - flow-tag crash
with next-hop type noted by Maxim Grigoriev
* ftlib: ftstat.c - broken ip-destination-address-source-count. patch from
"Shigeki Taniguchi"
* flow-fanout: filters not loaded - noted by RAR@syssrc.com
* ftlib: missing function prototypes for ftstat_*, rename bind to binding
to prevent shadowing bind(). patch from Bill Fumerola
* flow-fanout, flow-capture. Process SIGTERM like SIGQUIT so flow-tools
will work better under daemontools - req by
Bernhard Weisshuhn
* docs: flow-nfilter and flow-cat TIME/DATE parsing section.
* flow-dscan: drp->flags not updated when loading saved state - patch from
Jon Snyder
* flow-dscan: allow concurrent -w and -W, patch from
Dan Thorson
* docs: flow-print -f24 - noted by
noted by Christian Bauer
* dist: tag.sym and tag.cfg example files reversed - noted by
* ftlib: ftlib.h - FT_TAG_SET and FT_TAG_OR are broken - patch from
Valtteri Vuorikoski
* ftlib: ftrec.c - add 1005to5 translation - patch from
Valtteri Vuorikoski
* flow-stat -f0 will try to divide by 0 with an empty flow file
- noted by Mike Hunter
* flow-capture: -u preserve unherited umask - patch from
Everton da Silva Marques
* flow-receive: remove -m and -A.
* flow-capture: remove -m and -A, functionality is now in xlate -x -X.
* flow-xlate: - config file based now.
* docs: flow-report: note which fields are sortable and what the key
field is.
* flow-capture: accept()'s 3rd arg should be casted to socklen_t*, noted
by Alistair.McGlinchy@marks-and-spencer.com
* docs: flow-nfilter, port is 0..65535 not 0..255 - noted by
Mike Hunter
* ftlib: ftlib.h - set-{dst,src} and or-{dst,src} constants not correct -
patch from Valtteri Vuorikoski
* ftlib: ftchash.c - ftchash_sort() should not try to sort 0 entry table -
noted by "Shane D."
* flow-import: missing !HAVE_STRSEP compatability - patch from
Alistair.McGlinchy@marks-and-spencer.com
* ftlib: ftstat.c - output path not parsed correctly with leading whitespace
-- noted by Maxim Grigoriev
* ftlib: fttag.c - src->source dst->destination
* ftlib: fttag.c - ip-address, exporter, interface tag actions, requested by
Tim Irwin
* ftlib: ftsym.c - ftsym_new() should handle null filename - noted by
Celso Alves Vieira
* flow-dscan: buf len 64, not 54 - Anil Madhavapeddy
* 4-3-2003 flow-tools-0.66 released
* reapply flow-fanout linux patch, also infected flow-send
* 4-3-2003 flow-tools-0.65 released
* flow-send, flow-fanout: -s source IP address spoofing.
* build: builddir != srcdir problems - noted by jos@catnook.com
* build: All default config files installed by default.
* build: config files end in .cfg, symbol files end in .sym. Note this changes
the names of the default configuration files.
* ftlib: ftfil.c - random sample filter - reqested by
Edward Balas
* ftlib: ftstat.c - ip-destination-address-source-count missing count - noted
by Christian Cinetto
* build: example tags file installed by default.
* ftlib: ftstat.c - broken ip-source-address/ip-destination-port - noted
by Gerhard.Haindl@t-systems.at
* ftlib: ftstat.c - broken ip-destination-address/destination-as - noted
by carsten.strahler@lambdanet.net
* remove bin scripts (mostly historical OSU stuff)
* upgrade to automake 1.7.3 and autoconf 2.57
* docs: flow-report.sgml missing
ip-source/destination-address/ip-protocol/ip-tos/ip-source/destination-port
noted by shane.dawalt@wright.edu
* flow-fanout: will not compile under linux - patch from
alex.shepard@gettyimages.com
* ftlib: ftstat.c - use FMT_SYM_LEN instead of hard coded 32 byte length.
increase len to 64 bytes.
* ftlib: fmt.c - fmt_uint*s() did not properly null terminate when symbol
strlen >= max - noted by jed@onenet.net
* 2-23-2003 flow-tools-0.64 released
* flow-fanout, flow-capture, flow-receive: add startup= to STAT: line
* docs: flow-fanout - missing -f -F - noted by RAR@syssrc.com
* flow-split: consuming too many resources, noted by fin@finseth.com
* ftlib: ftstat.c - rec2: in summary-detail report missing time_real field
- noted by shane.dawalt@wright.edu
* build: strouq() -> strtoull(). Check if strtoul() is really strtoull() -
noted by shane.dawalt@wright.edu
* ftlib: ftstat.c - protect potential divide by 0 errors - noted by
shane.dawalt@wright.edu
* flow-split: stag not initialized - patch from fin@finseth.com
* build: ftlib.h should not require ftconfig.h - noted by jan@kneschke.de
* build: lib/ftconfig.h does not belong in dist - noted by jos@catnook.com
* ftlib: ftlib.h - FT_SO_RCV_BUFSIZE default to 4MB
* ftlib: suppport.c - bigsockbuf() - more agressive reduction on large
buffers. Report size.
* ftlib: ftmask.c - flow-mask: rn_deladdr(): failed. Missing masklen
set - noted by nik.hinson@assurance-dynamics.com
* ftlib: ftfil.c - invert option to filter-definition req by mhyde@escape.ca
* ftlib: shadowed variable names - fumerola@yahoo-inc.com
* flow-cat: exit status 1 if no streams processed - req by
mhunter@ack.Berkeley.EDU
* ftlib: ftstat.c - bucket_dump_1(): loop typo noted by
nik.hinson@assurance-dynamics.com
* flow-capture: reload tags and filters with SIGHUP
* flow-import: format4 wire format.
* ftlib: ftstat.c - tag mask option should not require local tagging - noted
by clay@bloomcounty.org
* flow-*: catch extra command line args - noted by rcarrara@augustmail.com
* ftlib: fttag.c - fix ToS tagging, add ANY tagging.
* 12-12-2002 flow-tools-0.63 released
* ftlib: ftstat.c - More informative error message when invalid field -
patch from wyu@ateneo.edu
* docs: flow-capture - hosts.allow requires flow-capture-client, not
flow-capture - noted by stewart@net.ohio-state.edu
* flow-capture: TCP client port should be same as UDP netflow port - noted
by stewart@net.ohio-state.edu
* ftlib: ftfil.c: moved primitive initialization code to
parse_primitive_type() to avoid state loss when 'default'
or 'mask' keyword used before a permit/deny.
* ftlib: ftfil.c: tos, marked_tos, tcp_flags mask applied to flow not
to a copy - noted by nik.hinson@assurance-dynamics.com
* flow-export -f4 wire format - requested by mikeh@ncsa.uiuc.edu
* docs: flow-print.sgml - document column headers.
* flow-report / ftstat.c - added runtime variable binding and output
path substitution support, ie run with -v ROUTER=NYCM and use
output path '/report/@ROUTER/report-out'
* ftlib: ftvar.c - variable binding functions.
* ftlib: ftstat.c - summary-detail report will produce core if no flows
are processed - noted by rjd@merit.edu
* docs: not all targets included in distribution - noted by
Jeje
* ftlib: ftio.c byte order of output not always in synch with flags -
noted by mikeh@ncsa.uiuc.edu
* docs: flow-filter port correction - mhunter@ack.Berkeley.EDU
* ftlib: ftstat.c names option works with IP addresses -- DNS lookups.
req by nik.hinson@assurance-dynamics.com
* ftlib: ftstat.c: min_pps,max_pps,min_bps,max_bps calculations,
reduce memory and CPU footprint if *ps calculations are not selected.
req by nik.hinson@assurance-dynamics.com
* ftlib: ftstat.c: linear-interpolated-flows-octets-packets,first,last,
duration,ip-source-address/source-tag,ip-source-address/destination-tag,
ip-destination-address/source-tag,ip-destination-address/destination-tag,
ip-source/destination-address/source/destination-tag,
ip-source/destination-address/ip-protocol/ip-tos reports.
req by nik.hinson@assurance-dynamics.com
* ftlib: ftstat.c: new fields, index,first,last
req by nik.hinson@assurance-dynamics.com
* ftlib: ftstat.c: integrated mask eval
req by nik.hinson@assurance-dynamics.com
* flow-mask: new - replace mask length based on prefix.
req by nik.hinson@assurance-dynamics.com
* ftlib: fttag.c: tag on tcp-src-port, tcp-dst-port, tcp-port, udp-src-port,
udp-dst-port, udp-port, tos.
req by nik.hinson@assurance-dynamics.com
* ftlib: fttag.c: rework to use jump tables to support more match types
w/o performance impact.
* flow-stat: -f32 did not have symbol lookups enabled, noted by
Michael Redinger in ascii output
automatically parsed as -m option.
* flow-export: fix -m, -m now allows ascii input, ie -m unix_secs,dpkts,doctets
* ftlib: ftstat.c masked tag not restored if filter evaluated to DENY.
* ftlib: ftstat.c bucket record count in header not correct.
* ftlib: ftstat.c ip-address and ip-port to pick up flow-stat -f7 and -f11
style reports. noted by acidic@apricot.fruit.org
* flow-cat / flow-receive: Pay closer attention to FT_FIELD_CAP_START and
FT_FIELD_CAP_END so a bogus capture period is not displayed on
output from flow-receive > file. noted by ylee@net2phone.com
* flow-print: Missing leading 0's on msec formats, noted by
ertoz@cs.umn.edu
* ftlib: ftfil.c: use consistent naming with flow-report
* flow-fanout, flow-receive, flow-capture: handle interrupted recvmsg()
syscall which happens on some linux MP configurations.
* ftlib: ftfil.c - pps/bps not handled correctly - patch from jon@pdx.edu
* flow-print - format 24 from Christian.Bauer@NEFonline.de
* flow-import - Cisco NFC format from torppa@polykoira.megabaud.fi
* flow-capture - more informative err message on bind() failure - noted by
stewart@net.ohio-state.edu
* docs: flow-capture.sgml - no -o option - noted by stewart@net.ohio-state.edu
* flow-search - remove hard coded path, noted by stewart@net.ohio-state.edu
* ftlib: ftdecode.c - ftpdu_verify() can segv on invalid packets < 4 bytes
noted by Eric Stewart stewart@net.ohio-state.edu
* ftlib: ftfil.c - PERMIT/DENY reversed for many when default PERMIT --
noted by Gerhard.Haindl@t-systems.at
* ftlib: ftstat.c - tag mask before filter - noted by wyu@ateneo.edu
* 8-27-2002 flow-tools-0.61 released
* ftlib: strtoull.c - missing ULLONG_MAX - noted by papaleonardos.3@osu.edu
* build: --with-mysql allows path, ie --with-mysql=/usr/local
* ftlib: ftstat.c - don't require FT_XFIELD_SRC_MASK / FT_XFIELD_DST_MASK -
dynamically add the requirement when FT_STAT_OPT_PREFIX_* is set -
noted by mw@uk.yahoo-inc.com
* ftlib: ftio.c - more informative warning when trying to process non
flow-tools files.
* ftlib: ftfile.c - more informative warning when ignoring files.
* ftlib: fttag.c - parser requires 'type' for a match and 'term' in a
definition.
* ftlib: ftdecode.c - allow padded Cat 6K packets.
* flow-receive, flow-capture: no longer need ftio_set_xip() - noted by
mw@uk.yahoo-inc.com
* flow-tag, ftstat: allow retagging - noted by clay@opus.bloomcounty.org
* flow-cat: cleanup error message
* flow-export: len = 0, mysql typo
* ftlib: ftstat.c missed a few , - noted by nik.hinson@assurance-dynamics.com
* 8-15-2002 flow-tools-0.60 released
* flow-capture,flow-receive,flow-fanout: add filter option.
* flow-export: MySQL support based on patch from wyu@ateneo.edu
* ftlib: ftfil.c pps and bps filter.
* build: scripts in bin directory get installed
* build/ftlib: added BSD strtoull.c for DEC portability - noted by
shane.dawalt@wright.edu
* flow-report: future replacement for flow-stat
* ftlib: added ftstat.c - stats and report library
* ftlib: FT_RECGET_* macros
* docs: updated documentation.
* configs: updated asn.txt and asn symbol file
* ftlib: fmt.c - fmt_ipv4prefix() was not processing 0/0 correctly.
* ftlib: ftfil.c - fix memory leak with ftd->name and ftfil->name
* ftlib: ftfil.c - delay primitive resolution until file is parsed
-- a filter-definition can precede a filter-primitive
* ftlib: ftfil.c - time only primitive implemented. Req by wyu@ateneo.edu
* 7-6-2002 flow-tools-0.59 released
* build: ftbuild.h created by configure
* ftlib: ftfil.c - time -> time-date
* flow-cat: -t start_time -T end_time options for file inclusion based on
time/date.
* contrib: update pyflowtools to pyflowtools-0.3.tar.gz
* contrib: updated inter.net to Inter.netPH-1.3.tar.gz
* flow-stat: format 23 bug input/output are u_int16 not u_int8. patch from
Y.Lachin@transtk.ru
* ftlib: ftfil.c - too many hash bits, src/dst reversed, bzero() fed wrong
size. Noted by William Emmanuel S. Yu.
* flow-receive: tag_active should default to null not "". noted by
"Saro Hayan"
* 6-11-2002 flow-tools-0.58 released
* 0.57 dist stats: 815 downloads (651 unique). 253 mailing list members.
* ftlib: fttag.c cleanup, walk_free()
* signal() portability, potential SIGCHLD race condition in flow-capture.
Noted by Jarkko Torppa
* flow-split: split on tags.
* flow-filter: -x nexthop_filter patch from Jen Linkova
* flow-capture,flow-receive: tagging integration.
* ftlib: ftio_header_print() updated for new 8.x agg methods
* flow-nfilter: new improved version of flow-filter
* ftlib: ftfil.c - new flow filtering library
* ftlib: import getdate.c
* ftlib: Unitialized variable in ftio_header_print - noted by
"Dutky, Steve"
* flow-capture,flow-fanout : -p pidfile option.
req by "Ed Ravin"
* flow-filter,flow-tag,flow-xlate: -k (keep time) option.
req by Annie Tong
* flow-gen: tos variance, v1005 support
* ftlib: byte order fix - noted by Y.h.Lee@motorola.com
* ftlib,flow-capture: fix memory leak - noted by Christian.Bauer@NEFkom.de
* flow-fanout: missing #include - noted by Gerhard.Haindl@t-systems.at
* build: autoconf/automake update 2.53/1.6.1
* 4-20-2002 flow-tools-0.57 released
* 0.56 dist stats: 1512 downloads (1269 unique). 209 mailing list members.
* flow-print: avoid divide by 0 when processing corrupt flows (dPkts=0)
* flow-filter: add -o option to OR instead of AND filters. From
Cougar
* ftlib: ftfile_pathname() would not properly generate pathnames for
nesting level -1 and -2. Patch from Arvids ,
also fixed by Chris Timmons .
* docs: add .sgml source to distribution
* contrib: add Robin Sommer's pyflowtools (Python module for ftlib)
* contrib: update inter.net
* flow-fanout: support multiple exporters. Add -S stat_inverval
* flow-tag: new utility. Tag flows using fttag logic.
* docs: clean up html formatting of man pages
* flow-xlate: add -tT options to mask tag
* flow-print: add format 9 for tagged flows
* tcp-port: Joe St Sauver - Napster, FastTrack,
Gnutella, etc
* flow-send: accept -V and -m flags
* flow-capture: tcp client support
* flow-stat: use system qsort() instead of internal.
* build/code: misc harmless compiler warning cleanups
* build/code: install ftlib.a in prefix/lib, install ftlib header files
in prefix/include. Remove HAVE_CONFIG_H dependency. Combine header
files in to ftlib.h
* build: ftbuild.sh hostname -s is not portable, whoami may not be in path
* ftlib: fttag.c tag flows based on ASN, Prefix, or Next-Hop
* ftlib: support.[ch] scan_ip_prefix()
* ftlib: ftchash.c sort_offset is not static
* flow-xlate: count total flows for -d1 stats, default to no compression
* ftlib: import NetBSD radix.c
* flow-merge: E. Larry Lidz not processing all
flows in certain cases.
* flow-export: V1005 mask not set for version 1005
* flow-print: fix -f2 core dump (introduced in 0.56)
* flow-export: fix -f1 core dump (introduced in 0.56)
* 12-28-2001 flow-tools-0.56 released
* cleanup -h in all. Add build information via ftbuild.h
* New SGML documentation.
* Dave Plonka : patch to allow more file rotations
per day.
* flow-filter works with the v8 formats.
* Jos Backus Superfluous trailing \0's in string literals
(actually just need to remove old progname globals)
* Maxim Konovalov : use const for fterr_* formats.
* Paul Dokas : contrib find_scanners. Perl script to
provide compact summarizations of top in/out ip's, ports, etc.
* version 8.6 - 8.14 support
DESTONLY,SRC_DEST,FULL_FLOW,AS_TOS,PROT_PORT_TOS,SRC_PREFIX_TOS,
DST_PREFIX_TOS,PREFIX_TOS,PREFIX_PORT_TOS
* -T TCP flags filter option to flow-filter
* Robert Wariua rwariua@socrates.Berkeley.EDU : contrib acl-filter.tgz.
mrtd + NetFlow. community and as-path acl's.
* Updated inter.net contrib.
* flow-capture - -R option to specify program to execute on rotate. Based on
patch from Stefan Stefanov
* flow-capture,flow-receive - store exporter IP when multiple exporters instead
of 0. patch from Dave Plonka and
Jos Backus
* Solaris compile problem - noted by Dave Hartzell
* initial support for v1005 - tagged version 5
* off by one malloc() bugs in ftio.c and support.c -- core dump noted by
Ferry Korving and probably
"Devon True"
* flow-cat: o: not i: in getopt - Heiko Schlichting
* 7-17-2001 flow-tools-0.55 released
* flow-receive,flow-capture: -S option to emit processed packets every n
minutes.
* flow-receive,flow-capture: accept wildcard source IP, demux on src_ip,
dst_ip, and d_version. xlate to common version when possible.
* flow-stat: update to use ftsym_*()
* flow-stat: format 1,2,3 use hash tables instead of possible overflow
* flow-print: wide output option
* flow-print: update to use ftsym_*()
* ftsym_*() implementation. Dynamic symbol table support.
* scan_ip() will try gethostbyname() if arg looks like a hostname.
* flow-cat: preload header option (-p). Prescans flow files to create
better output header.
* Wilhelm Becker
set SO_REUSEADDR on multicast socket
ttl is u_char, not int
* added flow-import: import flows from cflowd or ASCII CSV formats
* Dave Plonka - patch for configure to emit an
error message if zlib not found.
* flow-profile: removed. Outdated ugly hack.
* flow-export: cflowd binary file implementation.
* fixed off by one bug in fmt_uint8() when formatting value >99
* flow-xlate: Disable header rewrite (stdin)
* flow-export: ASCII CSV (comma separated value) implementation.
* flow-stat: update to use fts3rec_compute_offsets(). Full support for v8.
* flow-stat: engine_type and engine_id reports
* added fts3rec_compute_offsets() - provides a cleaner way to handle
the many export versions.
* 6-22-2001 flow-tools-0.54 released
* added flow-xlate. Allow translations including packet/byte scaling,
AS 0 substitution, classful address masking, flow mask address masking,
and privacy mask. Translate among export version 1, 5, 6, and 7.
* Wilhelm Becker - ftio_write() and
ftio_close() not properly updating bytes written. Add header size to
total size in flow-capture. -E now works in flow-capture again.
* added reference to flow-extract in contrib/README
* flow-stat: more informative header -- suggested by stanislav shalunov
* fixed bug: if using mmap'd files and the flow-file had no records a warning
would be displayed and a single corrupt record would be returned by
ftio_read()
* added Dave Plonka's Cflow perl module to the contrib area.
* added inter.net work from Miguel A.L. Paraz