Compare commits
70 Commits
Author | SHA1 | Date | |
---|---|---|---|
9a6d6292f5 | |||
|
8da06b599b | ||
|
49587e683b | ||
|
4dafc2dc05 | ||
|
3fd30239ff | ||
|
9049c9f50f | ||
|
db100d7eb5 | ||
|
3c0c3f8d33 | ||
|
9d187da615 | ||
|
214091e490 | ||
|
97687605d7 | ||
|
eaecb4c992 | ||
|
11f9159138 | ||
|
ec91b397c3 | ||
|
eab02996bd | ||
|
bddfdb1397 | ||
|
29fb080a2b | ||
|
2fab2cc9e0 | ||
|
79a9c82d20 | ||
|
19a7b2d7e2 | ||
|
e94fbbaac9 | ||
|
5849192c50 | ||
|
0082088cf2 | ||
|
325aea7cae | ||
|
9f0fe95633 | ||
|
27f62a5510 | ||
|
9e2e0c487c | ||
|
2b4cfc7e8a | ||
|
0ea114f8ce | ||
|
c400f52d66 | ||
|
2a829dfbf9 | ||
|
31137a3f5b | ||
|
13131ffb41 | ||
|
0ec4e21237 | ||
|
84be3e45c7 | ||
|
1d2ed37d98 | ||
|
70edef1d92 | ||
![]() |
f999bfe050 | ||
|
fccabf69ab | ||
|
746d1bcd47 | ||
|
be29ad703f | ||
|
0a86642a6e | ||
|
cedc8479a8 | ||
|
9c2e7d6f4a | ||
|
8a9dcb2bc8 | ||
|
eaa7a857c8 | ||
|
c4e8a5b517 | ||
|
020a4d0893 | ||
|
b776f8df70 | ||
|
adfd5e9631 | ||
|
f1b91aaad7 | ||
|
959edbcc18 | ||
|
79d9916c64 | ||
|
a0ac615ed7 | ||
|
99387c0ef9 | ||
|
dbcf7a6776 | ||
|
15afb0a09e | ||
|
0874edfdf8 | ||
|
4bcdc8dad9 | ||
|
b4f08813f9 | ||
|
db4aa2b270 | ||
|
8214edba23 | ||
|
376b3c8c4f | ||
|
b8111e7c7f | ||
|
59e0eaec10 | ||
|
3bf72967fc | ||
|
235fad2e71 | ||
|
659f582b97 | ||
|
41e5ec8d20 | ||
|
7b9fa686a9 |
59
.gitignore
vendored
59
.gitignore
vendored
@ -30,3 +30,62 @@
|
||||
|
||||
# Debug files
|
||||
*.dSYM/
|
||||
|
||||
# Backup files
|
||||
*~
|
||||
|
||||
# Automake generated files
|
||||
/INSTALL
|
||||
/Makefile.in
|
||||
/aclocal.m4
|
||||
/autom4te.cache/
|
||||
/bin/Makefile.in
|
||||
/compile
|
||||
/config.guess
|
||||
/config.h.in
|
||||
/config.sub
|
||||
/configure
|
||||
/depcomp
|
||||
/install-sh
|
||||
/ltmain.sh
|
||||
/man/Makefile.in
|
||||
/missing
|
||||
/test-driver
|
||||
/ylwrap
|
||||
/doc/Makefile.in
|
||||
|
||||
# Configure generated files
|
||||
/Makefile
|
||||
/bin/.deps/
|
||||
/bin/Makefile
|
||||
/config.h
|
||||
/config.log
|
||||
/config.status
|
||||
/extra/nftrack/.deps/
|
||||
/libtool
|
||||
/man/Makefile
|
||||
/stamp-h1
|
||||
/doc/Doxyfile
|
||||
/doc/Makefile
|
||||
|
||||
# Binaries generated by make
|
||||
/bin/.libs/
|
||||
/bin/grammar.c
|
||||
/bin/grammar.h
|
||||
/bin/nfanon
|
||||
/bin/nfcapd
|
||||
/bin/nfdump
|
||||
/bin/nfexpire
|
||||
/bin/nfpcapd
|
||||
/bin/nfprofile
|
||||
/bin/nfreplay
|
||||
/bin/nftrack
|
||||
/bin/scanner.c
|
||||
/bin/sfcapd
|
||||
/extra/nftrack/.dirstamp
|
||||
|
||||
# Generated docs
|
||||
/doc/doxygen-build.stamp
|
||||
/doc/html/
|
||||
/doc/man/
|
||||
/doc/xml/
|
||||
|
2
AUTHORS
2
AUTHORS
@ -1 +1 @@
|
||||
Peter Haag phaag@users.sourceforge.net
|
||||
Peter Haag peter@people.ops-trust.net
|
||||
|
80
ChangeLog
80
ChangeLog
@ -1,3 +1,83 @@
|
||||
2018-06-24
|
||||
- Fix bookkeeper type - use key_t
|
||||
- Add multiple packet repeaters to nfcapd/sfcapd. Up to 8 repeaters (-R) can be defined.
|
||||
- Ignore OSX .DS_Store files in -R file list
|
||||
- Add CISCO ASA elements initiatorPackets (298) responderPackets (299)
|
||||
- Merge #120 pull request for -z parameter to nfreplay
|
||||
- Update man page nfreplay
|
||||
|
||||
2018-05-06
|
||||
- New bookkeeper hash broke NfSen. Fixed. ported back to release 1.6.17
|
||||
|
||||
2018-04-20
|
||||
- Release 1.6.17
|
||||
|
||||
2018-04-20
|
||||
- Fix bug in sorting when guessing flow direction. Issue #92
|
||||
- Update nfdump.1 man page for xsrcport & xdstport aggregations. Request #109
|
||||
- Fix minor bugs
|
||||
- Fix definition for InfluxDB in configure.ac Issue #98
|
||||
|
||||
2018-04-01
|
||||
- Add program exit in nfx.c after panic with correupt data file
|
||||
- Add missing size check when reading nfdump 1.5.x common record blocks
|
||||
- Add missing option -M in man page. Issue #103
|
||||
- Add Fix processing of influx URL in nfprofile
|
||||
|
||||
2018-02-11
|
||||
- Add missing json output format in nfdump help text
|
||||
- Add missing -v option in nfreplay help text
|
||||
|
||||
2018-01-06
|
||||
- Merge pull request #51 Influxdb from Luca. Thx for the patch
|
||||
|
||||
2018-01-01
|
||||
- IPFIX time stamps - Fix elements #21,#22 offset calculation, but timestamps not yet evaluated. (#160)
|
||||
- IPFIX add fwd status tag #89 compatible to v9 (1byte)
|
||||
|
||||
2017-12-31
|
||||
- IPFIX sampling - sampling algorithm no longer required for tag #34
|
||||
- IPFIX sampling add tags #305 and #304 - set them identical to #34, #35
|
||||
|
||||
2017-12-30
|
||||
- Add new output format json. Print each record as individual json object
|
||||
|
||||
2017-12-28
|
||||
- Add sampling elements ID 302,304,305. put them identical to ID 48,49,50
|
||||
- Add option to label filter terms. syntax: (<filter>) %labelname.
|
||||
- Add %lbl option to print flow label in output
|
||||
- Update nfdump(1) man page for flowlabels
|
||||
|
||||
2017-12-27
|
||||
- Add ipfix delta timestamp elements 158/159.
|
||||
- Update sflow code to commit 7322984 of https://github.com/sflow/sflowtool
|
||||
- Cleanup sflow code - uncomment unnecessary code
|
||||
- Fix header includes"
|
||||
- Fix 64bit fts compat issue in fts_compat.c
|
||||
- Add more detailed autogen.sh - softlink bootstrap
|
||||
|
||||
2017-12-22
|
||||
- Fix potential memory leaks in nfpcapd
|
||||
|
||||
2017-12-21
|
||||
- Fix wrong offset calculation if unknown options are found
|
||||
- Add x-late src/dst ip aggregation, if compiled with NSEL support
|
||||
|
||||
2017-12-17
|
||||
- Add ipfix sampling. Process option template/record with sampling elements 34 and 35
|
||||
- Report updates on existing samplers in v9 only if values change. issue 84
|
||||
|
||||
2017-11-05 v1.6.16
|
||||
|
||||
2017-12-10
|
||||
- Add lz4 compression
|
||||
- Remove old xstat legancy code, not needed
|
||||
- Remove automake files from git
|
||||
|
||||
2017-12-03
|
||||
- Fix old 1.6.15 tags
|
||||
- Fix minor issues and compiler warnings
|
||||
|
||||
2017-10-22
|
||||
- Add support for CISCO IOS 8 bytes timestamps ID 21/22
|
||||
- Fix issue #72 - multiple stat output
|
||||
|
370
INSTALL
370
INSTALL
@ -1,370 +0,0 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved. This file is offered as-is,
|
||||
without warranty of any kind.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell command `./configure && make && make install'
|
||||
should configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package. Some packages provide this
|
||||
`INSTALL' file but do not implement all of the features documented
|
||||
below. The lack of an optional feature in a given package is not
|
||||
necessarily a bug. More recommendations for GNU packages can be found
|
||||
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package, generally using the just-built uninstalled binaries.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation. When installing into a prefix owned by root, it is
|
||||
recommended that the package be configured and built as a regular
|
||||
user, and only the `make install' phase executed with root
|
||||
privileges.
|
||||
|
||||
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||
this time using the binaries in their final installed location.
|
||||
This target does not install anything. Running this target as a
|
||||
regular user, particularly if the prior `make install' required
|
||||
root privileges, verifies that the installation completed
|
||||
correctly.
|
||||
|
||||
6. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
7. Often, you can also type `make uninstall' to remove the installed
|
||||
files again. In practice, not all packages have tested that
|
||||
uninstallation works correctly, even though it is required by the
|
||||
GNU Coding Standards.
|
||||
|
||||
8. Some packages, particularly those that use Automake, provide `make
|
||||
distcheck', which can by used by developers to test that all other
|
||||
targets like `make install' and `make uninstall' work correctly.
|
||||
This target is generally not run by end users.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'. This
|
||||
is known as a "VPATH" build.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
On MacOS X 10.5 and later systems, you can create libraries and
|
||||
executables that work on multiple system types--known as "fat" or
|
||||
"universal" binaries--by specifying multiple `-arch' options to the
|
||||
compiler but only a single `-arch' option to the preprocessor. Like
|
||||
this:
|
||||
|
||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CPP="gcc -E" CXXCPP="g++ -E"
|
||||
|
||||
This is not guaranteed to produce working output in all cases, you
|
||||
may have to build one architecture at a time and combine the results
|
||||
using the `lipo' tool if you have problems.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||
absolute file name.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them. In general, the
|
||||
default for these options is expressed in terms of `${prefix}', so that
|
||||
specifying just `--prefix' will affect all of the other directory
|
||||
specifications that were not explicitly provided.
|
||||
|
||||
The most portable way to affect installation locations is to pass the
|
||||
correct locations to `configure'; however, many packages provide one or
|
||||
both of the following shortcuts of passing variable assignments to the
|
||||
`make install' command line to change installation locations without
|
||||
having to reconfigure or recompile.
|
||||
|
||||
The first method involves providing an override variable for each
|
||||
affected directory. For example, `make install
|
||||
prefix=/alternate/directory' will choose an alternate location for all
|
||||
directory configuration variables that were expressed in terms of
|
||||
`${prefix}'. Any directories that were specified during `configure',
|
||||
but not in terms of `${prefix}', must each be overridden at install
|
||||
time for the entire installation to be relocated. The approach of
|
||||
makefile variable overrides for each directory variable is required by
|
||||
the GNU Coding Standards, and ideally causes no recompilation.
|
||||
However, some platforms have known limitations with the semantics of
|
||||
shared libraries that end up requiring recompilation when using this
|
||||
method, particularly noticeable in packages that use GNU Libtool.
|
||||
|
||||
The second method involves providing the `DESTDIR' variable. For
|
||||
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||
`/alternate/directory' before all installation names. The approach of
|
||||
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||
does not work on platforms that have drive letters. On the other hand,
|
||||
it does better at avoiding recompilation issues, and works well even
|
||||
when some directory options were not specified in terms of `${prefix}'
|
||||
at `configure' time.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Some packages offer the ability to configure how verbose the
|
||||
execution of `make' will be. For these packages, running `./configure
|
||||
--enable-silent-rules' sets the default to minimal output, which can be
|
||||
overridden with `make V=1'; while running `./configure
|
||||
--disable-silent-rules' sets the default to verbose, which can be
|
||||
overridden with `make V=0'.
|
||||
|
||||
Particular systems
|
||||
==================
|
||||
|
||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||
CC is not installed, it is recommended to use the following options in
|
||||
order to use an ANSI C compiler:
|
||||
|
||||
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
HP-UX `make' updates targets which have the same time stamps as
|
||||
their prerequisites, which makes it generally unusable when shipped
|
||||
generated files such as `configure' are involved. Use GNU `make'
|
||||
instead.
|
||||
|
||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||
to try
|
||||
|
||||
./configure CC="cc"
|
||||
|
||||
and if that doesn't work, try
|
||||
|
||||
./configure CC="cc -nodtk"
|
||||
|
||||
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||
directory contains several dysfunctional programs; working variants of
|
||||
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||
in your `PATH', put it _after_ `/usr/bin'.
|
||||
|
||||
On Haiku, software installed for all users goes in `/boot/common',
|
||||
not `/usr/local'. It is recommended to use the following options:
|
||||
|
||||
./configure --prefix=/boot/common
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS
|
||||
KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf limitation. Until the limitation is lifted, you can use
|
||||
this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of all of the options to `configure', and exit.
|
||||
|
||||
`--help=short'
|
||||
`--help=recursive'
|
||||
Print a summary of the options unique to this package's
|
||||
`configure', and exit. The `short' variant lists options used
|
||||
only in the top level, while the `recursive' variant lists options
|
||||
also present in any nested packages.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--prefix=DIR'
|
||||
Use DIR as the installation prefix. *note Installation Names::
|
||||
for more details, including other options available for fine-tuning
|
||||
the installation locations.
|
||||
|
||||
`--no-create'
|
||||
`-n'
|
||||
Run the configure checks, but stop before creating any output
|
||||
files.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
@ -1,4 +1,4 @@
|
||||
|
||||
SUBDIRS = . bin man
|
||||
SUBDIRS = . bin man doc
|
||||
|
||||
EXTRA_DIST = CreateSubHierarchy.pl LICENSE BSD-license.txt extra/PortTracker.pm extra/nfdump.spec bootstrap
|
||||
|
818
Makefile.in
818
Makefile.in
@ -1,818 +0,0 @@
|
||||
# Makefile.in generated by automake 1.15.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2017 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@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
|
||||
$(am__configure_deps) $(am__DIST_COMMON)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
cscope distdir dist dist-all distcheck
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
|
||||
$(LISP)config.h.in
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
CSCOPE = cscope
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \
|
||||
COPYING ChangeLog INSTALL NEWS README compile config.guess \
|
||||
config.sub depcomp install-sh ltmain.sh missing ylwrap
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
if test -d "$(distdir)"; then \
|
||||
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -rf "$(distdir)" \
|
||||
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||
else :; fi
|
||||
am__post_remove_distdir = $(am__remove_distdir)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
DIST_TARGETS = dist-gzip
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
FTS_OBJ = @FTS_OBJ@
|
||||
FT_INCLUDES = @FT_INCLUDES@
|
||||
FT_LDFLAGS = @FT_LDFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||
LFLAGS = @LFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PCAP_LIBS = @PCAP_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
RRD_LIBS = @RRD_LIBS@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
YFLAGS = @YFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
SUBDIRS = . bin man
|
||||
EXTRA_DIST = CreateSubHierarchy.pl LICENSE BSD-license.txt extra/PortTracker.pm extra/nfdump.spec bootstrap
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
|
||||
$(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
config.h: stamp-h1
|
||||
@test -f $@ || rm -f stamp-h1
|
||||
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: $(am__configure_deps)
|
||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool config.lt
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscope: cscope.files
|
||||
test ! -s cscope.files \
|
||||
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
||||
clean-cscope:
|
||||
-rm -f cscope.files
|
||||
cscope.files: clean-cscope cscopelist
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-test -n "$(am__skip_mode_fix)" \
|
||||
|| find "$(distdir)" -type d ! -perm -755 \
|
||||
-exec chmod u+rwx,go+rx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-lzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
@echo WARNING: "Support for distribution archives compressed with" \
|
||||
"legacy program 'compress' is deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
@echo WARNING: "Support for shar distribution archives is" \
|
||||
"deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist dist-all:
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lz*) \
|
||||
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir)
|
||||
chmod u+w $(distdir)
|
||||
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
test -d $(distdir)/_build || exit 0; \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build/sub \
|
||||
&& ../../configure \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
--srcdir=../.. --prefix="$$dc_install_base" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& cd "$$am__cwd" \
|
||||
|| exit 1
|
||||
$(am__post_remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@test -n '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: trying to run $@ with an empty' \
|
||||
'$$(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
$(am__cd) '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(am__recursive_targets) all install-am install-strip
|
||||
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
|
||||
am--refresh check check-am clean clean-cscope clean-generic \
|
||||
clean-libtool cscope cscopelist-am ctags ctags-am dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
|
||||
dist-xz dist-zip distcheck distclean distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags distcleancheck \
|
||||
distdir distuninstallcheck dvi dvi-am html html-am info \
|
||||
info-am install install-am install-data install-data-am \
|
||||
install-dvi install-dvi-am install-exec install-exec-am \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-man install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||
uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# 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:
|
97
README.md
97
README.md
@ -1,11 +1,11 @@
|
||||
# nfdump
|
||||
|
||||
Stable Release v1.6.15
|
||||
Stable Release v1.6.17
|
||||
|
||||
See the Changelog file for all changes in release 1.6.15
|
||||
See the Changelog file for all changes in release 1.6.17
|
||||
|
||||
nfdump is a toolset in oder to collect and process netflow data, sent from netflow compatible devices. The toolset supports netflow __v1__, __v5/v7__ __v9__ and __IPFIX__. See the details below for a more details explanation.
|
||||
The toolset also contains a collector to collect __sflow__ data. nfdump supports IPv4 as well as IPv6.
|
||||
nfdump is a toolset in oder to collect and process netflow and sflow data, sent from netflow/sflow compatible devices.
|
||||
The toolset supports netflow __v1__, __v5/v7__,__v9__,__IPFIX__ and __SFLOW__. nfdump supports IPv4 as well as IPv6.
|
||||
|
||||
nfdump is used as backend toolset for __NfSen__.
|
||||
|
||||
@ -21,12 +21,11 @@ __Note:__ The older nfdump-1.5.8-2-NSEL is __not compatible__ with nfdump > 1.6.
|
||||
|
||||
## IPFIX
|
||||
|
||||
nfdump contains an IPFIX module for decoding IPFIX data. It
|
||||
is does not support the full IPFIX definition, however is considered stable.
|
||||
nfdump contains an IPFIX module for decoding IPFIX flow data. It
|
||||
does not support the full IPFIX definition.
|
||||
|
||||
* Supports basically same feature set of elements as netflow_v9 module
|
||||
* Only UDP traffic is accepted no SCTP so far
|
||||
* No sampling support.
|
||||
* Only UDP traffic is accepted no tCP/SCTP
|
||||
* If you would like to see more IPFIX support, please contact me.
|
||||
|
||||
---
|
||||
@ -36,9 +35,8 @@ is does not support the full IPFIX definition, however is considered stable.
|
||||
|
||||
### Building and config options
|
||||
|
||||
The toolset is build upon the autotools framework, which means __./configure ./make__ and __./make install__ should do the trick
|
||||
In case of an autoconf error, run 'autoreconf -if' first to sync with your
|
||||
local version of autotools
|
||||
The toolset is build upon the autotools framework. Run `./autogen.sh` first.
|
||||
Afterwards `./configure` `make` and `make install` should do the trick.
|
||||
|
||||
The following config options are available:
|
||||
|
||||
@ -73,9 +71,9 @@ every 5 min ) The netflow versions mentioned above are read transparently
|
||||
Multiple netflow streams can be collected by a single or collector.
|
||||
nfcapd can listen on IPv6 or IPv4. Furthermore multicast is supported.
|
||||
|
||||
|
||||
__nfdump__ - process collected netflow records.
|
||||
Nfdump reads the netflow data from one or many files stored by nfcapd. It's filter syntax is similar to tcpdump ( pcap like ) but adapted for netflow.
|
||||
Nfdump reads the netflow data from one or many files stored by nfcapd.
|
||||
It's filter syntax is similar to tcpdump ( pcap like ) but adapted for netflow.
|
||||
If you like tcpdump you will like nfdump. nfdump displays netflow
|
||||
data and/or creates top N statistics of flows, bytes, packets. nfdump
|
||||
has a powerful and flexible flow aggregation including bi-directional
|
||||
@ -92,11 +90,11 @@ __nfreplay__ - netflow replay
|
||||
Reads the netflow data from the files stored by nfcapd and sends it
|
||||
over the network to another host.
|
||||
|
||||
####Optional binaries:
|
||||
#### Optional binaries:
|
||||
|
||||
__sfcapd__ - sflow collector daemon
|
||||
scfapd collects sflow data and stores it into nfcapd comaptible files.
|
||||
"sfcapd includes sFlow(TM) code, freely available from http://www.inmon.com/".
|
||||
"sfcapd includes sFlow(TM) code, freely available from https://github.com/sflow/sflowtool.
|
||||
|
||||
__nfprofile__ - netflow profiler. Required by NfSen
|
||||
Reads the netflow data from the files stored by nfcapd. Filters the
|
||||
@ -108,7 +106,7 @@ __nftrack__ - Port tracking decoder for NfSen plugin PortTracker.
|
||||
__ft2nfdump__ - flow-tools flow converter
|
||||
ft2nfdump converts flow-tools data into nfdump format.
|
||||
|
||||
__nfreade__r - Framework for programmers
|
||||
__nfreader__ - Framework for programmers
|
||||
nfreader is a framework to read nfdump files for any other purpose.
|
||||
Own C code can be added to process flows. nfreader is not installed
|
||||
|
||||
@ -117,19 +115,32 @@ parse_csv.pl reads nfdump csv output and print the flows to stdout.
|
||||
This program is intended to be a framework for post processing flows
|
||||
for any other purpose.
|
||||
|
||||
####Notes for sflow users:
|
||||
#### Notes for sflow users:
|
||||
sfcapd and nfcapd can be used concurrently to collect netflow and sflow
|
||||
data at the same time. Generic command line options apply to both
|
||||
collectors likewise. sfcapd's sflow decoding module is based on InMon's sflowtool code and supports similar fields as nfcapd does for netflow v9, which is a subset of all available sflow fields in an sflow record. More fields may be integrated in future versions of sfcapd.
|
||||
collectors likewise. sfcapd's sflow decoding module is based on InMon's
|
||||
sflowtool code and supports similar fields as nfcapd does for netflow v9,
|
||||
which is a subset of all available sflow fields in an sflow record.
|
||||
More fields may be integrated in future versions of sfcapd.
|
||||
|
||||
---
|
||||
|
||||
###Compression
|
||||
Binary data files can optionally be compressed using either the fast LZO1X-1 compression, or the efficient bzip2 methode.
|
||||
If you compress automatically flows while they are collected, only the LZO1X-1 methode is recommended. bzip uses about 30 times more CPU than
|
||||
LZO1X-1. Used bzip2 to archive data, which may reduce the disk usage again by a factor of 2. The compression of flow files can be changed any time later with nfdump.
|
||||
For more details on LZO1X-1 see, http://www.oberhumer.com/opensource/lzo.
|
||||
You can check the compression speed for your system by doing ./nftest <path/to/an/existing/netflow/file>.
|
||||
### Compression
|
||||
Binary data files can optionally be compressed using either the fast LZO1X-1 compression,
|
||||
LZ4 or the efficient but slow bzip2 methode.
|
||||
If you compress automatically flows while they are collected, LZO1X-1 or LZ4 methodes are
|
||||
recommended. bzip2 uses about 30 times more CPU than LZO1X-1. Use bzip2 to archive netflow
|
||||
data, which may reduce the disk usage again by a factor of 2. The compression of flow files
|
||||
can be changed any time with nfdump -J <num>
|
||||
For more details on each methde, see:
|
||||
|
||||
LZO1X-1: http://www.oberhumer.com/opensource/lzo
|
||||
|
||||
LZ4: https://github.com/lz4/lz4
|
||||
|
||||
bzip2: http://www.bzip.org
|
||||
|
||||
You can check the compression speed for your system by running ./nftest <path/to/an/existing/netflow/file>.
|
||||
|
||||
---
|
||||
|
||||
@ -328,8 +339,10 @@ NF9_OUT_SRC_MAC | 81
|
||||
NF9_FORWARDING_STATUS | 89
|
||||
NF9_BGP_ADJ_NEXT_AS | 128
|
||||
NF9_BGP_ADJ_PREV_AS | 129
|
||||
|
|
||||
__CISCO ASA NSEL extension - Network Security Event Logging__ |
|
||||
|
||||
### CISCO ASA NSEL extension - Network Security Event Logging__
|
||||
Tag | ID
|
||||
----|---
|
||||
NF_F_FLOW_BYTES | 85
|
||||
NF_F_CONN_ID | 148
|
||||
NF_F_FLOW_CREATE_TIME_MSEC | 152
|
||||
@ -350,16 +363,20 @@ NF_F_XLATE_DST_ADDR_IPV4 | 40002
|
||||
NF_F_XLATE_SRC_PORT | 40003
|
||||
NF_F_XLATE_DST_PORT | 40004
|
||||
NF_F_FW_EVENT | 40005
|
||||
|
|
||||
__Cisco ASR 1000 series NEL extension - Nat Event Logging__|
|
||||
|
||||
### Cisco ASR 1000 series NEL extension - Nat Event Logging__
|
||||
Tag | ID
|
||||
----|---
|
||||
NF_N_NAT_EVENT | 230
|
||||
NF_N_INGRESS_VRFID | 234
|
||||
NF_N_NAT_INSIDE_GLOBAL_IPV4 | 225
|
||||
NF_N_NAT_OUTSIDE_GLOBAL_IPV4 | 226
|
||||
NF_N_POST_NAPT_SRC_PORT | 227
|
||||
NF_N_POST_NAPT_DST_PORT | 228
|
||||
|
|
||||
__latency extensions for nfpcapd and nprobe__|
|
||||
|
||||
### latency extensions for nfpcapd and nprobe__
|
||||
Tag | ID
|
||||
----|---
|
||||
NF9_NPROBE_CLIENT_NW_DELAY_SEC | 57554
|
||||
NF9_NPROBE_CLIENT_NW_DELAY_USEC | 57555
|
||||
NF9_NPROBE_SERVER_NW_DELAY_SEC | 57556
|
||||
@ -377,7 +394,25 @@ which may or may not be stored into the data file. Therefore the v9 templates co
|
||||
|
||||
###Sampling
|
||||
By default, the sampling rate is set to 1 (unsampled) or to
|
||||
any given value specified by the -s cmd line option. If sampling information is found in the netflow stream, it overwrites the default value. Sampling is automatically recognised when announced in v9 option templates (tags #48, #49, #50 ) or in the unofficial v5 header hack. Note: Not all platforms (or IOS versions) support exporting sampling information in netflow data, even if sampling is configured. The number of bytes/packets in each netflow record is automatically multiplied by the sampling rate. The total number of flows is not changed as this is not accurate enough. (Small flows versus large flows)
|
||||
any given value specified by the -s cmd line option. If sampling information is found
|
||||
in the netflow stream, it overwrites the default value. Sampling is automatically
|
||||
recognised when announced in v9 option templates (tags #48, #49, #50 ), (tag #34, #35)
|
||||
or in the unofficial v5 header hack.
|
||||
Note: Not all platforms (or IOS versions) support exporting sampling information in
|
||||
netflow data, even if sampling is configured. The number of bytes/packets in each
|
||||
netflow record is automatically multiplied by the sampling rate. The total number of
|
||||
flows is not changed as this is not accurate enough. (Small flows versus large flows)
|
||||
|
||||
###InfluxDB
|
||||
You can send nfprofile stats data to an influxdb database. The data are the same of rrd files.
|
||||
For enable this option you need libcurl dev package installed, use --enable-influxdb for configure the project and the nfprofile command should be invoked with option: -i <influxurl> .
|
||||
Example: -i http://localhost:8086/write?db=mydb&u=user&p=pass
|
||||
The parameters for auth (&u=user&p=pass) are optional.
|
||||
Then you get the stats data on influxdb mydb in the measurement nfsen_stats.
|
||||
|
||||
For put the stats of live profile you need to apply a patch to nfsen (in extra/nfsen) and add in nfsen.conf the option:
|
||||
$influxdb_url="http://mydbhost.local:8086/write?db=nfsen";
|
||||
as example I added a preconfigured grafana dashboard in extra/grafana/Nfsen_Stats.json .
|
||||
|
||||
---
|
||||
|
||||
|
6
ToDo
6
ToDo
@ -1,6 +0,0 @@
|
||||
- Add ASA support.
|
||||
Port CISCO code from nfdump-1.5.7-nsel to v1.6
|
||||
- Add packeteer code from wm.edu
|
||||
- Add BGP merge for AS filtering
|
||||
- Add index for fast IP lookup.
|
||||
- ... and endless new user ideas ...
|
10181
aclocal.m4
vendored
10181
aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
74
autogen.sh
Executable file
74
autogen.sh
Executable file
@ -0,0 +1,74 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
case "$(uname)" in
|
||||
Darwin)
|
||||
LIBTOOLIZE=${LIBTOOLIZE:-glibtoolize}
|
||||
;;
|
||||
*)
|
||||
LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
|
||||
;;
|
||||
esac
|
||||
AUTORECONF=${AUTORECONF:-autoreconf}
|
||||
ACLOCAL=${ACLOCAL:-aclocal}
|
||||
AUTOCONF=${AUTOCONF:-autoconf}
|
||||
AUTOHEADER=${AUTOHEADER:-autoheader}
|
||||
AUTOMAKE=${AUTOMAKE:-automake}
|
||||
|
||||
# Check we have all tools installed
|
||||
check_command() {
|
||||
command -v "${1}" > /dev/null 2>&1 || {
|
||||
>&2 echo "autogen.sh: could not find \`$1'. \`$1' is required to run autogen.sh."
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
check_command "$LIBTOOLIZE"
|
||||
check_command "$AUTORECONF"
|
||||
check_command "$ACLOCAL"
|
||||
check_command "$AUTOCONF"
|
||||
check_command "$AUTOHEADER"
|
||||
check_command "$AUTOMAKE"
|
||||
|
||||
# Absence of pkg-config or misconfiguration can make some odd error
|
||||
# messages, we check if it is installed correctly. See:
|
||||
# https://blogs.oracle.com/mandy/entry/autoconf_weirdness
|
||||
#
|
||||
# We cannot just check for pkg-config command, we need to check for
|
||||
# PKG_* macros. The pkg-config command can be defined in ./configure,
|
||||
# we cannot tell anything when not present.
|
||||
check_pkg_config() {
|
||||
grep -q '^AC_DEFUN.*PKG_CHECK_MODULES' aclocal.m4 || {
|
||||
cat <<EOF >&2
|
||||
autogen.sh: could not find PKG_CHECK_MODULES macro.
|
||||
|
||||
Either pkg-config is not installed on your system or
|
||||
\`pkg.m4' is missing or not found by aclocal.
|
||||
|
||||
If \`pkg.m4' is installed at an unusual location, re-run
|
||||
\`autogen.sh' by setting \`ACLOCAL_FLAGS':
|
||||
|
||||
ACLOCAL_FLAGS="-I <prefix>/share/aclocal" ./autogen.sh
|
||||
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
echo "autogen.sh: reconfigure with autoreconf"
|
||||
${AUTORECONF} -vif -I m4 || {
|
||||
echo "autogen.sh: autoreconf has failed ($?), let's do it manually"
|
||||
[ -f ./configure.ac ] || [ -f ./configure.in ] || continue
|
||||
echo "autogen.sh: configure `basename $PWD`"
|
||||
${ACLOCAL} -I m4 ${ACLOCAL_FLAGS}
|
||||
check_pkg_config
|
||||
${LIBTOOLIZE} --automake --copy --force
|
||||
${ACLOCAL} -I m4 ${ACLOCAL_FLAGS}
|
||||
${AUTOCONF} --force
|
||||
${AUTOHEADER}
|
||||
${AUTOMAKE} --add-missing --copy --force-missing
|
||||
}
|
||||
|
||||
echo "autogen.sh: for the next step, run './configure' [or './configure --help' to check available options]"
|
||||
|
||||
exit 0
|
File diff suppressed because it is too large
Load Diff
19007
autom4te.cache/output.1
19007
autom4te.cache/output.1
File diff suppressed because it is too large
Load Diff
19011
autom4te.cache/output.2
19011
autom4te.cache/output.2
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,373 +0,0 @@
|
||||
# This file was generated.
|
||||
# It contains the lists of macros which have been traced.
|
||||
# It can be safely removed.
|
||||
|
||||
@request = (
|
||||
bless( [
|
||||
'0',
|
||||
1,
|
||||
[
|
||||
'/opt/local/share/autoconf'
|
||||
],
|
||||
[
|
||||
'/opt/local/share/autoconf/autoconf/autoconf.m4f',
|
||||
'-',
|
||||
'/opt/local/share/aclocal-1.15/internal/ac-config-macro-dirs.m4',
|
||||
'/opt/local/share/aclocal-1.15/amversion.m4',
|
||||
'/opt/local/share/aclocal-1.15/auxdir.m4',
|
||||
'/opt/local/share/aclocal-1.15/cond.m4',
|
||||
'/opt/local/share/aclocal-1.15/depend.m4',
|
||||
'/opt/local/share/aclocal-1.15/depout.m4',
|
||||
'/opt/local/share/aclocal-1.15/init.m4',
|
||||
'/opt/local/share/aclocal-1.15/install-sh.m4',
|
||||
'/opt/local/share/aclocal-1.15/lead-dot.m4',
|
||||
'/opt/local/share/aclocal-1.15/make.m4',
|
||||
'/opt/local/share/aclocal-1.15/missing.m4',
|
||||
'/opt/local/share/aclocal-1.15/options.m4',
|
||||
'/opt/local/share/aclocal-1.15/prog-cc-c-o.m4',
|
||||
'/opt/local/share/aclocal-1.15/runlog.m4',
|
||||
'/opt/local/share/aclocal-1.15/sanity.m4',
|
||||
'/opt/local/share/aclocal-1.15/silent.m4',
|
||||
'/opt/local/share/aclocal-1.15/strip.m4',
|
||||
'/opt/local/share/aclocal-1.15/substnot.m4',
|
||||
'/opt/local/share/aclocal-1.15/tar.m4',
|
||||
'configure.ac'
|
||||
],
|
||||
{
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AM_SET_DEPDIR' => 1,
|
||||
'AM_SET_LEADING_DOT' => 1,
|
||||
'AU_DEFUN' => 1,
|
||||
'_AM_MANGLE_OPTION' => 1,
|
||||
'AM_MAKE_INCLUDE' => 1,
|
||||
'_AM_CONFIG_MACRO_DIRS' => 1,
|
||||
'AC_DEFUN' => 1,
|
||||
'_AM_SUBST_NOTMAKE' => 1,
|
||||
'AM_SILENT_RULES' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'AM_MISSING_PROG' => 1,
|
||||
'_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
|
||||
'AC_CONFIG_MACRO_DIR' => 1,
|
||||
'AC_CONFIG_MACRO_DIR_TRACE' => 1,
|
||||
'_AM_SET_OPTION' => 1,
|
||||
'_AM_SET_OPTIONS' => 1,
|
||||
'_AM_AUTOCONF_VERSION' => 1,
|
||||
'_AM_PROG_TAR' => 1,
|
||||
'_AM_PROG_CC_C_O' => 1,
|
||||
'm4_pattern_forbid' => 1,
|
||||
'_AM_DEPENDENCIES' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'AM_RUN_LOG' => 1,
|
||||
'AM_MISSING_HAS_RUN' => 1,
|
||||
'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
|
||||
'_AC_AM_CONFIG_HEADER_HOOK' => 1,
|
||||
'AM_PROG_INSTALL_STRIP' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AC_DEFUN_ONCE' => 1,
|
||||
'AM_SANITY_CHECK' => 1,
|
||||
'include' => 1,
|
||||
'm4_include' => 1,
|
||||
'AM_PROG_INSTALL_SH' => 1,
|
||||
'_AM_IF_OPTION' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'AM_SUBST_NOTMAKE' => 1,
|
||||
'AM_AUX_DIR_EXPAND' => 1,
|
||||
'AM_DEP_TRACK' => 1
|
||||
}
|
||||
], 'Autom4te::Request' ),
|
||||
bless( [
|
||||
'1',
|
||||
1,
|
||||
[
|
||||
'/opt/local/share/autoconf'
|
||||
],
|
||||
[
|
||||
'/opt/local/share/autoconf/autoconf/autoconf.m4f',
|
||||
'aclocal.m4',
|
||||
'configure.ac'
|
||||
],
|
||||
{
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AM_PROG_FC_C_O' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AM_PATH_GUILE' => 1,
|
||||
'AM_PROG_MKDIR_P' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'AC_CONFIG_FILES' => 1,
|
||||
'sinclude' => 1,
|
||||
'AM_PROG_AR' => 1,
|
||||
'AC_CANONICAL_TARGET' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'AC_SUBST_TRACE' => 1,
|
||||
'_LT_AC_TAGCONFIG' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'LT_INIT' => 1,
|
||||
'AM_XGETTEXT_OPTION' => 1,
|
||||
'LT_CONFIG_LTDL_DIR' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AM_PROG_F77_C_O' => 1,
|
||||
'AM_POT_TOOLS' => 1,
|
||||
'include' => 1,
|
||||
'm4_include' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'AM_ENABLE_MULTILIB' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AC_FC_FREEFORM' => 1,
|
||||
'AM_EXTRA_RECURSIVE_TARGETS' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_CANONICAL_BUILD' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'AM_PROG_MOC' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'AM_SILENT_RULES' => 1,
|
||||
'AC_LIBSOURCE' => 1,
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AM_PROG_CXX_C_O' => 1,
|
||||
'AM_NLS' => 1,
|
||||
'm4_pattern_forbid' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AC_REQUIRE_AUX_FILE' => 1,
|
||||
'LT_SUPPORTED_TAG' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'_AM_COND_ELSE' => 1,
|
||||
'_AM_MAKEFILE_INCLUDE' => 1,
|
||||
'_AM_SUBST_NOTMAKE' => 1,
|
||||
'AM_MAKEFILE_INCLUDE' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_FC_PP_SRCEXT' => 1,
|
||||
'_AM_COND_ENDIF' => 1,
|
||||
'AC_FC_PP_DEFINE' => 1,
|
||||
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
|
||||
'_AM_COND_IF' => 1,
|
||||
'AC_FC_SRCEXT' => 1
|
||||
}
|
||||
], 'Autom4te::Request' ),
|
||||
bless( [
|
||||
'2',
|
||||
1,
|
||||
[
|
||||
'/opt/local/share/autoconf'
|
||||
],
|
||||
[
|
||||
'/opt/local/share/autoconf/autoconf/autoconf.m4f',
|
||||
'-',
|
||||
'/opt/local/share/aclocal-1.15/internal/ac-config-macro-dirs.m4',
|
||||
'/opt/local/share/aclocal/libtool.m4',
|
||||
'/opt/local/share/aclocal/ltargz.m4',
|
||||
'/opt/local/share/aclocal/ltdl.m4',
|
||||
'/opt/local/share/aclocal/ltoptions.m4',
|
||||
'/opt/local/share/aclocal/ltsugar.m4',
|
||||
'/opt/local/share/aclocal/ltversion.m4',
|
||||
'/opt/local/share/aclocal/lt~obsolete.m4',
|
||||
'/opt/local/share/aclocal-1.15/amversion.m4',
|
||||
'/opt/local/share/aclocal-1.15/auxdir.m4',
|
||||
'/opt/local/share/aclocal-1.15/cond.m4',
|
||||
'/opt/local/share/aclocal-1.15/depend.m4',
|
||||
'/opt/local/share/aclocal-1.15/depout.m4',
|
||||
'/opt/local/share/aclocal-1.15/init.m4',
|
||||
'/opt/local/share/aclocal-1.15/install-sh.m4',
|
||||
'/opt/local/share/aclocal-1.15/lead-dot.m4',
|
||||
'/opt/local/share/aclocal-1.15/make.m4',
|
||||
'/opt/local/share/aclocal-1.15/missing.m4',
|
||||
'/opt/local/share/aclocal-1.15/options.m4',
|
||||
'/opt/local/share/aclocal-1.15/prog-cc-c-o.m4',
|
||||
'/opt/local/share/aclocal-1.15/runlog.m4',
|
||||
'/opt/local/share/aclocal-1.15/sanity.m4',
|
||||
'/opt/local/share/aclocal-1.15/silent.m4',
|
||||
'/opt/local/share/aclocal-1.15/strip.m4',
|
||||
'/opt/local/share/aclocal-1.15/substnot.m4',
|
||||
'/opt/local/share/aclocal-1.15/tar.m4',
|
||||
'configure.ac'
|
||||
],
|
||||
{
|
||||
'AC_LIBTOOL_DLOPEN' => 1,
|
||||
'AC_LIBTOOL_LANG_RC_CONFIG' => 1,
|
||||
'AC_LIBTOOL_POSTDEP_PREDEP' => 1,
|
||||
'_LT_AC_LOCK' => 1,
|
||||
'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1,
|
||||
'AM_DISABLE_STATIC' => 1,
|
||||
'AC_LIBTOOL_CXX' => 1,
|
||||
'AC_LTDL_SHLIBEXT' => 1,
|
||||
'_LT_PATH_TOOL_PREFIX' => 1,
|
||||
'AM_SANITY_CHECK' => 1,
|
||||
'AC_LIBTOOL_PROG_COMPILER_PIC' => 1,
|
||||
'_LT_CC_BASENAME' => 1,
|
||||
'LT_CMD_MAX_LEN' => 1,
|
||||
'AC_DISABLE_SHARED' => 1,
|
||||
'AC_LIBTOOL_SETUP' => 1,
|
||||
'_LT_PROG_CXX' => 1,
|
||||
'LT_SYS_MODULE_PATH' => 1,
|
||||
'_LT_LIBOBJ' => 1,
|
||||
'_LT_AC_TAGVAR' => 1,
|
||||
'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1,
|
||||
'AM_DEP_TRACK' => 1,
|
||||
'AC_LIBTOOL_GCJ' => 1,
|
||||
'AM_SUBST_NOTMAKE' => 1,
|
||||
'_AM_MANGLE_OPTION' => 1,
|
||||
'AM_MAKE_INCLUDE' => 1,
|
||||
'AC_LTDL_SYS_DLOPEN_DEPLIBS' => 1,
|
||||
'AC_LIB_LTDL' => 1,
|
||||
'_LT_DLL_DEF_P' => 1,
|
||||
'_LT_LINKER_OPTION' => 1,
|
||||
'_LT_AC_FILE_LTDLL_C' => 1,
|
||||
'AC_LTDL_OBJDIR' => 1,
|
||||
'AC_DEFUN' => 1,
|
||||
'LT_FUNC_DLSYM_USCORE' => 1,
|
||||
'_LT_AC_SHELL_INIT' => 1,
|
||||
'LT_LIB_DLLOAD' => 1,
|
||||
'AC_CONFIG_MACRO_DIR_TRACE' => 1,
|
||||
'_AM_SET_OPTIONS' => 1,
|
||||
'AC_LIBTOOL_F77' => 1,
|
||||
'LT_FUNC_ARGZ' => 1,
|
||||
'AM_RUN_LOG' => 1,
|
||||
'_LT_AC_LANG_F77_CONFIG' => 1,
|
||||
'_LT_COMPILER_BOILERPLATE' => 1,
|
||||
'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
|
||||
'AC_LTDL_ENABLE_INSTALL' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'LTDL_INIT' => 1,
|
||||
'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1,
|
||||
'AC_LIBTOOL_CONFIG' => 1,
|
||||
'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1,
|
||||
'AC_DEFUN_ONCE' => 1,
|
||||
'_LT_AC_PROG_ECHO_BACKSLASH' => 1,
|
||||
'AC_PROG_LD_GNU' => 1,
|
||||
'AM_MISSING_HAS_RUN' => 1,
|
||||
'_AC_AM_CONFIG_HEADER_HOOK' => 1,
|
||||
'm4_include' => 1,
|
||||
'AC_LTDL_PREOPEN' => 1,
|
||||
'AM_PROG_INSTALL_SH' => 1,
|
||||
'LT_CONFIG_LTDL_DIR' => 1,
|
||||
'LT_LIB_M' => 1,
|
||||
'AC_LTDL_DLLIB' => 1,
|
||||
'_LT_PROG_FC' => 1,
|
||||
'LT_AC_PROG_GCJ' => 1,
|
||||
'_LT_AC_LANG_GCJ' => 1,
|
||||
'_AC_PROG_LIBTOOL' => 1,
|
||||
'LT_INIT' => 1,
|
||||
'AC_LIBTOOL_LANG_CXX_CONFIG' => 1,
|
||||
'AC_PATH_TOOL_PREFIX' => 1,
|
||||
'AC_LIBTOOL_LINKER_OPTION' => 1,
|
||||
'LTDL_CONVENIENCE' => 1,
|
||||
'AC_PROG_LD' => 1,
|
||||
'_LT_AC_LANG_CXX_CONFIG' => 1,
|
||||
'AC_LTDL_SYSSEARCHPATH' => 1,
|
||||
'AC_DISABLE_STATIC' => 1,
|
||||
'LT_PATH_NM' => 1,
|
||||
'LT_PATH_LD' => 1,
|
||||
'AC_LTDL_SHLIBPATH' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'LT_PROG_GO' => 1,
|
||||
'AC_LIBTOOL_COMPILER_OPTION' => 1,
|
||||
'_LTDL_SETUP' => 1,
|
||||
'_LT_PREPARE_SED_QUOTE_VARS' => 1,
|
||||
'LT_OUTPUT' => 1,
|
||||
'AC_CHECK_LIBM' => 1,
|
||||
'_AM_PROG_CC_C_O' => 1,
|
||||
'AC_LIBTOOL_FC' => 1,
|
||||
'_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
|
||||
'AC_LIBTOOL_PROG_CC_C_O' => 1,
|
||||
'LT_LANG' => 1,
|
||||
'LT_SYS_DLOPEN_DEPLIBS' => 1,
|
||||
'AC_PROG_EGREP' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1,
|
||||
'LT_SYS_DLSEARCH_PATH' => 1,
|
||||
'_LT_AC_LANG_F77' => 1,
|
||||
'AM_PROG_INSTALL_STRIP' => 1,
|
||||
'AC_LIBTOOL_SYS_LIB_STRIP' => 1,
|
||||
'_LT_COMPILER_OPTION' => 1,
|
||||
'AM_PROG_LD' => 1,
|
||||
'include' => 1,
|
||||
'AM_DISABLE_SHARED' => 1,
|
||||
'_LT_WITH_SYSROOT' => 1,
|
||||
'AC_LIBTOOL_PICMODE' => 1,
|
||||
'AC_LIBLTDL_CONVENIENCE' => 1,
|
||||
'AC_WITH_LTDL' => 1,
|
||||
'_LT_AC_TAGCONFIG' => 1,
|
||||
'_LT_AC_LANG_GCJ_CONFIG' => 1,
|
||||
'AC_PATH_MAGIC' => 1,
|
||||
'AC_PROG_LD_RELOAD_FLAG' => 1,
|
||||
'AC_LIBTOOL_LANG_F77_CONFIG' => 1,
|
||||
'AC_LIBTOOL_OBJDIR' => 1,
|
||||
'AM_AUX_DIR_EXPAND' => 1,
|
||||
'_LT_AC_TRY_DLOPEN_SELF' => 1,
|
||||
'AM_PROG_LIBTOOL' => 1,
|
||||
'_LT_AC_PROG_CXXCPP' => 1,
|
||||
'_LT_AC_LANG_C_CONFIG' => 1,
|
||||
'AC_DISABLE_FAST_INSTALL' => 1,
|
||||
'LTDL_INSTALLABLE' => 1,
|
||||
'AC_LTDL_DLSYM_USCORE' => 1,
|
||||
'AM_SET_LEADING_DOT' => 1,
|
||||
'AM_ENABLE_STATIC' => 1,
|
||||
'_AM_SUBST_NOTMAKE' => 1,
|
||||
'AC_LIBTOOL_DLOPEN_SELF' => 1,
|
||||
'LT_PROG_GCJ' => 1,
|
||||
'LT_PROG_RC' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'_LT_AC_SYS_COMPILER' => 1,
|
||||
'_AM_PROG_TAR' => 1,
|
||||
'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1,
|
||||
'LT_AC_PROG_SED' => 1,
|
||||
'm4_pattern_forbid' => 1,
|
||||
'_AM_DEPENDENCIES' => 1,
|
||||
'AC_LTDL_SYMBOL_USCORE' => 1,
|
||||
'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1,
|
||||
'AM_SILENT_RULES' => 1,
|
||||
'AC_CONFIG_MACRO_DIR' => 1,
|
||||
'LT_AC_PROG_RC' => 1,
|
||||
'LTOBSOLETE_VERSION' => 1,
|
||||
'LTSUGAR_VERSION' => 1,
|
||||
'AC_PROG_NM' => 1,
|
||||
'_LT_LINKER_BOILERPLATE' => 1,
|
||||
'AC_ENABLE_STATIC' => 1,
|
||||
'AC_LIBTOOL_RC' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
|
||||
'AC_DEPLIBS_CHECK_METHOD' => 1,
|
||||
'AC_ENABLE_SHARED' => 1,
|
||||
'AC_ENABLE_FAST_INSTALL' => 1,
|
||||
'LTVERSION_VERSION' => 1,
|
||||
'_LT_AC_LANG_RC_CONFIG' => 1,
|
||||
'_LT_AC_SYS_LIBPATH_AIX' => 1,
|
||||
'_LT_REQUIRED_DARWIN_CHECKS' => 1,
|
||||
'LT_AC_PROG_EGREP' => 1,
|
||||
'AM_PROG_NM' => 1,
|
||||
'_AM_IF_OPTION' => 1,
|
||||
'AC_LIBTOOL_PROG_LD_SHLIBS' => 1,
|
||||
'_LT_AC_LANG_CXX' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1,
|
||||
'AC_LIBTOOL_WIN32_DLL' => 1,
|
||||
'LT_SYS_DLOPEN_SELF' => 1,
|
||||
'AC_LIBLTDL_INSTALLABLE' => 1,
|
||||
'_AM_CONFIG_MACRO_DIRS' => 1,
|
||||
'AM_SET_DEPDIR' => 1,
|
||||
'LT_SYS_SYMBOL_USCORE' => 1,
|
||||
'LT_SYS_MODULE_EXT' => 1,
|
||||
'AU_DEFUN' => 1,
|
||||
'_LT_PROG_LTMAIN' => 1,
|
||||
'LTOPTIONS_VERSION' => 1,
|
||||
'_LT_PROG_F77' => 1,
|
||||
'LT_SUPPORTED_TAG' => 1,
|
||||
'_LT_AC_CHECK_DLFCN' => 1,
|
||||
'_LT_PROG_ECHO_BACKSLASH' => 1,
|
||||
'AM_MISSING_PROG' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'_AM_SET_OPTION' => 1,
|
||||
'AC_LIBTOOL_LANG_C_CONFIG' => 1,
|
||||
'_AM_AUTOCONF_VERSION' => 1,
|
||||
'AM_ENABLE_SHARED' => 1,
|
||||
'LT_WITH_LTDL' => 1
|
||||
}
|
||||
], 'Autom4te::Request' )
|
||||
);
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,909 +0,0 @@
|
||||
m4trace:configure.in:6: -1- AC_INIT([nfdump], [1.6.13], [phaag@users.sourceforge.net])
|
||||
m4trace:configure.in:6: -1- m4_pattern_forbid([^_?A[CHUM]_])
|
||||
m4trace:configure.in:6: -1- m4_pattern_forbid([_AC_])
|
||||
m4trace:configure.in:6: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^AS_FLAGS$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_forbid([^_?m4_])
|
||||
m4trace:configure.in:6: -1- m4_pattern_forbid([^dnl$])
|
||||
m4trace:configure.in:6: -1- m4_pattern_forbid([^_?AS_])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([SHELL])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([SHELL])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^SHELL$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([PATH_SEPARATOR])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([PATH_SEPARATOR])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PATH_SEPARATOR$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([PACKAGE_NAME])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_NAME$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([PACKAGE_TARNAME])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([PACKAGE_VERSION])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_VERSION$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([PACKAGE_STRING])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_STRING$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([PACKAGE_URL])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_URL$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([exec_prefix], [NONE])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([exec_prefix])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^exec_prefix$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([prefix], [NONE])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([prefix])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^prefix$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([program_transform_name], [s,x,x,])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([program_transform_name])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^program_transform_name$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([bindir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^bindir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([sbindir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^sbindir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([libexecdir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^libexecdir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([datarootdir], ['${prefix}/share'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([datarootdir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^datarootdir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([datadir], ['${datarootdir}'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([datadir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^datadir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([sysconfdir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^sysconfdir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([sharedstatedir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^sharedstatedir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([localstatedir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^localstatedir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([includedir], ['${prefix}/include'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([includedir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^includedir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([oldincludedir], ['/usr/include'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([oldincludedir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^oldincludedir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
|
||||
['${datarootdir}/doc/${PACKAGE_TARNAME}'],
|
||||
['${datarootdir}/doc/${PACKAGE}'])])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([docdir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^docdir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([infodir], ['${datarootdir}/info'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([infodir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^infodir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([htmldir], ['${docdir}'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([htmldir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^htmldir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([dvidir], ['${docdir}'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([dvidir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^dvidir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([pdfdir], ['${docdir}'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([pdfdir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^pdfdir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([psdir], ['${docdir}'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([psdir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^psdir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([libdir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^libdir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([localedir], ['${datarootdir}/locale'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([localedir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^localedir$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([mandir], ['${datarootdir}/man'])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([mandir])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^mandir$])
|
||||
m4trace:configure.in:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_NAME$])
|
||||
m4trace:configure.in:6: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
|
||||
@%:@undef PACKAGE_NAME])
|
||||
m4trace:configure.in:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
|
||||
m4trace:configure.in:6: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
|
||||
@%:@undef PACKAGE_TARNAME])
|
||||
m4trace:configure.in:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_VERSION$])
|
||||
m4trace:configure.in:6: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
|
||||
@%:@undef PACKAGE_VERSION])
|
||||
m4trace:configure.in:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_STRING$])
|
||||
m4trace:configure.in:6: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
|
||||
@%:@undef PACKAGE_STRING])
|
||||
m4trace:configure.in:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
|
||||
m4trace:configure.in:6: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
|
||||
@%:@undef PACKAGE_BUGREPORT])
|
||||
m4trace:configure.in:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE_URL$])
|
||||
m4trace:configure.in:6: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */
|
||||
@%:@undef PACKAGE_URL])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([DEFS])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([DEFS])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^DEFS$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([ECHO_C])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([ECHO_C])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^ECHO_C$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([ECHO_N])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([ECHO_N])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^ECHO_N$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([ECHO_T])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([ECHO_T])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^ECHO_T$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([LIBS])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([LIBS])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^LIBS$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([build_alias])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([build_alias])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^build_alias$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([host_alias])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([host_alias])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^host_alias$])
|
||||
m4trace:configure.in:6: -1- AC_SUBST([target_alias])
|
||||
m4trace:configure.in:6: -1- AC_SUBST_TRACE([target_alias])
|
||||
m4trace:configure.in:6: -1- m4_pattern_allow([^target_alias$])
|
||||
m4trace:configure.in:9: -1- AC_CONFIG_HEADERS([config.h])
|
||||
m4trace:configure.in:10: -1- AM_INIT_AUTOMAKE([subdir-objects])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
|
||||
m4trace:configure.in:10: -1- AM_AUTOMAKE_VERSION([1.14.1])
|
||||
m4trace:configure.in:10: -1- AC_REQUIRE_AUX_FILE([install-sh])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([INSTALL_PROGRAM])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([INSTALL_PROGRAM])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([INSTALL_SCRIPT])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([INSTALL_SCRIPT])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([INSTALL_DATA])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([INSTALL_DATA])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^INSTALL_DATA$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([am__isrc], [' -I$(srcdir)'])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([am__isrc])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^am__isrc$])
|
||||
m4trace:configure.in:10: -1- _AM_SUBST_NOTMAKE([am__isrc])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([CYGPATH_W])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([CYGPATH_W])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^CYGPATH_W$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([PACKAGE])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^PACKAGE$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([VERSION])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^VERSION$])
|
||||
m4trace:configure.in:10: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^PACKAGE$])
|
||||
m4trace:configure.in:10: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
|
||||
@%:@undef PACKAGE])
|
||||
m4trace:configure.in:10: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^VERSION$])
|
||||
m4trace:configure.in:10: -1- AH_OUTPUT([VERSION], [/* Version number of package */
|
||||
@%:@undef VERSION])
|
||||
m4trace:configure.in:10: -1- AC_REQUIRE_AUX_FILE([missing])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([ACLOCAL])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([ACLOCAL])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^ACLOCAL$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([AUTOCONF])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([AUTOCONF])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^AUTOCONF$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([AUTOMAKE])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([AUTOMAKE])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^AUTOMAKE$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([AUTOHEADER])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([AUTOHEADER])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^AUTOHEADER$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([MAKEINFO])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([MAKEINFO])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^MAKEINFO$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([install_sh])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([install_sh])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^install_sh$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([STRIP])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([STRIP])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^STRIP$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$])
|
||||
m4trace:configure.in:10: -1- AC_REQUIRE_AUX_FILE([install-sh])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([MKDIR_P])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([MKDIR_P])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^MKDIR_P$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([mkdir_p])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^mkdir_p$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([AWK])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([AWK])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^AWK$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([SET_MAKE])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([SET_MAKE])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^SET_MAKE$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([am__leading_dot])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([am__leading_dot])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^am__leading_dot$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([AMTAR], ['$${TAR-tar}'])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([AMTAR])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^AMTAR$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([am__tar])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([am__tar])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^am__tar$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([am__untar])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([am__untar])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^am__untar$])
|
||||
m4trace:configure.in:10: -1- AM_SILENT_RULES
|
||||
m4trace:configure.in:10: -1- AC_SUBST([AM_V])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([AM_V])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^AM_V$])
|
||||
m4trace:configure.in:10: -1- _AM_SUBST_NOTMAKE([AM_V])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([AM_DEFAULT_V])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([AM_DEFAULT_V])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^AM_DEFAULT_V$])
|
||||
m4trace:configure.in:10: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([AM_DEFAULT_VERBOSITY])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([AM_DEFAULT_VERBOSITY])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([AM_BACKSLASH])
|
||||
m4trace:configure.in:10: -1- AC_SUBST_TRACE([AM_BACKSLASH])
|
||||
m4trace:configure.in:10: -1- m4_pattern_allow([^AM_BACKSLASH$])
|
||||
m4trace:configure.in:10: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([CC])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([CFLAGS])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([CFLAGS])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CFLAGS$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([LDFLAGS])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([LDFLAGS])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^LDFLAGS$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([LIBS])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([LIBS])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^LIBS$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([CPPFLAGS])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([CPPFLAGS])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CPPFLAGS$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([CC])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([CC])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([CC])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([CC])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([ac_ct_CC])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^ac_ct_CC$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([EXEEXT])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^EXEEXT$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([OBJEXT])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^OBJEXT$])
|
||||
m4trace:configure.in:13: -1- AC_REQUIRE_AUX_FILE([compile])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([DEPDIR])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^DEPDIR$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([am__include])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([am__include])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^am__include$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([am__quote])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([am__quote])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^am__quote$])
|
||||
m4trace:configure.in:13: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([AMDEP_TRUE])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([AMDEP_TRUE])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^AMDEP_TRUE$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([AMDEP_FALSE])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([AMDEP_FALSE])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^AMDEP_FALSE$])
|
||||
m4trace:configure.in:13: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE])
|
||||
m4trace:configure.in:13: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([AMDEPBACKSLASH])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([AMDEPBACKSLASH])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^AMDEPBACKSLASH$])
|
||||
m4trace:configure.in:13: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([am__nodep])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([am__nodep])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^am__nodep$])
|
||||
m4trace:configure.in:13: -1- _AM_SUBST_NOTMAKE([am__nodep])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([CCDEPMODE])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^CCDEPMODE$])
|
||||
m4trace:configure.in:13: -1- AM_CONDITIONAL([am__fastdepCC], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([am__fastdepCC_TRUE])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^am__fastdepCC_TRUE$])
|
||||
m4trace:configure.in:13: -1- AC_SUBST([am__fastdepCC_FALSE])
|
||||
m4trace:configure.in:13: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE])
|
||||
m4trace:configure.in:13: -1- m4_pattern_allow([^am__fastdepCC_FALSE$])
|
||||
m4trace:configure.in:13: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE])
|
||||
m4trace:configure.in:13: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE])
|
||||
m4trace:configure.in:14: -1- AM_PROG_CC_C_O
|
||||
m4trace:configure.in:18: -1- _m4_warn([obsolete], [The macro `ac_cv_prog_gcc' is obsolete.
|
||||
You should run autoupdate.], [../../lib/autoconf/c.m4:436: ac_cv_prog_gcc is expanded from...
|
||||
configure.in:18: the top level])
|
||||
m4trace:configure.in:65: -1- AC_SUBST([YACC])
|
||||
m4trace:configure.in:65: -1- AC_SUBST_TRACE([YACC])
|
||||
m4trace:configure.in:65: -1- m4_pattern_allow([^YACC$])
|
||||
m4trace:configure.in:65: -1- AC_SUBST([YACC])
|
||||
m4trace:configure.in:65: -1- AC_SUBST_TRACE([YACC])
|
||||
m4trace:configure.in:65: -1- m4_pattern_allow([^YACC$])
|
||||
m4trace:configure.in:65: -1- AC_SUBST([YFLAGS])
|
||||
m4trace:configure.in:65: -1- AC_SUBST_TRACE([YFLAGS])
|
||||
m4trace:configure.in:65: -1- m4_pattern_allow([^YFLAGS$])
|
||||
m4trace:configure.in:66: -1- AC_SUBST([LEX])
|
||||
m4trace:configure.in:66: -1- AC_SUBST_TRACE([LEX])
|
||||
m4trace:configure.in:66: -1- m4_pattern_allow([^LEX$])
|
||||
m4trace:configure.in:66: -1- AC_SUBST([LEX_OUTPUT_ROOT], [$ac_cv_prog_lex_root])
|
||||
m4trace:configure.in:66: -1- AC_SUBST_TRACE([LEX_OUTPUT_ROOT])
|
||||
m4trace:configure.in:66: -1- m4_pattern_allow([^LEX_OUTPUT_ROOT$])
|
||||
m4trace:configure.in:66: -1- AC_SUBST([LEXLIB])
|
||||
m4trace:configure.in:66: -1- AC_SUBST_TRACE([LEXLIB])
|
||||
m4trace:configure.in:66: -1- m4_pattern_allow([^LEXLIB$])
|
||||
m4trace:configure.in:66: -1- AC_DEFINE_TRACE_LITERAL([YYTEXT_POINTER])
|
||||
m4trace:configure.in:66: -1- m4_pattern_allow([^YYTEXT_POINTER$])
|
||||
m4trace:configure.in:66: -1- AH_OUTPUT([YYTEXT_POINTER], [/* Define to 1 if `lex\' declares `yytext\' as a `char *\' by default, not a
|
||||
`char@<:@@:>@\'. */
|
||||
@%:@undef YYTEXT_POINTER])
|
||||
m4trace:configure.in:105: -2- AH_OUTPUT([HAVE_LIBZ], [/* Define to 1 if you have the `z\' library (-lz). */
|
||||
@%:@undef HAVE_LIBZ])
|
||||
m4trace:configure.in:105: -2- AC_DEFINE_TRACE_LITERAL([HAVE_LIBZ])
|
||||
m4trace:configure.in:105: -2- m4_pattern_allow([^HAVE_LIBZ$])
|
||||
m4trace:configure.in:120: -2- AM_CONDITIONAL([FT2NFDUMP], [true])
|
||||
m4trace:configure.in:120: -2- AC_SUBST([FT2NFDUMP_TRUE])
|
||||
m4trace:configure.in:120: -2- AC_SUBST_TRACE([FT2NFDUMP_TRUE])
|
||||
m4trace:configure.in:120: -2- m4_pattern_allow([^FT2NFDUMP_TRUE$])
|
||||
m4trace:configure.in:120: -2- AC_SUBST([FT2NFDUMP_FALSE])
|
||||
m4trace:configure.in:120: -2- AC_SUBST_TRACE([FT2NFDUMP_FALSE])
|
||||
m4trace:configure.in:120: -2- m4_pattern_allow([^FT2NFDUMP_FALSE$])
|
||||
m4trace:configure.in:120: -2- _AM_SUBST_NOTMAKE([FT2NFDUMP_TRUE])
|
||||
m4trace:configure.in:120: -2- _AM_SUBST_NOTMAKE([FT2NFDUMP_FALSE])
|
||||
m4trace:configure.in:122: -2- AM_CONDITIONAL([FT2NFDUMP], [false])
|
||||
m4trace:configure.in:122: -2- AC_SUBST([FT2NFDUMP_TRUE])
|
||||
m4trace:configure.in:122: -2- AC_SUBST_TRACE([FT2NFDUMP_TRUE])
|
||||
m4trace:configure.in:122: -2- m4_pattern_allow([^FT2NFDUMP_TRUE$])
|
||||
m4trace:configure.in:122: -2- AC_SUBST([FT2NFDUMP_FALSE])
|
||||
m4trace:configure.in:122: -2- AC_SUBST_TRACE([FT2NFDUMP_FALSE])
|
||||
m4trace:configure.in:122: -2- m4_pattern_allow([^FT2NFDUMP_FALSE$])
|
||||
m4trace:configure.in:122: -2- _AM_SUBST_NOTMAKE([FT2NFDUMP_TRUE])
|
||||
m4trace:configure.in:122: -2- _AM_SUBST_NOTMAKE([FT2NFDUMP_FALSE])
|
||||
m4trace:configure.in:156: -2- AM_CONDITIONAL([NFPROFILE], [false])
|
||||
m4trace:configure.in:156: -2- AC_SUBST([NFPROFILE_TRUE])
|
||||
m4trace:configure.in:156: -2- AC_SUBST_TRACE([NFPROFILE_TRUE])
|
||||
m4trace:configure.in:156: -2- m4_pattern_allow([^NFPROFILE_TRUE$])
|
||||
m4trace:configure.in:156: -2- AC_SUBST([NFPROFILE_FALSE])
|
||||
m4trace:configure.in:156: -2- AC_SUBST_TRACE([NFPROFILE_FALSE])
|
||||
m4trace:configure.in:156: -2- m4_pattern_allow([^NFPROFILE_FALSE$])
|
||||
m4trace:configure.in:156: -2- _AM_SUBST_NOTMAKE([NFPROFILE_TRUE])
|
||||
m4trace:configure.in:156: -2- _AM_SUBST_NOTMAKE([NFPROFILE_FALSE])
|
||||
m4trace:configure.in:126: -1- AC_SUBST([RRD_LIBS])
|
||||
m4trace:configure.in:126: -1- AC_SUBST_TRACE([RRD_LIBS])
|
||||
m4trace:configure.in:126: -1- m4_pattern_allow([^RRD_LIBS$])
|
||||
m4trace:configure.in:126: -1- AH_OUTPUT([HAVE_RRD_H], [/* Define to 1 if you have the <rrd.h> header file. */
|
||||
@%:@undef HAVE_RRD_H])
|
||||
m4trace:configure.in:126: -1- AC_SUBST([CPP])
|
||||
m4trace:configure.in:126: -1- AC_SUBST_TRACE([CPP])
|
||||
m4trace:configure.in:126: -1- m4_pattern_allow([^CPP$])
|
||||
m4trace:configure.in:126: -1- AC_SUBST([CPPFLAGS])
|
||||
m4trace:configure.in:126: -1- AC_SUBST_TRACE([CPPFLAGS])
|
||||
m4trace:configure.in:126: -1- m4_pattern_allow([^CPPFLAGS$])
|
||||
m4trace:configure.in:126: -1- AC_SUBST([CPP])
|
||||
m4trace:configure.in:126: -1- AC_SUBST_TRACE([CPP])
|
||||
m4trace:configure.in:126: -1- m4_pattern_allow([^CPP$])
|
||||
m4trace:configure.in:126: -1- AC_SUBST([GREP])
|
||||
m4trace:configure.in:126: -1- AC_SUBST_TRACE([GREP])
|
||||
m4trace:configure.in:126: -1- m4_pattern_allow([^GREP$])
|
||||
m4trace:configure.in:126: -1- AC_SUBST([EGREP])
|
||||
m4trace:configure.in:126: -1- AC_SUBST_TRACE([EGREP])
|
||||
m4trace:configure.in:126: -1- m4_pattern_allow([^EGREP$])
|
||||
m4trace:configure.in:126: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
|
||||
m4trace:configure.in:126: -1- m4_pattern_allow([^STDC_HEADERS$])
|
||||
m4trace:configure.in:126: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
|
||||
@%:@undef STDC_HEADERS])
|
||||
m4trace:configure.in:126: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
@%:@undef HAVE_SYS_TYPES_H])
|
||||
m4trace:configure.in:126: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
@%:@undef HAVE_SYS_STAT_H])
|
||||
m4trace:configure.in:126: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
@%:@undef HAVE_STDLIB_H])
|
||||
m4trace:configure.in:126: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
|
||||
@%:@undef HAVE_STRING_H])
|
||||
m4trace:configure.in:126: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
|
||||
@%:@undef HAVE_MEMORY_H])
|
||||
m4trace:configure.in:126: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
|
||||
@%:@undef HAVE_STRINGS_H])
|
||||
m4trace:configure.in:126: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
@%:@undef HAVE_INTTYPES_H])
|
||||
m4trace:configure.in:126: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
|
||||
@%:@undef HAVE_STDINT_H])
|
||||
m4trace:configure.in:126: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
|
||||
@%:@undef HAVE_UNISTD_H])
|
||||
m4trace:configure.in:126: -1- AC_DEFINE_TRACE_LITERAL([HAVE_RRD_H])
|
||||
m4trace:configure.in:126: -1- m4_pattern_allow([^HAVE_RRD_H$])
|
||||
m4trace:configure.in:126: -1- AM_CONDITIONAL([NFPROFILE], [true])
|
||||
m4trace:configure.in:126: -1- AC_SUBST([NFPROFILE_TRUE])
|
||||
m4trace:configure.in:126: -1- AC_SUBST_TRACE([NFPROFILE_TRUE])
|
||||
m4trace:configure.in:126: -1- m4_pattern_allow([^NFPROFILE_TRUE$])
|
||||
m4trace:configure.in:126: -1- AC_SUBST([NFPROFILE_FALSE])
|
||||
m4trace:configure.in:126: -1- AC_SUBST_TRACE([NFPROFILE_FALSE])
|
||||
m4trace:configure.in:126: -1- m4_pattern_allow([^NFPROFILE_FALSE$])
|
||||
m4trace:configure.in:126: -1- _AM_SUBST_NOTMAKE([NFPROFILE_TRUE])
|
||||
m4trace:configure.in:126: -1- _AM_SUBST_NOTMAKE([NFPROFILE_FALSE])
|
||||
m4trace:configure.in:126: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [../../lib/autoconf/general.m4:2748: AC_RUN_IFELSE is expanded from...
|
||||
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
|
||||
../../lib/autoconf/general.m4:1462: AC_ARG_ENABLE is expanded from...
|
||||
configure.in:126: the top level])
|
||||
m4trace:configure.in:189: -2- AM_CONDITIONAL([NFTRACK], [false])
|
||||
m4trace:configure.in:189: -2- AC_SUBST([NFTRACK_TRUE])
|
||||
m4trace:configure.in:189: -2- AC_SUBST_TRACE([NFTRACK_TRUE])
|
||||
m4trace:configure.in:189: -2- m4_pattern_allow([^NFTRACK_TRUE$])
|
||||
m4trace:configure.in:189: -2- AC_SUBST([NFTRACK_FALSE])
|
||||
m4trace:configure.in:189: -2- AC_SUBST_TRACE([NFTRACK_FALSE])
|
||||
m4trace:configure.in:189: -2- m4_pattern_allow([^NFTRACK_FALSE$])
|
||||
m4trace:configure.in:189: -2- _AM_SUBST_NOTMAKE([NFTRACK_TRUE])
|
||||
m4trace:configure.in:189: -2- _AM_SUBST_NOTMAKE([NFTRACK_FALSE])
|
||||
m4trace:configure.in:159: -1- AC_SUBST([RRD_LIBS])
|
||||
m4trace:configure.in:159: -1- AC_SUBST_TRACE([RRD_LIBS])
|
||||
m4trace:configure.in:159: -1- m4_pattern_allow([^RRD_LIBS$])
|
||||
m4trace:configure.in:159: -1- AH_OUTPUT([HAVE_RRD_H], [/* Define to 1 if you have the <rrd.h> header file. */
|
||||
@%:@undef HAVE_RRD_H])
|
||||
m4trace:configure.in:159: -1- AC_DEFINE_TRACE_LITERAL([HAVE_RRD_H])
|
||||
m4trace:configure.in:159: -1- m4_pattern_allow([^HAVE_RRD_H$])
|
||||
m4trace:configure.in:159: -1- AM_CONDITIONAL([NFTRACK], [true])
|
||||
m4trace:configure.in:159: -1- AC_SUBST([NFTRACK_TRUE])
|
||||
m4trace:configure.in:159: -1- AC_SUBST_TRACE([NFTRACK_TRUE])
|
||||
m4trace:configure.in:159: -1- m4_pattern_allow([^NFTRACK_TRUE$])
|
||||
m4trace:configure.in:159: -1- AC_SUBST([NFTRACK_FALSE])
|
||||
m4trace:configure.in:159: -1- AC_SUBST_TRACE([NFTRACK_FALSE])
|
||||
m4trace:configure.in:159: -1- m4_pattern_allow([^NFTRACK_FALSE$])
|
||||
m4trace:configure.in:159: -1- _AM_SUBST_NOTMAKE([NFTRACK_TRUE])
|
||||
m4trace:configure.in:159: -1- _AM_SUBST_NOTMAKE([NFTRACK_FALSE])
|
||||
m4trace:configure.in:159: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [../../lib/autoconf/general.m4:2748: AC_RUN_IFELSE is expanded from...
|
||||
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
|
||||
../../lib/autoconf/general.m4:1462: AC_ARG_ENABLE is expanded from...
|
||||
configure.in:159: the top level])
|
||||
m4trace:configure.in:194: -1- AM_CONDITIONAL([SFLOW], [test "$enable_sflow" = yes])
|
||||
m4trace:configure.in:194: -1- AC_SUBST([SFLOW_TRUE])
|
||||
m4trace:configure.in:194: -1- AC_SUBST_TRACE([SFLOW_TRUE])
|
||||
m4trace:configure.in:194: -1- m4_pattern_allow([^SFLOW_TRUE$])
|
||||
m4trace:configure.in:194: -1- AC_SUBST([SFLOW_FALSE])
|
||||
m4trace:configure.in:194: -1- AC_SUBST_TRACE([SFLOW_FALSE])
|
||||
m4trace:configure.in:194: -1- m4_pattern_allow([^SFLOW_FALSE$])
|
||||
m4trace:configure.in:194: -1- _AM_SUBST_NOTMAKE([SFLOW_TRUE])
|
||||
m4trace:configure.in:194: -1- _AM_SUBST_NOTMAKE([SFLOW_FALSE])
|
||||
m4trace:configure.in:198: -1- AM_CONDITIONAL([READPCAP], [test "$enable_readpcap" = yes])
|
||||
m4trace:configure.in:198: -1- AC_SUBST([READPCAP_TRUE])
|
||||
m4trace:configure.in:198: -1- AC_SUBST_TRACE([READPCAP_TRUE])
|
||||
m4trace:configure.in:198: -1- m4_pattern_allow([^READPCAP_TRUE$])
|
||||
m4trace:configure.in:198: -1- AC_SUBST([READPCAP_FALSE])
|
||||
m4trace:configure.in:198: -1- AC_SUBST_TRACE([READPCAP_FALSE])
|
||||
m4trace:configure.in:198: -1- m4_pattern_allow([^READPCAP_FALSE$])
|
||||
m4trace:configure.in:198: -1- _AM_SUBST_NOTMAKE([READPCAP_TRUE])
|
||||
m4trace:configure.in:198: -1- _AM_SUBST_NOTMAKE([READPCAP_FALSE])
|
||||
m4trace:configure.in:202: -1- AM_CONDITIONAL([BUILDNFPCAPD], [test "$enable_nfpcapd" = yes])
|
||||
m4trace:configure.in:202: -1- AC_SUBST([BUILDNFPCAPD_TRUE])
|
||||
m4trace:configure.in:202: -1- AC_SUBST_TRACE([BUILDNFPCAPD_TRUE])
|
||||
m4trace:configure.in:202: -1- m4_pattern_allow([^BUILDNFPCAPD_TRUE$])
|
||||
m4trace:configure.in:202: -1- AC_SUBST([BUILDNFPCAPD_FALSE])
|
||||
m4trace:configure.in:202: -1- AC_SUBST_TRACE([BUILDNFPCAPD_FALSE])
|
||||
m4trace:configure.in:202: -1- m4_pattern_allow([^BUILDNFPCAPD_FALSE$])
|
||||
m4trace:configure.in:202: -1- _AM_SUBST_NOTMAKE([BUILDNFPCAPD_TRUE])
|
||||
m4trace:configure.in:202: -1- _AM_SUBST_NOTMAKE([BUILDNFPCAPD_FALSE])
|
||||
m4trace:configure.in:206: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKADDR_SA_LEN])
|
||||
m4trace:configure.in:206: -2- m4_pattern_allow([^HAVE_SOCKADDR_SA_LEN$])
|
||||
m4trace:configure.in:206: -2- AH_OUTPUT([HAVE_SOCKADDR_SA_LEN], [/* define if socket address structures have length fields */
|
||||
@%:@undef HAVE_SOCKADDR_SA_LEN])
|
||||
m4trace:configure.in:210: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY])
|
||||
m4trace:configure.in:210: -1- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY$])
|
||||
m4trace:configure.in:210: -1- AH_OUTPUT([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY], [/* Define to 1 if `ss_family\' is a member of `struct sockaddr_storage\'. */
|
||||
@%:@undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY])
|
||||
m4trace:configure.in:210: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY])
|
||||
m4trace:configure.in:210: -1- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY$])
|
||||
m4trace:configure.in:210: -1- AH_OUTPUT([HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY], [/* Define to 1 if `__ss_family\' is a member of `struct sockaddr_storage\'. */
|
||||
@%:@undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY])
|
||||
m4trace:configure.in:210: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN])
|
||||
m4trace:configure.in:210: -1- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN$])
|
||||
m4trace:configure.in:210: -1- AH_OUTPUT([HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN], [/* Define to 1 if `ss_len\' is a member of `struct sockaddr_storage\'. */
|
||||
@%:@undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN])
|
||||
m4trace:configure.in:210: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN])
|
||||
m4trace:configure.in:210: -1- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN$])
|
||||
m4trace:configure.in:210: -1- AH_OUTPUT([HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN], [/* Define to 1 if `__ss_len\' is a member of `struct sockaddr_storage\'. */
|
||||
@%:@undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN])
|
||||
m4trace:configure.in:210: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_SA_LEN])
|
||||
m4trace:configure.in:210: -1- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_SA_LEN$])
|
||||
m4trace:configure.in:210: -1- AH_OUTPUT([HAVE_STRUCT_SOCKADDR_SA_LEN], [/* Define to 1 if `sa_len\' is a member of `struct sockaddr\'. */
|
||||
@%:@undef HAVE_STRUCT_SOCKADDR_SA_LEN])
|
||||
m4trace:configure.in:220: -1- AC_SUBST([FT_INCLUDES])
|
||||
m4trace:configure.in:220: -1- AC_SUBST_TRACE([FT_INCLUDES])
|
||||
m4trace:configure.in:220: -1- m4_pattern_allow([^FT_INCLUDES$])
|
||||
m4trace:configure.in:221: -1- AC_SUBST([FT_LDFLAGS])
|
||||
m4trace:configure.in:221: -1- AC_SUBST_TRACE([FT_LDFLAGS])
|
||||
m4trace:configure.in:221: -1- m4_pattern_allow([^FT_LDFLAGS$])
|
||||
m4trace:configure.in:222: -1- AC_SUBST([LFLAGS])
|
||||
m4trace:configure.in:222: -1- AC_SUBST_TRACE([LFLAGS])
|
||||
m4trace:configure.in:222: -1- m4_pattern_allow([^LFLAGS$])
|
||||
m4trace:configure.in:226: -1- AH_OUTPUT([HAVE_GETHOSTBYNAME], [/* Define to 1 if you have the `gethostbyname\' function. */
|
||||
@%:@undef HAVE_GETHOSTBYNAME])
|
||||
m4trace:configure.in:226: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETHOSTBYNAME])
|
||||
m4trace:configure.in:226: -1- m4_pattern_allow([^HAVE_GETHOSTBYNAME$])
|
||||
m4trace:configure.in:226: -1- AH_OUTPUT([HAVE_LIBNSL], [/* Define to 1 if you have the `nsl\' library (-lnsl). */
|
||||
@%:@undef HAVE_LIBNSL])
|
||||
m4trace:configure.in:226: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBNSL])
|
||||
m4trace:configure.in:226: -1- m4_pattern_allow([^HAVE_LIBNSL$])
|
||||
m4trace:configure.in:226: -1- AH_OUTPUT([HAVE_LIBSOCKET], [/* Define to 1 if you have the `socket\' library (-lsocket). */
|
||||
@%:@undef HAVE_LIBSOCKET])
|
||||
m4trace:configure.in:226: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSOCKET])
|
||||
m4trace:configure.in:226: -1- m4_pattern_allow([^HAVE_LIBSOCKET$])
|
||||
m4trace:configure.in:227: -1- AH_OUTPUT([HAVE_SETSOCKOPT], [/* Define to 1 if you have the `setsockopt\' function. */
|
||||
@%:@undef HAVE_SETSOCKOPT])
|
||||
m4trace:configure.in:227: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SETSOCKOPT])
|
||||
m4trace:configure.in:227: -1- m4_pattern_allow([^HAVE_SETSOCKOPT$])
|
||||
m4trace:configure.in:227: -1- AH_OUTPUT([HAVE_LIBSOCKET], [/* Define to 1 if you have the `socket\' library (-lsocket). */
|
||||
@%:@undef HAVE_LIBSOCKET])
|
||||
m4trace:configure.in:227: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSOCKET])
|
||||
m4trace:configure.in:227: -1- m4_pattern_allow([^HAVE_LIBSOCKET$])
|
||||
m4trace:configure.in:230: -1- AH_OUTPUT([HAVE_FPURGE], [/* Define to 1 if you have the `fpurge\' function. */
|
||||
@%:@undef HAVE_FPURGE])
|
||||
m4trace:configure.in:230: -1- AH_OUTPUT([HAVE___FPURGE], [/* Define to 1 if you have the `__fpurge\' function. */
|
||||
@%:@undef HAVE___FPURGE])
|
||||
m4trace:configure.in:235: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HTONLL])
|
||||
m4trace:configure.in:235: -1- m4_pattern_allow([^HAVE_HTONLL$])
|
||||
m4trace:configure.in:235: -1- AH_OUTPUT([HAVE_HTONLL], [/* Define to 1 if the function (or macro) htonll exists. */
|
||||
@%:@undef HAVE_HTONLL])
|
||||
m4trace:configure.in:254: -1- AH_OUTPUT([HAVE_DIRENT_H], [/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR\'.
|
||||
*/
|
||||
@%:@undef HAVE_DIRENT_H])
|
||||
m4trace:configure.in:254: -1- AH_OUTPUT([HAVE_SYS_NDIR_H], [/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR\'.
|
||||
*/
|
||||
@%:@undef HAVE_SYS_NDIR_H])
|
||||
m4trace:configure.in:254: -1- AH_OUTPUT([HAVE_SYS_DIR_H], [/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR\'.
|
||||
*/
|
||||
@%:@undef HAVE_SYS_DIR_H])
|
||||
m4trace:configure.in:254: -1- AH_OUTPUT([HAVE_NDIR_H], [/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR\'. */
|
||||
@%:@undef HAVE_NDIR_H])
|
||||
m4trace:configure.in:255: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
|
||||
m4trace:configure.in:255: -1- m4_pattern_allow([^STDC_HEADERS$])
|
||||
m4trace:configure.in:255: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
|
||||
@%:@undef STDC_HEADERS])
|
||||
m4trace:configure.in:256: -1- AH_OUTPUT([HAVE_NAMESER8_COMPAT_H], [/* Define to 1 if you have the <nameser8_compat.h> header file. */
|
||||
@%:@undef HAVE_NAMESER8_COMPAT_H])
|
||||
m4trace:configure.in:256: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NAMESER8_COMPAT_H])
|
||||
m4trace:configure.in:256: -1- m4_pattern_allow([^HAVE_NAMESER8_COMPAT_H$])
|
||||
m4trace:configure.in:257: -1- AH_OUTPUT([HAVE_FEATURES_H], [/* Define to 1 if you have the <features.h> header file. */
|
||||
@%:@undef HAVE_FEATURES_H])
|
||||
m4trace:configure.in:257: -1- AH_OUTPUT([HAVE_ARPA_INET_H], [/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
@%:@undef HAVE_ARPA_INET_H])
|
||||
m4trace:configure.in:257: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
@%:@undef HAVE_FCNTL_H])
|
||||
m4trace:configure.in:257: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
@%:@undef HAVE_NETINET_IN_H])
|
||||
m4trace:configure.in:257: -1- AH_OUTPUT([HAVE_FTS_H], [/* Define to 1 if you have the <fts.h> header file. */
|
||||
@%:@undef HAVE_FTS_H])
|
||||
m4trace:configure.in:257: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
|
||||
@%:@undef HAVE_STDINT_H])
|
||||
m4trace:configure.in:257: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
@%:@undef HAVE_STDLIB_H])
|
||||
m4trace:configure.in:257: -1- AH_OUTPUT([HAVE_STDDEF_H], [/* Define to 1 if you have the <stddef.h> header file. */
|
||||
@%:@undef HAVE_STDDEF_H])
|
||||
m4trace:configure.in:257: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
|
||||
@%:@undef HAVE_STRING_H])
|
||||
m4trace:configure.in:257: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
@%:@undef HAVE_SYS_SOCKET_H])
|
||||
m4trace:configure.in:257: -1- AH_OUTPUT([HAVE_SYSLOG_H], [/* Define to 1 if you have the <syslog.h> header file. */
|
||||
@%:@undef HAVE_SYSLOG_H])
|
||||
m4trace:configure.in:257: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
|
||||
@%:@undef HAVE_UNISTD_H])
|
||||
m4trace:configure.in:257: -1- AH_OUTPUT([HAVE_ISO_LIMITS_ISO_H], [/* Define to 1 if you have the <iso/limits_iso.h> header file. */
|
||||
@%:@undef HAVE_ISO_LIMITS_ISO_H])
|
||||
m4trace:configure.in:258: -1- AH_OUTPUT([HAVE_PCAP_BPF_H], [/* Define to 1 if you have the <pcap-bpf.h> header file. */
|
||||
@%:@undef HAVE_PCAP_BPF_H])
|
||||
m4trace:configure.in:258: -1- AH_OUTPUT([HAVE_NET_BPF_H], [/* Define to 1 if you have the <net/bpf.h> header file. */
|
||||
@%:@undef HAVE_NET_BPF_H])
|
||||
m4trace:configure.in:260: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
@%:@undef HAVE_SYS_TYPES_H])
|
||||
m4trace:configure.in:260: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
@%:@undef HAVE_NETINET_IN_H])
|
||||
m4trace:configure.in:260: -1- AH_OUTPUT([HAVE_ARPA_NAMESER_H], [/* Define to 1 if you have the <arpa/nameser.h> header file. */
|
||||
@%:@undef HAVE_ARPA_NAMESER_H])
|
||||
m4trace:configure.in:260: -1- AH_OUTPUT([HAVE_ARPA_NAMESER_COMPAT_H], [/* Define to 1 if you have the <arpa/nameser_compat.h> header file. */
|
||||
@%:@undef HAVE_ARPA_NAMESER_COMPAT_H])
|
||||
m4trace:configure.in:260: -1- AH_OUTPUT([HAVE_NETDB_H], [/* Define to 1 if you have the <netdb.h> header file. */
|
||||
@%:@undef HAVE_NETDB_H])
|
||||
m4trace:configure.in:260: -1- AH_OUTPUT([HAVE_RESOLV_H], [/* Define to 1 if you have the <resolv.h> header file. */
|
||||
@%:@undef HAVE_RESOLV_H])
|
||||
m4trace:configure.in:279: -1- AC_SUBST([FTS_OBJ])
|
||||
m4trace:configure.in:279: -1- AC_SUBST_TRACE([FTS_OBJ])
|
||||
m4trace:configure.in:279: -1- m4_pattern_allow([^FTS_OBJ$])
|
||||
m4trace:configure.in:283: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_VOID_P])
|
||||
m4trace:configure.in:283: -1- m4_pattern_allow([^SIZEOF_VOID_P$])
|
||||
m4trace:configure.in:283: -1- AH_OUTPUT([SIZEOF_VOID_P], [/* The size of `void *\', as computed by sizeof. */
|
||||
@%:@undef SIZEOF_VOID_P])
|
||||
m4trace:configure.in:285: -1- AC_DEFINE_TRACE_LITERAL([const])
|
||||
m4trace:configure.in:285: -1- m4_pattern_allow([^const$])
|
||||
m4trace:configure.in:285: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */
|
||||
@%:@undef const])
|
||||
m4trace:configure.in:286: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler
|
||||
calls it, or to nothing if \'inline\' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#endif])
|
||||
m4trace:configure.in:287: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||
# if defined __BIG_ENDIAN__
|
||||
# define WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# ifndef WORDS_BIGENDIAN
|
||||
# undef WORDS_BIGENDIAN
|
||||
# endif
|
||||
#endif])
|
||||
m4trace:configure.in:287: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN])
|
||||
m4trace:configure.in:287: -1- m4_pattern_allow([^WORDS_BIGENDIAN$])
|
||||
m4trace:configure.in:287: -1- AC_DEFINE_TRACE_LITERAL([AC_APPLE_UNIVERSAL_BUILD])
|
||||
m4trace:configure.in:287: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$])
|
||||
m4trace:configure.in:287: -1- AH_OUTPUT([AC_APPLE_UNIVERSAL_BUILD], [/* Define if building universal (internal helper macro) */
|
||||
@%:@undef AC_APPLE_UNIVERSAL_BUILD])
|
||||
m4trace:configure.in:288: -1- AC_DEFINE_TRACE_LITERAL([pid_t])
|
||||
m4trace:configure.in:288: -1- m4_pattern_allow([^pid_t$])
|
||||
m4trace:configure.in:288: -1- AH_OUTPUT([pid_t], [/* Define to `int\' if <sys/types.h> does not define. */
|
||||
@%:@undef pid_t])
|
||||
m4trace:configure.in:289: -1- AC_DEFINE_TRACE_LITERAL([size_t])
|
||||
m4trace:configure.in:289: -1- m4_pattern_allow([^size_t$])
|
||||
m4trace:configure.in:289: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if <sys/types.h> does not define. */
|
||||
@%:@undef size_t])
|
||||
m4trace:configure.in:290: -1- AC_DEFINE_TRACE_LITERAL([TM_IN_SYS_TIME])
|
||||
m4trace:configure.in:290: -1- m4_pattern_allow([^TM_IN_SYS_TIME$])
|
||||
m4trace:configure.in:290: -1- AH_OUTPUT([TM_IN_SYS_TIME], [/* Define to 1 if your <sys/time.h> declares `struct tm\'. */
|
||||
@%:@undef TM_IN_SYS_TIME])
|
||||
m4trace:configure.in:291: -1- AC_DEFINE_TRACE_LITERAL([HAVE__BOOL])
|
||||
m4trace:configure.in:291: -1- m4_pattern_allow([^HAVE__BOOL$])
|
||||
m4trace:configure.in:291: -1- AH_OUTPUT([HAVE__BOOL], [/* Define to 1 if the system has the type `_Bool\'. */
|
||||
@%:@undef HAVE__BOOL])
|
||||
m4trace:configure.in:291: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDBOOL_H])
|
||||
m4trace:configure.in:291: -1- m4_pattern_allow([^HAVE_STDBOOL_H$])
|
||||
m4trace:configure.in:291: -1- AH_OUTPUT([HAVE_STDBOOL_H], [/* Define to 1 if stdbool.h conforms to C99. */
|
||||
@%:@undef HAVE_STDBOOL_H])
|
||||
m4trace:configure.in:294: -1- AC_DEFINE_TRACE_LITERAL([CLOSEDIR_VOID])
|
||||
m4trace:configure.in:294: -1- m4_pattern_allow([^CLOSEDIR_VOID$])
|
||||
m4trace:configure.in:294: -1- AH_OUTPUT([CLOSEDIR_VOID], [/* Define to 1 if the `closedir\' function returns void instead of `int\'. */
|
||||
@%:@undef CLOSEDIR_VOID])
|
||||
m4trace:configure.in:295: -1- AH_OUTPUT([HAVE_VFORK_H], [/* Define to 1 if you have the <vfork.h> header file. */
|
||||
@%:@undef HAVE_VFORK_H])
|
||||
m4trace:configure.in:295: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VFORK_H])
|
||||
m4trace:configure.in:295: -1- m4_pattern_allow([^HAVE_VFORK_H$])
|
||||
m4trace:configure.in:295: -1- AH_OUTPUT([HAVE_FORK], [/* Define to 1 if you have the `fork\' function. */
|
||||
@%:@undef HAVE_FORK])
|
||||
m4trace:configure.in:295: -1- AH_OUTPUT([HAVE_VFORK], [/* Define to 1 if you have the `vfork\' function. */
|
||||
@%:@undef HAVE_VFORK])
|
||||
m4trace:configure.in:295: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_VFORK])
|
||||
m4trace:configure.in:295: -1- m4_pattern_allow([^HAVE_WORKING_VFORK$])
|
||||
m4trace:configure.in:295: -1- AH_OUTPUT([HAVE_WORKING_VFORK], [/* Define to 1 if `vfork\' works. */
|
||||
@%:@undef HAVE_WORKING_VFORK])
|
||||
m4trace:configure.in:295: -1- AC_DEFINE_TRACE_LITERAL([vfork])
|
||||
m4trace:configure.in:295: -1- m4_pattern_allow([^vfork$])
|
||||
m4trace:configure.in:295: -1- AH_OUTPUT([vfork], [/* Define as `fork\' if `vfork\' does not work. */
|
||||
@%:@undef vfork])
|
||||
m4trace:configure.in:295: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_FORK])
|
||||
m4trace:configure.in:295: -1- m4_pattern_allow([^HAVE_WORKING_FORK$])
|
||||
m4trace:configure.in:295: -1- AH_OUTPUT([HAVE_WORKING_FORK], [/* Define to 1 if `fork\' works. */
|
||||
@%:@undef HAVE_WORKING_FORK])
|
||||
m4trace:configure.in:296: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
@%:@undef HAVE_STDLIB_H])
|
||||
m4trace:configure.in:296: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDLIB_H])
|
||||
m4trace:configure.in:296: -1- m4_pattern_allow([^HAVE_STDLIB_H$])
|
||||
m4trace:configure.in:296: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC])
|
||||
m4trace:configure.in:296: -1- m4_pattern_allow([^HAVE_MALLOC$])
|
||||
m4trace:configure.in:296: -1- AH_OUTPUT([HAVE_MALLOC], [/* Define to 1 if your system has a GNU libc compatible `malloc\' function, and
|
||||
to 0 otherwise. */
|
||||
@%:@undef HAVE_MALLOC])
|
||||
m4trace:configure.in:296: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC])
|
||||
m4trace:configure.in:296: -1- m4_pattern_allow([^HAVE_MALLOC$])
|
||||
m4trace:configure.in:296: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS malloc.$ac_objext"])
|
||||
m4trace:configure.in:296: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
|
||||
m4trace:configure.in:296: -1- m4_pattern_allow([^LIB@&t@OBJS$])
|
||||
m4trace:configure.in:296: -1- AC_LIBSOURCE([malloc.c])
|
||||
m4trace:configure.in:296: -1- AC_DEFINE_TRACE_LITERAL([malloc])
|
||||
m4trace:configure.in:296: -1- m4_pattern_allow([^malloc$])
|
||||
m4trace:configure.in:296: -1- AH_OUTPUT([malloc], [/* Define to rpl_malloc if the replacement function should be used. */
|
||||
@%:@undef malloc])
|
||||
m4trace:configure.in:297: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME])
|
||||
m4trace:configure.in:297: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$])
|
||||
m4trace:configure.in:297: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
@%:@undef TIME_WITH_SYS_TIME])
|
||||
m4trace:configure.in:297: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
@%:@undef HAVE_SYS_TIME_H])
|
||||
m4trace:configure.in:297: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
|
||||
@%:@undef HAVE_UNISTD_H])
|
||||
m4trace:configure.in:297: -1- AH_OUTPUT([HAVE_ALARM], [/* Define to 1 if you have the `alarm\' function. */
|
||||
@%:@undef HAVE_ALARM])
|
||||
m4trace:configure.in:297: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS mktime.$ac_objext"])
|
||||
m4trace:configure.in:297: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
|
||||
m4trace:configure.in:297: -1- m4_pattern_allow([^LIB@&t@OBJS$])
|
||||
m4trace:configure.in:297: -1- AC_LIBSOURCE([mktime.c])
|
||||
m4trace:configure.in:298: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
@%:@undef HAVE_STDLIB_H])
|
||||
m4trace:configure.in:298: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDLIB_H])
|
||||
m4trace:configure.in:298: -1- m4_pattern_allow([^HAVE_STDLIB_H$])
|
||||
m4trace:configure.in:298: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALLOC])
|
||||
m4trace:configure.in:298: -1- m4_pattern_allow([^HAVE_REALLOC$])
|
||||
m4trace:configure.in:298: -1- AH_OUTPUT([HAVE_REALLOC], [/* Define to 1 if your system has a GNU libc compatible `realloc\' function,
|
||||
and to 0 otherwise. */
|
||||
@%:@undef HAVE_REALLOC])
|
||||
m4trace:configure.in:298: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALLOC])
|
||||
m4trace:configure.in:298: -1- m4_pattern_allow([^HAVE_REALLOC$])
|
||||
m4trace:configure.in:298: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS realloc.$ac_objext"])
|
||||
m4trace:configure.in:298: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
|
||||
m4trace:configure.in:298: -1- m4_pattern_allow([^LIB@&t@OBJS$])
|
||||
m4trace:configure.in:298: -1- AC_LIBSOURCE([realloc.c])
|
||||
m4trace:configure.in:298: -1- AC_DEFINE_TRACE_LITERAL([realloc])
|
||||
m4trace:configure.in:298: -1- m4_pattern_allow([^realloc$])
|
||||
m4trace:configure.in:298: -1- AH_OUTPUT([realloc], [/* Define to rpl_realloc if the replacement function should be used. */
|
||||
@%:@undef realloc])
|
||||
m4trace:configure.in:299: -1- AC_DEFINE_TRACE_LITERAL([LSTAT_FOLLOWS_SLASHED_SYMLINK])
|
||||
m4trace:configure.in:299: -1- m4_pattern_allow([^LSTAT_FOLLOWS_SLASHED_SYMLINK$])
|
||||
m4trace:configure.in:299: -1- AH_OUTPUT([LSTAT_FOLLOWS_SLASHED_SYMLINK], [/* Define to 1 if `lstat\' dereferences a symlink specified with a trailing
|
||||
slash. */
|
||||
@%:@undef LSTAT_FOLLOWS_SLASHED_SYMLINK])
|
||||
m4trace:configure.in:299: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS lstat.$ac_objext"])
|
||||
m4trace:configure.in:299: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
|
||||
m4trace:configure.in:299: -1- m4_pattern_allow([^LIB@&t@OBJS$])
|
||||
m4trace:configure.in:299: -1- AC_LIBSOURCE([lstat.c])
|
||||
m4trace:configure.in:299: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS stat.$ac_objext"])
|
||||
m4trace:configure.in:299: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
|
||||
m4trace:configure.in:299: -1- m4_pattern_allow([^LIB@&t@OBJS$])
|
||||
m4trace:configure.in:299: -1- AC_LIBSOURCE([stat.c])
|
||||
m4trace:configure.in:299: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STAT_EMPTY_STRING_BUG])
|
||||
m4trace:configure.in:299: -1- m4_pattern_allow([^HAVE_STAT_EMPTY_STRING_BUG$])
|
||||
m4trace:configure.in:299: -1- AH_OUTPUT([HAVE_STAT_EMPTY_STRING_BUG], [/* Define to 1 if `stat\' has the bug that it succeeds when given the
|
||||
zero-length file name argument. */
|
||||
@%:@undef HAVE_STAT_EMPTY_STRING_BUG])
|
||||
m4trace:configure.in:300: -1- AH_OUTPUT([HAVE_STRFTIME], [/* Define to 1 if you have the `strftime\' function. */
|
||||
@%:@undef HAVE_STRFTIME])
|
||||
m4trace:configure.in:300: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRFTIME])
|
||||
m4trace:configure.in:300: -1- m4_pattern_allow([^HAVE_STRFTIME$])
|
||||
m4trace:configure.in:300: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRFTIME])
|
||||
m4trace:configure.in:300: -1- m4_pattern_allow([^HAVE_STRFTIME$])
|
||||
m4trace:configure.in:301: -1- AH_OUTPUT([HAVE_INET_NTOA], [/* Define to 1 if you have the `inet_ntoa\' function. */
|
||||
@%:@undef HAVE_INET_NTOA])
|
||||
m4trace:configure.in:301: -1- AH_OUTPUT([HAVE_SOCKET], [/* Define to 1 if you have the `socket\' function. */
|
||||
@%:@undef HAVE_SOCKET])
|
||||
m4trace:configure.in:301: -1- AH_OUTPUT([HAVE_STRCHR], [/* Define to 1 if you have the `strchr\' function. */
|
||||
@%:@undef HAVE_STRCHR])
|
||||
m4trace:configure.in:301: -1- AH_OUTPUT([HAVE_STRDUP], [/* Define to 1 if you have the `strdup\' function. */
|
||||
@%:@undef HAVE_STRDUP])
|
||||
m4trace:configure.in:301: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */
|
||||
@%:@undef HAVE_STRERROR])
|
||||
m4trace:configure.in:301: -1- AH_OUTPUT([HAVE_STRRCHR], [/* Define to 1 if you have the `strrchr\' function. */
|
||||
@%:@undef HAVE_STRRCHR])
|
||||
m4trace:configure.in:301: -1- AH_OUTPUT([HAVE_STRSTR], [/* Define to 1 if you have the `strstr\' function. */
|
||||
@%:@undef HAVE_STRSTR])
|
||||
m4trace:configure.in:301: -1- AH_OUTPUT([HAVE_SCANDIR], [/* Define to 1 if you have the `scandir\' function. */
|
||||
@%:@undef HAVE_SCANDIR])
|
||||
m4trace:configure.in:306: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
|
||||
@%:@undef HAVE_LIBRESOLV])
|
||||
m4trace:configure.in:306: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
|
||||
m4trace:configure.in:306: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
|
||||
m4trace:configure.in:306: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
|
||||
@%:@undef HAVE_LIBRESOLV])
|
||||
m4trace:configure.in:306: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
|
||||
m4trace:configure.in:306: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
|
||||
m4trace:configure.in:306: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSOCKET])
|
||||
m4trace:configure.in:306: -1- m4_pattern_allow([^HAVE_LIBSOCKET$])
|
||||
m4trace:configure.in:306: -1- AH_OUTPUT([HAVE_LIBSOCKET], [/* */
|
||||
@%:@undef HAVE_LIBSOCKET])
|
||||
m4trace:configure.in:306: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
|
||||
m4trace:configure.in:306: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
|
||||
m4trace:configure.in:306: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* */
|
||||
@%:@undef HAVE_LIBRESOLV])
|
||||
m4trace:configure.in:306: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
|
||||
@%:@undef HAVE_LIBRESOLV])
|
||||
m4trace:configure.in:306: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
|
||||
m4trace:configure.in:306: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
|
||||
m4trace:configure.in:306: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
|
||||
@%:@undef HAVE_LIBRESOLV])
|
||||
m4trace:configure.in:306: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
|
||||
m4trace:configure.in:306: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
|
||||
m4trace:configure.in:321: -1- AC_DEFINE_TRACE_LITERAL([ptrdiff_t])
|
||||
m4trace:configure.in:321: -1- m4_pattern_allow([^ptrdiff_t$])
|
||||
m4trace:configure.in:321: -1- AH_OUTPUT([ptrdiff_t], [/* Define to `long\' if <sys/types.h> does not define. */
|
||||
@%:@undef ptrdiff_t])
|
||||
m4trace:configure.in:322: -1- AC_DEFINE_TRACE_LITERAL([size_t])
|
||||
m4trace:configure.in:322: -1- m4_pattern_allow([^size_t$])
|
||||
m4trace:configure.in:322: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if <sys/types.h> does not define. */
|
||||
@%:@undef size_t])
|
||||
m4trace:configure.in:323: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_SHORT])
|
||||
m4trace:configure.in:323: -1- m4_pattern_allow([^SIZEOF_SHORT$])
|
||||
m4trace:configure.in:323: -1- AH_OUTPUT([SIZEOF_SHORT], [/* The size of `short\', as computed by sizeof. */
|
||||
@%:@undef SIZEOF_SHORT])
|
||||
m4trace:configure.in:324: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_INT])
|
||||
m4trace:configure.in:324: -1- m4_pattern_allow([^SIZEOF_INT$])
|
||||
m4trace:configure.in:324: -1- AH_OUTPUT([SIZEOF_INT], [/* The size of `int\', as computed by sizeof. */
|
||||
@%:@undef SIZEOF_INT])
|
||||
m4trace:configure.in:325: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG])
|
||||
m4trace:configure.in:325: -1- m4_pattern_allow([^SIZEOF_LONG$])
|
||||
m4trace:configure.in:325: -1- AH_OUTPUT([SIZEOF_LONG], [/* The size of `long\', as computed by sizeof. */
|
||||
@%:@undef SIZEOF_LONG])
|
||||
m4trace:configure.in:326: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG_LONG])
|
||||
m4trace:configure.in:326: -1- m4_pattern_allow([^SIZEOF_LONG_LONG$])
|
||||
m4trace:configure.in:326: -1- AH_OUTPUT([SIZEOF_LONG_LONG], [/* The size of `long long\', as computed by sizeof. */
|
||||
@%:@undef SIZEOF_LONG_LONG])
|
||||
m4trace:configure.in:327: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF___INT64])
|
||||
m4trace:configure.in:327: -1- m4_pattern_allow([^SIZEOF___INT64$])
|
||||
m4trace:configure.in:327: -1- AH_OUTPUT([SIZEOF___INT64], [/* The size of `__int64\', as computed by sizeof. */
|
||||
@%:@undef SIZEOF___INT64])
|
||||
m4trace:configure.in:328: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_VOID_P])
|
||||
m4trace:configure.in:328: -1- m4_pattern_allow([^SIZEOF_VOID_P$])
|
||||
m4trace:configure.in:328: -1- AH_OUTPUT([SIZEOF_VOID_P], [/* The size of `void *\', as computed by sizeof. */
|
||||
@%:@undef SIZEOF_VOID_P])
|
||||
m4trace:configure.in:329: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_SIZE_T])
|
||||
m4trace:configure.in:329: -1- m4_pattern_allow([^SIZEOF_SIZE_T$])
|
||||
m4trace:configure.in:329: -1- AH_OUTPUT([SIZEOF_SIZE_T], [/* The size of `size_t\', as computed by sizeof. */
|
||||
@%:@undef SIZEOF_SIZE_T])
|
||||
m4trace:configure.in:330: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_PTRDIFF_T])
|
||||
m4trace:configure.in:330: -1- m4_pattern_allow([^SIZEOF_PTRDIFF_T$])
|
||||
m4trace:configure.in:330: -1- AH_OUTPUT([SIZEOF_PTRDIFF_T], [/* The size of `ptrdiff_t\', as computed by sizeof. */
|
||||
@%:@undef SIZEOF_PTRDIFF_T])
|
||||
m4trace:configure.in:331: -1- AC_DEFINE_TRACE_LITERAL([const])
|
||||
m4trace:configure.in:331: -1- m4_pattern_allow([^const$])
|
||||
m4trace:configure.in:331: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */
|
||||
@%:@undef const])
|
||||
m4trace:configure.in:332: -1- AH_OUTPUT([HAVE_MEMCMP], [/* Define to 1 if you have the `memcmp\' function. */
|
||||
@%:@undef HAVE_MEMCMP])
|
||||
m4trace:configure.in:332: -1- AH_OUTPUT([HAVE_MEMCPY], [/* Define to 1 if you have the `memcpy\' function. */
|
||||
@%:@undef HAVE_MEMCPY])
|
||||
m4trace:configure.in:332: -1- AH_OUTPUT([HAVE_MEMMOVE], [/* Define to 1 if you have the `memmove\' function. */
|
||||
@%:@undef HAVE_MEMMOVE])
|
||||
m4trace:configure.in:332: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */
|
||||
@%:@undef HAVE_MEMSET])
|
||||
m4trace:configure.in:335: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
|
||||
You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from...
|
||||
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
|
||||
../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
|
||||
configure.in:335: the top level])
|
||||
m4trace:configure.in:353: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SEMUN])
|
||||
m4trace:configure.in:353: -1- m4_pattern_allow([^HAVE_SEMUN$])
|
||||
m4trace:configure.in:353: -1- AH_OUTPUT([HAVE_SEMUN], [/* Define if sys/sem.h defines struct semun */
|
||||
@%:@undef HAVE_SEMUN])
|
||||
m4trace:configure.in:357: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
|
||||
You should run autoupdate.], [../../lib/autoconf/general.m4:2764: AC_TRY_RUN is expanded from...
|
||||
configure.in:357: the top level])
|
||||
m4trace:configure.in:357: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SIZE_T_Z_FORMAT])
|
||||
m4trace:configure.in:357: -1- m4_pattern_allow([^HAVE_SIZE_T_Z_FORMAT$])
|
||||
m4trace:configure.in:357: -1- AH_OUTPUT([HAVE_SIZE_T_Z_FORMAT], [/* Define to 1 if you have a printf() that supports the %z format string. */
|
||||
@%:@undef HAVE_SIZE_T_Z_FORMAT])
|
||||
m4trace:configure.in:386: -1- AC_CONFIG_FILES([Makefile bin/Makefile man/Makefile])
|
||||
m4trace:configure.in:386: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
|
||||
You should run autoupdate.], [])
|
||||
m4trace:configure.in:386: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
|
||||
m4trace:configure.in:386: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
|
||||
m4trace:configure.in:386: -1- m4_pattern_allow([^LIB@&t@OBJS$])
|
||||
m4trace:configure.in:386: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
|
||||
m4trace:configure.in:386: -1- AC_SUBST_TRACE([LTLIBOBJS])
|
||||
m4trace:configure.in:386: -1- m4_pattern_allow([^LTLIBOBJS$])
|
||||
m4trace:configure.in:386: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])
|
||||
m4trace:configure.in:386: -1- AC_SUBST([am__EXEEXT_TRUE])
|
||||
m4trace:configure.in:386: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE])
|
||||
m4trace:configure.in:386: -1- m4_pattern_allow([^am__EXEEXT_TRUE$])
|
||||
m4trace:configure.in:386: -1- AC_SUBST([am__EXEEXT_FALSE])
|
||||
m4trace:configure.in:386: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE])
|
||||
m4trace:configure.in:386: -1- m4_pattern_allow([^am__EXEEXT_FALSE$])
|
||||
m4trace:configure.in:386: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE])
|
||||
m4trace:configure.in:386: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE])
|
||||
m4trace:configure.in:386: -1- AC_SUBST_TRACE([top_builddir])
|
||||
m4trace:configure.in:386: -1- AC_SUBST_TRACE([top_build_prefix])
|
||||
m4trace:configure.in:386: -1- AC_SUBST_TRACE([srcdir])
|
||||
m4trace:configure.in:386: -1- AC_SUBST_TRACE([abs_srcdir])
|
||||
m4trace:configure.in:386: -1- AC_SUBST_TRACE([top_srcdir])
|
||||
m4trace:configure.in:386: -1- AC_SUBST_TRACE([abs_top_srcdir])
|
||||
m4trace:configure.in:386: -1- AC_SUBST_TRACE([builddir])
|
||||
m4trace:configure.in:386: -1- AC_SUBST_TRACE([abs_builddir])
|
||||
m4trace:configure.in:386: -1- AC_SUBST_TRACE([abs_top_builddir])
|
||||
m4trace:configure.in:386: -1- AC_SUBST_TRACE([INSTALL])
|
||||
m4trace:configure.in:386: -1- AC_SUBST_TRACE([MKDIR_P])
|
File diff suppressed because it is too large
Load Diff
@ -1,909 +0,0 @@
|
||||
m4trace:configure.ac:6: -1- AC_INIT([nfdump], [1.6.13], [phaag@users.sourceforge.net])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_forbid([^_?A[CHUM]_])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_forbid([_AC_])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^AS_FLAGS$])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_forbid([^_?m4_])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_forbid([^dnl$])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_forbid([^_?AS_])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([SHELL])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([SHELL])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^SHELL$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([PATH_SEPARATOR])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([PATH_SEPARATOR])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^PATH_SEPARATOR$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([PACKAGE_NAME])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^PACKAGE_NAME$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([PACKAGE_TARNAME])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([PACKAGE_VERSION])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^PACKAGE_VERSION$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([PACKAGE_STRING])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^PACKAGE_STRING$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([PACKAGE_URL])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^PACKAGE_URL$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([exec_prefix], [NONE])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([exec_prefix])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^exec_prefix$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([prefix], [NONE])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([prefix])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^prefix$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([program_transform_name], [s,x,x,])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([program_transform_name])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^program_transform_name$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([bindir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^bindir$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([sbindir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^sbindir$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([libexecdir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^libexecdir$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([datarootdir], ['${prefix}/share'])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([datarootdir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^datarootdir$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([datadir], ['${datarootdir}'])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([datadir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^datadir$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([sysconfdir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^sysconfdir$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([sharedstatedir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^sharedstatedir$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([localstatedir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^localstatedir$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([includedir], ['${prefix}/include'])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([includedir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^includedir$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([oldincludedir], ['/usr/include'])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([oldincludedir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^oldincludedir$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
|
||||
['${datarootdir}/doc/${PACKAGE_TARNAME}'],
|
||||
['${datarootdir}/doc/${PACKAGE}'])])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([docdir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^docdir$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([infodir], ['${datarootdir}/info'])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([infodir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^infodir$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([htmldir], ['${docdir}'])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([htmldir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^htmldir$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([dvidir], ['${docdir}'])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([dvidir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^dvidir$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([pdfdir], ['${docdir}'])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([pdfdir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^pdfdir$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([psdir], ['${docdir}'])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([psdir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^psdir$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([libdir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^libdir$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([localedir], ['${datarootdir}/locale'])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([localedir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^localedir$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([mandir], ['${datarootdir}/man'])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([mandir])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^mandir$])
|
||||
m4trace:configure.ac:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^PACKAGE_NAME$])
|
||||
m4trace:configure.ac:6: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
|
||||
@%:@undef PACKAGE_NAME])
|
||||
m4trace:configure.ac:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
|
||||
m4trace:configure.ac:6: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
|
||||
@%:@undef PACKAGE_TARNAME])
|
||||
m4trace:configure.ac:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^PACKAGE_VERSION$])
|
||||
m4trace:configure.ac:6: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
|
||||
@%:@undef PACKAGE_VERSION])
|
||||
m4trace:configure.ac:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^PACKAGE_STRING$])
|
||||
m4trace:configure.ac:6: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
|
||||
@%:@undef PACKAGE_STRING])
|
||||
m4trace:configure.ac:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
|
||||
m4trace:configure.ac:6: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
|
||||
@%:@undef PACKAGE_BUGREPORT])
|
||||
m4trace:configure.ac:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^PACKAGE_URL$])
|
||||
m4trace:configure.ac:6: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */
|
||||
@%:@undef PACKAGE_URL])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([DEFS])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([DEFS])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^DEFS$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([ECHO_C])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([ECHO_C])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^ECHO_C$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([ECHO_N])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([ECHO_N])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^ECHO_N$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([ECHO_T])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([ECHO_T])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^ECHO_T$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([LIBS])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([LIBS])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^LIBS$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([build_alias])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([build_alias])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^build_alias$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([host_alias])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([host_alias])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^host_alias$])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([target_alias])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([target_alias])
|
||||
m4trace:configure.ac:6: -1- m4_pattern_allow([^target_alias$])
|
||||
m4trace:configure.ac:9: -1- AC_CONFIG_HEADERS([config.h])
|
||||
m4trace:configure.ac:10: -1- AM_INIT_AUTOMAKE([subdir-objects])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
|
||||
m4trace:configure.ac:10: -1- AM_AUTOMAKE_VERSION([1.14.1])
|
||||
m4trace:configure.ac:10: -1- AC_REQUIRE_AUX_FILE([install-sh])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([INSTALL_PROGRAM])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([INSTALL_PROGRAM])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([INSTALL_SCRIPT])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([INSTALL_SCRIPT])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([INSTALL_DATA])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([INSTALL_DATA])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^INSTALL_DATA$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([am__isrc], [' -I$(srcdir)'])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([am__isrc])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^am__isrc$])
|
||||
m4trace:configure.ac:10: -1- _AM_SUBST_NOTMAKE([am__isrc])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([CYGPATH_W])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CYGPATH_W])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^CYGPATH_W$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([PACKAGE])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([VERSION])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^VERSION$])
|
||||
m4trace:configure.ac:10: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE$])
|
||||
m4trace:configure.ac:10: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
|
||||
@%:@undef PACKAGE])
|
||||
m4trace:configure.ac:10: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^VERSION$])
|
||||
m4trace:configure.ac:10: -1- AH_OUTPUT([VERSION], [/* Version number of package */
|
||||
@%:@undef VERSION])
|
||||
m4trace:configure.ac:10: -1- AC_REQUIRE_AUX_FILE([missing])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([ACLOCAL])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([ACLOCAL])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^ACLOCAL$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([AUTOCONF])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([AUTOCONF])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^AUTOCONF$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([AUTOMAKE])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([AUTOMAKE])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^AUTOMAKE$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([AUTOHEADER])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([AUTOHEADER])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^AUTOHEADER$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([MAKEINFO])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([MAKEINFO])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^MAKEINFO$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([install_sh])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([install_sh])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^install_sh$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([STRIP])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([STRIP])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^STRIP$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$])
|
||||
m4trace:configure.ac:10: -1- AC_REQUIRE_AUX_FILE([install-sh])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([MKDIR_P])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([MKDIR_P])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^MKDIR_P$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([mkdir_p])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^mkdir_p$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([AWK])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([AWK])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^AWK$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([SET_MAKE])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([SET_MAKE])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^SET_MAKE$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([am__leading_dot])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([am__leading_dot])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^am__leading_dot$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([AMTAR], ['$${TAR-tar}'])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([AMTAR])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^AMTAR$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([am__tar])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([am__tar])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^am__tar$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([am__untar])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([am__untar])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^am__untar$])
|
||||
m4trace:configure.ac:10: -1- AM_SILENT_RULES
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([AM_V])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([AM_V])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^AM_V$])
|
||||
m4trace:configure.ac:10: -1- _AM_SUBST_NOTMAKE([AM_V])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([AM_DEFAULT_V])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([AM_DEFAULT_V])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^AM_DEFAULT_V$])
|
||||
m4trace:configure.ac:10: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([AM_DEFAULT_VERBOSITY])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([AM_DEFAULT_VERBOSITY])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST([AM_BACKSLASH])
|
||||
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([AM_BACKSLASH])
|
||||
m4trace:configure.ac:10: -1- m4_pattern_allow([^AM_BACKSLASH$])
|
||||
m4trace:configure.ac:10: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([CC])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([CC])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([CFLAGS])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([CFLAGS])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^CFLAGS$])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([LDFLAGS])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([LDFLAGS])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^LDFLAGS$])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([LIBS])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([LIBS])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^LIBS$])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([CPPFLAGS])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([CPPFLAGS])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^CPPFLAGS$])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([CC])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([CC])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([CC])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([CC])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([CC])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([CC])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([CC])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([CC])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^CC$])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([ac_ct_CC])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^ac_ct_CC$])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([EXEEXT])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^EXEEXT$])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([OBJEXT])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^OBJEXT$])
|
||||
m4trace:configure.ac:13: -1- AC_REQUIRE_AUX_FILE([compile])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([DEPDIR])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^DEPDIR$])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([am__include])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([am__include])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^am__include$])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([am__quote])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([am__quote])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^am__quote$])
|
||||
m4trace:configure.ac:13: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([AMDEP_TRUE])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([AMDEP_TRUE])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^AMDEP_TRUE$])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([AMDEP_FALSE])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([AMDEP_FALSE])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^AMDEP_FALSE$])
|
||||
m4trace:configure.ac:13: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE])
|
||||
m4trace:configure.ac:13: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([AMDEPBACKSLASH])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([AMDEPBACKSLASH])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^AMDEPBACKSLASH$])
|
||||
m4trace:configure.ac:13: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([am__nodep])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([am__nodep])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^am__nodep$])
|
||||
m4trace:configure.ac:13: -1- _AM_SUBST_NOTMAKE([am__nodep])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([CCDEPMODE])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^CCDEPMODE$])
|
||||
m4trace:configure.ac:13: -1- AM_CONDITIONAL([am__fastdepCC], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([am__fastdepCC_TRUE])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^am__fastdepCC_TRUE$])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST([am__fastdepCC_FALSE])
|
||||
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE])
|
||||
m4trace:configure.ac:13: -1- m4_pattern_allow([^am__fastdepCC_FALSE$])
|
||||
m4trace:configure.ac:13: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE])
|
||||
m4trace:configure.ac:13: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE])
|
||||
m4trace:configure.ac:14: -1- AM_PROG_CC_C_O
|
||||
m4trace:configure.ac:18: -1- _m4_warn([obsolete], [The macro `ac_cv_prog_gcc' is obsolete.
|
||||
You should run autoupdate.], [../../lib/autoconf/c.m4:436: ac_cv_prog_gcc is expanded from...
|
||||
configure.ac:18: the top level])
|
||||
m4trace:configure.ac:65: -1- AC_SUBST([YACC])
|
||||
m4trace:configure.ac:65: -1- AC_SUBST_TRACE([YACC])
|
||||
m4trace:configure.ac:65: -1- m4_pattern_allow([^YACC$])
|
||||
m4trace:configure.ac:65: -1- AC_SUBST([YACC])
|
||||
m4trace:configure.ac:65: -1- AC_SUBST_TRACE([YACC])
|
||||
m4trace:configure.ac:65: -1- m4_pattern_allow([^YACC$])
|
||||
m4trace:configure.ac:65: -1- AC_SUBST([YFLAGS])
|
||||
m4trace:configure.ac:65: -1- AC_SUBST_TRACE([YFLAGS])
|
||||
m4trace:configure.ac:65: -1- m4_pattern_allow([^YFLAGS$])
|
||||
m4trace:configure.ac:66: -1- AC_SUBST([LEX])
|
||||
m4trace:configure.ac:66: -1- AC_SUBST_TRACE([LEX])
|
||||
m4trace:configure.ac:66: -1- m4_pattern_allow([^LEX$])
|
||||
m4trace:configure.ac:66: -1- AC_SUBST([LEX_OUTPUT_ROOT], [$ac_cv_prog_lex_root])
|
||||
m4trace:configure.ac:66: -1- AC_SUBST_TRACE([LEX_OUTPUT_ROOT])
|
||||
m4trace:configure.ac:66: -1- m4_pattern_allow([^LEX_OUTPUT_ROOT$])
|
||||
m4trace:configure.ac:66: -1- AC_SUBST([LEXLIB])
|
||||
m4trace:configure.ac:66: -1- AC_SUBST_TRACE([LEXLIB])
|
||||
m4trace:configure.ac:66: -1- m4_pattern_allow([^LEXLIB$])
|
||||
m4trace:configure.ac:66: -1- AC_DEFINE_TRACE_LITERAL([YYTEXT_POINTER])
|
||||
m4trace:configure.ac:66: -1- m4_pattern_allow([^YYTEXT_POINTER$])
|
||||
m4trace:configure.ac:66: -1- AH_OUTPUT([YYTEXT_POINTER], [/* Define to 1 if `lex\' declares `yytext\' as a `char *\' by default, not a
|
||||
`char@<:@@:>@\'. */
|
||||
@%:@undef YYTEXT_POINTER])
|
||||
m4trace:configure.ac:105: -2- AH_OUTPUT([HAVE_LIBZ], [/* Define to 1 if you have the `z\' library (-lz). */
|
||||
@%:@undef HAVE_LIBZ])
|
||||
m4trace:configure.ac:105: -2- AC_DEFINE_TRACE_LITERAL([HAVE_LIBZ])
|
||||
m4trace:configure.ac:105: -2- m4_pattern_allow([^HAVE_LIBZ$])
|
||||
m4trace:configure.ac:120: -2- AM_CONDITIONAL([FT2NFDUMP], [true])
|
||||
m4trace:configure.ac:120: -2- AC_SUBST([FT2NFDUMP_TRUE])
|
||||
m4trace:configure.ac:120: -2- AC_SUBST_TRACE([FT2NFDUMP_TRUE])
|
||||
m4trace:configure.ac:120: -2- m4_pattern_allow([^FT2NFDUMP_TRUE$])
|
||||
m4trace:configure.ac:120: -2- AC_SUBST([FT2NFDUMP_FALSE])
|
||||
m4trace:configure.ac:120: -2- AC_SUBST_TRACE([FT2NFDUMP_FALSE])
|
||||
m4trace:configure.ac:120: -2- m4_pattern_allow([^FT2NFDUMP_FALSE$])
|
||||
m4trace:configure.ac:120: -2- _AM_SUBST_NOTMAKE([FT2NFDUMP_TRUE])
|
||||
m4trace:configure.ac:120: -2- _AM_SUBST_NOTMAKE([FT2NFDUMP_FALSE])
|
||||
m4trace:configure.ac:122: -2- AM_CONDITIONAL([FT2NFDUMP], [false])
|
||||
m4trace:configure.ac:122: -2- AC_SUBST([FT2NFDUMP_TRUE])
|
||||
m4trace:configure.ac:122: -2- AC_SUBST_TRACE([FT2NFDUMP_TRUE])
|
||||
m4trace:configure.ac:122: -2- m4_pattern_allow([^FT2NFDUMP_TRUE$])
|
||||
m4trace:configure.ac:122: -2- AC_SUBST([FT2NFDUMP_FALSE])
|
||||
m4trace:configure.ac:122: -2- AC_SUBST_TRACE([FT2NFDUMP_FALSE])
|
||||
m4trace:configure.ac:122: -2- m4_pattern_allow([^FT2NFDUMP_FALSE$])
|
||||
m4trace:configure.ac:122: -2- _AM_SUBST_NOTMAKE([FT2NFDUMP_TRUE])
|
||||
m4trace:configure.ac:122: -2- _AM_SUBST_NOTMAKE([FT2NFDUMP_FALSE])
|
||||
m4trace:configure.ac:156: -2- AM_CONDITIONAL([NFPROFILE], [false])
|
||||
m4trace:configure.ac:156: -2- AC_SUBST([NFPROFILE_TRUE])
|
||||
m4trace:configure.ac:156: -2- AC_SUBST_TRACE([NFPROFILE_TRUE])
|
||||
m4trace:configure.ac:156: -2- m4_pattern_allow([^NFPROFILE_TRUE$])
|
||||
m4trace:configure.ac:156: -2- AC_SUBST([NFPROFILE_FALSE])
|
||||
m4trace:configure.ac:156: -2- AC_SUBST_TRACE([NFPROFILE_FALSE])
|
||||
m4trace:configure.ac:156: -2- m4_pattern_allow([^NFPROFILE_FALSE$])
|
||||
m4trace:configure.ac:156: -2- _AM_SUBST_NOTMAKE([NFPROFILE_TRUE])
|
||||
m4trace:configure.ac:156: -2- _AM_SUBST_NOTMAKE([NFPROFILE_FALSE])
|
||||
m4trace:configure.ac:126: -1- AC_SUBST([RRD_LIBS])
|
||||
m4trace:configure.ac:126: -1- AC_SUBST_TRACE([RRD_LIBS])
|
||||
m4trace:configure.ac:126: -1- m4_pattern_allow([^RRD_LIBS$])
|
||||
m4trace:configure.ac:126: -1- AH_OUTPUT([HAVE_RRD_H], [/* Define to 1 if you have the <rrd.h> header file. */
|
||||
@%:@undef HAVE_RRD_H])
|
||||
m4trace:configure.ac:126: -1- AC_SUBST([CPP])
|
||||
m4trace:configure.ac:126: -1- AC_SUBST_TRACE([CPP])
|
||||
m4trace:configure.ac:126: -1- m4_pattern_allow([^CPP$])
|
||||
m4trace:configure.ac:126: -1- AC_SUBST([CPPFLAGS])
|
||||
m4trace:configure.ac:126: -1- AC_SUBST_TRACE([CPPFLAGS])
|
||||
m4trace:configure.ac:126: -1- m4_pattern_allow([^CPPFLAGS$])
|
||||
m4trace:configure.ac:126: -1- AC_SUBST([CPP])
|
||||
m4trace:configure.ac:126: -1- AC_SUBST_TRACE([CPP])
|
||||
m4trace:configure.ac:126: -1- m4_pattern_allow([^CPP$])
|
||||
m4trace:configure.ac:126: -1- AC_SUBST([GREP])
|
||||
m4trace:configure.ac:126: -1- AC_SUBST_TRACE([GREP])
|
||||
m4trace:configure.ac:126: -1- m4_pattern_allow([^GREP$])
|
||||
m4trace:configure.ac:126: -1- AC_SUBST([EGREP])
|
||||
m4trace:configure.ac:126: -1- AC_SUBST_TRACE([EGREP])
|
||||
m4trace:configure.ac:126: -1- m4_pattern_allow([^EGREP$])
|
||||
m4trace:configure.ac:126: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
|
||||
m4trace:configure.ac:126: -1- m4_pattern_allow([^STDC_HEADERS$])
|
||||
m4trace:configure.ac:126: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
|
||||
@%:@undef STDC_HEADERS])
|
||||
m4trace:configure.ac:126: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
@%:@undef HAVE_SYS_TYPES_H])
|
||||
m4trace:configure.ac:126: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
@%:@undef HAVE_SYS_STAT_H])
|
||||
m4trace:configure.ac:126: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
@%:@undef HAVE_STDLIB_H])
|
||||
m4trace:configure.ac:126: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
|
||||
@%:@undef HAVE_STRING_H])
|
||||
m4trace:configure.ac:126: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
|
||||
@%:@undef HAVE_MEMORY_H])
|
||||
m4trace:configure.ac:126: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
|
||||
@%:@undef HAVE_STRINGS_H])
|
||||
m4trace:configure.ac:126: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
@%:@undef HAVE_INTTYPES_H])
|
||||
m4trace:configure.ac:126: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
|
||||
@%:@undef HAVE_STDINT_H])
|
||||
m4trace:configure.ac:126: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
|
||||
@%:@undef HAVE_UNISTD_H])
|
||||
m4trace:configure.ac:126: -1- AC_DEFINE_TRACE_LITERAL([HAVE_RRD_H])
|
||||
m4trace:configure.ac:126: -1- m4_pattern_allow([^HAVE_RRD_H$])
|
||||
m4trace:configure.ac:126: -1- AM_CONDITIONAL([NFPROFILE], [true])
|
||||
m4trace:configure.ac:126: -1- AC_SUBST([NFPROFILE_TRUE])
|
||||
m4trace:configure.ac:126: -1- AC_SUBST_TRACE([NFPROFILE_TRUE])
|
||||
m4trace:configure.ac:126: -1- m4_pattern_allow([^NFPROFILE_TRUE$])
|
||||
m4trace:configure.ac:126: -1- AC_SUBST([NFPROFILE_FALSE])
|
||||
m4trace:configure.ac:126: -1- AC_SUBST_TRACE([NFPROFILE_FALSE])
|
||||
m4trace:configure.ac:126: -1- m4_pattern_allow([^NFPROFILE_FALSE$])
|
||||
m4trace:configure.ac:126: -1- _AM_SUBST_NOTMAKE([NFPROFILE_TRUE])
|
||||
m4trace:configure.ac:126: -1- _AM_SUBST_NOTMAKE([NFPROFILE_FALSE])
|
||||
m4trace:configure.ac:126: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [../../lib/autoconf/general.m4:2748: AC_RUN_IFELSE is expanded from...
|
||||
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
|
||||
../../lib/autoconf/general.m4:1462: AC_ARG_ENABLE is expanded from...
|
||||
configure.ac:126: the top level])
|
||||
m4trace:configure.ac:189: -2- AM_CONDITIONAL([NFTRACK], [false])
|
||||
m4trace:configure.ac:189: -2- AC_SUBST([NFTRACK_TRUE])
|
||||
m4trace:configure.ac:189: -2- AC_SUBST_TRACE([NFTRACK_TRUE])
|
||||
m4trace:configure.ac:189: -2- m4_pattern_allow([^NFTRACK_TRUE$])
|
||||
m4trace:configure.ac:189: -2- AC_SUBST([NFTRACK_FALSE])
|
||||
m4trace:configure.ac:189: -2- AC_SUBST_TRACE([NFTRACK_FALSE])
|
||||
m4trace:configure.ac:189: -2- m4_pattern_allow([^NFTRACK_FALSE$])
|
||||
m4trace:configure.ac:189: -2- _AM_SUBST_NOTMAKE([NFTRACK_TRUE])
|
||||
m4trace:configure.ac:189: -2- _AM_SUBST_NOTMAKE([NFTRACK_FALSE])
|
||||
m4trace:configure.ac:159: -1- AC_SUBST([RRD_LIBS])
|
||||
m4trace:configure.ac:159: -1- AC_SUBST_TRACE([RRD_LIBS])
|
||||
m4trace:configure.ac:159: -1- m4_pattern_allow([^RRD_LIBS$])
|
||||
m4trace:configure.ac:159: -1- AH_OUTPUT([HAVE_RRD_H], [/* Define to 1 if you have the <rrd.h> header file. */
|
||||
@%:@undef HAVE_RRD_H])
|
||||
m4trace:configure.ac:159: -1- AC_DEFINE_TRACE_LITERAL([HAVE_RRD_H])
|
||||
m4trace:configure.ac:159: -1- m4_pattern_allow([^HAVE_RRD_H$])
|
||||
m4trace:configure.ac:159: -1- AM_CONDITIONAL([NFTRACK], [true])
|
||||
m4trace:configure.ac:159: -1- AC_SUBST([NFTRACK_TRUE])
|
||||
m4trace:configure.ac:159: -1- AC_SUBST_TRACE([NFTRACK_TRUE])
|
||||
m4trace:configure.ac:159: -1- m4_pattern_allow([^NFTRACK_TRUE$])
|
||||
m4trace:configure.ac:159: -1- AC_SUBST([NFTRACK_FALSE])
|
||||
m4trace:configure.ac:159: -1- AC_SUBST_TRACE([NFTRACK_FALSE])
|
||||
m4trace:configure.ac:159: -1- m4_pattern_allow([^NFTRACK_FALSE$])
|
||||
m4trace:configure.ac:159: -1- _AM_SUBST_NOTMAKE([NFTRACK_TRUE])
|
||||
m4trace:configure.ac:159: -1- _AM_SUBST_NOTMAKE([NFTRACK_FALSE])
|
||||
m4trace:configure.ac:159: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [../../lib/autoconf/general.m4:2748: AC_RUN_IFELSE is expanded from...
|
||||
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
|
||||
../../lib/autoconf/general.m4:1462: AC_ARG_ENABLE is expanded from...
|
||||
configure.ac:159: the top level])
|
||||
m4trace:configure.ac:194: -1- AM_CONDITIONAL([SFLOW], [test "$enable_sflow" = yes])
|
||||
m4trace:configure.ac:194: -1- AC_SUBST([SFLOW_TRUE])
|
||||
m4trace:configure.ac:194: -1- AC_SUBST_TRACE([SFLOW_TRUE])
|
||||
m4trace:configure.ac:194: -1- m4_pattern_allow([^SFLOW_TRUE$])
|
||||
m4trace:configure.ac:194: -1- AC_SUBST([SFLOW_FALSE])
|
||||
m4trace:configure.ac:194: -1- AC_SUBST_TRACE([SFLOW_FALSE])
|
||||
m4trace:configure.ac:194: -1- m4_pattern_allow([^SFLOW_FALSE$])
|
||||
m4trace:configure.ac:194: -1- _AM_SUBST_NOTMAKE([SFLOW_TRUE])
|
||||
m4trace:configure.ac:194: -1- _AM_SUBST_NOTMAKE([SFLOW_FALSE])
|
||||
m4trace:configure.ac:198: -1- AM_CONDITIONAL([READPCAP], [test "$enable_readpcap" = yes])
|
||||
m4trace:configure.ac:198: -1- AC_SUBST([READPCAP_TRUE])
|
||||
m4trace:configure.ac:198: -1- AC_SUBST_TRACE([READPCAP_TRUE])
|
||||
m4trace:configure.ac:198: -1- m4_pattern_allow([^READPCAP_TRUE$])
|
||||
m4trace:configure.ac:198: -1- AC_SUBST([READPCAP_FALSE])
|
||||
m4trace:configure.ac:198: -1- AC_SUBST_TRACE([READPCAP_FALSE])
|
||||
m4trace:configure.ac:198: -1- m4_pattern_allow([^READPCAP_FALSE$])
|
||||
m4trace:configure.ac:198: -1- _AM_SUBST_NOTMAKE([READPCAP_TRUE])
|
||||
m4trace:configure.ac:198: -1- _AM_SUBST_NOTMAKE([READPCAP_FALSE])
|
||||
m4trace:configure.ac:202: -1- AM_CONDITIONAL([BUILDNFPCAPD], [test "$enable_nfpcapd" = yes])
|
||||
m4trace:configure.ac:202: -1- AC_SUBST([BUILDNFPCAPD_TRUE])
|
||||
m4trace:configure.ac:202: -1- AC_SUBST_TRACE([BUILDNFPCAPD_TRUE])
|
||||
m4trace:configure.ac:202: -1- m4_pattern_allow([^BUILDNFPCAPD_TRUE$])
|
||||
m4trace:configure.ac:202: -1- AC_SUBST([BUILDNFPCAPD_FALSE])
|
||||
m4trace:configure.ac:202: -1- AC_SUBST_TRACE([BUILDNFPCAPD_FALSE])
|
||||
m4trace:configure.ac:202: -1- m4_pattern_allow([^BUILDNFPCAPD_FALSE$])
|
||||
m4trace:configure.ac:202: -1- _AM_SUBST_NOTMAKE([BUILDNFPCAPD_TRUE])
|
||||
m4trace:configure.ac:202: -1- _AM_SUBST_NOTMAKE([BUILDNFPCAPD_FALSE])
|
||||
m4trace:configure.ac:206: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKADDR_SA_LEN])
|
||||
m4trace:configure.ac:206: -2- m4_pattern_allow([^HAVE_SOCKADDR_SA_LEN$])
|
||||
m4trace:configure.ac:206: -2- AH_OUTPUT([HAVE_SOCKADDR_SA_LEN], [/* define if socket address structures have length fields */
|
||||
@%:@undef HAVE_SOCKADDR_SA_LEN])
|
||||
m4trace:configure.ac:210: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY])
|
||||
m4trace:configure.ac:210: -1- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY$])
|
||||
m4trace:configure.ac:210: -1- AH_OUTPUT([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY], [/* Define to 1 if `ss_family\' is a member of `struct sockaddr_storage\'. */
|
||||
@%:@undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY])
|
||||
m4trace:configure.ac:210: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY])
|
||||
m4trace:configure.ac:210: -1- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY$])
|
||||
m4trace:configure.ac:210: -1- AH_OUTPUT([HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY], [/* Define to 1 if `__ss_family\' is a member of `struct sockaddr_storage\'. */
|
||||
@%:@undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY])
|
||||
m4trace:configure.ac:210: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN])
|
||||
m4trace:configure.ac:210: -1- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN$])
|
||||
m4trace:configure.ac:210: -1- AH_OUTPUT([HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN], [/* Define to 1 if `ss_len\' is a member of `struct sockaddr_storage\'. */
|
||||
@%:@undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN])
|
||||
m4trace:configure.ac:210: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN])
|
||||
m4trace:configure.ac:210: -1- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN$])
|
||||
m4trace:configure.ac:210: -1- AH_OUTPUT([HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN], [/* Define to 1 if `__ss_len\' is a member of `struct sockaddr_storage\'. */
|
||||
@%:@undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN])
|
||||
m4trace:configure.ac:210: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_SA_LEN])
|
||||
m4trace:configure.ac:210: -1- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_SA_LEN$])
|
||||
m4trace:configure.ac:210: -1- AH_OUTPUT([HAVE_STRUCT_SOCKADDR_SA_LEN], [/* Define to 1 if `sa_len\' is a member of `struct sockaddr\'. */
|
||||
@%:@undef HAVE_STRUCT_SOCKADDR_SA_LEN])
|
||||
m4trace:configure.ac:220: -1- AC_SUBST([FT_INCLUDES])
|
||||
m4trace:configure.ac:220: -1- AC_SUBST_TRACE([FT_INCLUDES])
|
||||
m4trace:configure.ac:220: -1- m4_pattern_allow([^FT_INCLUDES$])
|
||||
m4trace:configure.ac:221: -1- AC_SUBST([FT_LDFLAGS])
|
||||
m4trace:configure.ac:221: -1- AC_SUBST_TRACE([FT_LDFLAGS])
|
||||
m4trace:configure.ac:221: -1- m4_pattern_allow([^FT_LDFLAGS$])
|
||||
m4trace:configure.ac:222: -1- AC_SUBST([LFLAGS])
|
||||
m4trace:configure.ac:222: -1- AC_SUBST_TRACE([LFLAGS])
|
||||
m4trace:configure.ac:222: -1- m4_pattern_allow([^LFLAGS$])
|
||||
m4trace:configure.ac:226: -1- AH_OUTPUT([HAVE_GETHOSTBYNAME], [/* Define to 1 if you have the `gethostbyname\' function. */
|
||||
@%:@undef HAVE_GETHOSTBYNAME])
|
||||
m4trace:configure.ac:226: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETHOSTBYNAME])
|
||||
m4trace:configure.ac:226: -1- m4_pattern_allow([^HAVE_GETHOSTBYNAME$])
|
||||
m4trace:configure.ac:226: -1- AH_OUTPUT([HAVE_LIBNSL], [/* Define to 1 if you have the `nsl\' library (-lnsl). */
|
||||
@%:@undef HAVE_LIBNSL])
|
||||
m4trace:configure.ac:226: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBNSL])
|
||||
m4trace:configure.ac:226: -1- m4_pattern_allow([^HAVE_LIBNSL$])
|
||||
m4trace:configure.ac:226: -1- AH_OUTPUT([HAVE_LIBSOCKET], [/* Define to 1 if you have the `socket\' library (-lsocket). */
|
||||
@%:@undef HAVE_LIBSOCKET])
|
||||
m4trace:configure.ac:226: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSOCKET])
|
||||
m4trace:configure.ac:226: -1- m4_pattern_allow([^HAVE_LIBSOCKET$])
|
||||
m4trace:configure.ac:227: -1- AH_OUTPUT([HAVE_SETSOCKOPT], [/* Define to 1 if you have the `setsockopt\' function. */
|
||||
@%:@undef HAVE_SETSOCKOPT])
|
||||
m4trace:configure.ac:227: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SETSOCKOPT])
|
||||
m4trace:configure.ac:227: -1- m4_pattern_allow([^HAVE_SETSOCKOPT$])
|
||||
m4trace:configure.ac:227: -1- AH_OUTPUT([HAVE_LIBSOCKET], [/* Define to 1 if you have the `socket\' library (-lsocket). */
|
||||
@%:@undef HAVE_LIBSOCKET])
|
||||
m4trace:configure.ac:227: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSOCKET])
|
||||
m4trace:configure.ac:227: -1- m4_pattern_allow([^HAVE_LIBSOCKET$])
|
||||
m4trace:configure.ac:230: -1- AH_OUTPUT([HAVE_FPURGE], [/* Define to 1 if you have the `fpurge\' function. */
|
||||
@%:@undef HAVE_FPURGE])
|
||||
m4trace:configure.ac:230: -1- AH_OUTPUT([HAVE___FPURGE], [/* Define to 1 if you have the `__fpurge\' function. */
|
||||
@%:@undef HAVE___FPURGE])
|
||||
m4trace:configure.ac:235: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HTONLL])
|
||||
m4trace:configure.ac:235: -1- m4_pattern_allow([^HAVE_HTONLL$])
|
||||
m4trace:configure.ac:235: -1- AH_OUTPUT([HAVE_HTONLL], [/* Define to 1 if the function (or macro) htonll exists. */
|
||||
@%:@undef HAVE_HTONLL])
|
||||
m4trace:configure.ac:254: -1- AH_OUTPUT([HAVE_DIRENT_H], [/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR\'.
|
||||
*/
|
||||
@%:@undef HAVE_DIRENT_H])
|
||||
m4trace:configure.ac:254: -1- AH_OUTPUT([HAVE_SYS_NDIR_H], [/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR\'.
|
||||
*/
|
||||
@%:@undef HAVE_SYS_NDIR_H])
|
||||
m4trace:configure.ac:254: -1- AH_OUTPUT([HAVE_SYS_DIR_H], [/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR\'.
|
||||
*/
|
||||
@%:@undef HAVE_SYS_DIR_H])
|
||||
m4trace:configure.ac:254: -1- AH_OUTPUT([HAVE_NDIR_H], [/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR\'. */
|
||||
@%:@undef HAVE_NDIR_H])
|
||||
m4trace:configure.ac:255: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
|
||||
m4trace:configure.ac:255: -1- m4_pattern_allow([^STDC_HEADERS$])
|
||||
m4trace:configure.ac:255: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
|
||||
@%:@undef STDC_HEADERS])
|
||||
m4trace:configure.ac:256: -1- AH_OUTPUT([HAVE_NAMESER8_COMPAT_H], [/* Define to 1 if you have the <nameser8_compat.h> header file. */
|
||||
@%:@undef HAVE_NAMESER8_COMPAT_H])
|
||||
m4trace:configure.ac:256: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NAMESER8_COMPAT_H])
|
||||
m4trace:configure.ac:256: -1- m4_pattern_allow([^HAVE_NAMESER8_COMPAT_H$])
|
||||
m4trace:configure.ac:257: -1- AH_OUTPUT([HAVE_FEATURES_H], [/* Define to 1 if you have the <features.h> header file. */
|
||||
@%:@undef HAVE_FEATURES_H])
|
||||
m4trace:configure.ac:257: -1- AH_OUTPUT([HAVE_ARPA_INET_H], [/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
@%:@undef HAVE_ARPA_INET_H])
|
||||
m4trace:configure.ac:257: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
@%:@undef HAVE_FCNTL_H])
|
||||
m4trace:configure.ac:257: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
@%:@undef HAVE_NETINET_IN_H])
|
||||
m4trace:configure.ac:257: -1- AH_OUTPUT([HAVE_FTS_H], [/* Define to 1 if you have the <fts.h> header file. */
|
||||
@%:@undef HAVE_FTS_H])
|
||||
m4trace:configure.ac:257: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
|
||||
@%:@undef HAVE_STDINT_H])
|
||||
m4trace:configure.ac:257: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
@%:@undef HAVE_STDLIB_H])
|
||||
m4trace:configure.ac:257: -1- AH_OUTPUT([HAVE_STDDEF_H], [/* Define to 1 if you have the <stddef.h> header file. */
|
||||
@%:@undef HAVE_STDDEF_H])
|
||||
m4trace:configure.ac:257: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
|
||||
@%:@undef HAVE_STRING_H])
|
||||
m4trace:configure.ac:257: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
@%:@undef HAVE_SYS_SOCKET_H])
|
||||
m4trace:configure.ac:257: -1- AH_OUTPUT([HAVE_SYSLOG_H], [/* Define to 1 if you have the <syslog.h> header file. */
|
||||
@%:@undef HAVE_SYSLOG_H])
|
||||
m4trace:configure.ac:257: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
|
||||
@%:@undef HAVE_UNISTD_H])
|
||||
m4trace:configure.ac:257: -1- AH_OUTPUT([HAVE_ISO_LIMITS_ISO_H], [/* Define to 1 if you have the <iso/limits_iso.h> header file. */
|
||||
@%:@undef HAVE_ISO_LIMITS_ISO_H])
|
||||
m4trace:configure.ac:258: -1- AH_OUTPUT([HAVE_PCAP_BPF_H], [/* Define to 1 if you have the <pcap-bpf.h> header file. */
|
||||
@%:@undef HAVE_PCAP_BPF_H])
|
||||
m4trace:configure.ac:258: -1- AH_OUTPUT([HAVE_NET_BPF_H], [/* Define to 1 if you have the <net/bpf.h> header file. */
|
||||
@%:@undef HAVE_NET_BPF_H])
|
||||
m4trace:configure.ac:260: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
@%:@undef HAVE_SYS_TYPES_H])
|
||||
m4trace:configure.ac:260: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
@%:@undef HAVE_NETINET_IN_H])
|
||||
m4trace:configure.ac:260: -1- AH_OUTPUT([HAVE_ARPA_NAMESER_H], [/* Define to 1 if you have the <arpa/nameser.h> header file. */
|
||||
@%:@undef HAVE_ARPA_NAMESER_H])
|
||||
m4trace:configure.ac:260: -1- AH_OUTPUT([HAVE_ARPA_NAMESER_COMPAT_H], [/* Define to 1 if you have the <arpa/nameser_compat.h> header file. */
|
||||
@%:@undef HAVE_ARPA_NAMESER_COMPAT_H])
|
||||
m4trace:configure.ac:260: -1- AH_OUTPUT([HAVE_NETDB_H], [/* Define to 1 if you have the <netdb.h> header file. */
|
||||
@%:@undef HAVE_NETDB_H])
|
||||
m4trace:configure.ac:260: -1- AH_OUTPUT([HAVE_RESOLV_H], [/* Define to 1 if you have the <resolv.h> header file. */
|
||||
@%:@undef HAVE_RESOLV_H])
|
||||
m4trace:configure.ac:279: -1- AC_SUBST([FTS_OBJ])
|
||||
m4trace:configure.ac:279: -1- AC_SUBST_TRACE([FTS_OBJ])
|
||||
m4trace:configure.ac:279: -1- m4_pattern_allow([^FTS_OBJ$])
|
||||
m4trace:configure.ac:283: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_VOID_P])
|
||||
m4trace:configure.ac:283: -1- m4_pattern_allow([^SIZEOF_VOID_P$])
|
||||
m4trace:configure.ac:283: -1- AH_OUTPUT([SIZEOF_VOID_P], [/* The size of `void *\', as computed by sizeof. */
|
||||
@%:@undef SIZEOF_VOID_P])
|
||||
m4trace:configure.ac:285: -1- AC_DEFINE_TRACE_LITERAL([const])
|
||||
m4trace:configure.ac:285: -1- m4_pattern_allow([^const$])
|
||||
m4trace:configure.ac:285: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */
|
||||
@%:@undef const])
|
||||
m4trace:configure.ac:286: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler
|
||||
calls it, or to nothing if \'inline\' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#endif])
|
||||
m4trace:configure.ac:287: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||
# if defined __BIG_ENDIAN__
|
||||
# define WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# ifndef WORDS_BIGENDIAN
|
||||
# undef WORDS_BIGENDIAN
|
||||
# endif
|
||||
#endif])
|
||||
m4trace:configure.ac:287: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN])
|
||||
m4trace:configure.ac:287: -1- m4_pattern_allow([^WORDS_BIGENDIAN$])
|
||||
m4trace:configure.ac:287: -1- AC_DEFINE_TRACE_LITERAL([AC_APPLE_UNIVERSAL_BUILD])
|
||||
m4trace:configure.ac:287: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$])
|
||||
m4trace:configure.ac:287: -1- AH_OUTPUT([AC_APPLE_UNIVERSAL_BUILD], [/* Define if building universal (internal helper macro) */
|
||||
@%:@undef AC_APPLE_UNIVERSAL_BUILD])
|
||||
m4trace:configure.ac:288: -1- AC_DEFINE_TRACE_LITERAL([pid_t])
|
||||
m4trace:configure.ac:288: -1- m4_pattern_allow([^pid_t$])
|
||||
m4trace:configure.ac:288: -1- AH_OUTPUT([pid_t], [/* Define to `int\' if <sys/types.h> does not define. */
|
||||
@%:@undef pid_t])
|
||||
m4trace:configure.ac:289: -1- AC_DEFINE_TRACE_LITERAL([size_t])
|
||||
m4trace:configure.ac:289: -1- m4_pattern_allow([^size_t$])
|
||||
m4trace:configure.ac:289: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if <sys/types.h> does not define. */
|
||||
@%:@undef size_t])
|
||||
m4trace:configure.ac:290: -1- AC_DEFINE_TRACE_LITERAL([TM_IN_SYS_TIME])
|
||||
m4trace:configure.ac:290: -1- m4_pattern_allow([^TM_IN_SYS_TIME$])
|
||||
m4trace:configure.ac:290: -1- AH_OUTPUT([TM_IN_SYS_TIME], [/* Define to 1 if your <sys/time.h> declares `struct tm\'. */
|
||||
@%:@undef TM_IN_SYS_TIME])
|
||||
m4trace:configure.ac:291: -1- AC_DEFINE_TRACE_LITERAL([HAVE__BOOL])
|
||||
m4trace:configure.ac:291: -1- m4_pattern_allow([^HAVE__BOOL$])
|
||||
m4trace:configure.ac:291: -1- AH_OUTPUT([HAVE__BOOL], [/* Define to 1 if the system has the type `_Bool\'. */
|
||||
@%:@undef HAVE__BOOL])
|
||||
m4trace:configure.ac:291: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDBOOL_H])
|
||||
m4trace:configure.ac:291: -1- m4_pattern_allow([^HAVE_STDBOOL_H$])
|
||||
m4trace:configure.ac:291: -1- AH_OUTPUT([HAVE_STDBOOL_H], [/* Define to 1 if stdbool.h conforms to C99. */
|
||||
@%:@undef HAVE_STDBOOL_H])
|
||||
m4trace:configure.ac:294: -1- AC_DEFINE_TRACE_LITERAL([CLOSEDIR_VOID])
|
||||
m4trace:configure.ac:294: -1- m4_pattern_allow([^CLOSEDIR_VOID$])
|
||||
m4trace:configure.ac:294: -1- AH_OUTPUT([CLOSEDIR_VOID], [/* Define to 1 if the `closedir\' function returns void instead of `int\'. */
|
||||
@%:@undef CLOSEDIR_VOID])
|
||||
m4trace:configure.ac:295: -1- AH_OUTPUT([HAVE_VFORK_H], [/* Define to 1 if you have the <vfork.h> header file. */
|
||||
@%:@undef HAVE_VFORK_H])
|
||||
m4trace:configure.ac:295: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VFORK_H])
|
||||
m4trace:configure.ac:295: -1- m4_pattern_allow([^HAVE_VFORK_H$])
|
||||
m4trace:configure.ac:295: -1- AH_OUTPUT([HAVE_FORK], [/* Define to 1 if you have the `fork\' function. */
|
||||
@%:@undef HAVE_FORK])
|
||||
m4trace:configure.ac:295: -1- AH_OUTPUT([HAVE_VFORK], [/* Define to 1 if you have the `vfork\' function. */
|
||||
@%:@undef HAVE_VFORK])
|
||||
m4trace:configure.ac:295: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_VFORK])
|
||||
m4trace:configure.ac:295: -1- m4_pattern_allow([^HAVE_WORKING_VFORK$])
|
||||
m4trace:configure.ac:295: -1- AH_OUTPUT([HAVE_WORKING_VFORK], [/* Define to 1 if `vfork\' works. */
|
||||
@%:@undef HAVE_WORKING_VFORK])
|
||||
m4trace:configure.ac:295: -1- AC_DEFINE_TRACE_LITERAL([vfork])
|
||||
m4trace:configure.ac:295: -1- m4_pattern_allow([^vfork$])
|
||||
m4trace:configure.ac:295: -1- AH_OUTPUT([vfork], [/* Define as `fork\' if `vfork\' does not work. */
|
||||
@%:@undef vfork])
|
||||
m4trace:configure.ac:295: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_FORK])
|
||||
m4trace:configure.ac:295: -1- m4_pattern_allow([^HAVE_WORKING_FORK$])
|
||||
m4trace:configure.ac:295: -1- AH_OUTPUT([HAVE_WORKING_FORK], [/* Define to 1 if `fork\' works. */
|
||||
@%:@undef HAVE_WORKING_FORK])
|
||||
m4trace:configure.ac:296: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
@%:@undef HAVE_STDLIB_H])
|
||||
m4trace:configure.ac:296: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDLIB_H])
|
||||
m4trace:configure.ac:296: -1- m4_pattern_allow([^HAVE_STDLIB_H$])
|
||||
m4trace:configure.ac:296: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC])
|
||||
m4trace:configure.ac:296: -1- m4_pattern_allow([^HAVE_MALLOC$])
|
||||
m4trace:configure.ac:296: -1- AH_OUTPUT([HAVE_MALLOC], [/* Define to 1 if your system has a GNU libc compatible `malloc\' function, and
|
||||
to 0 otherwise. */
|
||||
@%:@undef HAVE_MALLOC])
|
||||
m4trace:configure.ac:296: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC])
|
||||
m4trace:configure.ac:296: -1- m4_pattern_allow([^HAVE_MALLOC$])
|
||||
m4trace:configure.ac:296: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS malloc.$ac_objext"])
|
||||
m4trace:configure.ac:296: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
|
||||
m4trace:configure.ac:296: -1- m4_pattern_allow([^LIB@&t@OBJS$])
|
||||
m4trace:configure.ac:296: -1- AC_LIBSOURCE([malloc.c])
|
||||
m4trace:configure.ac:296: -1- AC_DEFINE_TRACE_LITERAL([malloc])
|
||||
m4trace:configure.ac:296: -1- m4_pattern_allow([^malloc$])
|
||||
m4trace:configure.ac:296: -1- AH_OUTPUT([malloc], [/* Define to rpl_malloc if the replacement function should be used. */
|
||||
@%:@undef malloc])
|
||||
m4trace:configure.ac:297: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME])
|
||||
m4trace:configure.ac:297: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$])
|
||||
m4trace:configure.ac:297: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
@%:@undef TIME_WITH_SYS_TIME])
|
||||
m4trace:configure.ac:297: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
@%:@undef HAVE_SYS_TIME_H])
|
||||
m4trace:configure.ac:297: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
|
||||
@%:@undef HAVE_UNISTD_H])
|
||||
m4trace:configure.ac:297: -1- AH_OUTPUT([HAVE_ALARM], [/* Define to 1 if you have the `alarm\' function. */
|
||||
@%:@undef HAVE_ALARM])
|
||||
m4trace:configure.ac:297: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS mktime.$ac_objext"])
|
||||
m4trace:configure.ac:297: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
|
||||
m4trace:configure.ac:297: -1- m4_pattern_allow([^LIB@&t@OBJS$])
|
||||
m4trace:configure.ac:297: -1- AC_LIBSOURCE([mktime.c])
|
||||
m4trace:configure.ac:298: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
@%:@undef HAVE_STDLIB_H])
|
||||
m4trace:configure.ac:298: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDLIB_H])
|
||||
m4trace:configure.ac:298: -1- m4_pattern_allow([^HAVE_STDLIB_H$])
|
||||
m4trace:configure.ac:298: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALLOC])
|
||||
m4trace:configure.ac:298: -1- m4_pattern_allow([^HAVE_REALLOC$])
|
||||
m4trace:configure.ac:298: -1- AH_OUTPUT([HAVE_REALLOC], [/* Define to 1 if your system has a GNU libc compatible `realloc\' function,
|
||||
and to 0 otherwise. */
|
||||
@%:@undef HAVE_REALLOC])
|
||||
m4trace:configure.ac:298: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALLOC])
|
||||
m4trace:configure.ac:298: -1- m4_pattern_allow([^HAVE_REALLOC$])
|
||||
m4trace:configure.ac:298: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS realloc.$ac_objext"])
|
||||
m4trace:configure.ac:298: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
|
||||
m4trace:configure.ac:298: -1- m4_pattern_allow([^LIB@&t@OBJS$])
|
||||
m4trace:configure.ac:298: -1- AC_LIBSOURCE([realloc.c])
|
||||
m4trace:configure.ac:298: -1- AC_DEFINE_TRACE_LITERAL([realloc])
|
||||
m4trace:configure.ac:298: -1- m4_pattern_allow([^realloc$])
|
||||
m4trace:configure.ac:298: -1- AH_OUTPUT([realloc], [/* Define to rpl_realloc if the replacement function should be used. */
|
||||
@%:@undef realloc])
|
||||
m4trace:configure.ac:299: -1- AC_DEFINE_TRACE_LITERAL([LSTAT_FOLLOWS_SLASHED_SYMLINK])
|
||||
m4trace:configure.ac:299: -1- m4_pattern_allow([^LSTAT_FOLLOWS_SLASHED_SYMLINK$])
|
||||
m4trace:configure.ac:299: -1- AH_OUTPUT([LSTAT_FOLLOWS_SLASHED_SYMLINK], [/* Define to 1 if `lstat\' dereferences a symlink specified with a trailing
|
||||
slash. */
|
||||
@%:@undef LSTAT_FOLLOWS_SLASHED_SYMLINK])
|
||||
m4trace:configure.ac:299: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS lstat.$ac_objext"])
|
||||
m4trace:configure.ac:299: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
|
||||
m4trace:configure.ac:299: -1- m4_pattern_allow([^LIB@&t@OBJS$])
|
||||
m4trace:configure.ac:299: -1- AC_LIBSOURCE([lstat.c])
|
||||
m4trace:configure.ac:299: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS stat.$ac_objext"])
|
||||
m4trace:configure.ac:299: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
|
||||
m4trace:configure.ac:299: -1- m4_pattern_allow([^LIB@&t@OBJS$])
|
||||
m4trace:configure.ac:299: -1- AC_LIBSOURCE([stat.c])
|
||||
m4trace:configure.ac:299: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STAT_EMPTY_STRING_BUG])
|
||||
m4trace:configure.ac:299: -1- m4_pattern_allow([^HAVE_STAT_EMPTY_STRING_BUG$])
|
||||
m4trace:configure.ac:299: -1- AH_OUTPUT([HAVE_STAT_EMPTY_STRING_BUG], [/* Define to 1 if `stat\' has the bug that it succeeds when given the
|
||||
zero-length file name argument. */
|
||||
@%:@undef HAVE_STAT_EMPTY_STRING_BUG])
|
||||
m4trace:configure.ac:300: -1- AH_OUTPUT([HAVE_STRFTIME], [/* Define to 1 if you have the `strftime\' function. */
|
||||
@%:@undef HAVE_STRFTIME])
|
||||
m4trace:configure.ac:300: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRFTIME])
|
||||
m4trace:configure.ac:300: -1- m4_pattern_allow([^HAVE_STRFTIME$])
|
||||
m4trace:configure.ac:300: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRFTIME])
|
||||
m4trace:configure.ac:300: -1- m4_pattern_allow([^HAVE_STRFTIME$])
|
||||
m4trace:configure.ac:301: -1- AH_OUTPUT([HAVE_INET_NTOA], [/* Define to 1 if you have the `inet_ntoa\' function. */
|
||||
@%:@undef HAVE_INET_NTOA])
|
||||
m4trace:configure.ac:301: -1- AH_OUTPUT([HAVE_SOCKET], [/* Define to 1 if you have the `socket\' function. */
|
||||
@%:@undef HAVE_SOCKET])
|
||||
m4trace:configure.ac:301: -1- AH_OUTPUT([HAVE_STRCHR], [/* Define to 1 if you have the `strchr\' function. */
|
||||
@%:@undef HAVE_STRCHR])
|
||||
m4trace:configure.ac:301: -1- AH_OUTPUT([HAVE_STRDUP], [/* Define to 1 if you have the `strdup\' function. */
|
||||
@%:@undef HAVE_STRDUP])
|
||||
m4trace:configure.ac:301: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */
|
||||
@%:@undef HAVE_STRERROR])
|
||||
m4trace:configure.ac:301: -1- AH_OUTPUT([HAVE_STRRCHR], [/* Define to 1 if you have the `strrchr\' function. */
|
||||
@%:@undef HAVE_STRRCHR])
|
||||
m4trace:configure.ac:301: -1- AH_OUTPUT([HAVE_STRSTR], [/* Define to 1 if you have the `strstr\' function. */
|
||||
@%:@undef HAVE_STRSTR])
|
||||
m4trace:configure.ac:301: -1- AH_OUTPUT([HAVE_SCANDIR], [/* Define to 1 if you have the `scandir\' function. */
|
||||
@%:@undef HAVE_SCANDIR])
|
||||
m4trace:configure.ac:306: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
|
||||
@%:@undef HAVE_LIBRESOLV])
|
||||
m4trace:configure.ac:306: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
|
||||
m4trace:configure.ac:306: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
|
||||
m4trace:configure.ac:306: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
|
||||
@%:@undef HAVE_LIBRESOLV])
|
||||
m4trace:configure.ac:306: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
|
||||
m4trace:configure.ac:306: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
|
||||
m4trace:configure.ac:306: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSOCKET])
|
||||
m4trace:configure.ac:306: -1- m4_pattern_allow([^HAVE_LIBSOCKET$])
|
||||
m4trace:configure.ac:306: -1- AH_OUTPUT([HAVE_LIBSOCKET], [/* */
|
||||
@%:@undef HAVE_LIBSOCKET])
|
||||
m4trace:configure.ac:306: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
|
||||
m4trace:configure.ac:306: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
|
||||
m4trace:configure.ac:306: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* */
|
||||
@%:@undef HAVE_LIBRESOLV])
|
||||
m4trace:configure.ac:306: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
|
||||
@%:@undef HAVE_LIBRESOLV])
|
||||
m4trace:configure.ac:306: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
|
||||
m4trace:configure.ac:306: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
|
||||
m4trace:configure.ac:306: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
|
||||
@%:@undef HAVE_LIBRESOLV])
|
||||
m4trace:configure.ac:306: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
|
||||
m4trace:configure.ac:306: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
|
||||
m4trace:configure.ac:321: -1- AC_DEFINE_TRACE_LITERAL([ptrdiff_t])
|
||||
m4trace:configure.ac:321: -1- m4_pattern_allow([^ptrdiff_t$])
|
||||
m4trace:configure.ac:321: -1- AH_OUTPUT([ptrdiff_t], [/* Define to `long\' if <sys/types.h> does not define. */
|
||||
@%:@undef ptrdiff_t])
|
||||
m4trace:configure.ac:322: -1- AC_DEFINE_TRACE_LITERAL([size_t])
|
||||
m4trace:configure.ac:322: -1- m4_pattern_allow([^size_t$])
|
||||
m4trace:configure.ac:322: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if <sys/types.h> does not define. */
|
||||
@%:@undef size_t])
|
||||
m4trace:configure.ac:323: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_SHORT])
|
||||
m4trace:configure.ac:323: -1- m4_pattern_allow([^SIZEOF_SHORT$])
|
||||
m4trace:configure.ac:323: -1- AH_OUTPUT([SIZEOF_SHORT], [/* The size of `short\', as computed by sizeof. */
|
||||
@%:@undef SIZEOF_SHORT])
|
||||
m4trace:configure.ac:324: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_INT])
|
||||
m4trace:configure.ac:324: -1- m4_pattern_allow([^SIZEOF_INT$])
|
||||
m4trace:configure.ac:324: -1- AH_OUTPUT([SIZEOF_INT], [/* The size of `int\', as computed by sizeof. */
|
||||
@%:@undef SIZEOF_INT])
|
||||
m4trace:configure.ac:325: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG])
|
||||
m4trace:configure.ac:325: -1- m4_pattern_allow([^SIZEOF_LONG$])
|
||||
m4trace:configure.ac:325: -1- AH_OUTPUT([SIZEOF_LONG], [/* The size of `long\', as computed by sizeof. */
|
||||
@%:@undef SIZEOF_LONG])
|
||||
m4trace:configure.ac:326: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG_LONG])
|
||||
m4trace:configure.ac:326: -1- m4_pattern_allow([^SIZEOF_LONG_LONG$])
|
||||
m4trace:configure.ac:326: -1- AH_OUTPUT([SIZEOF_LONG_LONG], [/* The size of `long long\', as computed by sizeof. */
|
||||
@%:@undef SIZEOF_LONG_LONG])
|
||||
m4trace:configure.ac:327: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF___INT64])
|
||||
m4trace:configure.ac:327: -1- m4_pattern_allow([^SIZEOF___INT64$])
|
||||
m4trace:configure.ac:327: -1- AH_OUTPUT([SIZEOF___INT64], [/* The size of `__int64\', as computed by sizeof. */
|
||||
@%:@undef SIZEOF___INT64])
|
||||
m4trace:configure.ac:328: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_VOID_P])
|
||||
m4trace:configure.ac:328: -1- m4_pattern_allow([^SIZEOF_VOID_P$])
|
||||
m4trace:configure.ac:328: -1- AH_OUTPUT([SIZEOF_VOID_P], [/* The size of `void *\', as computed by sizeof. */
|
||||
@%:@undef SIZEOF_VOID_P])
|
||||
m4trace:configure.ac:329: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_SIZE_T])
|
||||
m4trace:configure.ac:329: -1- m4_pattern_allow([^SIZEOF_SIZE_T$])
|
||||
m4trace:configure.ac:329: -1- AH_OUTPUT([SIZEOF_SIZE_T], [/* The size of `size_t\', as computed by sizeof. */
|
||||
@%:@undef SIZEOF_SIZE_T])
|
||||
m4trace:configure.ac:330: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_PTRDIFF_T])
|
||||
m4trace:configure.ac:330: -1- m4_pattern_allow([^SIZEOF_PTRDIFF_T$])
|
||||
m4trace:configure.ac:330: -1- AH_OUTPUT([SIZEOF_PTRDIFF_T], [/* The size of `ptrdiff_t\', as computed by sizeof. */
|
||||
@%:@undef SIZEOF_PTRDIFF_T])
|
||||
m4trace:configure.ac:331: -1- AC_DEFINE_TRACE_LITERAL([const])
|
||||
m4trace:configure.ac:331: -1- m4_pattern_allow([^const$])
|
||||
m4trace:configure.ac:331: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */
|
||||
@%:@undef const])
|
||||
m4trace:configure.ac:332: -1- AH_OUTPUT([HAVE_MEMCMP], [/* Define to 1 if you have the `memcmp\' function. */
|
||||
@%:@undef HAVE_MEMCMP])
|
||||
m4trace:configure.ac:332: -1- AH_OUTPUT([HAVE_MEMCPY], [/* Define to 1 if you have the `memcpy\' function. */
|
||||
@%:@undef HAVE_MEMCPY])
|
||||
m4trace:configure.ac:332: -1- AH_OUTPUT([HAVE_MEMMOVE], [/* Define to 1 if you have the `memmove\' function. */
|
||||
@%:@undef HAVE_MEMMOVE])
|
||||
m4trace:configure.ac:332: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */
|
||||
@%:@undef HAVE_MEMSET])
|
||||
m4trace:configure.ac:335: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
|
||||
You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from...
|
||||
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
|
||||
../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
|
||||
configure.ac:335: the top level])
|
||||
m4trace:configure.ac:353: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SEMUN])
|
||||
m4trace:configure.ac:353: -1- m4_pattern_allow([^HAVE_SEMUN$])
|
||||
m4trace:configure.ac:353: -1- AH_OUTPUT([HAVE_SEMUN], [/* Define if sys/sem.h defines struct semun */
|
||||
@%:@undef HAVE_SEMUN])
|
||||
m4trace:configure.ac:357: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
|
||||
You should run autoupdate.], [../../lib/autoconf/general.m4:2764: AC_TRY_RUN is expanded from...
|
||||
configure.ac:357: the top level])
|
||||
m4trace:configure.ac:357: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SIZE_T_Z_FORMAT])
|
||||
m4trace:configure.ac:357: -1- m4_pattern_allow([^HAVE_SIZE_T_Z_FORMAT$])
|
||||
m4trace:configure.ac:357: -1- AH_OUTPUT([HAVE_SIZE_T_Z_FORMAT], [/* Define to 1 if you have a printf() that supports the %z format string. */
|
||||
@%:@undef HAVE_SIZE_T_Z_FORMAT])
|
||||
m4trace:configure.ac:386: -1- AC_CONFIG_FILES([Makefile bin/Makefile man/Makefile])
|
||||
m4trace:configure.ac:386: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
|
||||
You should run autoupdate.], [])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
|
||||
m4trace:configure.ac:386: -1- m4_pattern_allow([^LIB@&t@OBJS$])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST_TRACE([LTLIBOBJS])
|
||||
m4trace:configure.ac:386: -1- m4_pattern_allow([^LTLIBOBJS$])
|
||||
m4trace:configure.ac:386: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST([am__EXEEXT_TRUE])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE])
|
||||
m4trace:configure.ac:386: -1- m4_pattern_allow([^am__EXEEXT_TRUE$])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST([am__EXEEXT_FALSE])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE])
|
||||
m4trace:configure.ac:386: -1- m4_pattern_allow([^am__EXEEXT_FALSE$])
|
||||
m4trace:configure.ac:386: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE])
|
||||
m4trace:configure.ac:386: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST_TRACE([top_builddir])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST_TRACE([top_build_prefix])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST_TRACE([srcdir])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST_TRACE([abs_srcdir])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST_TRACE([top_srcdir])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST_TRACE([abs_top_srcdir])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST_TRACE([builddir])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST_TRACE([abs_builddir])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST_TRACE([abs_top_builddir])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST_TRACE([INSTALL])
|
||||
m4trace:configure.ac:386: -1- AC_SUBST_TRACE([MKDIR_P])
|
@ -33,9 +33,10 @@ LDADD = $(DEPS_LIBS)
|
||||
AM_CFLAGS = -ggdb
|
||||
|
||||
# libnfdump sources
|
||||
output = output_json.c output_json.h
|
||||
common = nf_common.c nf_common.h
|
||||
util = util.c util.h
|
||||
filelzo = minilzo.c minilzo.h lzoconf.h lzodefs.h nffile.c nffile.h nfx.c nfx.h nfxstat.h nfxstat.c
|
||||
filelzo = minilzo.c minilzo.h lzoconf.h lzodefs.h lz4.c lz4.h nffile.c nffile.h nfx.c nfx.h
|
||||
nflist = flist.c flist.h fts_compat.c fts_compat.h
|
||||
filter = grammar.y scanner.l nftree.c nftree.h ipconv.c ipconv.h rbtree.h
|
||||
exporter = exporter.c exporter.h
|
||||
@ -59,9 +60,9 @@ expire= expire.c expire.h
|
||||
launch = launch.c launch.h
|
||||
|
||||
lib_LTLIBRARIES = libnfdump.la
|
||||
libnfdump_la_SOURCES = $(common) $(util) $(filelzo) $(nflist) $(filter) $(exporter)
|
||||
libnfdump_la_SOURCES = $(output) $(common) $(util) $(filelzo) $(nflist) $(filter) $(exporter)
|
||||
#libnfdump_la_LIBADD = -lz
|
||||
libnfdump_la_LDFLAGS = -release 1.6.15
|
||||
libnfdump_la_LDFLAGS = -release 1.6.17
|
||||
|
||||
|
||||
nfdump_SOURCES = nfdump.c nfdump.h nfstat.c nfstat.h nfexport.c nfexport.h \
|
||||
@ -111,7 +112,7 @@ nfpcapd_LDADD += -lpcap
|
||||
nfpcapd_LDFLAGS = -pthread
|
||||
endif
|
||||
|
||||
sfcapd_SOURCES = sfcapd.c sflow.c sflow.h sflow_proto.h \
|
||||
sfcapd_SOURCES = sfcapd.c sflow_nfdump.c sflow_nfdump.h sflow.h sflow_v2v4.h sflow_process.c sflow_process.h\
|
||||
$(nfstatfile) $(launch) \
|
||||
$(nfnet) $(collector) $(bookkeeper) $(expire)
|
||||
sfcapd_LDADD = -lnfdump
|
||||
|
2016
bin/Makefile.in
2016
bin/Makefile.in
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,11 +29,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: applybits_inline.c 39 2009-11-25 08:11:15Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 39 $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -46,11 +42,11 @@ static inline void ApplyNetMaskBits(master_record_t *flow_record, int apply_netb
|
||||
uint32_t mask_bits = flow_record->src_mask;
|
||||
if ( mask_bits > 64 ) {
|
||||
mask = 0xffffffffffffffffLL << ( 128 - mask_bits );
|
||||
flow_record->v6.srcaddr[1] &= mask;
|
||||
flow_record->V6.srcaddr[1] &= mask;
|
||||
} else {
|
||||
mask = 0xffffffffffffffffLL << ( 64 - mask_bits );
|
||||
flow_record->v6.srcaddr[0] &= mask;
|
||||
flow_record->v6.srcaddr[1] = 0;
|
||||
flow_record->V6.srcaddr[0] &= mask;
|
||||
flow_record->V6.srcaddr[1] = 0;
|
||||
}
|
||||
}
|
||||
if ( apply_netbits & 2 ) {
|
||||
@ -59,21 +55,21 @@ static inline void ApplyNetMaskBits(master_record_t *flow_record, int apply_netb
|
||||
|
||||
if ( mask_bits > 64 ) {
|
||||
mask = 0xffffffffffffffffLL << ( 128 - mask_bits );
|
||||
flow_record->v6.dstaddr[1] &= mask;
|
||||
flow_record->V6.dstaddr[1] &= mask;
|
||||
} else {
|
||||
mask = 0xffffffffffffffffLL << ( 64 - mask_bits );
|
||||
flow_record->v6.dstaddr[0] &= mask;
|
||||
flow_record->v6.dstaddr[1] = 0;
|
||||
flow_record->V6.dstaddr[0] &= mask;
|
||||
flow_record->V6.dstaddr[1] = 0;
|
||||
}
|
||||
}
|
||||
} else { // IPv4
|
||||
if ( apply_netbits & 1 ) {
|
||||
uint32_t srcmask = 0xffffffff << ( 32 - flow_record->src_mask );
|
||||
flow_record->v4.srcaddr &= srcmask;
|
||||
flow_record->V4.srcaddr &= srcmask;
|
||||
}
|
||||
if ( apply_netbits & 2 ) {
|
||||
uint32_t dstmask = 0xffffffff << ( 32 - flow_record->dst_mask );
|
||||
flow_record->v4.dstaddr &= dstmask;
|
||||
flow_record->V4.dstaddr &= dstmask;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <sys/shm.h>
|
||||
#include <sys/sem.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/param.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@ -68,7 +69,7 @@ static bookkeeper_list_t *bookkeeper_list = NULL;
|
||||
|
||||
/* function prototypes */
|
||||
|
||||
static uint32_t hash(char *str, int flag);
|
||||
static key_t hash(char *str, int flag);
|
||||
|
||||
static void sem_lock(int sem_set_id);
|
||||
|
||||
@ -80,18 +81,25 @@ static inline bookkeeper_list_t *Get_bookkeeper_list_entry(bookkeeper_t *bookkee
|
||||
|
||||
/* hash: compute hash value of string */
|
||||
#define MULTIPLIER 37
|
||||
static uint32_t hash(char *str, int flag) {
|
||||
static key_t hash(char *str, int flag) {
|
||||
uint32_t h;
|
||||
unsigned char *p;
|
||||
char cleanPath[MAXPATHLEN];
|
||||
|
||||
if ( realpath(str, cleanPath) == NULL ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
h = 0;
|
||||
for (p = (unsigned char*)str; *p != '\0'; p++)
|
||||
for (p = (unsigned char*)cleanPath; *p != '\0'; p++)
|
||||
h = MULTIPLIER * h + *p;
|
||||
|
||||
if ( flag ) {
|
||||
h = MULTIPLIER * h + 'R';
|
||||
}
|
||||
return h; // or, h % ARRAY_SIZE;
|
||||
// LogError("Bookeeper hash for path: '%s' -> '%s': %u flag: %i", str, cleanPath, h, flag);
|
||||
return (key_t)h; // or, h % ARRAY_SIZE;
|
||||
|
||||
} // End of hash
|
||||
|
||||
// locks the semaphore, for exclusive access to the bookkeeping record
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,18 +29,20 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: bookkeeper.h 39 2009-11-25 08:11:15Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 39 $
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _BOOKKEEPER_H
|
||||
#define _BOOKKEEPER_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
enum { BOOKKEEPER_OK = 0, ERR_FAILED, ERR_NOTEXISTS, ERR_PATHACCESS, ERR_EXISTS };
|
||||
|
||||
#define DETACH_ONLY 0
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2016, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
@ -64,7 +65,6 @@
|
||||
#include "util.h"
|
||||
#include "nf_common.h"
|
||||
#include "nffile.h"
|
||||
#include "nfxstat.h"
|
||||
#include "bookkeeper.h"
|
||||
#include "collector.h"
|
||||
#include "nfx.h"
|
||||
@ -135,7 +135,6 @@ int ok;
|
||||
(*source)->bookkeeper = NULL;
|
||||
(*source)->any_source = 0;
|
||||
(*source)->exporter_data = NULL;
|
||||
(*source)->xstat = NULL;
|
||||
(*FlowSource)->exporter_count = 0;
|
||||
|
||||
// separate IP address from ident
|
||||
@ -156,15 +155,15 @@ int ok;
|
||||
uint64_t _ip[2];
|
||||
ok = inet_pton(PF_INET6, p, _ip);
|
||||
(*source)->sa_family = PF_INET6;
|
||||
(*source)->ip.v6[0] = ntohll(_ip[0]);
|
||||
(*source)->ip.v6[1] = ntohll(_ip[1]);
|
||||
(*source)->ip.V6[0] = ntohll(_ip[0]);
|
||||
(*source)->ip.V6[1] = ntohll(_ip[1]);
|
||||
} else {
|
||||
uint32_t _ip;
|
||||
ok = inet_pton(PF_INET, p, &_ip);
|
||||
(*source)->sa_family = PF_INET;
|
||||
(*source)->ip.v6[0] = 0;
|
||||
(*source)->ip.v6[1] = 0;
|
||||
(*source)->ip.v4 = ntohl(_ip);
|
||||
(*source)->ip.V6[0] = 0;
|
||||
(*source)->ip.V6[1] = 0;
|
||||
(*source)->ip.V4 = ntohl(_ip);
|
||||
}
|
||||
switch (ok) {
|
||||
case 0:
|
||||
@ -244,7 +243,6 @@ char s[MAXPATHLEN];
|
||||
(*FlowSource)->bookkeeper = NULL;
|
||||
(*FlowSource)->any_source = 1;
|
||||
(*FlowSource)->exporter_data = NULL;
|
||||
(*FlowSource)->xstat = NULL;
|
||||
(*FlowSource)->exporter_count = 0;
|
||||
|
||||
// fill in ident
|
||||
@ -327,7 +325,6 @@ int err;
|
||||
(*source)->bookkeeper = NULL;
|
||||
(*source)->any_source = 0;
|
||||
(*source)->exporter_data = NULL;
|
||||
(*source)->xstat = NULL;
|
||||
(*FlowSource)->exporter_count = 0;
|
||||
|
||||
switch (ss->ss_family) {
|
||||
@ -342,9 +339,9 @@ int err;
|
||||
}
|
||||
#endif
|
||||
(*source)->sa_family = PF_INET;
|
||||
(*source)->ip.v6[0] = 0;
|
||||
(*source)->ip.v6[1] = 0;
|
||||
(*source)->ip.v4 = ntohl(u.sa_in->sin_addr.s_addr);
|
||||
(*source)->ip.V6[0] = 0;
|
||||
(*source)->ip.V6[1] = 0;
|
||||
(*source)->ip.V4 = ntohl(u.sa_in->sin_addr.s_addr);
|
||||
ptr = &u.sa_in->sin_addr;
|
||||
} break;
|
||||
case PF_INET6: {
|
||||
@ -361,14 +358,14 @@ int err;
|
||||
#endif
|
||||
// ptr = &((struct sockaddr_in6 *)sa)->sin6_addr;
|
||||
(*source)->sa_family = PF_INET6;
|
||||
(*source)->ip.v6[0] = ntohll(ip_ptr[0]);
|
||||
(*source)->ip.v6[1] = ntohll(ip_ptr[1]);
|
||||
(*source)->ip.V6[0] = ntohll(ip_ptr[0]);
|
||||
(*source)->ip.V6[1] = ntohll(ip_ptr[1]);
|
||||
ptr = &u.sa_in6->sin6_addr;
|
||||
} break;
|
||||
default:
|
||||
// keep compiler happy
|
||||
(*source)->ip.v6[0] = 0;
|
||||
(*source)->ip.v6[1] = 0;
|
||||
(*source)->ip.V6[0] = 0;
|
||||
(*source)->ip.V6[1] = 0;
|
||||
ptr = NULL;
|
||||
|
||||
LogError("Unknown sa fanily: %d in '%s', line '%d'", ss->ss_family, __FILE__, __LINE__ );
|
||||
@ -533,14 +530,14 @@ int FlushInfoExporter(FlowSource_t *fs, exporter_info_record_t *exporter) {
|
||||
char ipstr[IP_STRING_LEN];
|
||||
printf("Flush Exporter: ");
|
||||
if ( exporter->sa_family == AF_INET ) {
|
||||
uint32_t _ip = htonl(exporter->ip.v4);
|
||||
uint32_t _ip = htonl(exporter->ip.V4);
|
||||
inet_ntop(AF_INET, &_ip, ipstr, sizeof(ipstr));
|
||||
printf("SysID: %u, IP: %16s, version: %u, ID: %2u\n", exporter->sysid,
|
||||
ipstr, exporter->version, exporter->id);
|
||||
} else if ( exporter->sa_family == AF_INET6 ) {
|
||||
uint64_t _ip[2];
|
||||
_ip[0] = htonll(exporter->ip.v6[0]);
|
||||
_ip[1] = htonll(exporter->ip.v6[1]);
|
||||
_ip[0] = htonll(exporter->ip.V6[0]);
|
||||
_ip[1] = htonll(exporter->ip.V6[1]);
|
||||
inet_ntop(AF_INET6, &_ip, ipstr, sizeof(ipstr));
|
||||
printf("SysID: %u, IP: %40s, version: %u, ID: %2u\n", exporter->sysid,
|
||||
ipstr, exporter->version, exporter->id);
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,17 +29,22 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: collector.h 51 2010-01-29 09:01:54Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 51 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _COLLECTOR_H
|
||||
#define _COLLECTOR_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "bookkeeper.h"
|
||||
#include "nffile.h"
|
||||
|
||||
#define FNAME_SIZE 256
|
||||
#define IDENT_SIZE 32
|
||||
|
||||
@ -53,7 +59,6 @@ typedef struct srecord_s {
|
||||
// common_record_t defines ext_map as uint_8, so max 256 extension maps allowed.
|
||||
// should be enough anyway
|
||||
|
||||
|
||||
typedef struct option_offset_s {
|
||||
struct option_offset_s *next;
|
||||
uint32_t id; // table id
|
||||
@ -114,9 +119,6 @@ typedef struct FlowSource_s {
|
||||
uint64_t first_seen; // in msec
|
||||
uint64_t last_seen; // in msec
|
||||
|
||||
// port histogram data
|
||||
xstat_t *xstat;
|
||||
|
||||
// Any exporter specific data
|
||||
generic_exporter_t *exporter_data;
|
||||
uint32_t exporter_count;
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,12 +29,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: collector_inline.c 37 2009-11-10 08:40:30Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 37 $
|
||||
*
|
||||
*/
|
||||
|
||||
static inline FlowSource_t *GetFlowSource(struct sockaddr_storage *ss) {
|
||||
@ -59,9 +54,9 @@ char as[100];
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
ip.v6[0] = 0;
|
||||
ip.v6[1] = 0;
|
||||
ip.v4 = ntohl(u.sa_in->sin_addr.s_addr);
|
||||
ip.V6[0] = 0;
|
||||
ip.V6[1] = 0;
|
||||
ip.V4 = ntohl(u.sa_in->sin_addr.s_addr);
|
||||
ptr = &u.sa_in->sin_addr;
|
||||
} break;
|
||||
case PF_INET6: {
|
||||
@ -75,14 +70,14 @@ char as[100];
|
||||
}
|
||||
#endif
|
||||
// ptr = &((struct sockaddr_in6 *)sa)->sin6_addr;
|
||||
ip.v6[0] = ntohll(ip_ptr[0]);
|
||||
ip.v6[1] = ntohll(ip_ptr[1]);
|
||||
ip.V6[0] = ntohll(ip_ptr[0]);
|
||||
ip.V6[1] = ntohll(ip_ptr[1]);
|
||||
ptr = &u.sa_in6->sin6_addr;
|
||||
} break;
|
||||
default:
|
||||
// keep compiler happy
|
||||
ip.v6[0] = 0;
|
||||
ip.v6[1] = 0;
|
||||
ip.V6[0] = 0;
|
||||
ip.V6[1] = 0;
|
||||
ptr = NULL;
|
||||
|
||||
LogError("Unknown sa fanily: %d in '%s', line '%d'", ss->ss_family, __FILE__, __LINE__ );
|
||||
@ -97,7 +92,7 @@ char as[100];
|
||||
|
||||
fs = FlowSource;
|
||||
while ( fs ) {
|
||||
if ( ip.v6[0] == fs->ip.v6[0] && ip.v6[1] == fs->ip.v6[1] )
|
||||
if ( ip.V6[0] == fs->ip.V6[0] && ip.V6[1] == fs->ip.V6[1] )
|
||||
return fs;
|
||||
|
||||
// if we match any source, store the current IP address - works as faster cache next time
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2013, Peter Haag
|
||||
* All rights reserved.
|
||||
@ -27,12 +28,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author$
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* $LastChangedRevision$
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -81,7 +76,6 @@
|
||||
#include "util.h"
|
||||
#include "nffile.h"
|
||||
#include "bookkeeper.h"
|
||||
#include "nfxstat.h"
|
||||
#include "collector.h"
|
||||
#include "flowtree.h"
|
||||
#include "content_dns.h"
|
||||
@ -212,6 +206,9 @@ int i;
|
||||
for (i=0; i<ancount && p < eod; i++ ) {
|
||||
uint32_t type, class, ttl;
|
||||
int32_t len = dn_expand(payload, eod, p, dn, DN_LENGTH);
|
||||
// keep compiler happy
|
||||
UNUSED(class);
|
||||
UNUSED(ttl);
|
||||
if(len < 0) {
|
||||
LogError("dn_expand() failed: %s", "");
|
||||
}
|
||||
|
23
bin/expire.h
23
bin/expire.h
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,17 +29,27 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: expire.h 39 2009-11-25 08:11:15Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 39 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _EXPIRE_H
|
||||
#define _EXPIRE_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FTS_H
|
||||
# include <fts.h>
|
||||
#else
|
||||
# include "fts_compat.h"
|
||||
#endif
|
||||
|
||||
#include "nfstatfile.h"
|
||||
#include "bookkeeper.h"
|
||||
|
||||
typedef struct channel_s {
|
||||
struct channel_s *next;
|
||||
char *datadir;
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2016, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2012, Peter Haag
|
||||
@ -61,7 +62,6 @@
|
||||
#include "nfx.h"
|
||||
#include "nfnet.h"
|
||||
#include "bookkeeper.h"
|
||||
#include "nfxstat.h"
|
||||
#include "collector.h"
|
||||
#include "exporter.h"
|
||||
#include "nf_common.h"
|
||||
@ -151,14 +151,14 @@ char *p1, *p2;
|
||||
#define IP_STRING_LEN 40
|
||||
char ipstr[IP_STRING_LEN];
|
||||
if ( exporter_record->sa_family == AF_INET ) {
|
||||
uint32_t _ip = htonl(exporter_record->ip.v4);
|
||||
uint32_t _ip = htonl(exporter_record->ip.V4);
|
||||
inet_ntop(AF_INET, &_ip, ipstr, sizeof(ipstr));
|
||||
printf("SysID: %u, IP: %16s, version: %u, ID: %2u, Slot: %u\n", exporter_record->sysid,
|
||||
ipstr, exporter_record->version, exporter_record->id, id);
|
||||
} else if ( exporter_record->sa_family == AF_INET6 ) {
|
||||
uint64_t _ip[2];
|
||||
_ip[0] = htonll(exporter_record->ip.v6[0]);
|
||||
_ip[1] = htonll(exporter_record->ip.v6[1]);
|
||||
_ip[0] = htonll(exporter_record->ip.V6[0]);
|
||||
_ip[1] = htonll(exporter_record->ip.V6[1]);
|
||||
inet_ntop(AF_INET6, &_ip, ipstr, sizeof(ipstr));
|
||||
printf("SysID: %u, IP: %40s, version: %u, ID: %2u, Slot: %u\n", exporter_record->sysid,
|
||||
ipstr, exporter_record->version, exporter_record->id, id);
|
||||
@ -347,14 +347,14 @@ uint64_t total_bytes;
|
||||
found = 1;
|
||||
printf("\n");
|
||||
if ( exporter_record->sa_family == AF_INET ) {
|
||||
uint32_t _ip = htonl(exporter_record->ip.v4);
|
||||
uint32_t _ip = htonl(exporter_record->ip.V4);
|
||||
inet_ntop(AF_INET, &_ip, ipstr, sizeof(ipstr));
|
||||
printf("SysID: %u, IP: %16s, version: %u, ID: %2u, Sequence Failures: %u\n", exporter_record->sysid,
|
||||
ipstr, exporter_record->version, exporter_record->exporter_id, exporter_record->sequence_failure);
|
||||
} else if ( exporter_record->sa_family == AF_INET6 ) {
|
||||
uint64_t _ip[2];
|
||||
_ip[0] = htonll(exporter_record->ip.v6[0]);
|
||||
_ip[1] = htonll(exporter_record->ip.v6[1]);
|
||||
_ip[0] = htonll(exporter_record->ip.V6[0]);
|
||||
_ip[1] = htonll(exporter_record->ip.V6[1]);
|
||||
inet_ntop(AF_INET6, &_ip, ipstr, sizeof(ipstr));
|
||||
printf("SysID: %u, IP: %40s, version: %u, ID: %2u, Sequence Failures: %u\n", exporter_record->sysid,
|
||||
ipstr, exporter_record->version, exporter_record->exporter_id, exporter_record->sequence_failure);
|
||||
@ -410,7 +410,7 @@ uint64_t total_bytes;
|
||||
printf("\n");
|
||||
exporter = &exporter_list[i]->info;
|
||||
if ( exporter->sa_family == AF_INET ) {
|
||||
uint32_t _ip = htonl(exporter->ip.v4);
|
||||
uint32_t _ip = htonl(exporter->ip.V4);
|
||||
inet_ntop(AF_INET, &_ip, ipstr, sizeof(ipstr));
|
||||
if ( exporter_list[i]->flows )
|
||||
printf("SysID: %u, IP: %16s, version: %u, ID: %2u, Sequence failures: %u, packets: %llu, flows: %llu\n",
|
||||
@ -424,8 +424,8 @@ uint64_t total_bytes;
|
||||
|
||||
} else if ( exporter->sa_family == AF_INET6 ) {
|
||||
uint64_t _ip[2];
|
||||
_ip[0] = htonll(exporter->ip.v6[0]);
|
||||
_ip[1] = htonll(exporter->ip.v6[1]);
|
||||
_ip[0] = htonll(exporter->ip.V6[0]);
|
||||
_ip[1] = htonll(exporter->ip.V6[1]);
|
||||
inet_ntop(AF_INET6, &_ip, ipstr, sizeof(ipstr));
|
||||
if ( exporter_list[i]->flows )
|
||||
printf("SysID: %u, IP: %40s, version: %u, ID: %2u, Sequence failures: %u, packets: %llu, flows: %llu\n ",
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2012, Peter Haag
|
||||
*
|
||||
@ -26,17 +27,20 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: peter $
|
||||
*
|
||||
* $Id: exporter.h 224 2014-02-16 12:59:29Z peter $
|
||||
*
|
||||
* $LastChangedRevision: 224 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _EXPORTER_H
|
||||
#define _EXPORTER_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "nffile.h"
|
||||
|
||||
int InitExporterList(void);
|
||||
|
||||
int AddExporterInfo(exporter_info_record_t *exporter_record);
|
||||
|
@ -798,6 +798,9 @@ printf("DGB: short fts: '%s', filer_first: '%s', filter_last: '%s'\n",
|
||||
continue;
|
||||
if ( strstr(ftsent->fts_name, ".stat") != NULL )
|
||||
continue;
|
||||
// skip OSX DS_Store files
|
||||
if ( strstr(ftsent->fts_name, ".DS_Store") != NULL )
|
||||
continue;
|
||||
// skip pcap file
|
||||
if ( strstr(ftsent->fts_name, "pcap") != NULL )
|
||||
continue;
|
||||
|
11
bin/flist.h
11
bin/flist.h
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,17 +29,15 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: flist.h 39 2009-11-25 08:11:15Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 39 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _FLIST_H
|
||||
#define _FLIST_H 1
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "nffile.h"
|
||||
|
||||
#define EMPTY_LIST ((nffile_t *)-1)
|
||||
|
||||
int InitHierPath(int num);
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2016, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2011, Peter Haag
|
||||
@ -50,7 +51,6 @@
|
||||
#include "rbtree.h"
|
||||
#include "nffile.h"
|
||||
#include "bookkeeper.h"
|
||||
#include "nfxstat.h"
|
||||
#include "collector.h"
|
||||
#include "netflow_pcap.h"
|
||||
#include "util.h"
|
||||
@ -110,7 +110,6 @@ struct FlowNode *node;
|
||||
memset((void *)node, 'A', sizeof(struct FlowNode));
|
||||
node->left = NULL;
|
||||
node->right = NULL;
|
||||
node->data = NULL;
|
||||
node->memflag = NODE_IN_USE;
|
||||
dbg_printf("New node: %llx\n", (unsigned long long)node);
|
||||
return node;
|
||||
@ -162,11 +161,6 @@ void Free_Node(struct FlowNode *node) {
|
||||
abort();
|
||||
}
|
||||
|
||||
if ( node->data ) {
|
||||
free(node->data);
|
||||
node->data = NULL;
|
||||
}
|
||||
|
||||
dbg_assert(node->left == NULL);
|
||||
dbg_assert(node->right == NULL);
|
||||
|
||||
@ -248,8 +242,6 @@ struct FlowNode *node, *nxt;
|
||||
for (node = RB_MIN(FlowTree, FlowTree); node != NULL; node = nxt) {
|
||||
nxt = RB_NEXT(FlowTree, FlowTree, node);
|
||||
RB_REMOVE(FlowTree, FlowTree, node);
|
||||
if ( node->data )
|
||||
free(node->data);
|
||||
}
|
||||
free(FlowElementCache);
|
||||
FlowElementCache = NULL;
|
||||
@ -467,9 +459,8 @@ void Push_Node(NodeList_t *NodeList, struct FlowNode *node) {
|
||||
NodeList->last = node;
|
||||
NodeList->length++;
|
||||
#ifdef DEVEL
|
||||
int proto = node->proto;
|
||||
printf("pushed node 0x%llx proto: %u, length: %u first: %llx, last: %llx\n",
|
||||
(unsigned long long)node, proto, NodeList->length, (unsigned long long)NodeList->list, (unsigned long long)NodeList->last);
|
||||
(unsigned long long)node, node->proto, NodeList->length, (unsigned long long)NodeList->list, (unsigned long long)NodeList->last);
|
||||
ListCheck(NodeList);
|
||||
#endif
|
||||
if ( NodeList->waiting ) {
|
||||
@ -483,7 +474,6 @@ void Push_Node(NodeList_t *NodeList, struct FlowNode *node) {
|
||||
|
||||
struct FlowNode *Pop_Node(NodeList_t *NodeList, int *done) {
|
||||
struct FlowNode *node;
|
||||
int proto;
|
||||
|
||||
GetTreeLock(NodeList);
|
||||
while ( NodeList->length == 0 && !*done ) {
|
||||
@ -522,12 +512,11 @@ int proto;
|
||||
|
||||
node->left = NULL;
|
||||
node->right = NULL;
|
||||
proto = node->proto;
|
||||
|
||||
NodeList->length--;
|
||||
#ifdef DEVEL
|
||||
printf("popped node 0x%llx proto: %u, length: %u first: %llx, last: %llx\n",
|
||||
(unsigned long long)node, proto, NodeList->length, (unsigned long long)NodeList->list, (unsigned long long)NodeList->last);
|
||||
(unsigned long long)node, node->proto, NodeList->length, (unsigned long long)NodeList->list, (unsigned long long)NodeList->last);
|
||||
|
||||
ListCheck(NodeList);
|
||||
#endif
|
||||
|
@ -37,15 +37,17 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <time.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "collector.h"
|
||||
#include "rbtree.h"
|
||||
#include "nffile.h"
|
||||
|
||||
#define v4 ip_union._v4
|
||||
#define v6 ip_union._v6
|
||||
@ -92,11 +94,6 @@ struct FlowNode {
|
||||
uint32_t packets; // summed up number of packets
|
||||
uint32_t bytes; // summed up number of bytes
|
||||
|
||||
// flow payload
|
||||
#define DATABLOCKSIZE 256
|
||||
uint32_t DataSize; // max size of data buffer
|
||||
void *data; // start of data buffer
|
||||
|
||||
struct FlowNode *rev_node;
|
||||
struct latency_s {
|
||||
uint64_t client;
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2016, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
@ -238,8 +239,8 @@ uint32_t cnt;
|
||||
record.last = ftt.secs;
|
||||
record.msec_last = ftt.msecs;
|
||||
|
||||
record.v4.srcaddr = *((uint32_t*)(rec+fo.srcaddr));
|
||||
record.v4.dstaddr = *((uint32_t*)(rec+fo.dstaddr));
|
||||
record.V4.srcaddr = *((uint32_t*)(rec+fo.srcaddr));
|
||||
record.V4.dstaddr = *((uint32_t*)(rec+fo.dstaddr));
|
||||
record.srcport = *((uint16_t*)(rec+fo.srcport));
|
||||
record.dstport = *((uint16_t*)(rec+fo.dstport));
|
||||
|
||||
@ -268,10 +269,10 @@ uint32_t cnt;
|
||||
record.dst_tos = 0;
|
||||
break;
|
||||
case EX_ROUTER_IP_v4:
|
||||
record.ip_nexthop.v4 = *((uint32_t*)(rec+fo.peer_nexthop));
|
||||
record.ip_nexthop.V4 = *((uint32_t*)(rec+fo.peer_nexthop));
|
||||
break;
|
||||
case EX_NEXT_HOP_v4:
|
||||
record.ip_router.v4 = *((uint32_t*)(rec+fo.router_sc));
|
||||
record.ip_router.V4 = *((uint32_t*)(rec+fo.router_sc));
|
||||
break;
|
||||
case EX_ROUTER_ID:
|
||||
record.engine_type = *((uint8_t*)(rec+fo.engine_type));
|
||||
|
@ -949,7 +949,7 @@ fts_alloc(FTS *sp, const char *name, size_t namelen)
|
||||
#endif
|
||||
|
||||
#ifndef ALIGN
|
||||
#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES)
|
||||
#define ALIGN(p) (((u_long)(p) + ALIGNBYTES) &~ ALIGNBYTES)
|
||||
#endif
|
||||
|
||||
size_t len;
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017
|
||||
* Copyright (c) 2016
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
* All rights reserved.
|
||||
@ -1606,7 +1607,7 @@ term: ANY { /* this is an unconditionally true expression, as a filter applies i
|
||||
uint64_t mask;
|
||||
uint32_t offset, shift;
|
||||
char *s = &$2[5];
|
||||
if ( s == '\0' ) {
|
||||
if ( *s == '\0' ) {
|
||||
yyerror("Missing label number");
|
||||
YYABORT;
|
||||
}
|
||||
@ -1677,7 +1678,7 @@ term: ANY { /* this is an unconditionally true expression, as a filter applies i
|
||||
uint64_t mask;
|
||||
uint32_t offset, shift;
|
||||
char *s = &$2[3];
|
||||
if ( s == '\0' ) {
|
||||
if ( *s == '\0' ) {
|
||||
yyerror("Missing label number");
|
||||
YYABORT;
|
||||
}
|
||||
@ -2096,6 +2097,24 @@ expr: term { $$ = $1.self; }
|
||||
| expr AND expr { $$ = Connect_AND($1, $3); }
|
||||
| NOT expr %prec NEGATE { $$ = Invert($2); }
|
||||
| '(' expr ')' { $$ = $2; }
|
||||
| '(' expr ')' '%' STRING {
|
||||
$$ = $2;
|
||||
if ( strlen($5) > 16 ) {
|
||||
yyerror("Error: Maximum 16 chars allowed for flowlabel");
|
||||
YYABORT;
|
||||
} else {
|
||||
AddLabel($2, $5);
|
||||
}
|
||||
}
|
||||
| '%' STRING '(' expr ')' {
|
||||
$$ = $4;
|
||||
if ( strlen($2) > 16 ) {
|
||||
yyerror("Error: Maximum 16 chars allowed for flowlabel");
|
||||
YYABORT;
|
||||
} else {
|
||||
AddLabel($4, $2);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
%%
|
||||
|
15
bin/ipconv.h
15
bin/ipconv.h
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,18 +29,18 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author:$
|
||||
*
|
||||
* $Id:$
|
||||
*
|
||||
* $LastChangedRevision:$
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _IPCONV_H
|
||||
#define _IPCONV_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
int parse_ip(int *af, const char *src, uint64_t *dst, int *bytes, int lookup, uint32_t *num_ip );
|
||||
|
||||
int set_nameserver(char *ns);
|
||||
|
457
bin/ipfix.c
457
bin/ipfix.c
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2012, Peter Haag
|
||||
* All rights reserved.
|
||||
@ -27,12 +28,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author:$
|
||||
*
|
||||
* $Id:$
|
||||
*
|
||||
* $LastChangedRevision:$
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -58,7 +53,6 @@
|
||||
#include "nf_common.h"
|
||||
#include "util.h"
|
||||
#include "bookkeeper.h"
|
||||
#include "nfxstat.h"
|
||||
#include "collector.h"
|
||||
#include "exporter.h"
|
||||
#include "ipfix.h"
|
||||
@ -106,12 +100,13 @@ typedef struct sequence_map_s {
|
||||
#define move_mac 11
|
||||
#define move_mpls 12
|
||||
#define Time64Mili 13
|
||||
#define saveICMP 14
|
||||
#define zero8 15
|
||||
#define zero16 16
|
||||
#define zero32 17
|
||||
#define zero64 18
|
||||
#define zero128 19
|
||||
#define TimeDeltaMicro 14
|
||||
#define saveICMP 15
|
||||
#define zero8 16
|
||||
#define zero16 17
|
||||
#define zero32 18
|
||||
#define zero64 19
|
||||
#define zero128 20
|
||||
|
||||
uint32_t id; // sequence ID as defined above
|
||||
uint16_t input_offset; // copy/process data at this input offset
|
||||
@ -135,6 +130,7 @@ typedef struct input_translation_s {
|
||||
uint32_t output_record_size; // required size in nfdump format
|
||||
|
||||
// tmp vars needed while processing the data record
|
||||
int delta_time; // delta micro or absolute ms time stamps
|
||||
uint64_t flow_start; // start time in msec
|
||||
uint64_t flow_end; // end time in msec
|
||||
uint32_t ICMP_offset; // offset of ICMP type/code in data stream
|
||||
@ -213,6 +209,7 @@ static struct ipfix_element_map_s {
|
||||
{ IPFIX_octetTotalCount, _4bytes, _8bytes, move32_sampling, zero64, COMMON_BLOCK },
|
||||
{ IPFIX_packetTotalCount, _8bytes, _8bytes, move64_sampling, zero64, COMMON_BLOCK },
|
||||
{ IPFIX_packetTotalCount, _4bytes, _8bytes, move32_sampling, zero64, COMMON_BLOCK },
|
||||
{ IPFIX_forwardingStatus, _1byte, _1byte, move8, zero8, COMMON_BLOCK },
|
||||
{ IPFIX_protocolIdentifier, _1byte, _1byte, move8, zero8, COMMON_BLOCK },
|
||||
{ IPFIX_ipClassOfService, _1byte, _1byte, move8, zero8, COMMON_BLOCK },
|
||||
{ IPFIX_tcpControlBits, _1byte, _1byte, move8, zero8, COMMON_BLOCK },
|
||||
@ -266,6 +263,8 @@ static struct ipfix_element_map_s {
|
||||
{ IPFIX_postSourceMacAddress, _6bytes, _8bytes, move_mac, zero64, EX_MAC_2},
|
||||
{ IPFIX_flowStartMilliseconds, _8bytes, _8bytes, Time64Mili, zero32, COMMON_BLOCK},
|
||||
{ IPFIX_flowEndMilliseconds, _8bytes, _8bytes, Time64Mili, zero32, COMMON_BLOCK},
|
||||
{ IPFIX_flowStartDeltaMicroseconds, _4bytes, _4bytes, TimeDeltaMicro, zero32, COMMON_BLOCK},
|
||||
{ IPFIX_flowEndDeltaMicroseconds, _4bytes, _4bytes, TimeDeltaMicro, zero32, COMMON_BLOCK},
|
||||
{0, 0, 0}
|
||||
};
|
||||
|
||||
@ -289,10 +288,16 @@ static uint32_t processed_records;
|
||||
extern int verbose;
|
||||
extern uint32_t Max_num_extensions;
|
||||
extern extension_descriptor_t extension_descriptor[];
|
||||
extern uint32_t default_sampling;
|
||||
extern uint32_t overwrite_sampling;
|
||||
extern uint32_t exporter_sysid;
|
||||
|
||||
// prototypes
|
||||
static void InsertStdSamplerOffset(FlowSource_t *fs, uint16_t id, uint16_t offset_std_sampler_interval,
|
||||
uint16_t offset_std_sampler_algorithm);
|
||||
|
||||
static void InsertSampler(FlowSource_t *fs, exporter_ipfix_domain_t *exporter, int32_t id, uint16_t mode, uint32_t interval);
|
||||
|
||||
static input_translation_t *add_translation_table(exporter_ipfix_domain_t *exporter, uint16_t id);
|
||||
|
||||
static void remove_translation_table(FlowSource_t *fs, exporter_ipfix_domain_t *exporter, uint16_t id);
|
||||
@ -311,6 +316,9 @@ static inline void Process_ipfix_template_add(exporter_ipfix_domain_t *exporter,
|
||||
|
||||
static inline void Process_ipfix_template_withdraw(exporter_ipfix_domain_t *exporter, void *DataPtr, uint32_t size_left, FlowSource_t *fs);
|
||||
|
||||
static inline void Process_ipfix_option_data(exporter_ipfix_domain_t *exporter, void *data_flowset, FlowSource_t *fs);
|
||||
|
||||
static inline void Process_ipfix_data(exporter_ipfix_domain_t *exporter, uint32_t ExportTime, void *data_flowset, FlowSource_t *fs, input_translation_t *table );
|
||||
|
||||
#include "inline.c"
|
||||
#include "nffile_inline.c"
|
||||
@ -349,18 +357,18 @@ uint32_t ObservationDomain = ntohl(ipfix_header->ObservationDomain);
|
||||
|
||||
while ( *e ) {
|
||||
if ( (*e)->info.id == ObservationDomain && (*e)->info.version == 10 &&
|
||||
(*e)->info.ip.v6[0] == fs->ip.v6[0] && (*e)->info.ip.v6[1] == fs->ip.v6[1])
|
||||
(*e)->info.ip.V6[0] == fs->ip.V6[0] && (*e)->info.ip.V6[1] == fs->ip.V6[1])
|
||||
return *e;
|
||||
e = &((*e)->next);
|
||||
}
|
||||
|
||||
if ( fs->sa_family == AF_INET ) {
|
||||
uint32_t _ip = htonl(fs->ip.v4);
|
||||
uint32_t _ip = htonl(fs->ip.V4);
|
||||
inet_ntop(AF_INET, &_ip, ipstr, sizeof(ipstr));
|
||||
} else if ( fs->sa_family == AF_INET6 ) {
|
||||
uint64_t _ip[2];
|
||||
_ip[0] = htonll(fs->ip.v6[0]);
|
||||
_ip[1] = htonll(fs->ip.v6[1]);
|
||||
_ip[0] = htonll(fs->ip.V6[0]);
|
||||
_ip[1] = htonll(fs->ip.V6[1]);
|
||||
inet_ntop(AF_INET6, &_ip, ipstr, sizeof(ipstr));
|
||||
} else {
|
||||
strncpy(ipstr, "<unknown>", IP_STRING_LEN);
|
||||
@ -630,7 +638,8 @@ size_t size_required;
|
||||
table->flags = 0;
|
||||
SetFlag(table->flags, FLAG_PKG_64);
|
||||
SetFlag(table->flags, FLAG_BYTES_64);
|
||||
table->ICMP_offset = 0;
|
||||
table->delta_time = 0;
|
||||
table->ICMP_offset = 0;
|
||||
// table->sampler_offset = 0;
|
||||
// table->sampler_size = 0;
|
||||
// table->engine_offset = 0;
|
||||
@ -651,11 +660,33 @@ size_t size_required;
|
||||
// The order we Push all ipfix elements, must corresponde to the structure of the common record
|
||||
// followed by all available extension in the extension map
|
||||
offset = BYTE_OFFSET_first;
|
||||
PushSequence( table, IPFIX_flowStartMilliseconds, &offset, &table->flow_start);
|
||||
offset = BYTE_OFFSET_first + 4;
|
||||
PushSequence( table, IPFIX_flowEndMilliseconds, &offset, &table->flow_end);
|
||||
offset = BYTE_OFFSET_first + 8;
|
||||
offset +=1; // Skip netflow v9 fwd status
|
||||
if ( cache.lookup_info[IPFIX_flowStartDeltaMicroseconds].found ) {
|
||||
PushSequence( table, IPFIX_flowStartDeltaMicroseconds, &offset, &table->flow_start);
|
||||
offset = BYTE_OFFSET_first + 4;
|
||||
PushSequence( table, IPFIX_flowEndDeltaMicroseconds, &offset, &table->flow_end);
|
||||
offset = BYTE_OFFSET_first + 8;
|
||||
table->delta_time = 1;
|
||||
dbg_printf("Time stamp: flow start/end delta microseconds: %u/%u\n",
|
||||
IPFIX_flowStartDeltaMicroseconds, IPFIX_flowEndDeltaMicroseconds);
|
||||
} else if ( cache.lookup_info[IPFIX_flowStartMilliseconds].found ) {
|
||||
PushSequence( table, IPFIX_flowStartMilliseconds, &offset, &table->flow_start);
|
||||
offset = BYTE_OFFSET_first + 4;
|
||||
PushSequence( table, IPFIX_flowEndMilliseconds, &offset, &table->flow_end);
|
||||
offset = BYTE_OFFSET_first + 8;
|
||||
dbg_printf("Time stamp: flow start/end absolute milliseconds: %u/%u\n",
|
||||
IPFIX_flowStartMilliseconds, IPFIX_flowEndMilliseconds);
|
||||
} else if ( cache.lookup_info[IPFIX_flowStartSysUpTime].found ) {
|
||||
PushSequence( table, IPFIX_flowStartSysUpTime, &offset, &table->flow_start);
|
||||
offset = BYTE_OFFSET_first + 4;
|
||||
PushSequence( table, IPFIX_flowEndSysUpTime, &offset, &table->flow_end);
|
||||
offset = BYTE_OFFSET_first + 8;
|
||||
dbg_printf("Time stamp: flow start/end relative milliseconds: %u/%u\n",
|
||||
IPFIX_flowStartSysUpTime, IPFIX_flowEndSysUpTime);
|
||||
} else {
|
||||
dbg_printf("Time stamp: No known format found\n");
|
||||
offset = BYTE_OFFSET_first + 8;
|
||||
}
|
||||
PushSequence( table, IPFIX_forwardingStatus, &offset, NULL);
|
||||
PushSequence( table, IPFIX_tcpControlBits, &offset, NULL);
|
||||
PushSequence( table, IPFIX_protocolIdentifier, &offset, NULL);
|
||||
PushSequence( table, IPFIX_ipClassOfService, &offset, NULL);
|
||||
@ -878,6 +909,126 @@ size_t size_required;
|
||||
|
||||
} // End of setup_translation_table
|
||||
|
||||
static void InsertStdSamplerOffset( FlowSource_t *fs, uint16_t id, uint16_t offset_std_sampler_interval, uint16_t offset_std_sampler_algorithm) {
|
||||
option_offset_t **t;
|
||||
|
||||
t = &(fs->option_offset_table);
|
||||
while ( *t ) {
|
||||
if ( (*t)->id == id ) { // table already known to us - update data
|
||||
dbg_printf("Found existing std sampling info in template %i\n", id);
|
||||
break;
|
||||
}
|
||||
|
||||
t = &((*t)->next);
|
||||
}
|
||||
|
||||
if ( *t == NULL ) { // new table
|
||||
dbg_printf("Allocate new std sampling info from template %i\n", id);
|
||||
*t = (option_offset_t *)calloc(1, sizeof(option_offset_t));
|
||||
if ( !*t ) {
|
||||
LogError("malloc() allocation error at %s line %u: %s" , __FILE__, __LINE__, strerror (errno));
|
||||
return ;
|
||||
}
|
||||
LogInfo("Process_v9: New std sampler: interval: %i, algorithm: %i",
|
||||
offset_std_sampler_interval, offset_std_sampler_algorithm);
|
||||
} // else existing table
|
||||
|
||||
dbg_printf("Insert/Update sampling info from template %i\n", id);
|
||||
SetFlag((*t)->flags, HAS_STD_SAMPLER_DATA);
|
||||
(*t)->id = id;
|
||||
(*t)->offset_id = 0;
|
||||
(*t)->offset_mode = 0;
|
||||
(*t)->offset_interval = 0;
|
||||
(*t)->offset_std_sampler_interval = offset_std_sampler_interval;
|
||||
(*t)->offset_std_sampler_algorithm = offset_std_sampler_algorithm;
|
||||
|
||||
} // End of InsertStdSamplerOffset
|
||||
|
||||
static void InsertSampler(FlowSource_t *fs, exporter_ipfix_domain_t *exporter, int32_t id, uint16_t mode, uint32_t interval) {
|
||||
generic_sampler_t *sampler;
|
||||
|
||||
dbg_printf("[%u] Insert Sampler: Exporter is 0x%llu\n", exporter->info.id, (long long unsigned)exporter);
|
||||
if ( !exporter->sampler ) {
|
||||
// no samplers so far
|
||||
sampler = (generic_sampler_t *)malloc(sizeof(generic_sampler_t));
|
||||
if ( !sampler ) {
|
||||
LogError( "Process_v9: Panic! malloc(): %s line %d: %s", __FILE__, __LINE__, strerror (errno));
|
||||
return;
|
||||
}
|
||||
|
||||
sampler->info.header.type = SamplerInfoRecordype;
|
||||
sampler->info.header.size = sizeof(sampler_info_record_t);
|
||||
sampler->info.exporter_sysid = exporter->info.sysid;
|
||||
sampler->info.id = id;
|
||||
sampler->info.mode = mode;
|
||||
sampler->info.interval = interval;
|
||||
sampler->next = NULL;
|
||||
exporter->sampler = sampler;
|
||||
|
||||
FlushInfoSampler(fs, &(sampler->info));
|
||||
LogInfo( "Add new sampler: ID: %i, mode: %u, interval: %u\n",
|
||||
id, mode, interval);
|
||||
dbg_printf("Add new sampler: ID: %i, mode: %u, interval: %u\n",
|
||||
id, mode, interval);
|
||||
|
||||
} else {
|
||||
sampler = exporter->sampler;
|
||||
while ( sampler ) {
|
||||
// test for update of existing sampler
|
||||
if ( sampler->info.id == id ) {
|
||||
// found same sampler id - update record
|
||||
dbg_printf("Update existing sampler id: %i, mode: %u, interval: %u\n",
|
||||
id, mode, interval);
|
||||
|
||||
// we update only on changes
|
||||
if ( mode != sampler->info.mode || interval != sampler->info.interval ) {
|
||||
FlushInfoSampler(fs, &(sampler->info));
|
||||
sampler->info.mode = mode;
|
||||
sampler->info.interval = interval;
|
||||
LogInfo( "Update existing sampler id: %i, mode: %u, interval: %u\n",
|
||||
id, mode, interval);
|
||||
} else {
|
||||
dbg_printf("Sampler unchanged!\n");
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// test for end of chain
|
||||
if ( sampler->next == NULL ) {
|
||||
// end of sampler chain - insert new sampler
|
||||
sampler->next = (generic_sampler_t *)malloc(sizeof(generic_sampler_t));
|
||||
if ( !sampler->next ) {
|
||||
LogError( "Process_v9: Panic! malloc(): %s line %d: %s", __FILE__, __LINE__, strerror (errno));
|
||||
return;
|
||||
}
|
||||
sampler = sampler->next;
|
||||
|
||||
sampler->info.header.type = SamplerInfoRecordype;
|
||||
sampler->info.header.size = sizeof(sampler_info_record_t);
|
||||
sampler->info.exporter_sysid = exporter->info.sysid;
|
||||
sampler->info.id = id;
|
||||
sampler->info.mode = mode;
|
||||
sampler->info.interval = interval;
|
||||
sampler->next = NULL;
|
||||
|
||||
FlushInfoSampler(fs, &(sampler->info));
|
||||
|
||||
LogInfo( "Append new sampler: ID: %u, mode: %u, interval: %u\n",
|
||||
id, mode, interval);
|
||||
dbg_printf("Append new sampler: ID: %u, mode: %u, interval: %u\n",
|
||||
id, mode, interval);
|
||||
break;
|
||||
}
|
||||
|
||||
// advance
|
||||
sampler = sampler->next;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // End of InsertSampler
|
||||
|
||||
static inline void Process_ipfix_templates(exporter_ipfix_domain_t *exporter, void *flowset_header, uint32_t size_left, FlowSource_t *fs) {
|
||||
ipfix_template_record_t *ipfix_template_record;
|
||||
void *DataPtr;
|
||||
@ -1006,7 +1157,7 @@ uint16_t Offset = 0;
|
||||
fs->sa_family == PF_INET6 ? "ipv6" : "ipv4", EX_ROUTER_IP_v4);
|
||||
}
|
||||
|
||||
// XXX for now, we do not stre router ID in IPFIX
|
||||
// XXX for now, we do not store router ID in IPFIX
|
||||
extension_descriptor[EX_ROUTER_ID].enabled = 0;
|
||||
|
||||
/*
|
||||
@ -1065,14 +1216,14 @@ ipfix_template_record_t *ipfix_template_record;
|
||||
|
||||
// a template flowset can contain multiple records ( templates )
|
||||
while ( size_left ) {
|
||||
uint32_t id, count;
|
||||
uint32_t id;
|
||||
|
||||
// map next record.
|
||||
ipfix_template_record = (ipfix_template_record_t *)DataPtr;
|
||||
size_left -= 4;
|
||||
|
||||
id = ntohs(ipfix_template_record->TemplateID);
|
||||
count = ntohs(ipfix_template_record->FieldCount);
|
||||
// count = ntohs(ipfix_template_record->FieldCount);
|
||||
|
||||
if ( id == IPFIX_TEMPLATE_FLOWSET_ID ) {
|
||||
// withdraw all templates
|
||||
@ -1093,11 +1244,10 @@ ipfix_template_record_t *ipfix_template_record;
|
||||
} // End of Process_ipfix_template_withdraw
|
||||
|
||||
static inline void Process_ipfix_option_templates(exporter_ipfix_domain_t *exporter, void *option_template_flowset, FlowSource_t *fs) {
|
||||
void *DataPtr;
|
||||
uint8_t *DataPtr;
|
||||
uint32_t size_left, size_required, i;
|
||||
// uint32_t nr_scopes, nr_options;
|
||||
uint16_t id, field_count, scope_field_count, offset, sampler_id_length;
|
||||
uint16_t offset_sampler_id, offset_sampler_mode, offset_sampler_interval, found_sampler;
|
||||
uint16_t id, field_count, scope_field_count, offset;
|
||||
uint16_t offset_std_sampler_interval, offset_std_sampler_algorithm, found_std_sampling;
|
||||
|
||||
i = 0; // keep compiler happy
|
||||
@ -1115,6 +1265,9 @@ uint16_t offset_std_sampler_interval, offset_std_sampler_algorithm, found_std_sa
|
||||
DataPtr += 6;
|
||||
size_left -= 6;
|
||||
|
||||
dbg_printf("Decode Option Template. id: %u, field count: %u, scope field count: %u\n",
|
||||
id, field_count, scope_field_count);
|
||||
|
||||
if ( scope_field_count == 0 ) {
|
||||
LogError("Process_ipfx: [%u] scope field count error: length must not be zero",
|
||||
exporter->info.id);
|
||||
@ -1122,7 +1275,7 @@ uint16_t offset_std_sampler_interval, offset_std_sampler_algorithm, found_std_sa
|
||||
return;
|
||||
}
|
||||
|
||||
size_required = (field_count + scope_field_count) * 2 * sizeof(uint16_t);
|
||||
size_required = 2 * field_count * sizeof(uint16_t);
|
||||
dbg_printf("Size left: %u, size required: %u\n", size_left, size_required);
|
||||
if ( size_left < size_required ) {
|
||||
LogError("Process_ipfix: [%u] option template length error: size left %u too small for %u scopes length and %u options length",
|
||||
@ -1132,17 +1285,18 @@ uint16_t offset_std_sampler_interval, offset_std_sampler_algorithm, found_std_sa
|
||||
return;
|
||||
}
|
||||
|
||||
dbg_printf("Decode Option Template. id: %u, field count: %u, scope field count: %u\n",
|
||||
id, field_count, scope_field_count);
|
||||
|
||||
if ( scope_field_count == 0 ) {
|
||||
LogError("Process_ipfxi: [%u] scope field count error: length must not be zero",
|
||||
exporter->info.id);
|
||||
return;
|
||||
}
|
||||
|
||||
offset_std_sampler_interval = 0;
|
||||
offset_std_sampler_algorithm = 0;
|
||||
found_std_sampling = 0;
|
||||
offset = 0;
|
||||
|
||||
for ( i=0; i<scope_field_count; i++ ) {
|
||||
uint32_t enterprise_value;
|
||||
uint16_t id, length;
|
||||
int Enterprise;
|
||||
|
||||
@ -1165,20 +1319,24 @@ uint16_t offset_std_sampler_interval, offset_std_sampler_algorithm, found_std_sa
|
||||
size_left, field_count);
|
||||
return;
|
||||
}
|
||||
enterprise_value = Get_val32(DataPtr);
|
||||
DataPtr += 4;
|
||||
size_left -= 4;
|
||||
dbg_printf(" [%i] Enterprise: 1, scope id: %u, scope length %u enterprise value: %u\n",
|
||||
i, id, length, enterprise_value);
|
||||
i, id, length, Get_val32(DataPtr));
|
||||
} else {
|
||||
dbg_printf(" [%i] Enterprise: 0, scope id: %u, scope length %u\n", i, id, length);
|
||||
}
|
||||
|
||||
offset += length;
|
||||
}
|
||||
|
||||
for ( ;i<field_count; i++ ) {
|
||||
uint32_t enterprise_value;
|
||||
uint16_t id, length;
|
||||
int Enterprise;
|
||||
|
||||
// keep compiler happy
|
||||
UNUSED(enterprise_value);
|
||||
id = Get_val16(DataPtr); DataPtr += 2;
|
||||
length = Get_val16(DataPtr); DataPtr += 2;
|
||||
size_left -= 4;
|
||||
@ -1201,64 +1359,52 @@ uint16_t offset_std_sampler_interval, offset_std_sampler_algorithm, found_std_sa
|
||||
} else {
|
||||
dbg_printf(" [%i] Enterprise: 0, option id: %u, option length %u\n", i, id, length);
|
||||
}
|
||||
}
|
||||
|
||||
sampler_id_length = 0;
|
||||
offset_sampler_id = 0;
|
||||
offset_sampler_mode = 0;
|
||||
offset_sampler_interval = 0;
|
||||
offset_std_sampler_interval = 0;
|
||||
offset_std_sampler_algorithm = 0;
|
||||
found_sampler = 0;
|
||||
found_std_sampling = 0;
|
||||
offset = 0;
|
||||
|
||||
/* XXX
|
||||
XXX Sampling for IPFIX not yet implemented due to lack of data and information
|
||||
switch (type) {
|
||||
switch (id) {
|
||||
// general sampling
|
||||
case NF9_SAMPLING_INTERVAL:
|
||||
offset_std_sampler_interval = offset;
|
||||
found_std_sampling++;
|
||||
case IPFIX_samplingInterval: // legacy #34
|
||||
case IPFIX_samplingPacketInterval: // #305
|
||||
if ( length == 4 ) {
|
||||
offset_std_sampler_interval = offset;
|
||||
found_std_sampling++;
|
||||
dbg_printf(" 4 byte sampling interval option at offset: %u\n", offset);
|
||||
} else {
|
||||
LogError("Process_ipfix: [%u] option template error: sampling option lenth != 4 bytes: %u",
|
||||
exporter->info.id, length);
|
||||
}
|
||||
break;
|
||||
case NF9_SAMPLING_ALGORITHM:
|
||||
offset_std_sampler_algorithm = offset;
|
||||
found_std_sampling++;
|
||||
break;
|
||||
|
||||
// individual samplers
|
||||
case NF9_FLOW_SAMPLER_ID:
|
||||
offset_sampler_id = offset;
|
||||
sampler_id_length = length;
|
||||
found_sampler++;
|
||||
break;
|
||||
case FLOW_SAMPLER_MODE:
|
||||
offset_sampler_mode = offset;
|
||||
found_sampler++;
|
||||
break;
|
||||
case NF9_FLOW_SAMPLER_RANDOM_INTERVAL:
|
||||
offset_sampler_interval = offset;
|
||||
found_sampler++;
|
||||
case IPFIX_samplingAlgorithm: // legacy #35
|
||||
case IPFIX_selectorAlgorithm: // #304
|
||||
if ( length == 1 ) {
|
||||
offset_std_sampler_algorithm = offset;
|
||||
dbg_printf(" 1 byte sampling algorithm option at offset: %u\n", offset);
|
||||
found_std_sampling++;
|
||||
} else {
|
||||
LogError("Process_ipfix: [%u] option template error: algorithm option lenth != 1 byte: %u",
|
||||
exporter->info.id, length);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
offset += length;
|
||||
if ( found_sampler == 3 ) { // need all three tags
|
||||
dbg_printf("[%u] Sampling information found\n", exporter->info.id);
|
||||
InsertSamplerOffset(fs, id, offset_sampler_id, sampler_id_length, offset_sampler_mode, offset_sampler_interval);
|
||||
} else if ( found_std_sampling == 2 ) { // need all two tags
|
||||
dbg_printf("[%u] Std sampling information found\n", exporter->info.id);
|
||||
InsertStdSamplerOffset(fs, id, offset_std_sampler_interval, offset_std_sampler_algorithm);
|
||||
} else {
|
||||
dbg_printf("[%u] No Sampling information found\n", exporter->info.id);
|
||||
}
|
||||
*/
|
||||
dbg_printf("\n");
|
||||
|
||||
if ( offset_std_sampler_interval ) {
|
||||
dbg_printf("[%u] Std sampling interval found. offset: %u\n",
|
||||
exporter->info.id, offset_std_sampler_interval);
|
||||
if ( offset_std_sampler_algorithm )
|
||||
dbg_printf("[%u] Std sampling algorithm found. offset: %u\n",
|
||||
exporter->info.id, offset_std_sampler_algorithm);
|
||||
InsertStdSamplerOffset(fs, id, offset_std_sampler_interval, offset_std_sampler_algorithm);
|
||||
dbg_printf("\n");
|
||||
}
|
||||
|
||||
processed_records++;
|
||||
|
||||
} // End of Process_ipfix_option_templates
|
||||
|
||||
|
||||
static inline void Process_ipfix_data(exporter_ipfix_domain_t *exporter, void *data_flowset, FlowSource_t *fs, input_translation_t *table ){
|
||||
static inline void Process_ipfix_data(exporter_ipfix_domain_t *exporter, uint32_t ExportTime, void *data_flowset, FlowSource_t *fs, input_translation_t *table ){
|
||||
uint64_t sampling_rate;
|
||||
uint32_t size_left;
|
||||
uint8_t *in, *out;
|
||||
@ -1275,33 +1421,19 @@ char *string;
|
||||
|
||||
// Check if sampling is announced
|
||||
sampling_rate = 1;
|
||||
/* ###
|
||||
if ( table->sampler_offset && fs->sampler ) {
|
||||
uint32_t sampler_id;
|
||||
if ( table->sampler_size == 2 ) {
|
||||
sampler_id = Get_val16((void *)&in[table->sampler_offset]);
|
||||
} else {
|
||||
sampler_id = in[table->sampler_offset];
|
||||
}
|
||||
if ( fs->sampler[sampler_id] ) {
|
||||
sampling_rate = fs->sampler[sampler_id]->interval;
|
||||
dbg_printf("[%u] Sampling ID %u available\n", exporter->info.id, sampler_id);
|
||||
dbg_printf("[%u] Sampler_offset : %u\n", exporter->info.id, table->sampler_offset);
|
||||
dbg_printf("[%u] Sampler Data : %s\n", exporter->info.id, fs->sampler == NULL ? "not available" : "available");
|
||||
dbg_printf("[%u] Sampling rate: %llu\n", exporter->info.id, (long long unsigned)sampling_rate);
|
||||
} else {
|
||||
sampling_rate = default_sampling;
|
||||
dbg_printf("[%u] Sampling ID %u not (yet) available\n", exporter->info.id, sampler_id);
|
||||
}
|
||||
|
||||
} else if ( fs->std_sampling.interval > 0 ) {
|
||||
sampling_rate = fs->std_sampling.interval;
|
||||
generic_sampler_t *sampler = exporter->sampler;
|
||||
while ( sampler && sampler->info.id != -1 )
|
||||
sampler = sampler->next;
|
||||
|
||||
if ( sampler ) {
|
||||
sampling_rate = sampler->info.interval;
|
||||
dbg_printf("[%u] Std sampling available for this flow source: Rate: %llu\n", exporter->info.id, (long long unsigned)sampling_rate);
|
||||
} else {
|
||||
sampling_rate = default_sampling;
|
||||
dbg_printf("[%u] No Sampling record found\n", exporter->info.id);
|
||||
}
|
||||
### */
|
||||
|
||||
if ( overwrite_sampling > 0 ) {
|
||||
sampling_rate = overwrite_sampling;
|
||||
dbg_printf("[%u] Hard overwrite sampling rate: %llu\n", exporter->info.id, (long long unsigned)sampling_rate);
|
||||
@ -1442,6 +1574,11 @@ char *string;
|
||||
{ uint64_t DateMiliseconds = Get_val64((void *)&in[input_offset]);
|
||||
*(uint64_t *)stack = DateMiliseconds;
|
||||
|
||||
} break;
|
||||
case TimeDeltaMicro:
|
||||
{ uint64_t DeltaMicroSec = Get_val32((void *)&in[input_offset]);
|
||||
*(uint64_t *)stack = ((1000000LL * (uint64_t)ExportTime) - DeltaMicroSec) / 1000LL;
|
||||
|
||||
} break;
|
||||
case move_mac:
|
||||
/* 64bit access to potentially unaligned output buffer. use 2 x 32bit for _LP64 CPUs */
|
||||
@ -1513,15 +1650,15 @@ char *string;
|
||||
// 64bit access to potentially unaligned output buffer. use 2 x 32bit for _LP64 CPUs
|
||||
type_mask_t t;
|
||||
|
||||
t.val.val64 = exporter->info.ip.v6[0];
|
||||
t.val.val64 = exporter->info.ip.V6[0];
|
||||
*((uint32_t *)&out[output_offset]) = t.val.val32[0];
|
||||
*((uint32_t *)&out[output_offset+4]) = t.val.val32[1];
|
||||
|
||||
t.val.val64 = exporter->info.ip.v6[1];
|
||||
t.val.val64 = exporter->info.ip.V6[1];
|
||||
*((uint32_t *)&out[output_offset+8]) = t.val.val32[0];
|
||||
*((uint32_t *)&out[output_offset+12]) = t.val.val32[1];
|
||||
} else {
|
||||
*((uint32_t *)&out[output_offset]) = exporter->info.ip.v4;
|
||||
*((uint32_t *)&out[output_offset]) = exporter->info.ip.V4;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1561,31 +1698,9 @@ char *string;
|
||||
fs->nffile->stat_record->numpackets += table->out_packets;
|
||||
fs->nffile->stat_record->numbytes += table->out_bytes;
|
||||
|
||||
if ( fs->xstat ) {
|
||||
uint32_t bpp = table->packets ? table->bytes/table->packets : 0;
|
||||
if ( bpp > MAX_BPP )
|
||||
bpp = MAX_BPP;
|
||||
if ( data_record->prot == IPPROTO_TCP ) {
|
||||
fs->xstat->bpp_histogram->tcp.bpp[bpp]++;
|
||||
fs->xstat->bpp_histogram->tcp.count++;
|
||||
|
||||
fs->xstat->port_histogram->src_tcp.port[data_record->srcport]++;
|
||||
fs->xstat->port_histogram->dst_tcp.port[data_record->dstport]++;
|
||||
fs->xstat->port_histogram->src_tcp.count++;
|
||||
fs->xstat->port_histogram->dst_tcp.count++;
|
||||
} else if ( data_record->prot == IPPROTO_UDP ) {
|
||||
fs->xstat->bpp_histogram->udp.bpp[bpp]++;
|
||||
fs->xstat->bpp_histogram->udp.count++;
|
||||
|
||||
fs->xstat->port_histogram->src_udp.port[data_record->srcport]++;
|
||||
fs->xstat->port_histogram->dst_udp.port[data_record->dstport]++;
|
||||
fs->xstat->port_histogram->src_udp.count++;
|
||||
fs->xstat->port_histogram->dst_udp.count++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( verbose ) {
|
||||
master_record_t master_record;
|
||||
memset((void *)&master_record, 0, sizeof(master_record_t));
|
||||
ExpandRecord_v2((common_record_t *)data_record, &(table->extension_info), &(exporter->info), &master_record);
|
||||
format_file_block_record(&master_record, &string, 0);
|
||||
printf("%s\n", string);
|
||||
@ -1617,18 +1732,83 @@ char *string;
|
||||
|
||||
} // End of Process_ipfix_data
|
||||
|
||||
static inline void Process_ipfix_option_data(exporter_ipfix_domain_t *exporter, void *data_flowset, FlowSource_t *fs) {
|
||||
option_offset_t *offset_table;
|
||||
uint32_t id;
|
||||
uint8_t *in;
|
||||
|
||||
id = GET_FLOWSET_ID(data_flowset);
|
||||
|
||||
offset_table = fs->option_offset_table;
|
||||
while ( offset_table && offset_table->id != id )
|
||||
offset_table = offset_table->next;
|
||||
|
||||
if ( !offset_table ) {
|
||||
// should never happen - catch it anyway
|
||||
LogError( "Process_ipfix: Panic! - No Offset table found! : %s line %d", __FILE__, __LINE__);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef DEVEL
|
||||
uint32_t size_left = GET_FLOWSET_LENGTH(data_flowset) - 4; // -4 for data flowset header -> id and length
|
||||
dbg_printf("[%u] Process option data flowset size: %u\n", exporter->info.id, size_left);
|
||||
#endif
|
||||
|
||||
// map input buffer as a byte array
|
||||
in = (uint8_t *)(data_flowset + 4); // skip flowset header
|
||||
|
||||
if ( TestFlag(offset_table->flags, HAS_SAMPLER_DATA) ) {
|
||||
int32_t id;
|
||||
uint16_t mode;
|
||||
uint32_t interval;
|
||||
if (offset_table->sampler_id_length == 2) {
|
||||
id = Get_val16((void *)&in[offset_table->offset_id]);
|
||||
} else {
|
||||
id = in[offset_table->offset_id];
|
||||
}
|
||||
|
||||
mode = offset_table->offset_mode ? in[offset_table->offset_mode] : 0;
|
||||
interval = Get_val32((void *)&in[offset_table->offset_interval]);
|
||||
|
||||
InsertSampler(fs, exporter, id, mode, interval);
|
||||
|
||||
dbg_printf("Extracted Sampler data:\n");
|
||||
dbg_printf("Sampler ID : %u\n", id);
|
||||
dbg_printf("Sampler mode : %u\n", mode);
|
||||
dbg_printf("Sampler interval: %u\n", interval);
|
||||
}
|
||||
|
||||
if ( TestFlag(offset_table->flags, HAS_STD_SAMPLER_DATA) ) {
|
||||
int32_t id = -1;
|
||||
uint16_t mode = offset_table->offset_std_sampler_algorithm ? in[offset_table->offset_std_sampler_algorithm] : 0;
|
||||
uint32_t interval = Get_val32((void *)&in[offset_table->offset_std_sampler_interval]);
|
||||
|
||||
InsertSampler(fs, exporter, id, mode, interval);
|
||||
|
||||
dbg_printf("Extracted Std Sampler data:\n");
|
||||
dbg_printf("Sampler ID : %i\n", id);
|
||||
dbg_printf("Sampler algorithm: %u\n", mode);
|
||||
dbg_printf("Sampler interval : %u\n", interval);
|
||||
|
||||
dbg_printf("Set std sampler: algorithm: %u, interval: %u\n",
|
||||
mode, interval);
|
||||
}
|
||||
processed_records++;
|
||||
|
||||
} // End of Process_ipfix_option_data
|
||||
|
||||
void Process_IPFIX(void *in_buff, ssize_t in_buff_cnt, FlowSource_t *fs) {
|
||||
exporter_ipfix_domain_t *exporter;
|
||||
ssize_t size_left;
|
||||
uint32_t ExportTime, ObservationDomain, Sequence, flowset_length;
|
||||
uint32_t ExportTime, Sequence, flowset_length;
|
||||
ipfix_header_t *ipfix_header;
|
||||
void *flowset_header;
|
||||
|
||||
#ifdef DEVEL
|
||||
static uint32_t packet_cntr = 0;
|
||||
|
||||
packet_cntr++;
|
||||
dbg_printf("Next packet: %u\n", packet_cntr);
|
||||
uint32_t ObservationDomain;
|
||||
#endif
|
||||
|
||||
size_left = in_buff_cnt;
|
||||
if ( size_left < IPFIX_HEADER_LENGTH ) {
|
||||
LogError("Process_ipfix: Too little data for ipfix packet: '%lli'", (long long)size_left);
|
||||
@ -1636,10 +1816,15 @@ static uint32_t packet_cntr = 0;
|
||||
}
|
||||
|
||||
ipfix_header = (ipfix_header_t *)in_buff;
|
||||
ObservationDomain = ntohl(ipfix_header->ObservationDomain);
|
||||
ExportTime = ntohl(ipfix_header->ExportTime);
|
||||
Sequence = ntohl(ipfix_header->LastSequence);
|
||||
|
||||
#ifdef DEVEL
|
||||
ObservationDomain = ntohl(ipfix_header->ObservationDomain);
|
||||
packet_cntr++;
|
||||
printf("Next packet: %u\n", packet_cntr);
|
||||
#endif
|
||||
|
||||
exporter = GetExporter(fs, ipfix_header);
|
||||
if ( !exporter ) {
|
||||
LogError("Process_ipfix: Exporter NULL: Abort ipfix record processing");
|
||||
@ -1743,10 +1928,10 @@ static uint32_t packet_cntr = 0;
|
||||
dbg_printf("Process data flowset, length: %u\n", flowset_length);
|
||||
table = GetTranslationTable(exporter, flowset_id);
|
||||
if ( table ) {
|
||||
Process_ipfix_data(exporter, flowset_header, fs, table);
|
||||
Process_ipfix_data(exporter, ExportTime, flowset_header, fs, table);
|
||||
exporter->DataRecords++;
|
||||
} else if ( HasOptionTable(fs, flowset_id) ) {
|
||||
// Process_ipfix_option_data(exporter, flowset_header, fs);
|
||||
Process_ipfix_option_data(exporter, flowset_header, fs);
|
||||
} else {
|
||||
// maybe a flowset with option data
|
||||
dbg_printf("Process ipfix: [%u] No table for id %u -> Skip record\n",
|
||||
|
31
bin/ipfix.h
31
bin/ipfix.h
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* All rights reserved.
|
||||
@ -27,17 +28,20 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author:$
|
||||
*
|
||||
* $Id:$
|
||||
*
|
||||
* $LastChangedRevision:$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _IPFIX_H
|
||||
#define _IPFIX_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "collector.h"
|
||||
|
||||
/* reference: http://tools.ietf.org/html/draft-ietf-ipfix-protocol-rfc5101bis-00 */
|
||||
|
||||
typedef struct ipfix_header {
|
||||
@ -224,7 +228,16 @@ typedef struct ipfix_template_elements_e_s {
|
||||
#define IPFIX_DestinationIPv6PrefixLength 30
|
||||
#define IPFIX_flowLabelIPv6 31
|
||||
#define IPFIX_icmpTypeCodeIPv4 32
|
||||
// reserved 34, 35
|
||||
|
||||
// deprecated elements for sampling
|
||||
#define IPFIX_samplingInterval 34
|
||||
#define IPFIX_samplingAlgorithm 35
|
||||
// 1 - Deterministic Sampling,
|
||||
// 2 - Random Sampling.
|
||||
|
||||
#define IPFIX_samplingPacketInterval 305
|
||||
#define IPFIX_selectorAlgorithm 304
|
||||
|
||||
// reserved 38, 39
|
||||
// reserved 48, 49, 50, 51
|
||||
|
||||
@ -256,9 +269,11 @@ typedef struct ipfix_template_elements_e_s {
|
||||
#define IPFIX_postSourceMacAddress 81
|
||||
#define IPFIX_octetTotalCount 85
|
||||
#define IPFIX_packetTotalCount 86
|
||||
#define IPFIX_forwardingStatus 89
|
||||
#define IPFIX_flowStartMilliseconds 152
|
||||
#define IPFIX_flowEndMilliseconds 153
|
||||
// reserved 89
|
||||
#define IPFIX_flowStartDeltaMicroseconds 158
|
||||
#define IPFIX_flowEndDeltaMicroseconds 159
|
||||
|
||||
/* prototypes */
|
||||
int Init_IPFIX(void);
|
||||
|
15
bin/ipfrag.c
15
bin/ipfrag.c
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2016, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* All rights reserved.
|
||||
@ -77,6 +78,7 @@ static void Remove_node(struct IPFragNode *node);
|
||||
RB_GENERATE(IPFragTree, IPFragNode, entry, IPFragNodeCMP);
|
||||
|
||||
static IPFragTree_t *IPFragTree;
|
||||
static uint32_t NumFragments;
|
||||
|
||||
static int IPFragNodeCMP(struct IPFragNode *e1, struct IPFragNode *e2) {
|
||||
uint32_t *a = &e1->src_addr;
|
||||
@ -119,6 +121,7 @@ struct IPFragNode *node;
|
||||
node->holes->next = NULL;
|
||||
node->holes->first = 0;
|
||||
node->holes->last = IP_MAXPACKET;
|
||||
NumFragments++;
|
||||
|
||||
return node;
|
||||
|
||||
@ -136,6 +139,7 @@ hole_t *hole, *h;
|
||||
if (free_data)
|
||||
free(node->data);
|
||||
free(node);
|
||||
NumFragments--;
|
||||
|
||||
} // End of Free_node
|
||||
|
||||
@ -156,6 +160,7 @@ int IPFragTree_init(void) {
|
||||
return 0;
|
||||
}
|
||||
RB_INIT(IPFragTree);
|
||||
NumFragments = 0;
|
||||
dbg_printf("IPFrag key len: %lu\n", KEYLEN);
|
||||
return 1;
|
||||
} // End of IPFragTree_init
|
||||
@ -172,6 +177,8 @@ struct IPFragNode *node, *nxt;
|
||||
|
||||
free(IPFragTree);
|
||||
IPFragTree = NULL;
|
||||
NumFragments = 0;
|
||||
|
||||
} // End of IPFragTree_free
|
||||
|
||||
void *IPFrag_tree_Update(uint32_t src, uint32_t dst, uint32_t ident, uint32_t *length, uint32_t ip_off, void *data) {
|
||||
@ -203,14 +210,14 @@ int found_hole;
|
||||
|
||||
if ( last > IP_MAXPACKET ) {
|
||||
LogError("Fragment assembly error: last > IP_MAXPACKET");
|
||||
LogError("Fraget assembly: first: %u, last: %u, MF: %u\n", first, last, more_fragments);
|
||||
LogError("Fragment assembly: first: %u, last: %u, MF: %u\n", first, last, more_fragments);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// last fragment - sets max offset
|
||||
found_hole = 0;
|
||||
max = more_fragments == 0 ? last : 0;
|
||||
dbg_printf("Fraget assembly: first: %u, last: %u, MF: %u\n", first, last, more_fragments);
|
||||
dbg_printf("Fragment assembly: first: %u, last: %u, MF: %u\n", first, last, more_fragments);
|
||||
while (hole) {
|
||||
uint16_t hole_last;
|
||||
if ( max ) {
|
||||
@ -307,3 +314,7 @@ int found_hole;
|
||||
}
|
||||
|
||||
} // End of IPFrag_tree_Update
|
||||
|
||||
uint32_t IPFragEntries() {
|
||||
return NumFragments;
|
||||
} // End of IPFragEntries
|
||||
|
22
bin/ipfrag.h
22
bin/ipfrag.h
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* All rights reserved.
|
||||
*
|
||||
@ -26,14 +27,20 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: phaag $
|
||||
*
|
||||
* $Id: ipfrag.h 40691 2014-03-03 11:24:22Z phaag $
|
||||
*
|
||||
* $LastChangedRevision: 40691 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _IPFRAG_H
|
||||
#define _IPFRAG_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "rbtree.h"
|
||||
|
||||
typedef struct hole_s {
|
||||
struct hole_s *next;
|
||||
uint32_t first;
|
||||
@ -72,3 +79,6 @@ void IPFragTree_free(void);
|
||||
|
||||
void *IPFrag_tree_Update(uint32_t src, uint32_t dst, uint32_t ident, uint32_t *length, uint32_t ip_off, void *data);
|
||||
|
||||
uint32_t IPFragEntries(void);
|
||||
|
||||
#endif
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2016, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
@ -68,7 +69,6 @@
|
||||
|
||||
#include "expire.h"
|
||||
#include "nffile.h"
|
||||
#include "nfxstat.h"
|
||||
#include "collector.h"
|
||||
#include "util.h"
|
||||
|
||||
|
12
bin/launch.h
12
bin/launch.h
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,18 +29,15 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: launch.h 39 2009-11-25 08:11:15Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 39 $
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LAUNCH_H
|
||||
#define _LAUNCH_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define FNAME_SIZE 256
|
||||
#define IDENT_SIZE 32
|
||||
|
||||
|
483
bin/lz4.h
Executable file
483
bin/lz4.h
Executable file
@ -0,0 +1,483 @@
|
||||
/*
|
||||
* LZ4 - Fast LZ compression algorithm
|
||||
* Header File
|
||||
* Copyright (C) 2011-2017, Yann Collet.
|
||||
|
||||
BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
You can contact the author at :
|
||||
- LZ4 homepage : http://www.lz4.org
|
||||
- LZ4 source repository : https://github.com/lz4/lz4
|
||||
*/
|
||||
#if defined (__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef LZ4_H_2983827168210
|
||||
#define LZ4_H_2983827168210
|
||||
|
||||
/* --- Dependency --- */
|
||||
#include <stddef.h> /* size_t */
|
||||
|
||||
|
||||
/**
|
||||
Introduction
|
||||
|
||||
LZ4 is lossless compression algorithm, providing compression speed at 400 MB/s per core,
|
||||
scalable with multi-cores CPU. It features an extremely fast decoder, with speed in
|
||||
multiple GB/s per core, typically reaching RAM speed limits on multi-core systems.
|
||||
|
||||
The LZ4 compression library provides in-memory compression and decompression functions.
|
||||
Compression can be done in:
|
||||
- a single step (described as Simple Functions)
|
||||
- a single step, reusing a context (described in Advanced Functions)
|
||||
- unbounded multiple steps (described as Streaming compression)
|
||||
|
||||
lz4.h provides block compression functions. It gives full buffer control to user.
|
||||
Decompressing an lz4-compressed block also requires metadata (such as compressed size).
|
||||
Each application is free to encode such metadata in whichever way it wants.
|
||||
|
||||
An additional format, called LZ4 frame specification (doc/lz4_Frame_format.md),
|
||||
take care of encoding standard metadata alongside LZ4-compressed blocks.
|
||||
If your application requires interoperability, it's recommended to use it.
|
||||
A library is provided to take care of it, see lz4frame.h.
|
||||
*/
|
||||
|
||||
/*^***************************************************************
|
||||
* Export parameters
|
||||
*****************************************************************/
|
||||
/*
|
||||
* LZ4_DLL_EXPORT :
|
||||
* Enable exporting of functions when building a Windows DLL
|
||||
* LZ4LIB_VISIBILITY :
|
||||
* Control library symbols visibility.
|
||||
*/
|
||||
#ifndef LZ4LIB_VISIBILITY
|
||||
# if defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
# define LZ4LIB_VISIBILITY __attribute__ ((visibility ("default")))
|
||||
# else
|
||||
# define LZ4LIB_VISIBILITY
|
||||
# endif
|
||||
#endif
|
||||
#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1)
|
||||
# define LZ4LIB_API __declspec(dllexport) LZ4LIB_VISIBILITY
|
||||
#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)
|
||||
# define LZ4LIB_API __declspec(dllimport) LZ4LIB_VISIBILITY /* It isn't required but allows to generate better code, saving a function pointer load from the IAT and an indirect jump.*/
|
||||
#else
|
||||
# define LZ4LIB_API LZ4LIB_VISIBILITY
|
||||
#endif
|
||||
|
||||
/*------ Version ------*/
|
||||
#define LZ4_VERSION_MAJOR 1 /* for breaking interface changes */
|
||||
#define LZ4_VERSION_MINOR 8 /* for new (non-breaking) interface capabilities */
|
||||
#define LZ4_VERSION_RELEASE 0 /* for tweaks, bug-fixes, or development */
|
||||
|
||||
#define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE)
|
||||
|
||||
#define LZ4_LIB_VERSION LZ4_VERSION_MAJOR.LZ4_VERSION_MINOR.LZ4_VERSION_RELEASE
|
||||
#define LZ4_QUOTE(str) #str
|
||||
#define LZ4_EXPAND_AND_QUOTE(str) LZ4_QUOTE(str)
|
||||
#define LZ4_VERSION_STRING LZ4_EXPAND_AND_QUOTE(LZ4_LIB_VERSION)
|
||||
|
||||
LZ4LIB_API int LZ4_versionNumber (void); /**< library version number; to be used when checking dll version */
|
||||
LZ4LIB_API const char* LZ4_versionString (void); /**< library version string; to be used when checking dll version */
|
||||
|
||||
|
||||
/*-************************************
|
||||
* Tuning parameter
|
||||
**************************************/
|
||||
/*!
|
||||
* LZ4_MEMORY_USAGE :
|
||||
* Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.)
|
||||
* Increasing memory usage improves compression ratio
|
||||
* Reduced memory usage can improve speed, due to cache effect
|
||||
* Default value is 14, for 16KB, which nicely fits into Intel x86 L1 cache
|
||||
*/
|
||||
#ifndef LZ4_MEMORY_USAGE
|
||||
# define LZ4_MEMORY_USAGE 14
|
||||
#endif
|
||||
|
||||
/*-************************************
|
||||
* Simple Functions
|
||||
**************************************/
|
||||
/*! LZ4_compress_default() :
|
||||
Compresses 'srcSize' bytes from buffer 'src'
|
||||
into already allocated 'dst' buffer of size 'dstCapacity'.
|
||||
Compression is guaranteed to succeed if 'dstCapacity' >= LZ4_compressBound(srcSize).
|
||||
It also runs faster, so it's a recommended setting.
|
||||
If the function cannot compress 'src' into a limited 'dst' budget,
|
||||
compression stops *immediately*, and the function result is zero.
|
||||
As a consequence, 'dst' content is not valid.
|
||||
This function never writes outside 'dst' buffer, nor read outside 'source' buffer.
|
||||
srcSize : supported max value is LZ4_MAX_INPUT_VALUE
|
||||
dstCapacity : full or partial size of buffer 'dst' (which must be already allocated)
|
||||
return : the number of bytes written into buffer 'dst' (necessarily <= dstCapacity)
|
||||
or 0 if compression fails */
|
||||
LZ4LIB_API int LZ4_compress_default(const char* src, char* dst, int srcSize, int dstCapacity);
|
||||
|
||||
/*! LZ4_decompress_safe() :
|
||||
compressedSize : is the exact complete size of the compressed block.
|
||||
dstCapacity : is the size of destination buffer, which must be already allocated.
|
||||
return : the number of bytes decompressed into destination buffer (necessarily <= dstCapacity)
|
||||
If destination buffer is not large enough, decoding will stop and output an error code (negative value).
|
||||
If the source stream is detected malformed, the function will stop decoding and return a negative result.
|
||||
This function is protected against buffer overflow exploits, including malicious data packets.
|
||||
It never writes outside output buffer, nor reads outside input buffer.
|
||||
*/
|
||||
LZ4LIB_API int LZ4_decompress_safe (const char* src, char* dst, int compressedSize, int dstCapacity);
|
||||
|
||||
|
||||
/*-************************************
|
||||
* Advanced Functions
|
||||
**************************************/
|
||||
#define LZ4_MAX_INPUT_SIZE 0x7E000000 /* 2 113 929 216 bytes */
|
||||
#define LZ4_COMPRESSBOUND(isize) ((unsigned)(isize) > (unsigned)LZ4_MAX_INPUT_SIZE ? 0 : (isize) + ((isize)/255) + 16)
|
||||
|
||||
/*!
|
||||
LZ4_compressBound() :
|
||||
Provides the maximum size that LZ4 compression may output in a "worst case" scenario (input data not compressible)
|
||||
This function is primarily useful for memory allocation purposes (destination buffer size).
|
||||
Macro LZ4_COMPRESSBOUND() is also provided for compilation-time evaluation (stack memory allocation for example).
|
||||
Note that LZ4_compress_default() compress faster when dest buffer size is >= LZ4_compressBound(srcSize)
|
||||
inputSize : max supported value is LZ4_MAX_INPUT_SIZE
|
||||
return : maximum output size in a "worst case" scenario
|
||||
or 0, if input size is too large ( > LZ4_MAX_INPUT_SIZE)
|
||||
*/
|
||||
LZ4LIB_API int LZ4_compressBound(int inputSize);
|
||||
|
||||
/*!
|
||||
LZ4_compress_fast() :
|
||||
Same as LZ4_compress_default(), but allows to select an "acceleration" factor.
|
||||
The larger the acceleration value, the faster the algorithm, but also the lesser the compression.
|
||||
It's a trade-off. It can be fine tuned, with each successive value providing roughly +~3% to speed.
|
||||
An acceleration value of "1" is the same as regular LZ4_compress_default()
|
||||
Values <= 0 will be replaced by ACCELERATION_DEFAULT (see lz4.c), which is 1.
|
||||
*/
|
||||
LZ4LIB_API int LZ4_compress_fast (const char* src, char* dst, int srcSize, int dstCapacity, int acceleration);
|
||||
|
||||
|
||||
/*!
|
||||
LZ4_compress_fast_extState() :
|
||||
Same compression function, just using an externally allocated memory space to store compression state.
|
||||
Use LZ4_sizeofState() to know how much memory must be allocated,
|
||||
and allocate it on 8-bytes boundaries (using malloc() typically).
|
||||
Then, provide it as 'void* state' to compression function.
|
||||
*/
|
||||
LZ4LIB_API int LZ4_sizeofState(void);
|
||||
LZ4LIB_API int LZ4_compress_fast_extState (void* state, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration);
|
||||
|
||||
|
||||
/*!
|
||||
LZ4_compress_destSize() :
|
||||
Reverse the logic : compresses as much data as possible from 'src' buffer
|
||||
into already allocated buffer 'dst' of size 'targetDestSize'.
|
||||
This function either compresses the entire 'src' content into 'dst' if it's large enough,
|
||||
or fill 'dst' buffer completely with as much data as possible from 'src'.
|
||||
*srcSizePtr : will be modified to indicate how many bytes where read from 'src' to fill 'dst'.
|
||||
New value is necessarily <= old value.
|
||||
return : Nb bytes written into 'dst' (necessarily <= targetDestSize)
|
||||
or 0 if compression fails
|
||||
*/
|
||||
LZ4LIB_API int LZ4_compress_destSize (const char* src, char* dst, int* srcSizePtr, int targetDstSize);
|
||||
|
||||
|
||||
/*!
|
||||
LZ4_decompress_fast() : (unsafe!!)
|
||||
originalSize : is the original uncompressed size
|
||||
return : the number of bytes read from the source buffer (in other words, the compressed size)
|
||||
If the source stream is detected malformed, the function will stop decoding and return a negative result.
|
||||
Destination buffer must be already allocated. Its size must be >= 'originalSize' bytes.
|
||||
note : This function respects memory boundaries for *properly formed* compressed data.
|
||||
It is a bit faster than LZ4_decompress_safe().
|
||||
However, it does not provide any protection against intentionally modified data stream (malicious input).
|
||||
Use this function in trusted environment only (data to decode comes from a trusted source).
|
||||
*/
|
||||
LZ4LIB_API int LZ4_decompress_fast (const char* src, char* dst, int originalSize);
|
||||
|
||||
/*!
|
||||
LZ4_decompress_safe_partial() :
|
||||
This function decompress a compressed block of size 'srcSize' at position 'src'
|
||||
into destination buffer 'dst' of size 'dstCapacity'.
|
||||
The function will decompress a minimum of 'targetOutputSize' bytes, and stop after that.
|
||||
However, it's not accurate, and may write more than 'targetOutputSize' (but <= dstCapacity).
|
||||
@return : the number of bytes decoded in the destination buffer (necessarily <= dstCapacity)
|
||||
Note : this number can be < 'targetOutputSize' should the compressed block contain less data.
|
||||
Always control how many bytes were decoded.
|
||||
If the source stream is detected malformed, the function will stop decoding and return a negative result.
|
||||
This function never writes outside of output buffer, and never reads outside of input buffer. It is therefore protected against malicious data packets.
|
||||
*/
|
||||
LZ4LIB_API int LZ4_decompress_safe_partial (const char* src, char* dst, int srcSize, int targetOutputSize, int dstCapacity);
|
||||
|
||||
|
||||
/*-*********************************************
|
||||
* Streaming Compression Functions
|
||||
***********************************************/
|
||||
typedef union LZ4_stream_u LZ4_stream_t; /* incomplete type (defined later) */
|
||||
|
||||
/*! LZ4_createStream() and LZ4_freeStream() :
|
||||
* LZ4_createStream() will allocate and initialize an `LZ4_stream_t` structure.
|
||||
* LZ4_freeStream() releases its memory.
|
||||
*/
|
||||
LZ4LIB_API LZ4_stream_t* LZ4_createStream(void);
|
||||
LZ4LIB_API int LZ4_freeStream (LZ4_stream_t* streamPtr);
|
||||
|
||||
/*! LZ4_resetStream() :
|
||||
* An LZ4_stream_t structure can be allocated once and re-used multiple times.
|
||||
* Use this function to start compressing a new stream.
|
||||
*/
|
||||
LZ4LIB_API void LZ4_resetStream (LZ4_stream_t* streamPtr);
|
||||
|
||||
/*! LZ4_loadDict() :
|
||||
* Use this function to load a static dictionary into LZ4_stream_t.
|
||||
* Any previous data will be forgotten, only 'dictionary' will remain in memory.
|
||||
* Loading a size of 0 is allowed, and is the same as reset.
|
||||
* @return : dictionary size, in bytes (necessarily <= 64 KB)
|
||||
*/
|
||||
LZ4LIB_API int LZ4_loadDict (LZ4_stream_t* streamPtr, const char* dictionary, int dictSize);
|
||||
|
||||
/*! LZ4_compress_fast_continue() :
|
||||
* Compress content into 'src' using data from previously compressed blocks, improving compression ratio.
|
||||
* 'dst' buffer must be already allocated.
|
||||
* If dstCapacity >= LZ4_compressBound(srcSize), compression is guaranteed to succeed, and runs faster.
|
||||
*
|
||||
* Important : Up to 64KB of previously compressed data is assumed to remain present and unmodified in memory !
|
||||
* Special 1 : If input buffer is a double-buffer, it can have any size, including < 64 KB.
|
||||
* Special 2 : If input buffer is a ring-buffer, it can have any size, including < 64 KB.
|
||||
*
|
||||
* @return : size of compressed block
|
||||
* or 0 if there is an error (typically, compressed data cannot fit into 'dst')
|
||||
* After an error, the stream status is invalid, it can only be reset or freed.
|
||||
*/
|
||||
LZ4LIB_API int LZ4_compress_fast_continue (LZ4_stream_t* streamPtr, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration);
|
||||
|
||||
/*! LZ4_saveDict() :
|
||||
* If previously compressed data block is not guaranteed to remain available at its current memory location,
|
||||
* save it into a safer place (char* safeBuffer).
|
||||
* Note : it's not necessary to call LZ4_loadDict() after LZ4_saveDict(), dictionary is immediately usable.
|
||||
* @return : saved dictionary size in bytes (necessarily <= dictSize), or 0 if error.
|
||||
*/
|
||||
LZ4LIB_API int LZ4_saveDict (LZ4_stream_t* streamPtr, char* safeBuffer, int dictSize);
|
||||
|
||||
// add missing prototypes
|
||||
int LZ4_compress_fast_force(const char* source, char* dest, int inputSize, int maxOutputSize, int acceleration);
|
||||
int LZ4_compress_forceExtDict (LZ4_stream_t* LZ4_dict, const char* source, char* dest, int inputSize);
|
||||
int LZ4_decompress_safe_forceExtDict(const char* source, char* dest, int compressedSize, int maxOutputSize, const char* dictStart, int dictSize);
|
||||
|
||||
/*-**********************************************
|
||||
* Streaming Decompression Functions
|
||||
* Bufferless synchronous API
|
||||
************************************************/
|
||||
typedef union LZ4_streamDecode_u LZ4_streamDecode_t; /* incomplete type (defined later) */
|
||||
|
||||
/*! LZ4_createStreamDecode() and LZ4_freeStreamDecode() :
|
||||
* creation / destruction of streaming decompression tracking structure.
|
||||
* A tracking structure can be re-used multiple times sequentially. */
|
||||
LZ4LIB_API LZ4_streamDecode_t* LZ4_createStreamDecode(void);
|
||||
LZ4LIB_API int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream);
|
||||
|
||||
/*! LZ4_setStreamDecode() :
|
||||
* An LZ4_streamDecode_t structure can be allocated once and re-used multiple times.
|
||||
* Use this function to start decompression of a new stream of blocks.
|
||||
* A dictionary can optionnally be set. Use NULL or size 0 for a simple reset order.
|
||||
* @return : 1 if OK, 0 if error
|
||||
*/
|
||||
LZ4LIB_API int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize);
|
||||
|
||||
/*! LZ4_decompress_*_continue() :
|
||||
* These decoding functions allow decompression of consecutive blocks in "streaming" mode.
|
||||
* A block is an unsplittable entity, it must be presented entirely to a decompression function.
|
||||
* Decompression functions only accept one block at a time.
|
||||
* Previously decoded blocks *must* remain available at the memory position where they were decoded (up to 64 KB).
|
||||
*
|
||||
* Special : if application sets a ring buffer for decompression, it must respect one of the following conditions :
|
||||
* - Exactly same size as encoding buffer, with same update rule (block boundaries at same positions)
|
||||
* In which case, the decoding & encoding ring buffer can have any size, including very small ones ( < 64 KB).
|
||||
* - Larger than encoding buffer, by a minimum of maxBlockSize more bytes.
|
||||
* maxBlockSize is implementation dependent. It's the maximum size of any single block.
|
||||
* In which case, encoding and decoding buffers do not need to be synchronized,
|
||||
* and encoding ring buffer can have any size, including small ones ( < 64 KB).
|
||||
* - _At least_ 64 KB + 8 bytes + maxBlockSize.
|
||||
* In which case, encoding and decoding buffers do not need to be synchronized,
|
||||
* and encoding ring buffer can have any size, including larger than decoding buffer.
|
||||
* Whenever these conditions are not possible, save the last 64KB of decoded data into a safe buffer,
|
||||
* and indicate where it is saved using LZ4_setStreamDecode() before decompressing next block.
|
||||
*/
|
||||
LZ4LIB_API int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* src, char* dst, int srcSize, int dstCapacity);
|
||||
LZ4LIB_API int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* src, char* dst, int originalSize);
|
||||
|
||||
|
||||
/*! LZ4_decompress_*_usingDict() :
|
||||
* These decoding functions work the same as
|
||||
* a combination of LZ4_setStreamDecode() followed by LZ4_decompress_*_continue()
|
||||
* They are stand-alone, and don't need an LZ4_streamDecode_t structure.
|
||||
*/
|
||||
LZ4LIB_API int LZ4_decompress_safe_usingDict (const char* src, char* dst, int srcSize, int dstCapcity, const char* dictStart, int dictSize);
|
||||
LZ4LIB_API int LZ4_decompress_fast_usingDict (const char* src, char* dst, int originalSize, const char* dictStart, int dictSize);
|
||||
|
||||
|
||||
/*^**********************************************
|
||||
* !!!!!! STATIC LINKING ONLY !!!!!!
|
||||
***********************************************/
|
||||
/*-************************************
|
||||
* Private definitions
|
||||
**************************************
|
||||
* Do not use these definitions.
|
||||
* They are exposed to allow static allocation of `LZ4_stream_t` and `LZ4_streamDecode_t`.
|
||||
* Using these definitions will expose code to API and/or ABI break in future versions of the library.
|
||||
**************************************/
|
||||
#define LZ4_HASHLOG (LZ4_MEMORY_USAGE-2)
|
||||
#define LZ4_HASHTABLESIZE (1 << LZ4_MEMORY_USAGE)
|
||||
#define LZ4_HASH_SIZE_U32 (1 << LZ4_HASHLOG) /* required as macro for static allocation */
|
||||
|
||||
#if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */)
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
uint32_t hashTable[LZ4_HASH_SIZE_U32];
|
||||
uint32_t currentOffset;
|
||||
uint32_t initCheck;
|
||||
const uint8_t* dictionary;
|
||||
uint8_t* bufferStart; /* obsolete, used for slideInputBuffer */
|
||||
uint32_t dictSize;
|
||||
} LZ4_stream_t_internal;
|
||||
|
||||
typedef struct {
|
||||
const uint8_t* externalDict;
|
||||
size_t extDictSize;
|
||||
const uint8_t* prefixEnd;
|
||||
size_t prefixSize;
|
||||
} LZ4_streamDecode_t_internal;
|
||||
|
||||
#else
|
||||
|
||||
typedef struct {
|
||||
unsigned int hashTable[LZ4_HASH_SIZE_U32];
|
||||
unsigned int currentOffset;
|
||||
unsigned int initCheck;
|
||||
const unsigned char* dictionary;
|
||||
unsigned char* bufferStart; /* obsolete, used for slideInputBuffer */
|
||||
unsigned int dictSize;
|
||||
} LZ4_stream_t_internal;
|
||||
|
||||
typedef struct {
|
||||
const unsigned char* externalDict;
|
||||
size_t extDictSize;
|
||||
const unsigned char* prefixEnd;
|
||||
size_t prefixSize;
|
||||
} LZ4_streamDecode_t_internal;
|
||||
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* LZ4_stream_t :
|
||||
* information structure to track an LZ4 stream.
|
||||
* init this structure before first use.
|
||||
* note : only use in association with static linking !
|
||||
* this definition is not API/ABI safe,
|
||||
* it may change in a future version !
|
||||
*/
|
||||
#define LZ4_STREAMSIZE_U64 ((1 << (LZ4_MEMORY_USAGE-3)) + 4)
|
||||
#define LZ4_STREAMSIZE (LZ4_STREAMSIZE_U64 * sizeof(unsigned long long))
|
||||
union LZ4_stream_u {
|
||||
unsigned long long table[LZ4_STREAMSIZE_U64];
|
||||
LZ4_stream_t_internal internal_donotuse;
|
||||
} ; /* previously typedef'd to LZ4_stream_t */
|
||||
|
||||
|
||||
/*!
|
||||
* LZ4_streamDecode_t :
|
||||
* information structure to track an LZ4 stream during decompression.
|
||||
* init this structure using LZ4_setStreamDecode (or memset()) before first use
|
||||
* note : only use in association with static linking !
|
||||
* this definition is not API/ABI safe,
|
||||
* and may change in a future version !
|
||||
*/
|
||||
#define LZ4_STREAMDECODESIZE_U64 4
|
||||
#define LZ4_STREAMDECODESIZE (LZ4_STREAMDECODESIZE_U64 * sizeof(unsigned long long))
|
||||
union LZ4_streamDecode_u {
|
||||
unsigned long long table[LZ4_STREAMDECODESIZE_U64];
|
||||
LZ4_streamDecode_t_internal internal_donotuse;
|
||||
} ; /* previously typedef'd to LZ4_streamDecode_t */
|
||||
|
||||
|
||||
/*-************************************
|
||||
* Obsolete Functions
|
||||
**************************************/
|
||||
|
||||
/*! Deprecation warnings
|
||||
Should deprecation warnings be a problem,
|
||||
it is generally possible to disable them,
|
||||
typically with -Wno-deprecated-declarations for gcc
|
||||
or _CRT_SECURE_NO_WARNINGS in Visual.
|
||||
Otherwise, it's also possible to define LZ4_DISABLE_DEPRECATE_WARNINGS */
|
||||
#ifdef LZ4_DISABLE_DEPRECATE_WARNINGS
|
||||
# define LZ4_DEPRECATED(message) /* disable deprecation warnings */
|
||||
#else
|
||||
# define LZ4_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
|
||||
# if defined(__clang__) /* clang doesn't handle mixed C++11 and CNU attributes */
|
||||
# define LZ4_DEPRECATED(message) __attribute__((deprecated(message)))
|
||||
# elif defined (__cplusplus) && (__cplusplus >= 201402) /* C++14 or greater */
|
||||
# define LZ4_DEPRECATED(message) [[deprecated(message)]]
|
||||
# elif (LZ4_GCC_VERSION >= 405)
|
||||
# define LZ4_DEPRECATED(message) __attribute__((deprecated(message)))
|
||||
# elif (LZ4_GCC_VERSION >= 301)
|
||||
# define LZ4_DEPRECATED(message) __attribute__((deprecated))
|
||||
# elif defined(_MSC_VER)
|
||||
# define LZ4_DEPRECATED(message) __declspec(deprecated(message))
|
||||
# else
|
||||
# pragma message("WARNING: You need to implement LZ4_DEPRECATED for this compiler")
|
||||
# define LZ4_DEPRECATED(message)
|
||||
# endif
|
||||
#endif /* LZ4_DISABLE_DEPRECATE_WARNINGS */
|
||||
|
||||
/* Obsolete compression functions */
|
||||
LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_default() instead") int LZ4_compress (const char* source, char* dest, int sourceSize);
|
||||
LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_default() instead") int LZ4_compress_limitedOutput (const char* source, char* dest, int sourceSize, int maxOutputSize);
|
||||
LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_extState() instead") int LZ4_compress_withState (void* state, const char* source, char* dest, int inputSize);
|
||||
LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_extState() instead") int LZ4_compress_limitedOutput_withState (void* state, const char* source, char* dest, int inputSize, int maxOutputSize);
|
||||
LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_continue() instead") int LZ4_compress_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize);
|
||||
LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_continue() instead") int LZ4_compress_limitedOutput_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize, int maxOutputSize);
|
||||
|
||||
/* Obsolete decompression functions */
|
||||
LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_fast() instead") int LZ4_uncompress (const char* source, char* dest, int outputSize);
|
||||
LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_safe() instead") int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, int maxOutputSize);
|
||||
|
||||
/* Obsolete streaming functions; use new streaming interface whenever possible */
|
||||
LZ4LIB_API LZ4_DEPRECATED("use LZ4_createStream() instead") void* LZ4_create (char* inputBuffer);
|
||||
LZ4LIB_API LZ4_DEPRECATED("use LZ4_createStream() instead") int LZ4_sizeofStreamState(void);
|
||||
LZ4LIB_API LZ4_DEPRECATED("use LZ4_resetStream() instead") int LZ4_resetStreamState(void* state, char* inputBuffer);
|
||||
LZ4LIB_API LZ4_DEPRECATED("use LZ4_saveDict() instead") char* LZ4_slideInputBuffer (void* state);
|
||||
|
||||
/* Obsolete streaming decoding functions */
|
||||
LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_safe_usingDict() instead") int LZ4_decompress_safe_withPrefix64k (const char* src, char* dst, int compressedSize, int maxDstSize);
|
||||
LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_fast_usingDict() instead") int LZ4_decompress_fast_withPrefix64k (const char* src, char* dst, int originalSize);
|
||||
|
||||
#endif /* LZ4_H_2983827168210 */
|
||||
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
#endif
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2016, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2013, Peter Haag
|
||||
@ -53,7 +54,6 @@
|
||||
#include "nfnet.h"
|
||||
#include "nf_common.h"
|
||||
#include "bookkeeper.h"
|
||||
#include "nfxstat.h"
|
||||
#include "collector.h"
|
||||
#include "exporter.h"
|
||||
|
||||
@ -312,29 +312,6 @@ void *data_ptr;
|
||||
fs->nffile->stat_record->numpackets += packets;
|
||||
fs->nffile->stat_record->numbytes += bytes;
|
||||
|
||||
if ( fs->xstat ) {
|
||||
uint32_t bpp = packets ? bytes/packets : 0;
|
||||
if ( bpp > MAX_BPP )
|
||||
bpp = MAX_BPP;
|
||||
if ( common_record->prot == IPPROTO_TCP ) {
|
||||
fs->xstat->bpp_histogram->tcp.bpp[bpp]++;
|
||||
fs->xstat->bpp_histogram->tcp.count++;
|
||||
|
||||
fs->xstat->port_histogram->src_tcp.port[common_record->srcport]++;
|
||||
fs->xstat->port_histogram->dst_tcp.port[common_record->dstport]++;
|
||||
fs->xstat->port_histogram->src_tcp.count++;
|
||||
fs->xstat->port_histogram->dst_tcp.count++;
|
||||
} else if ( common_record->prot == IPPROTO_UDP ) {
|
||||
fs->xstat->bpp_histogram->udp.bpp[bpp]++;
|
||||
fs->xstat->bpp_histogram->udp.count++;
|
||||
|
||||
fs->xstat->port_histogram->src_udp.port[common_record->srcport]++;
|
||||
fs->xstat->port_histogram->dst_udp.port[common_record->dstport]++;
|
||||
fs->xstat->port_histogram->src_udp.count++;
|
||||
fs->xstat->port_histogram->dst_udp.count++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( verbose ) {
|
||||
master_record_t master_record;
|
||||
ExpandRecord_v2((common_record_t *)common_record, &pcap_extension_info, NULL, &master_record);
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2016, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2013, Peter Haag
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2016, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
@ -55,7 +56,6 @@
|
||||
#include "nfnet.h"
|
||||
#include "nf_common.h"
|
||||
#include "bookkeeper.h"
|
||||
#include "nfxstat.h"
|
||||
#include "collector.h"
|
||||
#include "exporter.h"
|
||||
#include "netflow_v1.h"
|
||||
@ -177,7 +177,7 @@ char ipstr[IP_STRING_LEN];
|
||||
// search the appropriate exporter engine
|
||||
while ( *e ) {
|
||||
if ( (*e)->info.version == version &&
|
||||
(*e)->info.ip.v6[0] == fs->ip.v6[0] && (*e)->info.ip.v6[1] == fs->ip.v6[1])
|
||||
(*e)->info.ip.V6[0] == fs->ip.V6[0] && (*e)->info.ip.V6[1] == fs->ip.V6[1])
|
||||
return *e;
|
||||
e = &((*e)->next);
|
||||
}
|
||||
@ -223,12 +223,12 @@ char ipstr[IP_STRING_LEN];
|
||||
FlushInfoExporter(fs, &((*e)->info));
|
||||
|
||||
if ( fs->sa_family == AF_INET ) {
|
||||
uint32_t _ip = htonl(fs->ip.v4);
|
||||
uint32_t _ip = htonl(fs->ip.V4);
|
||||
inet_ntop(AF_INET, &_ip, ipstr, sizeof(ipstr));
|
||||
} else if ( fs->sa_family == AF_INET6 ) {
|
||||
uint64_t _ip[2];
|
||||
_ip[0] = htonll(fs->ip.v6[0]);
|
||||
_ip[1] = htonll(fs->ip.v6[1]);
|
||||
_ip[0] = htonll(fs->ip.V6[0]);
|
||||
_ip[1] = htonll(fs->ip.V6[1]);
|
||||
inet_ntop(AF_INET6, &_ip, ipstr, sizeof(ipstr));
|
||||
} else {
|
||||
strncpy(ipstr, "<unknown>", IP_STRING_LEN);
|
||||
@ -364,7 +364,7 @@ char *string;
|
||||
} break;
|
||||
case EX_ROUTER_IP_v4: { // IPv4 router address
|
||||
tpl_ext_23_t *tpl = (tpl_ext_23_t *)data_ptr;
|
||||
tpl->router_ip = fs->ip.v4;
|
||||
tpl->router_ip = fs->ip.V4;
|
||||
data_ptr = (void *)tpl->data;
|
||||
ClearFlag(common_record->flags, FLAG_IPV6_EXP);
|
||||
} break;
|
||||
@ -449,32 +449,9 @@ char *string;
|
||||
fs->nffile->stat_record->numpackets += v1_block->dPkts;
|
||||
fs->nffile->stat_record->numbytes += v1_block->dOctets;
|
||||
|
||||
if ( fs->xstat ) {
|
||||
uint32_t bpp = v1_block->dPkts ? v1_block->dOctets/v1_block->dPkts : 0;
|
||||
if ( bpp > MAX_BPP )
|
||||
bpp = MAX_BPP;
|
||||
if ( common_record->prot == IPPROTO_TCP ) {
|
||||
fs->xstat->bpp_histogram->tcp.bpp[bpp]++;
|
||||
fs->xstat->bpp_histogram->tcp.count++;
|
||||
|
||||
fs->xstat->port_histogram->src_tcp.port[common_record->srcport]++;
|
||||
fs->xstat->port_histogram->dst_tcp.port[common_record->dstport]++;
|
||||
fs->xstat->port_histogram->src_tcp.count++;
|
||||
fs->xstat->port_histogram->dst_tcp.count++;
|
||||
} else if ( common_record->prot == IPPROTO_UDP ) {
|
||||
fs->xstat->bpp_histogram->udp.bpp[bpp]++;
|
||||
fs->xstat->bpp_histogram->udp.count++;
|
||||
|
||||
fs->xstat->port_histogram->src_udp.port[common_record->srcport]++;
|
||||
fs->xstat->port_histogram->dst_udp.port[common_record->dstport]++;
|
||||
fs->xstat->port_histogram->src_udp.count++;
|
||||
fs->xstat->port_histogram->dst_udp.count++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( verbose ) {
|
||||
master_record_t master_record;
|
||||
memset((void *)&master_record, 0, sizeof(master_record_t));
|
||||
ExpandRecord_v2((common_record_t *)common_record, &v1_extension_info, &(exporter->info), &master_record);
|
||||
format_file_block_record(&master_record, &string, 0);
|
||||
printf("%s\n", string);
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2016, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
@ -34,6 +35,15 @@
|
||||
#ifndef _NETFLOW_V1_H
|
||||
#define _NETFLOW_V1_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "collector.h"
|
||||
|
||||
#define NETFLOW_V1_HEADER_LENGTH 16
|
||||
#define NETFLOW_V1_RECORD_LENGTH 48
|
||||
#define NETFLOW_V1_MAX_RECORDS 24
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2016, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
@ -55,7 +56,6 @@
|
||||
#include "nfnet.h"
|
||||
#include "nf_common.h"
|
||||
#include "bookkeeper.h"
|
||||
#include "nfxstat.h"
|
||||
#include "collector.h"
|
||||
#include "exporter.h"
|
||||
#include "netflow_v5_v7.h"
|
||||
@ -192,7 +192,7 @@ char ipstr[IP_STRING_LEN];
|
||||
// search the appropriate exporter engine
|
||||
while ( *e ) {
|
||||
if ( (*e)->info.version == version && (*e)->info.id == engine_tag &&
|
||||
(*e)->info.ip.v6[0] == fs->ip.v6[0] && (*e)->info.ip.v6[1] == fs->ip.v6[1])
|
||||
(*e)->info.ip.V6[0] == fs->ip.V6[0] && (*e)->info.ip.V6[1] == fs->ip.V6[1])
|
||||
return *e;
|
||||
e = &((*e)->next);
|
||||
}
|
||||
@ -258,12 +258,12 @@ char ipstr[IP_STRING_LEN];
|
||||
FlushInfoSampler(fs, &(sampler->info));
|
||||
|
||||
if ( fs->sa_family == AF_INET ) {
|
||||
uint32_t _ip = htonl(fs->ip.v4);
|
||||
uint32_t _ip = htonl(fs->ip.V4);
|
||||
inet_ntop(AF_INET, &_ip, ipstr, sizeof(ipstr));
|
||||
} else if ( fs->sa_family == AF_INET6 ) {
|
||||
uint64_t _ip[2];
|
||||
_ip[0] = htonll(fs->ip.v6[0]);
|
||||
_ip[1] = htonll(fs->ip.v6[1]);
|
||||
_ip[0] = htonll(fs->ip.V6[0]);
|
||||
_ip[1] = htonll(fs->ip.V6[1]);
|
||||
inet_ntop(AF_INET6, &_ip, ipstr, sizeof(ipstr));
|
||||
} else {
|
||||
strncpy(ipstr, "<unknown>", IP_STRING_LEN);
|
||||
@ -493,7 +493,7 @@ char *string;
|
||||
} break;
|
||||
case EX_ROUTER_IP_v4: { // IPv4 router address
|
||||
tpl_ext_23_t *tpl = (tpl_ext_23_t *)data_ptr;
|
||||
tpl->router_ip = fs->ip.v4;
|
||||
tpl->router_ip = fs->ip.V4;
|
||||
data_ptr = (void *)tpl->data;
|
||||
ClearFlag(common_record->flags, FLAG_IPV6_EXP);
|
||||
} break;
|
||||
@ -602,32 +602,9 @@ char *string;
|
||||
fs->nffile->stat_record->numpackets += packets;
|
||||
fs->nffile->stat_record->numbytes += bytes;
|
||||
|
||||
if ( fs->xstat ) {
|
||||
uint32_t bpp = packets ? (bytes/packets) : 0;
|
||||
if ( bpp > MAX_BPP )
|
||||
bpp = MAX_BPP;
|
||||
if ( common_record->prot == IPPROTO_TCP ) {
|
||||
fs->xstat->bpp_histogram->tcp.bpp[bpp]++;
|
||||
fs->xstat->bpp_histogram->tcp.count++;
|
||||
|
||||
fs->xstat->port_histogram->src_tcp.port[common_record->srcport]++;
|
||||
fs->xstat->port_histogram->dst_tcp.port[common_record->dstport]++;
|
||||
fs->xstat->port_histogram->src_tcp.count++;
|
||||
fs->xstat->port_histogram->dst_tcp.count++;
|
||||
} else if ( common_record->prot == IPPROTO_UDP ) {
|
||||
fs->xstat->bpp_histogram->udp.bpp[bpp]++;
|
||||
fs->xstat->bpp_histogram->udp.count++;
|
||||
|
||||
fs->xstat->port_histogram->src_udp.port[common_record->srcport]++;
|
||||
fs->xstat->port_histogram->dst_udp.port[common_record->dstport]++;
|
||||
fs->xstat->port_histogram->src_udp.count++;
|
||||
fs->xstat->port_histogram->dst_udp.count++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( verbose ) {
|
||||
master_record_t master_record;
|
||||
memset((void *)&master_record, 0, sizeof(master_record_t));
|
||||
ExpandRecord_v2((common_record_t *)common_record, &v5_extension_info, &(exporter->info), &master_record);
|
||||
format_file_block_record(&master_record, &string, 0);
|
||||
printf("%s\n", string);
|
||||
@ -731,8 +708,8 @@ uint32_t i, id, t1, t2;
|
||||
v5_output_record->First = htonl(t1);
|
||||
v5_output_record->Last = htonl(t2);
|
||||
|
||||
v5_output_record->srcaddr = htonl(master_record->v4.srcaddr);
|
||||
v5_output_record->dstaddr = htonl(master_record->v4.dstaddr);
|
||||
v5_output_record->srcaddr = htonl(master_record->V4.srcaddr);
|
||||
v5_output_record->dstaddr = htonl(master_record->V4.dstaddr);
|
||||
|
||||
v5_output_record->srcport = htons(master_record->srcport);
|
||||
v5_output_record->dstport = htons(master_record->dstport);
|
||||
@ -770,7 +747,7 @@ uint32_t i, id, t1, t2;
|
||||
v5_output_record->dst_mask = master_record->dst_mask;
|
||||
break;
|
||||
case EX_NEXT_HOP_v4:
|
||||
v5_output_record->nexthop = htonl(master_record->ip_nexthop.v4);
|
||||
v5_output_record->nexthop = htonl(master_record->ip_nexthop.V4);
|
||||
break;
|
||||
// default: Other extensions can not be sent with v5
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,17 +29,22 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: netflow_v5_v7.h 39 2009-11-25 08:11:15Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 39 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NETFLOW_V5_V7_H
|
||||
#define _NETFLOW_V5_V7_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "collector.h"
|
||||
#include "nffile.h"
|
||||
#include "nfnet.h"
|
||||
|
||||
#define NETFLOW_V5_HEADER_LENGTH 24
|
||||
#define NETFLOW_V5_RECORD_LENGTH 48
|
||||
#define NETFLOW_V5_MAX_RECORDS 30
|
||||
|
140
bin/netflow_v9.c
140
bin/netflow_v9.c
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,12 +29,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: netflow_v9.c 55 2010-02-02 16:02:58Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 55 $
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -59,7 +54,6 @@
|
||||
#include "nf_common.h"
|
||||
#include "util.h"
|
||||
#include "bookkeeper.h"
|
||||
#include "nfxstat.h"
|
||||
#include "collector.h"
|
||||
#include "exporter.h"
|
||||
#include "netflow_v9.h"
|
||||
@ -216,6 +210,7 @@ static struct v9_element_map_s {
|
||||
{ NF9_IN_BYTES, "bytes", _8bytes, _8bytes, move64_sampling, zero64, COMMON_BLOCK },
|
||||
{ NF9_IN_PACKETS, "packets", _4bytes, _8bytes, move32_sampling, zero64, COMMON_BLOCK },
|
||||
{ NF9_IN_PACKETS, "packets", _8bytes, _8bytes, move64_sampling, zero64, COMMON_BLOCK },
|
||||
{ NF_F_INITIATORPACKETS, "packets", _8bytes, _8bytes, move64_sampling, zero64, COMMON_BLOCK },
|
||||
|
||||
{ NF9_FLOWS_AGGR, "flows", _4bytes, _4bytes, move32, zero32, EX_AGGR_FLOWS_4 },
|
||||
{ NF9_FLOWS_AGGR, "flows", _8bytes, _8bytes, move64, zero64, EX_AGGR_FLOWS_8 },
|
||||
@ -248,6 +243,7 @@ static struct v9_element_map_s {
|
||||
{ NF9_OUT_BYTES, "out bytes", _8bytes, _8bytes, move64_sampling, zero64, EX_OUT_BYTES_8 },
|
||||
{ NF9_OUT_PKTS, "out packets", _4bytes, _8bytes, move32_sampling, zero64, EX_OUT_PKG_8 },
|
||||
{ NF9_OUT_PKTS, "out packets", _8bytes, _8bytes, move64_sampling, zero64, EX_OUT_PKG_8 },
|
||||
{ NF_F_RESPONDERPACKETS, "out packets", _8bytes, _8bytes, move64_sampling, zero64, EX_OUT_PKG_8 },
|
||||
{ NF9_IPV6_SRC_ADDR, "V6 src addr", _16bytes, _16bytes, move128, zero128, COMMON_BLOCK },
|
||||
{ NF9_IPV6_DST_ADDR, "V6 dst addr", _16bytes, _16bytes, move128, zero128, COMMON_BLOCK },
|
||||
{ NF9_IPV6_SRC_MASK, "V6 src mask", _1byte, _1byte, move8, zero8, EX_MULIPLE },
|
||||
@ -481,18 +477,18 @@ exporter_v9_domain_t **e = (exporter_v9_domain_t **)&(fs->exporter_data);
|
||||
|
||||
while ( *e ) {
|
||||
if ( (*e)->info.id == exporter_id && (*e)->info.version == 9 &&
|
||||
(*e)->info.ip.v6[0] == fs->ip.v6[0] && (*e)->info.ip.v6[1] == fs->ip.v6[1])
|
||||
(*e)->info.ip.V6[0] == fs->ip.V6[0] && (*e)->info.ip.V6[1] == fs->ip.V6[1])
|
||||
return *e;
|
||||
e = &((*e)->next);
|
||||
}
|
||||
|
||||
if ( fs->sa_family == AF_INET ) {
|
||||
uint32_t _ip = htonl(fs->ip.v4);
|
||||
uint32_t _ip = htonl(fs->ip.V4);
|
||||
inet_ntop(AF_INET, &_ip, ipstr, sizeof(ipstr));
|
||||
} else if ( fs->sa_family == AF_INET6 ) {
|
||||
uint64_t _ip[2];
|
||||
_ip[0] = htonll(fs->ip.v6[0]);
|
||||
_ip[1] = htonll(fs->ip.v6[1]);
|
||||
_ip[0] = htonll(fs->ip.V6[0]);
|
||||
_ip[1] = htonll(fs->ip.V6[1]);
|
||||
inet_ntop(AF_INET6, &_ip, ipstr, sizeof(ipstr));
|
||||
} else {
|
||||
strncpy(ipstr, "<unknown>", IP_STRING_LEN);
|
||||
@ -550,6 +546,7 @@ int index;
|
||||
index++;
|
||||
}
|
||||
#ifdef DEVEL
|
||||
index--;
|
||||
printf("=> known type: %u(%s), at index: %i, length: %u not supported\n",
|
||||
Type, v9_element_map[index].name, index, Length);
|
||||
|
||||
@ -788,7 +785,12 @@ size_t size_required;
|
||||
* This record is expected in the output stream. If not available
|
||||
* in the template, assume empty 4 bytes value
|
||||
*/
|
||||
PushSequence( table, NF9_IN_PACKETS, &offset, &table->packets, 0);
|
||||
if ( cache.lookup_info[NF_F_INITIATORPACKETS].found ) {
|
||||
PushSequence( table, NF_F_INITIATORPACKETS, &offset, &table->packets, 0);
|
||||
dbg_printf("Push NF_F_INITIATORPACKETS\n");
|
||||
} else {
|
||||
PushSequence( table, NF9_IN_PACKETS, &offset, &table->packets, 0);
|
||||
}
|
||||
// fix: always have 64bit counters due to possible sampling
|
||||
SetFlag(table->flags, FLAG_PKG_64);
|
||||
|
||||
@ -871,7 +873,12 @@ size_t size_required;
|
||||
PushSequence( table, NF9_OUT_PKTS, &offset, &table->out_packets, 0);
|
||||
break;
|
||||
case EX_OUT_PKG_8:
|
||||
PushSequence( table, NF9_OUT_PKTS, &offset, &table->out_packets, 0);
|
||||
if ( cache.lookup_info[NF_F_RESPONDERPACKETS].found ) {
|
||||
PushSequence( table, NF_F_RESPONDERPACKETS, &offset, &table->out_packets, 0);
|
||||
dbg_printf("Push NF_F_RESPONDERPACKETS\n");
|
||||
} else {
|
||||
PushSequence( table, NF9_OUT_PKTS, &offset, &table->out_packets, 0);
|
||||
}
|
||||
break;
|
||||
case EX_OUT_BYTES_4:
|
||||
if ( cache.lookup_info[NF_F_REV_FLOW_DELTA_BYTES].found ) {
|
||||
@ -1341,7 +1348,7 @@ int i;
|
||||
} // End of Process_v9_templates
|
||||
|
||||
static inline void Process_v9_option_templates(exporter_v9_domain_t *exporter, void *option_template_flowset, FlowSource_t *fs) {
|
||||
void *option_template, *p;
|
||||
uint8_t *option_template, *p;
|
||||
uint32_t size_left, nr_scopes, nr_options, i;
|
||||
uint16_t id, scope_length, option_length, offset, sampler_id_length;
|
||||
uint16_t offset_sampler_id, offset_sampler_mode, offset_sampler_interval, found_sampler;
|
||||
@ -1397,7 +1404,30 @@ uint16_t offset_std_sampler_interval, offset_std_sampler_algorithm, found_std_sa
|
||||
|
||||
uint16_t length = Get_val16(p); p = p + 2;
|
||||
offset += length;
|
||||
dbg_printf("Scope field Type: %u, length %u\n", type, length);
|
||||
#ifdef DEVEL
|
||||
printf("Scope field: Type ");
|
||||
switch (type) {
|
||||
case 1:
|
||||
printf("(1) - System");
|
||||
break;
|
||||
case 2:
|
||||
printf("(2) - Interface");
|
||||
break;
|
||||
case 3:
|
||||
printf("(3) - Line Card");
|
||||
break;
|
||||
case 4:
|
||||
printf("(4) - NetFlow Cache");
|
||||
break;
|
||||
case 5:
|
||||
printf("(5) - Template");
|
||||
break;
|
||||
default:
|
||||
printf("(%u) - Unknown", type);
|
||||
break;
|
||||
}
|
||||
printf(", length %u\n", length);
|
||||
#endif
|
||||
}
|
||||
|
||||
for ( ; i<(nr_scopes+nr_options); i++ ) {
|
||||
@ -1407,6 +1437,7 @@ uint16_t offset_std_sampler_interval, offset_std_sampler_algorithm, found_std_sa
|
||||
dbg_printf("Option field Type: %u, length %u\n", type, length);
|
||||
if ( !index ) {
|
||||
dbg_printf("Unsupported: Option field Type: %u, length %u\n", type, length);
|
||||
offset += length;
|
||||
continue;
|
||||
}
|
||||
while ( index && v9_element_map[index].id == type ) {
|
||||
@ -1419,6 +1450,7 @@ uint16_t offset_std_sampler_interval, offset_std_sampler_algorithm, found_std_sa
|
||||
if ( index && v9_element_map[index].length != length ) {
|
||||
LogError("Process_v9: Option field Type: %u, length %u not supported\n", type, length);
|
||||
dbg_printf("Process_v9: Option field Type: %u, length %u not supported\n", type, length);
|
||||
offset += length;
|
||||
continue;
|
||||
}
|
||||
switch (type) {
|
||||
@ -1433,16 +1465,19 @@ uint16_t offset_std_sampler_interval, offset_std_sampler_algorithm, found_std_sa
|
||||
break;
|
||||
|
||||
// individual samplers
|
||||
case NF9_FLOW_SAMPLER_ID:
|
||||
case NF9_FLOW_SAMPLER_ID: // depricated
|
||||
case NF_SELECTOR_ID:
|
||||
offset_sampler_id = offset;
|
||||
sampler_id_length = length;
|
||||
found_sampler++;
|
||||
break;
|
||||
case FLOW_SAMPLER_MODE:
|
||||
case FLOW_SAMPLER_MODE: // // depricated
|
||||
case NF_SELECTOR_ALGORITHM:
|
||||
offset_sampler_mode = offset;
|
||||
found_sampler++;
|
||||
break;
|
||||
case NF9_FLOW_SAMPLER_RANDOM_INTERVAL:
|
||||
case NF9_FLOW_SAMPLER_RANDOM_INTERVAL: // depricated
|
||||
case NF_SAMPLING_INTERVAL:
|
||||
offset_sampler_interval = offset;
|
||||
offset_std_sampler_interval = offset;
|
||||
found_sampler++;
|
||||
@ -1456,7 +1491,8 @@ uint16_t offset_std_sampler_interval, offset_std_sampler_algorithm, found_std_sa
|
||||
dbg_printf("[%u] Sampling information found\n", exporter->info.id);
|
||||
InsertSamplerOffset(fs, id, offset_sampler_id, sampler_id_length, offset_sampler_mode, offset_sampler_interval);
|
||||
} else if ( found_std_sampling == 2 ) { // need all two tags
|
||||
dbg_printf("[%u] Std sampling information found\n", exporter->info.id);
|
||||
dbg_printf("[%u] Std sampling information found. offset intervall: %u, offset algo: %u\n",
|
||||
exporter->info.id, offset_std_sampler_interval, offset_std_sampler_algorithm);
|
||||
InsertStdSamplerOffset(fs, id, offset_std_sampler_interval, offset_std_sampler_algorithm);
|
||||
} else {
|
||||
dbg_printf("[%u] No Sampling information found\n", exporter->info.id);
|
||||
@ -1584,7 +1620,7 @@ char *string;
|
||||
table->out_packets = 0;
|
||||
table->out_bytes = 0;
|
||||
|
||||
dbg_printf("%u] Process data record: MapID: %u\n", exporter->info.id, table->extension_info.map->map_id);
|
||||
dbg_printf("[%u] Process data record: MapID: %u\n", exporter->info.id, table->extension_info.map->map_id);
|
||||
|
||||
// apply copy and processing sequence
|
||||
for ( i=0; i<table->number_of_sequences; i++ ) {
|
||||
@ -1848,15 +1884,15 @@ char *string;
|
||||
/* 64bit access to potentially unaligned output buffer. use 2 x 32bit for _LP64 CPUs */
|
||||
type_mask_t t;
|
||||
|
||||
t.val.val64 = exporter->info.ip.v6[0];
|
||||
t.val.val64 = exporter->info.ip.V6[0];
|
||||
*((uint32_t *)&out[output_offset]) = t.val.val32[0];
|
||||
*((uint32_t *)&out[output_offset+4]) = t.val.val32[1];
|
||||
|
||||
t.val.val64 = exporter->info.ip.v6[1];
|
||||
t.val.val64 = exporter->info.ip.V6[1];
|
||||
*((uint32_t *)&out[output_offset+8]) = t.val.val32[0];
|
||||
*((uint32_t *)&out[output_offset+12]) = t.val.val32[1];
|
||||
} else {
|
||||
*((uint32_t *)&out[output_offset]) = exporter->info.ip.v4;
|
||||
*((uint32_t *)&out[output_offset]) = exporter->info.ip.V4;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1914,31 +1950,9 @@ char *string;
|
||||
fs->nffile->stat_record->numpackets += table->out_packets;
|
||||
fs->nffile->stat_record->numbytes += table->out_bytes;
|
||||
|
||||
if ( fs->xstat ) {
|
||||
uint32_t bpp = table->packets ? table->bytes/table->packets : 0;
|
||||
if ( bpp > MAX_BPP )
|
||||
bpp = MAX_BPP;
|
||||
if ( data_record->prot == IPPROTO_TCP ) {
|
||||
fs->xstat->bpp_histogram->tcp.bpp[bpp]++;
|
||||
fs->xstat->bpp_histogram->tcp.count++;
|
||||
|
||||
fs->xstat->port_histogram->src_tcp.port[data_record->srcport]++;
|
||||
fs->xstat->port_histogram->dst_tcp.port[data_record->dstport]++;
|
||||
fs->xstat->port_histogram->src_tcp.count++;
|
||||
fs->xstat->port_histogram->dst_tcp.count++;
|
||||
} else if ( data_record->prot == IPPROTO_UDP ) {
|
||||
fs->xstat->bpp_histogram->udp.bpp[bpp]++;
|
||||
fs->xstat->bpp_histogram->udp.count++;
|
||||
|
||||
fs->xstat->port_histogram->src_udp.port[data_record->srcport]++;
|
||||
fs->xstat->port_histogram->dst_udp.port[data_record->dstport]++;
|
||||
fs->xstat->port_histogram->src_udp.count++;
|
||||
fs->xstat->port_histogram->dst_udp.count++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( verbose ) {
|
||||
master_record_t master_record;
|
||||
memset((void *)&master_record, 0, sizeof(master_record_t));
|
||||
ExpandRecord_v2((common_record_t *)data_record, &(table->extension_info), &(exporter->info), &master_record);
|
||||
format_file_block_record(&master_record, &string, 0);
|
||||
printf("%s\n", string);
|
||||
@ -2076,7 +2090,8 @@ static int pkg_num = 0;
|
||||
#ifdef DEVEL
|
||||
uint32_t expected_records = ntohs(v9_header->count);
|
||||
uint32_t skip = 0;
|
||||
printf("\n[%u] Process next packet: %i %u records, buffer: %li \n", exporter_id, pkg_num, expected_records, size_left);
|
||||
printf("\n[%u] Process next packet: %i records: %u, buffer: %li \n", exporter_id, pkg_num, expected_records, size_left);
|
||||
printf("SourceID: %u, Sysuptime: %u.%u\n", v9_header->source_id, v9_header->SysUptime, v9_header->unix_secs);
|
||||
#endif
|
||||
|
||||
// sequence check
|
||||
@ -2103,6 +2118,7 @@ static int pkg_num = 0;
|
||||
*/
|
||||
}
|
||||
}
|
||||
dbg_printf("Sequence: %llu\n", exporter->sequence);
|
||||
|
||||
processed_records = 0;
|
||||
|
||||
@ -2652,18 +2668,18 @@ uint16_t icmp;
|
||||
|
||||
// IP address info
|
||||
if ((master_record->flags & FLAG_IPV6_ADDR) != 0 ) { // IPv6
|
||||
master_record->v6.srcaddr[0] = htonll(master_record->v6.srcaddr[0]);
|
||||
master_record->v6.srcaddr[1] = htonll(master_record->v6.srcaddr[1]);
|
||||
master_record->v6.dstaddr[0] = htonll(master_record->v6.dstaddr[0]);
|
||||
master_record->v6.dstaddr[1] = htonll(master_record->v6.dstaddr[1]);
|
||||
master_record->V6.srcaddr[0] = htonll(master_record->V6.srcaddr[0]);
|
||||
master_record->V6.srcaddr[1] = htonll(master_record->V6.srcaddr[1]);
|
||||
master_record->V6.dstaddr[0] = htonll(master_record->V6.dstaddr[0]);
|
||||
master_record->V6.dstaddr[1] = htonll(master_record->V6.dstaddr[1]);
|
||||
// keep compiler happy
|
||||
// memcpy(peer->buff_ptr, master_record->v6.srcaddr, 4 * sizeof(uint64_t));
|
||||
// memcpy(peer->buff_ptr, master_record->V6.srcaddr, 4 * sizeof(uint64_t));
|
||||
memcpy(peer->buff_ptr, master_record->ip_union._ip_64.addr, 4 * sizeof(uint64_t));
|
||||
peer->buff_ptr = (void *)((pointer_addr_t)peer->buff_ptr + 4 * sizeof(uint64_t));
|
||||
} else {
|
||||
Put_val32(htonl(master_record->v4.srcaddr), peer->buff_ptr);
|
||||
Put_val32(htonl(master_record->V4.srcaddr), peer->buff_ptr);
|
||||
peer->buff_ptr = (void *)((pointer_addr_t)peer->buff_ptr + sizeof(uint32_t));
|
||||
Put_val32(htonl(master_record->v4.dstaddr), peer->buff_ptr);
|
||||
Put_val32(htonl(master_record->V4.dstaddr), peer->buff_ptr);
|
||||
peer->buff_ptr = (void *)((pointer_addr_t)peer->buff_ptr + sizeof(uint32_t));
|
||||
}
|
||||
|
||||
@ -2738,23 +2754,23 @@ uint16_t icmp;
|
||||
peer->buff_ptr = (void *)tpl->data;
|
||||
} break;
|
||||
case EX_NEXT_HOP_v4:
|
||||
Put_val32(htonl(master_record->ip_nexthop.v4), peer->buff_ptr);
|
||||
Put_val32(htonl(master_record->ip_nexthop.V4), peer->buff_ptr);
|
||||
peer->buff_ptr = (void *)((pointer_addr_t)peer->buff_ptr + sizeof(uint32_t));
|
||||
break;
|
||||
case EX_NEXT_HOP_v6:
|
||||
Put_val64(htonll(master_record->ip_nexthop.v6[0]), peer->buff_ptr);
|
||||
Put_val64(htonll(master_record->ip_nexthop.V6[0]), peer->buff_ptr);
|
||||
peer->buff_ptr = (void *)((pointer_addr_t)peer->buff_ptr + sizeof(uint64_t));
|
||||
Put_val64(htonll(master_record->ip_nexthop.v6[1]), peer->buff_ptr);
|
||||
Put_val64(htonll(master_record->ip_nexthop.V6[1]), peer->buff_ptr);
|
||||
peer->buff_ptr = (void *)((pointer_addr_t)peer->buff_ptr + sizeof(uint64_t));
|
||||
break;
|
||||
case EX_NEXT_HOP_BGP_v4:
|
||||
Put_val32(htonl(master_record->bgp_nexthop.v4), peer->buff_ptr);
|
||||
Put_val32(htonl(master_record->bgp_nexthop.V4), peer->buff_ptr);
|
||||
peer->buff_ptr = (void *)((pointer_addr_t)peer->buff_ptr + sizeof(uint32_t));
|
||||
break;
|
||||
case EX_NEXT_HOP_BGP_v6:
|
||||
Put_val64(htonll(master_record->bgp_nexthop.v6[0]), peer->buff_ptr);
|
||||
Put_val64(htonll(master_record->bgp_nexthop.V6[0]), peer->buff_ptr);
|
||||
peer->buff_ptr = (void *)((pointer_addr_t)peer->buff_ptr + sizeof(uint64_t));
|
||||
Put_val64(htonll(master_record->bgp_nexthop.v6[1]), peer->buff_ptr);
|
||||
Put_val64(htonll(master_record->bgp_nexthop.V6[1]), peer->buff_ptr);
|
||||
peer->buff_ptr = (void *)((pointer_addr_t)peer->buff_ptr + sizeof(uint64_t));
|
||||
break;
|
||||
case EX_VLAN:
|
||||
@ -3042,8 +3058,6 @@ generic_sampler_t *sampler;
|
||||
// test for update of existing sampler
|
||||
if ( sampler->info.id == id ) {
|
||||
// found same sampler id - update record
|
||||
LogInfo( "Update existing sampler id: %i, mode: %u, interval: %u\n",
|
||||
id, mode, interval);
|
||||
dbg_printf("Update existing sampler id: %i, mode: %u, interval: %u\n",
|
||||
id, mode, interval);
|
||||
|
||||
@ -3052,6 +3066,8 @@ generic_sampler_t *sampler;
|
||||
FlushInfoSampler(fs, &(sampler->info));
|
||||
sampler->info.mode = mode;
|
||||
sampler->info.interval = interval;
|
||||
LogInfo( "Update existing sampler id: %i, mode: %u, interval: %u\n",
|
||||
id, mode, interval);
|
||||
} else {
|
||||
dbg_printf("Sampler unchanged!\n");
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,12 +29,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: netflow_v9.h 51 2010-01-29 09:01:54Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 51 $
|
||||
*
|
||||
*/
|
||||
|
||||
/* v9 structures */
|
||||
@ -72,6 +67,17 @@
|
||||
#ifndef _NETFLOW_V9_H
|
||||
#define _NETFLOW_V9_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "collector.h"
|
||||
#include "nfnet.h"
|
||||
#include "nffile.h"
|
||||
|
||||
typedef struct netflow_v9_header {
|
||||
uint16_t version;
|
||||
uint16_t count;
|
||||
@ -211,9 +217,13 @@ typedef struct common_header_s {
|
||||
#define NF9_ENGINE_ID 39
|
||||
|
||||
#define NF9_FLOW_SAMPLER_ID 48
|
||||
#define FLOW_SAMPLER_MODE 49
|
||||
#define FLOW_SAMPLER_MODE 49
|
||||
#define NF9_FLOW_SAMPLER_RANDOM_INTERVAL 50
|
||||
|
||||
#define NF_SELECTOR_ID 302
|
||||
#define NF_SELECTOR_ALGORITHM 304
|
||||
#define NF_SAMPLING_INTERVAL 305
|
||||
|
||||
// #define NF9_MIN_TTL 52
|
||||
// #define NF9_MAX_TTL 53
|
||||
// #define NF9_IPV4_IDENT 54
|
||||
@ -280,6 +290,11 @@ typedef struct common_header_s {
|
||||
#define NF_F_XLATE_DST_PORT_84 40004
|
||||
#define NF_F_FW_EVENT_84 40005
|
||||
|
||||
// ASA 9.x packet counters: initiatorPackets and responderPackets
|
||||
// see https://www.iana.org/assignments/ipfix/ipfix.xhtml
|
||||
#define NF_F_INITIATORPACKETS 298
|
||||
#define NF_F_RESPONDERPACKETS 299
|
||||
|
||||
// Cisco ASR 1000 series NEL extension - Nat Event Logging
|
||||
#define NF_N_NAT_EVENT 230
|
||||
#define NF_N_INGRESS_VRFID 234
|
||||
|
284
bin/nf_common.c
284
bin/nf_common.c
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2016, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
@ -29,12 +30,12 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
@ -74,6 +75,16 @@ static int long_v6 = 0;
|
||||
static int scale = 1;
|
||||
static double duration;
|
||||
|
||||
#ifdef NSEL
|
||||
static char *NSEL_event_string[6] = {
|
||||
"IGNORE", "CREATE", "DELETE", "DENIED", "ALERT", "UPDATE"
|
||||
};
|
||||
|
||||
static char *NEL_event_string[3] = {
|
||||
"INVALID", "ADD", "DELETE"
|
||||
};
|
||||
#endif
|
||||
|
||||
#define STRINGSIZE 10240
|
||||
#define IP_STRING_LEN (INET6_ADDRSTRLEN)
|
||||
|
||||
@ -210,6 +221,8 @@ static void String_MPLSs(master_record_t *r, char *string);
|
||||
|
||||
static void String_Engine(master_record_t *r, char *string);
|
||||
|
||||
static void String_Label(master_record_t *r, char *string);
|
||||
|
||||
static void String_ClientLatency(master_record_t *r, char *string);
|
||||
|
||||
static void String_ServerLatency(master_record_t *r, char *string);
|
||||
@ -340,6 +353,7 @@ static struct format_token_list_s {
|
||||
{ "%pps", 0, " pps", String_pps }, // pps - packets per second
|
||||
{ "%bpp", 0, " Bpp", String_bpp }, // bpp - Bytes per package
|
||||
{ "%eng", 0, " engine", String_Engine }, // Engine Type/ID
|
||||
{ "%lbl", 0, " label", String_Label }, // Flow Label
|
||||
|
||||
#ifdef NSEL
|
||||
// NSEL specifics
|
||||
@ -562,14 +576,6 @@ static struct fwd_status_def_s {
|
||||
{ 0, NULL} // Last entry
|
||||
};
|
||||
|
||||
char *NSEL_event_string[6] = {
|
||||
"IGNORE", "CREATE", "DELETE", "DENIED", "ALERT", "UPDATE"
|
||||
};
|
||||
|
||||
char *NEL_event_string[3] = {
|
||||
"INVALID", "ADD", "DELETE"
|
||||
};
|
||||
|
||||
static char **fwd_status = NULL;
|
||||
|
||||
#include "applybits_inline.c"
|
||||
@ -652,7 +658,7 @@ char *Get_fwd_status_name(uint32_t id) {
|
||||
|
||||
} // End of Get_fwd_status_name
|
||||
|
||||
void format_file_block_header(void *header, char ** s, int tag) {
|
||||
void format_file_block_header(void *header, char **s, int tag) {
|
||||
data_block_header_t *h = (data_block_header_t *)header;
|
||||
|
||||
snprintf(data_string,STRINGSIZE-1 ,""
|
||||
@ -667,7 +673,7 @@ data_block_header_t *h = (data_block_header_t *)header;
|
||||
|
||||
} // End of format_file_block_header
|
||||
|
||||
void format_file_block_record(void *record, char ** s, int tag) {
|
||||
void format_file_block_record(void *record, char **s, int tag) {
|
||||
char *_s, as[IP_STRING_LEN], ds[IP_STRING_LEN], datestr1[64], datestr2[64], datestr3[64], flags_str[16];
|
||||
char s_snet[IP_STRING_LEN], s_dnet[IP_STRING_LEN], s_proto[32];
|
||||
int i, id;
|
||||
@ -684,16 +690,16 @@ extension_map_t *extension_map = r->map_ref;
|
||||
uint64_t dnet[2];
|
||||
|
||||
// remember IPs for network
|
||||
snet[0] = r->v6.srcaddr[0];
|
||||
snet[1] = r->v6.srcaddr[1];
|
||||
dnet[0] = r->v6.dstaddr[0];
|
||||
dnet[1] = r->v6.dstaddr[1];
|
||||
r->v6.srcaddr[0] = htonll(r->v6.srcaddr[0]);
|
||||
r->v6.srcaddr[1] = htonll(r->v6.srcaddr[1]);
|
||||
r->v6.dstaddr[0] = htonll(r->v6.dstaddr[0]);
|
||||
r->v6.dstaddr[1] = htonll(r->v6.dstaddr[1]);
|
||||
inet_ntop(AF_INET6, r->v6.srcaddr, as, sizeof(as));
|
||||
inet_ntop(AF_INET6, r->v6.dstaddr, ds, sizeof(ds));
|
||||
snet[0] = r->V6.srcaddr[0];
|
||||
snet[1] = r->V6.srcaddr[1];
|
||||
dnet[0] = r->V6.dstaddr[0];
|
||||
dnet[1] = r->V6.dstaddr[1];
|
||||
r->V6.srcaddr[0] = htonll(r->V6.srcaddr[0]);
|
||||
r->V6.srcaddr[1] = htonll(r->V6.srcaddr[1]);
|
||||
r->V6.dstaddr[0] = htonll(r->V6.dstaddr[0]);
|
||||
r->V6.dstaddr[1] = htonll(r->V6.dstaddr[1]);
|
||||
inet_ntop(AF_INET6, r->V6.srcaddr, as, sizeof(as));
|
||||
inet_ntop(AF_INET6, r->V6.dstaddr, ds, sizeof(ds));
|
||||
if ( ! long_v6 ) {
|
||||
condense_v6(as);
|
||||
condense_v6(ds);
|
||||
@ -730,12 +736,12 @@ extension_map_t *extension_map = r->map_ref;
|
||||
|
||||
} else { // IPv4
|
||||
uint32_t snet, dnet;
|
||||
snet = r->v4.srcaddr;
|
||||
dnet = r->v4.dstaddr;
|
||||
r->v4.srcaddr = htonl(r->v4.srcaddr);
|
||||
r->v4.dstaddr = htonl(r->v4.dstaddr);
|
||||
inet_ntop(AF_INET, &r->v4.srcaddr, as, sizeof(as));
|
||||
inet_ntop(AF_INET, &r->v4.dstaddr, ds, sizeof(ds));
|
||||
snet = r->V4.srcaddr;
|
||||
dnet = r->V4.dstaddr;
|
||||
r->V4.srcaddr = htonl(r->V4.srcaddr);
|
||||
r->V4.dstaddr = htonl(r->V4.dstaddr);
|
||||
inet_ntop(AF_INET, &r->V4.srcaddr, as, sizeof(as));
|
||||
inet_ntop(AF_INET, &r->V4.dstaddr, ds, sizeof(ds));
|
||||
if ( r->src_mask || r->dst_mask) {
|
||||
snet &= 0xffffffffL << ( 32 - r->src_mask );
|
||||
snet = htonl(snet);
|
||||
@ -767,6 +773,7 @@ extension_map_t *extension_map = r->map_ref;
|
||||
snprintf(_s, slen-1, "\n"
|
||||
"Flow Record: \n"
|
||||
" Flags = 0x%.2x %s, %s\n"
|
||||
" label = %16s\n"
|
||||
" export sysid = %5u\n"
|
||||
" size = %5u\n"
|
||||
" first = %10u [%s]\n"
|
||||
@ -777,7 +784,9 @@ extension_map_t *extension_map = r->map_ref;
|
||||
" dst addr = %16s\n"
|
||||
,
|
||||
r->flags, TestFlag(r->flags, FLAG_EVENT) ? "EVENT" : "FLOW",
|
||||
TestFlag(r->flags, FLAG_SAMPLED) ? "Sampled" : "Unsampled", r->exporter_sysid, r->size, r->first,
|
||||
TestFlag(r->flags, FLAG_SAMPLED) ? "Sampled" : "Unsampled",
|
||||
r->label ? r->label : "<none>",
|
||||
r->exporter_sysid, r->size, r->first,
|
||||
datestr1, r->last, datestr2, r->msec_first, r->msec_last,
|
||||
as, ds );
|
||||
|
||||
@ -866,8 +875,8 @@ extension_map_t *extension_map = r->map_ref;
|
||||
break;
|
||||
case EX_NEXT_HOP_v4:
|
||||
as[0] = 0;
|
||||
r->ip_nexthop.v4 = htonl(r->ip_nexthop.v4);
|
||||
inet_ntop(AF_INET, &r->ip_nexthop.v4, as, sizeof(as));
|
||||
r->ip_nexthop.V4 = htonl(r->ip_nexthop.V4);
|
||||
inet_ntop(AF_INET, &r->ip_nexthop.V4, as, sizeof(as));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
|
||||
snprintf(_s, slen-1,
|
||||
@ -880,9 +889,9 @@ extension_map_t *extension_map = r->map_ref;
|
||||
break;
|
||||
case EX_NEXT_HOP_v6:
|
||||
as[0] = 0;
|
||||
r->ip_nexthop.v6[0] = htonll(r->ip_nexthop.v6[0]);
|
||||
r->ip_nexthop.v6[1] = htonll(r->ip_nexthop.v6[1]);
|
||||
inet_ntop(AF_INET6, r->ip_nexthop.v6, as, sizeof(as));
|
||||
r->ip_nexthop.V6[0] = htonll(r->ip_nexthop.V6[0]);
|
||||
r->ip_nexthop.V6[1] = htonll(r->ip_nexthop.V6[1]);
|
||||
inet_ntop(AF_INET6, r->ip_nexthop.V6, as, sizeof(as));
|
||||
if ( ! long_v6 ) {
|
||||
condense_v6(as);
|
||||
condense_v6(ds);
|
||||
@ -898,8 +907,8 @@ extension_map_t *extension_map = r->map_ref;
|
||||
break;
|
||||
case EX_NEXT_HOP_BGP_v4:
|
||||
as[0] = 0;
|
||||
r->bgp_nexthop.v4 = htonl(r->bgp_nexthop.v4);
|
||||
inet_ntop(AF_INET, &r->bgp_nexthop.v4, as, sizeof(as));
|
||||
r->bgp_nexthop.V4 = htonl(r->bgp_nexthop.V4);
|
||||
inet_ntop(AF_INET, &r->bgp_nexthop.V4, as, sizeof(as));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
|
||||
snprintf(_s, slen-1,
|
||||
@ -912,9 +921,9 @@ extension_map_t *extension_map = r->map_ref;
|
||||
break;
|
||||
case EX_NEXT_HOP_BGP_v6:
|
||||
as[0] = 0;
|
||||
r->bgp_nexthop.v6[0] = htonll(r->bgp_nexthop.v6[0]);
|
||||
r->bgp_nexthop.v6[1] = htonll(r->bgp_nexthop.v6[1]);
|
||||
inet_ntop(AF_INET6, r->ip_nexthop.v6, as, sizeof(as));
|
||||
r->bgp_nexthop.V6[0] = htonll(r->bgp_nexthop.V6[0]);
|
||||
r->bgp_nexthop.V6[1] = htonll(r->bgp_nexthop.V6[1]);
|
||||
inet_ntop(AF_INET6, r->ip_nexthop.V6, as, sizeof(as));
|
||||
if ( ! long_v6 ) {
|
||||
condense_v6(as);
|
||||
condense_v6(ds);
|
||||
@ -1015,8 +1024,8 @@ extension_map_t *extension_map = r->map_ref;
|
||||
} break;
|
||||
case EX_ROUTER_IP_v4:
|
||||
as[0] = 0;
|
||||
r->ip_router.v4 = htonl(r->ip_router.v4);
|
||||
inet_ntop(AF_INET, &r->ip_router.v4, as, sizeof(as));
|
||||
r->ip_router.V4 = htonl(r->ip_router.V4);
|
||||
inet_ntop(AF_INET, &r->ip_router.V4, as, sizeof(as));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
|
||||
snprintf(_s, slen-1,
|
||||
@ -1029,9 +1038,9 @@ extension_map_t *extension_map = r->map_ref;
|
||||
break;
|
||||
case EX_ROUTER_IP_v6:
|
||||
as[0] = 0;
|
||||
r->ip_router.v6[0] = htonll(r->ip_router.v6[0]);
|
||||
r->ip_router.v6[1] = htonll(r->ip_router.v6[1]);
|
||||
inet_ntop(AF_INET6, &r->ip_router.v6, as, sizeof(as));
|
||||
r->ip_router.V6[0] = htonll(r->ip_router.V6[0]);
|
||||
r->ip_router.V6[1] = htonll(r->ip_router.V6[1]);
|
||||
inet_ntop(AF_INET6, &r->ip_router.V6, as, sizeof(as));
|
||||
if ( ! long_v6 ) {
|
||||
condense_v6(as);
|
||||
}
|
||||
@ -1139,10 +1148,10 @@ extension_map_t *extension_map = r->map_ref;
|
||||
case EX_NSEL_XLATE_IP_v4:
|
||||
as[0] = 0;
|
||||
ds[0] = 0;
|
||||
r->xlate_src_ip.v4 = htonl(r->xlate_src_ip.v4);
|
||||
r->xlate_dst_ip.v4 = htonl(r->xlate_dst_ip.v4);
|
||||
inet_ntop(AF_INET, &r->xlate_src_ip.v4, as, sizeof(as));
|
||||
inet_ntop(AF_INET, &r->xlate_dst_ip.v4, ds, sizeof(ds));
|
||||
r->xlate_src_ip.V4 = htonl(r->xlate_src_ip.V4);
|
||||
r->xlate_dst_ip.V4 = htonl(r->xlate_dst_ip.V4);
|
||||
inet_ntop(AF_INET, &r->xlate_src_ip.V4, as, sizeof(as));
|
||||
inet_ntop(AF_INET, &r->xlate_dst_ip.V4, ds, sizeof(ds));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
ds[IP_STRING_LEN-1] = 0;
|
||||
|
||||
@ -1157,12 +1166,12 @@ extension_map_t *extension_map = r->map_ref;
|
||||
case EX_NSEL_XLATE_IP_v6:
|
||||
as[0] = 0;
|
||||
ds[0] = 0;
|
||||
r->xlate_src_ip.v6[0] = htonll(r->xlate_src_ip.v6[0]);
|
||||
r->xlate_src_ip.v6[1] = htonll(r->xlate_src_ip.v6[1]);
|
||||
r->xlate_dst_ip.v6[0] = htonll(r->xlate_dst_ip.v6[0]);
|
||||
r->xlate_dst_ip.v6[1] = htonll(r->xlate_dst_ip.v6[1]);
|
||||
inet_ntop(AF_INET6, &r->xlate_src_ip.v6, as, sizeof(as));
|
||||
inet_ntop(AF_INET6, &r->xlate_dst_ip.v6, ds, sizeof(ds));
|
||||
r->xlate_src_ip.V6[0] = htonll(r->xlate_src_ip.V6[0]);
|
||||
r->xlate_src_ip.V6[1] = htonll(r->xlate_src_ip.V6[1]);
|
||||
r->xlate_dst_ip.V6[0] = htonll(r->xlate_dst_ip.V6[0]);
|
||||
r->xlate_dst_ip.V6[1] = htonll(r->xlate_dst_ip.V6[1]);
|
||||
inet_ntop(AF_INET6, &r->xlate_src_ip.V6, as, sizeof(as));
|
||||
inet_ntop(AF_INET6, &r->xlate_dst_ip.V6, ds, sizeof(ds));
|
||||
if ( ! long_v6 ) {
|
||||
condense_v6(as);
|
||||
condense_v6(ds);
|
||||
@ -1223,15 +1232,15 @@ master_record_t *r = (master_record_t *)record;
|
||||
}
|
||||
|
||||
// Make sure Endian does not screw us up
|
||||
sa[0] = ( r->v6.srcaddr[0] >> 32 ) & 0xffffffffLL;
|
||||
sa[1] = r->v6.srcaddr[0] & 0xffffffffLL;
|
||||
sa[2] = ( r->v6.srcaddr[1] >> 32 ) & 0xffffffffLL;
|
||||
sa[3] = r->v6.srcaddr[1] & 0xffffffffLL;
|
||||
sa[0] = ( r->V6.srcaddr[0] >> 32 ) & 0xffffffffLL;
|
||||
sa[1] = r->V6.srcaddr[0] & 0xffffffffLL;
|
||||
sa[2] = ( r->V6.srcaddr[1] >> 32 ) & 0xffffffffLL;
|
||||
sa[3] = r->V6.srcaddr[1] & 0xffffffffLL;
|
||||
|
||||
da[0] = ( r->v6.dstaddr[0] >> 32 ) & 0xffffffffLL;
|
||||
da[1] = r->v6.dstaddr[0] & 0xffffffffLL;
|
||||
da[2] = ( r->v6.dstaddr[1] >> 32 ) & 0xffffffffLL;
|
||||
da[3] = r->v6.dstaddr[1] & 0xffffffffLL;
|
||||
da[0] = ( r->V6.dstaddr[0] >> 32 ) & 0xffffffffLL;
|
||||
da[1] = r->V6.dstaddr[0] & 0xffffffffLL;
|
||||
da[2] = ( r->V6.dstaddr[1] >> 32 ) & 0xffffffffLL;
|
||||
da[3] = r->V6.dstaddr[1] & 0xffffffffLL;
|
||||
|
||||
snprintf(data_string, STRINGSIZE-1 ,"%i|%u|%u|%u|%u|%u|%u|%u|%u|%u|%u|%u|%u|%u|%u|%u|%u|%u|%u|%u|%u|%u|%llu|%llu",
|
||||
af, r->first, r->msec_first ,r->last, r->msec_last, r->prot,
|
||||
@ -1261,16 +1270,16 @@ master_record_t *r = (master_record_t *)record;
|
||||
uint64_t dnet[2];
|
||||
|
||||
// remember IPs for network
|
||||
snet[0] = r->v6.srcaddr[0];
|
||||
snet[1] = r->v6.srcaddr[1];
|
||||
dnet[0] = r->v6.dstaddr[0];
|
||||
dnet[1] = r->v6.dstaddr[1];
|
||||
r->v6.srcaddr[0] = htonll(r->v6.srcaddr[0]);
|
||||
r->v6.srcaddr[1] = htonll(r->v6.srcaddr[1]);
|
||||
r->v6.dstaddr[0] = htonll(r->v6.dstaddr[0]);
|
||||
r->v6.dstaddr[1] = htonll(r->v6.dstaddr[1]);
|
||||
inet_ntop(AF_INET6, r->v6.srcaddr, as, sizeof(as));
|
||||
inet_ntop(AF_INET6, r->v6.dstaddr, ds, sizeof(ds));
|
||||
snet[0] = r->V6.srcaddr[0];
|
||||
snet[1] = r->V6.srcaddr[1];
|
||||
dnet[0] = r->V6.dstaddr[0];
|
||||
dnet[1] = r->V6.dstaddr[1];
|
||||
r->V6.srcaddr[0] = htonll(r->V6.srcaddr[0]);
|
||||
r->V6.srcaddr[1] = htonll(r->V6.srcaddr[1]);
|
||||
r->V6.dstaddr[0] = htonll(r->V6.dstaddr[0]);
|
||||
r->V6.dstaddr[1] = htonll(r->V6.dstaddr[1]);
|
||||
inet_ntop(AF_INET6, r->V6.srcaddr, as, sizeof(as));
|
||||
inet_ntop(AF_INET6, r->V6.dstaddr, ds, sizeof(ds));
|
||||
|
||||
if ( r->src_mask || r->dst_mask) {
|
||||
if ( r->src_mask > 64 )
|
||||
@ -1300,12 +1309,12 @@ master_record_t *r = (master_record_t *)record;
|
||||
|
||||
} else { // IPv4
|
||||
uint32_t snet, dnet;
|
||||
snet = r->v4.srcaddr;
|
||||
dnet = r->v4.dstaddr;
|
||||
r->v4.srcaddr = htonl(r->v4.srcaddr);
|
||||
r->v4.dstaddr = htonl(r->v4.dstaddr);
|
||||
inet_ntop(AF_INET, &r->v4.srcaddr, as, sizeof(as));
|
||||
inet_ntop(AF_INET, &r->v4.dstaddr, ds, sizeof(ds));
|
||||
snet = r->V4.srcaddr;
|
||||
dnet = r->V4.dstaddr;
|
||||
r->V4.srcaddr = htonl(r->V4.srcaddr);
|
||||
r->V4.dstaddr = htonl(r->V4.dstaddr);
|
||||
inet_ntop(AF_INET, &r->V4.srcaddr, as, sizeof(as));
|
||||
inet_ntop(AF_INET, &r->V4.dstaddr, ds, sizeof(ds));
|
||||
if ( r->src_mask || r->dst_mask) {
|
||||
snet &= 0xffffffffL << ( 32 - r->src_mask );
|
||||
snet = htonl(snet);
|
||||
@ -1384,9 +1393,9 @@ master_record_t *r = (master_record_t *)record;
|
||||
if ( (r->flags & FLAG_IPV6_NH ) != 0 ) { // IPv6
|
||||
// EX_NEXT_HOP_v6:
|
||||
as[0] = 0;
|
||||
r->ip_nexthop.v6[0] = htonll(r->ip_nexthop.v6[0]);
|
||||
r->ip_nexthop.v6[1] = htonll(r->ip_nexthop.v6[1]);
|
||||
inet_ntop(AF_INET6, r->ip_nexthop.v6, as, sizeof(as));
|
||||
r->ip_nexthop.V6[0] = htonll(r->ip_nexthop.V6[0]);
|
||||
r->ip_nexthop.V6[1] = htonll(r->ip_nexthop.V6[1]);
|
||||
inet_ntop(AF_INET6, r->ip_nexthop.V6, as, sizeof(as));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
|
||||
snprintf(_s, slen-1, ",%s", as);
|
||||
@ -1397,8 +1406,8 @@ master_record_t *r = (master_record_t *)record;
|
||||
} else {
|
||||
// EX_NEXT_HOP_v4:
|
||||
as[0] = 0;
|
||||
r->ip_nexthop.v4 = htonl(r->ip_nexthop.v4);
|
||||
inet_ntop(AF_INET, &r->ip_nexthop.v4, as, sizeof(as));
|
||||
r->ip_nexthop.V4 = htonl(r->ip_nexthop.V4);
|
||||
inet_ntop(AF_INET, &r->ip_nexthop.V4, as, sizeof(as));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
|
||||
snprintf(_s, slen-1, ",%s", as);
|
||||
@ -1410,9 +1419,9 @@ master_record_t *r = (master_record_t *)record;
|
||||
if ( (r->flags & FLAG_IPV6_NH ) != 0 ) { // IPv6
|
||||
// EX_NEXT_HOP_BGP_v6:
|
||||
as[0] = 0;
|
||||
r->bgp_nexthop.v6[0] = htonll(r->bgp_nexthop.v6[0]);
|
||||
r->bgp_nexthop.v6[1] = htonll(r->bgp_nexthop.v6[1]);
|
||||
inet_ntop(AF_INET6, r->ip_nexthop.v6, as, sizeof(as));
|
||||
r->bgp_nexthop.V6[0] = htonll(r->bgp_nexthop.V6[0]);
|
||||
r->bgp_nexthop.V6[1] = htonll(r->bgp_nexthop.V6[1]);
|
||||
inet_ntop(AF_INET6, r->ip_nexthop.V6, as, sizeof(as));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
|
||||
snprintf(_s, slen-1, ",%s", as);
|
||||
@ -1423,8 +1432,8 @@ master_record_t *r = (master_record_t *)record;
|
||||
} else {
|
||||
// EX_NEXT_HOP_BGP_v4:
|
||||
as[0] = 0;
|
||||
r->bgp_nexthop.v4 = htonl(r->bgp_nexthop.v4);
|
||||
inet_ntop(AF_INET, &r->bgp_nexthop.v4, as, sizeof(as));
|
||||
r->bgp_nexthop.V4 = htonl(r->bgp_nexthop.V4);
|
||||
inet_ntop(AF_INET, &r->bgp_nexthop.V4, as, sizeof(as));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
|
||||
snprintf(_s, slen-1, ",%s", as);
|
||||
@ -1519,9 +1528,9 @@ master_record_t *r = (master_record_t *)record;
|
||||
if ( (r->flags & FLAG_IPV6_EXP ) != 0 ) { // IPv6
|
||||
// EX_NEXT_HOP_v6:
|
||||
as[0] = 0;
|
||||
r->ip_router.v6[0] = htonll(r->ip_router.v6[0]);
|
||||
r->ip_router.v6[1] = htonll(r->ip_router.v6[1]);
|
||||
inet_ntop(AF_INET6, r->ip_router.v6, as, sizeof(as));
|
||||
r->ip_router.V6[0] = htonll(r->ip_router.V6[0]);
|
||||
r->ip_router.V6[1] = htonll(r->ip_router.V6[1]);
|
||||
inet_ntop(AF_INET6, r->ip_router.V6, as, sizeof(as));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
|
||||
snprintf(_s, slen-1, ",%s", as);
|
||||
@ -1532,8 +1541,8 @@ master_record_t *r = (master_record_t *)record;
|
||||
} else {
|
||||
// EX_NEXT_HOP_v4:
|
||||
as[0] = 0;
|
||||
r->ip_router.v4 = htonl(r->ip_router.v4);
|
||||
inet_ntop(AF_INET, &r->ip_router.v4, as, sizeof(as));
|
||||
r->ip_router.V4 = htonl(r->ip_router.V4);
|
||||
inet_ntop(AF_INET, &r->ip_router.V4, as, sizeof(as));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
|
||||
snprintf(_s, slen-1, ",%s", as);
|
||||
@ -1927,15 +1936,15 @@ char tmp_str[IP_STRING_LEN];
|
||||
if ( (r->flags & FLAG_IPV6_ADDR ) != 0 ) { // IPv6
|
||||
uint64_t ip[2];
|
||||
|
||||
ip[0] = htonll(r->v6.srcaddr[0]);
|
||||
ip[1] = htonll(r->v6.srcaddr[1]);
|
||||
ip[0] = htonll(r->V6.srcaddr[0]);
|
||||
ip[1] = htonll(r->V6.srcaddr[1]);
|
||||
inet_ntop(AF_INET6, ip, tmp_str, sizeof(tmp_str));
|
||||
if ( ! long_v6 ) {
|
||||
condense_v6(tmp_str);
|
||||
}
|
||||
} else { // IPv4
|
||||
uint32_t ip;
|
||||
ip = htonl(r->v4.srcaddr);
|
||||
ip = htonl(r->V4.srcaddr);
|
||||
inet_ntop(AF_INET, &ip, tmp_str, sizeof(tmp_str));
|
||||
}
|
||||
tmp_str[IP_STRING_LEN-1] = 0;
|
||||
@ -1956,8 +1965,8 @@ char tmp_str[IP_STRING_LEN], portchar;
|
||||
if ( (r->flags & FLAG_IPV6_ADDR ) != 0 ) { // IPv6
|
||||
uint64_t ip[2];
|
||||
|
||||
ip[0] = htonll(r->v6.srcaddr[0]);
|
||||
ip[1] = htonll(r->v6.srcaddr[1]);
|
||||
ip[0] = htonll(r->V6.srcaddr[0]);
|
||||
ip[1] = htonll(r->V6.srcaddr[1]);
|
||||
inet_ntop(AF_INET6, ip, tmp_str, sizeof(tmp_str));
|
||||
if ( ! long_v6 ) {
|
||||
condense_v6(tmp_str);
|
||||
@ -1965,7 +1974,7 @@ char tmp_str[IP_STRING_LEN], portchar;
|
||||
portchar = '.';
|
||||
} else { // IPv4
|
||||
uint32_t ip;
|
||||
ip = htonl(r->v4.srcaddr);
|
||||
ip = htonl(r->V4.srcaddr);
|
||||
inet_ntop(AF_INET, &ip, tmp_str, sizeof(tmp_str));
|
||||
portchar = ':';
|
||||
}
|
||||
@ -1987,15 +1996,15 @@ char tmp_str[IP_STRING_LEN];
|
||||
if ( (r->flags & FLAG_IPV6_ADDR ) != 0 ) { // IPv6
|
||||
uint64_t ip[2];
|
||||
|
||||
ip[0] = htonll(r->v6.dstaddr[0]);
|
||||
ip[1] = htonll(r->v6.dstaddr[1]);
|
||||
ip[0] = htonll(r->V6.dstaddr[0]);
|
||||
ip[1] = htonll(r->V6.dstaddr[1]);
|
||||
inet_ntop(AF_INET6, ip, tmp_str, sizeof(tmp_str));
|
||||
if ( ! long_v6 ) {
|
||||
condense_v6(tmp_str);
|
||||
}
|
||||
} else { // IPv4
|
||||
uint32_t ip;
|
||||
ip = htonl(r->v4.dstaddr);
|
||||
ip = htonl(r->V4.dstaddr);
|
||||
inet_ntop(AF_INET, &ip, tmp_str, sizeof(tmp_str));
|
||||
}
|
||||
tmp_str[IP_STRING_LEN-1] = 0;
|
||||
@ -2017,15 +2026,15 @@ char tmp_str[IP_STRING_LEN];
|
||||
if ( (r->flags & FLAG_IPV6_NH ) != 0 ) { // IPv6
|
||||
uint64_t ip[2];
|
||||
|
||||
ip[0] = htonll(r->ip_nexthop.v6[0]);
|
||||
ip[1] = htonll(r->ip_nexthop.v6[1]);
|
||||
ip[0] = htonll(r->ip_nexthop.V6[0]);
|
||||
ip[1] = htonll(r->ip_nexthop.V6[1]);
|
||||
inet_ntop(AF_INET6, ip, tmp_str, sizeof(tmp_str));
|
||||
if ( ! long_v6 ) {
|
||||
condense_v6(tmp_str);
|
||||
}
|
||||
} else { // IPv4
|
||||
uint32_t ip;
|
||||
ip = htonl(r->ip_nexthop.v4);
|
||||
ip = htonl(r->ip_nexthop.V4);
|
||||
inet_ntop(AF_INET, &ip, tmp_str, sizeof(tmp_str));
|
||||
}
|
||||
tmp_str[IP_STRING_LEN-1] = 0;
|
||||
@ -2046,15 +2055,15 @@ char tmp_str[IP_STRING_LEN];
|
||||
if ( (r->flags & FLAG_IPV6_NH ) != 0 ) { // IPv6
|
||||
uint64_t ip[2];
|
||||
|
||||
ip[0] = htonll(r->bgp_nexthop.v6[0]);
|
||||
ip[1] = htonll(r->bgp_nexthop.v6[1]);
|
||||
ip[0] = htonll(r->bgp_nexthop.V6[0]);
|
||||
ip[1] = htonll(r->bgp_nexthop.V6[1]);
|
||||
inet_ntop(AF_INET6, ip, tmp_str, sizeof(tmp_str));
|
||||
if ( ! long_v6 ) {
|
||||
condense_v6(tmp_str);
|
||||
}
|
||||
} else { // IPv4
|
||||
uint32_t ip;
|
||||
ip = htonl(r->bgp_nexthop.v4);
|
||||
ip = htonl(r->bgp_nexthop.V4);
|
||||
inet_ntop(AF_INET, &ip, tmp_str, sizeof(tmp_str));
|
||||
}
|
||||
tmp_str[IP_STRING_LEN-1] = 0;
|
||||
@ -2075,15 +2084,15 @@ char tmp_str[IP_STRING_LEN];
|
||||
if ( (r->flags & FLAG_IPV6_EXP ) != 0 ) { // IPv6
|
||||
uint64_t ip[2];
|
||||
|
||||
ip[0] = htonll(r->ip_router.v6[0]);
|
||||
ip[1] = htonll(r->ip_router.v6[1]);
|
||||
ip[0] = htonll(r->ip_router.V6[0]);
|
||||
ip[1] = htonll(r->ip_router.V6[1]);
|
||||
inet_ntop(AF_INET6, ip, tmp_str, sizeof(tmp_str));
|
||||
if ( ! long_v6 ) {
|
||||
condense_v6(tmp_str);
|
||||
}
|
||||
} else { // IPv4
|
||||
uint32_t ip;
|
||||
ip = htonl(r->ip_router.v4);
|
||||
ip = htonl(r->ip_router.V4);
|
||||
inet_ntop(AF_INET, &ip, tmp_str, sizeof(tmp_str));
|
||||
}
|
||||
tmp_str[IP_STRING_LEN-1] = 0;
|
||||
@ -2106,8 +2115,8 @@ char icmp_port[MAX_STRING_LENGTH];
|
||||
if ( (r->flags & FLAG_IPV6_ADDR ) != 0 ) { // IPv6
|
||||
uint64_t ip[2];
|
||||
|
||||
ip[0] = htonll(r->v6.dstaddr[0]);
|
||||
ip[1] = htonll(r->v6.dstaddr[1]);
|
||||
ip[0] = htonll(r->V6.dstaddr[0]);
|
||||
ip[1] = htonll(r->V6.dstaddr[1]);
|
||||
inet_ntop(AF_INET6, ip, tmp_str, sizeof(tmp_str));
|
||||
if ( ! long_v6 ) {
|
||||
condense_v6(tmp_str);
|
||||
@ -2115,7 +2124,7 @@ char icmp_port[MAX_STRING_LENGTH];
|
||||
portchar = '.';
|
||||
} else { // IPv4
|
||||
uint32_t ip;
|
||||
ip = htonl(r->v4.dstaddr);
|
||||
ip = htonl(r->V4.dstaddr);
|
||||
inet_ntop(AF_INET, &ip, tmp_str, sizeof(tmp_str));
|
||||
portchar = ':';
|
||||
}
|
||||
@ -2140,15 +2149,15 @@ char tmp_str[IP_STRING_LEN];
|
||||
if ( (r->flags & FLAG_IPV6_ADDR ) != 0 ) { // IPv6
|
||||
uint64_t ip[2];
|
||||
|
||||
ip[0] = htonll(r->v6.srcaddr[0]);
|
||||
ip[1] = htonll(r->v6.srcaddr[1]);
|
||||
ip[0] = htonll(r->V6.srcaddr[0]);
|
||||
ip[1] = htonll(r->V6.srcaddr[1]);
|
||||
inet_ntop(AF_INET6, ip, tmp_str, sizeof(tmp_str));
|
||||
if ( ! long_v6 ) {
|
||||
condense_v6(tmp_str);
|
||||
}
|
||||
} else { // IPv4
|
||||
uint32_t ip;
|
||||
ip = htonl(r->v4.srcaddr);
|
||||
ip = htonl(r->V4.srcaddr);
|
||||
inet_ntop(AF_INET, &ip, tmp_str, sizeof(tmp_str));
|
||||
}
|
||||
tmp_str[IP_STRING_LEN-1] = 0;
|
||||
@ -2171,15 +2180,15 @@ char tmp_str[IP_STRING_LEN];
|
||||
if ( (r->flags & FLAG_IPV6_ADDR ) != 0 ) { // IPv6
|
||||
uint64_t ip[2];
|
||||
|
||||
ip[0] = htonll(r->v6.dstaddr[0]);
|
||||
ip[1] = htonll(r->v6.dstaddr[1]);
|
||||
ip[0] = htonll(r->V6.dstaddr[0]);
|
||||
ip[1] = htonll(r->V6.dstaddr[1]);
|
||||
inet_ntop(AF_INET6, ip, tmp_str, sizeof(tmp_str));
|
||||
if ( ! long_v6 ) {
|
||||
condense_v6(tmp_str);
|
||||
}
|
||||
} else { // IPv4
|
||||
uint32_t ip;
|
||||
ip = htonl(r->v4.dstaddr);
|
||||
ip = htonl(r->V4.dstaddr);
|
||||
inet_ntop(AF_INET, &ip, tmp_str, sizeof(tmp_str));
|
||||
}
|
||||
tmp_str[IP_STRING_LEN-1] = 0;
|
||||
@ -2380,7 +2389,7 @@ static void String_Flags(master_record_t *r, char *string) {
|
||||
|
||||
// if record contains unusuall flags, print the flags in hex as 0x.. number
|
||||
if ( r->tcp_flags > 63 ) {
|
||||
snprintf(string, 7, " 0x%2x\n", r->tcp_flags );
|
||||
snprintf(string, 7, " 0x%2x", r->tcp_flags );
|
||||
} else {
|
||||
string[0] = r->tcp_flags & 32 ? 'U' : '.';
|
||||
string[1] = r->tcp_flags & 16 ? 'A' : '.';
|
||||
@ -2546,6 +2555,17 @@ static void String_Engine(master_record_t *r, char *string) {
|
||||
|
||||
} // End of String_Engine
|
||||
|
||||
static void String_Label(master_record_t *r, char *string) {
|
||||
|
||||
if ( r->label )
|
||||
snprintf(string, MAX_STRING_LENGTH-1 ,"%16s", r->label);
|
||||
else
|
||||
snprintf(string, MAX_STRING_LENGTH-1 ,"<none>");
|
||||
|
||||
string[MAX_STRING_LENGTH-1] = '\0';
|
||||
|
||||
} // End of String_Label
|
||||
|
||||
static void String_ClientLatency(master_record_t *r, char *string) {
|
||||
double latency;
|
||||
|
||||
@ -2737,15 +2757,15 @@ char tmp_str[IP_STRING_LEN];
|
||||
if ( (r->xlate_flags & 1 ) != 0 ) { // IPv6
|
||||
uint64_t ip[2];
|
||||
|
||||
ip[0] = htonll(r->xlate_src_ip.v6[0]);
|
||||
ip[1] = htonll(r->xlate_src_ip.v6[1]);
|
||||
ip[0] = htonll(r->xlate_src_ip.V6[0]);
|
||||
ip[1] = htonll(r->xlate_src_ip.V6[1]);
|
||||
inet_ntop(AF_INET6, ip, tmp_str, sizeof(tmp_str));
|
||||
if ( ! long_v6 ) {
|
||||
condense_v6(tmp_str);
|
||||
}
|
||||
} else { // IPv4
|
||||
uint32_t ip;
|
||||
ip = htonl(r->xlate_src_ip.v4);
|
||||
ip = htonl(r->xlate_src_ip.V4);
|
||||
inet_ntop(AF_INET, &ip, tmp_str, sizeof(tmp_str));
|
||||
}
|
||||
tmp_str[IP_STRING_LEN-1] = 0;
|
||||
@ -2765,15 +2785,15 @@ char tmp_str[IP_STRING_LEN];
|
||||
if ( (r->xlate_flags & 1 ) != 0 ) { // IPv6
|
||||
uint64_t ip[2];
|
||||
|
||||
ip[0] = htonll(r->xlate_dst_ip.v6[0]);
|
||||
ip[1] = htonll(r->xlate_dst_ip.v6[1]);
|
||||
ip[0] = htonll(r->xlate_dst_ip.V6[0]);
|
||||
ip[1] = htonll(r->xlate_dst_ip.V6[1]);
|
||||
inet_ntop(AF_INET6, ip, tmp_str, sizeof(tmp_str));
|
||||
if ( ! long_v6 ) {
|
||||
condense_v6(tmp_str);
|
||||
}
|
||||
} else { // IPv4
|
||||
uint32_t ip;
|
||||
ip = htonl(r->xlate_dst_ip.v4);
|
||||
ip = htonl(r->xlate_dst_ip.V4);
|
||||
inet_ntop(AF_INET, &ip, tmp_str, sizeof(tmp_str));
|
||||
}
|
||||
tmp_str[IP_STRING_LEN-1] = 0;
|
||||
@ -2807,8 +2827,8 @@ char tmp_str[IP_STRING_LEN], portchar;
|
||||
if ( (r->xlate_flags & 1 ) != 0 ) { // IPv6
|
||||
uint64_t ip[2];
|
||||
|
||||
ip[0] = htonll(r->xlate_src_ip.v6[0]);
|
||||
ip[1] = htonll(r->xlate_src_ip.v6[1]);
|
||||
ip[0] = htonll(r->xlate_src_ip.V6[0]);
|
||||
ip[1] = htonll(r->xlate_src_ip.V6[1]);
|
||||
inet_ntop(AF_INET6, ip, tmp_str, sizeof(tmp_str));
|
||||
if ( ! long_v6 ) {
|
||||
condense_v6(tmp_str);
|
||||
@ -2817,7 +2837,7 @@ char tmp_str[IP_STRING_LEN], portchar;
|
||||
portchar = '.';
|
||||
} else { // IPv4
|
||||
uint32_t ip;
|
||||
ip = htonl(r->xlate_src_ip.v4);
|
||||
ip = htonl(r->xlate_src_ip.V4);
|
||||
inet_ntop(AF_INET, &ip, tmp_str, sizeof(tmp_str));
|
||||
|
||||
portchar = ':';
|
||||
@ -2840,8 +2860,8 @@ char tmp_str[IP_STRING_LEN], portchar;
|
||||
if ( (r->xlate_flags & 1 ) != 0 ) { // IPv6
|
||||
uint64_t ip[2];
|
||||
|
||||
ip[0] = htonll(r->xlate_dst_ip.v6[0]);
|
||||
ip[1] = htonll(r->xlate_dst_ip.v6[1]);
|
||||
ip[0] = htonll(r->xlate_dst_ip.V6[0]);
|
||||
ip[1] = htonll(r->xlate_dst_ip.V6[1]);
|
||||
inet_ntop(AF_INET6, ip, tmp_str, sizeof(tmp_str));
|
||||
if ( ! long_v6 ) {
|
||||
condense_v6(tmp_str);
|
||||
@ -2850,7 +2870,7 @@ char tmp_str[IP_STRING_LEN], portchar;
|
||||
portchar = '.';
|
||||
} else { // IPv4
|
||||
uint32_t ip;
|
||||
ip = htonl(r->xlate_dst_ip.v4);
|
||||
ip = htonl(r->xlate_dst_ip.V4);
|
||||
inet_ntop(AF_INET, &ip, tmp_str, sizeof(tmp_str));
|
||||
|
||||
portchar = ':';
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,18 +29,18 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nf_common.h 39 2009-11-25 08:11:15Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 39 $
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NF_COMMON_H
|
||||
#define _NF_COMMON_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
|
||||
typedef void (*printer_t)(void *, char **, int);
|
||||
|
||||
|
64
bin/nfanon.c
64
bin/nfanon.c
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,13 +29,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id:$
|
||||
*
|
||||
* $LastChangedRevision: 48 $
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -106,18 +100,18 @@ int i;
|
||||
if ( (master_record->flags & FLAG_IPV6_ADDR) != 0 ) { // IPv6
|
||||
// IPv6
|
||||
uint64_t anon_ip[2];
|
||||
anonymize_v6(master_record->v6.srcaddr, anon_ip);
|
||||
master_record->v6.srcaddr[0] = anon_ip[0];
|
||||
master_record->v6.srcaddr[1] = anon_ip[1];
|
||||
anonymize_v6(master_record->V6.srcaddr, anon_ip);
|
||||
master_record->V6.srcaddr[0] = anon_ip[0];
|
||||
master_record->V6.srcaddr[1] = anon_ip[1];
|
||||
|
||||
anonymize_v6(master_record->v6.dstaddr, anon_ip);
|
||||
master_record->v6.dstaddr[0] = anon_ip[0];
|
||||
master_record->v6.dstaddr[1] = anon_ip[1];
|
||||
anonymize_v6(master_record->V6.dstaddr, anon_ip);
|
||||
master_record->V6.dstaddr[0] = anon_ip[0];
|
||||
master_record->V6.dstaddr[1] = anon_ip[1];
|
||||
|
||||
} else {
|
||||
// IPv4
|
||||
master_record->v4.srcaddr = anonymize(master_record->v4.srcaddr);
|
||||
master_record->v4.dstaddr = anonymize(master_record->v4.dstaddr);
|
||||
master_record->V4.srcaddr = anonymize(master_record->V4.srcaddr);
|
||||
master_record->V4.dstaddr = anonymize(master_record->V4.dstaddr);
|
||||
}
|
||||
|
||||
// Process optional extensions
|
||||
@ -133,45 +127,45 @@ int i;
|
||||
master_record->dstas = 0;
|
||||
break;
|
||||
case EX_NEXT_HOP_v4:
|
||||
master_record->ip_nexthop.v4 = anonymize(master_record->ip_nexthop.v4);
|
||||
master_record->ip_nexthop.V4 = anonymize(master_record->ip_nexthop.V4);
|
||||
break;
|
||||
case EX_NEXT_HOP_v6: {
|
||||
uint64_t anon_ip[2];
|
||||
anonymize_v6(master_record->ip_nexthop.v6, anon_ip);
|
||||
master_record->ip_nexthop.v6[0] = anon_ip[0];
|
||||
master_record->ip_nexthop.v6[1] = anon_ip[1];
|
||||
anonymize_v6(master_record->ip_nexthop.V6, anon_ip);
|
||||
master_record->ip_nexthop.V6[0] = anon_ip[0];
|
||||
master_record->ip_nexthop.V6[1] = anon_ip[1];
|
||||
} break;
|
||||
case EX_NEXT_HOP_BGP_v4:
|
||||
master_record->bgp_nexthop.v4 = anonymize(master_record->bgp_nexthop.v4);
|
||||
master_record->bgp_nexthop.V4 = anonymize(master_record->bgp_nexthop.V4);
|
||||
break;
|
||||
case EX_NEXT_HOP_BGP_v6: {
|
||||
uint64_t anon_ip[2];
|
||||
anonymize_v6(master_record->bgp_nexthop.v6, anon_ip);
|
||||
master_record->bgp_nexthop.v6[0] = anon_ip[0];
|
||||
master_record->bgp_nexthop.v6[1] = anon_ip[1];
|
||||
anonymize_v6(master_record->bgp_nexthop.V6, anon_ip);
|
||||
master_record->bgp_nexthop.V6[0] = anon_ip[0];
|
||||
master_record->bgp_nexthop.V6[1] = anon_ip[1];
|
||||
} break;
|
||||
case EX_ROUTER_IP_v4:
|
||||
master_record->ip_router.v4 = anonymize(master_record->ip_router.v4);
|
||||
master_record->ip_router.V4 = anonymize(master_record->ip_router.V4);
|
||||
break;
|
||||
case EX_ROUTER_IP_v6: {
|
||||
uint64_t anon_ip[2];
|
||||
anonymize_v6(master_record->ip_router.v6, anon_ip);
|
||||
master_record->ip_router.v6[0] = anon_ip[0];
|
||||
master_record->ip_router.v6[1] = anon_ip[1];
|
||||
anonymize_v6(master_record->ip_router.V6, anon_ip);
|
||||
master_record->ip_router.V6[0] = anon_ip[0];
|
||||
master_record->ip_router.V6[1] = anon_ip[1];
|
||||
} break;
|
||||
#ifdef NSEL
|
||||
case EX_NSEL_XLATE_IP_v4:
|
||||
master_record->xlate_src_ip.v4 = anonymize(master_record->xlate_src_ip.v4);
|
||||
master_record->xlate_dst_ip.v4 = anonymize(master_record->xlate_dst_ip.v4);
|
||||
master_record->xlate_src_ip.V4 = anonymize(master_record->xlate_src_ip.V4);
|
||||
master_record->xlate_dst_ip.V4 = anonymize(master_record->xlate_dst_ip.V4);
|
||||
break;
|
||||
case EX_NSEL_XLATE_IP_v6: {
|
||||
uint64_t anon_ip[2];
|
||||
anonymize_v6(master_record->xlate_src_ip.v6, anon_ip);
|
||||
master_record->xlate_src_ip.v6[0] = anon_ip[0];
|
||||
master_record->xlate_src_ip.v6[1] = anon_ip[1];
|
||||
anonymize_v6(master_record->xlate_dst_ip.v6, anon_ip);
|
||||
master_record->xlate_dst_ip.v6[0] = anon_ip[0];
|
||||
master_record->xlate_dst_ip.v6[1] = anon_ip[1];
|
||||
anonymize_v6(master_record->xlate_src_ip.V6, anon_ip);
|
||||
master_record->xlate_src_ip.V6[0] = anon_ip[0];
|
||||
master_record->xlate_src_ip.V6[1] = anon_ip[1];
|
||||
anonymize_v6(master_record->xlate_dst_ip.V6, anon_ip);
|
||||
master_record->xlate_dst_ip.V6[0] = anon_ip[0];
|
||||
master_record->xlate_dst_ip.V6[1] = anon_ip[1];
|
||||
} break;
|
||||
#endif
|
||||
}
|
||||
|
100
bin/nfcapd.c
100
bin/nfcapd.c
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2016, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
@ -29,8 +30,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Author: peter
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -86,7 +85,6 @@
|
||||
#include "flist.h"
|
||||
#include "nfstatfile.h"
|
||||
#include "bookkeeper.h"
|
||||
#include "nfxstat.h"
|
||||
#include "collector.h"
|
||||
#include "exporter.h"
|
||||
#include "netflow_v1.h"
|
||||
@ -148,8 +146,8 @@ static void daemonize(void);
|
||||
|
||||
static void SetPriv(char *userid, char *groupid );
|
||||
|
||||
static void run(packet_function_t receive_packet, int socket, send_peer_t peer,
|
||||
time_t twin, time_t t_begin, int report_seq, int use_subdirs, char *time_extension, int compress, int do_xstat);
|
||||
static void run(packet_function_t receive_packet, int socket, repeater_t *repeater,
|
||||
time_t twin, time_t t_begin, int report_seq, int use_subdirs, char *time_extension, int compress);
|
||||
|
||||
/* Functions */
|
||||
static void usage(char *name) {
|
||||
@ -168,11 +166,12 @@ static void usage(char *name) {
|
||||
"-H Add port histogram data to flow file.(default 'no')\n"
|
||||
"-n Ident,IP,logdir\tAdd this flow source - multiple streams\n"
|
||||
"-P pidfile\tset the PID file\n"
|
||||
"-R IP[/port]\tRepeat incoming packets to IP address/port\n"
|
||||
"-R IP[/port]\tRepeat incoming packets to IP address/port. Max 8 repeaters.\n"
|
||||
"-s rate\tset default sampling rate (default 1)\n"
|
||||
"-x process\tlaunch process after a new file becomes available\n"
|
||||
"-j\t\tBZ2 compress flows in output file.\n"
|
||||
"-z\t\tLZO compress flows in output file.\n"
|
||||
"-y\t\tLZ4 compress flows in output file.\n"
|
||||
"-j\t\tBZ2 compress flows in output file.\n"
|
||||
"-B bufflen\tSet socket buffer to bufflen bytes\n"
|
||||
"-e\t\tExpire data at each cycle.\n"
|
||||
"-D\t\tFork to background\n"
|
||||
@ -359,8 +358,8 @@ int err;
|
||||
#include "nffile_inline.c"
|
||||
#include "collector_inline.c"
|
||||
|
||||
static void run(packet_function_t receive_packet, int socket, send_peer_t peer,
|
||||
time_t twin, time_t t_begin, int report_seq, int use_subdirs, char *time_extension, int compress, int do_xstat) {
|
||||
static void run(packet_function_t receive_packet, int socket, repeater_t *repeater,
|
||||
time_t twin, time_t t_begin, int report_seq, int use_subdirs, char *time_extension, int compress) {
|
||||
common_flow_header_t *nf_header;
|
||||
FlowSource_t *fs;
|
||||
struct sockaddr_storage nf_sender;
|
||||
@ -397,11 +396,6 @@ srecord_t *commbuff;
|
||||
if ( !fs->nffile ) {
|
||||
return;
|
||||
}
|
||||
if ( do_xstat ) {
|
||||
fs->xstat = InitXStat(fs->nffile);
|
||||
if ( !fs->xstat )
|
||||
return;
|
||||
}
|
||||
// init vars
|
||||
fs->bad_packets = 0;
|
||||
fs->first_seen = 0xffffffffffffLL;
|
||||
@ -428,6 +422,7 @@ srecord_t *commbuff;
|
||||
*/
|
||||
while ( 1 ) {
|
||||
struct timeval tv;
|
||||
int i;
|
||||
|
||||
/* read next bunch of data into beginn of input buffer */
|
||||
if ( !done) {
|
||||
@ -449,12 +444,15 @@ srecord_t *commbuff;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( peer.hostname ) {
|
||||
i = 0;
|
||||
while ( repeater[i].hostname && (i < MAX_REPEATERS)) {
|
||||
ssize_t len;
|
||||
len = sendto(peer.sockfd, in_buff, cnt, 0, (struct sockaddr *)&(peer.addr), peer.addrlen);
|
||||
len = sendto(repeater[i].sockfd, in_buff, cnt, 0,
|
||||
(struct sockaddr *)&(repeater[i].addr), repeater[i].addrlen);
|
||||
if ( len < 0 ) {
|
||||
LogError("ERROR: sendto(): %s", strerror(errno));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -527,14 +525,6 @@ srecord_t *commbuff;
|
||||
nffile->stat_record->last_seen = fs->last_seen/1000;
|
||||
nffile->stat_record->msec_last = fs->last_seen - nffile->stat_record->last_seen*1000;
|
||||
|
||||
if ( fs->xstat ) {
|
||||
if ( WriteExtraBlock(nffile, fs->xstat->block_header ) <= 0 )
|
||||
LogError("Ident: %s, failed to write xstat buffer to disk: '%s'" , fs->Ident, strerror(errno));
|
||||
|
||||
ResetPortHistogram(fs->xstat->port_histogram);
|
||||
ResetBppHistogram(fs->xstat->bpp_histogram);
|
||||
}
|
||||
|
||||
// Flush Exporter Stat to file
|
||||
FlushExporterStats(fs);
|
||||
// Close file
|
||||
@ -583,10 +573,6 @@ srecord_t *commbuff;
|
||||
LogError("killed due to fatal error: ident: %s", fs->Ident);
|
||||
break;
|
||||
}
|
||||
/* XXX needs fixing */
|
||||
if ( fs->xstat ) {
|
||||
// to be implemented
|
||||
}
|
||||
}
|
||||
|
||||
// Dump all extension maps and exporters to the buffer
|
||||
@ -763,14 +749,14 @@ char *userid, *groupid, *checkptr, *listenport, *mcastgroup, *extension_tags;
|
||||
char *Ident, *dynsrcdir, *time_extension, pidfile[MAXPATHLEN];
|
||||
struct stat fstat;
|
||||
packet_function_t receive_packet;
|
||||
send_peer_t peer;
|
||||
repeater_t repeater[MAX_REPEATERS];
|
||||
FlowSource_t *fs;
|
||||
struct sigaction act;
|
||||
int family, bufflen;
|
||||
time_t twin, t_start;
|
||||
int sock, synctime, do_daemonize, expire, spec_time_extension, report_sequence, do_xstat;
|
||||
int sock, synctime, do_daemonize, expire, spec_time_extension, report_sequence;
|
||||
int subdir_index, sampling_rate, compress;
|
||||
int c;
|
||||
int c, i;
|
||||
#ifdef PCAP
|
||||
char *pcap_file;
|
||||
|
||||
@ -798,9 +784,10 @@ char *pcap_file;
|
||||
expire = 0;
|
||||
sampling_rate = 1;
|
||||
compress = NOT_COMPRESSED;
|
||||
do_xstat = 0;
|
||||
memset((void *)&peer, 0, sizeof(send_peer_t));
|
||||
peer.family = AF_UNSPEC;
|
||||
memset((void *)&repeater, 0, sizeof(repeater));
|
||||
for ( i = 0; i < MAX_REPEATERS; i++ ) {
|
||||
repeater[i].family = AF_UNSPEC;
|
||||
}
|
||||
Ident = "none";
|
||||
FlowSource = NULL;
|
||||
extension_tags = DefaultExtensions;
|
||||
@ -842,9 +829,6 @@ char *pcap_file;
|
||||
printf("%s: Version: %s\n",argv[0], nfdump_version);
|
||||
exit(0);
|
||||
break;
|
||||
case 'X':
|
||||
do_xstat = 1;
|
||||
break;
|
||||
case 'D':
|
||||
do_daemonize = 1;
|
||||
break;
|
||||
@ -908,14 +892,23 @@ char *pcap_file;
|
||||
pidfile[MAXPATHLEN-1] = 0;
|
||||
break;
|
||||
case 'R': {
|
||||
char *port, *hostname;
|
||||
char *p = strchr(optarg, '/');
|
||||
int i = 0;
|
||||
if ( p ) {
|
||||
*p++ = '\0';
|
||||
peer.port = strdup(p);
|
||||
port = strdup(p);
|
||||
} else {
|
||||
peer.port = DEFAULTCISCOPORT;
|
||||
port = DEFAULTCISCOPORT;
|
||||
}
|
||||
peer.hostname = strdup(optarg);
|
||||
hostname = strdup(optarg);
|
||||
while ( repeater[i].hostname && (i < MAX_REPEATERS) ) i++;
|
||||
if ( i == MAX_REPEATERS ) {
|
||||
fprintf(stderr, "Too many packet repeaters! Max: %i repeaters allowed.\n", MAX_REPEATERS);
|
||||
exit(255);
|
||||
}
|
||||
repeater[i].hostname = hostname;
|
||||
repeater[i].port = port;
|
||||
|
||||
break; }
|
||||
case 'r':
|
||||
@ -972,14 +965,21 @@ char *pcap_file;
|
||||
break;
|
||||
case 'j':
|
||||
if ( compress ) {
|
||||
LogError("Use either -z for LZO or -j for BZ2 compression, but not both\n");
|
||||
LogError("Use one compression: -z for LZO, -j for BZ2 or -y for LZ4 compression\n");
|
||||
exit(255);
|
||||
}
|
||||
compress = BZ2_COMPRESSED;
|
||||
break;
|
||||
case 'y':
|
||||
if ( compress ) {
|
||||
LogError("Use one compression: -z for LZO, -j for BZ2 or -y for LZ4 compression\n");
|
||||
exit(255);
|
||||
}
|
||||
compress = LZ4_COMPRESSED;
|
||||
break;
|
||||
case 'z':
|
||||
if ( compress ) {
|
||||
LogError("Use either -z for LZO or -j for BZ2 compression, but not both\n");
|
||||
LogError("Use one compression: -z for LZO, -j for BZ2 or -y for LZ4 compression\n");
|
||||
exit(255);
|
||||
}
|
||||
compress = LZO_COMPRESSED;
|
||||
@ -1055,12 +1055,14 @@ char *pcap_file;
|
||||
exit(255);
|
||||
}
|
||||
|
||||
if ( peer.hostname ) {
|
||||
peer.sockfd = Unicast_send_socket (peer.hostname, peer.port, peer.family, bufflen,
|
||||
&peer.addr, &peer.addrlen );
|
||||
if ( peer.sockfd <= 0 )
|
||||
i = 0;
|
||||
while ( repeater[i].hostname && (i < MAX_REPEATERS) ) {
|
||||
repeater[i].sockfd = Unicast_send_socket (repeater[i].hostname, repeater[i].port, repeater[i].family, bufflen,
|
||||
&repeater[i].addr, &repeater[i].addrlen );
|
||||
if ( repeater[i].sockfd <= 0 )
|
||||
exit(255);
|
||||
LogInfo("Replay flows to host: %s port: %s", peer.hostname, peer.port);
|
||||
LogInfo("Replay flows to host: %s port: %s", repeater[i].hostname, repeater[i].port);
|
||||
i++;
|
||||
}
|
||||
|
||||
if ( sampling_rate < 0 ) {
|
||||
@ -1220,8 +1222,8 @@ char *pcap_file;
|
||||
sigaction(SIGCHLD, &act, NULL);
|
||||
|
||||
LogInfo("Startup.");
|
||||
run(receive_packet, sock, peer, twin, t_start, report_sequence, subdir_index,
|
||||
time_extension, compress, do_xstat);
|
||||
run(receive_packet, sock, repeater, twin, t_start, report_sequence, subdir_index,
|
||||
time_extension, compress);
|
||||
close(sock);
|
||||
kill_launcher(launcher_pid);
|
||||
|
||||
|
96
bin/nfdump.c
96
bin/nfdump.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2018, 2017 Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
* All rights reserved.
|
||||
@ -28,13 +28,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nfdump.c 69 2010-09-09 07:17:43Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 69 $
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -63,10 +56,10 @@
|
||||
#include "nfx.h"
|
||||
#include "nfnet.h"
|
||||
#include "bookkeeper.h"
|
||||
#include "nfxstat.h"
|
||||
#include "collector.h"
|
||||
#include "exporter.h"
|
||||
#include "nf_common.h"
|
||||
#include "output_json.h"
|
||||
#include "netflow_v5_v7.h"
|
||||
#include "netflow_v9.h"
|
||||
#include "rbtree.h"
|
||||
@ -232,6 +225,7 @@ printmap_t printmap[] = {
|
||||
{ "biline", format_special, FORMAT_biline },
|
||||
{ "bilong", format_special, FORMAT_bilong },
|
||||
{ "pipe", flow_record_to_pipe, NULL },
|
||||
{ "json", flow_record_to_json, NULL },
|
||||
{ "csv", flow_record_to_csv, NULL },
|
||||
{ "null", flow_record_to_null, NULL },
|
||||
#ifdef NSEL
|
||||
@ -259,7 +253,7 @@ static void PrintSummary(stat_record_t *stat_record, int plain_numbers, int csv_
|
||||
|
||||
static stat_record_t process_data(char *wfile, int element_stat, int flow_stat, int sort_flows,
|
||||
printer_t print_header, printer_t print_record, time_t twin_start, time_t twin_end,
|
||||
uint64_t limitflows, int tag, int compress, int do_xstat);
|
||||
uint64_t limitflows, int tag, int compress);
|
||||
|
||||
/* Functions */
|
||||
|
||||
@ -285,11 +279,11 @@ static void usage(char *name) {
|
||||
"-s <expr>[/<order>]\tGenerate statistics for <expr> any valid record element.\n"
|
||||
"\t\tand ordered by <order>: packets, bytes, flows, bps pps and bpp.\n"
|
||||
"-q\t\tQuiet: Do not print the header and bottom stat lines.\n"
|
||||
"-H Add xstat histogram data to flow file.(default 'no')\n"
|
||||
"-i <ident>\tChange Ident to <ident> in file given by -r.\n"
|
||||
"-J <num>\tModify file compression: 0: uncompressed - 1: LZO compressed - 2: BZ2 compressed.\n"
|
||||
"-z\t\tlzo compress flows in output file. Used in combination with -w.\n"
|
||||
"-j\t\tbz2 compress flows in output file. Used in combination with -w.\n"
|
||||
"-J <num>\tModify file compression: 0: uncompressed - 1: LZO - 2: BZ2 - 3: LZ4 compressed.\n"
|
||||
"-z\t\tLZO compress flows in output file. Used in combination with -w.\n"
|
||||
"-y\t\tLZ4 compress flows in output file. Used in combination with -w.\n"
|
||||
"-j\t\tBZ2 compress flows in output file. Used in combination with -w.\n"
|
||||
"-l <expr>\tSet limit on packets for line and packed output format.\n"
|
||||
"\t\tkey: 32 character string or 64 digit hex string starting with 0x.\n"
|
||||
"-L <expr>\tSet limit on bytes for line and packed output format.\n"
|
||||
@ -309,6 +303,7 @@ static void usage(char *name) {
|
||||
"\t\t long Standard output line format with additional fields.\n"
|
||||
"\t\t extended Even more information.\n"
|
||||
"\t\t csv ',' separated, machine parseable output format.\n"
|
||||
"\t\t json json output format.\n"
|
||||
"\t\t pipe '|' separated legacy machine parseable output format.\n"
|
||||
"\t\t\tmode may be extended by '6' for full IPv6 listing. e.g.long6, extended6.\n"
|
||||
"-E <file>\tPrint exporter ans sampling info for collected flows.\n"
|
||||
@ -353,11 +348,11 @@ char bps_str[NUMBER_STRING_SIZE], pps_str[NUMBER_STRING_SIZE], bpp_str[NUMBER_
|
||||
(long long unsigned)stat_record->numpackets, (long long unsigned)bps,
|
||||
(long long unsigned)pps, (long long unsigned)bpp );
|
||||
} else {
|
||||
format_number(stat_record->numbytes, byte_str, DONT_SCALE_NUMBER, VAR_LENGTH);
|
||||
format_number(stat_record->numpackets, packet_str, DONT_SCALE_NUMBER, VAR_LENGTH);
|
||||
format_number(bps, bps_str, DONT_SCALE_NUMBER, VAR_LENGTH);
|
||||
format_number(pps, pps_str, DONT_SCALE_NUMBER, VAR_LENGTH);
|
||||
format_number(bpp, bpp_str, DONT_SCALE_NUMBER, VAR_LENGTH);
|
||||
format_number(stat_record->numbytes, byte_str, DO_SCALE_NUMBER, VAR_LENGTH);
|
||||
format_number(stat_record->numpackets, packet_str, DO_SCALE_NUMBER, VAR_LENGTH);
|
||||
format_number(bps, bps_str, DO_SCALE_NUMBER, VAR_LENGTH);
|
||||
format_number(pps, pps_str, DO_SCALE_NUMBER, VAR_LENGTH);
|
||||
format_number(bpp, bpp_str, DO_SCALE_NUMBER, VAR_LENGTH);
|
||||
printf("Summary: total flows: %llu, total bytes: %s, total packets: %s, avg bps: %s, avg pps: %s, avg bpp: %s\n",
|
||||
(unsigned long long)stat_record->numflows, byte_str, packet_str, bps_str, pps_str, bpp_str );
|
||||
}
|
||||
@ -366,11 +361,10 @@ char bps_str[NUMBER_STRING_SIZE], pps_str[NUMBER_STRING_SIZE], bpp_str[NUMBER_
|
||||
|
||||
stat_record_t process_data(char *wfile, int element_stat, int flow_stat, int sort_flows,
|
||||
printer_t print_header, printer_t print_record, time_t twin_start, time_t twin_end,
|
||||
uint64_t limitflows, int tag, int compress, int do_xstat) {
|
||||
uint64_t limitflows, int tag, int compress) {
|
||||
common_record_t *flow_record, *record_ptr;
|
||||
master_record_t *master_record;
|
||||
nffile_t *nffile_w, *nffile_r;
|
||||
xstat_t *xstat;
|
||||
stat_record_t stat_record;
|
||||
int done, write_file;
|
||||
|
||||
@ -395,7 +389,6 @@ int v1_map_done = 0;
|
||||
write_file = !(sort_flows || flow_stat || element_stat) && wfile;
|
||||
nffile_r = NULL;
|
||||
nffile_w = NULL;
|
||||
xstat = NULL;
|
||||
|
||||
// Get the first file handle
|
||||
nffile_r = GetNextFile(NULL, twin_start, twin_end);
|
||||
@ -429,16 +422,6 @@ int v1_map_done = 0;
|
||||
}
|
||||
return stat_record;
|
||||
}
|
||||
if ( do_xstat ) {
|
||||
xstat = InitXStat(nffile_w);
|
||||
if ( !xstat ) {
|
||||
if ( nffile_r ) {
|
||||
CloseFile(nffile_r);
|
||||
DisposeFile(nffile_r);
|
||||
}
|
||||
return stat_record;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// setup Filter Engine to point to master_record, as any record read from file
|
||||
@ -559,7 +542,11 @@ int v1_map_done = 0;
|
||||
exit(255);
|
||||
}
|
||||
}
|
||||
ConvertCommonV0((void *)record_ptr, (common_record_t *)ConvertBuffer);
|
||||
if ( !ConvertCommonV0((void *)record_ptr, (common_record_t *)ConvertBuffer) ) {
|
||||
LogError("Corrupt data file. Unable to decode at %s line %d\n", __FILE__, __LINE__);
|
||||
exit(255);
|
||||
|
||||
}
|
||||
flow_record = (common_record_t *)ConvertBuffer;
|
||||
dbg_printf("Converted type %u to %u record\n", CommonRecordV0Type, CommonRecordType);
|
||||
case CommonRecordType: {
|
||||
@ -605,6 +592,11 @@ int v1_map_done = 0;
|
||||
|
||||
// Records passed filter -> continue record processing
|
||||
// Update statistics
|
||||
master_record->label = Engine->label;
|
||||
#ifdef DEVEL
|
||||
if ( Engine->label )
|
||||
printf("Flow has label: %s\n", Engine->label);
|
||||
#endif
|
||||
UpdateStat(&stat_record, master_record);
|
||||
|
||||
// update number of flows matching a given map
|
||||
@ -622,8 +614,6 @@ int v1_map_done = 0;
|
||||
} else {
|
||||
if ( write_file ) {
|
||||
AppendToBuffer(nffile_w, (void *)flow_record, flow_record->size);
|
||||
if ( xstat )
|
||||
UpdateXStat(xstat, master_record);
|
||||
} else if ( print_record ) {
|
||||
char *string;
|
||||
// if we need to print out this record
|
||||
@ -703,12 +693,6 @@ int v1_map_done = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ( xstat ) {
|
||||
if ( WriteExtraBlock(nffile_w, xstat->block_header ) <= 0 ) {
|
||||
LogError("Failed to write xstat buffer to disk: '%s'" , strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
/* Stat info */
|
||||
if ( write_file ) {
|
||||
/* Copy stat info and close file */
|
||||
@ -736,7 +720,7 @@ char *byte_limit_string, *packet_limit_string, *print_format, *record_header;
|
||||
char *print_order, *query_file, *nameserver, *aggr_fmt;
|
||||
int c, ffd, ret, element_stat, fdump;
|
||||
int i, user_format, quiet, flow_stat, topN, aggregate, aggregate_mask, bidir;
|
||||
int print_stat, syntax_only, date_sorted, do_tag, compress, do_xstat;
|
||||
int print_stat, syntax_only, date_sorted, do_tag, compress;
|
||||
int plain_numbers, GuessDir, pipe_output, csv_output, ModifyCompress;
|
||||
time_t t_start, t_end;
|
||||
uint32_t limitflows;
|
||||
@ -753,7 +737,6 @@ char Ident[IDENTLEN];
|
||||
flow_stat = 0;
|
||||
print_stat = 0;
|
||||
element_stat = 0;
|
||||
do_xstat = 0;
|
||||
limitflows = 0;
|
||||
date_sorted = 0;
|
||||
total_bytes = 0;
|
||||
@ -781,7 +764,7 @@ char Ident[IDENTLEN];
|
||||
|
||||
Ident[0] = '\0';
|
||||
|
||||
while ((c = getopt(argc, argv, "6aA:Bbc:D:E:s:hHn:i:jf:qzr:v:w:J:K:M:NImO:R:XZt:TVv:x:l:L:o:")) != EOF) {
|
||||
while ((c = getopt(argc, argv, "6aA:Bbc:D:E:s:hn:i:jf:qyzr:v:w:J:K:M:NImO:R:XZt:TVv:x:l:L:o:")) != EOF) {
|
||||
switch (c) {
|
||||
case 'h':
|
||||
usage(argv[0]);
|
||||
@ -831,14 +814,21 @@ char Ident[IDENTLEN];
|
||||
break;
|
||||
case 'j':
|
||||
if ( compress ) {
|
||||
LogError("Use either -z for LZO or -j for BZ2 compression, but not both\n");
|
||||
LogError("Use one compression: -z for LZO, -j for BZ2 or -y for LZ4 compression\n");
|
||||
exit(255);
|
||||
}
|
||||
compress = BZ2_COMPRESSED;
|
||||
break;
|
||||
case 'y':
|
||||
if ( compress ) {
|
||||
LogError("Use one compression: -z for LZO, -j for BZ2 or -y for LZ4 compression\n");
|
||||
exit(255);
|
||||
}
|
||||
compress = LZ4_COMPRESSED;
|
||||
break;
|
||||
case 'z':
|
||||
if ( compress ) {
|
||||
LogError("Use either -z for LZO or -j for BZ2 compression, but not both\n");
|
||||
LogError("Use one compression: -z for LZO, -j for BZ2 or -y for LZ4 compression\n");
|
||||
exit(255);
|
||||
}
|
||||
compress = LZO_COMPRESSED;
|
||||
@ -873,9 +863,6 @@ char Ident[IDENTLEN];
|
||||
LogError("*** Anonymisation moved! Use nfanon to anonymise flows!\n");
|
||||
exit(255);
|
||||
break;
|
||||
case 'H':
|
||||
do_xstat = 1;
|
||||
break;
|
||||
case 'L':
|
||||
byte_limit_string = optarg;
|
||||
break;
|
||||
@ -944,8 +931,8 @@ char Ident[IDENTLEN];
|
||||
break;
|
||||
case 'J':
|
||||
ModifyCompress = atoi(optarg);
|
||||
if ( (ModifyCompress < 0) || (ModifyCompress > 2) ) {
|
||||
LogError("Expected -J <num>, 0: uncompressed, 1: LZO compressed, 2: BZ2 compressed.\n");
|
||||
if ( (ModifyCompress < 0) || (ModifyCompress > 3) ) {
|
||||
LogError("Expected -J <num>, 0: uncompressed, 1: LZO, 2: BZ2, 3: LZ4 compressed.\n");
|
||||
exit(255);
|
||||
}
|
||||
break;
|
||||
@ -1066,6 +1053,11 @@ char Ident[IDENTLEN];
|
||||
print_format = DefaultMode;
|
||||
}
|
||||
|
||||
// limit input chars
|
||||
if ( strlen(print_format) > 512 ) {
|
||||
LogError("Length of ouput format string too big - > 512\n");
|
||||
exit(255);
|
||||
}
|
||||
if ( strncasecmp(print_format, "fmt:", 4) == 0 ) {
|
||||
// special user defined output format
|
||||
char *format = &print_format[4];
|
||||
@ -1215,7 +1207,7 @@ char Ident[IDENTLEN];
|
||||
nfprof_start(&profile_data);
|
||||
sum_stat = process_data(wfile, element_stat, aggregate || flow_stat, print_order != NULL,
|
||||
print_header, print_record, t_start, t_end,
|
||||
limitflows, do_tag, compress, do_xstat);
|
||||
limitflows, do_tag, compress);
|
||||
nfprof_end(&profile_data, total_flows);
|
||||
|
||||
if ( total_bytes == 0 ) {
|
||||
|
16
bin/nfdump.h
16
bin/nfdump.h
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,17 +29,20 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nfdump.h 39 2009-11-25 08:11:15Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 39 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NFDUMP_H
|
||||
#define _NFDUMP_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "rbtree.h"
|
||||
|
||||
#define BuffNumRecords 1024
|
||||
|
||||
/*
|
||||
|
@ -2,187 +2,187 @@
|
||||
< Flags = 0x06 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x00 FLOW, Unsampled
|
||||
5c5
|
||||
6c6
|
||||
< size = 196
|
||||
---
|
||||
> size = 172
|
||||
57c57
|
||||
58c58
|
||||
< Flags = 0x06 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x00 FLOW, Unsampled
|
||||
59c59
|
||||
61c61
|
||||
< size = 196
|
||||
---
|
||||
> size = 172
|
||||
111c111
|
||||
< Flags = 0x06 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x00 FLOW, Unsampled
|
||||
113c113
|
||||
< size = 196
|
||||
---
|
||||
> size = 172
|
||||
165c165
|
||||
< Flags = 0x06 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x00 FLOW, Unsampled
|
||||
167c167
|
||||
116c116
|
||||
< size = 196
|
||||
---
|
||||
> size = 172
|
||||
219c219
|
||||
168c168
|
||||
< Flags = 0x06 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x00 FLOW, Unsampled
|
||||
221c221
|
||||
171c171
|
||||
< size = 196
|
||||
---
|
||||
> size = 172
|
||||
273c273
|
||||
223c223
|
||||
< Flags = 0x06 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x00 FLOW, Unsampled
|
||||
275c275
|
||||
226c226
|
||||
< size = 196
|
||||
---
|
||||
> size = 172
|
||||
327c327
|
||||
278c278
|
||||
< Flags = 0x06 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x00 FLOW, Unsampled
|
||||
329c329
|
||||
281c281
|
||||
< size = 196
|
||||
---
|
||||
> size = 172
|
||||
381c381
|
||||
333c333
|
||||
< Flags = 0x06 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x00 FLOW, Unsampled
|
||||
383c383
|
||||
336c336
|
||||
< size = 196
|
||||
---
|
||||
> size = 172
|
||||
435c435
|
||||
388c388
|
||||
< Flags = 0x06 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x00 FLOW, Unsampled
|
||||
437c437
|
||||
391c391
|
||||
< size = 196
|
||||
---
|
||||
> size = 172
|
||||
489c489
|
||||
443c443
|
||||
< Flags = 0x06 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x00 FLOW, Unsampled
|
||||
491c491
|
||||
446c446
|
||||
< size = 196
|
||||
---
|
||||
> size = 172
|
||||
543c543
|
||||
498c498
|
||||
< Flags = 0x06 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x00 FLOW, Unsampled
|
||||
545c545
|
||||
501c501
|
||||
< size = 196
|
||||
---
|
||||
> size = 172
|
||||
597c597
|
||||
553c553
|
||||
< Flags = 0x06 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x00 FLOW, Unsampled
|
||||
599c599
|
||||
556c556
|
||||
< size = 196
|
||||
---
|
||||
> size = 172
|
||||
651c651
|
||||
608c608
|
||||
< Flags = 0x06 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x00 FLOW, Unsampled
|
||||
653c653
|
||||
611c611
|
||||
< size = 196
|
||||
---
|
||||
> size = 172
|
||||
705c705
|
||||
663c663
|
||||
< Flags = 0x06 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x00 FLOW, Unsampled
|
||||
707c707
|
||||
666c666
|
||||
< size = 196
|
||||
---
|
||||
> size = 172
|
||||
758c758
|
||||
718c718
|
||||
< Flags = 0x06 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x00 FLOW, Unsampled
|
||||
760c760
|
||||
721c721
|
||||
< size = 196
|
||||
---
|
||||
> size = 172
|
||||
812c812
|
||||
772c772
|
||||
< Flags = 0x06 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x00 FLOW, Unsampled
|
||||
775c775
|
||||
< size = 196
|
||||
---
|
||||
> size = 172
|
||||
827c827
|
||||
< Flags = 0x07 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x01 FLOW, Unsampled
|
||||
814c814
|
||||
830c830
|
||||
< size = 220
|
||||
---
|
||||
> size = 196
|
||||
866c866
|
||||
882c882
|
||||
< Flags = 0x07 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x01 FLOW, Unsampled
|
||||
868c868
|
||||
885c885
|
||||
< size = 220
|
||||
---
|
||||
> size = 196
|
||||
920c920
|
||||
937c937
|
||||
< Flags = 0x07 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x05 FLOW, Unsampled
|
||||
922c922
|
||||
940c940
|
||||
< size = 220
|
||||
---
|
||||
> size = 200
|
||||
974c974
|
||||
992c992
|
||||
< Flags = 0x07 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x03 FLOW, Unsampled
|
||||
976c976
|
||||
995c995
|
||||
< size = 220
|
||||
---
|
||||
> size = 200
|
||||
1030c1030
|
||||
1050c1050
|
||||
< size = 220
|
||||
---
|
||||
> size = 204
|
||||
1082c1082
|
||||
1102c1102
|
||||
< Flags = 0x06 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x04 FLOW, Unsampled
|
||||
1084c1084
|
||||
1105c1105
|
||||
< size = 196
|
||||
---
|
||||
> size = 176
|
||||
1136c1136
|
||||
1157c1157
|
||||
< Flags = 0x06 FLOW, Unsampled
|
||||
---
|
||||
> Flags = 0x02 FLOW, Unsampled
|
||||
1138c1138
|
||||
1160c1160
|
||||
< size = 196
|
||||
---
|
||||
> size = 176
|
||||
1192c1192
|
||||
1215c1215
|
||||
< size = 196
|
||||
---
|
||||
> size = 180
|
||||
1246c1246
|
||||
1270c1270
|
||||
< size = 200
|
||||
---
|
||||
> size = 184
|
||||
1300c1300
|
||||
1325c1325
|
||||
< size = 200
|
||||
---
|
||||
> size = 184
|
||||
1354c1354
|
||||
1380c1380
|
||||
< size = 204
|
||||
---
|
||||
> size = 188
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x00 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 172
|
||||
first = 1089534600 [2004-07-11 10:30:00]
|
||||
@ -55,6 +56,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x00 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 172
|
||||
first = 1089534610 [2004-07-11 10:30:10]
|
||||
@ -109,6 +111,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x00 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 172
|
||||
first = 1089534620 [2004-07-11 10:30:20]
|
||||
@ -163,6 +166,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x00 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 172
|
||||
first = 1089534630 [2004-07-11 10:30:30]
|
||||
@ -217,6 +221,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x00 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 172
|
||||
first = 1089534640 [2004-07-11 10:30:40]
|
||||
@ -271,6 +276,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x00 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 172
|
||||
first = 1089534650 [2004-07-11 10:30:50]
|
||||
@ -325,6 +331,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x00 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 172
|
||||
first = 1089534660 [2004-07-11 10:31:00]
|
||||
@ -379,6 +386,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x00 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 172
|
||||
first = 1089534670 [2004-07-11 10:31:10]
|
||||
@ -433,6 +441,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x00 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 172
|
||||
first = 1089534680 [2004-07-11 10:31:20]
|
||||
@ -487,6 +496,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x00 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 172
|
||||
first = 1089534690 [2004-07-11 10:31:30]
|
||||
@ -541,6 +551,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x00 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 172
|
||||
first = 1089534700 [2004-07-11 10:31:40]
|
||||
@ -595,6 +606,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x00 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 172
|
||||
first = 1089534710 [2004-07-11 10:31:50]
|
||||
@ -649,6 +661,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x00 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 172
|
||||
first = 1089534720 [2004-07-11 10:32:00]
|
||||
@ -703,6 +716,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x00 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 172
|
||||
first = 1089534730 [2004-07-11 10:32:10]
|
||||
@ -756,6 +770,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x00 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 172
|
||||
first = 1089534740 [2004-07-11 10:32:20]
|
||||
@ -810,6 +825,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x01 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 196
|
||||
first = 1089534750 [2004-07-11 10:32:30]
|
||||
@ -864,6 +880,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x01 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 196
|
||||
first = 1089534760 [2004-07-11 10:32:40]
|
||||
@ -918,6 +935,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x05 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 200
|
||||
first = 1089534770 [2004-07-11 10:32:50]
|
||||
@ -972,6 +990,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x03 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 200
|
||||
first = 1089534780 [2004-07-11 10:33:00]
|
||||
@ -1026,6 +1045,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x07 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 204
|
||||
first = 1089534790 [2004-07-11 10:33:10]
|
||||
@ -1080,6 +1100,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x04 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 176
|
||||
first = 1089534800 [2004-07-11 10:33:20]
|
||||
@ -1134,6 +1155,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x02 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 176
|
||||
first = 1089534810 [2004-07-11 10:33:30]
|
||||
@ -1188,6 +1210,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x06 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 180
|
||||
first = 1089534820 [2004-07-11 10:33:40]
|
||||
@ -1242,6 +1265,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x06 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 184
|
||||
first = 1089534830 [2004-07-11 10:33:50]
|
||||
@ -1296,6 +1320,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x06 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 184
|
||||
first = 1089534840 [2004-07-11 10:34:00]
|
||||
@ -1350,6 +1375,7 @@ Flow Record:
|
||||
|
||||
Flow Record:
|
||||
Flags = 0x06 FLOW, Unsampled
|
||||
label = <none>
|
||||
export sysid = 1
|
||||
size = 188
|
||||
first = 1089534850 [2004-07-11 10:34:10]
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,13 +29,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nfdump_inline.c 39 2009-11-25 08:11:15Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 39 $
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@ -42,8 +36,6 @@
|
||||
// as it's called for every single flow
|
||||
static inline void UpdateStat(stat_record_t *stat_record, master_record_t *master_record);
|
||||
|
||||
static inline void UpdateXStat(xstat_t *xstat, master_record_t *master_record);
|
||||
|
||||
static inline void UpdateStat(stat_record_t *stat_record, master_record_t *master_record) {
|
||||
|
||||
switch (master_record->prot) {
|
||||
@ -99,29 +91,3 @@ static inline void UpdateStat(stat_record_t *stat_record, master_record_t *maste
|
||||
stat_record->msec_last = master_record->msec_last;
|
||||
|
||||
} // End of UpdateStat
|
||||
|
||||
static inline void UpdateXStat(xstat_t *xstat, master_record_t *master_record) {
|
||||
uint32_t bpp = master_record->dPkts ? master_record->dOctets/master_record->dPkts : 0;
|
||||
|
||||
if ( bpp > MAX_BPP )
|
||||
bpp = MAX_BPP;
|
||||
if ( master_record->prot == IPPROTO_TCP ) {
|
||||
xstat->bpp_histogram->tcp.bpp[bpp]++;
|
||||
xstat->bpp_histogram->tcp.count++;
|
||||
|
||||
xstat->port_histogram->src_tcp.port[master_record->srcport]++;
|
||||
xstat->port_histogram->dst_tcp.port[master_record->dstport]++;
|
||||
xstat->port_histogram->src_tcp.count++;
|
||||
xstat->port_histogram->dst_tcp.count++;
|
||||
} else if ( master_record->prot == IPPROTO_UDP ) {
|
||||
xstat->bpp_histogram->udp.bpp[bpp]++;
|
||||
xstat->bpp_histogram->udp.count++;
|
||||
|
||||
xstat->port_histogram->src_udp.port[master_record->srcport]++;
|
||||
xstat->port_histogram->dst_udp.port[master_record->dstport]++;
|
||||
xstat->port_histogram->src_udp.count++;
|
||||
xstat->port_histogram->dst_udp.count++;
|
||||
}
|
||||
|
||||
} // End of UpdateXStat
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,12 +29,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nfexpire.c 51 2010-01-29 09:01:54Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 51 $
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -210,14 +205,13 @@ int i;
|
||||
|
||||
int main( int argc, char **argv ) {
|
||||
struct stat fstat;
|
||||
int c, err, maxsize_set, maxlife_set;
|
||||
int c, maxsize_set, maxlife_set;
|
||||
int do_rescan, do_expire, do_list, print_stat, do_update_param, print_books, is_profile, nfsen_format;
|
||||
char *maxsize_string, *lifetime_string, *datadir;
|
||||
char *datadir;
|
||||
uint64_t maxsize, lifetime, low_water;
|
||||
uint32_t runtime;
|
||||
channel_t *channel, *current_channel;
|
||||
|
||||
maxsize_string = lifetime_string = NULL;
|
||||
datadir = NULL;
|
||||
maxsize = lifetime = 0;
|
||||
do_rescan = 0;
|
||||
@ -315,7 +309,7 @@ channel_t *channel, *current_channel;
|
||||
exit(250);
|
||||
}
|
||||
|
||||
err = stat(datadir, &fstat);
|
||||
stat(datadir, &fstat);
|
||||
if ( !(fstat.st_mode & S_IFDIR) ) {
|
||||
fprintf(stderr, "No such directory: %s\n", datadir);
|
||||
exit(250);
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,12 +29,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nfexport.c 54 2010-01-29 11:30:22Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 54 $
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -60,7 +55,6 @@
|
||||
#include "nffile.h"
|
||||
#include "nfx.h"
|
||||
#include "nfstat.h"
|
||||
#include "nfxstat.h"
|
||||
#include "nflowcache.h"
|
||||
#include "exporter.h"
|
||||
|
||||
@ -321,10 +315,10 @@ char *string;
|
||||
|
||||
// apply IP mask from aggregation, to provide a pretty output
|
||||
if ( FlowTable->has_masks ) {
|
||||
flow_record->v6.srcaddr[0] &= FlowTable->IPmask[0];
|
||||
flow_record->v6.srcaddr[1] &= FlowTable->IPmask[1];
|
||||
flow_record->v6.dstaddr[0] &= FlowTable->IPmask[2];
|
||||
flow_record->v6.dstaddr[1] &= FlowTable->IPmask[3];
|
||||
flow_record->V6.srcaddr[0] &= FlowTable->IPmask[0];
|
||||
flow_record->V6.srcaddr[1] &= FlowTable->IPmask[1];
|
||||
flow_record->V6.dstaddr[0] &= FlowTable->IPmask[2];
|
||||
flow_record->V6.dstaddr[1] &= FlowTable->IPmask[3];
|
||||
}
|
||||
|
||||
if ( FlowTable->apply_netbits )
|
||||
@ -368,10 +362,10 @@ char *string;
|
||||
|
||||
// apply IP mask from aggregation, to provide a pretty output
|
||||
if ( FlowTable->has_masks ) {
|
||||
flow_record->v6.srcaddr[0] &= FlowTable->IPmask[0];
|
||||
flow_record->v6.srcaddr[1] &= FlowTable->IPmask[1];
|
||||
flow_record->v6.dstaddr[0] &= FlowTable->IPmask[2];
|
||||
flow_record->v6.dstaddr[1] &= FlowTable->IPmask[3];
|
||||
flow_record->V6.srcaddr[0] &= FlowTable->IPmask[0];
|
||||
flow_record->V6.srcaddr[1] &= FlowTable->IPmask[1];
|
||||
flow_record->V6.dstaddr[0] &= FlowTable->IPmask[2];
|
||||
flow_record->V6.dstaddr[1] &= FlowTable->IPmask[3];
|
||||
}
|
||||
|
||||
if ( FlowTable->apply_netbits )
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,17 +29,14 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nfexport.h 54 2010-01-29 11:30:22Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 54 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NFEXPORT_H
|
||||
#define _NFEXPORT_H 1
|
||||
|
||||
#include "nffile.h"
|
||||
#include "nfx.h"
|
||||
|
||||
int ExportFlowTable(nffile_t *nffile, int aggregate, int bidir, int date_sorted, extension_map_list_t *extension_map_list);
|
||||
|
||||
#endif //_NFEXPORT_H
|
||||
|
730
bin/nffile.c
730
bin/nffile.c
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2011, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,12 +29,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nffile.c 41 2009-12-31 14:46:28Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 41 $
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -60,6 +55,7 @@
|
||||
#endif
|
||||
|
||||
#include "minilzo.h"
|
||||
#include "lz4.h"
|
||||
#include "nf_common.h"
|
||||
#include "nffile.h"
|
||||
#include "flist.h"
|
||||
@ -75,20 +71,18 @@ char *CurrentIdent;
|
||||
#define WRITE_FILE 1
|
||||
|
||||
// LZO params
|
||||
#define LZO_BUFFSIZE ((BUFFSIZE + BUFFSIZE / 16 + 64 + 3) + sizeof(data_block_header_t))
|
||||
#define HEAP_ALLOC(var,size) \
|
||||
lzo_align_t __LZO_MMODEL var [ ((size) + (sizeof(lzo_align_t) - 1)) / sizeof(lzo_align_t) ]
|
||||
|
||||
static HEAP_ALLOC(wrkmem,LZO1X_1_MEM_COMPRESS);
|
||||
static void *lzo_buff, *bz2_buff;
|
||||
static int lzo_initialized = 0;
|
||||
static int lz4_initialized = 0;
|
||||
static int bz2_initialized = 0;
|
||||
|
||||
#define ERR_SIZE 256
|
||||
static char error_string[ERR_SIZE];
|
||||
|
||||
static int LZO_initialize(void);
|
||||
|
||||
static int LZ4_initialize(void);
|
||||
|
||||
static int BZ2_initialize(void);
|
||||
|
||||
static void BZ2_prep_stream (bz_stream*);
|
||||
@ -143,29 +137,32 @@ void SumStatRecords(stat_record_t *s1, stat_record_t *s2) {
|
||||
static int LZO_initialize(void) {
|
||||
|
||||
if (lzo_init() != LZO_E_OK) {
|
||||
// this usually indicates a compiler bug - try recompiling
|
||||
// without optimizations, and enable `-DLZO_DEBUG' for diagnostics
|
||||
LogError("Compression lzo_init() failed.\n");
|
||||
return 0;
|
||||
}
|
||||
lzo_buff = malloc(BUFFSIZE+ sizeof(data_block_header_t));
|
||||
if ( !lzo_buff ) {
|
||||
LogError("malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror(errno) );
|
||||
// this usually indicates a compiler bug - try recompiling
|
||||
// without optimizations, and enable `-DLZO_DEBUG' for diagnostics
|
||||
LogError("Compression lzo_init() failed.\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
lzo_initialized = 1;
|
||||
|
||||
return 1;
|
||||
|
||||
} // End of LZO_initialize
|
||||
|
||||
static int BZ2_initialize (void) {
|
||||
static int LZ4_initialize (void) {
|
||||
|
||||
bz2_buff = malloc (2 * BUFFSIZE + sizeof (data_block_header_t)); //should be enough.
|
||||
if (!bz2_buff) {
|
||||
LogError ("malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
|
||||
int lz4_buff_size = LZ4_compressBound(BUFFSIZE + sizeof (data_block_header_t));
|
||||
if ( lz4_buff_size > (2 * BUFFSIZE) ) {
|
||||
LogError ("LZ4_compressBound() error in %s line %d: Buffer too small\n", __FILE__, __LINE__);
|
||||
return 0;
|
||||
}
|
||||
lz4_initialized = 1;
|
||||
|
||||
return 1;
|
||||
|
||||
} // End of LZ4_initialize
|
||||
|
||||
static int BZ2_initialize (void) {
|
||||
|
||||
bz2_initialized = 1;
|
||||
|
||||
return 1;
|
||||
@ -179,6 +176,213 @@ static void BZ2_prep_stream (bz_stream* bs)
|
||||
bs->opaque = NULL;
|
||||
} // End of BZ2_prep_stream
|
||||
|
||||
static int Compress_Block_LZO(nffile_t *nffile) {
|
||||
unsigned char __LZO_MMODEL *in;
|
||||
unsigned char __LZO_MMODEL *out;
|
||||
lzo_uint in_len;
|
||||
lzo_uint out_len;
|
||||
int r;
|
||||
|
||||
in = (unsigned char __LZO_MMODEL *)(nffile->buff_pool[0] + sizeof(data_block_header_t));
|
||||
out = (unsigned char __LZO_MMODEL *)(nffile->buff_pool[1] + sizeof(data_block_header_t));
|
||||
in_len = nffile->block_header->size;
|
||||
r = lzo1x_1_compress(in,in_len,out,&out_len,wrkmem);
|
||||
|
||||
if (r != LZO_E_OK) {
|
||||
LogError("Compress_Block_LZO() error compression failed in %s line %d: LZ4 : %d\n", __FILE__, __LINE__, r);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// copy header
|
||||
memcpy(nffile->buff_pool[1], nffile->buff_pool[0], sizeof(data_block_header_t));
|
||||
((data_block_header_t *)nffile->buff_pool[1])->size = out_len;
|
||||
|
||||
// swap buffers
|
||||
void *_tmp = nffile->buff_pool[1];
|
||||
nffile->buff_pool[1] = nffile->buff_pool[0];
|
||||
nffile->buff_pool[0] = _tmp;
|
||||
|
||||
nffile->block_header = nffile->buff_pool[0];
|
||||
|
||||
return 1;
|
||||
|
||||
} // End of Compress_Block_LZO
|
||||
|
||||
static int Uncompress_Block_LZO(nffile_t *nffile) {
|
||||
unsigned char __LZO_MMODEL *in;
|
||||
unsigned char __LZO_MMODEL *out;
|
||||
lzo_uint in_len;
|
||||
lzo_uint out_len;
|
||||
int r;
|
||||
|
||||
in = (unsigned char __LZO_MMODEL *)(nffile->buff_pool[0] + sizeof(data_block_header_t));
|
||||
out = (unsigned char __LZO_MMODEL *)(nffile->buff_pool[1] + sizeof(data_block_header_t));
|
||||
in_len = nffile->block_header->size;
|
||||
|
||||
r = lzo1x_decompress(in,in_len,out,&out_len,NULL);
|
||||
if (r != LZO_E_OK ) {
|
||||
/* this should NEVER happen */
|
||||
LogError("Uncompress_Block_LZO() error decompression failed in %s line %d: LZO error: %d\n", __FILE__, __LINE__, r);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// copy header
|
||||
memcpy(nffile->buff_pool[1], nffile->buff_pool[0], sizeof(data_block_header_t));
|
||||
((data_block_header_t *)nffile->buff_pool[1])->size = out_len;
|
||||
|
||||
// swap buffers
|
||||
void *_tmp = nffile->buff_pool[1];
|
||||
nffile->buff_pool[1] = nffile->buff_pool[0];
|
||||
nffile->buff_pool[0] = _tmp;
|
||||
|
||||
nffile->block_header = nffile->buff_pool[0];
|
||||
nffile->buff_ptr = nffile->buff_pool[0] + sizeof(data_block_header_t);
|
||||
|
||||
return 1;
|
||||
|
||||
} // End of Uncompress_Block_LZO
|
||||
|
||||
static int Compress_Block_LZ4(nffile_t *nffile) {
|
||||
|
||||
const char *in = (const char *)(nffile->buff_pool[0] + sizeof(data_block_header_t));
|
||||
char *out = (char *)(nffile->buff_pool[1] + sizeof(data_block_header_t));
|
||||
int in_len = nffile->block_header->size;
|
||||
|
||||
int out_len = LZ4_compress_default(in, out, in_len, nffile->buff_size);
|
||||
if (out_len == 0 ) {
|
||||
LogError("Compress_Block_LZ4() error compression aborted in %s line %d: LZ4 : buffer too small\n", __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
if (out_len < 0 ) {
|
||||
LogError("Compress_Block_LZ4() error compression failed in %s line %d: LZ4 : %d\n", __FILE__, __LINE__, out_len);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// copy header
|
||||
memcpy(nffile->buff_pool[1], nffile->buff_pool[0], sizeof(data_block_header_t));
|
||||
((data_block_header_t *)nffile->buff_pool[1])->size = out_len;
|
||||
|
||||
// swap buffers
|
||||
void *_tmp = nffile->buff_pool[1];
|
||||
nffile->buff_pool[1] = nffile->buff_pool[0];
|
||||
nffile->buff_pool[0] = _tmp;
|
||||
|
||||
nffile->block_header = nffile->buff_pool[0];
|
||||
|
||||
return 1;
|
||||
|
||||
} // End of Compress_Block_LZ4
|
||||
|
||||
static int Uncompress_Block_LZ4(nffile_t *nffile) {
|
||||
|
||||
const char *in = (const char *)(nffile->buff_pool[0] + sizeof(data_block_header_t));
|
||||
char *out = (char *)(nffile->buff_pool[1] + sizeof(data_block_header_t));
|
||||
int in_len = nffile->block_header->size;
|
||||
|
||||
int out_len = LZ4_decompress_safe(in, out, in_len, nffile->buff_size);
|
||||
if (out_len == 0 ) {
|
||||
LogError("LZ4_decompress_safe() error compression aborted in %s line %d: LZ4 : buffer too small\n", __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
if (out_len < 0 ) {
|
||||
LogError("LZ4_decompress_safe() error compression failed in %s line %d: LZ4 : %d\n", __FILE__, __LINE__, out_len);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// copy header
|
||||
memcpy(nffile->buff_pool[1], nffile->buff_pool[0], sizeof(data_block_header_t));
|
||||
((data_block_header_t *)nffile->buff_pool[1])->size = out_len;
|
||||
|
||||
// swap buffers
|
||||
void *_tmp = nffile->buff_pool[1];
|
||||
nffile->buff_pool[1] = nffile->buff_pool[0];
|
||||
nffile->buff_pool[0] = _tmp;
|
||||
|
||||
nffile->block_header = nffile->buff_pool[0];
|
||||
nffile->buff_ptr = nffile->buff_pool[0] + sizeof(data_block_header_t);
|
||||
|
||||
return 1;
|
||||
|
||||
} // End of Uncompress_Block_LZ4
|
||||
|
||||
static int Compress_Block_BZ2(nffile_t *nffile) {
|
||||
bz_stream bs;
|
||||
|
||||
BZ2_prep_stream (&bs);
|
||||
BZ2_bzCompressInit (&bs, 9, 0, 0);
|
||||
|
||||
bs.next_in = (char*)(nffile->buff_pool[0] + sizeof(data_block_header_t));
|
||||
bs.next_out = (char*)(nffile->buff_pool[1] + sizeof(data_block_header_t));
|
||||
bs.avail_in = nffile->block_header->size;
|
||||
bs.avail_out = nffile->buff_size;
|
||||
|
||||
for (;;) {
|
||||
int r = BZ2_bzCompress (&bs, BZ_FINISH);
|
||||
if (r == BZ_FINISH_OK) continue;
|
||||
if (r != BZ_STREAM_END) {
|
||||
LogError("Compress_Block_BZ2() error compression failed in %s line %d: LZ4 : %d\n", __FILE__, __LINE__, r);
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// copy header
|
||||
memcpy(nffile->buff_pool[1], nffile->buff_pool[0], sizeof(data_block_header_t));
|
||||
((data_block_header_t *)nffile->buff_pool[1])->size = bs.total_out_lo32;
|
||||
|
||||
// swap buffers
|
||||
void *_tmp = nffile->buff_pool[1];
|
||||
nffile->buff_pool[1] = nffile->buff_pool[0];
|
||||
nffile->buff_pool[0] = _tmp;
|
||||
|
||||
nffile->block_header = nffile->buff_pool[0];
|
||||
|
||||
BZ2_bzCompressEnd (&bs);
|
||||
|
||||
return 1;
|
||||
|
||||
} // End of Compress_Block_BZ2
|
||||
|
||||
static int Uncompress_Block_BZ2(nffile_t *nffile) {
|
||||
bz_stream bs;
|
||||
|
||||
BZ2_prep_stream (&bs);
|
||||
BZ2_bzDecompressInit (&bs, 0, 0);
|
||||
|
||||
bs.next_in = (char*)(nffile->buff_pool[0] + sizeof(data_block_header_t));
|
||||
bs.next_out = (char*)(nffile->buff_pool[1] + sizeof(data_block_header_t));
|
||||
bs.avail_in = nffile->block_header->size;
|
||||
bs.avail_out = nffile->buff_size;
|
||||
|
||||
for (;;) {
|
||||
int r = BZ2_bzDecompress (&bs);
|
||||
if (r == BZ_OK) {
|
||||
continue;
|
||||
} else if (r != BZ_STREAM_END) {
|
||||
BZ2_bzDecompressEnd (&bs);
|
||||
return NF_CORRUPT;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// copy header
|
||||
memcpy(nffile->buff_pool[1], nffile->buff_pool[0], sizeof(data_block_header_t));
|
||||
((data_block_header_t *)nffile->buff_pool[1])->size = bs.total_out_lo32;
|
||||
|
||||
// swap buffers
|
||||
void *_tmp = nffile->buff_pool[1];
|
||||
nffile->buff_pool[1] = nffile->buff_pool[0];
|
||||
nffile->buff_pool[0] = _tmp;
|
||||
|
||||
nffile->block_header = nffile->buff_pool[0];
|
||||
nffile->buff_ptr = nffile->buff_pool[0] + sizeof(data_block_header_t);
|
||||
|
||||
BZ2_bzDecompressEnd (&bs);
|
||||
|
||||
return 1;
|
||||
|
||||
} // End of Uncompress_Block_BZ2
|
||||
|
||||
nffile_t *OpenFile(char *filename, nffile_t *nffile){
|
||||
struct stat stat_buf;
|
||||
@ -259,19 +463,29 @@ int ret, allocated;
|
||||
|
||||
CurrentIdent = nffile->file_header->ident;
|
||||
|
||||
if ( FILE_IS_LZO_COMPRESSED(nffile) && !lzo_initialized && !LZO_initialize() ) {
|
||||
if ( allocated ) {
|
||||
DisposeFile(nffile);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if ( FILE_IS_BZ2_COMPRESSED(nffile) && !bz2_initialized && !BZ2_initialize() ) {
|
||||
if ( allocated ) {
|
||||
DisposeFile(nffile);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
int compression = FILE_COMPRESSION(nffile);
|
||||
switch (compression) {
|
||||
case NOT_COMPRESSED:
|
||||
break;
|
||||
case LZO_COMPRESSED:
|
||||
if ( !lzo_initialized && !LZO_initialize() && allocated ) {
|
||||
DisposeFile(nffile);
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case LZ4_COMPRESSED:
|
||||
if ( !lz4_initialized && !LZ4_initialize() && allocated ) {
|
||||
DisposeFile(nffile);
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case BZ2_COMPRESSED:
|
||||
if ( !bz2_initialized && !BZ2_initialize() && allocated ) {
|
||||
DisposeFile(nffile);
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return nffile;
|
||||
|
||||
@ -383,6 +597,7 @@ void PrintStat(stat_record_t *s) {
|
||||
|
||||
static nffile_t *NewFile(void) {
|
||||
nffile_t *nffile;
|
||||
int i;
|
||||
|
||||
// Create struct
|
||||
nffile = calloc(1, sizeof(nffile_t));
|
||||
@ -392,7 +607,6 @@ nffile_t *nffile;
|
||||
}
|
||||
nffile->buff_ptr = NULL;
|
||||
nffile->fd = 0;
|
||||
nffile->catalog = NULL;
|
||||
|
||||
// Init file header
|
||||
nffile->file_header = calloc(1, sizeof(file_header_t));
|
||||
@ -425,11 +639,17 @@ nffile_t *nffile;
|
||||
nffile->catalog->reserved = 0;
|
||||
*/
|
||||
// init data buffer
|
||||
nffile->block_header = malloc(BUFFSIZE + sizeof(data_block_header_t));
|
||||
if ( !nffile->block_header ) {
|
||||
LogError("malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror(errno) );
|
||||
return NULL;
|
||||
nffile->buff_size = 2 * BUFFSIZE;
|
||||
for (i=0; i<NUM_BUFFS; i++ ) {
|
||||
// allocate twice of BUFFSIZE initially - should be ok, otherwise expand
|
||||
nffile->buff_pool[i] = malloc(nffile->buff_size);
|
||||
if ( !nffile->buff_pool[i] ) {
|
||||
LogError("malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror(errno) );
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
nffile->block_header = nffile->buff_pool[0];
|
||||
nffile->block_header->size = 0;
|
||||
nffile->block_header->NumRecords = 0;
|
||||
nffile->block_header->id = DATA_BLOCK_TYPE_2;
|
||||
@ -442,11 +662,15 @@ nffile_t *nffile;
|
||||
} // End of NewFile
|
||||
|
||||
nffile_t *DisposeFile(nffile_t *nffile) {
|
||||
int i;
|
||||
|
||||
free(nffile->file_header);
|
||||
free(nffile->stat_record);
|
||||
if (nffile->block_header)
|
||||
free(nffile->block_header);
|
||||
free(nffile);
|
||||
|
||||
for (i=0; i<NUM_BUFFS; i++ ) {
|
||||
free(nffile->buff_pool[i]);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
} // End of DisposeFile
|
||||
|
||||
@ -455,17 +679,24 @@ size_t len;
|
||||
int fd, flags;
|
||||
|
||||
switch (compress) {
|
||||
case 0:
|
||||
case NOT_COMPRESSED:
|
||||
flags = FLAG_NOT_COMPRESSED;
|
||||
break;
|
||||
case 1:
|
||||
case LZO_COMPRESSED:
|
||||
flags = FLAG_LZO_COMPRESSED;
|
||||
if ( !lzo_initialized && !LZO_initialize() ) {
|
||||
LogError("Failed to initialize LZO compression");
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case LZ4_COMPRESSED:
|
||||
flags = FLAG_LZ4_COMPRESSED;
|
||||
if ( !lz4_initialized && !LZ4_initialize() ) {
|
||||
LogError("Failed to initialize LZ4 compression");
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case BZ2_COMPRESSED:
|
||||
flags = FLAG_BZ2_COMPRESSED;
|
||||
if ( !bz2_initialized && !BZ2_initialize() ) {
|
||||
LogError("Failed to initialize BZ2 compression");
|
||||
@ -584,24 +815,35 @@ nffile_t *nffile;
|
||||
nffile->block_header->flags = 0;
|
||||
nffile->buff_ptr = (void *)((pointer_addr_t)nffile->block_header + sizeof(data_block_header_t));
|
||||
|
||||
// initialize output lzo buffer
|
||||
if ( FILE_IS_LZO_COMPRESSED(nffile) ) {
|
||||
if ( !lzo_initialized && !LZO_initialize() ) {
|
||||
LogError("Failed to initialize LZO compression");
|
||||
close(nffile->fd);
|
||||
DisposeFile(nffile);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if ( FILE_IS_BZ2_COMPRESSED(nffile) ) {
|
||||
if ( !bz2_initialized && !BZ2_initialize() ) {
|
||||
LogError("Failed to initialize BZ2 compression");
|
||||
close(nffile->fd);
|
||||
DisposeFile(nffile);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
int compression = FILE_COMPRESSION(nffile);
|
||||
switch (compression) {
|
||||
case NOT_COMPRESSED:
|
||||
break;
|
||||
case LZO_COMPRESSED:
|
||||
if ( !lzo_initialized && !LZO_initialize() ) {
|
||||
LogError("Failed to initialize LZO compression");
|
||||
close(nffile->fd);
|
||||
DisposeFile(nffile);
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case LZ4_COMPRESSED:
|
||||
if ( !lz4_initialized && !LZ4_initialize() ) {
|
||||
LogError("Failed to initialize LZ4 compression");
|
||||
close(nffile->fd);
|
||||
DisposeFile(nffile);
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case BZ2_COMPRESSED:
|
||||
if ( !bz2_initialized && !BZ2_initialize() ) {
|
||||
LogError("Failed to initialize BZ2 compression");
|
||||
close(nffile->fd);
|
||||
DisposeFile(nffile);
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return nffile;
|
||||
|
||||
@ -749,6 +991,8 @@ int fd, ret;
|
||||
|
||||
if ( file_header.flags & FLAG_LZO_COMPRESSED )
|
||||
*compressed = FLAG_LZO_COMPRESSED;
|
||||
else if ( file_header.flags & FLAG_LZ4_COMPRESSED )
|
||||
*compressed = FLAG_LZ4_COMPRESSED;
|
||||
else if ( file_header.flags & FLAG_BZ2_COMPRESSED )
|
||||
*compressed = FLAG_BZ2_COMPRESSED;
|
||||
else
|
||||
@ -807,7 +1051,8 @@ int CloseUpdateFile(nffile_t *nffile, char *ident) {
|
||||
|
||||
int ReadBlock(nffile_t *nffile) {
|
||||
ssize_t ret, read_bytes, buff_bytes, request_size;
|
||||
void *read_ptr, *buff;
|
||||
void *read_ptr;
|
||||
uint32_t compression;
|
||||
|
||||
ret = read(nffile->fd, nffile->block_header, sizeof(data_block_header_t));
|
||||
if ( ret == 0 ) // EOF
|
||||
@ -833,52 +1078,28 @@ void *read_ptr, *buff;
|
||||
return NF_CORRUPT;
|
||||
}
|
||||
|
||||
if ( FILE_IS_LZO_COMPRESSED(nffile) )
|
||||
buff = lzo_buff;
|
||||
else if ( FILE_IS_BZ2_COMPRESSED(nffile) )
|
||||
buff = bz2_buff;
|
||||
else
|
||||
buff = nffile->buff_ptr;
|
||||
|
||||
ret = read(nffile->fd, buff, nffile->block_header->size);
|
||||
compression = FILE_COMPRESSION(nffile);
|
||||
ret = read(nffile->fd, nffile->buff_ptr, nffile->block_header->size);
|
||||
if ( ret == nffile->block_header->size ) {
|
||||
// we have the whole record and are done for now
|
||||
if ( FILE_IS_LZO_COMPRESSED(nffile) ) {
|
||||
lzo_uint new_len;
|
||||
int r;
|
||||
r = lzo1x_decompress(lzo_buff,nffile->block_header->size,nffile->buff_ptr,&new_len,NULL);
|
||||
if (r != LZO_E_OK ) {
|
||||
/* this should NEVER happen */
|
||||
LogError("ReadBlock() error decompression failed in %s line %d: LZO error: %d\n", __FILE__, __LINE__, r);
|
||||
return NF_CORRUPT;
|
||||
}
|
||||
nffile->block_header->size = new_len;
|
||||
return read_bytes + new_len;
|
||||
} else if ( FILE_IS_BZ2_COMPRESSED(nffile) ) {
|
||||
bz_stream bs;
|
||||
BZ2_prep_stream (&bs);
|
||||
BZ2_bzDecompressInit (&bs, 0, 0);
|
||||
bs.next_in = bz2_buff;
|
||||
bs.avail_in = ret;
|
||||
bs.next_out = nffile->buff_ptr;
|
||||
bs.avail_out = BUFFSIZE;
|
||||
for (;;) {
|
||||
int r = BZ2_bzDecompress (&bs);
|
||||
if (r == BZ_OK) {
|
||||
continue;
|
||||
} else if (r != BZ_STREAM_END) {
|
||||
BZ2_bzDecompressEnd (&bs);
|
||||
switch (compression) {
|
||||
case NOT_COMPRESSED:
|
||||
break;
|
||||
case LZO_COMPRESSED:
|
||||
if ( Uncompress_Block_LZO(nffile) < 0 )
|
||||
return NF_CORRUPT;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
nffile->block_header->size = bs.total_out_lo32;
|
||||
int total = read_bytes + bs.total_out_lo32; //we do not overflow 2^32 here for sure.
|
||||
BZ2_bzDecompressEnd (&bs);
|
||||
return total;
|
||||
} else
|
||||
return read_bytes + ret;
|
||||
break;
|
||||
case LZ4_COMPRESSED:
|
||||
if ( Uncompress_Block_LZ4(nffile) < 0 )
|
||||
return NF_CORRUPT;
|
||||
break;
|
||||
case BZ2_COMPRESSED:
|
||||
if ( Uncompress_Block_BZ2(nffile) < 0 )
|
||||
return NF_CORRUPT;
|
||||
break;
|
||||
}
|
||||
nffile->buff_ptr = (void *)((pointer_addr_t)nffile->block_header + sizeof(data_block_header_t));
|
||||
return read_bytes + nffile->block_header->size;
|
||||
}
|
||||
|
||||
if ( ret == 0 ) {
|
||||
@ -899,7 +1120,7 @@ void *read_ptr, *buff;
|
||||
buff_bytes = ret; // already in buffer
|
||||
request_size = nffile->block_header->size - buff_bytes; // still to go for this amount of data
|
||||
|
||||
read_ptr = (void *)((pointer_addr_t)buff + buff_bytes);
|
||||
read_ptr = (void *)((pointer_addr_t)nffile->buff_ptr + buff_bytes);
|
||||
do {
|
||||
ret = read(nffile->fd, read_ptr, request_size);
|
||||
if ( ret < 0 ) {
|
||||
@ -910,7 +1131,7 @@ void *read_ptr, *buff;
|
||||
|
||||
if ( ret == 0 ) {
|
||||
// 0: EOF - not expected
|
||||
LogError(error_string, ERR_SIZE, "Corrupt data file: Unexpected EOF. Short read of data block.\n");
|
||||
LogError("read() corrupt data file: Unexpected EOF in %s line %d: %s\n", __FILE__, __LINE__);
|
||||
return NF_CORRUPT;
|
||||
}
|
||||
|
||||
@ -919,226 +1140,66 @@ void *read_ptr, *buff;
|
||||
|
||||
if ( request_size > 0 ) {
|
||||
// still a short read - continue in read loop
|
||||
read_ptr = (void *)((pointer_addr_t)buff + buff_bytes);
|
||||
read_ptr = (void *)((pointer_addr_t)nffile->buff_ptr + buff_bytes);
|
||||
}
|
||||
} while ( request_size > 0 );
|
||||
|
||||
if ( FILE_IS_LZO_COMPRESSED(nffile) ) {
|
||||
int r;
|
||||
lzo_uint new_len;
|
||||
r = lzo1x_decompress(lzo_buff, nffile->block_header->size, nffile->buff_ptr, &new_len, NULL);
|
||||
if (r != LZO_E_OK ) {
|
||||
/* this should NEVER happen */
|
||||
LogError("ReadBlock() error decompression failed in %s line %d: LZO error: %d\n", __FILE__, __LINE__, r);
|
||||
return NF_CORRUPT;
|
||||
}
|
||||
nffile->block_header->size = new_len;
|
||||
return read_bytes + new_len;
|
||||
|
||||
} else if ( FILE_IS_BZ2_COMPRESSED(nffile) ) {
|
||||
bz_stream bs;
|
||||
BZ2_prep_stream (&bs);
|
||||
BZ2_bzDecompressInit (&bs, 0, 0);
|
||||
bs.next_in = bz2_buff;
|
||||
bs.avail_in = ret;
|
||||
bs.next_out = nffile->buff_ptr;
|
||||
bs.avail_out = BUFFSIZE;
|
||||
for (;;) {
|
||||
int r = BZ2_bzDecompress (&bs);
|
||||
if (r == BZ_OK) {
|
||||
continue;
|
||||
} else if (r != BZ_STREAM_END) {
|
||||
BZ2_bzDecompressEnd (&bs);
|
||||
return NF_CORRUPT;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
nffile->block_header->size = bs.total_out_lo32;
|
||||
int total = read_bytes + bs.total_out_lo32; //we do not overflow 2^32 here for sure.
|
||||
BZ2_bzDecompressEnd (&bs);
|
||||
return total;
|
||||
} else {
|
||||
// finally - we are done for now
|
||||
return read_bytes + buff_bytes;
|
||||
switch (compression) {
|
||||
case NOT_COMPRESSED:
|
||||
break;
|
||||
case LZO_COMPRESSED:
|
||||
if ( Uncompress_Block_LZO(nffile) < 0 )
|
||||
return NF_CORRUPT;
|
||||
break;
|
||||
case LZ4_COMPRESSED:
|
||||
if ( Uncompress_Block_LZ4(nffile) < 0 )
|
||||
return NF_CORRUPT;
|
||||
break;
|
||||
case BZ2_COMPRESSED:
|
||||
if ( Uncompress_Block_BZ2(nffile) < 0 )
|
||||
return NF_CORRUPT;
|
||||
break;
|
||||
}
|
||||
|
||||
/* not reached */
|
||||
nffile->buff_ptr = (void *)((pointer_addr_t)nffile->block_header + sizeof(data_block_header_t));
|
||||
return read_bytes + nffile->block_header->size;
|
||||
|
||||
} // End of ReadBlock
|
||||
|
||||
int WriteBlock(nffile_t *nffile) {
|
||||
data_block_header_t *out_block_header;
|
||||
int r, ret;
|
||||
unsigned char __LZO_MMODEL *in;
|
||||
unsigned char __LZO_MMODEL *out;
|
||||
lzo_uint in_len;
|
||||
lzo_uint out_len;
|
||||
int ret, compression;
|
||||
|
||||
// empty blocks need not to be stored
|
||||
if ( nffile->block_header->size == 0 )
|
||||
return 1;
|
||||
|
||||
if ( FILE_IS_LZO_COMPRESSED(nffile) ) {
|
||||
|
||||
out_block_header = (data_block_header_t *)lzo_buff;
|
||||
*out_block_header = *(nffile->block_header);
|
||||
|
||||
in = (unsigned char __LZO_MMODEL *)((pointer_addr_t)nffile->block_header + sizeof(data_block_header_t));
|
||||
out = (unsigned char __LZO_MMODEL *)((pointer_addr_t)out_block_header + sizeof(data_block_header_t));
|
||||
in_len = nffile->block_header->size;
|
||||
r = lzo1x_1_compress(in,in_len,out,&out_len,wrkmem);
|
||||
|
||||
if (r != LZO_E_OK) {
|
||||
snprintf(error_string, ERR_SIZE,"compression failed: %d" , r);
|
||||
error_string[ERR_SIZE-1] = 0;
|
||||
return -2;
|
||||
}
|
||||
|
||||
out_block_header->size = out_len;
|
||||
ret = write(nffile->fd, (void *)out_block_header, sizeof(data_block_header_t) + out_block_header->size);
|
||||
if ( ret > 0 ) {
|
||||
nffile->block_header->size = 0;
|
||||
nffile->block_header->NumRecords = 0;
|
||||
nffile->buff_ptr = (void *)((pointer_addr_t)nffile->block_header + sizeof(data_block_header_t) );
|
||||
nffile->file_header->NumBlocks++;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ( FILE_IS_BZ2_COMPRESSED(nffile) ) {
|
||||
|
||||
out_block_header = (data_block_header_t *) bz2_buff;
|
||||
*out_block_header = * (nffile->block_header);
|
||||
|
||||
bz_stream bs;
|
||||
BZ2_prep_stream (&bs);
|
||||
BZ2_bzCompressInit (&bs, 9, 0, 0);
|
||||
|
||||
bs.next_in = (char*) ( (pointer_addr_t) nffile->block_header + sizeof (data_block_header_t));
|
||||
bs.next_out = (char*) ( (pointer_addr_t) out_block_header + sizeof (data_block_header_t));
|
||||
bs.avail_in = nffile->block_header->size;
|
||||
bs.avail_out = BUFFSIZE;
|
||||
|
||||
for (;;) {
|
||||
int r = BZ2_bzCompress (&bs, BZ_FINISH);
|
||||
if (r == BZ_FINISH_OK) continue;
|
||||
if (r != BZ_STREAM_END) {
|
||||
snprintf (error_string, ERR_SIZE, "bz2 compression failed: %d" , r);
|
||||
error_string[ERR_SIZE - 1] = 0;
|
||||
BZ2_bzCompressEnd (&bs);
|
||||
return -2;
|
||||
}
|
||||
compression = FILE_COMPRESSION(nffile);
|
||||
switch (compression) {
|
||||
case NOT_COMPRESSED:
|
||||
break;
|
||||
}
|
||||
|
||||
out_block_header->size = bs.total_out_lo32;
|
||||
BZ2_bzCompressEnd (&bs);
|
||||
|
||||
ret = write (nffile->fd, (void *) out_block_header, sizeof (data_block_header_t) + out_block_header->size);
|
||||
if (ret > 0) {
|
||||
nffile->block_header->size = 0;
|
||||
nffile->block_header->NumRecords = 0;
|
||||
nffile->buff_ptr = (void *) ( (pointer_addr_t) nffile->block_header + sizeof (data_block_header_t));
|
||||
nffile->file_header->NumBlocks++;
|
||||
}
|
||||
|
||||
return ret;
|
||||
case LZO_COMPRESSED:
|
||||
if ( Compress_Block_LZO(nffile) < 0 ) return -1;
|
||||
break;
|
||||
case LZ4_COMPRESSED:
|
||||
if ( Compress_Block_LZ4(nffile) < 0 ) return -1;
|
||||
break;
|
||||
case BZ2_COMPRESSED:
|
||||
if ( Compress_Block_BZ2(nffile) < 0 ) return -1;
|
||||
break;
|
||||
}
|
||||
|
||||
// not compressed
|
||||
ret = write(nffile->fd, (void *)nffile->block_header, sizeof(data_block_header_t) + nffile->block_header->size);
|
||||
if ( ret > 0 ) {
|
||||
nffile->block_header->size = 0;
|
||||
if (ret > 0) {
|
||||
nffile->block_header->size = 0;
|
||||
nffile->block_header->NumRecords = 0;
|
||||
nffile->buff_ptr = (void *)((pointer_addr_t)nffile->block_header + sizeof(data_block_header_t) );
|
||||
nffile->buff_ptr = (void *)((pointer_addr_t) nffile->block_header + sizeof (data_block_header_t));
|
||||
nffile->file_header->NumBlocks++;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
|
||||
} // End of WriteBlock
|
||||
|
||||
int WriteExtraBlock(nffile_t *nffile, data_block_header_t *block_header) {
|
||||
data_block_header_t *out_block_header;
|
||||
int r, ret;
|
||||
unsigned char __LZO_MMODEL *in;
|
||||
unsigned char __LZO_MMODEL *out;
|
||||
lzo_uint in_len;
|
||||
lzo_uint out_len;
|
||||
|
||||
|
||||
if ( FILE_IS_LZO_COMPRESSED(nffile) && block_header->id != CATALOG_BLOCK) {
|
||||
out_block_header = (data_block_header_t *)lzo_buff;
|
||||
*out_block_header = *(block_header);
|
||||
|
||||
in = (unsigned char __LZO_MMODEL *)((pointer_addr_t)block_header + sizeof(data_block_header_t));
|
||||
out = (unsigned char __LZO_MMODEL *)((pointer_addr_t)out_block_header + sizeof(data_block_header_t));
|
||||
in_len = block_header->size;
|
||||
r = lzo1x_1_compress(in,in_len,out,&out_len,wrkmem);
|
||||
|
||||
if (r != LZO_E_OK) {
|
||||
snprintf(error_string, ERR_SIZE,"compression failed: %d" , r);
|
||||
error_string[ERR_SIZE-1] = 0;
|
||||
return -2;
|
||||
}
|
||||
|
||||
out_block_header->size = out_len;
|
||||
ret = write(nffile->fd, (void *)out_block_header, sizeof(data_block_header_t) + out_block_header->size);
|
||||
if ( ret > 0 ) {
|
||||
nffile->file_header->NumBlocks++;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ( FILE_IS_BZ2_COMPRESSED(nffile) && block_header->id != CATALOG_BLOCK) {
|
||||
bz_stream bs;
|
||||
BZ2_prep_stream (&bs);
|
||||
BZ2_bzCompressInit (&bs, 9, 0, 0);
|
||||
|
||||
out_block_header = (data_block_header_t *)bz2_buff;
|
||||
*out_block_header = *(block_header);
|
||||
|
||||
bs.next_in = (char*) ( (pointer_addr_t) block_header + sizeof (data_block_header_t));
|
||||
bs.next_out = (char*) ( (pointer_addr_t) out_block_header + sizeof (data_block_header_t));
|
||||
bs.avail_in = nffile->block_header->size;
|
||||
bs.avail_out = BUFFSIZE;
|
||||
|
||||
for (;;) {
|
||||
int r = BZ2_bzCompress (&bs, BZ_FINISH);
|
||||
if (r == BZ_FINISH_OK) continue;
|
||||
if (r != BZ_STREAM_END) {
|
||||
snprintf (error_string, ERR_SIZE, "bz2 compression failed: %d" , r);
|
||||
error_string[ERR_SIZE - 1] = 0;
|
||||
BZ2_bzCompressEnd (&bs);
|
||||
return -2;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
out_block_header->size = bs.total_out_lo32;
|
||||
BZ2_bzCompressEnd (&bs);
|
||||
|
||||
ret = write (nffile->fd, (void *) out_block_header, sizeof (data_block_header_t) + out_block_header->size);
|
||||
if (ret > 0) {
|
||||
nffile->file_header->NumBlocks++;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// not compressed or catalog
|
||||
ret = write(nffile->fd, (void *)block_header, sizeof(data_block_header_t) + block_header->size);
|
||||
if ( ret > 0 ) {
|
||||
nffile->file_header->NumBlocks++;
|
||||
}
|
||||
return ret;
|
||||
|
||||
} // End of WriteExtraBlock
|
||||
|
||||
|
||||
inline void ExpandRecord_v1(common_record_t *input_record, master_record_t *output_record ) {
|
||||
uint32_t *u;
|
||||
size_t size;
|
||||
@ -1152,19 +1213,19 @@ void *p = (void *)input_record;
|
||||
if ( (input_record->flags & FLAG_IPV6_ADDR) != 0 ) { // IPv6
|
||||
// IPv6
|
||||
// keep compiler happy
|
||||
// memcpy((void *)output_record->v6.srcaddr, p, 4 * sizeof(uint64_t));
|
||||
// memcpy((void *)output_record->V6.srcaddr, p, 4 * sizeof(uint64_t));
|
||||
memcpy((void *)output_record->ip_union._ip_64.addr, p, 4 * sizeof(uint64_t));
|
||||
p = (void *)((pointer_addr_t)p + 4 * sizeof(uint64_t));
|
||||
} else {
|
||||
// IPv4
|
||||
u = (uint32_t *)p;
|
||||
output_record->v6.srcaddr[0] = 0;
|
||||
output_record->v6.srcaddr[1] = 0;
|
||||
output_record->v4.srcaddr = u[0];
|
||||
output_record->V6.srcaddr[0] = 0;
|
||||
output_record->V6.srcaddr[1] = 0;
|
||||
output_record->V4.srcaddr = u[0];
|
||||
|
||||
output_record->v6.dstaddr[0] = 0;
|
||||
output_record->v6.dstaddr[1] = 0;
|
||||
output_record->v4.dstaddr = u[1];
|
||||
output_record->V6.dstaddr[0] = 0;
|
||||
output_record->V6.dstaddr[1] = 0;
|
||||
output_record->V4.dstaddr = u[1];
|
||||
p = (void *)((pointer_addr_t)p + 2 * sizeof(uint32_t));
|
||||
}
|
||||
|
||||
@ -1199,12 +1260,11 @@ void *p = (void *)input_record;
|
||||
} // End of ExpandRecord_v1
|
||||
|
||||
void ModifyCompressFile(char * rfile, char *Rfile, int compress) {
|
||||
int i, anonymized;
|
||||
int i, anonymized, compression;
|
||||
ssize_t ret;
|
||||
nffile_t *nffile_r, *nffile_w;
|
||||
stat_record_t *_s;
|
||||
char *filename, outfile[MAXPATHLEN];
|
||||
void *tmp;
|
||||
|
||||
SetupInputFileSequence(NULL, rfile, Rfile);
|
||||
|
||||
@ -1222,14 +1282,9 @@ void *tmp;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( (compress == NOT_COMPRESSED && FILE_IS_NOT_COMPRESSED(nffile_r)) ||
|
||||
(compress == LZO_COMPRESSED && FILE_IS_LZO_COMPRESSED(nffile_r)) ||
|
||||
(compress == BZ2_COMPRESSED && FILE_IS_BZ2_COMPRESSED(nffile_r)) ) {
|
||||
printf("File %s is already %s", filename,
|
||||
FILE_IS_LZO_COMPRESSED (nffile_r) ? "lzo compressed" :
|
||||
FILE_IS_BZ2_COMPRESSED (nffile_r) ? "bz2 compressed" :
|
||||
"uncompressed");
|
||||
printf("\n");
|
||||
compression = FILE_COMPRESSION(nffile_r);
|
||||
if ( compression == compress ) {
|
||||
printf("File %s is already same compression methode\n", filename);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1247,11 +1302,6 @@ void *tmp;
|
||||
break;;
|
||||
}
|
||||
|
||||
// Use same buffer for read/write
|
||||
tmp = nffile_r->block_header;
|
||||
nffile_r->block_header = nffile_w->block_header;
|
||||
nffile_r->buff_ptr = nffile_w->buff_ptr;
|
||||
|
||||
// swap stat records :)
|
||||
_s = nffile_r->stat_record;
|
||||
nffile_r->stat_record = nffile_w->stat_record;
|
||||
@ -1261,7 +1311,6 @@ void *tmp;
|
||||
ret = ReadBlock(nffile_r);
|
||||
if ( ret < 0 ) {
|
||||
LogError("Error while reading data block. Abort.\n");
|
||||
nffile_r->block_header = tmp;
|
||||
CloseFile(nffile_r);
|
||||
DisposeFile(nffile_r);
|
||||
CloseFile(nffile_w);
|
||||
@ -1269,9 +1318,17 @@ void *tmp;
|
||||
unlink(outfile);
|
||||
break;;
|
||||
}
|
||||
|
||||
// swap buffers
|
||||
void *_tmp = nffile_r->buff_pool[0];
|
||||
nffile_r->buff_pool[0] = nffile_w->buff_pool[0];
|
||||
nffile_w->buff_pool[0] = _tmp;
|
||||
nffile_w->block_header = nffile_w->buff_pool[0];
|
||||
nffile_r->block_header = nffile_r->buff_pool[0];
|
||||
nffile_r->buff_ptr = (void *)((pointer_addr_t)nffile_r->block_header + sizeof(data_block_header_t));
|
||||
|
||||
if ( WriteBlock(nffile_w) <= 0 ) {
|
||||
LogError("Failed to write output buffer to disk: '%s'" , strerror(errno));
|
||||
nffile_r->block_header = tmp;
|
||||
CloseFile(nffile_r);
|
||||
DisposeFile(nffile_r);
|
||||
CloseFile(nffile_w);
|
||||
@ -1281,15 +1338,7 @@ void *tmp;
|
||||
}
|
||||
}
|
||||
|
||||
// file processed
|
||||
nffile_r->block_header = tmp;
|
||||
|
||||
printf("File %s is now %s", filename,
|
||||
FILE_IS_LZO_COMPRESSED (nffile_w) ? "lzo compressed" :
|
||||
FILE_IS_BZ2_COMPRESSED (nffile_w) ? "bz2 compressed" :
|
||||
"uncompressed");
|
||||
printf("\n");
|
||||
|
||||
printf("File %s compression changed\n", filename);
|
||||
if ( !CloseUpdateFile(nffile_w, nffile_r->file_header->ident) ) {
|
||||
unlink(outfile);
|
||||
LogError("Failed to close file: '%s'" , strerror(errno));
|
||||
@ -1330,6 +1379,7 @@ off_t fsize;
|
||||
printf("File : %s\n", filename);
|
||||
printf ("Version : %u - %s\n", nffile->file_header->version,
|
||||
FILE_IS_LZO_COMPRESSED (nffile) ? "lzo compressed" :
|
||||
FILE_IS_LZ4_COMPRESSED (nffile) ? "lz4 compressed" :
|
||||
FILE_IS_BZ2_COMPRESSED (nffile) ? "bz2 compressed" :
|
||||
"not compressed");
|
||||
|
||||
|
56
bin/nffile.h
56
bin/nffile.h
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,19 +29,17 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nffile.h 40 2009-12-16 10:41:44Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 40 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NFFILE_H
|
||||
#define _NFFILE_H 1
|
||||
|
||||
#ifdef HAVE_STDDEF_H
|
||||
#include "config.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#define IDENTLEN 128
|
||||
@ -89,6 +88,7 @@
|
||||
#define NOT_COMPRESSED 0
|
||||
#define LZO_COMPRESSED 1
|
||||
#define BZ2_COMPRESSED 2
|
||||
#define LZ4_COMPRESSED 3
|
||||
|
||||
typedef struct file_header_s {
|
||||
uint16_t magic; // magic to recognize nfdump file type and endian type
|
||||
@ -104,6 +104,19 @@ typedef struct file_header_s {
|
||||
#define FLAG_ANONYMIZED 0x2 // flow data are anonimized
|
||||
#define FLAG_CATALOG 0x4 // has a file catalog record after stat record
|
||||
#define FLAG_BZ2_COMPRESSED 0x8 // records are BZ2 compressed
|
||||
#define FLAG_LZ4_COMPRESSED 0x10 // records are LZ4 compressed
|
||||
#define COMPRESSION_MASK 0x19 // all compression bits
|
||||
// shortcuts
|
||||
|
||||
#define FILE_IS_NOT_COMPRESSED(n) (((n)->file_header->flags & COMPRESSION_MASK) == 0)
|
||||
#define FILE_IS_LZO_COMPRESSED(n) ((n)->file_header->flags & FLAG_LZO_COMPRESSED)
|
||||
#define FILE_IS_BZ2_COMPRESSED(n) ((n)->file_header->flags & FLAG_BZ2_COMPRESSED)
|
||||
#define FILE_IS_LZ4_COMPRESSED(n) ((n)->file_header->flags & FLAG_LZ4_COMPRESSED)
|
||||
#define FILE_COMPRESSION(n) (FILE_IS_LZO_COMPRESSED(n) ? LZO_COMPRESSED : (FILE_IS_BZ2_COMPRESSED(n) ? BZ2_COMPRESSED : (FILE_IS_LZ4_COMPRESSED(n) ? LZ4_COMPRESSED : NOT_COMPRESSED)))
|
||||
|
||||
#define BLOCK_IS_COMPRESSED(n) ((n)->flags == 2 )
|
||||
#define IP_ANONYMIZED(n) ((n)->file_header->flags & FLAG_ANONYMIZED)
|
||||
|
||||
|
||||
uint32_t NumBlocks; // number of data blocks in file
|
||||
char ident[IDENTLEN]; // string identifier for this file
|
||||
@ -232,11 +245,12 @@ typedef struct catalog_s {
|
||||
*/
|
||||
typedef struct nffile_s {
|
||||
file_header_t *file_header; // file header
|
||||
data_block_header_t *block_header; // buffer
|
||||
#define NUM_BUFFS 2
|
||||
void *buff_pool[NUM_BUFFS]; // buffer space for read/write/compression
|
||||
size_t buff_size;
|
||||
data_block_header_t *block_header; // buffer ptr
|
||||
void *buff_ptr; // pointer into buffer for read/write blocks/records
|
||||
stat_record_t *stat_record; // flow stat record
|
||||
catalog_t *catalog; // file catalog
|
||||
int _compress; // data compressed flag
|
||||
int fd; // file descriptor
|
||||
} nffile_t;
|
||||
|
||||
@ -329,7 +343,7 @@ typedef struct nffile_s {
|
||||
* +----+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+
|
||||
* | 2 | last (21) |fwd_status(89)| tcpflags (6) | proto (4) | src tos (5) |
|
||||
* +----+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+
|
||||
* | 3 | srcport (7) | dstport(11)/ICMP (32) | exporter ID | <free> |
|
||||
* | 3 | srcport (7) | dstport(11)/ICMP (32) | exporter ID | reserved icmp type/code |
|
||||
* +----+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+
|
||||
|
||||
*
|
||||
@ -478,8 +492,8 @@ typedef struct ip_addr_s {
|
||||
#define IP_ADDR_T
|
||||
} ip_addr_t;
|
||||
|
||||
#define v4 ip_union._v4
|
||||
#define v6 ip_union._v6
|
||||
#define V4 ip_union._v4
|
||||
#define V6 ip_union._v6
|
||||
|
||||
/*
|
||||
* Extension 2:
|
||||
@ -1489,7 +1503,6 @@ typedef struct master_record_s {
|
||||
uint16_t icmp;
|
||||
};
|
||||
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# define OffsetPort 3
|
||||
# define OffsetExporterSysID 3
|
||||
@ -2089,6 +2102,9 @@ typedef struct master_record_s {
|
||||
// last entry in master record
|
||||
# define Offset_MR_LAST offsetof(master_record_t, map_ref)
|
||||
extension_map_t *map_ref;
|
||||
|
||||
// optional flowlabel
|
||||
char *label;
|
||||
} master_record_t;
|
||||
|
||||
#define AnyMask 0xffffffffffffffffLL
|
||||
@ -2158,16 +2174,6 @@ typedef struct common_record_v1_s {
|
||||
#endif
|
||||
|
||||
|
||||
// a few handy shortcuts
|
||||
#define FILE_IS_LZO_COMPRESSED(n) ((n)->file_header->flags & FLAG_LZO_COMPRESSED)
|
||||
#define FILE_IS_BZ2_COMPRESSED(n) ((n)->file_header->flags & FLAG_BZ2_COMPRESSED)
|
||||
#define FILE_COMPRESSION(n) ( FILE_IS_LZO_COMPRESSED(n) ? LZO_COMPRESSED : FILE_IS_BZ2_COMPRESSED(n) ? BZ2_COMPRESSED : NOT_COMPRESSED )
|
||||
#define FILE_IS_NOT_COMPRESSED(n) ( (FILE_IS_LZO_COMPRESSED(n) + FILE_IS_BZ2_COMPRESSED(n)) == 0 )
|
||||
|
||||
#define BLOCK_IS_COMPRESSED(n) ((n)->flags == 2 )
|
||||
#define HAS_CATALOG(n) ((n)->file_header->flags & FLAG_CATALOG)
|
||||
#define IP_ANONYMIZED(n) ((n)->file_header->flags & FLAG_ANONYMIZED)
|
||||
|
||||
void SumStatRecords(stat_record_t *s1, stat_record_t *s2);
|
||||
|
||||
nffile_t *OpenFile(char *filename, nffile_t *nffile);
|
||||
@ -2194,8 +2200,6 @@ int ReadBlock(nffile_t *nffile);
|
||||
|
||||
int WriteBlock(nffile_t *nffile);
|
||||
|
||||
int WriteExtraBlock(nffile_t *nffile, data_block_header_t *block_header);
|
||||
|
||||
int RenameAppend(char *from, char *to);
|
||||
|
||||
void ModifyCompressFile(char * rfile, char *Rfile, int compress);
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2016, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
@ -37,7 +38,7 @@ static inline void AppendToBuffer(nffile_t *nffile, void *record, size_t require
|
||||
|
||||
static inline void CopyV6IP(uint32_t *dst, uint32_t *src);
|
||||
|
||||
static inline void ConvertCommonV0(void *record, common_record_t *flow_record);
|
||||
static inline int ConvertCommonV0(void *record, common_record_t *flow_record);
|
||||
|
||||
static inline void ExpandRecord_v2(common_record_t *input_record, extension_info_t *extension_info, exporter_info_record_t *exporter_info, master_record_t *output_record );
|
||||
|
||||
@ -74,11 +75,13 @@ static inline void CopyV6IP(uint32_t *dst, uint32_t *src) {
|
||||
dst[3] = src[3];
|
||||
} // End of CopyV6IP
|
||||
|
||||
static inline void ConvertCommonV0(void *record, common_record_t *flow_record) {
|
||||
static inline int ConvertCommonV0(void *record, common_record_t *flow_record) {
|
||||
common_record_v0_t *flow_record_v0 = (common_record_v0_t *)record;
|
||||
|
||||
// copy v0 common record
|
||||
memcpy((void *)flow_record, record, COMMON_RECORDV0_DATA_SIZE);
|
||||
if ( flow_record_v0->size <= COMMON_RECORDV0_DATA_SIZE )
|
||||
return 0;
|
||||
memcpy((void *)flow_record->data, (void *)flow_record_v0->data, flow_record_v0->size - COMMON_RECORDV0_DATA_SIZE);
|
||||
|
||||
// fix record differences
|
||||
@ -88,6 +91,7 @@ common_record_v0_t *flow_record_v0 = (common_record_v0_t *)record;
|
||||
flow_record->exporter_sysid = flow_record_v0->exporter_sysid;
|
||||
flow_record->reserved = 0;
|
||||
|
||||
return 1;
|
||||
} // End of ConvertCommonV0
|
||||
|
||||
/*
|
||||
@ -134,19 +138,19 @@ void *p = (void *)input_record;
|
||||
if ( (input_record->flags & FLAG_IPV6_ADDR) != 0 ) { // IPv6
|
||||
// IPv6
|
||||
// keep compiler happy
|
||||
// memcpy((void *)output_record->v6.srcaddr, p, 4 * sizeof(uint64_t));
|
||||
// memcpy((void *)output_record->V6.srcaddr, p, 4 * sizeof(uint64_t));
|
||||
memcpy((void *)output_record->ip_union._ip_64.addr, p, 4 * sizeof(uint64_t));
|
||||
p = (void *)((pointer_addr_t)p + 4 * sizeof(uint64_t));
|
||||
} else {
|
||||
// IPv4
|
||||
u = (uint32_t *)p;
|
||||
output_record->v6.srcaddr[0] = 0;
|
||||
output_record->v6.srcaddr[1] = 0;
|
||||
output_record->v4.srcaddr = u[0];
|
||||
output_record->V6.srcaddr[0] = 0;
|
||||
output_record->V6.srcaddr[1] = 0;
|
||||
output_record->V4.srcaddr = u[0];
|
||||
|
||||
output_record->v6.dstaddr[0] = 0;
|
||||
output_record->v6.dstaddr[1] = 0;
|
||||
output_record->v4.dstaddr = u[1];
|
||||
output_record->V6.dstaddr[0] = 0;
|
||||
output_record->V6.dstaddr[1] = 0;
|
||||
output_record->V4.dstaddr = u[1];
|
||||
p = (void *)((pointer_addr_t)p + 2 * sizeof(uint32_t));
|
||||
}
|
||||
|
||||
@ -223,29 +227,29 @@ void *p = (void *)input_record;
|
||||
} break;
|
||||
case EX_NEXT_HOP_v4: {
|
||||
tpl_ext_9_t *tpl = (tpl_ext_9_t *)p;
|
||||
output_record->ip_nexthop.v6[0] = 0;
|
||||
output_record->ip_nexthop.v6[1] = 0;
|
||||
output_record->ip_nexthop.v4 = tpl->nexthop;
|
||||
output_record->ip_nexthop.V6[0] = 0;
|
||||
output_record->ip_nexthop.V6[1] = 0;
|
||||
output_record->ip_nexthop.V4 = tpl->nexthop;
|
||||
p = (void *)tpl->data;
|
||||
ClearFlag(output_record->flags, FLAG_IPV6_NH);
|
||||
} break;
|
||||
case EX_NEXT_HOP_v6: {
|
||||
tpl_ext_10_t *tpl = (tpl_ext_10_t *)p;
|
||||
CopyV6IP((uint32_t *)output_record->ip_nexthop.v6, (uint32_t *)tpl->nexthop);
|
||||
CopyV6IP((uint32_t *)output_record->ip_nexthop.V6, (uint32_t *)tpl->nexthop);
|
||||
p = (void *)tpl->data;
|
||||
SetFlag(output_record->flags, FLAG_IPV6_NH);
|
||||
} break;
|
||||
case EX_NEXT_HOP_BGP_v4: {
|
||||
tpl_ext_11_t *tpl = (tpl_ext_11_t *)p;
|
||||
output_record->bgp_nexthop.v6[0] = 0;
|
||||
output_record->bgp_nexthop.v6[1] = 0;
|
||||
output_record->bgp_nexthop.v4 = tpl->bgp_nexthop;
|
||||
output_record->bgp_nexthop.V6[0] = 0;
|
||||
output_record->bgp_nexthop.V6[1] = 0;
|
||||
output_record->bgp_nexthop.V4 = tpl->bgp_nexthop;
|
||||
ClearFlag(output_record->flags, FLAG_IPV6_NHB);
|
||||
p = (void *)tpl->data;
|
||||
} break;
|
||||
case EX_NEXT_HOP_BGP_v6: {
|
||||
tpl_ext_12_t *tpl = (tpl_ext_12_t *)p;
|
||||
CopyV6IP((uint32_t *)output_record->bgp_nexthop.v6, (uint32_t *)tpl->bgp_nexthop);
|
||||
CopyV6IP((uint32_t *)output_record->bgp_nexthop.V6, (uint32_t *)tpl->bgp_nexthop);
|
||||
p = (void *)tpl->data;
|
||||
SetFlag(output_record->flags, FLAG_IPV6_NHB);
|
||||
} break;
|
||||
@ -322,15 +326,15 @@ void *p = (void *)input_record;
|
||||
} break;
|
||||
case EX_ROUTER_IP_v4: {
|
||||
tpl_ext_23_t *tpl = (tpl_ext_23_t *)p;
|
||||
output_record->ip_router.v6[0] = 0;
|
||||
output_record->ip_router.v6[1] = 0;
|
||||
output_record->ip_router.v4 = tpl->router_ip;
|
||||
output_record->ip_router.V6[0] = 0;
|
||||
output_record->ip_router.V6[1] = 0;
|
||||
output_record->ip_router.V4 = tpl->router_ip;
|
||||
p = (void *)tpl->data;
|
||||
ClearFlag(output_record->flags, FLAG_IPV6_EXP);
|
||||
} break;
|
||||
case EX_ROUTER_IP_v6: {
|
||||
tpl_ext_24_t *tpl = (tpl_ext_24_t *)p;
|
||||
CopyV6IP((uint32_t *)output_record->ip_router.v6, (uint32_t *)tpl->router_ip);
|
||||
CopyV6IP((uint32_t *)output_record->ip_router.V6, (uint32_t *)tpl->router_ip);
|
||||
p = (void *)tpl->data;
|
||||
SetFlag(output_record->flags, FLAG_IPV6_EXP);
|
||||
} break;
|
||||
@ -383,21 +387,21 @@ void *p = (void *)input_record;
|
||||
} break;
|
||||
case EX_NSEL_XLATE_IP_v4: {
|
||||
tpl_ext_39_t *tpl = (tpl_ext_39_t *)p;
|
||||
output_record->xlate_src_ip.v6[0] = 0;
|
||||
output_record->xlate_src_ip.v6[1] = 0;
|
||||
output_record->xlate_src_ip.v4 = tpl->xlate_src_ip;
|
||||
output_record->xlate_dst_ip.v6[0] = 0;
|
||||
output_record->xlate_dst_ip.v6[1] = 0;
|
||||
output_record->xlate_dst_ip.v4 = tpl->xlate_dst_ip;
|
||||
output_record->xlate_src_ip.V6[0] = 0;
|
||||
output_record->xlate_src_ip.V6[1] = 0;
|
||||
output_record->xlate_src_ip.V4 = tpl->xlate_src_ip;
|
||||
output_record->xlate_dst_ip.V6[0] = 0;
|
||||
output_record->xlate_dst_ip.V6[1] = 0;
|
||||
output_record->xlate_dst_ip.V4 = tpl->xlate_dst_ip;
|
||||
p = (void *)tpl->data;
|
||||
output_record->xlate_flags = 0;
|
||||
} break;
|
||||
case EX_NSEL_XLATE_IP_v6: {
|
||||
tpl_ext_40_t *tpl = (tpl_ext_40_t *)p;
|
||||
output_record->xlate_src_ip.v6[0] = tpl->xlate_src_ip[0];
|
||||
output_record->xlate_src_ip.v6[1] = tpl->xlate_src_ip[1];
|
||||
output_record->xlate_dst_ip.v6[0] = tpl->xlate_dst_ip[0];
|
||||
output_record->xlate_dst_ip.v6[1] = tpl->xlate_dst_ip[1];
|
||||
output_record->xlate_src_ip.V6[0] = tpl->xlate_src_ip[0];
|
||||
output_record->xlate_src_ip.V6[1] = tpl->xlate_src_ip[1];
|
||||
output_record->xlate_dst_ip.V6[0] = tpl->xlate_dst_ip[0];
|
||||
output_record->xlate_dst_ip.V6[1] = tpl->xlate_dst_ip[1];
|
||||
p = (void *)tpl->data;
|
||||
output_record->xlate_flags = 1;
|
||||
} break;
|
||||
@ -442,12 +446,12 @@ void *p = (void *)input_record;
|
||||
// compat record v1.6.10
|
||||
case EX_NEL_GLOBAL_IP_v4: {
|
||||
tpl_ext_47_t *tpl = (tpl_ext_47_t *)p;
|
||||
output_record->xlate_src_ip.v6[0] = 0;
|
||||
output_record->xlate_src_ip.v6[1] = 0;
|
||||
output_record->xlate_src_ip.v4 = tpl->nat_inside;
|
||||
output_record->xlate_dst_ip.v6[0] = 0;
|
||||
output_record->xlate_dst_ip.v6[1] = 0;
|
||||
output_record->xlate_dst_ip.v4 = tpl->nat_outside;
|
||||
output_record->xlate_src_ip.V6[0] = 0;
|
||||
output_record->xlate_src_ip.V6[1] = 0;
|
||||
output_record->xlate_src_ip.V4 = tpl->nat_inside;
|
||||
output_record->xlate_dst_ip.V6[0] = 0;
|
||||
output_record->xlate_dst_ip.V6[1] = 0;
|
||||
output_record->xlate_dst_ip.V4 = tpl->nat_outside;
|
||||
p = (void *)tpl->data;
|
||||
|
||||
output_record->xlate_src_port = compat_nel_bug.port[0];
|
||||
@ -522,14 +526,14 @@ int i;
|
||||
if ( (master_record->flags & FLAG_IPV6_ADDR) != 0 ) { // IPv6
|
||||
// IPv6
|
||||
// keep compiler happy
|
||||
// memcpy(p, (void *)master_record->v6.srcaddr, 4 * sizeof(uint64_t));
|
||||
// memcpy(p, (void *)master_record->V6.srcaddr, 4 * sizeof(uint64_t));
|
||||
memcpy(p, (void *)master_record->ip_union._ip_64.addr, 4 * sizeof(uint64_t));
|
||||
p = (void *)((pointer_addr_t)p + 4 * sizeof(uint64_t));
|
||||
} else {
|
||||
// IPv4
|
||||
uint32_t *u = (uint32_t *)p;
|
||||
u[0] = master_record->v4.srcaddr;
|
||||
u[1] = master_record->v4.dstaddr;
|
||||
u[0] = master_record->V4.srcaddr;
|
||||
u[1] = master_record->V4.dstaddr;
|
||||
p = (void *)((pointer_addr_t)p + 2 * sizeof(uint32_t));
|
||||
}
|
||||
|
||||
@ -603,24 +607,24 @@ int i;
|
||||
} break;
|
||||
case EX_NEXT_HOP_v4: {
|
||||
tpl_ext_9_t *tpl = (tpl_ext_9_t *)p;
|
||||
tpl->nexthop = master_record->ip_nexthop.v4;
|
||||
tpl->nexthop = master_record->ip_nexthop.V4;
|
||||
p = (void *)tpl->data;
|
||||
} break;
|
||||
case EX_NEXT_HOP_v6: {
|
||||
tpl_ext_10_t *tpl = (tpl_ext_10_t *)p;
|
||||
tpl->nexthop[0] = master_record->ip_nexthop.v6[0];
|
||||
tpl->nexthop[1] = master_record->ip_nexthop.v6[1];
|
||||
tpl->nexthop[0] = master_record->ip_nexthop.V6[0];
|
||||
tpl->nexthop[1] = master_record->ip_nexthop.V6[1];
|
||||
p = (void *)tpl->data;
|
||||
} break;
|
||||
case EX_NEXT_HOP_BGP_v4: {
|
||||
tpl_ext_11_t *tpl = (tpl_ext_11_t *)p;
|
||||
tpl->bgp_nexthop = master_record->bgp_nexthop.v4;
|
||||
tpl->bgp_nexthop = master_record->bgp_nexthop.V4;
|
||||
p = (void *)tpl->data;
|
||||
} break;
|
||||
case EX_NEXT_HOP_BGP_v6: {
|
||||
tpl_ext_12_t *tpl = (tpl_ext_12_t *)p;
|
||||
tpl->bgp_nexthop[0] = master_record->bgp_nexthop.v6[0];
|
||||
tpl->bgp_nexthop[1] = master_record->bgp_nexthop.v6[1];
|
||||
tpl->bgp_nexthop[0] = master_record->bgp_nexthop.V6[0];
|
||||
tpl->bgp_nexthop[1] = master_record->bgp_nexthop.V6[1];
|
||||
p = (void *)tpl->data;
|
||||
} break;
|
||||
case EX_VLAN: {
|
||||
@ -695,13 +699,13 @@ int i;
|
||||
} break;
|
||||
case EX_ROUTER_IP_v4: {
|
||||
tpl_ext_23_t *tpl = (tpl_ext_23_t *)p;
|
||||
tpl->router_ip = master_record->ip_router.v4;
|
||||
tpl->router_ip = master_record->ip_router.V4;
|
||||
p = (void *)tpl->data;
|
||||
} break;
|
||||
case EX_ROUTER_IP_v6: {
|
||||
tpl_ext_24_t *tpl = (tpl_ext_24_t *)p;
|
||||
tpl->router_ip[0] = master_record->ip_router.v6[0];
|
||||
tpl->router_ip[1] = master_record->ip_router.v6[1];
|
||||
tpl->router_ip[0] = master_record->ip_router.V6[0];
|
||||
tpl->router_ip[1] = master_record->ip_router.V6[1];
|
||||
p = (void *)tpl->data;
|
||||
} break;
|
||||
case EX_ROUTER_ID: {
|
||||
@ -741,17 +745,17 @@ int i;
|
||||
} break;
|
||||
case EX_NSEL_XLATE_IP_v4: {
|
||||
tpl_ext_39_t *tpl = (tpl_ext_39_t *)p;
|
||||
tpl->xlate_src_ip = master_record->xlate_src_ip.v4;
|
||||
tpl->xlate_dst_ip = master_record->xlate_dst_ip.v4;
|
||||
tpl->xlate_src_ip = master_record->xlate_src_ip.V4;
|
||||
tpl->xlate_dst_ip = master_record->xlate_dst_ip.V4;
|
||||
p = (void *)tpl->data;
|
||||
} break;
|
||||
case EX_NSEL_XLATE_IP_v6: {
|
||||
tpl_ext_40_t *tpl = (tpl_ext_40_t *)p;
|
||||
tpl->xlate_src_ip[0] = master_record->xlate_src_ip.v6[0];
|
||||
tpl->xlate_src_ip[1] = master_record->xlate_src_ip.v6[1];
|
||||
tpl->xlate_src_ip[0] = master_record->xlate_src_ip.V6[0];
|
||||
tpl->xlate_src_ip[1] = master_record->xlate_src_ip.V6[1];
|
||||
p = (void *)tpl->data;
|
||||
tpl->xlate_dst_ip[0] = master_record->xlate_dst_ip.v6[0];
|
||||
tpl->xlate_dst_ip[1] = master_record->xlate_dst_ip.v6[1];
|
||||
tpl->xlate_dst_ip[0] = master_record->xlate_dst_ip.V6[0];
|
||||
tpl->xlate_dst_ip[1] = master_record->xlate_dst_ip.V6[1];
|
||||
p = (void *)tpl->data;
|
||||
} break;
|
||||
case EX_NSEL_ACL: {
|
||||
|
52
bin/nfgen.c
52
bin/nfgen.c
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -62,7 +63,6 @@
|
||||
#include "nf_common.h"
|
||||
#include "util.h"
|
||||
#include "bookkeeper.h"
|
||||
#include "nfxstat.h"
|
||||
#include "collector.h"
|
||||
#include "exporter.h"
|
||||
#include "netflow_v5_v7.h"
|
||||
@ -96,18 +96,18 @@ static void SetIPaddress(master_record_t *record, int af, char *src_ip, char *d
|
||||
|
||||
if ( af == PF_INET6 ) {
|
||||
SetFlag(record->flags, FLAG_IPV6_ADDR);
|
||||
inet_pton(PF_INET6, src_ip, &(record->v6.srcaddr[0]));
|
||||
inet_pton(PF_INET6, dst_ip, &(record->v6.dstaddr[0]));
|
||||
record->v6.srcaddr[0] = ntohll(record->v6.srcaddr[0]);
|
||||
record->v6.srcaddr[1] = ntohll(record->v6.srcaddr[1]);
|
||||
record->v6.dstaddr[0] = ntohll(record->v6.dstaddr[0]);
|
||||
record->v6.dstaddr[1] = ntohll(record->v6.dstaddr[1]);
|
||||
inet_pton(PF_INET6, src_ip, &(record->V6.srcaddr[0]));
|
||||
inet_pton(PF_INET6, dst_ip, &(record->V6.dstaddr[0]));
|
||||
record->V6.srcaddr[0] = ntohll(record->V6.srcaddr[0]);
|
||||
record->V6.srcaddr[1] = ntohll(record->V6.srcaddr[1]);
|
||||
record->V6.dstaddr[0] = ntohll(record->V6.dstaddr[0]);
|
||||
record->V6.dstaddr[1] = ntohll(record->V6.dstaddr[1]);
|
||||
} else {
|
||||
ClearFlag(record->flags, FLAG_IPV6_ADDR);
|
||||
inet_pton(PF_INET, src_ip, &record->v4.srcaddr);
|
||||
inet_pton(PF_INET, dst_ip, &record->v4.dstaddr);
|
||||
record->v4.srcaddr = ntohl(record->v4.srcaddr);
|
||||
record->v4.dstaddr = ntohl(record->v4.dstaddr);
|
||||
inet_pton(PF_INET, src_ip, &record->V4.srcaddr);
|
||||
inet_pton(PF_INET, dst_ip, &record->V4.dstaddr);
|
||||
record->V4.srcaddr = ntohl(record->V4.srcaddr);
|
||||
record->V4.dstaddr = ntohl(record->V4.dstaddr);
|
||||
}
|
||||
|
||||
} // End of SetIPaddress
|
||||
@ -116,13 +116,13 @@ static void SetNextIPaddress(master_record_t *record, int af, char *next_ip) {
|
||||
|
||||
if ( af == PF_INET6 ) {
|
||||
SetFlag(record->flags, FLAG_IPV6_NH);
|
||||
inet_pton(PF_INET6, next_ip, &(record->ip_nexthop.v6[0]));
|
||||
record->ip_nexthop.v6[0] = ntohll(record->ip_nexthop.v6[0]);
|
||||
record->ip_nexthop.v6[1] = ntohll(record->ip_nexthop.v6[1]);
|
||||
inet_pton(PF_INET6, next_ip, &(record->ip_nexthop.V6[0]));
|
||||
record->ip_nexthop.V6[0] = ntohll(record->ip_nexthop.V6[0]);
|
||||
record->ip_nexthop.V6[1] = ntohll(record->ip_nexthop.V6[1]);
|
||||
} else {
|
||||
ClearFlag(record->flags, FLAG_IPV6_NH);
|
||||
inet_pton(PF_INET, next_ip, &record->ip_nexthop.v4);
|
||||
record->ip_nexthop.v4 = ntohl(record->ip_nexthop.v4);
|
||||
inet_pton(PF_INET, next_ip, &record->ip_nexthop.V4);
|
||||
record->ip_nexthop.V4 = ntohl(record->ip_nexthop.V4);
|
||||
}
|
||||
|
||||
} // End of SetNextIPaddress
|
||||
@ -131,13 +131,13 @@ static void SetRouterIPaddress(master_record_t *record, int af, char *next_ip)
|
||||
|
||||
if ( af == PF_INET6 ) {
|
||||
SetFlag(record->flags, FLAG_IPV6_NH);
|
||||
inet_pton(PF_INET6, next_ip, &(record->ip_router.v6[0]));
|
||||
record->ip_router.v6[0] = ntohll(record->ip_router.v6[0]);
|
||||
record->ip_router.v6[1] = ntohll(record->ip_router.v6[1]);
|
||||
inet_pton(PF_INET6, next_ip, &(record->ip_router.V6[0]));
|
||||
record->ip_router.V6[0] = ntohll(record->ip_router.V6[0]);
|
||||
record->ip_router.V6[1] = ntohll(record->ip_router.V6[1]);
|
||||
} else {
|
||||
ClearFlag(record->flags, FLAG_IPV6_NH);
|
||||
inet_pton(PF_INET, next_ip, &record->ip_router.v4);
|
||||
record->ip_router.v4 = ntohl(record->ip_router.v4);
|
||||
inet_pton(PF_INET, next_ip, &record->ip_router.V4);
|
||||
record->ip_router.V4 = ntohl(record->ip_router.V4);
|
||||
}
|
||||
|
||||
} // End of SetRouterIPaddress
|
||||
@ -146,13 +146,13 @@ static void SetBGPNextIPaddress(master_record_t *record, int af, char *next_ip)
|
||||
|
||||
if ( af == PF_INET6 ) {
|
||||
SetFlag(record->flags, FLAG_IPV6_NHB);
|
||||
inet_pton(PF_INET6, next_ip, &(record->bgp_nexthop.v6[0]));
|
||||
record->bgp_nexthop.v6[0] = ntohll(record->bgp_nexthop.v6[0]);
|
||||
record->bgp_nexthop.v6[1] = ntohll(record->bgp_nexthop.v6[1]);
|
||||
inet_pton(PF_INET6, next_ip, &(record->bgp_nexthop.V6[0]));
|
||||
record->bgp_nexthop.V6[0] = ntohll(record->bgp_nexthop.V6[0]);
|
||||
record->bgp_nexthop.V6[1] = ntohll(record->bgp_nexthop.V6[1]);
|
||||
} else {
|
||||
ClearFlag(record->flags, FLAG_IPV6_NHB);
|
||||
inet_pton(PF_INET, next_ip, &record->bgp_nexthop.v4);
|
||||
record->bgp_nexthop.v4 = ntohl(record->bgp_nexthop.v4);
|
||||
inet_pton(PF_INET, next_ip, &record->bgp_nexthop.V4);
|
||||
record->bgp_nexthop.V4 = ntohl(record->bgp_nexthop.V4);
|
||||
}
|
||||
|
||||
} // End of SetBGPNextIPaddress
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,17 +29,12 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nflowcache.c 40 2009-12-16 10:41:44Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 40 $
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
@ -115,6 +111,14 @@ static struct aggregate_info_s {
|
||||
{ "srcip", { 8, OffsetSrcIPv6b, MaskIPv6, ShiftIPv6 }, -1, 0, NULL },
|
||||
{ "dstip", { 8, OffsetDstIPv6a, MaskIPv6, ShiftIPv6 }, -1, 0, "%da" },
|
||||
{ "dstip", { 8, OffsetDstIPv6b, MaskIPv6, ShiftIPv6 }, -1, 0, NULL },
|
||||
#ifdef NSEL
|
||||
{ "xsrcip", { 8, OffsetXLATESRCv6a, MaskIPv6, ShiftIPv6 }, -1, 0, "%xsa" },
|
||||
{ "xsrcip", { 8, OffsetXLATESRCv6b, MaskIPv6, ShiftIPv6 }, -1, 0, NULL },
|
||||
{ "xdstip", { 8, OffsetXLATEDSTv6a, MaskIPv6, ShiftIPv6 }, -1, 0, "%xda" },
|
||||
{ "xdstip", { 8, OffsetXLATESRCv6b, MaskIPv6, ShiftIPv6 }, -1, 0, NULL },
|
||||
{ "xsrcport", { 2, OffsetXLATEPort, MaskXLATESRCPORT, ShiftXLATESRCPORT }, -1, 0, "%xsp" },
|
||||
{ "xdstport", { 2, OffsetXLATEPort, MaskXLATEDSTPORT, ShiftXLATEDSTPORT }, -1, 0, "%xdp" },
|
||||
#endif
|
||||
{ "dstip4", { 8, OffsetDstIPv6a, MaskIPv6, ShiftIPv6 }, 0, 0, "%da" },
|
||||
{ "dstip4", { 8, OffsetDstIPv6b, MaskIPv6, ShiftIPv6 }, 1, 0, NULL },
|
||||
{ "dstip6", { 8, OffsetDstIPv6a, MaskIPv6, ShiftIPv6 }, 0, 0, "%da" },
|
||||
@ -910,20 +914,20 @@ Default_key_t *keyptr;
|
||||
} else if ( swap_flow ) {
|
||||
// default 5-tuple aggregation for bidirectional flows
|
||||
keyptr = (Default_key_t *)keymem;
|
||||
keyptr->srcaddr[0] = flow_record->v6.dstaddr[0];
|
||||
keyptr->srcaddr[1] = flow_record->v6.dstaddr[1];
|
||||
keyptr->dstaddr[0] = flow_record->v6.srcaddr[0];
|
||||
keyptr->dstaddr[1] = flow_record->v6.srcaddr[1];
|
||||
keyptr->srcaddr[0] = flow_record->V6.dstaddr[0];
|
||||
keyptr->srcaddr[1] = flow_record->V6.dstaddr[1];
|
||||
keyptr->dstaddr[0] = flow_record->V6.srcaddr[0];
|
||||
keyptr->dstaddr[1] = flow_record->V6.srcaddr[1];
|
||||
keyptr->srcport = flow_record->dstport;
|
||||
keyptr->dstport = flow_record->srcport;
|
||||
keyptr->proto = flow_record->prot;
|
||||
} else {
|
||||
// default 5-tuple aggregation
|
||||
keyptr = (Default_key_t *)keymem;
|
||||
keyptr->srcaddr[0] = flow_record->v6.srcaddr[0];
|
||||
keyptr->srcaddr[1] = flow_record->v6.srcaddr[1];
|
||||
keyptr->dstaddr[0] = flow_record->v6.dstaddr[0];
|
||||
keyptr->dstaddr[1] = flow_record->v6.dstaddr[1];
|
||||
keyptr->srcaddr[0] = flow_record->V6.srcaddr[0];
|
||||
keyptr->srcaddr[1] = flow_record->V6.srcaddr[1];
|
||||
keyptr->dstaddr[0] = flow_record->V6.dstaddr[0];
|
||||
keyptr->dstaddr[1] = flow_record->V6.dstaddr[1];
|
||||
keyptr->srcport = flow_record->srcport;
|
||||
keyptr->dstport = flow_record->dstport;
|
||||
keyptr->proto = flow_record->prot;
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,17 +29,21 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nflowcache.h 39 2009-11-25 08:11:15Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 39 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NFLOWCACHE_H
|
||||
#define _NFLOWCACHE_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "nfx.h"
|
||||
#include "nffile.h"
|
||||
|
||||
/* Definitions */
|
||||
|
||||
/*
|
||||
|
27
bin/nfnet.c
27
bin/nfnet.c
@ -178,12 +178,11 @@ int error, p, sockfd;
|
||||
int Unicast_send_socket (const char *hostname, const char *sendport, int family,
|
||||
unsigned int wmem_size, struct sockaddr_storage *addr, int *addrlen) {
|
||||
struct addrinfo hints, *res, *ressave;
|
||||
int n, sockfd;
|
||||
int error, sockfd;
|
||||
unsigned int wmem_actual;
|
||||
socklen_t optlen;
|
||||
|
||||
if ( !hostname || !sendport ) {
|
||||
fprintf(stderr, "hostname and listen port required!\n");
|
||||
LogError("hostname and listen port required!");
|
||||
return -1;
|
||||
}
|
||||
@ -194,10 +193,9 @@ socklen_t optlen;
|
||||
hints.ai_family = family;
|
||||
hints.ai_socktype = SOCK_DGRAM;
|
||||
|
||||
n = getaddrinfo(hostname, sendport, &hints, &res);
|
||||
|
||||
if ( n < 0 ) {
|
||||
fprintf(stderr, "getaddrinfo error: [%s]\n", strerror(errno));
|
||||
error = getaddrinfo(hostname, sendport, &hints, &res);
|
||||
if ( error ) {
|
||||
LogError("getaddrinfo() error: %s", gai_strerror(error));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -205,27 +203,28 @@ socklen_t optlen;
|
||||
sockfd = -1;
|
||||
while (res) {
|
||||
sockfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
|
||||
|
||||
if ( !(sockfd < 0) ) {
|
||||
if ( sockfd < 0 ) {
|
||||
LogError("socket() error: could not open the requested socket: %s", strerror (errno));
|
||||
} else {
|
||||
// socket call was successsful
|
||||
if (connect(sockfd, res->ai_addr, res->ai_addrlen) == 0) {
|
||||
if (connect(sockfd, res->ai_addr, res->ai_addrlen) < 0) {
|
||||
// unsuccessful connect :(
|
||||
LogError("connect() error: could not open the requested socket: %s", strerror (errno));
|
||||
close(sockfd);
|
||||
sockfd = -1;
|
||||
} else {
|
||||
// connect successful - we are done
|
||||
close(sockfd);
|
||||
// ok - we need now an unconnected socket
|
||||
sockfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
|
||||
break;
|
||||
}
|
||||
// unsuccessful connect :(
|
||||
close(sockfd);
|
||||
sockfd = -1;
|
||||
}
|
||||
res=res->ai_next;
|
||||
}
|
||||
|
||||
if (sockfd < 0) {
|
||||
freeaddrinfo(ressave);
|
||||
fprintf(stderr, "Send socket error: could not open the requested socket: %s\n", strerror (errno));
|
||||
LogError("Send socket error: could not open the requested socket: %s", strerror (errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
23
bin/nfnet.h
23
bin/nfnet.h
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,17 +29,16 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nfnet.h 39 2009-11-25 08:11:15Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 39 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NFNET_H
|
||||
#define _NFNET_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/socket.h>
|
||||
|
||||
|
||||
/* Definitions */
|
||||
|
||||
#define UDP_PACKET_SIZE 1472
|
||||
@ -57,6 +57,17 @@ typedef struct send_peer_s {
|
||||
void *endp;
|
||||
} send_peer_t;
|
||||
|
||||
typedef struct repeater_s {
|
||||
char *hostname;
|
||||
char *port;
|
||||
struct sockaddr_storage addr;
|
||||
int addrlen;
|
||||
int family;
|
||||
int sockfd;
|
||||
} repeater_t;
|
||||
|
||||
#define MAX_REPEATERS 8
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
int Unicast_receive_socket(const char *bindhost, const char *listenport, int family, int sockbuflen );
|
||||
|
@ -92,7 +92,6 @@
|
||||
#include "flist.h"
|
||||
#include "nfstatfile.h"
|
||||
#include "bookkeeper.h"
|
||||
#include "nfxstat.h"
|
||||
#include "collector.h"
|
||||
#include "exporter.h"
|
||||
#include "rbtree.h"
|
||||
@ -141,7 +140,7 @@ int verbose = 0;
|
||||
|
||||
static const char *nfdump_version = VERSION;
|
||||
|
||||
static int launcher_alive, periodic_trigger, launcher_pid;
|
||||
static int launcher_pid;
|
||||
static pthread_mutex_t m_done = PTHREAD_MUTEX_INITIALIZER;
|
||||
static pthread_cond_t terminate = PTHREAD_COND_INITIALIZER;
|
||||
static pthread_key_t buffer_key;
|
||||
@ -646,7 +645,6 @@ int err, done;
|
||||
pthread_kill(args->parent, SIGUSR1);
|
||||
pthread_exit((void *)args);
|
||||
}
|
||||
fs->xstat = NULL;
|
||||
|
||||
// init vars
|
||||
fs->bad_packets = 0;
|
||||
@ -764,9 +762,9 @@ int err, done;
|
||||
UpdateBooks(fs->bookkeeper, t_start, 512*fstat.st_blocks);
|
||||
}
|
||||
|
||||
LogInfo("Ident: '%s' Flows: %llu, Packets: %llu, Bytes: %llu, Max Flows: %u",
|
||||
LogInfo("Ident: '%s' Flows: %llu, Packets: %llu, Bytes: %llu, Max Flows: %u, Fragments: %u",
|
||||
fs->Ident, (unsigned long long)nffile->stat_record->numflows, (unsigned long long)nffile->stat_record->numpackets,
|
||||
(unsigned long long)nffile->stat_record->numbytes, NumFlows);
|
||||
(unsigned long long)nffile->stat_record->numbytes, NumFlows, IPFragEntries());
|
||||
|
||||
// reset stats
|
||||
fs->bad_packets = 0;
|
||||
|
18
bin/nfprof.h
18
bin/nfprof.h
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,17 +29,22 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nfprof.h 39 2009-11-25 08:11:15Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 39 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NFPROF_H
|
||||
#define _NFPROF_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
typedef struct nfprof_s {
|
||||
struct timeval tstart; /* start time */
|
||||
struct timeval tend; /* end time */
|
||||
|
@ -1,7 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
* Copyright (c) 2009 - 2018, Peter Haag
|
||||
* Copyright (c) 2004 - 2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -28,12 +27,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nfprofile.c 39 2009-11-25 08:11:15Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 39 $
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -64,7 +57,6 @@
|
||||
#include "nfstat.h"
|
||||
#include "nfstatfile.h"
|
||||
#include "bookkeeper.h"
|
||||
#include "nfxstat.h"
|
||||
#include "collector.h"
|
||||
#include "exporter.h"
|
||||
#include "ipconv.h"
|
||||
@ -87,13 +79,16 @@ extension_map_list_t *extension_map_list;
|
||||
uint32_t is_anonymized;
|
||||
char Ident[IDENTLEN];
|
||||
|
||||
#ifdef HAVE_INFLUXDB
|
||||
char influxdb_url[1024]="";
|
||||
#endif
|
||||
|
||||
/* Function Prototypes */
|
||||
static void usage(char *name);
|
||||
|
||||
static profile_param_info_t *ParseParams (char *profile_datadir);
|
||||
|
||||
static void process_data(profile_channel_info_t *channels, unsigned int num_channels, time_t tslot, int do_xstat);
|
||||
|
||||
static void process_data(profile_channel_info_t *channels, unsigned int num_channels, time_t tslot);
|
||||
|
||||
/* Functions */
|
||||
|
||||
@ -105,7 +100,6 @@ static void usage(char *name) {
|
||||
"-h\t\tthis text you see right here\n"
|
||||
"-V\t\tPrint version and exit.\n"
|
||||
"-D <dns>\tUse nameserver <dns> for host lookup.\n"
|
||||
"-H Add xstat histogram data to flow file.(default 'no')\n"
|
||||
"-M <expr>\tRead input from multiple directories.\n"
|
||||
"-r\t\tread input from file\n"
|
||||
"-f\t\tfilename with filter syntaxfile\n"
|
||||
@ -115,11 +109,14 @@ static void usage(char *name) {
|
||||
"-Z\t\tCheck filter syntax and exit.\n"
|
||||
"-S subdir\tSub directory format. see nfcapd(1) for format\n"
|
||||
"-z\t\tCompress flows in output file.\n"
|
||||
#ifdef HAVE_INFLUXDB
|
||||
"-i <influxurl>\tInfluxdb url for stats (example: http://localhost:8086/write?db=mydb&u=pippo&p=paperino)\n"
|
||||
#endif
|
||||
"-t <time>\ttime for RRD update\n", name);
|
||||
} /* usage */
|
||||
|
||||
|
||||
static void process_data(profile_channel_info_t *channels, unsigned int num_channels, time_t tslot, int do_xstat) {
|
||||
static void process_data(profile_channel_info_t *channels, unsigned int num_channels, time_t tslot) {
|
||||
common_record_t *flow_record;
|
||||
nffile_t *nffile;
|
||||
FilterEngine_data_t *engine;
|
||||
@ -269,9 +266,6 @@ int v1_map_done = 0;
|
||||
if ( channels[j].nffile )
|
||||
UpdateStat(channels[j].nffile->stat_record, master_record);
|
||||
|
||||
if ( channels[j].xstat )
|
||||
UpdateXStat(channels[j].xstat, master_record);
|
||||
|
||||
// do we need to write data to new file - shadow profiles do not have files.
|
||||
// check if we need to flush the output buffer
|
||||
if ( channels[j].nffile != NULL ) {
|
||||
@ -529,7 +523,7 @@ struct stat stat_buf;
|
||||
profile_param_info_t *profile_list;
|
||||
char *rfile, *ffile, *filename, *Mdirs;
|
||||
char *profile_datadir, *profile_statdir, *nameserver;
|
||||
int c, syntax_only, subdir_index, stdin_profile_params, do_xstat;
|
||||
int c, syntax_only, subdir_index, stdin_profile_params;
|
||||
time_t tslot;
|
||||
|
||||
profile_datadir = NULL;
|
||||
@ -537,7 +531,6 @@ time_t tslot;
|
||||
Mdirs = NULL;
|
||||
tslot = 0;
|
||||
syntax_only = 0;
|
||||
do_xstat = 0;
|
||||
compress = NOT_COMPRESSED;
|
||||
subdir_index = 0;
|
||||
profile_list = NULL;
|
||||
@ -551,7 +544,7 @@ time_t tslot;
|
||||
// default file names
|
||||
ffile = "filter.txt";
|
||||
rfile = NULL;
|
||||
while ((c = getopt(argc, argv, "D:HIL:p:P:hf:J;r:n:M:S:t:VzZ")) != EOF) {
|
||||
while ((c = getopt(argc, argv, "D:HIL:p:P:hi:f:J;r:n:M:S:t:VzZ")) != EOF) {
|
||||
switch (c) {
|
||||
case 'h':
|
||||
usage(argv[0]);
|
||||
@ -566,9 +559,6 @@ time_t tslot;
|
||||
case 'I':
|
||||
stdin_profile_params = 1;
|
||||
break;
|
||||
case 'H':
|
||||
do_xstat = 1;
|
||||
break;
|
||||
case 'L':
|
||||
if ( !InitLog("nfprofile", optarg) )
|
||||
exit(255);
|
||||
@ -603,18 +593,36 @@ time_t tslot;
|
||||
break;
|
||||
case 'j':
|
||||
if ( compress ) {
|
||||
LogError("Use either -z for LZO or -j for BZ2 compression, but not both\n");
|
||||
LogError("Use one compression: -z for LZO, -j for BZ2 or -y for LZ4 compression\n");
|
||||
exit(255);
|
||||
}
|
||||
compress = BZ2_COMPRESSED;
|
||||
break;
|
||||
case 'y':
|
||||
if ( compress ) {
|
||||
LogError("Use one compression: -z for LZO, -j for BZ2 or -y for LZ4 compression\n");
|
||||
exit(255);
|
||||
}
|
||||
compress = LZ4_COMPRESSED;
|
||||
break;
|
||||
case 'z':
|
||||
if ( compress ) {
|
||||
LogError("Use either -z for LZO or -j for BZ2 compression, but not both\n");
|
||||
LogError("Use one compression: -z for LZO, -j for BZ2 or -y for LZ4 compression\n");
|
||||
exit(255);
|
||||
}
|
||||
compress = LZO_COMPRESSED;
|
||||
break;
|
||||
#ifdef HAVE_INFLUXDB
|
||||
case 'i':
|
||||
if ( optarg != NULL )
|
||||
strncpy(influxdb_url, optarg, 1024);
|
||||
else {
|
||||
LogError("Missing argument for -i <influx URL>\n");
|
||||
exit(255);
|
||||
}
|
||||
influxdb_url[1023] = '\0';
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
usage(argv[0]);
|
||||
exit(0);
|
||||
@ -668,7 +676,7 @@ time_t tslot;
|
||||
exit(255);
|
||||
}
|
||||
|
||||
num_channels = InitChannels(profile_datadir, profile_statdir, profile_list, ffile, filename, subdir_index, syntax_only, compress, do_xstat);
|
||||
num_channels = InitChannels(profile_datadir, profile_statdir, profile_list, ffile, filename, subdir_index, syntax_only, compress);
|
||||
|
||||
// nothing to do
|
||||
if ( num_channels == 0 ) {
|
||||
@ -693,7 +701,7 @@ time_t tslot;
|
||||
|
||||
SetupInputFileSequence(Mdirs,rfile, NULL);
|
||||
|
||||
process_data(GetChannelInfoList(), num_channels, tslot, do_xstat);
|
||||
process_data(GetChannelInfoList(), num_channels, tslot);
|
||||
|
||||
CloseChannels(tslot, compress);
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,13 +29,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nfreader.c 48 2010-01-02 08:06:27Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 48 $
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -80,7 +74,6 @@
|
||||
#include "nffile.h"
|
||||
#include "nfx.h"
|
||||
#include "bookkeeper.h"
|
||||
#include "nfxstat.h"
|
||||
#include "collector.h"
|
||||
#include "exporter.h"
|
||||
#include "util.h"
|
||||
@ -124,17 +117,17 @@ struct tm *ts;
|
||||
master_record_t *r = (master_record_t *)record;
|
||||
|
||||
if ( (r->flags & FLAG_IPV6_ADDR ) != 0 ) { // IPv6
|
||||
r->v6.srcaddr[0] = htonll(r->v6.srcaddr[0]);
|
||||
r->v6.srcaddr[1] = htonll(r->v6.srcaddr[1]);
|
||||
r->v6.dstaddr[0] = htonll(r->v6.dstaddr[0]);
|
||||
r->v6.dstaddr[1] = htonll(r->v6.dstaddr[1]);
|
||||
inet_ntop(AF_INET6, r->v6.srcaddr, as, sizeof(as));
|
||||
inet_ntop(AF_INET6, r->v6.dstaddr, ds, sizeof(ds));
|
||||
r->V6.srcaddr[0] = htonll(r->V6.srcaddr[0]);
|
||||
r->V6.srcaddr[1] = htonll(r->V6.srcaddr[1]);
|
||||
r->V6.dstaddr[0] = htonll(r->V6.dstaddr[0]);
|
||||
r->V6.dstaddr[1] = htonll(r->V6.dstaddr[1]);
|
||||
inet_ntop(AF_INET6, r->V6.srcaddr, as, sizeof(as));
|
||||
inet_ntop(AF_INET6, r->V6.dstaddr, ds, sizeof(ds));
|
||||
} else { // IPv4
|
||||
r->v4.srcaddr = htonl(r->v4.srcaddr);
|
||||
r->v4.dstaddr = htonl(r->v4.dstaddr);
|
||||
inet_ntop(AF_INET, &r->v4.srcaddr, as, sizeof(as));
|
||||
inet_ntop(AF_INET, &r->v4.dstaddr, ds, sizeof(ds));
|
||||
r->V4.srcaddr = htonl(r->V4.srcaddr);
|
||||
r->V4.dstaddr = htonl(r->V4.dstaddr);
|
||||
inet_ntop(AF_INET, &r->V4.srcaddr, as, sizeof(as));
|
||||
inet_ntop(AF_INET, &r->V4.dstaddr, ds, sizeof(ds));
|
||||
}
|
||||
as[40-1] = 0;
|
||||
ds[40-1] = 0;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Peter Haag
|
||||
* Copyright (c) 2018, 2017, 2016 Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -62,7 +62,6 @@
|
||||
#include "nfdump.h"
|
||||
#include "nfnet.h"
|
||||
#include "bookkeeper.h"
|
||||
#include "nfxstat.h"
|
||||
#include "collector.h"
|
||||
#include "exporter.h"
|
||||
#include "netflow_v5_v7.h"
|
||||
@ -109,7 +108,7 @@ static void usage(char *name);
|
||||
static void send_blast(unsigned int delay );
|
||||
|
||||
static void send_data(char *rfile, time_t twin_start, time_t twin_end, uint32_t count,
|
||||
unsigned int delay, int confirm, int netflow_version);
|
||||
unsigned int delay, int confirm, int netflow_version, int distribution);
|
||||
|
||||
static int FlushBuffer(int confirm);
|
||||
|
||||
@ -133,6 +132,8 @@ static void usage(char *name) {
|
||||
"-b <bsize>\tSend buffer size.\n"
|
||||
"-r <input>\tread from file. default: stdin\n"
|
||||
"-f <filter>\tfilter syntaxfile\n"
|
||||
"-v <version>\tUse netflow version to send flows. Either 5 or 9\n"
|
||||
"-z <distribution>\tSimulate real time distribution with coefficient\n"
|
||||
"-t <time>\ttime window for sending packets\n"
|
||||
"\t\tyyyy/MM/dd.hh:mm:ss[-yyyy/MM/dd.hh:mm:ss]\n"
|
||||
, name);
|
||||
@ -204,13 +205,18 @@ double fps;
|
||||
} // End of send_blast
|
||||
|
||||
static void send_data(char *rfile, time_t twin_start,
|
||||
time_t twin_end, uint32_t count, unsigned int delay, int confirm, int netflow_version) {
|
||||
time_t twin_end, uint32_t count, unsigned int delay, int confirm, int netflow_version, int distribution) {
|
||||
master_record_t master_record;
|
||||
common_record_t *flow_record;
|
||||
nffile_t *nffile;
|
||||
int i, done, ret, again;
|
||||
uint32_t numflows, cnt;
|
||||
|
||||
// z-parameter variables
|
||||
struct timeval todayTime, currentTime;
|
||||
double first, last, now, today = 0, reftime = 0;
|
||||
int reducer = 0;
|
||||
|
||||
#ifdef COMPAT15
|
||||
int v1_map_done = 0;
|
||||
#endif
|
||||
@ -407,6 +413,31 @@ int v1_map_done = 0;
|
||||
LogError("Skip unknown record type %i\n", flow_record->type);
|
||||
}
|
||||
}
|
||||
|
||||
// z-parameter
|
||||
//first and last are line (tstart and tend) timestamp with milliseconds
|
||||
first = (double) flow_record->first + ((double)flow_record->msec_first / 1000);
|
||||
last = (double) flow_record->last + ((double)flow_record->msec_last / 1000);
|
||||
|
||||
gettimeofday(¤tTime, NULL);
|
||||
now = (double)currentTime.tv_sec + (double)currentTime.tv_usec / 1000000;
|
||||
|
||||
// remove incoherent values
|
||||
if (reftime == 0 && last > 1000000000 && last < 2000000000){
|
||||
reftime = last;
|
||||
gettimeofday(&todayTime, NULL);
|
||||
today = (double)todayTime.tv_sec + (double)todayTime.tv_usec / 1000000;
|
||||
}
|
||||
|
||||
// Reducer avoid to have too much computation: It takes 1 over 3 line to regulate sending time
|
||||
if (reducer % 3 == 0 && distribution != 0 && reftime != 0 && last > 1000000000){
|
||||
while (last - reftime > distribution * (now - today)){
|
||||
gettimeofday(¤tTime, NULL);
|
||||
now = (double)currentTime.tv_sec + (double)currentTime.tv_usec / 1000000;
|
||||
}
|
||||
}
|
||||
reducer++;
|
||||
|
||||
// Advance pointer by number of bytes for netflow record
|
||||
flow_record = (common_record_t *)((pointer_addr_t)flow_record + flow_record->size);
|
||||
|
||||
@ -438,7 +469,7 @@ int v1_map_done = 0;
|
||||
int main( int argc, char **argv ) {
|
||||
struct stat stat_buff;
|
||||
char *rfile, *ffile, *filter, *tstring;
|
||||
int c, confirm, ffd, ret, blast, netflow_version;
|
||||
int c, confirm, ffd, ret, blast, netflow_version, distribution;
|
||||
unsigned int delay, count, sockbuff_size;
|
||||
time_t t_start, t_end;
|
||||
|
||||
@ -458,7 +489,8 @@ time_t t_start, t_end;
|
||||
blast = 0;
|
||||
verbose = 0;
|
||||
confirm = 0;
|
||||
while ((c = getopt(argc, argv, "46BhH:i:K:L:p:d:c:b:j:r:f:t:v:VY")) != EOF) {
|
||||
distribution = 0;
|
||||
while ((c = getopt(argc, argv, "46BhH:i:K:L:p:d:c:b:j:r:f:t:v:z:VY")) != EOF) {
|
||||
switch (c) {
|
||||
case 'h':
|
||||
usage(argv[0]);
|
||||
@ -524,6 +556,9 @@ time_t t_start, t_end;
|
||||
case 'r':
|
||||
rfile = optarg;
|
||||
break;
|
||||
case 'z':
|
||||
distribution = atoi(optarg);
|
||||
break;
|
||||
case '4':
|
||||
if ( peer.family == AF_UNSPEC )
|
||||
peer.family = AF_INET;
|
||||
@ -611,7 +646,7 @@ time_t t_start, t_end;
|
||||
exit(255);
|
||||
}
|
||||
|
||||
send_data(rfile, t_start, t_end, count, delay, confirm, netflow_version);
|
||||
send_data(rfile, t_start, t_end, count, delay, confirm, netflow_version,distribution);
|
||||
|
||||
FreeExtensionMaps(extension_map_list);
|
||||
|
||||
|
49
bin/nfstat.c
49
bin/nfstat.c
@ -53,7 +53,6 @@
|
||||
#include "nffile.h"
|
||||
#include "nfx.h"
|
||||
#include "bookkeeper.h"
|
||||
#include "nfxstat.h"
|
||||
#include "collector.h"
|
||||
#include "exporter.h"
|
||||
#include "nfnet.h"
|
||||
@ -443,6 +442,7 @@ struct order_mode_s {
|
||||
#define Default_PrintOrder 1 // order_mode[0].val
|
||||
static uint32_t print_order_bits = 0;
|
||||
static uint32_t PrintOrder = 0;
|
||||
static uint32_t GuessDirection = 0;
|
||||
static uint32_t NumStats = 0;
|
||||
|
||||
static uint64_t byte_limit, packet_limit;
|
||||
@ -494,6 +494,12 @@ static uint64_t flows_record(FlowTableRecord_t *record, int inout) {
|
||||
}
|
||||
|
||||
static uint64_t packets_record(FlowTableRecord_t *record, int inout) {
|
||||
if ( GuessDirection && (record->flowrecord.srcport < record->flowrecord.dstport) ) {
|
||||
if (inout == IN)
|
||||
inout = OUT;
|
||||
else if (inout == OUT)
|
||||
inout = IN;
|
||||
}
|
||||
if (inout == IN)
|
||||
return record->counter[INPACKETS];
|
||||
else if (inout == OUT)
|
||||
@ -503,6 +509,12 @@ static uint64_t packets_record(FlowTableRecord_t *record, int inout) {
|
||||
}
|
||||
|
||||
static uint64_t bytes_record(FlowTableRecord_t *record, int inout) {
|
||||
if ( GuessDirection && (record->flowrecord.srcport < record->flowrecord.dstport) ) {
|
||||
if (inout == IN)
|
||||
inout = OUT;
|
||||
else if (inout == OUT)
|
||||
inout = IN;
|
||||
}
|
||||
if (inout == IN)
|
||||
return record->counter[INBYTES];
|
||||
else if (inout == OUT)
|
||||
@ -1436,6 +1448,7 @@ struct tm *tbuff;
|
||||
|
||||
} // End of PrintCvsStatLine
|
||||
|
||||
|
||||
void PrintFlowTable(printer_t print_record, uint32_t topN, int tag, int GuessDir, extension_map_list_t *extension_map_list) {
|
||||
hash_FlowTable *FlowTable;
|
||||
FlowTableRecord_t *r;
|
||||
@ -1446,12 +1459,13 @@ uint32_t i;
|
||||
uint32_t maxindex, c;
|
||||
char *string;
|
||||
|
||||
GuessDirection = GuessDir;
|
||||
FlowTable = GetFlowTable();
|
||||
aggr_record_mask = GetMasterAggregateMask();
|
||||
c = 0;
|
||||
maxindex = FlowTable->NumRecords;
|
||||
if ( PrintOrder ) {
|
||||
// Sort according the date
|
||||
// Sort according the requested order
|
||||
SortList = (SortElement_t *)calloc(maxindex, sizeof(SortElement_t));
|
||||
|
||||
if ( !SortList ) {
|
||||
@ -1544,10 +1558,10 @@ char *string;
|
||||
|
||||
// apply IP mask from aggregation, to provide a pretty output
|
||||
if ( FlowTable->has_masks ) {
|
||||
flow_record->v6.srcaddr[0] &= FlowTable->IPmask[0];
|
||||
flow_record->v6.srcaddr[1] &= FlowTable->IPmask[1];
|
||||
flow_record->v6.dstaddr[0] &= FlowTable->IPmask[2];
|
||||
flow_record->v6.dstaddr[1] &= FlowTable->IPmask[3];
|
||||
flow_record->V6.srcaddr[0] &= FlowTable->IPmask[0];
|
||||
flow_record->V6.srcaddr[1] &= FlowTable->IPmask[1];
|
||||
flow_record->V6.dstaddr[0] &= FlowTable->IPmask[2];
|
||||
flow_record->V6.dstaddr[1] &= FlowTable->IPmask[3];
|
||||
}
|
||||
|
||||
if ( aggr_record_mask ) {
|
||||
@ -1670,7 +1684,7 @@ uint32_t maxindex, c;
|
||||
else
|
||||
printf("Top flows ordered by %s:\n", order_mode[order_index].string);
|
||||
}
|
||||
if ( !record_header )
|
||||
if ( record_header )
|
||||
printf("%s\n", record_header);
|
||||
}
|
||||
PrintSortedFlowcache(SortList, maxindex, topN, 0, print_record, tag, DESCENDING, extension_map_list);
|
||||
@ -1719,10 +1733,10 @@ int i, max;
|
||||
|
||||
// apply IP mask from aggregation, to provide a pretty output
|
||||
if ( FlowTable->has_masks ) {
|
||||
flow_record->v6.srcaddr[0] &= FlowTable->IPmask[0];
|
||||
flow_record->v6.srcaddr[1] &= FlowTable->IPmask[1];
|
||||
flow_record->v6.dstaddr[0] &= FlowTable->IPmask[2];
|
||||
flow_record->v6.dstaddr[1] &= FlowTable->IPmask[3];
|
||||
flow_record->V6.srcaddr[0] &= FlowTable->IPmask[0];
|
||||
flow_record->V6.srcaddr[1] &= FlowTable->IPmask[1];
|
||||
flow_record->V6.dstaddr[0] &= FlowTable->IPmask[2];
|
||||
flow_record->V6.dstaddr[1] &= FlowTable->IPmask[3];
|
||||
}
|
||||
|
||||
if ( FlowTable->apply_netbits ) {
|
||||
@ -1888,12 +1902,12 @@ uint64_t _tmp_ip[2];
|
||||
uint64_t _tmp_l;
|
||||
uint32_t _tmp;
|
||||
|
||||
_tmp_ip[0] = flow_record->v6.srcaddr[0];
|
||||
_tmp_ip[1] = flow_record->v6.srcaddr[1];
|
||||
flow_record->v6.srcaddr[0] = flow_record->v6.dstaddr[0];
|
||||
flow_record->v6.srcaddr[1] = flow_record->v6.dstaddr[1];
|
||||
flow_record->v6.dstaddr[0] = _tmp_ip[0];
|
||||
flow_record->v6.dstaddr[1] = _tmp_ip[1];
|
||||
_tmp_ip[0] = flow_record->V6.srcaddr[0];
|
||||
_tmp_ip[1] = flow_record->V6.srcaddr[1];
|
||||
flow_record->V6.srcaddr[0] = flow_record->V6.dstaddr[0];
|
||||
flow_record->V6.srcaddr[1] = flow_record->V6.dstaddr[1];
|
||||
flow_record->V6.dstaddr[0] = _tmp_ip[0];
|
||||
flow_record->V6.dstaddr[1] = _tmp_ip[1];
|
||||
|
||||
_tmp = flow_record->srcport;
|
||||
flow_record->srcport = flow_record->dstport;
|
||||
@ -1916,3 +1930,4 @@ uint32_t _tmp;
|
||||
flow_record->out_bytes = _tmp_l;
|
||||
|
||||
} // End of SwapFlow
|
||||
|
||||
|
11
bin/nfstat.h
11
bin/nfstat.h
@ -34,6 +34,17 @@
|
||||
#ifndef _NFSTAT_H
|
||||
#define _NFSTAT_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "nf_common.h"
|
||||
#include "nfx.h"
|
||||
#include "nffile.h"
|
||||
|
||||
/* Definitions */
|
||||
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,17 +29,18 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nfstatfile.h 39 2009-11-25 08:11:15Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 39 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NFSTATFILE_H
|
||||
#define _NFSTATFILE_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
typedef struct dirstat_s {
|
||||
uint64_t first; // for more easy parsing and assigning, take a uint64_t also for the time_t type
|
||||
uint64_t last;
|
||||
|
199
bin/nftest.c
199
bin/nftest.c
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,12 +29,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nftest.c 39 2009-11-25 08:11:15Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 39 $
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -137,11 +132,11 @@ nffile_t *nffile_w, *nffile_r;
|
||||
int i, compress, bsize;
|
||||
ssize_t ret;
|
||||
char outfile[MAXPATHLEN];
|
||||
struct timeval tstart[3];
|
||||
struct timeval tend[3];
|
||||
struct timeval tstart[4];
|
||||
struct timeval tend[4];
|
||||
u_long usec, sec;
|
||||
double wall[3];
|
||||
uint32_t recsize[3];
|
||||
double wall[4];
|
||||
uint32_t recsize[4];
|
||||
|
||||
nffile_r = OpenFile(filename, NULL);
|
||||
if ( !nffile_r ) {
|
||||
@ -162,18 +157,19 @@ uint32_t recsize[3];
|
||||
nffile_w = NULL;
|
||||
|
||||
bsize = nffile_r->block_header->size;
|
||||
for ( compress=0; compress<=2; compress++ ) {
|
||||
for ( compress=NOT_COMPRESSED; compress<=LZ4_COMPRESSED; compress++ ) {
|
||||
int wsize;
|
||||
nffile_w = OpenNewFile(outfile, nffile_w, compress, 0, NULL);
|
||||
if ( !nffile_w ) {
|
||||
DisposeFile(nffile_r);
|
||||
return;
|
||||
}
|
||||
|
||||
// fill buffer
|
||||
memcpy(nffile_w->buff_pool[0], nffile_r->buff_pool[0], nffile_r->buff_size);
|
||||
gettimeofday(&(tstart[compress]), (struct timezone*)NULL);
|
||||
for ( i=0; i<100; i++ ) {
|
||||
nffile_w->block_header->size = bsize;
|
||||
wsize = WriteExtraBlock(nffile_w, nffile_r->block_header);
|
||||
wsize = WriteBlock(nffile_w);
|
||||
if ( wsize <= 0 ) {
|
||||
fprintf(stderr, "Failed to write output buffer to disk: '%s'" , strerror(errno));
|
||||
// Cleanup
|
||||
@ -206,6 +202,7 @@ uint32_t recsize[3];
|
||||
printf("100 write cycles, with size %u bytes\n", bsize);
|
||||
printf("Uncompressed write time: %-.6fs size: %u, 1:%-.3f\n", wall[0], recsize[0], (double)recsize[0]/(double)bsize );
|
||||
printf("LZO compressed write time : %-.6fs size: %d, 1:%-.3f\n", wall[1], (int32_t)recsize[1], (double)recsize[1]/(double)bsize );
|
||||
printf("LZ4 compressed write time : %-.6fs size: %d, 1:%-.3f\n", wall[1], (int32_t)recsize[1], (double)recsize[1]/(double)bsize );
|
||||
printf("BZ2 compressed write time : %-.6fs size: %d, 1:%-.3f\n", wall[2], (int32_t)recsize[2], (double)recsize[2]/(double)bsize );
|
||||
|
||||
} // End of CheckCompression
|
||||
@ -371,12 +368,12 @@ void *p;
|
||||
ret = check_filter_block("icmp-code 4", &flow_record, 0);
|
||||
|
||||
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1234:5678", flow_record.v6.srcaddr);
|
||||
inet_pton(PF_INET6, "fe80::1104:fedc:4321:8765", flow_record.v6.dstaddr);
|
||||
flow_record.v6.srcaddr[0] = ntohll(flow_record.v6.srcaddr[0]);
|
||||
flow_record.v6.srcaddr[1] = ntohll(flow_record.v6.srcaddr[1]);
|
||||
flow_record.v6.dstaddr[0] = ntohll(flow_record.v6.dstaddr[0]);
|
||||
flow_record.v6.dstaddr[1] = ntohll(flow_record.v6.dstaddr[1]);
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1234:5678", flow_record.V6.srcaddr);
|
||||
inet_pton(PF_INET6, "fe80::1104:fedc:4321:8765", flow_record.V6.dstaddr);
|
||||
flow_record.V6.srcaddr[0] = ntohll(flow_record.V6.srcaddr[0]);
|
||||
flow_record.V6.srcaddr[1] = ntohll(flow_record.V6.srcaddr[1]);
|
||||
flow_record.V6.dstaddr[0] = ntohll(flow_record.V6.dstaddr[0]);
|
||||
flow_record.V6.dstaddr[1] = ntohll(flow_record.V6.dstaddr[1]);
|
||||
ret = check_filter_block("src ip fe80::2110:abcd:1234:5678", &flow_record, 1);
|
||||
ret = check_filter_block("src ip fe80::2110:abcd:1234:5679", &flow_record, 0);
|
||||
ret = check_filter_block("src ip fe80::2111:abcd:1234:5678", &flow_record, 0);
|
||||
@ -393,39 +390,39 @@ void *p;
|
||||
ret = check_filter_block("src ip in [fe80::2110:abcd:1234:5678]", &flow_record, 1);
|
||||
ret = check_filter_block("src ip in [fe80::2110:abcd:1234:5679]", &flow_record, 0);
|
||||
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1234:0", flow_record.v6.srcaddr);
|
||||
flow_record.v6.srcaddr[0] = ntohll(flow_record.v6.srcaddr[0]);
|
||||
flow_record.v6.srcaddr[1] = ntohll(flow_record.v6.srcaddr[1]);
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1234:0", flow_record.V6.srcaddr);
|
||||
flow_record.V6.srcaddr[0] = ntohll(flow_record.V6.srcaddr[0]);
|
||||
flow_record.V6.srcaddr[1] = ntohll(flow_record.V6.srcaddr[1]);
|
||||
ret = check_filter_block("src net fe80::2110:abcd:1234:0/112", &flow_record, 1);
|
||||
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1234:ffff", flow_record.v6.srcaddr);
|
||||
flow_record.v6.srcaddr[0] = ntohll(flow_record.v6.srcaddr[0]);
|
||||
flow_record.v6.srcaddr[1] = ntohll(flow_record.v6.srcaddr[1]);
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1234:ffff", flow_record.V6.srcaddr);
|
||||
flow_record.V6.srcaddr[0] = ntohll(flow_record.V6.srcaddr[0]);
|
||||
flow_record.V6.srcaddr[1] = ntohll(flow_record.V6.srcaddr[1]);
|
||||
ret = check_filter_block("src net fe80::2110:abcd:1234:0/112", &flow_record, 1);
|
||||
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1235:ffff", flow_record.v6.srcaddr);
|
||||
flow_record.v6.srcaddr[0] = ntohll(flow_record.v6.srcaddr[0]);
|
||||
flow_record.v6.srcaddr[1] = ntohll(flow_record.v6.srcaddr[1]);
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1235:ffff", flow_record.V6.srcaddr);
|
||||
flow_record.V6.srcaddr[0] = ntohll(flow_record.V6.srcaddr[0]);
|
||||
flow_record.V6.srcaddr[1] = ntohll(flow_record.V6.srcaddr[1]);
|
||||
ret = check_filter_block("src net fe80::2110:abcd:1234:0/112", &flow_record, 0);
|
||||
ret = check_filter_block("src net fe80::0/16", &flow_record, 1);
|
||||
ret = check_filter_block("src net fe81::0/16", &flow_record, 0);
|
||||
|
||||
flow_record.v6.srcaddr[0] = 0;
|
||||
flow_record.v6.srcaddr[1] = 0;
|
||||
flow_record.V6.srcaddr[0] = 0;
|
||||
flow_record.V6.srcaddr[1] = 0;
|
||||
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1234:0", flow_record.v6.dstaddr);
|
||||
flow_record.v6.dstaddr[0] = ntohll(flow_record.v6.dstaddr[0]);
|
||||
flow_record.v6.dstaddr[1] = ntohll(flow_record.v6.dstaddr[1]);
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1234:0", flow_record.V6.dstaddr);
|
||||
flow_record.V6.dstaddr[0] = ntohll(flow_record.V6.dstaddr[0]);
|
||||
flow_record.V6.dstaddr[1] = ntohll(flow_record.V6.dstaddr[1]);
|
||||
ret = check_filter_block("dst net fe80::2110:abcd:1234:0/112", &flow_record, 1);
|
||||
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1234:ffff", flow_record.v6.dstaddr);
|
||||
flow_record.v6.dstaddr[0] = ntohll(flow_record.v6.dstaddr[0]);
|
||||
flow_record.v6.dstaddr[1] = ntohll(flow_record.v6.dstaddr[1]);
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1234:ffff", flow_record.V6.dstaddr);
|
||||
flow_record.V6.dstaddr[0] = ntohll(flow_record.V6.dstaddr[0]);
|
||||
flow_record.V6.dstaddr[1] = ntohll(flow_record.V6.dstaddr[1]);
|
||||
ret = check_filter_block("dst net fe80::2110:abcd:1234:0/112", &flow_record, 1);
|
||||
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1235:ffff", flow_record.v6.dstaddr);
|
||||
flow_record.v6.dstaddr[0] = ntohll(flow_record.v6.dstaddr[0]);
|
||||
flow_record.v6.dstaddr[1] = ntohll(flow_record.v6.dstaddr[1]);
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1235:ffff", flow_record.V6.dstaddr);
|
||||
flow_record.V6.dstaddr[0] = ntohll(flow_record.V6.dstaddr[0]);
|
||||
flow_record.V6.dstaddr[1] = ntohll(flow_record.V6.dstaddr[1]);
|
||||
ret = check_filter_block("dst net fe80::2110:abcd:1234:0/112", &flow_record, 0);
|
||||
ret = check_filter_block("dst net fe80::0/16", &flow_record, 1);
|
||||
ret = check_filter_block("not dst net fe80::0/16", &flow_record, 0);
|
||||
@ -436,13 +433,15 @@ void *p;
|
||||
/* 172.32.7.16 => 0xac200710
|
||||
* 10.10.10.11 => 0x0a0a0a0b
|
||||
*/
|
||||
flow_record.v6.srcaddr[0] = 0;
|
||||
flow_record.v6.srcaddr[1] = 0;
|
||||
flow_record.v6.dstaddr[0] = 0;
|
||||
flow_record.v6.dstaddr[1] = 0;
|
||||
flow_record.v4.srcaddr = 0xac200710;
|
||||
flow_record.v4.dstaddr = 0x0a0a0a0b;
|
||||
flow_record.V6.srcaddr[0] = 0;
|
||||
flow_record.V6.srcaddr[1] = 0;
|
||||
flow_record.V6.dstaddr[0] = 0;
|
||||
flow_record.V6.dstaddr[1] = 0;
|
||||
flow_record.V4.srcaddr = 0xac200710;
|
||||
flow_record.V4.dstaddr = 0x0a0a0a0b;
|
||||
ret = check_filter_block("src ip 172.32.7.16", &flow_record, 1);
|
||||
ret = check_filter_block("( src ip 172.32.7.16 ) %MyLabel", &flow_record, 1);
|
||||
ret = check_filter_block("%MyLabel( src ip 172.32.7.16 )", &flow_record, 1);
|
||||
ret = check_filter_block("src ip 172.32.7.15", &flow_record, 0);
|
||||
ret = check_filter_block("dst ip 10.10.10.11", &flow_record, 1);
|
||||
ret = check_filter_block("dst ip 10.10.10.10", &flow_record, 0);
|
||||
@ -599,53 +598,53 @@ void *p;
|
||||
ret = check_filter_block("src ip 172.32.7.15 and dst ip 10.10.10.11", &flow_record, 0);
|
||||
ret = check_filter_block("src ip 172.32.7.16 and dst ip 10.10.10.12", &flow_record, 0);
|
||||
|
||||
flow_record.v4.srcaddr = 0;
|
||||
flow_record.v4.dstaddr = 0;
|
||||
flow_record.V4.srcaddr = 0;
|
||||
flow_record.V4.dstaddr = 0;
|
||||
|
||||
// 172.32.7.16 => 0xac200710
|
||||
flow_record.ip_nexthop.v6[0] = 0;
|
||||
flow_record.ip_nexthop.v6[1] = 0;
|
||||
flow_record.ip_nexthop.v4 = 0xac200710;
|
||||
flow_record.ip_nexthop.V6[0] = 0;
|
||||
flow_record.ip_nexthop.V6[1] = 0;
|
||||
flow_record.ip_nexthop.V4 = 0xac200710;
|
||||
ret = check_filter_block("next ip 172.32.7.16", &flow_record, 1);
|
||||
ret = check_filter_block("next ip 172.32.7.15", &flow_record, 0);
|
||||
ret = check_filter_block("next ip in [172.32.7.16 fe80::2110:abcd:1235:ffff]", &flow_record, 1);
|
||||
ret = check_filter_block("next ip in [172.32.7.15 fe80::2110:abcd:1235:ffff]", &flow_record, 0);
|
||||
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1235:ffff", flow_record.ip_nexthop.v6);
|
||||
flow_record.ip_nexthop.v6[0] = ntohll(flow_record.ip_nexthop.v6[0]);
|
||||
flow_record.ip_nexthop.v6[1] = ntohll(flow_record.ip_nexthop.v6[1]);
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1235:ffff", flow_record.ip_nexthop.V6);
|
||||
flow_record.ip_nexthop.V6[0] = ntohll(flow_record.ip_nexthop.V6[0]);
|
||||
flow_record.ip_nexthop.V6[1] = ntohll(flow_record.ip_nexthop.V6[1]);
|
||||
ret = check_filter_block("next ip fe80::2110:abcd:1235:ffff", &flow_record, 1);
|
||||
ret = check_filter_block("next ip in [172.32.7.16 fe80::2110:abcd:1235:ffff]", &flow_record, 1);
|
||||
ret = check_filter_block("next ip in [172.32.7.16 fe80::2110:abcd:1235:fffe]", &flow_record, 0);
|
||||
ret = check_filter_block("next ip fe80::2110:abcd:1235:fffe", &flow_record, 0);
|
||||
ret = check_filter_block("next ip fe81::2110:abcd:1235:ffff", &flow_record, 0);
|
||||
|
||||
flow_record.ip_nexthop.v6[0] = 0;
|
||||
flow_record.ip_nexthop.v6[1] = 0;
|
||||
flow_record.ip_nexthop.V6[0] = 0;
|
||||
flow_record.ip_nexthop.V6[1] = 0;
|
||||
|
||||
flow_record.bgp_nexthop.v6[0] = 0;
|
||||
flow_record.bgp_nexthop.v6[1] = 0;
|
||||
flow_record.bgp_nexthop.v4 = 0xac200710;
|
||||
flow_record.bgp_nexthop.V6[0] = 0;
|
||||
flow_record.bgp_nexthop.V6[1] = 0;
|
||||
flow_record.bgp_nexthop.V4 = 0xac200710;
|
||||
ret = check_filter_block("bgpnext ip 172.32.7.16", &flow_record, 1);
|
||||
ret = check_filter_block("bgpnext ip 172.32.7.15", &flow_record, 0);
|
||||
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1235:ffff", flow_record.bgp_nexthop.v6);
|
||||
flow_record.bgp_nexthop.v6[0] = ntohll(flow_record.bgp_nexthop.v6[0]);
|
||||
flow_record.bgp_nexthop.v6[1] = ntohll(flow_record.bgp_nexthop.v6[1]);
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1235:ffff", flow_record.bgp_nexthop.V6);
|
||||
flow_record.bgp_nexthop.V6[0] = ntohll(flow_record.bgp_nexthop.V6[0]);
|
||||
flow_record.bgp_nexthop.V6[1] = ntohll(flow_record.bgp_nexthop.V6[1]);
|
||||
ret = check_filter_block("bgpnext ip fe80::2110:abcd:1235:ffff", &flow_record, 1);
|
||||
ret = check_filter_block("bgpnext ip fe80::2110:abcd:1235:fffe", &flow_record, 0);
|
||||
ret = check_filter_block("bgpnext ip fe81::2110:abcd:1235:ffff", &flow_record, 0);
|
||||
|
||||
flow_record.ip_router.v6[0] = 0;
|
||||
flow_record.ip_router.v6[1] = 0;
|
||||
flow_record.ip_router.v4 = 0xac200720;
|
||||
flow_record.ip_nexthop.v4 = 0xac200720;
|
||||
flow_record.ip_router.V6[0] = 0;
|
||||
flow_record.ip_router.V6[1] = 0;
|
||||
flow_record.ip_router.V4 = 0xac200720;
|
||||
flow_record.ip_nexthop.V4 = 0xac200720;
|
||||
ret = check_filter_block("router ip 172.32.7.32", &flow_record, 1);
|
||||
ret = check_filter_block("router ip 172.32.7.33", &flow_record, 0);
|
||||
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1235:ffff", flow_record.ip_router.v6);
|
||||
flow_record.ip_router.v6[0] = ntohll(flow_record.ip_router.v6[0]);
|
||||
flow_record.ip_router.v6[1] = ntohll(flow_record.ip_router.v6[1]);
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1235:ffff", flow_record.ip_router.V6);
|
||||
flow_record.ip_router.V6[0] = ntohll(flow_record.ip_router.V6[0]);
|
||||
flow_record.ip_router.V6[1] = ntohll(flow_record.ip_router.V6[1]);
|
||||
ret = check_filter_block("router ip fe80::2110:abcd:1235:ffff", &flow_record, 1);
|
||||
ret = check_filter_block("router ip fe80::2110:abcd:1235:fffe", &flow_record, 0);
|
||||
ret = check_filter_block("router ip fe81::2110:abcd:1235:ffff", &flow_record, 0);
|
||||
@ -1042,12 +1041,12 @@ void *p;
|
||||
ret = check_filter_block("asa xevent < 1004", &flow_record, 0);
|
||||
ret = check_filter_block("asa xevent > 1004", &flow_record, 0);
|
||||
|
||||
flow_record.xlate_src_ip.v6[0] = 0;
|
||||
flow_record.xlate_src_ip.v6[1] = 0;
|
||||
flow_record.xlate_src_ip.v4 = 0xac200710;
|
||||
flow_record.xlate_dst_ip.v6[0] = 0;
|
||||
flow_record.xlate_dst_ip.v6[1] = 0;
|
||||
flow_record.xlate_dst_ip.v4 = 0x0a0a0a0b;
|
||||
flow_record.xlate_src_ip.V6[0] = 0;
|
||||
flow_record.xlate_src_ip.V6[1] = 0;
|
||||
flow_record.xlate_src_ip.V4 = 0xac200710;
|
||||
flow_record.xlate_dst_ip.V6[0] = 0;
|
||||
flow_record.xlate_dst_ip.V6[1] = 0;
|
||||
flow_record.xlate_dst_ip.V4 = 0x0a0a0a0b;
|
||||
ret = check_filter_block("src xip 172.32.7.16", &flow_record, 1);
|
||||
ret = check_filter_block("src xip 172.32.7.15", &flow_record, 0);
|
||||
ret = check_filter_block("dst xip 10.10.10.11", &flow_record, 1);
|
||||
@ -1063,23 +1062,23 @@ void *p;
|
||||
ret = check_filter_block("xnet 172.32.7.0/24", &flow_record, 1);
|
||||
ret = check_filter_block("xnet 10.10.10.0/24", &flow_record, 1);
|
||||
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1235:ffff", flow_record.xlate_src_ip.v6);
|
||||
flow_record.xlate_src_ip.v6[0] = ntohll(flow_record.xlate_src_ip.v6[0]);
|
||||
flow_record.xlate_src_ip.v6[1] = ntohll(flow_record.xlate_src_ip.v6[1]);
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1235:ffff", flow_record.xlate_src_ip.V6);
|
||||
flow_record.xlate_src_ip.V6[0] = ntohll(flow_record.xlate_src_ip.V6[0]);
|
||||
flow_record.xlate_src_ip.V6[1] = ntohll(flow_record.xlate_src_ip.V6[1]);
|
||||
ret = check_filter_block("src xip fe80::2110:abcd:1235:ffff", &flow_record, 1);
|
||||
ret = check_filter_block("src xip fe80::2110:abcd:1235:fffe", &flow_record, 0);
|
||||
|
||||
flow_record.xlate_src_ip.v6[0] = 0;
|
||||
flow_record.xlate_src_ip.v6[1] = 0;
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1235:fffe", flow_record.xlate_dst_ip.v6);
|
||||
flow_record.xlate_dst_ip.v6[0] = ntohll(flow_record.xlate_dst_ip.v6[0]);
|
||||
flow_record.xlate_dst_ip.v6[1] = ntohll(flow_record.xlate_dst_ip.v6[1]);
|
||||
flow_record.xlate_src_ip.V6[0] = 0;
|
||||
flow_record.xlate_src_ip.V6[1] = 0;
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1235:fffe", flow_record.xlate_dst_ip.V6);
|
||||
flow_record.xlate_dst_ip.V6[0] = ntohll(flow_record.xlate_dst_ip.V6[0]);
|
||||
flow_record.xlate_dst_ip.V6[1] = ntohll(flow_record.xlate_dst_ip.V6[1]);
|
||||
ret = check_filter_block("dst xip fe80::2110:abcd:1235:fffe", &flow_record, 1);
|
||||
ret = check_filter_block("dst xip fe80::2110:abcd:1235:fffc", &flow_record, 0);
|
||||
flow_record.xlate_src_ip.v6[0] = 0;
|
||||
flow_record.xlate_src_ip.v6[1] = 0;
|
||||
flow_record.xlate_dst_ip.v6[0] = 0;
|
||||
flow_record.xlate_dst_ip.v6[1] = 0;
|
||||
flow_record.xlate_src_ip.V6[0] = 0;
|
||||
flow_record.xlate_src_ip.V6[1] = 0;
|
||||
flow_record.xlate_dst_ip.V6[0] = 0;
|
||||
flow_record.xlate_dst_ip.V6[1] = 0;
|
||||
|
||||
flow_record.xlate_src_port = 1023;
|
||||
flow_record.xlate_dst_port = 32798;
|
||||
@ -1208,12 +1207,12 @@ exit(0);
|
||||
flow_record.xlate_src_port = 0xffff;
|
||||
flow_record.xlate_dst_port = 0xffff;
|
||||
|
||||
flow_record.xlate_src_ip.v6[0] = 0;
|
||||
flow_record.xlate_src_ip.v6[1] = 0;
|
||||
flow_record.xlate_src_ip.v4 = 0xac200710;
|
||||
flow_record.xlate_dst_ip.v6[0] = 0;
|
||||
flow_record.xlate_dst_ip.v6[1] = 0;
|
||||
flow_record.xlate_dst_ip.v4 = 0x0a0a0a0b;
|
||||
flow_record.xlate_src_ip.V6[0] = 0;
|
||||
flow_record.xlate_src_ip.V6[1] = 0;
|
||||
flow_record.xlate_src_ip.V4 = 0xac200710;
|
||||
flow_record.xlate_dst_ip.V6[0] = 0;
|
||||
flow_record.xlate_dst_ip.V6[1] = 0;
|
||||
flow_record.xlate_dst_ip.V4 = 0x0a0a0a0b;
|
||||
ret = check_filter_block("src nip 172.32.7.16", &flow_record, 1);
|
||||
ret = check_filter_block("src nip 172.32.7.15", &flow_record, 0);
|
||||
ret = check_filter_block("dst nip 10.10.10.11", &flow_record, 1);
|
||||
@ -1223,17 +1222,17 @@ exit(0);
|
||||
ret = check_filter_block("nip 172.32.7.15", &flow_record, 0);
|
||||
ret = check_filter_block("nip 10.10.10.12", &flow_record, 0);
|
||||
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1235:ffff", flow_record.xlate_src_ip.v6);
|
||||
flow_record.xlate_src_ip.v6[0] = ntohll(flow_record.xlate_src_ip.v6[0]);
|
||||
flow_record.xlate_src_ip.v6[1] = ntohll(flow_record.xlate_src_ip.v6[1]);
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1235:ffff", flow_record.xlate_src_ip.V6);
|
||||
flow_record.xlate_src_ip.V6[0] = ntohll(flow_record.xlate_src_ip.V6[0]);
|
||||
flow_record.xlate_src_ip.V6[1] = ntohll(flow_record.xlate_src_ip.V6[1]);
|
||||
ret = check_filter_block("src nip fe80::2110:abcd:1235:ffff", &flow_record, 1);
|
||||
ret = check_filter_block("src nip fe80::2110:abcd:1235:fffe", &flow_record, 0);
|
||||
|
||||
flow_record.xlate_src_ip.v6[0] = 0;
|
||||
flow_record.xlate_src_ip.v6[1] = 0;
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1235:fffe", flow_record.xlate_dst_ip.v6);
|
||||
flow_record.xlate_dst_ip.v6[0] = ntohll(flow_record.xlate_dst_ip.v6[0]);
|
||||
flow_record.xlate_dst_ip.v6[1] = ntohll(flow_record.xlate_dst_ip.v6[1]);
|
||||
flow_record.xlate_src_ip.V6[0] = 0;
|
||||
flow_record.xlate_src_ip.V6[1] = 0;
|
||||
inet_pton(PF_INET6, "fe80::2110:abcd:1235:fffe", flow_record.xlate_dst_ip.V6);
|
||||
flow_record.xlate_dst_ip.V6[0] = ntohll(flow_record.xlate_dst_ip.V6[0]);
|
||||
flow_record.xlate_dst_ip.V6[1] = ntohll(flow_record.xlate_dst_ip.V6[1]);
|
||||
ret = check_filter_block("dst nip fe80::2110:abcd:1235:fffe", &flow_record, 1);
|
||||
ret = check_filter_block("dst nip fe80::2110:abcd:1235:fffc", &flow_record, 0);
|
||||
|
||||
|
43
bin/nftree.c
43
bin/nftree.c
@ -244,6 +244,7 @@ uint32_t NewBlock(uint32_t offset, uint64_t mask, uint64_t value, uint16_t comp,
|
||||
FilterTree[n].comp = comp;
|
||||
FilterTree[n].function = flow_procs_map[function].function;
|
||||
FilterTree[n].fname = flow_procs_map[function].name;
|
||||
FilterTree[n].label = NULL;
|
||||
FilterTree[n].data = data;
|
||||
if ( comp > 0 || function > 0 )
|
||||
Extended = 1;
|
||||
@ -383,15 +384,17 @@ void DumpList(FilterEngine_data_t *args) {
|
||||
|
||||
for (i=1; i<NumBlocks; i++ ) {
|
||||
if ( args->filter[i].invert )
|
||||
printf("Index: %u, Offset: %u, Mask: %.16llx, Value: %.16llx, Superblock: %u, Numblocks: %u, !OnTrue: %u, !OnFalse: %u Comp: %u Function: %s\n",
|
||||
printf("Index: %u, Offset: %u, Mask: %.16llx, Value: %.16llx, Superblock: %u, Numblocks: %u, !OnTrue: %u, !OnFalse: %u Comp: %u Function: %s, Label: %s\n",
|
||||
i, args->filter[i].offset, (unsigned long long)args->filter[i].mask,
|
||||
(unsigned long long)args->filter[i].value, args->filter[i].superblock,
|
||||
args->filter[i].numblocks, args->filter[i].OnTrue, args->filter[i].OnFalse, args->filter[i].comp, args->filter[i].fname);
|
||||
args->filter[i].numblocks, args->filter[i].OnTrue, args->filter[i].OnFalse,
|
||||
args->filter[i].comp, args->filter[i].fname, args->filter[i].label ? args->filter[i].label : "<none>");
|
||||
else
|
||||
printf("Index: %u, Offset: %u, Mask: %.16llx, Value: %.16llx, Superblock: %u, Numblocks: %u, OnTrue: %u, OnFalse: %u Comp: %u Function: %s\n",
|
||||
printf("Index: %u, Offset: %u, Mask: %.16llx, Value: %.16llx, Superblock: %u, Numblocks: %u, OnTrue: %u, OnFalse: %u Comp: %u Function: %s, Label: %s\n",
|
||||
i, args->filter[i].offset, (unsigned long long)args->filter[i].mask,
|
||||
(unsigned long long)args->filter[i].value, args->filter[i].superblock,
|
||||
args->filter[i].numblocks, args->filter[i].OnTrue, args->filter[i].OnFalse, args->filter[i].comp, args->filter[i].fname);
|
||||
args->filter[i].numblocks, args->filter[i].OnTrue, args->filter[i].OnFalse,
|
||||
args->filter[i].comp, args->filter[i].fname, args->filter[i].label ? args->filter[i].label : "<none>");
|
||||
if ( args->filter[i].OnTrue > (memblocks * MAXBLOCKS) || args->filter[i].OnFalse > (memblocks * MAXBLOCKS) ) {
|
||||
fprintf(stderr, "Tree pointer out of range for index %u. *** ABORT ***\n", i);
|
||||
exit(255);
|
||||
@ -428,6 +431,7 @@ int RunFilter(FilterEngine_data_t *args) {
|
||||
uint32_t index, offset;
|
||||
int evaluate, invert;
|
||||
|
||||
args->label = NULL;
|
||||
index = args->StartNode;
|
||||
evaluate = 0;
|
||||
invert = 0;
|
||||
@ -447,6 +451,7 @@ uint32_t index, offset;
|
||||
uint64_t comp_value[2];
|
||||
int evaluate, invert;
|
||||
|
||||
args->label = NULL;
|
||||
index = args->StartNode;
|
||||
evaluate = 0;
|
||||
invert = 0;
|
||||
@ -494,12 +499,40 @@ int evaluate, invert;
|
||||
break;
|
||||
}
|
||||
|
||||
index = evaluate ? args->filter[index].OnTrue : args->filter[index].OnFalse;
|
||||
/*
|
||||
* Label evaluation:
|
||||
* A flow gets labeled, if one filter expression has a label assigned and
|
||||
* that filter expression is in the 'true' path of the tree, resulting
|
||||
* to a final match. If subsequent expressions in the same path evaluate
|
||||
* to false, the label is cleared again.
|
||||
* In case of multiple labels in a true patch, the last seen label wins.
|
||||
*/
|
||||
if ( evaluate ) {
|
||||
// if filter expression has a label assigned, copy that
|
||||
if ( args->filter[index].label ) {
|
||||
args->label = args->filter[index].label;
|
||||
}
|
||||
index = args->filter[index].OnTrue;
|
||||
} else {
|
||||
// filter expression does not match - clear previous label if abailable
|
||||
if ( args->label )
|
||||
args->label = NULL;
|
||||
index = args->filter[index].OnFalse;
|
||||
}
|
||||
// index = evaluate ? args->filter[index].OnTrue : args->filter[index].OnFalse;
|
||||
}
|
||||
return invert ? !evaluate : evaluate;
|
||||
|
||||
} /* End of RunExtendedFilter */
|
||||
|
||||
void AddLabel(uint32_t index, char *label) {
|
||||
|
||||
FilterTree[index].label = strdup(label);
|
||||
//Evaluation requires extended engine
|
||||
Extended = 1;
|
||||
|
||||
} // End of AddLabel
|
||||
|
||||
uint32_t AddIdent(char *Ident) {
|
||||
uint32_t num;
|
||||
|
||||
|
23
bin/nftree.h
23
bin/nftree.h
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,17 +29,20 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nftree.h 39 2009-11-25 08:11:15Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 39 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NFTREE_H
|
||||
#define _NFTREE_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "rbtree.h"
|
||||
|
||||
/*
|
||||
* type definitions for nf tree
|
||||
*/
|
||||
@ -61,6 +65,7 @@ typedef struct FilterBlock {
|
||||
uint16_t comp; /* comperator */
|
||||
flow_proc_t function; /* function for flow processing */
|
||||
char *fname; /* ascii function name */
|
||||
char *label; /* label, if any */
|
||||
void *data; /* any additional data for this block */
|
||||
} FilterBlock_t;
|
||||
|
||||
@ -70,6 +75,7 @@ typedef struct FilterEngine_data_s {
|
||||
uint32_t Extended;
|
||||
char **IdentList;
|
||||
uint64_t *nfrecord;
|
||||
char *label;
|
||||
int (*FilterEngine)(struct FilterEngine_data_s *);
|
||||
} FilterEngine_data_t;
|
||||
|
||||
@ -160,6 +166,11 @@ uint32_t Connect_OR(uint32_t b1, uint32_t b2);
|
||||
*/
|
||||
uint32_t Invert(uint32_t a );
|
||||
|
||||
/*
|
||||
* Add label to filter index
|
||||
*/
|
||||
void AddLabel(uint32_t index, char *label);
|
||||
|
||||
/*
|
||||
* Add Ident to Identlist
|
||||
*/
|
||||
|
@ -542,6 +542,7 @@ int i, extension_size, max_elements;
|
||||
int id = map->ex_id[i];
|
||||
if ( id > Max_num_extensions ) {
|
||||
printf("PANIC! - Verify map id %i: ERROR: element id %i out of range [%i]!\n", map->map_id, id, Max_num_extensions);
|
||||
exit(255);
|
||||
}
|
||||
extension_size += extension_descriptor[id].size;
|
||||
i++;
|
||||
|
16
bin/nfx.h
16
bin/nfx.h
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,17 +29,20 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: nfx.h 48 2010-01-02 08:06:27Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 48 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NFX_H
|
||||
#define _NFX_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "nffile.h"
|
||||
|
||||
// MAX_EXTENSION_MAPS must be a power of 2
|
||||
#define MAX_EXTENSION_MAPS 65536
|
||||
#define EXTENSION_MAP_MASK (MAX_EXTENSION_MAPS-1)
|
||||
|
112
bin/nfxstat.c
112
bin/nfxstat.c
@ -1,112 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2011, Peter Haag
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* * Neither the name of the author nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: peter $
|
||||
*
|
||||
* $Id: nfxstat.c 25 2011-02-26 13:22:31Z peter $
|
||||
*
|
||||
* $LastChangedRevision: 25 $
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifndef DEVEL
|
||||
# define dbg_printf(...) /* printf(__VA_ARGS__) */
|
||||
#else
|
||||
# define dbg_printf(...) printf(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#include "util.h"
|
||||
#include "nf_common.h"
|
||||
#include "nffile.h"
|
||||
#include "nfxstat.h"
|
||||
|
||||
|
||||
xstat_t *InitXStat(nffile_t *nffile) {
|
||||
xstat_t *xs;
|
||||
size_t block_size;
|
||||
|
||||
// extended by the record link 2*data[4], but does no harm
|
||||
block_size = sizeof(xstat_t) + sizeof(data_block_header_t) + sizeof(flow_port_histogram_t) + sizeof(flow_bpp_histogram_t);
|
||||
|
||||
xs = (xstat_t *)malloc(block_size);
|
||||
if ( !xs ) {
|
||||
LogError("malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror(errno) );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
xs->block_header = (data_block_header_t *)((pointer_addr_t)xs + sizeof(xstat_t));
|
||||
// preset the fields
|
||||
xs->block_header->NumRecords = 2; // 2 histogram records are included
|
||||
xs->block_header->size = block_size;
|
||||
xs->block_header->id = Large_BLOCK_Type;
|
||||
xs->block_header->flags = 0;
|
||||
|
||||
xs->port_histogram = (flow_port_histogram_t *)((pointer_addr_t)xs + sizeof(xstat_t) + sizeof(data_block_header_t));
|
||||
xs->bpp_histogram = (flow_bpp_histogram_t *)((pointer_addr_t)xs + sizeof(xstat_t) + sizeof(data_block_header_t) + sizeof(flow_port_histogram_t) - 4); // without link pointer data[4]
|
||||
|
||||
// XXX add catalog entry
|
||||
// SetFlag(nffile->file_header->flags, FLAG_EXTENDED_STATS);
|
||||
|
||||
ResetPortHistogram(xs->port_histogram);
|
||||
ResetBppHistogram(xs->bpp_histogram);
|
||||
|
||||
return xs;
|
||||
|
||||
} // End of InitXStat
|
||||
|
||||
void ResetPortHistogram(flow_port_histogram_t *port_histogram) {
|
||||
|
||||
memset((void *)port_histogram, 0, sizeof(flow_port_histogram_t) - 4); // without link pointer data[4]
|
||||
port_histogram->record_header.type = PortHistogramType;
|
||||
port_histogram->record_header.size = sizeof(flow_port_histogram_t) - 4;
|
||||
|
||||
} // End of ResetPortHistogram
|
||||
|
||||
void ResetBppHistogram(flow_bpp_histogram_t *bpp_histogram) {
|
||||
|
||||
memset((void *)bpp_histogram, 0, sizeof(bpp_histogram_t) - 4); // without link pointer data[4]
|
||||
bpp_histogram->record_header.type = BppHistogramType;
|
||||
bpp_histogram->record_header.size = sizeof(flow_port_histogram_t) - 4;
|
||||
|
||||
} // End of ResetBppHistogram
|
||||
|
2532
bin/out-test
2532
bin/out-test
File diff suppressed because it is too large
Load Diff
507
bin/output_json.c
Normal file
507
bin/output_json.c
Normal file
@ -0,0 +1,507 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* * Neither the name of the author nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
// for asprintf prototype
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "nffile.h"
|
||||
#include "util.h"
|
||||
#include "nf_common.h"
|
||||
#include "output_json.h"
|
||||
|
||||
#define STRINGSIZE 10240
|
||||
#define IP_STRING_LEN (INET6_ADDRSTRLEN)
|
||||
|
||||
#ifdef NSEL
|
||||
static char *NSEL_event_string[6] = {
|
||||
"IGNORE", "CREATE", "DELETE", "DENIED", "ALERT", "UPDATE"
|
||||
};
|
||||
|
||||
static char *NEL_event_string[3] = {
|
||||
"INVALID", "ADD", "DELETE"
|
||||
};
|
||||
#endif
|
||||
|
||||
static char data_string[STRINGSIZE];
|
||||
|
||||
static void String_Flags(master_record_t *r, char *string) {
|
||||
|
||||
// if record contains unusuall flags, print the flags in hex as 0x.. number
|
||||
if ( r->tcp_flags > 63 ) {
|
||||
snprintf(string, 7, " 0x%2x\n", r->tcp_flags );
|
||||
} else {
|
||||
string[0] = r->tcp_flags & 32 ? 'U' : '.';
|
||||
string[1] = r->tcp_flags & 16 ? 'A' : '.';
|
||||
string[2] = r->tcp_flags & 8 ? 'P' : '.';
|
||||
string[3] = r->tcp_flags & 4 ? 'R' : '.';
|
||||
string[4] = r->tcp_flags & 2 ? 'S' : '.';
|
||||
string[5] = r->tcp_flags & 1 ? 'F' : '.';
|
||||
}
|
||||
string[6] = '\0';
|
||||
|
||||
} // End of String_Flags
|
||||
|
||||
void flow_record_to_json(void *record, char ** s, int tag) {
|
||||
char *_s, as[IP_STRING_LEN], ds[IP_STRING_LEN], *datestr1, *datestr2, datebuff[64], flags_str[16];
|
||||
int i, id;
|
||||
ssize_t slen, _slen;
|
||||
time_t when;
|
||||
struct tm *ts;
|
||||
master_record_t *r = (master_record_t *)record;
|
||||
extension_map_t *extension_map = r->map_ref;
|
||||
|
||||
when = r->first;
|
||||
ts = localtime(&when);
|
||||
strftime(datebuff, 63, "%Y-%m-%dT%H:%M:%S", ts);
|
||||
asprintf(&datestr1, "%s.%u", datebuff, r->msec_first);
|
||||
|
||||
when = r->last;
|
||||
ts = localtime(&when);
|
||||
strftime(datebuff, 63, "%Y-%m-%dT%H:%M:%S", ts);
|
||||
asprintf(&datestr2, "%s.%u", datebuff, r->msec_last);
|
||||
|
||||
String_Flags(record, flags_str);
|
||||
|
||||
_s = data_string;
|
||||
slen = STRINGSIZE;
|
||||
snprintf(_s, slen-1, "{\n"
|
||||
" \"type\" : \"%s\",\n"
|
||||
" \"sampled\" : %u,\n"
|
||||
" \"export_sysid\" : %u,\n"
|
||||
" \"t_first\" : \"%s\",\n"
|
||||
" \"t_last\" : \"%s\",\n"
|
||||
" \"proto\" : %u,\n"
|
||||
, TestFlag(r->flags, FLAG_EVENT) ? "EVENT" : "FLOW",
|
||||
TestFlag(r->flags, FLAG_SAMPLED) ? 1 : 0,
|
||||
r->exporter_sysid, datestr1, datestr2, r->prot);
|
||||
|
||||
free(datestr1);
|
||||
free(datestr2);
|
||||
_slen = strlen(data_string);
|
||||
_s = data_string + _slen;
|
||||
slen = STRINGSIZE - _slen;
|
||||
|
||||
as[0] = 0;
|
||||
ds[0] = 0;
|
||||
if ( TestFlag(r->flags,FLAG_IPV6_ADDR ) != 0 ) { // IPv6
|
||||
uint64_t _src[2];
|
||||
uint64_t _dst[2];
|
||||
|
||||
_src[0] = htonll(r->V6.srcaddr[0]);
|
||||
_src[1] = htonll(r->V6.srcaddr[1]);
|
||||
_dst[0] = htonll(r->V6.dstaddr[0]);
|
||||
_dst[1] = htonll(r->V6.dstaddr[1]);
|
||||
inet_ntop(AF_INET6, _src, as, sizeof(as));
|
||||
inet_ntop(AF_INET6, _dst, ds, sizeof(ds));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
ds[IP_STRING_LEN-1] = 0;
|
||||
|
||||
snprintf(_s, slen-1,
|
||||
" \"src6_addr\" : \"%s\",\n"
|
||||
" \"dst6_addr\" : \"%s\",\n"
|
||||
, as, ds );
|
||||
} else { // IPv4
|
||||
uint32_t _src, _dst;
|
||||
_src = htonl(r->V4.srcaddr);
|
||||
_dst = htonl(r->V4.dstaddr);
|
||||
inet_ntop(AF_INET, &_src, as, sizeof(as));
|
||||
inet_ntop(AF_INET, &_dst, ds, sizeof(ds));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
ds[IP_STRING_LEN-1] = 0;
|
||||
|
||||
snprintf(_s, slen-1,
|
||||
" \"src4_addr\" : \"%s\",\n"
|
||||
" \"dst4_addr\" : \"%s\",\n"
|
||||
, as, ds );
|
||||
}
|
||||
_slen = strlen(data_string);
|
||||
_s = data_string + _slen;
|
||||
slen = STRINGSIZE - _slen;
|
||||
|
||||
|
||||
if ( r->prot == IPPROTO_ICMP || r->prot == IPPROTO_ICMPV6 ) { // ICMP
|
||||
snprintf(_s, slen-1,
|
||||
" \"icmp_type\" : %u,\n"
|
||||
" \"icmp_code\" : %u,\n"
|
||||
, r->icmp_type, r->icmp_code);
|
||||
} else {
|
||||
snprintf(_s, slen-1,
|
||||
" \"src_port\" : %u,\n"
|
||||
" \"dst_port\" : %u,\n"
|
||||
, r->srcport, r->dstport);
|
||||
}
|
||||
|
||||
_slen = strlen(data_string);
|
||||
_s = data_string + _slen;
|
||||
slen = STRINGSIZE - _slen;
|
||||
|
||||
snprintf(_s, slen-1,
|
||||
" \"fwd_status\" : %u,\n"
|
||||
" \"tcp_flags\" : \"%s\",\n"
|
||||
" \"src_tos\" : %u,\n"
|
||||
" \"in_packets\" : %llu,\n"
|
||||
" \"in_bytes\" : %llu,\n"
|
||||
, r->fwd_status, flags_str, r->tos,
|
||||
(unsigned long long)r->dPkts, (unsigned long long)r->dOctets);
|
||||
|
||||
_slen = strlen(data_string);
|
||||
_s = data_string + _slen;
|
||||
slen = STRINGSIZE - _slen;
|
||||
|
||||
i = 0;
|
||||
while ( (id = extension_map->ex_id[i]) != 0 ) {
|
||||
if ( slen <= 20 ) {
|
||||
// XXX
|
||||
data_string[STRINGSIZE-1] = 0;
|
||||
*s = data_string;
|
||||
}
|
||||
switch(id) {
|
||||
case EX_IO_SNMP_2:
|
||||
case EX_IO_SNMP_4:
|
||||
snprintf(_s, slen-1,
|
||||
" \"input_snmp\" : %u,\n"
|
||||
" \"output_snmp\" : %u,\n"
|
||||
, r->input, r->output);
|
||||
break;
|
||||
case EX_AS_2:
|
||||
case EX_AS_4:
|
||||
snprintf(_s, slen-1,
|
||||
" \"src_as\" : %u,\n"
|
||||
" \"dst_as\" : %u,\n"
|
||||
, r->srcas, r->dstas);
|
||||
break;
|
||||
case EX_BGPADJ:
|
||||
snprintf(_s, slen-1,
|
||||
" \"next_as\" : %u,\n"
|
||||
" \"prev_as\" : %u,\n"
|
||||
, r->bgpNextAdjacentAS, r->bgpPrevAdjacentAS);
|
||||
break;
|
||||
case EX_MULIPLE:
|
||||
snprintf(_s, slen-1,
|
||||
" \"src_mask\" : %u,\n"
|
||||
" \"dst_mask\" : %u,\n"
|
||||
" \"dst_tos\" : %u,\n"
|
||||
" \"direction\" : %u,\n"
|
||||
, r->src_mask, r->dst_mask, r->dst_tos, r->dir );
|
||||
break;
|
||||
case EX_NEXT_HOP_v4: {
|
||||
uint32_t _ip;
|
||||
as[0] = 0;
|
||||
_ip = htonl(r->ip_nexthop.V4);
|
||||
inet_ntop(AF_INET, &_ip, as, sizeof(as));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
|
||||
snprintf(_s, slen-1,
|
||||
" \"ip4_next_hop\" : \"%s\",\n"
|
||||
, as);
|
||||
} break;
|
||||
case EX_NEXT_HOP_v6: {
|
||||
uint64_t _ip[2];
|
||||
as[0] = 0;
|
||||
_ip[0] = htonll(r->ip_nexthop.V6[0]);
|
||||
_ip[1] = htonll(r->ip_nexthop.V6[1]);
|
||||
inet_ntop(AF_INET6, _ip, as, sizeof(as));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
|
||||
snprintf(_s, slen-1,
|
||||
" \"ip6_next_hop\" : \"%s\",\n"
|
||||
, as);
|
||||
} break;
|
||||
case EX_NEXT_HOP_BGP_v4: {
|
||||
uint32_t _ip;
|
||||
as[0] = 0;
|
||||
_ip = htonl(r->bgp_nexthop.V4);
|
||||
inet_ntop(AF_INET, &_ip, as, sizeof(as));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
|
||||
snprintf(_s, slen-1,
|
||||
" \"bgp4_next_hop\" : \"%s\",\n"
|
||||
, as);
|
||||
} break;
|
||||
case EX_NEXT_HOP_BGP_v6: {
|
||||
uint64_t _ip[2];
|
||||
as[0] = 0;
|
||||
_ip[0] = htonll(r->bgp_nexthop.V6[0]);
|
||||
_ip[1] = htonll(r->bgp_nexthop.V6[1]);
|
||||
inet_ntop(AF_INET6, _ip, as, sizeof(as));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
|
||||
snprintf(_s, slen-1,
|
||||
" \"bgp4_next_hop\" : \"%s\",\n"
|
||||
, as);
|
||||
} break;
|
||||
case EX_VLAN:
|
||||
snprintf(_s, slen-1,
|
||||
" \"src_vlan\" : %u,\n"
|
||||
" \"dst_vlan\" : %u,\n"
|
||||
, r->src_vlan, r->dst_vlan);
|
||||
break;
|
||||
case EX_OUT_PKG_4:
|
||||
case EX_OUT_PKG_8:
|
||||
snprintf(_s, slen-1,
|
||||
" \"out_packets\" : %llu,\n"
|
||||
, (long long unsigned)r->out_pkts);
|
||||
break;
|
||||
case EX_OUT_BYTES_4:
|
||||
case EX_OUT_BYTES_8:
|
||||
snprintf(_s, slen-1,
|
||||
" \"out_bytes\" : %llu,\n"
|
||||
, (long long unsigned)r->out_bytes);
|
||||
break;
|
||||
case EX_AGGR_FLOWS_4:
|
||||
case EX_AGGR_FLOWS_8:
|
||||
snprintf(_s, slen-1,
|
||||
" \"aggr_flows\" : %llu,\n"
|
||||
, (long long unsigned)r->aggr_flows);
|
||||
break;
|
||||
case EX_MAC_1: {
|
||||
int i;
|
||||
uint8_t mac1[6], mac2[6];
|
||||
|
||||
for ( i=0; i<6; i++ ) {
|
||||
mac1[i] = (r->in_src_mac >> ( i*8 )) & 0xFF;
|
||||
}
|
||||
for ( i=0; i<6; i++ ) {
|
||||
mac2[i] = (r->out_dst_mac >> ( i*8 )) & 0xFF;
|
||||
}
|
||||
snprintf(_s, slen-1,
|
||||
" \"in_src_mac\" : \"%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\",\n"
|
||||
" \"out_dst_mac\" : \"%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\",\n"
|
||||
, mac1[5], mac1[4], mac1[3], mac1[2], mac1[1], mac1[0],
|
||||
mac2[5], mac2[4], mac2[3], mac2[2], mac2[1], mac2[0] );
|
||||
} break;
|
||||
case EX_MAC_2: {
|
||||
int i;
|
||||
uint8_t mac1[6], mac2[6];
|
||||
|
||||
for ( i=0; i<6; i++ ) {
|
||||
mac1[i] = (r->in_dst_mac >> ( i*8 )) & 0xFF;
|
||||
}
|
||||
for ( i=0; i<6; i++ ) {
|
||||
mac2[i] = (r->out_src_mac >> ( i*8 )) & 0xFF;
|
||||
}
|
||||
snprintf(_s, slen-1,
|
||||
" \"in_dst_mac\" : \"%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\",\n"
|
||||
" \"out_src_mac\" : \"%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\",\n"
|
||||
, mac1[5], mac1[4], mac1[3], mac1[2], mac1[1], mac1[0],
|
||||
mac2[5], mac2[4], mac2[3], mac2[2], mac2[1], mac2[0] );
|
||||
} break;
|
||||
case EX_MPLS: {
|
||||
unsigned int i;
|
||||
for ( i=0; i<10; i++ ) {
|
||||
snprintf(_s, slen-1,
|
||||
" \"mpls_%u\" : \"%u-%u-%u\",\n", i+1
|
||||
, r->mpls_label[i] >> 4 , (r->mpls_label[i] & 0xF ) >> 1, r->mpls_label[i] & 1 );
|
||||
_slen = strlen(data_string);
|
||||
_s = data_string + _slen;
|
||||
slen = STRINGSIZE - _slen;
|
||||
}
|
||||
} break;
|
||||
case EX_ROUTER_IP_v4: {
|
||||
uint32_t _ip;
|
||||
as[0] = 0;
|
||||
_ip = htonl(r->ip_router.V4);
|
||||
inet_ntop(AF_INET, &_ip, as, sizeof(as));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
snprintf(_s, slen-1,
|
||||
" \"ip4_router\" : \"%s\",\n"
|
||||
, as);
|
||||
} break;
|
||||
case EX_ROUTER_IP_v6: {
|
||||
uint64_t _ip[2];
|
||||
as[0] = 0;
|
||||
_ip[0] = htonll(r->ip_router.V6[0]);
|
||||
_ip[1] = htonll(r->ip_router.V6[1]);
|
||||
inet_ntop(AF_INET6, _ip, as, sizeof(as));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
snprintf(_s, slen-1,
|
||||
" \"ip6_router\" : \"%s\",\n"
|
||||
, as);
|
||||
} break;
|
||||
case EX_LATENCY: {
|
||||
double f1, f2, f3;
|
||||
f1 = (double)r->client_nw_delay_usec / 1000.0;
|
||||
f2 = (double)r->server_nw_delay_usec / 1000.0;
|
||||
f3 = (double)r->appl_latency_usec / 1000.0;
|
||||
|
||||
snprintf(_s, slen-1,
|
||||
" \"cli_latency\" : %f,\n"
|
||||
" \"srv_latency\" : %f,\n"
|
||||
" \"app_latency\" : %f,\n"
|
||||
, f1, f2, f3);
|
||||
} break;
|
||||
case EX_ROUTER_ID:
|
||||
snprintf(_s, slen-1,
|
||||
" \"engine_type\" : %u,\n"
|
||||
" \"engine_id\" : %u,\n"
|
||||
, r->engine_type, r->engine_id);
|
||||
break;
|
||||
case EX_RECEIVED: {
|
||||
char *datestr, datebuff[64];
|
||||
when = r->received / 1000LL;
|
||||
ts = localtime(&when);
|
||||
strftime(datebuff, 63, "%Y-%m-%dT%H:%M:%S", ts);
|
||||
asprintf(&datestr, "%s.%llu", datebuff, (long long unsigned)r->received % 1000L);
|
||||
|
||||
snprintf(_s, slen-1,
|
||||
" \"t_received\" : \"%s\",\n"
|
||||
, datestr);
|
||||
free(datestr);
|
||||
} break;
|
||||
#ifdef NSEL
|
||||
case EX_NSEL_COMMON: {
|
||||
char *event = "UNKNOWN";
|
||||
char *datestr, datebuff[64];
|
||||
if ( r->event <= 5 ) {
|
||||
event = NSEL_event_string[r->event];
|
||||
}
|
||||
when = r->event_time / 1000LL;
|
||||
ts = localtime(&when);
|
||||
strftime(datebuff, 63, "%Y-%m-%dT%H:%M:%S", ts);
|
||||
asprintf(&datestr, "%s.%llu", datebuff, r->event_time % 1000LL);
|
||||
snprintf(_s, slen-1,
|
||||
" \"connect_id\" : \"%u\",\n"
|
||||
" \"event_id\" : \"%u\",\n"
|
||||
" \"event\" : \"%s\",\n"
|
||||
" \"xevent_id\" : \"%u\",\n"
|
||||
" \"t_event\" : \"%s\",\n"
|
||||
, r->conn_id, r->event, event, r->fw_xevent, datestr);
|
||||
free(datestr);
|
||||
} break;
|
||||
case EX_NEL_COMMON: {
|
||||
char *event = "UNKNOWN";
|
||||
if ( r->event <= 2 ) {
|
||||
event = NEL_event_string[r->event];
|
||||
}
|
||||
snprintf(_s, slen-1,
|
||||
" \"nat_event_id\" : \"%u\",\n"
|
||||
" \"nat_event\" : \"%s\",\n"
|
||||
" \"ingress_vrf\" : \"%u\",\n"
|
||||
" \"egress_vrf\" : \"%u\",\n"
|
||||
, r->event, event, r->ingress_vrfid, r->egress_vrfid);
|
||||
} break;
|
||||
case EX_NSEL_XLATE_PORTS: {
|
||||
snprintf(_s, slen-1,
|
||||
" \"src_xlt_port\" : \"%u\",\n"
|
||||
" \"dst_xlt_port\" : \"%u\",\n"
|
||||
, r->xlate_src_port, r->xlate_dst_port );
|
||||
} break;
|
||||
case EX_PORT_BLOCK_ALLOC: {
|
||||
snprintf(_s, slen-1,
|
||||
" \"pblock_start\" : \"%u\",\n"
|
||||
" \"pblock_end\" : \"%u\",\n"
|
||||
" \"pblock_step\" : \"%u\",\n"
|
||||
" \"pblock_size\" : \"%u\",\n"
|
||||
, r->block_start, r->block_end, r->block_step, r->block_size );
|
||||
} break;
|
||||
case EX_NSEL_XLATE_IP_v4: {
|
||||
uint32_t _src, _dst;
|
||||
as[0] = 0;
|
||||
ds[0] = 0;
|
||||
_src = htonl(r->xlate_src_ip.V4);
|
||||
_dst = htonl(r->xlate_dst_ip.V4);
|
||||
inet_ntop(AF_INET, &_src, as, sizeof(as));
|
||||
inet_ntop(AF_INET, &_dst, ds, sizeof(ds));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
ds[IP_STRING_LEN-1] = 0;
|
||||
|
||||
snprintf(_s, slen-1,
|
||||
" \"src4_xlt_ip\" : \"%s\",\n"
|
||||
" \"dst4_xlt_ip\" : \"%s\",\n"
|
||||
, as, ds);
|
||||
} break;
|
||||
case EX_NSEL_XLATE_IP_v6: {
|
||||
uint64_t _src[2], _dst[2];
|
||||
as[0] = 0;
|
||||
ds[0] = 0;
|
||||
_src[0] = htonll(r->xlate_src_ip.V6[0]);
|
||||
_src[1] = htonll(r->xlate_src_ip.V6[1]);
|
||||
_dst[0] = htonll(r->xlate_dst_ip.V6[0]);
|
||||
_dst[1] = htonll(r->xlate_dst_ip.V6[1]);
|
||||
inet_ntop(AF_INET6, _src, as, sizeof(as));
|
||||
inet_ntop(AF_INET6, _dst, ds, sizeof(ds));
|
||||
as[IP_STRING_LEN-1] = 0;
|
||||
ds[IP_STRING_LEN-1] = 0;
|
||||
|
||||
snprintf(_s, slen-1,
|
||||
" \"src6_xlt_ip\" : \"%s\",\n"
|
||||
" \"dst6_xlt_ip\" : \"%s\",\n"
|
||||
, as, ds);
|
||||
} break;
|
||||
case EX_NSEL_ACL:
|
||||
snprintf(_s, slen-1,
|
||||
" \"ingress_acl\" : \"0x%x/0x%x/0x%x\",\n"
|
||||
" \"egress_acl\" : \"0x%x/0x%x/0x%x\",\n"
|
||||
, r->ingress_acl_id[0], r->ingress_acl_id[1], r->ingress_acl_id[2],
|
||||
r->egress_acl_id[0], r->egress_acl_id[1], r->egress_acl_id[2]);
|
||||
break;
|
||||
case EX_NSEL_USER:
|
||||
case EX_NSEL_USER_MAX:
|
||||
snprintf(_s, slen-1,
|
||||
" \"user_name\" : \"%s\",\n"
|
||||
, r->username[0] ? r->username : "<empty>");
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
_slen = strlen(data_string);
|
||||
_s = data_string + _slen;
|
||||
slen = STRINGSIZE - _slen;
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
// add label and close json object
|
||||
snprintf(_s, slen-1,
|
||||
" \"label\" : \"%s\"\n"
|
||||
"}\n", r->label ? r->label : "<none>");
|
||||
|
||||
data_string[STRINGSIZE-1] = 0;
|
||||
*s = data_string;
|
||||
|
||||
|
||||
} // End of format_file_block_record
|
33
bin/output_json.h
Normal file
33
bin/output_json.h
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* * Neither the name of the author nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
void flow_record_to_json(void *record, char **s, int tag);
|
||||
|
BIN
bin/pack.pcap
BIN
bin/pack.pcap
Binary file not shown.
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@ -28,12 +29,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: panonymizer.h 39 2009-11-25 08:11:15Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 39 $
|
||||
*
|
||||
*/
|
||||
|
||||
/* Original disclaimer
|
||||
@ -80,6 +75,13 @@
|
||||
#ifndef _PANONYMIZER_H_
|
||||
#define _PANONYMIZER_H_ 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "rijndael.h"
|
||||
|
||||
// PAnonymizer_Init need a 256-bit key
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Peter Haag
|
||||
* Copyright (c) 2014, Peter Haag
|
||||
* Copyright (c) 2009, Peter Haag
|
||||
* All rights reserved.
|
||||
@ -27,13 +28,6 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Author: haag $
|
||||
*
|
||||
* $Id: pcap_reader.c 39 2009-11-25 08:11:15Z haag $
|
||||
*
|
||||
* $LastChangedRevision: 39 $
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
@ -67,7 +61,7 @@
|
||||
enum { SRC_IP, DST_IP, UDP_PORT, TCP_PORT, ICMP_TYPE };
|
||||
|
||||
static pcap_t *pcap_handle;
|
||||
static uint32_t tcp_count, udp_count, icmp_count, arp_count, unknow_count;
|
||||
static uint32_t tcp_count, udp_count, arp_count, unknow_count;
|
||||
|
||||
/*
|
||||
* Function prototypes
|
||||
@ -130,7 +124,6 @@ static ssize_t decode_packet(struct pcap_pkthdr *hdr, u_char *pkt, void *buffer,
|
||||
struct ip *ip;
|
||||
struct udphdr *udp;
|
||||
struct tcphdr *tcp;
|
||||
struct icmp *icmp;
|
||||
u_char *payload;
|
||||
int len, i;
|
||||
u_int hlen,version;
|
||||
@ -245,10 +238,13 @@ struct sockaddr_in *in_sock = (struct sockaddr_in *)sock;
|
||||
printf("\n");
|
||||
|
||||
break;
|
||||
case IPPROTO_ICMP:
|
||||
/*
|
||||
case IPPROTO_ICMP: {
|
||||
struct icmp *icmp;
|
||||
icmp_count++;
|
||||
icmp = (struct icmp *)((void *)ip + (ip->ip_hl << 0x02));
|
||||
break;
|
||||
} break;
|
||||
*/
|
||||
default:
|
||||
/* no default */
|
||||
break;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user