Compare commits

...

128 Commits

Author SHA1 Message Date
9a6d6292f5
Fix bulid against libpcap when --enable-readpcap is given 2018-10-09 16:58:34 +03:30
Peter Haag
8da06b599b
Merge pull request #125 from marekbecka/scale_summary
Scale numeric values in summary unless -N is used.
2018-08-18 16:09:28 +02:00
Marek Becka
49587e683b Also scale numeric values also in summary unless -N is used. 2018-07-26 10:03:08 -04:00
Peter Haag
4dafc2dc05 Update man page nfreplay for -z parameter 2018-06-24 14:52:34 +02:00
Peter Haag
3fd30239ff
Merge pull request #120 from LouisSinan/master
nfreplay - Distribution accross time
2018-06-24 14:47:20 +02:00
Peter Haag
9049c9f50f Cleanup comment 2018-06-24 14:42:12 +02:00
Peter Haag
db100d7eb5 Add CISCO ASA elements initiatorPackets (298) responderPackets (299) 2018-06-24 14:18:47 +02:00
Peter Haag
3c0c3f8d33 Ignore OSX .DS_Store files in -R file list 2018-06-24 13:05:20 +02:00
Peter Haag
9d187da615 Add multiple packet repeaters to nfcapd/sfcapd 2018-06-24 12:42:05 +02:00
Peter Haag
214091e490 Fix bookkeeper type - use key_t 2018-06-24 11:12:31 +02:00
LouisSinan
97687605d7
Merge pull request #1 from LouisSinan/Distribution-accross-time
nfreplay - Distribution accross time
2018-05-24 14:12:37 +02:00
LouisSinan
eaecb4c992
nfreplay - Distribution accross time
"z" parameter : Lines are sent with their "real distribution" acrross time (with a speed coefficient)
-z 1 --> 5 minutes of records will be sent in 5 minutes
-z 20 --> 5 minutes of record will be sent in 5/20 = 0.25 minute
2018-05-24 14:09:55 +02:00
Peter Haag
11f9159138 New bookkeeper hash broke NfSen. Fixed. ported back to release 1.6.17 2018-05-06 11:10:51 +02:00
Peter Haag
ec91b397c3 Release 1.6.17 2018-04-22 15:38:08 +02:00
Peter Haag
eab02996bd Fix definition for InfluxDB in configure.ac Issue #98 2018-04-20 19:00:04 +02:00
Peter Haag
bddfdb1397 Fix minor bugs 2018-04-20 18:51:51 +02:00
Peter Haag
29fb080a2b Update nfdump.1 man page for xsrcport & xdstport aggregations. Request #109 2018-04-20 13:08:35 +02:00
Peter Haag
2fab2cc9e0
Merge pull request #109 from simPod/aggregations
Add xsrcport & xdstport aggregations
2018-04-20 13:03:45 +02:00
Peter Haag
79a9c82d20
Merge pull request #108 from simPod/master
Fix autogen.sh permissions to be executable and update Readme
2018-04-20 12:54:23 +02:00
Peter Haag
19a7b2d7e2 Fix bug in sorting when guessing flow direction. Issue #92 2018-04-20 12:36:00 +02:00
Simon Podlipsky
e94fbbaac9
Add xsrcport & xdstport aggregations 2018-04-03 00:22:41 +02:00
Simon Podlipsky
5849192c50
Fix autogen.sh permissions to be executable 2018-04-01 23:34:19 +02:00
Peter Haag
0082088cf2 Add Fix argument processing of influxDB URL in nfprofile. Issue #99 2018-04-01 12:37:32 +02:00
Peter Haag
325aea7cae Add missing option -M in man page for nfcapd. Issue #103 2018-04-01 11:04:42 +02:00
Peter Haag
9f0fe95633 Fix nfdump crashes, when feeded with garbage input. Issue #104 2018-04-01 10:30:25 +02:00
Peter Haag
27f62a5510 Add missing -v option in nfreplay help text 2018-02-11 13:10:58 +01:00
Peter Haag
9e2e0c487c Add missing json output format help text 2018-02-11 12:45:46 +01:00
Peter Haag
2b4cfc7e8a Merge pull request #51 Influxdb from Luca 2018-01-06 15:23:59 +01:00
Peter Haag
0ea114f8ce IPFIX add fwd status tag #89 compatible to v9 (1byte) 2018-01-01 14:20:39 +01:00
Peter Haag
c400f52d66 IPFIX time stamps - fix offset calculation of unknown time formats 2018-01-01 13:21:58 +01:00
Peter Haag
2a829dfbf9 IPFIX time stamps - Fix elements #21,#22 offset calculation 2018-01-01 12:57:27 +01:00
Peter Haag
31137a3f5b Fix sampling for Juniper MX104. No sampling algorithm required 2017-12-31 12:43:40 +01:00
Peter Haag
13131ffb41 Add new output format json 2017-12-30 15:04:53 +01:00
Peter Haag
0ec4e21237 Remove unneeded files 2017-12-29 16:52:49 +01:00
Peter Haag
84be3e45c7
Update README.md 2017-12-29 16:47:40 +01:00
Peter Haag
1d2ed37d98
Update Readme.md formating 2017-12-29 16:40:29 +01:00
Peter Haag
70edef1d92 Fix formating errors 2017-12-29 16:26:03 +01:00
Peter Haag
f999bfe050 Update Readme 2017-12-29 16:18:24 +01:00
Peter Haag
fccabf69ab Activate flowlabel in filter syntax 2017-12-29 15:02:00 +01:00
Peter Haag
746d1bcd47 Add sampling tags 302, 304, 305. Add option for filter labels 2017-12-29 11:55:36 +01:00
Peter Haag
be29ad703f Add more detailed autogen.sh - softlink bootstrap 2017-12-28 18:53:16 +01:00
Peter Haag
0a86642a6e Fix 64bit fts compat issue in fts_compat.c 2017-12-28 18:50:43 +01:00
Peter Haag
cedc8479a8 Cleanup headers. Satify includes for header file 2017-12-28 18:19:27 +01:00
Peter Haag
9c2e7d6f4a Fix compiler warnings from different compilers clang/gcc 2017-12-28 16:47:40 +01:00
Peter Haag
8a9dcb2bc8 Cleanup sflow code - uncomment unnecessary code 2017-12-28 15:56:15 +01:00
Peter Haag
eaa7a857c8 Update sflow code to commit 7322984 of https://github.com/sflow/sflowtool 2017-12-27 19:56:21 +01:00
Peter Haag
c4e8a5b517 Add ipfix delta timestamp elements 158/159 2017-12-27 10:16:39 +01:00
Peter Haag
020a4d0893 Fix potential memory leaks in nfpcapd 2017-12-22 12:09:56 +01:00
Peter Haag
b776f8df70 Fix wrong offset calculation if unknown options are found 2017-12-21 17:21:44 +01:00
Peter Haag
adfd5e9631 Add x-late src/dst ip aggregation, if compiled with NSEL support 2017-12-21 16:32:08 +01:00
Peter Haag
f1b91aaad7 Fix gcc/clang differences 2017-12-21 09:56:58 +01:00
Peter Haag
959edbcc18 Report updates on existing samplers in v9 only if values change. issue 84 2017-12-17 19:12:00 +01:00
Peter Haag
79d9916c64 Add sampling for IPFIX. See issue #47 2017-12-17 19:03:55 +01:00
Peter Haag
a0ac615ed7
Merge pull request #89 from orca-software/add_doxygen_docs
Add doxygen docs
2017-12-15 10:41:46 +01:00
Peter Haag
99387c0ef9
Merge pull request #88 from orca-software/remove_autotools_output
Remove autotools output
2017-12-15 10:41:29 +01:00
Jaap Versteegh
dbcf7a6776 Added generated docs to .gitignore 2017-12-13 14:08:47 +01:00
Jaap Versteegh
15afb0a09e Configure building docs 2017-12-13 14:04:53 +01:00
Jaap Versteegh
0874edfdf8 Fixed issue with HAVE_DOXYGEN define 2017-12-13 13:57:38 +01:00
Jaap Versteegh
4bcdc8dad9 Added doc directory for Doxygen files and output 2017-12-13 13:56:23 +01:00
Jaap Versteegh
b4f08813f9 Added binaries generated by make to .gitignore 2017-12-13 13:52:47 +01:00
Jaap Versteegh
db4aa2b270 Added files generated by "configure" to .gitignore 2017-12-13 13:51:01 +01:00
Jaap Versteegh
8214edba23 Added generated files by ./bootstrap to .gitignore 2017-12-13 13:47:08 +01:00
Jaap Versteegh
376b3c8c4f Removed lingering references to doc directory 2017-12-13 13:43:54 +01:00
Jaap Versteegh
b8111e7c7f Removed generated files 2017-12-13 13:41:28 +01:00
Peter Haag
59e0eaec10 Add lz4 compression. Remove old and experimental xstat code - cleanup 2017-12-12 20:48:33 +01:00
Peter Haag
3bf72967fc Add lz4 compression. Remove old and experimental xstat code 2017-12-11 19:22:10 +01:00
Peter Haag
235fad2e71 Fix minor issues and compiler warnings 2017-12-03 15:53:48 +01:00
Peter Haag
659f582b97 Fix sfcapd time slices < 60 are not allowed 2017-12-03 14:15:35 +01:00
Peter Haag
41e5ec8d20 Fix version tags. update all to 1.6.16 2017-12-03 14:04:25 +01:00
Peter Haag
7b9fa686a9 Fix readme for release 1.6.16 2017-11-05 16:09:11 +01:00
Peter Haag
9821114694 Release 1.6.16 2017-11-05 16:06:35 +01:00
Peter Haag
29e80e48b5 Change -B behaviour as proposed in issue #59. Should not impact with previous use, but is more flexible 2017-11-05 15:41:47 +01:00
Peter Haag
a8bc82decb Add bzip compress switch in usage output of nfpcapd 2017-11-05 14:52:27 +01:00
Peter Haag
a35ecdd129 Fix issue #72 - multiple stat output 2017-11-05 14:25:27 +01:00
Peter Haag
f7a4bc566a Add 8byte timestamps exported by Nexus 7k family 2017-11-05 13:25:17 +01:00
Peter Haag
ad628903c0 Fix memory leak, if nfcapd can not write into directory 2017-03-18 15:16:18 +01:00
Peter Haag
f0666be488 Fix compile issues on some platforms 2017-03-18 02:46:58 +01:00
Peter Haag
f67d99e2e0 For nfpcapd, use more efficient spin locks for thread sync 2016-11-26 18:08:52 +01:00
Peter Haag
4c712ee62a Clean up logging. User Log* routines everywhere 2016-11-26 13:32:28 +01:00
Peter Haag
4cd1ef119d Merge branch 'master' of github.com:phaag/nfdump 2016-11-26 12:17:55 +01:00
Peter Haag
4aa127265d Add latency extension to nfpcapd. Streamline nfpcapd. 2016-11-26 12:17:16 +01:00
Peter Haag
88ed5083d5 Merge pull request #39 from bernhardschmidt/spelling
Fix several typos in manpages and sources
2016-11-19 17:13:40 +01:00
Peter Haag
b1a20cc154 Merge pull request #43 from aapo/typo_in_man
Fix typo in man
2016-11-15 08:53:36 +01:00
Peter Haag
aaa5c69092 Fix nfdump man page #44 2016-11-13 16:04:57 +01:00
Peter Haag
63e5ee71e4 Push fixes 2016-11-13 15:59:41 +01:00
Peter Haag
4be59e0e69 Add nfdump.test.out to git. Few debug changes in v9 and ipfix 2016-11-13 13:50:08 +01:00
Aapo Rantalainen
beae8f530a Fix typo in man 2016-10-22 11:27:21 +03:00
Erik Wenzel
b22d19a0c3 Fix man warning in nfdump.1 2016-10-03 20:12:57 +02:00
Bernhard Schmidt
365c300439 Fix spelling errors in sources found by Debian lintian 2016-10-03 20:10:40 +02:00
Bernhard Schmidt
05e97ab207 Fix spelling errors in manpages found by Debian lintian 2016-10-03 16:44:47 +02:00
Peter Haag
f8db5a90ea Replace unreliable _ftok in bookkeeper 2016-07-23 16:41:37 +02:00
Peter Haag
01bfb785da Merge pull request #28 from candlerb/candlerb/in_out_bytes
Aggregate using in+out bytes for bidirectional flows
2016-07-20 20:37:11 +02:00
Peter Haag
ecf85cffbd Merge pull request #26 from simonflood/patch-7
Update README.md
2016-07-20 20:19:28 +02:00
Brian Candler
5fab7794a3 Aggregate using in+out bytes for bidirectional flows
Some sources of data, e.g.  ASA NSEL, record a bidirectional flow record
with separate counters for in/out bytes and in/out packets.  This patch
makes aggregation over "packets", "bytes", "bps" etc look at the *sum* of
the input and output counters.  Previously they would use only the input
counters.

Query types which explicitly look at one direction, like "ibyte" and
"obyte", are unchanged.

Processing of unidirectional flows is not affected, because these store
values in the "in" counters only - the "out" counters are zero, so using the
sum of in+out is the same.

The resulting code is simpler: it doesn't have to calculate both in/out
values everywhere. It also uses accessor functions for all values, which
means no special cases for r->counter[cindex].
2016-06-13 21:41:06 +06:30
Simon Flood
e1120f0ed5 Update README.md
Fix typo
2016-06-07 11:08:31 +01:00
Peter Haag
812651f1fd Cleanup formating of nf_common.c 2016-06-05 12:31:24 +02:00
Peter Haag
0cde713e2c Merge pull request #25 from Opmantek/rawts
added output formats for timestamps in raw format
2016-06-05 12:21:08 +02:00
Peter Haag
68d660e984 Release v1.6.15 2016-06-05 11:52:29 +02:00
Peter Haag
25138d83f6 Fix wrong bps type case in cvs output. Fix opbs ipbs typos 2016-06-05 11:27:35 +02:00
Peter Haag
3039c97c29 Fix obyte, opps and obps output records 2016-06-05 10:17:17 +02:00
Alexander Zangerl
4237451c49 fixed stupid mistake re msec inclusion in start and end timestamps (received was ok) 2016-05-11 14:20:39 +10:00
Alexander Zangerl
69cc9c062c added formats %tsr, %ter and %trr for printing raw, fractional unix timestamps 2016-05-11 14:03:12 +10:00
Peter Haag
6ef51a7405 Merge pull request #19 from adamlamar/nfxstat-header-guard
Add header guard to nfxstat
2016-05-07 11:26:30 +02:00
Peter Haag
0db0d7ffd6 Add %ff record flags to custom output format 2016-05-07 11:18:33 +02:00
Peter Haag
bca76b91b3 Cleanup code in netflow_v9.c 2016-05-07 10:59:48 +02:00
Peter Haag
5d77fad378 Fix email address in AUTHERS file 2016-05-07 08:44:50 +02:00
Peter Haag
ff0e855bd1 Fix security issues in netflow_v9.c and ipfix.c 2016-05-07 08:35:34 +02:00
Peter Haag
aeb703c762 Fix shared library build issue. --enable-shared=no and yes are honored correctly. 2016-05-06 15:06:08 +02:00
Adam Lamar
83e31800dc Add header guard to nfxstat 2016-03-14 11:23:12 -06:00
Peter Haag
45c669ceeb Merge pull request #13 from simonflood/patch-6
Update nfdump.spec
2016-02-03 09:23:05 +01:00
Peter Haag
73a775c577 Merge pull request #10 from simonflood/patch-3
Update nfdump.spec
2016-02-03 09:22:27 +01:00
Peter Haag
16438a2b52 Merge pull request #11 from simonflood/patch-4
Update BSD-license.txt
2016-02-03 09:22:03 +01:00
Peter Haag
09729c7216 Merge pull request #9 from simonflood/patch-2
Update sfcapd.c - typo
2016-02-03 09:21:01 +01:00
Peter Haag
88f833b9fa Merge pull request #8 from simonflood/patch-1
Update nfcapd.c - typo
2016-02-03 09:20:25 +01:00
Peter Haag
089875b915 Merge pull request #12 from simonflood/patch-5
Update nfdump.spec
2016-02-03 09:19:34 +01:00
Simon Flood
c3a33fb523 Update nfdump.spec
Now nfdump creates libnfdump build and package it!
2016-02-02 15:44:47 +00:00
Simon Flood
3f8b8aff13 Update nfdump.spec
Update Version and Release tags to match latest release (1.6.14)
2016-02-02 15:41:52 +00:00
Simon Flood
6bc66f68b0 Update BSD-license.txt
Updated year to 2016 to match that in LICENSE file (are both files required?)
2016-02-02 15:39:17 +00:00
Simon Flood
5933a03e46 Update nfdump.spec
Fix README.md filename
2016-02-02 11:57:18 +00:00
Simon Flood
bfa4453876 Update sfcapd.c
Fix typo in error message
2016-01-29 18:12:16 +00:00
Simon Flood
0e7540fe7d Update nfcapd.c
Fix typo in error message
2016-01-29 18:10:10 +00:00
Peter Haag
ef7697f000 Fix build issues on various Linux/*BSD 2016-01-10 16:28:37 +01:00
Peter Haag
a12087c1e9 Add -Z in nfcapd/sfcapd for timezone extension. Breaks expire for now 2016-01-10 12:42:40 +01:00
Peter Haag
3b72bdac13 sflow: fix timestamp overflow. Build: cleanup check files. 2016-01-10 11:24:24 +01:00
Peter Haag
cc8315eab5 Add nfdump library. Fix fragments iin sflow 2015-12-23 12:31:59 +01:00
Peter Haag
6f5ea0464d Fix help for -z -j description 2015-11-21 13:58:29 +01:00
Peter Haag
69d46a710d Add missing nftrack to git 2015-11-21 12:42:58 +01:00
phaag
7ffa3cb493 Fix Readme.md 2015-10-03 17:23:12 +02:00
163 changed files with 19373 additions and 91030 deletions

59
.gitignore vendored
View File

@ -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/

View File

@ -1 +1 @@
Peter Haag peter.haag@switch.ch
Peter Haag peter@people.ops-trust.net

View File

@ -1,7 +1,7 @@
The nfdump project is distributed under the BSD license:
Copyright (c) 2015, Peter Haag
Copyright (c) 2016, Peter Haag
All rights reserved.
Redistribution and use in source and binary forms, with or without

115
ChangeLog
View File

@ -1,3 +1,116 @@
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
- Change -B behaviour as proposed in issue #59. Should not impact with previous use, but is more flexible
- Add bzip compress switch in usage output of nfpcapd
- Fix compile issues on some platforms
- nfpcapd improvements - still beta software.
- Minor bug fixes
2016-11-25
- Add latency extension to nfpcapd
- Smaller bug fixes to nfpcapd
2016-07-23
- Replace unreliable _ftok with more reliable string hash
2016-07-20
- Aggregate using in+out bytes for bidirectional flows
2016-06-05 v.1.6.15
- Fix Security issue http://www.security-assessment.com/files/documents/advisory/Nfdump%20nfcapd%201.6.14%20-%20Multiple%20Vulnerabilities.pdf
- Fix obyte, opps and obps output records
- Fix wrong bps type case in cvs output. Fix opbs ipbs typos
2016-01-10 v.1.6.14
- Fix CentOS compile issues with flow-tools converter
- Fix FreeBSD,OpenBSD build problems
- Fix timestamp overflow in sflow.c
2015-12-23
- Fix IP Fragmentation in sflow collector
- Create libnfdump for dynamic linking
2015-10-02
- Fix compile errors on other platforms
- Add -R to ModifyCompression
@ -9,7 +122,7 @@
- Fix CommonRecordV0Type conversion bug
- Fix nfexport bug, if only one single map exists
2014-11-16
2014-11-16 v.1.6.13
- Fix v1 extension size bug
- Add htonll check for autoconf
- Fix AddExtensionMap compare bug

370
INSTALL
View File

@ -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.

View File

@ -1,7 +1,7 @@
The nfdump project is distributed under the BSD license:
Copyright (c) 2015, Peter Haag
Copyright (c) 2016, Peter Haag
All rights reserved.
Redistribution and use in source and binary forms, with or without

View File

@ -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 flows
EXTRA_DIST = CreateSubHierarchy.pl LICENSE BSD-license.txt extra/PortTracker.pm extra/nfdump.spec bootstrap

View File

@ -1,776 +0,0 @@
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 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 = :
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.md compile depcomp \
install-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@
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@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
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@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LFLAGS = @LFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
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@
RRD_LIBS = @RRD_LIBS@
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_CC = @ac_ct_CC@
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_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
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 BSD-license.txt extra/PortTracker.pm extra/nfdump.spec bootstrap flows
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
# 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) | GZIP=$(GZIP_ENV) gzip -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) | GZIP=$(GZIP_ENV) gzip -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*) \
GZIP=$(GZIP_ENV) gzip -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*) \
GZIP=$(GZIP_ENV) gzip -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 mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr 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
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 \
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-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 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:

1
README Symbolic link
View File

@ -0,0 +1 @@
README.md

View File

@ -1,19 +1,19 @@
# nfdump
Stable Release v1.6.14
Stable Release v1.6.17
See the Changelog file for all changes in release 1.6.14
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.
nfdumpp is used as backend toolset for __NfSen__.
nfdump is used as backend toolset for __NfSen__.
---
## NSEL/ASA, NEL/NAT support
__NSEL__ (*__N__etwork __E__vent __S__ecurity __L__ogging*) as well as NEL (*__N__AT __E__vent __L__ ogging*) are technologies invented by __CISCO__ and also use the netflow v9 protocol. However, NSEL and NEL are not flows as commonly known but rather *__Events__!* exported from specific devices such as CISCO ASA. nfdump supports Event looging as part of netflow v9.
__NSEL__ (* Network Event Security Logging *) as well as NEL (* NAT Event Logging *) are technologies invented by __CISCO__ and also use the netflow v9 protocol. However, NSEL and NEL are not flows as commonly known but rather *__Events__!* exported from specific devices such as CISCO ASA. nfdump supports Event looging as part of netflow v9.
__Note:__ The older nfdump-1.5.8-2-NSEL is __not compatible__ with nfdump > 1.6.9 which supports NSEL/NEL.
@ -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,7 +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
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:
@ -71,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
@ -94,7 +94,7 @@ over the network to another host.
__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
@ -106,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
@ -118,16 +118,29 @@ for any other purpose.
#### 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>.
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>.
---
@ -326,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
@ -348,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
|
__nprobe latency extensions__|
### 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
@ -375,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
View File

@ -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 ...

1152
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

74
autogen.sh Executable file
View 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

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

File diff suppressed because it is too large Load Diff

View File

@ -1,154 +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'
],
{
'AU_DEFUN' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'_AM_MANGLE_OPTION' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'_AM_AUTOCONF_VERSION' => 1,
'_AM_DEPENDENCIES' => 1,
'_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'AM_DEP_TRACK' => 1,
'm4_pattern_allow' => 1,
'AM_RUN_LOG' => 1,
'AM_SET_DEPDIR' => 1,
'AM_PROG_INSTALL_SH' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_DEFUN_ONCE' => 1,
'AM_CONDITIONAL' => 1,
'include' => 1,
'AM_SET_LEADING_DOT' => 1,
'AM_INIT_AUTOMAKE' => 1,
'_AM_SET_OPTIONS' => 1,
'AC_DEFUN' => 1,
'AC_CONFIG_MACRO_DIR' => 1,
'AM_AUX_DIR_EXPAND' => 1,
'_m4_warn' => 1,
'm4_include' => 1,
'_AM_CONFIG_MACRO_DIRS' => 1,
'AM_MISSING_HAS_RUN' => 1,
'AM_PROG_INSTALL_STRIP' => 1,
'AM_SUBST_NOTMAKE' => 1,
'_AM_PROG_TAR' => 1,
'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'm4_pattern_forbid' => 1,
'AC_CONFIG_MACRO_DIR_TRACE' => 1,
'AM_MISSING_PROG' => 1,
'AM_MAKE_INCLUDE' => 1,
'_AM_PROG_CC_C_O' => 1,
'AM_SILENT_RULES' => 1,
'AM_SANITY_CHECK' => 1,
'_AM_SET_OPTION' => 1,
'_AM_IF_OPTION' => 1,
'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
'_AC_AM_CONFIG_HEADER_HOOK' => 1
}
], 'Autom4te::Request' ),
bless( [
'1',
1,
[
'/opt/local/share/autoconf'
],
[
'/opt/local/share/autoconf/autoconf/autoconf.m4f',
'aclocal.m4',
'configure.ac'
],
{
'AM_XGETTEXT_OPTION' => 1,
'AC_CONFIG_FILES' => 1,
'm4_pattern_allow' => 1,
'AM_MAINTAINER_MODE' => 1,
'AM_PROG_MOC' => 1,
'AM_GNU_GETTEXT' => 1,
'AM_PROG_MKDIR_P' => 1,
'AC_SUBST' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'AC_LIBSOURCE' => 1,
'LT_SUPPORTED_TAG' => 1,
'AC_CANONICAL_HOST' => 1,
'AM_POT_TOOLS' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AM_PROG_FC_C_O' => 1,
'sinclude' => 1,
'AM_CONDITIONAL' => 1,
'include' => 1,
'AC_REQUIRE_AUX_FILE' => 1,
'AC_SUBST_TRACE' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AM_PROG_F77_C_O' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'_AM_COND_ENDIF' => 1,
'AM_EXTRA_RECURSIVE_TARGETS' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_CANONICAL_TARGET' => 1,
'_LT_AC_TAGCONFIG' => 1,
'AC_FC_FREEFORM' => 1,
'm4_sinclude' => 1,
'AC_PROG_LIBTOOL' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'_AM_MAKEFILE_INCLUDE' => 1,
'AC_CANONICAL_BUILD' => 1,
'_m4_warn' => 1,
'AM_PROG_AR' => 1,
'AM_PATH_GUILE' => 1,
'm4_include' => 1,
'_AM_COND_ELSE' => 1,
'AM_PROG_CXX_C_O' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_FC_PP_DEFINE' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
'_AM_COND_IF' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AH_OUTPUT' => 1,
'AC_INIT' => 1,
'AC_FC_SRCEXT' => 1,
'AC_FC_PP_SRCEXT' => 1,
'm4_pattern_forbid' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'LT_INIT' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'AM_MAKEFILE_INCLUDE' => 1,
'AM_NLS' => 1,
'AC_CONFIG_LINKS' => 1,
'AM_SILENT_RULES' => 1
}
], 'Autom4te::Request' )
);

File diff suppressed because it is too large Load Diff

View File

@ -1,913 +0,0 @@
m4trace:configure.ac:6: -1- AC_INIT([nfdump], [1.6.14], [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.15])
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:437: 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:107: -2- AH_OUTPUT([HAVE_LIBZ], [/* Define to 1 if you have the `z\' library (-lz). */
@%:@undef HAVE_LIBZ])
m4trace:configure.ac:107: -2- AC_DEFINE_TRACE_LITERAL([HAVE_LIBZ])
m4trace:configure.ac:107: -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:157: -1- AC_SUBST([RRD_LIBS])
m4trace:configure.ac:157: -1- AC_SUBST_TRACE([RRD_LIBS])
m4trace:configure.ac:157: -1- m4_pattern_allow([^RRD_LIBS$])
m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_RRD_H], [/* Define to 1 if you have the <rrd.h> header file. */
@%:@undef HAVE_RRD_H])
m4trace:configure.ac:157: -1- AC_SUBST([CPP])
m4trace:configure.ac:157: -1- AC_SUBST_TRACE([CPP])
m4trace:configure.ac:157: -1- m4_pattern_allow([^CPP$])
m4trace:configure.ac:157: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.ac:157: -1- AC_SUBST_TRACE([CPPFLAGS])
m4trace:configure.ac:157: -1- m4_pattern_allow([^CPPFLAGS$])
m4trace:configure.ac:157: -1- AC_SUBST([CPP])
m4trace:configure.ac:157: -1- AC_SUBST_TRACE([CPP])
m4trace:configure.ac:157: -1- m4_pattern_allow([^CPP$])
m4trace:configure.ac:157: -1- AC_SUBST([GREP])
m4trace:configure.ac:157: -1- AC_SUBST_TRACE([GREP])
m4trace:configure.ac:157: -1- m4_pattern_allow([^GREP$])
m4trace:configure.ac:157: -1- AC_SUBST([EGREP])
m4trace:configure.ac:157: -1- AC_SUBST_TRACE([EGREP])
m4trace:configure.ac:157: -1- m4_pattern_allow([^EGREP$])
m4trace:configure.ac:157: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
m4trace:configure.ac:157: -1- m4_pattern_allow([^STDC_HEADERS$])
m4trace:configure.ac:157: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
@%:@undef STDC_HEADERS])
m4trace:configure.ac:157: -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:157: -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:157: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
@%:@undef HAVE_STDLIB_H])
m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
@%:@undef HAVE_STRING_H])
m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
@%:@undef HAVE_MEMORY_H])
m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
@%:@undef HAVE_STRINGS_H])
m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
@%:@undef HAVE_INTTYPES_H])
m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
@%:@undef HAVE_STDINT_H])
m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
@%:@undef HAVE_UNISTD_H])
m4trace:configure.ac:157: -1- AC_DEFINE_TRACE_LITERAL([HAVE_RRD_H])
m4trace:configure.ac:157: -1- m4_pattern_allow([^HAVE_RRD_H$])
m4trace:configure.ac:157: -1- AM_CONDITIONAL([NFPROFILE], [true])
m4trace:configure.ac:157: -1- AC_SUBST([NFPROFILE_TRUE])
m4trace:configure.ac:157: -1- AC_SUBST_TRACE([NFPROFILE_TRUE])
m4trace:configure.ac:157: -1- m4_pattern_allow([^NFPROFILE_TRUE$])
m4trace:configure.ac:157: -1- AC_SUBST([NFPROFILE_FALSE])
m4trace:configure.ac:157: -1- AC_SUBST_TRACE([NFPROFILE_FALSE])
m4trace:configure.ac:157: -1- m4_pattern_allow([^NFPROFILE_FALSE$])
m4trace:configure.ac:157: -1- _AM_SUBST_NOTMAKE([NFPROFILE_TRUE])
m4trace:configure.ac:157: -1- _AM_SUBST_NOTMAKE([NFPROFILE_FALSE])
m4trace:configure.ac:157: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [../../lib/autoconf/general.m4:2757: AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:643: AS_IF is expanded from...
../../lib/autoconf/general.m4:1472: AC_ARG_ENABLE is expanded from...
configure.ac:157: 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:190: -1- AC_SUBST([RRD_LIBS])
m4trace:configure.ac:190: -1- AC_SUBST_TRACE([RRD_LIBS])
m4trace:configure.ac:190: -1- m4_pattern_allow([^RRD_LIBS$])
m4trace:configure.ac:190: -1- AH_OUTPUT([HAVE_RRD_H], [/* Define to 1 if you have the <rrd.h> header file. */
@%:@undef HAVE_RRD_H])
m4trace:configure.ac:190: -1- AC_DEFINE_TRACE_LITERAL([HAVE_RRD_H])
m4trace:configure.ac:190: -1- m4_pattern_allow([^HAVE_RRD_H$])
m4trace:configure.ac:190: -1- AM_CONDITIONAL([NFTRACK], [true])
m4trace:configure.ac:190: -1- AC_SUBST([NFTRACK_TRUE])
m4trace:configure.ac:190: -1- AC_SUBST_TRACE([NFTRACK_TRUE])
m4trace:configure.ac:190: -1- m4_pattern_allow([^NFTRACK_TRUE$])
m4trace:configure.ac:190: -1- AC_SUBST([NFTRACK_FALSE])
m4trace:configure.ac:190: -1- AC_SUBST_TRACE([NFTRACK_FALSE])
m4trace:configure.ac:190: -1- m4_pattern_allow([^NFTRACK_FALSE$])
m4trace:configure.ac:190: -1- _AM_SUBST_NOTMAKE([NFTRACK_TRUE])
m4trace:configure.ac:190: -1- _AM_SUBST_NOTMAKE([NFTRACK_FALSE])
m4trace:configure.ac:190: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [../../lib/autoconf/general.m4:2757: AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:643: AS_IF is expanded from...
../../lib/autoconf/general.m4:1472: AC_ARG_ENABLE is expanded from...
configure.ac:190: 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:217: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY])
m4trace:configure.ac:217: -1- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY$])
m4trace:configure.ac:217: -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:217: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY])
m4trace:configure.ac:217: -1- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY$])
m4trace:configure.ac:217: -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:217: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN])
m4trace:configure.ac:217: -1- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN$])
m4trace:configure.ac:217: -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:217: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN])
m4trace:configure.ac:217: -1- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN$])
m4trace:configure.ac:217: -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:217: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_SA_LEN])
m4trace:configure.ac:217: -1- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_SA_LEN$])
m4trace:configure.ac:217: -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:251: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HTONLL])
m4trace:configure.ac:251: -1- m4_pattern_allow([^HAVE_HTONLL$])
m4trace:configure.ac:251: -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:273: -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:273: -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:273: -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:273: -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:273: -1- AH_OUTPUT([HAVE_NETDB_H], [/* Define to 1 if you have the <netdb.h> header file. */
@%:@undef HAVE_NETDB_H])
m4trace:configure.ac:273: -1- AH_OUTPUT([HAVE_RESOLV_H], [/* Define to 1 if you have the <resolv.h> header file. */
@%:@undef HAVE_RESOLV_H])
m4trace:configure.ac:275: -1- AH_OUTPUT([HAVE_BZLIB_H], [/* Define to 1 if you have the <bzlib.h> header file. */
@%:@undef HAVE_BZLIB_H])
m4trace:configure.ac:275: -1- AC_DEFINE_TRACE_LITERAL([HAVE_BZLIB_H])
m4trace:configure.ac:275: -1- m4_pattern_allow([^HAVE_BZLIB_H$])
m4trace:configure.ac:283: -1- AC_SUBST([FTS_OBJ])
m4trace:configure.ac:283: -1- AC_SUBST_TRACE([FTS_OBJ])
m4trace:configure.ac:283: -1- m4_pattern_allow([^FTS_OBJ$])
m4trace:configure.ac:287: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_VOID_P])
m4trace:configure.ac:287: -1- m4_pattern_allow([^SIZEOF_VOID_P$])
m4trace:configure.ac:287: -1- AH_OUTPUT([SIZEOF_VOID_P], [/* The size of `void *\', as computed by sizeof. */
@%:@undef SIZEOF_VOID_P])
m4trace:configure.ac:289: -1- AC_DEFINE_TRACE_LITERAL([const])
m4trace:configure.ac:289: -1- m4_pattern_allow([^const$])
m4trace:configure.ac:289: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */
@%:@undef const])
m4trace:configure.ac:290: -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:291: -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:291: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN])
m4trace:configure.ac:291: -1- m4_pattern_allow([^WORDS_BIGENDIAN$])
m4trace:configure.ac:291: -1- AC_DEFINE_TRACE_LITERAL([AC_APPLE_UNIVERSAL_BUILD])
m4trace:configure.ac:291: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$])
m4trace:configure.ac:291: -1- AH_OUTPUT([AC_APPLE_UNIVERSAL_BUILD], [/* Define if building universal (internal helper macro) */
@%:@undef AC_APPLE_UNIVERSAL_BUILD])
m4trace:configure.ac:292: -1- AC_DEFINE_TRACE_LITERAL([pid_t])
m4trace:configure.ac:292: -1- m4_pattern_allow([^pid_t$])
m4trace:configure.ac:292: -1- AH_OUTPUT([pid_t], [/* Define to `int\' if <sys/types.h> does not define. */
@%:@undef pid_t])
m4trace:configure.ac:293: -1- AC_DEFINE_TRACE_LITERAL([size_t])
m4trace:configure.ac:293: -1- m4_pattern_allow([^size_t$])
m4trace:configure.ac:293: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if <sys/types.h> does not define. */
@%:@undef size_t])
m4trace:configure.ac:294: -1- AC_DEFINE_TRACE_LITERAL([TM_IN_SYS_TIME])
m4trace:configure.ac:294: -1- m4_pattern_allow([^TM_IN_SYS_TIME$])
m4trace:configure.ac:294: -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:295: -1- AC_DEFINE_TRACE_LITERAL([HAVE__BOOL])
m4trace:configure.ac:295: -1- m4_pattern_allow([^HAVE__BOOL$])
m4trace:configure.ac:295: -1- AH_OUTPUT([HAVE__BOOL], [/* Define to 1 if the system has the type `_Bool\'. */
@%:@undef HAVE__BOOL])
m4trace:configure.ac:295: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDBOOL_H])
m4trace:configure.ac:295: -1- m4_pattern_allow([^HAVE_STDBOOL_H$])
m4trace:configure.ac:295: -1- AH_OUTPUT([HAVE_STDBOOL_H], [/* Define to 1 if stdbool.h conforms to C99. */
@%:@undef HAVE_STDBOOL_H])
m4trace:configure.ac:298: -1- AC_DEFINE_TRACE_LITERAL([CLOSEDIR_VOID])
m4trace:configure.ac:298: -1- m4_pattern_allow([^CLOSEDIR_VOID$])
m4trace:configure.ac:298: -1- AH_OUTPUT([CLOSEDIR_VOID], [/* Define to 1 if the `closedir\' function returns void instead of `int\'. */
@%:@undef CLOSEDIR_VOID])
m4trace:configure.ac:299: -1- AH_OUTPUT([HAVE_VFORK_H], [/* Define to 1 if you have the <vfork.h> header file. */
@%:@undef HAVE_VFORK_H])
m4trace:configure.ac:299: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VFORK_H])
m4trace:configure.ac:299: -1- m4_pattern_allow([^HAVE_VFORK_H$])
m4trace:configure.ac:299: -1- AH_OUTPUT([HAVE_FORK], [/* Define to 1 if you have the `fork\' function. */
@%:@undef HAVE_FORK])
m4trace:configure.ac:299: -1- AH_OUTPUT([HAVE_VFORK], [/* Define to 1 if you have the `vfork\' function. */
@%:@undef HAVE_VFORK])
m4trace:configure.ac:299: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_VFORK])
m4trace:configure.ac:299: -1- m4_pattern_allow([^HAVE_WORKING_VFORK$])
m4trace:configure.ac:299: -1- AH_OUTPUT([HAVE_WORKING_VFORK], [/* Define to 1 if `vfork\' works. */
@%:@undef HAVE_WORKING_VFORK])
m4trace:configure.ac:299: -1- AC_DEFINE_TRACE_LITERAL([vfork])
m4trace:configure.ac:299: -1- m4_pattern_allow([^vfork$])
m4trace:configure.ac:299: -1- AH_OUTPUT([vfork], [/* Define as `fork\' if `vfork\' does not work. */
@%:@undef vfork])
m4trace:configure.ac:299: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_FORK])
m4trace:configure.ac:299: -1- m4_pattern_allow([^HAVE_WORKING_FORK$])
m4trace:configure.ac:299: -1- AH_OUTPUT([HAVE_WORKING_FORK], [/* Define to 1 if `fork\' works. */
@%:@undef HAVE_WORKING_FORK])
m4trace:configure.ac:300: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
@%:@undef HAVE_STDLIB_H])
m4trace:configure.ac:300: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDLIB_H])
m4trace:configure.ac:300: -1- m4_pattern_allow([^HAVE_STDLIB_H$])
m4trace:configure.ac:300: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC])
m4trace:configure.ac:300: -1- m4_pattern_allow([^HAVE_MALLOC$])
m4trace:configure.ac:300: -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:300: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC])
m4trace:configure.ac:300: -1- m4_pattern_allow([^HAVE_MALLOC$])
m4trace:configure.ac:300: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS malloc.$ac_objext"])
m4trace:configure.ac:300: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
m4trace:configure.ac:300: -1- m4_pattern_allow([^LIB@&t@OBJS$])
m4trace:configure.ac:300: -1- AC_LIBSOURCE([malloc.c])
m4trace:configure.ac:300: -1- AC_DEFINE_TRACE_LITERAL([malloc])
m4trace:configure.ac:300: -1- m4_pattern_allow([^malloc$])
m4trace:configure.ac:300: -1- AH_OUTPUT([malloc], [/* Define to rpl_malloc if the replacement function should be used. */
@%:@undef malloc])
m4trace:configure.ac:301: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME])
m4trace:configure.ac:301: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$])
m4trace:configure.ac:301: -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:301: -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:301: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
@%:@undef HAVE_UNISTD_H])
m4trace:configure.ac:301: -1- AH_OUTPUT([HAVE_ALARM], [/* Define to 1 if you have the `alarm\' function. */
@%:@undef HAVE_ALARM])
m4trace:configure.ac:301: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS mktime.$ac_objext"])
m4trace:configure.ac:301: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
m4trace:configure.ac:301: -1- m4_pattern_allow([^LIB@&t@OBJS$])
m4trace:configure.ac:301: -1- AC_LIBSOURCE([mktime.c])
m4trace:configure.ac:302: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
@%:@undef HAVE_STDLIB_H])
m4trace:configure.ac:302: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDLIB_H])
m4trace:configure.ac:302: -1- m4_pattern_allow([^HAVE_STDLIB_H$])
m4trace:configure.ac:302: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALLOC])
m4trace:configure.ac:302: -1- m4_pattern_allow([^HAVE_REALLOC$])
m4trace:configure.ac:302: -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:302: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALLOC])
m4trace:configure.ac:302: -1- m4_pattern_allow([^HAVE_REALLOC$])
m4trace:configure.ac:302: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS realloc.$ac_objext"])
m4trace:configure.ac:302: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
m4trace:configure.ac:302: -1- m4_pattern_allow([^LIB@&t@OBJS$])
m4trace:configure.ac:302: -1- AC_LIBSOURCE([realloc.c])
m4trace:configure.ac:302: -1- AC_DEFINE_TRACE_LITERAL([realloc])
m4trace:configure.ac:302: -1- m4_pattern_allow([^realloc$])
m4trace:configure.ac:302: -1- AH_OUTPUT([realloc], [/* Define to rpl_realloc if the replacement function should be used. */
@%:@undef realloc])
m4trace:configure.ac:303: -1- AC_DEFINE_TRACE_LITERAL([LSTAT_FOLLOWS_SLASHED_SYMLINK])
m4trace:configure.ac:303: -1- m4_pattern_allow([^LSTAT_FOLLOWS_SLASHED_SYMLINK$])
m4trace:configure.ac:303: -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:303: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS lstat.$ac_objext"])
m4trace:configure.ac:303: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
m4trace:configure.ac:303: -1- m4_pattern_allow([^LIB@&t@OBJS$])
m4trace:configure.ac:303: -1- AC_LIBSOURCE([lstat.c])
m4trace:configure.ac:303: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS stat.$ac_objext"])
m4trace:configure.ac:303: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
m4trace:configure.ac:303: -1- m4_pattern_allow([^LIB@&t@OBJS$])
m4trace:configure.ac:303: -1- AC_LIBSOURCE([stat.c])
m4trace:configure.ac:303: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STAT_EMPTY_STRING_BUG])
m4trace:configure.ac:303: -1- m4_pattern_allow([^HAVE_STAT_EMPTY_STRING_BUG$])
m4trace:configure.ac:303: -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:304: -1- AH_OUTPUT([HAVE_STRFTIME], [/* Define to 1 if you have the `strftime\' function. */
@%:@undef HAVE_STRFTIME])
m4trace:configure.ac:304: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRFTIME])
m4trace:configure.ac:304: -1- m4_pattern_allow([^HAVE_STRFTIME$])
m4trace:configure.ac:304: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRFTIME])
m4trace:configure.ac:304: -1- m4_pattern_allow([^HAVE_STRFTIME$])
m4trace:configure.ac:305: -1- AH_OUTPUT([HAVE_INET_NTOA], [/* Define to 1 if you have the `inet_ntoa\' function. */
@%:@undef HAVE_INET_NTOA])
m4trace:configure.ac:305: -1- AH_OUTPUT([HAVE_SOCKET], [/* Define to 1 if you have the `socket\' function. */
@%:@undef HAVE_SOCKET])
m4trace:configure.ac:305: -1- AH_OUTPUT([HAVE_STRCHR], [/* Define to 1 if you have the `strchr\' function. */
@%:@undef HAVE_STRCHR])
m4trace:configure.ac:305: -1- AH_OUTPUT([HAVE_STRDUP], [/* Define to 1 if you have the `strdup\' function. */
@%:@undef HAVE_STRDUP])
m4trace:configure.ac:305: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */
@%:@undef HAVE_STRERROR])
m4trace:configure.ac:305: -1- AH_OUTPUT([HAVE_STRRCHR], [/* Define to 1 if you have the `strrchr\' function. */
@%:@undef HAVE_STRRCHR])
m4trace:configure.ac:305: -1- AH_OUTPUT([HAVE_STRSTR], [/* Define to 1 if you have the `strstr\' function. */
@%:@undef HAVE_STRSTR])
m4trace:configure.ac:305: -1- AH_OUTPUT([HAVE_SCANDIR], [/* Define to 1 if you have the `scandir\' function. */
@%:@undef HAVE_SCANDIR])
m4trace:configure.ac:322: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
@%:@undef HAVE_LIBRESOLV])
m4trace:configure.ac:322: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
m4trace:configure.ac:322: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
m4trace:configure.ac:322: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
@%:@undef HAVE_LIBRESOLV])
m4trace:configure.ac:322: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
m4trace:configure.ac:322: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
m4trace:configure.ac:322: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSOCKET])
m4trace:configure.ac:322: -1- m4_pattern_allow([^HAVE_LIBSOCKET$])
m4trace:configure.ac:322: -1- AH_OUTPUT([HAVE_LIBSOCKET], [/* */
@%:@undef HAVE_LIBSOCKET])
m4trace:configure.ac:322: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
m4trace:configure.ac:322: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
m4trace:configure.ac:322: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* */
@%:@undef HAVE_LIBRESOLV])
m4trace:configure.ac:322: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
@%:@undef HAVE_LIBRESOLV])
m4trace:configure.ac:322: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
m4trace:configure.ac:322: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
m4trace:configure.ac:322: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
@%:@undef HAVE_LIBRESOLV])
m4trace:configure.ac:322: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
m4trace:configure.ac:322: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
m4trace:configure.ac:329: -1- AC_DEFINE_TRACE_LITERAL([ptrdiff_t])
m4trace:configure.ac:329: -1- m4_pattern_allow([^ptrdiff_t$])
m4trace:configure.ac:329: -1- AH_OUTPUT([ptrdiff_t], [/* Define to `long\' if <sys/types.h> does not define. */
@%:@undef ptrdiff_t])
m4trace:configure.ac:330: -1- AC_DEFINE_TRACE_LITERAL([size_t])
m4trace:configure.ac:330: -1- m4_pattern_allow([^size_t$])
m4trace:configure.ac:330: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if <sys/types.h> does not define. */
@%:@undef size_t])
m4trace:configure.ac:331: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_SHORT])
m4trace:configure.ac:331: -1- m4_pattern_allow([^SIZEOF_SHORT$])
m4trace:configure.ac:331: -1- AH_OUTPUT([SIZEOF_SHORT], [/* The size of `short\', as computed by sizeof. */
@%:@undef SIZEOF_SHORT])
m4trace:configure.ac:332: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_INT])
m4trace:configure.ac:332: -1- m4_pattern_allow([^SIZEOF_INT$])
m4trace:configure.ac:332: -1- AH_OUTPUT([SIZEOF_INT], [/* The size of `int\', as computed by sizeof. */
@%:@undef SIZEOF_INT])
m4trace:configure.ac:333: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG])
m4trace:configure.ac:333: -1- m4_pattern_allow([^SIZEOF_LONG$])
m4trace:configure.ac:333: -1- AH_OUTPUT([SIZEOF_LONG], [/* The size of `long\', as computed by sizeof. */
@%:@undef SIZEOF_LONG])
m4trace:configure.ac:334: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG_LONG])
m4trace:configure.ac:334: -1- m4_pattern_allow([^SIZEOF_LONG_LONG$])
m4trace:configure.ac:334: -1- AH_OUTPUT([SIZEOF_LONG_LONG], [/* The size of `long long\', as computed by sizeof. */
@%:@undef SIZEOF_LONG_LONG])
m4trace:configure.ac:335: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF___INT64])
m4trace:configure.ac:335: -1- m4_pattern_allow([^SIZEOF___INT64$])
m4trace:configure.ac:335: -1- AH_OUTPUT([SIZEOF___INT64], [/* The size of `__int64\', as computed by sizeof. */
@%:@undef SIZEOF___INT64])
m4trace:configure.ac:336: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_VOID_P])
m4trace:configure.ac:336: -1- m4_pattern_allow([^SIZEOF_VOID_P$])
m4trace:configure.ac:336: -1- AH_OUTPUT([SIZEOF_VOID_P], [/* The size of `void *\', as computed by sizeof. */
@%:@undef SIZEOF_VOID_P])
m4trace:configure.ac:337: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_SIZE_T])
m4trace:configure.ac:337: -1- m4_pattern_allow([^SIZEOF_SIZE_T$])
m4trace:configure.ac:337: -1- AH_OUTPUT([SIZEOF_SIZE_T], [/* The size of `size_t\', as computed by sizeof. */
@%:@undef SIZEOF_SIZE_T])
m4trace:configure.ac:338: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_PTRDIFF_T])
m4trace:configure.ac:338: -1- m4_pattern_allow([^SIZEOF_PTRDIFF_T$])
m4trace:configure.ac:338: -1- AH_OUTPUT([SIZEOF_PTRDIFF_T], [/* The size of `ptrdiff_t\', as computed by sizeof. */
@%:@undef SIZEOF_PTRDIFF_T])
m4trace:configure.ac:339: -1- AC_DEFINE_TRACE_LITERAL([const])
m4trace:configure.ac:339: -1- m4_pattern_allow([^const$])
m4trace:configure.ac:339: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */
@%:@undef const])
m4trace:configure.ac:340: -1- AH_OUTPUT([HAVE_MEMCMP], [/* Define to 1 if you have the `memcmp\' function. */
@%:@undef HAVE_MEMCMP])
m4trace:configure.ac:340: -1- AH_OUTPUT([HAVE_MEMCPY], [/* Define to 1 if you have the `memcpy\' function. */
@%:@undef HAVE_MEMCPY])
m4trace:configure.ac:340: -1- AH_OUTPUT([HAVE_MEMMOVE], [/* Define to 1 if you have the `memmove\' function. */
@%:@undef HAVE_MEMMOVE])
m4trace:configure.ac:340: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */
@%:@undef HAVE_MEMSET])
m4trace:configure.ac:357: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
You should run autoupdate.], [../../lib/autoconf/general.m4:2615: AC_TRY_COMPILE is expanded from...
../../lib/m4sugar/m4sh.m4:643: AS_IF is expanded from...
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
configure.ac:357: the top level])
m4trace:configure.ac:361: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SEMUN])
m4trace:configure.ac:361: -1- m4_pattern_allow([^HAVE_SEMUN$])
m4trace:configure.ac:361: -1- AH_OUTPUT([HAVE_SEMUN], [/* Define if sys/sem.h defines struct semun */
@%:@undef HAVE_SEMUN])
m4trace:configure.ac:391: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
You should run autoupdate.], [../../lib/autoconf/general.m4:2765: AC_TRY_RUN is expanded from...
configure.ac:391: the top level])
m4trace:configure.ac:391: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SIZE_T_Z_FORMAT])
m4trace:configure.ac:391: -1- m4_pattern_allow([^HAVE_SIZE_T_Z_FORMAT$])
m4trace:configure.ac:391: -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:394: -1- AC_CONFIG_FILES([Makefile bin/Makefile man/Makefile])
m4trace:configure.ac:394: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
You should run autoupdate.], [])
m4trace:configure.ac:394: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
m4trace:configure.ac:394: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
m4trace:configure.ac:394: -1- m4_pattern_allow([^LIB@&t@OBJS$])
m4trace:configure.ac:394: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
m4trace:configure.ac:394: -1- AC_SUBST_TRACE([LTLIBOBJS])
m4trace:configure.ac:394: -1- m4_pattern_allow([^LTLIBOBJS$])
m4trace:configure.ac:394: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])
m4trace:configure.ac:394: -1- AC_SUBST([am__EXEEXT_TRUE])
m4trace:configure.ac:394: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE])
m4trace:configure.ac:394: -1- m4_pattern_allow([^am__EXEEXT_TRUE$])
m4trace:configure.ac:394: -1- AC_SUBST([am__EXEEXT_FALSE])
m4trace:configure.ac:394: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE])
m4trace:configure.ac:394: -1- m4_pattern_allow([^am__EXEEXT_FALSE$])
m4trace:configure.ac:394: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE])
m4trace:configure.ac:394: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE])
m4trace:configure.ac:394: -1- AC_SUBST_TRACE([top_builddir])
m4trace:configure.ac:394: -1- AC_SUBST_TRACE([top_build_prefix])
m4trace:configure.ac:394: -1- AC_SUBST_TRACE([srcdir])
m4trace:configure.ac:394: -1- AC_SUBST_TRACE([abs_srcdir])
m4trace:configure.ac:394: -1- AC_SUBST_TRACE([top_srcdir])
m4trace:configure.ac:394: -1- AC_SUBST_TRACE([abs_top_srcdir])
m4trace:configure.ac:394: -1- AC_SUBST_TRACE([builddir])
m4trace:configure.ac:394: -1- AC_SUBST_TRACE([abs_builddir])
m4trace:configure.ac:394: -1- AC_SUBST_TRACE([abs_top_builddir])
m4trace:configure.ac:394: -1- AC_SUBST_TRACE([INSTALL])
m4trace:configure.ac:394: -1- AC_SUBST_TRACE([MKDIR_P])

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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])

View File

@ -1,6 +1,8 @@
bin_PROGRAMS = nfcapd nfdump nfreplay nfexpire nfanon
EXTRA_PROGRAMS = nftest nfgen nfreader
check_PROGRAMS = nftest nfgen nfreader
EXTRA_DIST = applybits_inline.c nffile_inline.c collector_inline.c inline.c nfdump_inline.c heapsort_inline.c test.sh nfdump.test.out nfdump.test.diff
check_PROGRAMMS = test.sh
TESTS = nftest test.sh
@ -30,17 +32,22 @@ LDADD = $(DEPS_LIBS)
#Add extra debug info for gdb
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
nfprof = nfprof.c nfprof.h
nfnet = nfnet.c nfnet.h
anon = panonymizer.c panonymizer.h rijndael.c rijndael.h
collector = collector.c collector.h
nfv1 = netflow_v1.c netflow_v1.h
nfv9 = netflow_v9.c netflow_v9.h
# pcaproc = pcaproc.c pcaproc.h flowtree.c flowtree.h ipfrag.c ipfrag.h malloc_hook.c
pcaproc = pcaproc.c pcaproc.h flowtree.c flowtree.h ipfrag.c ipfrag.h
content = content_dns.c content_dns.h
netflow_pcap = netflow_pcap.c netflow_pcap.h
@ -49,82 +56,103 @@ nfv5v7 = netflow_v5_v7.c netflow_v5_v7.h
nfstatfile = nfstatfile.c nfstatfile.h
nflowcache = nflowcache.c nflowcache.h
bookkeeper = bookkeeper.c bookkeeper.h
exporter = exporter.c exporter.h
expire= expire.c expire.h
launch = launch.c launch.h
lib_LTLIBRARIES = libnfdump.la
libnfdump_la_SOURCES = $(output) $(common) $(util) $(filelzo) $(nflist) $(filter) $(exporter)
#libnfdump_la_LIBADD = -lz
libnfdump_la_LDFLAGS = -release 1.6.17
nfdump_SOURCES = nfdump.c nfdump.h nfstat.c nfstat.h nfexport.c nfexport.h \
$(common) $(nflowcache) $(util) $(filelzo) $(nflist) $(filter) $(nfprof) $(exporter)
$(nflowcache) $(nfprof)
nfdump_LDADD = -lnfdump
nfdump_DEPENDENCIES = libnfdump.la
nfreplay_SOURCES = nfreplay.c \
$(common) $(util) $(filelzo) $(nflist) $(filter) $(nfprof) \
$(nfnet) $(collector) $(nfv1) $(nfv9) $(nfv5v7) $(ipfix) $(exporter)
nfreplay_SOURCES = nfreplay.c $(nfprof) \
$(nfnet) $(collector) $(nfv1) $(nfv9) $(nfv5v7) $(ipfix)
nfreplay_LDADD = -lnfdump
nfreplay_DEPENDENCIES = libnfdump.la
nfprofile_SOURCES = nfprofile.c profile.c profile.h \
$(common) $(util) $(filelzo) $(nflist) $(filter) $(nfstatfile) $(exporter)
nfprofile_LDADD = -lrrd
nfprofile_SOURCES = nfprofile.c profile.c profile.h $(nfstatfile)
nfprofile_LDADD = -lnfdump -lrrd
nfprofile_DEPENDENCIES = libnfdump.la
nftrack_SOURCES = ../extra/nftrack/nftrack.c \
../extra/nftrack/nftrack_rrd.c ../extra/nftrack/nftrack_rrd.h \
../extra/nftrack/nftrack_stat.c ../extra/nftrack/nftrack_stat.h \
$(common) $(util) $(filelzo) $(nflist) $(filter)
../extra/nftrack/nftrack_stat.c ../extra/nftrack/nftrack_stat.h
nftrack_CFLAGS = -I ../extra/nftrack
nftrack_LDADD = -lrrd
nftrack_LDADD = -lnfdump -lrrd
nftrack_DEPENDENCIES = libnfdump.la
nfcapd_SOURCES = nfcapd.c \
$(common) $(util) $(filelzo) $(nflist) $(nfstatfile) $(launch) \
$(nfstatfile) $(launch) \
$(nfnet) $(collector) $(nfv1) $(nfv5v7) $(nfv9) $(ipfix) $(bookkeeper) $(expire)
nfcapd_LDADD = -lnfdump
nfcapd_DEPENDENCIES = libnfdump.la
nfpcapd_SOURCES = nfpcapd.c \
$(pcaproc) $(netflow_pcap) \
$(common) $(util) $(filelzo) $(nflist) $(nfstatfile) $(launch) \
$(nfstatfile) $(launch) \
$(nfnet) $(collector) $(bookkeeper) $(expire) $(content)
nfpcapd_LDADD = -lnfdump
nfpcapd_DEPENDENCIES = libnfdump.la
if READPCAP
nfcapd_CFLAGS = -DPCAP
nfcapd_SOURCES += pcap_reader.c pcap_reader.h
nfcapd_LDADD = -lpcap
nfcapd_LDADD += -lpcap
endif
if BUILDNFPCAPD
bin_PROGRAMS += nfpcapd
nfpcapd_CFLAGS = -D_BSD_SOURCE
nfpcapd_LDADD = -lpcap
nfpcapd_CFLAGS = -D_BSD_SOURCE -D_DEFAULT_SOURCE
nfpcapd_LDADD += -lpcap
nfpcapd_LDFLAGS = -pthread
endif
sfcapd_SOURCES = sfcapd.c sflow.c sflow.h sflow_proto.h \
$(common) $(util) $(filelzo) $(nflist) $(nfstatfile) $(launch) \
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
sfcapd_DEPENDENCIES = libnfdump.la
if READPCAP
sfcapd_CFLAGS = -DPCAP
sfcapd_SOURCES += pcap_reader.c pcap_reader.h
sfcapd_LDADD = -lpcap
sfcapd_LDADD += -lpcap
endif
nfreader_SOURCES = nfreader.c \
$(util) $(filelzo) $(nflist) $(exporter)
nfreader_SOURCES = nfreader.c
nfreader_LDADD = -lnfdump
nfreader_DEPENDENCIES = libnfdump.la
nfanon_SOURCES = nfanon.c \
$(util) $(filelzo) $(nflist) $(anon)
nfanon_SOURCES = nfanon.c $(anon)
nfanon_LDADD = -lnfdump
nfanon_DEPENDENCIES = libnfdump.la
nfgen_SOURCES = nfgen.c $(util) $(filelzo) $(nflist)
nfgen_SOURCES = nfgen.c
nfgen_LDADD = -lnfdump
nfgen_DEPENDENCIES = libnfdump.la
nfexpire_SOURCES = nfexpire.c \
$(bookkeeper) $(expire) $(util) $(nfstatfile)
nfexpire_LDADD = @FTS_OBJ@
$(bookkeeper) $(expire) $(nfstatfile)
nfexpire_LDADD = -lnfdump @FTS_OBJ@
nfexpire_DEPENDENCIES = libnfdump.la
nftest_SOURCES = nftest.c $(common) $(util) $(filter) $(filelzo)
nftest_DEPENDENCIES = nfgen
nftest_SOURCES = nftest.c
nftest_LDADD = -lnfdump
nftest_DEPENDENCIES = nfgen libnfdump.la
if FT2NFDUMP
ft2nfdump_SOURCES = ft2nfdump.c $(common) $(filelzo) $(util) $(nflist)
ft2nfdump_SOURCES = ft2nfdump.c
ft2nfdump_CFLAGS = @FT_INCLUDES@
ft2nfdump_LDADD = -lft -lz
ft2nfdump_LDADD = -lnfdump -lft -lz
ft2nfdump_LDADD += @FT_LDFLAGS@
ft2nfdump_DEPENDENCIES = libnfdump.la
endif
EXTRA_DIST = inline.c collector_inline.c nffile_inline.c nfdump_inline.c heapsort_inline.c applybits_inline.c
EXTRA_DIST += test.sh nfdump.test.out parse_csv.pl AddExtension.txt nfdump.test.diff
CLEANFILES = lex.yy.c grammar.c grammar.h scanner.c scanner.h
check_DIST = inline.c collector_inline.c nffile_inline.c nfdump_inline.c heapsort_inline.c applybits_inline.c
check_DIST += test.sh nfdump.test.out parse_csv.pl AddExtension.txt nfdump.test.diff
CLEANFILES = lex.yy.c grammar.c grammar.h scanner.c scanner.h $(check_PROGRAMS)

File diff suppressed because it is too large Load Diff

View File

@ -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;
}
}

View File

@ -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,16 +29,11 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Author: haag $
*
* $Id: bookkeeper.c 39 2009-11-25 08:11:15Z haag $
*
* $LastChangedRevision: 39 $
*
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <unistd.h>
@ -47,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>
@ -65,22 +62,14 @@ union semun {
};
#endif
#include "config.h"
#include "util.h"
#include "bookkeeper.h"
static bookkeeper_list_t *bookkeeper_list = NULL;
/* function prototypes */
/*
* bookkeeper.c is needed for daemon code as well as normal stdio code
* therefore a generic LogError is defined, which maps to the
* approriate logging channel - either stderr or syslog
*/
void LogError(char *format, ...);
static key_t _ftok(const char *path, int id);
static key_t hash(char *str, int flag);
static void sem_lock(int sem_set_id);
@ -90,16 +79,28 @@ static inline bookkeeper_list_t *Get_bookkeeper_list_entry(bookkeeper_t *bookkee
/* Create shared memory object and set its size */
/* our own ftok implementation - the standard C library ftok is not reliable enough */
static key_t _ftok(const char *path, int id) {
struct stat st;
/* hash: compute hash value of string */
#define MULTIPLIER 37
static key_t hash(char *str, int flag) {
uint32_t h;
unsigned char *p;
char cleanPath[MAXPATHLEN];
if (stat(path, &st) < 0)
return (key_t)-1;
return (key_t) ( ((st.st_dev & 0xffff) << 16) ^ st.st_ino ) + id;
if ( realpath(str, cleanPath) == NULL ) {
return -1;
}
h = 0;
for (p = (unsigned char*)cleanPath; *p != '\0'; p++)
h = MULTIPLIER * h + *p;
if ( flag ) {
h = MULTIPLIER * h + 'R';
}
// 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
static void sem_lock(int sem_set_id) {
@ -152,7 +153,7 @@ bookkeeper_list_t **bookkeeper_list_entry;
*bookkeeper = NULL;
shm_key = _ftok(path, 1);
shm_key = hash(path, 0);
if ( shm_key == - 1 )
return ERR_PATHACCESS;
@ -240,7 +241,7 @@ bookkeeper_list_t **bookkeeper_list_entry;
// create semaphore
sem_key = _ftok(path, 2);
sem_key = hash(path, 1);
// this should never fail, as we aleady got a key for the shared memory
if ( sem_key == - 1 ) {
// .. but catch it anyway .. and release shared memory. something is fishy
@ -310,7 +311,7 @@ int sem_key, shm_key, shm_id, sem_id;
*bookkeeper = NULL;
shm_key = _ftok(path, 1);
shm_key = hash(path, 0);
if ( shm_key == - 1 )
return ERR_PATHACCESS;
@ -341,7 +342,7 @@ int sem_key, shm_key, shm_id, sem_id;
// at this point we now have a valid record and can proceed
// create semaphore
sem_key = _ftok(path, 2);
sem_key = hash(path, 1);
// this should never fail, as we aleady got a key for the shared memory
if ( sem_key == - 1 ) {
// .. but catch it anyway .. and release shared memory. something is fishy

View File

@ -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

View File

@ -1,4 +1,6 @@
/*
* Copyright (c) 2017, Peter Haag
* Copyright (c) 2016, Peter Haag
* Copyright (c) 2014, Peter Haag
* Copyright (c) 2009, Peter Haag
* Copyright (c) 2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
@ -28,15 +30,11 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Author: haag $
*
* $Id: collector.c 69 2010-09-09 07:17:43Z haag $
*
* $LastChangedRevision: 69 $
*
*/
#include "config.h"
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#include <stdio.h>
#include <stdlib.h>
@ -50,7 +48,6 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <syslog.h>
#include <stdarg.h>
#include <time.h>
@ -68,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"
@ -139,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
@ -160,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:
@ -248,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
@ -331,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) {
@ -346,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: {
@ -365,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__ );
@ -537,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);

View File

@ -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;

View File

@ -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

View File

@ -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", "");
}

View File

@ -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
@ -73,13 +74,6 @@
static uint32_t timeout = 0;
/*
* expire.c is needed for daemon code as well as normal stdio code
* therefore a generic LogError is defined, which maps to the
* approriate logging channel - either stderr or syslog
*/
void LogError(char *format, ...);
static void PrepareDirLists(channel_t *channel);
static int compare(const FTSENT **f1, const FTSENT **f2);

View File

@ -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;

View File

@ -1,4 +1,6 @@
/*
* Copyright (c) 2017, Peter Haag
* Copyright (c) 2016, Peter Haag
* Copyright (c) 2014, Peter Haag
* Copyright (c) 2012, Peter Haag
*
@ -26,15 +28,11 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Author: peter $
*
* $Id: exporter.c 224 2014-02-16 12:59:29Z peter $
*
* $LastChangedRevision: 224 $
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <sys/types.h>
#include <sys/socket.h>
@ -47,7 +45,6 @@
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <syslog.h>
#include <stdarg.h>
#ifdef HAVE_STDINT_H
@ -65,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"
@ -155,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);
@ -351,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);
@ -414,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",
@ -428,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 ",

View File

@ -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);

View File

@ -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;

View File

@ -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);

BIN
bin/flows

Binary file not shown.

View File

@ -1,4 +1,6 @@
/*
* Copyright (c) 2017, Peter Haag
* Copyright (c) 2016, Peter Haag
* Copyright (c) 2014, Peter Haag
* Copyright (c) 2011, Peter Haag
* All rights reserved.
@ -27,15 +29,11 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Author$
*
* $Id$
*
* $LastChangedRevision$
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
@ -51,19 +49,28 @@
#include <assert.h>
#include "rbtree.h"
#include "util.h"
#include "nffile.h"
#include "bookkeeper.h"
#include "nfxstat.h"
#include "collector.h"
#include "flowtree.h"
#include "netflow_pcap.h"
#include "util.h"
#include "flowtree.h"
static void spin_lock(int *p);
static void spin_unlock(int volatile *p);
static void spin_lock(int *p) {
while(!__sync_bool_compare_and_swap(p, 0, 1));
}
static void spin_unlock(int volatile *p) {
__asm volatile (""); // acts as a memory barrier.
*p = 0;
}
#define GetTreeLock(a) spin_lock(&((a)->list_lock))
#define ReleaseTreeLock(a) spin_unlock(&((a)->list_lock))
#ifndef DEVEL
# define dbg_printf(...) /* printf(__VA_ARGS__) */
#else
# define dbg_printf(...) printf(__VA_ARGS__)
#endif
static int FlowNodeCMP(struct FlowNode *e1, struct FlowNode *e2);
@ -93,15 +100,6 @@ typedef struct FlowNode_list_s {
uint32_t size;
} Linked_list_t;
static Linked_list_t UDP_list;
/* static prototypes */
static void AppendFlowNode(Linked_list_t *LinkedList, struct FlowNode *node);
static void DisconnectFlowNode(Linked_list_t *LinkedList, struct FlowNode *node);
static void TouchFlowNode(Linked_list_t *LinkedList, struct FlowNode *node);
/* Free list handling functions */
// Get next free node from free list
struct FlowNode *New_Node(void) {
@ -112,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;
@ -149,7 +146,7 @@ struct FlowNode *node;
return node;
} // End of New_node
} // End of New_Node
// return node into free list
void Free_Node(struct FlowNode *node) {
@ -164,15 +161,8 @@ void Free_Node(struct FlowNode *node) {
abort();
}
if ( node->data ) {
free(node->data);
node->data = NULL;
}
#ifdef DEVEL
assert(node->left == NULL);
assert(node->right == NULL);
#endif
dbg_assert(node->left == NULL);
dbg_assert(node->right == NULL);
#ifdef USE_MALLOC
dbg_printf("Free node: %llx\n", (unsigned long long)node);
@ -242,10 +232,6 @@ int i;
Allocated = 0;
NumFlows = 0;
UDP_list.list = NULL;
UDP_list.tail = NULL;
UDP_list.size = 0;
return 1;
} // End of Init_FlowTree
@ -256,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;
@ -285,6 +269,9 @@ struct FlowNode *Lookup_Node(struct FlowNode *node) {
struct FlowNode *Insert_Node(struct FlowNode *node) {
struct FlowNode *n;
dbg_assert(node->left == NULL);
dbg_assert(node->right == NULL);
// return RB_INSERT(FlowTree, FlowTree, node);
n = RB_INSERT(FlowTree, FlowTree, node);
if ( n ) { // existing node
@ -293,9 +280,10 @@ struct FlowNode *n;
NumFlows++;
return NULL;
}
} // End of Lookup_FlowTree
} // End of Insert_Node
void Remove_Node(struct FlowNode *node) {
struct FlowNode *rev_node;
#ifdef DEVEL
assert(node->memflag == NODE_IN_USE);
@ -305,11 +293,53 @@ void Remove_Node(struct FlowNode *node) {
}
#endif
rev_node = node->rev_node;
if ( rev_node ) {
// unlink rev node on both nodes
dbg_assert(rev_node->rev_node == node);
rev_node->rev_node = NULL;
node->rev_node = NULL;
}
RB_REMOVE(FlowTree, FlowTree, node);
Free_Node(node);
NumFlows--;
} // End of Lookup_FlowTree
} // End of Remove_Node
int Link_RevNode(struct FlowNode *node) {
struct FlowNode lookup_node, *rev_node;
dbg_printf("Link node: ");
dbg_assert(node->rev_node == NULL);
lookup_node.src_addr = node->dst_addr;
lookup_node.dst_addr = node->src_addr;
lookup_node.src_port = node->dst_port;
lookup_node.dst_port = node->src_port;
lookup_node.version = node->version;
lookup_node.proto = node->proto;
rev_node = Lookup_Node(&lookup_node);
if ( rev_node ) {
dbg_printf("Found revnode ");
// rev node must not be linked already - otherwise there is an inconsistency
dbg_assert(node->rev_node == NULL);
if (node->rev_node == NULL ) {
// link both nodes
node->rev_node = rev_node;
rev_node->rev_node = node;
dbg_printf(" - linked\n");
} else {
dbg_printf("Rev-node != NULL skip linking - inconsitency\n");
LogError("Rev-node != NULL skip linking - inconsitency\n");
}
return 1;
} else {
dbg_printf("no revnode node\n");
return 0;
}
/* not reached */
} // End of Link_RevNode
uint32_t Flush_FlowTree(FlowSource_t *fs) {
struct FlowNode *node, *nxt;
@ -333,132 +363,10 @@ if ( node->left || node->right ) {
LogError("### Flush_FlowTree() remaining flows: %u\n", NumFlows);
#endif
UDP_list.list = NULL;
UDP_list.tail = NULL;
UDP_list.size = 0;
return n;
} // End of Flush_FlowTree
void UDPexpire(FlowSource_t *fs, time_t t_expire) {
struct FlowNode *node;
uint32_t num = 0;
node = UDP_list.list;
while ( node && (node->t_last.tv_sec < t_expire) ) {
struct FlowNode *n = node;
node = node->right;
DisconnectFlowNode(&UDP_list, n);
StorePcapFlow(fs, n);
Remove_Node(n);
num++;
}
dbg_printf("UDP expired %u flows - left %u\n", num, UDP_list.size);
} // End of UDPexpire
void AppendUDPNode(struct FlowNode *node) {
AppendFlowNode(&UDP_list, node);
} // End of AppendUDPNode
static void AppendFlowNode(Linked_list_t *LinkedList, struct FlowNode *node) {
#ifdef DEVEL
if ( LinkedList->tail )
assert(LinkedList->tail->right == NULL);
assert(node->memflag == NODE_IN_USE);
assert(node->left == NULL);
assert(node->right == NULL);
#endif
if ( LinkedList->list == NULL ) {
dbg_printf("AppendFlowNode(): First node\n");
node->left = NULL;
node->right = NULL;
LinkedList->list = node;
LinkedList->tail = node;
LinkedList->size++;
} else {
// new node
dbg_printf("AppendFlowNode(): next node: %u\n", LinkedList->size);
LinkedList->tail->right = node;
node->left = LinkedList->tail;
node->right = NULL;
LinkedList->tail = node;
LinkedList->size++;
}
#ifdef DEVEL
assert(LinkedList->tail->right == NULL);
#endif
} // End of AppendFlowNode
static void DisconnectFlowNode(Linked_list_t *LinkedList, struct FlowNode *node) {
if ( node == NULL )
return;
else {
// disconnect node
struct FlowNode *prev = node->left;
struct FlowNode *next = node->right;
if ( prev )
prev->right = next;
else
LinkedList->list = next;
if ( next )
next->left = prev;
if ( LinkedList->tail == node )
LinkedList->tail = node->left;
node->left = NULL;
node->right = NULL;
LinkedList->size--;
}
} // End of DisconnectFlowNode
void TouchUDPNode(struct FlowNode *node) {
TouchFlowNode(&UDP_list, node);
} // End of TouchUDPNode
static void TouchFlowNode(Linked_list_t *LinkedList, struct FlowNode *node) {
dbg_printf("In TochFlowNode()\n");
if ( LinkedList->list == NULL ) {
// should never happen
LogError("TouchFlowNode() error in %s line %d: %s\n", __FILE__, __LINE__, "Tried to touch node in empty list" );
return;
}
if ( LinkedList->tail == node ) {
// nothing to do
dbg_printf("TochFlowNode() - last node - nothing to do\n");
return;
}
if ( node->left == NULL ) {
// first node - disconnect node
dbg_printf("TochFlowNode() - touch first node\n");
LinkedList->list = node->right;
LinkedList->list->left = NULL;
} else {
dbg_printf("TochFlowNode() - touch middle node\n");
(node->right)->left = node->left;
(node->left)->right = node->right;
}
// append node
LinkedList->tail->right = node;
node->left = LinkedList->tail;
node->right = NULL;
LinkedList->tail = node;
} // End of TouchFlowNode
int AddNodeData(struct FlowNode *node, uint32_t seq, void *payload, uint32_t size) {
return 0;
@ -476,6 +384,9 @@ NodeList_t *NodeList;
NodeList->list = NULL;
NodeList->last = NULL;
NodeList->length = 0;
NodeList->list_lock = 0;
NodeList->waiting = 0;
NodeList->waits = 0;
pthread_mutex_init(&NodeList->m_list, NULL);
pthread_cond_init(&NodeList->c_list, NULL);
@ -497,6 +408,7 @@ void DisposeNodeList(NodeList_t *NodeList) {
} // End of DisposeNodeList
#ifdef DEVEL
void ListCheck(NodeList_t *NodeList);
void ListCheck(NodeList_t *NodeList) {
uint32_t len = 0, mem = 0, proto;
static uint32_t loops = 0;
@ -532,7 +444,8 @@ len, mem, proto, loops, Allocated, CacheOverflow);
void Push_Node(NodeList_t *NodeList, struct FlowNode *node) {
pthread_mutex_lock(&NodeList->m_list);
GetTreeLock(NodeList);
// pthread_mutex_lock(&NodeList->m_list);
if ( NodeList->length == 0 ) {
// empty list
NodeList->list = node;
@ -546,33 +459,46 @@ 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
pthread_mutex_unlock(&NodeList->m_list);
if ( NodeList->waiting ) {
pthread_cond_signal(&NodeList->c_list);
}
ReleaseTreeLock(NodeList);
// pthread_mutex_unlock(&NodeList->m_list);
// pthread_cond_signal(&NodeList->c_list);
} // End of Push_Node
struct FlowNode *Pop_Node(NodeList_t *NodeList, int *done) {
struct FlowNode *node;
int proto;
GetTreeLock(NodeList);
while ( NodeList->length == 0 && !*done ) {
pthread_mutex_lock(&NodeList->m_list);
while ( NodeList->length == 0 && !*done )
NodeList->waiting = 1;
NodeList->waits++;
ReleaseTreeLock(NodeList);
// sleep ad wait
pthread_cond_wait(&NodeList->c_list, &NodeList->m_list);
if ( NodeList->length == 0 && *done ) {
// wake up
GetTreeLock(NodeList);
NodeList->waiting = 0;
pthread_mutex_unlock(&NodeList->m_list);
}
if ( NodeList->length == 0 && *done ) {
ReleaseTreeLock(NodeList);
dbg_printf("Pop_Node done\n");
return NULL;
}
if ( NodeList->list == NULL ) {
// should never happen - list is supposed to have at least one item
pthread_mutex_unlock(&NodeList->m_list);
ReleaseTreeLock(NodeList);
LogError("Unexpected empty FlowNode_ProcessList");
return NULL;
}
@ -586,16 +512,15 @@ 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
pthread_mutex_unlock(&NodeList->m_list);
ReleaseTreeLock(NodeList);
return node;
} // End of Pop_Node
@ -619,7 +544,7 @@ struct FlowNode *node;
void DumpNodeStat(void) {
LogInfo("Nodes in use: %u, Flows: %u CacheOverflow: %u", Allocated, NumFlows, CacheOverflow);
} // End of NodesAllocated
} // End of DumpNodeStat
/*
int main(int argc, char **argv) {

View File

@ -1,4 +1,5 @@
/*
* Copyright (c) 2016, Peter Haag
* Copyright (c) 2014, Peter Haag
* Copyright (c) 2011, Peter Haag
* All rights reserved.
@ -27,14 +28,25 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Author$
*
* $Id$
*
* $LastChangedRevision$
*
*/
#ifndef _FLOWTREE_H
#define _FLOWTREE_H 1
#ifdef HAVE_CONFIG_H
#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"
#define v4 ip_union._v4
@ -82,20 +94,25 @@ 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
// uint32_t eodata; // offset last byte in buffer
struct FlowNode *rev_node;
struct latency_s {
uint64_t client;
uint64_t server;
uint64_t application;
uint32_t flag;
struct timeval t_request;
} latency;
};
typedef struct NodeList_s {
struct FlowNode *list;
struct FlowNode *last;
sig_atomic_t list_lock;
pthread_mutex_t m_list;
pthread_cond_t c_list;
uint32_t length;
uint32_t waiting;
uint64_t waits;
} NodeList_t;
@ -125,6 +142,8 @@ struct FlowNode *Insert_Node(struct FlowNode *node);
void Remove_Node(struct FlowNode *node);
int Link_RevNode(struct FlowNode *node);
// Node list functions
NodeList_t *NewNodeList(void);
@ -136,14 +155,7 @@ struct FlowNode *Pop_Node(NodeList_t *NodeList, int *done);
void DumpList(NodeList_t *NodeList);
// Liked lists
void AppendUDPNode(struct FlowNode *node);
void TouchUDPNode(struct FlowNode *node);
void UDPexpire(FlowSource_t *fs, time_t t_expire);
// Stat functions
void DumpNodeStat(void);
#endif // _FLOWTREE_H

View File

@ -1,5 +1,7 @@
/*
* All rights reserved.
* Copyright (c) 2017, Peter Haag
* 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
@ -32,16 +34,11 @@
*
* Flow-Tools related code taken from flow-tools-0.67 cretated by Mark Fullmer
*
* $Author: haag $
*
* $Id: ft2nfdump.c 69 2010-09-09 07:17:43Z haag $
*
* $LastChangedRevision: 69 $
*
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
@ -66,6 +63,7 @@
#include "nffile.h"
#include "nfx.h"
#include "launch.h"
#include "util.h"
/* Global defines */
#define MAXRECORDS 30
@ -241,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));
@ -271,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));

View File

@ -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;

View File

@ -1,6 +1,6 @@
/*
* This file is part of the nfdump project.
*
* Copyright (c) 2017
* Copyright (c) 2016
* Copyright (c) 2004-2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
* All rights reserved.
*
@ -12,7 +12,7 @@
* * 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 SWITCH nor the names of its contributors may be
* * 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.
*
@ -28,19 +28,13 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Author: peter $
*
* $Id: grammar.y 100 2008-08-15 11:36:21Z peter $
*
* $LastChangedRevision: 100 $
*
*
*
*/
%{
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <sys/types.h>
@ -822,7 +816,7 @@ term: ANY { /* this is an unconditionally true expression, as a filter applies i
if ( $5 > (bytes*8) ) {
yyerror("Too many netbits for this IP addresss");
yyerror("Too many netbits for this IP address");
YYABORT;
}
@ -1413,7 +1407,7 @@ term: ANY { /* this is an unconditionally true expression, as a filter applies i
if ( $5 > (bytes*8) ) {
yyerror("Too many netbits for this IP addresss");
yyerror("Too many netbits for this IP address");
YYABORT;
}
@ -1613,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;
}
@ -1684,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;
}
@ -2103,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);
}
}
;
%%

View File

@ -944,7 +944,7 @@ term: ANY { /* this is an unconditionally true expression, as a filter applies i
if ( $5 > (bytes*8) ) {
yyerror("Too many netbits for this IP addresss");
yyerror("Too many netbits for this IP address");
YYABORT;
}

View File

@ -50,10 +50,11 @@ int32_t i, maxindex;
* we are only interested in the first top N => skip sorting the rest
* For topN == 0 -> all flows gets sorted
*/
if ( (topN >= (array_size - 1)) || topN == 0 )
if ( (topN >= (array_size - 1)) || topN == 0 ) {
maxindex = 0;
else
} else {
maxindex = array_size - 1 - topN;
}
for(i = array_size-1; i > maxindex; i-- ) {
SortElement_t temp = SortElement[0];

View File

@ -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);

View File

@ -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"
@ -42,7 +37,6 @@
#include <sys/socket.h>
#include <unistd.h>
#include <stdlib.h>
#include <syslog.h>
#include <string.h>
#include <errno.h>
#include <time.h>
@ -59,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"
@ -107,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
@ -136,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
@ -214,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 },
@ -267,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}
};
@ -290,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);
@ -312,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"
@ -322,7 +329,7 @@ int i;
cache.lookup_info = (struct element_param_s *)calloc(65536, sizeof(struct element_param_s));
cache.common_extensions = (uint32_t *)malloc((Max_num_extensions+1)*sizeof(uint32_t));
if ( !cache.common_extensions || !cache.lookup_info ) {
syslog(LOG_ERR, "Process_ipfix: Panic! malloc(): %s line %d: %s", __FILE__, __LINE__, strerror (errno));
LogError("Process_ipfix: Panic! malloc(): %s line %d: %s", __FILE__, __LINE__, strerror (errno));
return 0;
}
@ -336,7 +343,7 @@ int i;
}
cache.max_ipfix_elements = i;
syslog(LOG_DEBUG,"Init IPFIX: Max number of IPFIX tags: %u", cache.max_ipfix_elements);
LogError("Init IPFIX: Max number of IPFIX tags: %u", cache.max_ipfix_elements);
return 1;
@ -350,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);
@ -370,7 +377,7 @@ uint32_t ObservationDomain = ntohl(ipfix_header->ObservationDomain);
// nothing found
*e = (exporter_ipfix_domain_t *)malloc(sizeof(exporter_ipfix_domain_t));
if ( !(*e)) {
syslog(LOG_ERR, "Process_ipfix: Panic! malloc() %s line %d: %s", __FILE__, __LINE__, strerror (errno));
LogError("Process_ipfix: Panic! malloc() %s line %d: %s", __FILE__, __LINE__, strerror (errno));
return NULL;
}
memset((void *)(*e), 0, sizeof(exporter_ipfix_domain_t));
@ -392,7 +399,7 @@ uint32_t ObservationDomain = ntohl(ipfix_header->ObservationDomain);
dbg_printf("[%u] New exporter: SysID: %u, Observation domain %u from: %s\n",
ObservationDomain, (*e)->info.sysid, ObservationDomain, ipstr);
syslog(LOG_INFO, "Process_ipfix: New exporter: SysID: %u, Observation domain %u from: %s\n",
LogInfo("Process_ipfix: New exporter: SysID: %u, Observation domain %u from: %s\n",
(*e)->info.sysid, ObservationDomain, ipstr);
@ -460,12 +467,12 @@ input_translation_t **table;
// so template refreshing may change the table size without danger of overflowing
*table = calloc(1, sizeof(input_translation_t));
if ( !(*table) ) {
syslog(LOG_ERR, "Process_ipfix: Panic! calloc() %s line %d: %s", __FILE__, __LINE__, strerror (errno));
LogError("Process_ipfix: Panic! calloc() %s line %d: %s", __FILE__, __LINE__, strerror (errno));
return NULL;
}
(*table)->sequence = calloc(cache.max_ipfix_elements, sizeof(sequence_map_t));
if ( !(*table)->sequence ) {
syslog(LOG_ERR, "Process_ipfix: Panic! malloc() %s line %d: %s", __FILE__, __LINE__, strerror (errno));
LogError("Process_ipfix: Panic! malloc() %s line %d: %s", __FILE__, __LINE__, strerror (errno));
return NULL;
}
@ -481,7 +488,7 @@ input_translation_t **table;
static void remove_translation_table(FlowSource_t *fs, exporter_ipfix_domain_t *exporter, uint16_t id) {
input_translation_t *table, *parent;
syslog(LOG_INFO, "Process_ipfix: [%u] Withdraw template id: %i",
LogInfo("Process_ipfix: [%u] Withdraw template id: %i",
exporter->info.id, id);
parent = NULL;
@ -492,7 +499,7 @@ input_translation_t *table, *parent;
}
if ( table == NULL ) {
syslog(LOG_ERR, "Process_ipfix: [%u] Withdraw template id: %i. translation table not found",
LogError("Process_ipfix: [%u] Withdraw template id: %i. translation table not found",
exporter->info.id, id);
return;
}
@ -521,7 +528,7 @@ input_translation_t *table, *parent;
static void remove_all_translation_tables(exporter_ipfix_domain_t *exporter) {
input_translation_t *table, *next;
syslog(LOG_INFO, "Process_ipfix: Withdraw all templates from observation domain %u\n",
LogInfo("Process_ipfix: Withdraw all templates from observation domain %u\n",
exporter->info.id);
table = exporter->input_translation_table;
@ -548,7 +555,7 @@ uint32_t i = table->number_of_sequences;
uint32_t index = cache.lookup_info[Type].index;
if ( table->number_of_sequences >= cache.max_ipfix_elements ) {
syslog(LOG_ERR, "Process_ipfix: Software bug! Sequence table full. at %s line %d",
LogError("Process_ipfix: Software bug! Sequence table full. at %s line %d",
__FILE__, __LINE__);
dbg_printf("Software bug! Sequence table full. at %s line %d",
__FILE__, __LINE__);
@ -584,7 +591,7 @@ size_t size_required;
table = GetTranslationTable(exporter, id);
if ( !table ) {
syslog(LOG_INFO, "Process_ipfix: [%u] Add template %u", exporter->info.id, id);
LogInfo("Process_ipfix: [%u] Add template %u", exporter->info.id, id);
table = add_translation_table(exporter, id);
if ( !table ) {
return NULL;
@ -597,7 +604,7 @@ size_t size_required;
size_required = (size_required + 3) &~(size_t)3;
extension_map = malloc(size_required);
if ( !extension_map ) {
syslog(LOG_ERR, "Process_ipfix: Panic! malloc() error in %s line %d: %s", __FILE__, __LINE__, strerror (errno));
LogError("Process_ipfix: Panic! malloc() error in %s line %d: %s", __FILE__, __LINE__, strerror (errno));
return NULL;
}
extension_map->type = ExtensionMapType;
@ -631,6 +638,7 @@ size_t size_required;
table->flags = 0;
SetFlag(table->flags, FLAG_PKG_64);
SetFlag(table->flags, FLAG_BYTES_64);
table->delta_time = 0;
table->ICMP_offset = 0;
// table->sampler_offset = 0;
// table->sampler_size = 0;
@ -652,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;
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;
offset +=1; // Skip netflow v9 fwd status
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);
@ -667,7 +697,7 @@ size_t size_required;
// skip exporter_sysid and reserved
offset += 4;
/* IP addresss record
/* IP address record
* This record is expected in the output stream. If not available
* in the template, assume empty v4 address.
*/
@ -879,17 +909,137 @@ 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;
uint32_t id, count;
uint32_t count;
size_left -= 4; // subtract message header
DataPtr = flowset_header + 4;
ipfix_template_record = (ipfix_template_record_t *)DataPtr;
id = ntohs(ipfix_template_record->TemplateID);
// uint32_t id = ntohs(ipfix_template_record->TemplateID);
count = ntohs(ipfix_template_record->FieldCount);
if ( count == 0 ) {
@ -912,6 +1062,13 @@ uint16_t Offset = 0;
// a template flowset can contain multiple records ( templates )
while ( size_left ) {
if ( size_left && size_left < 4 ) {
LogError("Process_ipfix [%u] Template size error at %s line %u" ,
exporter->info.id, __FILE__, __LINE__, strerror (errno));
size_left = 0;
continue;
}
// clear helper tables
memset((void *)cache.common_extensions, 0, (Max_num_extensions+1)*sizeof(uint32_t));
memset((void *)cache.lookup_info, 0, 65536 * sizeof(struct element_param_s));
@ -940,7 +1097,7 @@ uint16_t Offset = 0;
size_required = 4*count;
if ( size_left < size_required ) {
// if we fail this check, this flowset must be skipped.
syslog(LOG_ERR, "Process_ipfix: [%u] Not enough data for template elements! required: %i, left: %u",
LogError("Process_ipfix: [%u] Not enough data for template elements! required: %i, left: %u",
exporter->info.id, size_required, size_left);
dbg_printf("ERROR: Not enough data for template elements! required: %i, left: %u", size_required, size_left);
return;
@ -974,7 +1131,7 @@ uint16_t Offset = 0;
ipfix_template_elements_e_t *e = (ipfix_template_elements_e_t *)NextElement;
size_required += 4; // ad 4 for enterprise value
if ( size_left < size_required ) {
syslog(LOG_ERR, "Process_ipfix: [%u] Not enough data for template elements! required: %i, left: %u",
LogError("Process_ipfix: [%u] Not enough data for template elements! required: %i, left: %u",
exporter->info.id, size_required, size_left);
dbg_printf("ERROR: Not enough data for template elements! required: %i, left: %u", size_required, size_left);
return;
@ -1000,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;
/*
@ -1059,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
@ -1087,17 +1244,16 @@ 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
size_left = GET_FLOWSET_LENGTH(option_template_flowset) - 4; // -4 for flowset header -> id and length
if ( size_left < 6 ) {
syslog(LOG_ERR, "Process_ipfix: [%u] option template length error: size left %u too small for an options template",
LogError("Process_ipfix: [%u] option template length error: size left %u too small for an options template",
exporter->info.id, size_left);
return;
}
@ -1109,71 +1265,87 @@ 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 ) {
syslog(LOG_ERR, "Process_ipfx: [%u] scope field count error: length must not be zero",
LogError("Process_ipfx: [%u] scope field count error: length must not be zero",
exporter->info.id);
dbg_printf("scope field count error: length must not be zero\n");
return;
}
size_required = 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 ) {
syslog(LOG_ERR, "Process_ipfix: [%u] option template length error: size left %u too small for %u scopes length and %u options length",
LogError("Process_ipfix: [%u] option template length error: size left %u too small for %u scopes length and %u options length",
exporter->info.id, size_left, field_count, scope_field_count);
dbg_printf("option template length error: size left %u too small for field_count %u\n",
size_left, field_count);
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 ) {
syslog(LOG_ERR, "Process_ipfxi: [%u] scope field count error: length must not be zero",
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;
if ( size_left && size_left < 4 ) {
LogError("Process_ipfix [%u] Template size error at %s line %u" ,
exporter->info.id, __FILE__, __LINE__, strerror (errno));
return;
}
id = Get_val16(DataPtr); DataPtr += 2;
length = Get_val16(DataPtr); DataPtr += 2;
size_left -= 4;
Enterprise = id & 0x8000 ? 1 : 0;
if ( Enterprise ) {
size_required += 4;
dbg_printf("Adjusted: Size left: %u, size required: %u\n", size_left, size_required);
if ( size_left < size_required ) {
syslog(LOG_ERR, "Process_ipfix: [%u] option template length error: size left %u too small for %u scopes length and %u options length",
LogError("Process_ipfix: [%u] option template length error: size left %u too small for %u scopes length and %u options length",
exporter->info.id, size_left, field_count, scope_field_count);
dbg_printf("option template length error: size left %u too small for field_count %u\n",
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;
Enterprise = id & 0x8000 ? 1 : 0;
if ( Enterprise ) {
size_required += 4;
dbg_printf("Adjusted: Size left: %u, size required: %u\n", size_left, size_required);
if ( size_left < size_required ) {
syslog(LOG_ERR, "Process_ipfix: [%u] option template length error: size left %u too small for %u scopes length and %u options length",
LogError("Process_ipfix: [%u] option template length error: size left %u too small for %u scopes length and %u options length",
exporter->info.id, size_left, field_count, scope_field_count);
dbg_printf("option template length error: size left %u too small for field_count %u\n",
size_left, field_count);
@ -1181,69 +1353,58 @@ uint16_t offset_std_sampler_interval, offset_std_sampler_algorithm, found_std_sa
}
enterprise_value = Get_val32(DataPtr);
DataPtr += 4;
size_left -= 4;
dbg_printf(" [%i] Enterprise: 1, option id: %u, option length %u enterprise value: %u\n",
i, id, length, enterprise_value);
} 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:
case IPFIX_samplingInterval: // legacy #34
case IPFIX_samplingPacketInterval: // #305
if ( length == 4 ) {
offset_std_sampler_interval = offset;
found_std_sampling++;
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++;
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);
dbg_printf(" 4 byte sampling interval option at offset: %u\n", offset);
} else {
dbg_printf("[%u] No Sampling information found\n", exporter->info.id);
LogError("Process_ipfix: [%u] option template error: sampling option lenth != 4 bytes: %u",
exporter->info.id, length);
}
*/
break;
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 ( 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;
@ -1260,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);
@ -1300,7 +1447,7 @@ char *string;
if ( (size_left < table->input_record_size) ) {
if ( size_left > 3 ) {
syslog(LOG_WARNING,"Process_ipfix: Corrupt data flowset? Pad bytes: %u", size_left);
LogError("Process_ipfix: Corrupt data flowset? Pad bytes: %u", size_left);
dbg_printf("Process_ipfix: Corrupt data flowset? Pad bytes: %u, table record_size: %u\n",
size_left, table->input_record_size);
}
@ -1311,7 +1458,7 @@ char *string;
// check for enough space in output buffer
if ( !CheckBufferSpace(fs->nffile, table->output_record_size) ) {
// this should really never occur, because the buffer gets flushed ealier
syslog(LOG_ERR,"Process_ipfix: output buffer size error. Abort ipfix record processing");
LogError("Process_ipfix: output buffer size error. Abort ipfix record processing");
dbg_printf("Process_ipfix: output buffer size error. Abort ipfix record processing");
return;
}
@ -1427,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 */
@ -1455,7 +1607,7 @@ char *string;
break;
default:
syslog(LOG_ERR, "Process_ipfix: Software bug! Unknown Sequence: %u. at %s line %d",
LogError("Process_ipfix: Software bug! Unknown Sequence: %u. at %s line %d",
table->sequence[i].id, __FILE__, __LINE__);
dbg_printf("Software bug! Unknown Sequence: %u. at %s line %d\n",
table->sequence[i].id, __FILE__, __LINE__);
@ -1498,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;
}
}
@ -1546,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);
@ -1587,9 +1717,9 @@ char *string;
// buffer size sanity check
if ( fs->nffile->block_header->size > BUFFSIZE ) {
// should never happen
syslog(LOG_ERR,"### Software error ###: %s line %d", __FILE__, __LINE__);
syslog(LOG_ERR,"Process ipfix: Output buffer overflow! Flush buffer and skip records.");
syslog(LOG_ERR,"Buffer size: %u > %u", fs->nffile->block_header->size, BUFFSIZE);
LogError("### Software error ###: %s line %d", __FILE__, __LINE__);
LogError("Process ipfix: Output buffer overflow! Flush buffer and skip records.");
LogError("Buffer size: %u > %u", fs->nffile->block_header->size, BUFFSIZE);
// reset buffer
fs->nffile->block_header->size = 0;
@ -1602,30 +1732,102 @@ 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;
uint32_t ObservationDomain;
#endif
size_left = in_buff_cnt;
if ( size_left < IPFIX_HEADER_LENGTH ) {
syslog(LOG_ERR, "Process_ipfix: Too little data for ipfix packet: '%lli'", (long long)size_left);
LogError("Process_ipfix: Too little data for ipfix packet: '%lli'", (long long)size_left);
return;
}
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 ) {
syslog(LOG_ERR,"Process_ipfix: Exporter NULL: Abort ipfix record processing");
LogError("Process_ipfix: Exporter NULL: Abort ipfix record processing");
return;
}
exporter->packets++;
@ -1633,8 +1835,8 @@ static uint32_t packet_cntr = 0;
flowset_header = (void *)ipfix_header + IPFIX_HEADER_LENGTH;
size_left -= IPFIX_HEADER_LENGTH;
dbg_printf("\n[%u] Next packet: %u, exported: %s, TemplateRecords: %llu, DataRecords: %llu, buffer: %li \n",
ObservationDomain, packet_cntr++, UNIX2ISO(ExportTime), (long long unsigned)exporter->TemplateRecords,
dbg_printf("\n[%u] process packet: %u, exported: %s, TemplateRecords: %llu, DataRecords: %llu, buffer: %li \n",
ObservationDomain, packet_cntr, UNIX2ISO(ExportTime), (long long unsigned)exporter->TemplateRecords,
(long long unsigned)exporter->DataRecords, size_left);
dbg_printf("[%u] Sequence: %u\n", ObservationDomain, Sequence);
@ -1649,7 +1851,7 @@ static uint32_t packet_cntr = 0;
dbg_printf("[%u] Sequence check failed: last seq: %u, seq %u\n",
exporter->info.id, Sequence, exporter->PacketSequence);
/* maybee to noise on buggy exporters
syslog(LOG_ERR, "Process_ipfix [%u] Sequence error: last seq: %u, seq %u\n",
LogError("Process_ipfix [%u] Sequence error: last seq: %u, seq %u\n",
info.id, exporter->LastSequence, Sequence);
*/
} else {
@ -1665,6 +1867,13 @@ static uint32_t packet_cntr = 0;
while (size_left) {
uint16_t flowset_id;
if ( size_left && size_left < 4 ) {
LogError("Process_ipfix [%u] Template size error at %s line %u" ,
exporter->info.id, __FILE__, __LINE__, strerror (errno));
size_left = 0;
continue;
}
flowset_header = flowset_header + flowset_length;
flowset_id = GET_FLOWSET_ID(flowset_header);
@ -1677,7 +1886,7 @@ static uint32_t packet_cntr = 0;
and smaller is an illegal flowset anyway ...
if it happends, we can't determine the next flowset, so skip the entire export packet
*/
syslog(LOG_ERR,"Process_ipfix: flowset zero length error.");
LogError("Process_ipfix: flowset zero length error.");
dbg_printf("Process_ipfix: flowset zero length error.\n");
return;
@ -1690,7 +1899,7 @@ static uint32_t packet_cntr = 0;
}
if ( flowset_length > size_left ) {
syslog(LOG_ERR,"Process_ipfix: flowset length error. Expected bytes: %u > buffersize: %lli",
LogError("Process_ipfix: flowset length error. Expected bytes: %u > buffersize: %lli",
flowset_length, (long long)size_left);
size_left = 0;
continue;
@ -1713,16 +1922,16 @@ static uint32_t packet_cntr = 0;
default: {
if ( flowset_id < IPFIX_MIN_RECORD_FLOWSET_ID ) {
dbg_printf("Invalid flowset id: %u. Skip flowset\n", flowset_id);
syslog(LOG_ERR,"Process_ipfix: Invalid flowset id: %u. Skip flowset", flowset_id);
LogError("Process_ipfix: Invalid flowset id: %u. Skip flowset", flowset_id);
} else {
input_translation_t *table;
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",

View File

@ -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);

View File

@ -1,4 +1,6 @@
/*
* Copyright (c) 2017, Peter Haag
* Copyright (c) 2016, Peter Haag
* Copyright (c) 2014, Peter Haag
* All rights reserved.
*
@ -26,11 +28,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Author: phaag $
*
* $Id: ipfrag.c 40874 2014-03-06 09:58:20Z phaag $
*
* $LastChangedRevision: 40874 $
* Author: peter
*
*/
@ -43,6 +41,16 @@
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#ifdef HAVE_NETINET_IN_SYSTM_H
#include <netinet/in_systm.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include <netinet/in.h>
#include <netinet/ip.h>
#include <unistd.h>
#include <stdint.h>
@ -60,7 +68,7 @@
#define KEYLEN (offsetof(IPFragNode_t,data_size) - offsetof(IPFragNode_t, src_addr))
static int IPFragNodeCMP(struct IPFragNode *e1, struct IPFragNode *e2);
static struct IPFragNode *New_node(void);
static struct IPFragNode *New_frag_node(void);
static void Free_node(struct IPFragNode *node, int free_data);
@ -70,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;
@ -82,7 +91,7 @@ int i;
} // End of IPFragNodeCMP
static struct IPFragNode *New_node(void) {
static struct IPFragNode *New_frag_node(void) {
struct IPFragNode *node;
node = malloc(sizeof(struct IPFragNode));
@ -112,10 +121,11 @@ struct IPFragNode *node;
node->holes->next = NULL;
node->holes->first = 0;
node->holes->last = IP_MAXPACKET;
NumFragments++;
return node;
} // End of New_node
} // End of New_frag_node
static void Free_node(struct IPFragNode *node, int free_data) {
hole_t *hole, *h;
@ -129,6 +139,7 @@ hole_t *hole, *h;
if (free_data)
free(node->data);
free(node);
NumFragments--;
} // End of Free_node
@ -149,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
@ -165,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) {
@ -178,7 +192,7 @@ int found_hole;
FindNode.ident = ident;
n = RB_FIND(IPFragTree, IPFragTree, &FindNode);
if ( !n ) {
n = New_node();
n = New_frag_node();
n->src_addr = src;
n->dst_addr = dst;
n->ident = ident;
@ -196,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 ) {
@ -300,3 +314,7 @@ int found_hole;
}
} // End of IPFrag_tree_Update
uint32_t IPFragEntries() {
return NumFragments;
} // End of IPFragEntries

View File

@ -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

Binary file not shown.

View File

@ -1,4 +1,6 @@
/*
* Copyright (c) 2017, Peter Haag
* 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,16 +30,11 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Author: haag $
*
* $Id: launch.c 69 2010-09-09 07:17:43Z haag $
*
* $LastChangedRevision: 69 $
*
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <signal.h>
#include <sys/types.h>
@ -48,7 +45,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <stdarg.h>
#include <errno.h>
#include <unistd.h>
@ -73,8 +69,8 @@
#include "expire.h"
#include "nffile.h"
#include "nfxstat.h"
#include "collector.h"
#include "util.h"
static int done, launch, child_exit;
@ -153,7 +149,7 @@ int i;
s = ident;
break;
default:
syslog(LOG_ERR, "Unknown format token '%%%c'\n", q[i+1]);
LogError("Unknown format token '%%%c'", q[i+1]);
s = NULL;
}
if ( s ) {
@ -165,7 +161,7 @@ int i;
// be a bit paranoid and prevent endless expansion
if ( strlen(q) > MAXCMDLEN ) {
// this is fishy
syslog(LOG_ERR, "Error: cmdline too long!\n");
LogError("Error: cmdline too long!");
return NULL;
}
memmove(&q[i] + strlen(s), &q[i+2], strlen(&q[i+2]) + 1); // include trailing '0' in memmove
@ -215,7 +211,7 @@ int i, argnum;
if ( (i >= MAXCMDLEN) || (argnum >= MAXARGS) ) {
// for safety reason, disable the command
args[0] = NULL;
syslog(LOG_ERR, "Launcher: Unable to parse command: '%s'", buf);
LogError("Launcher: Unable to parse command: '%s'", buf);
}
} // End of cmd_parse
@ -228,20 +224,20 @@ static void cmd_execute(char **args) {
int pid;
// Get a child process.
syslog(LOG_DEBUG, "Launcher: fork child.");
LogInfo("Launcher: fork child.");
if ((pid = fork()) < 0) {
syslog(LOG_ERR, "Can't fork: %s", strerror(errno));
LogError("Can't fork: %s", strerror(errno));
return;
}
if (pid == 0) { // we are the child
execvp(*args, args);
syslog(LOG_ERR, "Can't execvp: %s: %s", args[0], strerror(errno));
LogError("Can't execvp: %s: %s", args[0], strerror(errno));
_exit(1);
}
// we are the parent
syslog(LOG_DEBUG, "Launcher: child exec done.");
LogInfo("Launcher: child exec done.");
/* empty */
} // End of cmd_execute
@ -251,7 +247,7 @@ bookkeeper_t *books;
dirstat_t *dirstat, oldstat;
int ret, bookkeeper_stat, do_rescan;
syslog(LOG_INFO, "Run expire on '%s'", datadir);
LogInfo("Run expire on '%s'", datadir);
do_rescan = 0;
ret = ReadStatInfo(datadir, &dirstat, CREATE_AND_LOCK);
@ -261,16 +257,16 @@ int ret, bookkeeper_stat, do_rescan;
case ERR_NOSTATFILE:
dirstat->low_water = 95;
case FORCE_REBUILD:
syslog(LOG_INFO, "Force rebuild stat record");
LogInfo("Force rebuild stat record");
do_rescan = 1;
break;
case ERR_FAIL:
syslog(LOG_ERR, "expire failed: can't read stat record");
LogError("expire failed: can't read stat record");
return;
/* not reached */
break;
default:
syslog(LOG_ERR, "expire failed: unexpected return code %i reading stat record", ret);
LogError("expire failed: unexpected return code %i reading stat record", ret);
return;
/* not reached */
}
@ -290,15 +286,15 @@ int ret, bookkeeper_stat, do_rescan;
UpdateBookStat(dirstat, &tmp_books);
ReleaseBookkeeper(books, DETACH_ONLY);
} else {
syslog(LOG_ERR, "Error %i: can't access book keeping records", ret);
LogError("Error %i: can't access book keeping records", ret);
}
syslog(LOG_INFO, "Limits: Filesize %s, Lifetime %s, Watermark: %llu%%\n",
LogInfo("Limits: Filesize %s, Lifetime %s, Watermark: %llu%%\n",
dirstat->max_size ? ScaleValue(dirstat->max_size) : "<none>",
dirstat->max_lifetime ? ScaleTime(dirstat->max_lifetime) : "<none>",
(unsigned long long)dirstat->low_water);
syslog(LOG_INFO, "Current size: %s, Current lifetime: %s, Number of files: %llu",
LogInfo("Current size: %s, Current lifetime: %s, Number of files: %llu",
ScaleValue(dirstat->filesize),
ScaleTime(dirstat->last - dirstat->first),
(unsigned long long)dirstat->numfiles);
@ -309,16 +305,16 @@ int ret, bookkeeper_stat, do_rescan;
WriteStatInfo(dirstat);
if ( (oldstat.numfiles - dirstat->numfiles) > 0 ) {
syslog(LOG_INFO, "expire completed");
syslog(LOG_INFO, " expired files: %llu", (unsigned long long)(oldstat.numfiles - dirstat->numfiles));
syslog(LOG_INFO, " expired time slot: %s", ScaleTime(dirstat->first - oldstat.first));
syslog(LOG_INFO, " expired file size: %s", ScaleValue(oldstat.filesize - dirstat->filesize));
syslog(LOG_INFO, "New size: %s, New lifetime: %s, Number of files: %llu",
LogInfo("expire completed");
LogInfo(" expired files: %llu", (unsigned long long)(oldstat.numfiles - dirstat->numfiles));
LogInfo(" expired time slot: %s", ScaleTime(dirstat->first - oldstat.first));
LogInfo(" expired file size: %s", ScaleValue(oldstat.filesize - dirstat->filesize));
LogInfo("New size: %s, New lifetime: %s, Number of files: %llu",
ScaleValue(dirstat->filesize),
ScaleTime(dirstat->last - dirstat->first),
(unsigned long long)dirstat->numfiles);
} else {
syslog(LOG_INFO, "expire completed - nothing to expire.");
LogInfo("expire completed - nothing to expire.");
}
ReleaseStatInfo(dirstat);
@ -333,7 +329,7 @@ srecord_t *InfoRecord;
InfoRecord = (srecord_t *)commbuff;
syslog(LOG_INFO, "Launcher: Startup. auto-expire %s", expire ? "enabled" : "off" );
LogInfo("Launcher: Startup. auto-expire %s", expire ? "enabled" : "off" );
done = launch = child_exit = 0;
// process may be NULL, if we only expire data files
@ -351,7 +347,7 @@ srecord_t *InfoRecord;
while ( fs ) {
cmd = cmd_expand(&TestRecord, fs->Ident, fs->datadir, process);
if ( cmd == NULL ) {
syslog(LOG_ERR, "Launcher: ident: %s, Unable to expand command: '%s'", fs->Ident, process);
LogError("Launcher: ident: %s, Unable to expand command: '%s'", fs->Ident, process);
exit(255);
}
@ -371,9 +367,9 @@ srecord_t *InfoRecord;
while ( !done ) {
// sleep until we get signaled
syslog(LOG_DEBUG, "Launcher: Sleeping");
dbg_printf("Launcher: Sleeping");
select(0, NULL, NULL, NULL, NULL);
syslog(LOG_DEBUG, "Launcher: Wakeup");
dbg_printf("Launcher: Wakeup");
if ( launch ) { // SIGHUP
launch = 0;
@ -385,11 +381,10 @@ srecord_t *InfoRecord;
// Expand % placeholders
cmd = cmd_expand(InfoRecord, fs->Ident, fs->datadir, process);
if ( cmd == NULL ) {
syslog(LOG_ERR, "Launcher: ident: %s, Unable to expand command: '%s'", fs->Ident, process);
LogError("Launcher: ident: %s, Unable to expand command: '%s'", fs->Ident, process);
continue;
}
// printf("Launcher: run command: '%s'\n", cmd);
syslog(LOG_DEBUG, "Launcher: ident: %s run command: '%s'", fs->Ident, cmd);
dbg_printf("Launcher: ident: %s run command: '%s'", fs->Ident, cmd);
// prepare args array
cmd_parse(cmd, args);
@ -412,29 +407,29 @@ srecord_t *InfoRecord;
}
}
if ( child_exit ) {
syslog(LOG_INFO, "laucher child exit %d childs.", child_exit);
LogInfo("launcher child exit %d children.", child_exit);
while ( (pid = waitpid (-1, &stat, WNOHANG)) > 0 ) {
if ( WIFEXITED(stat) ) {
syslog(LOG_DEBUG, "launcher child %i exit status: %i", pid, WEXITSTATUS(stat));
LogInfo("launcher child %i exit status: %i", pid, WEXITSTATUS(stat));
}
if ( WIFSIGNALED(stat) ) {
syslog(LOG_WARNING, "laucher child %i died due to signal %i", pid, WTERMSIG(stat));
LogError("launcher child %i died due to signal %i", pid, WTERMSIG(stat));
}
child_exit--;
}
syslog(LOG_INFO, "laucher waiting childs done. %d childs", child_exit);
LogInfo("launcher waiting children done. %d children", child_exit);
child_exit = 0;
}
if ( done ) {
syslog(LOG_INFO, "Launcher: Terminating.");
LogInfo("Launcher: Terminating.");
}
}
waitpid (-1, &stat, 0);
// we are done
syslog(LOG_INFO, "Launcher: exit.");
LogInfo("Launcher: exit.");
} // End of launcher

View File

@ -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

1564
bin/lz4.c Executable file

File diff suppressed because it is too large Load Diff

483
bin/lz4.h Executable file
View 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

View File

@ -1,4 +1,6 @@
/*
* Copyright (c) 2017, Peter Haag
* Copyright (c) 2016, Peter Haag
* Copyright (c) 2014, Peter Haag
* Copyright (c) 2013, Peter Haag
* All rights reserved.
@ -27,13 +29,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"
@ -43,7 +38,6 @@
#include <sys/socket.h>
#include <unistd.h>
#include <stdlib.h>
#include <syslog.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
@ -60,7 +54,6 @@
#include "nfnet.h"
#include "nf_common.h"
#include "bookkeeper.h"
#include "nfxstat.h"
#include "collector.h"
#include "exporter.h"
@ -102,7 +95,7 @@ typedef struct pcap_v6_block_s {
#define PCAP_V6_BLOCK_DATA_SIZE (sizeof(pcap_v6_block_t) - sizeof(uint32_t))
// All required extension to save full pcap records
static uint16_t pcap_full_map[] = { 0 };
static uint16_t pcap_full_map[] = { EX_LATENCY, 0 };
#include "nffile_inline.c"
@ -139,7 +132,7 @@ uint16_t map_size;
// Create a generic pcap extension map
pcap_extension_info.map = (extension_map_t *)malloc((size_t)map_size);
if ( !pcap_extension_info.map ) {
syslog(LOG_ERR, "Process_pcap: malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
LogError("Process_pcap: malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
return 0;
}
pcap_extension_info.map->type = ExtensionMapType;
@ -252,6 +245,13 @@ void *data_ptr;
tpl->output = 0;
data_ptr = (void *)tpl->data;
} break;
case EX_LATENCY: { // latecy extension
tpl_ext_latency_t *tpl = (tpl_ext_latency_t *)data_ptr;
tpl->client_nw_delay_usec = Node->latency.client;
tpl->server_nw_delay_usec = Node->latency.server;
tpl->appl_latency_usec = Node->latency.application;
data_ptr = (void *)tpl->data;
} break;
default:
// this should never happen, as pcap has no other extensions
LogError("Process_pcap: Unexpected extension %i for pcap record. Skip extension", id);
@ -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);
@ -351,3 +328,58 @@ void *data_ptr;
} /* End of StorePcapFlow */
// Server latency = t(SYN Server) - t(SYN CLient)
void SetServer_latency(struct FlowNode *node) {
struct FlowNode *Client_node;
uint64_t latency;
Client_node = node->rev_node;
latency = ((uint64_t)node->t_first.tv_sec * (uint64_t)1000000 + (uint64_t)node->t_first.tv_usec) -
((uint64_t)Client_node->t_first.tv_sec * (uint64_t)1000000 + (uint64_t)Client_node->t_first.tv_usec);
node->latency.server = latency;
Client_node->latency.server = latency;
// set flag, to calc client latency with nex packet from client
Client_node->latency.flag = 1;
dbg_printf("Server latency: %llu\n", (long long unsigned)latency);
} // End of SetServerClient_latency
// Client latency = t(ACK CLient) - t(SYN Server)
void SetClient_latency(struct FlowNode *node, struct timeval *t_packet) {
struct FlowNode *Server_node;
uint64_t latency;
Server_node = node->rev_node;
latency = ((uint64_t)t_packet->tv_sec * (uint64_t)1000000 + (uint64_t)t_packet->tv_usec) -
((uint64_t)Server_node->t_first.tv_sec * (uint64_t)1000000 + (uint64_t)Server_node->t_first.tv_usec);
node->latency.client = latency;
Server_node->latency.client = latency;
// reset flag
node->latency.flag = 0;
// set flag, to calc application latency with nex packet from server
Server_node->latency.flag = 2;
Server_node->latency.t_request = *t_packet;
dbg_printf("Client latency: %llu\n", (long long unsigned)latency);
} // End of SetClient_latency
// Application latency = t(ACK Server) - t(ACK CLient)
void SetApplication_latency(struct FlowNode *node, struct timeval *t_packet) {
struct FlowNode *Client_node;
uint64_t latency;
Client_node = node->rev_node;
latency = ((uint64_t)t_packet->tv_sec * (uint64_t)1000000 + (uint64_t)t_packet->tv_usec) -
((uint64_t)node->latency.t_request.tv_sec * (uint64_t)1000000 + (uint64_t)node->latency.t_request.tv_usec);
node->latency.application = latency;
Client_node->latency.application = latency;
// reset flag
node->latency.flag = 0;
dbg_printf("Application latency: %llu\n", (long long unsigned)latency);
} // End of SetApplication_latency

View File

@ -1,4 +1,6 @@
/*
* Copyright (c) 2017, Peter Haag
* Copyright (c) 2016, Peter Haag
* Copyright (c) 2014, Peter Haag
* Copyright (c) 2013, Peter Haag
* All rights reserved.
@ -27,16 +29,25 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Author:$
*
* $Id:$
*
* $LastChangedRevision:$
*
*
*/
#ifndef _NETFLOW_PCAP_H
#define _NETFLOW_PCAP_H 1
#include <time.h>
#include "collector.h"
#include "flowtree.h"
int Init_pcap2nf(void);
int StorePcapFlow(FlowSource_t *fs, struct FlowNode *Node);
void SetServer_latency(struct FlowNode *node);
void SetClient_latency(struct FlowNode *node, struct timeval *t_packet);
void SetApplication_latency(struct FlowNode *node, struct timeval *t_packet);
#endif

View File

@ -1,4 +1,6 @@
/*
* Copyright (c) 2017, Peter Haag
* 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,22 +30,17 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Author: peter $
*
* $Id: netflow_v1.c 30 2011-07-18 11:19:46Z peter $
*
* $LastChangedRevision: 30 $
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#include <stdlib.h>
#include <syslog.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
@ -59,17 +56,10 @@
#include "nfnet.h"
#include "nf_common.h"
#include "bookkeeper.h"
#include "nfxstat.h"
#include "collector.h"
#include "exporter.h"
#include "netflow_v1.h"
#ifndef DEVEL
# define dbg_printf(...) /* printf(__VA_ARGS__) */
#else
# define dbg_printf(...) printf(__VA_ARGS__)
#endif
extern int verbose;
extern extension_descriptor_t extension_descriptor[];
@ -151,7 +141,7 @@ uint16_t map_size;
// Create a generic netflow v1 extension map
v1_extension_info.map = (extension_map_t *)malloc((size_t)map_size);
if ( !v1_extension_info.map ) {
syslog(LOG_ERR, "Process_v1: malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
LogError("Process_v1: malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
return 0;
}
@ -187,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);
}
@ -195,7 +185,7 @@ char ipstr[IP_STRING_LEN];
// nothing found
*e = (exporter_v1_t *)malloc(sizeof(exporter_v1_t));
if ( !(*e)) {
syslog(LOG_ERR, "Process_v1: malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
LogError("Process_v1: malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
return NULL;
}
memset((void *)(*e), 0, sizeof(exporter_v1_t));
@ -214,7 +204,7 @@ char ipstr[IP_STRING_LEN];
// copy the v1 generic extension map
(*e)->extension_map = (extension_map_t *)malloc(v1_extension_info.map->size);
if ( !(*e)->extension_map ) {
syslog(LOG_ERR, "Process_v1: malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
LogError("Process_v1: malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
free(*e);
*e = NULL;
return NULL;
@ -233,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);
@ -246,7 +236,7 @@ char ipstr[IP_STRING_LEN];
dbg_printf("New Exporter: v1 SysID: %u, Extension ID: %i, IP: %s, \n",
(*e)->info.sysid, (*e)->extension_map->map_id, ipstr);
syslog(LOG_INFO, "Process_v1: SysID: %u, New exporter: IP: %s\n", (*e)->info.sysid, ipstr);
LogError("Process_v1: SysID: %u, New exporter: IP: %s\n", (*e)->info.sysid, ipstr);
return (*e);
@ -271,7 +261,7 @@ char *string;
exporter = GetExporter(fs, v1_header);
if ( !exporter ) {
syslog(LOG_ERR,"Process_v1: Exporter NULL: Abort v1 record processing");
LogError("Process_v1: Exporter NULL: Abort v1 record processing");
return;
}
flags = 0;
@ -294,14 +284,14 @@ char *string;
// count check
count = ntohs(v1_header->count);
if ( count > NETFLOW_V1_MAX_RECORDS ) {
syslog(LOG_ERR,"Process_v1: Unexpected record count in header: %i. Abort v1 record processing", count);
LogError("Process_v1: Unexpected record count in header: %i. Abort v1 record processing", count);
fs->nffile->buff_ptr = (void *)common_record;
return;
}
// input buffer size check for all expected records
if ( size_left < ( NETFLOW_V1_HEADER_LENGTH + count * flow_record_length) ) {
syslog(LOG_ERR,"Process_v1: Not enough data to process v1 record. Abort v1 record processing");
LogError("Process_v1: Not enough data to process v1 record. Abort v1 record processing");
fs->nffile->buff_ptr = (void *)common_record;
return;
}
@ -309,7 +299,7 @@ char *string;
// output buffer size check for all expected records
if ( !CheckBufferSpace(fs->nffile, count * v1_output_record_size) ) {
// fishy! - should never happen. maybe disk full?
syslog(LOG_ERR,"Process_v1: output buffer size error. Abort v1 record processing");
LogError("Process_v1: output buffer size error. Abort v1 record processing");
return;
}
@ -374,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;
@ -386,7 +376,7 @@ char *string;
default:
// this should never happen, as v1 has no other extensions
syslog(LOG_ERR,"Process_v1: Unexpected extension %i for v1 record. Skip extension", id);
LogError("Process_v1: Unexpected extension %i for v1 record. Skip extension", id);
}
j++;
}
@ -459,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);
@ -504,9 +471,9 @@ char *string;
// buffer size sanity check - should never happen, but check it anyway
bsize = (pointer_addr_t)common_record - (pointer_addr_t)fs->nffile->block_header - sizeof(data_block_header_t);
if ( bsize > BUFFSIZE ) {
syslog(LOG_ERR,"### Software error ###: %s line %d", __FILE__, __LINE__);
syslog(LOG_ERR,"Process_v1: Output buffer overflow! Flush buffer and skip records.");
syslog(LOG_ERR,"Buffer size: size: %u, bsize: %llu > %u", fs->nffile->block_header->size, (unsigned long long)bsize, BUFFSIZE);
LogError("### Software error ###: %s line %d", __FILE__, __LINE__);
LogError("Process_v1: Output buffer overflow! Flush buffer and skip records.");
LogError("Buffer size: size: %u, bsize: %llu > %u", fs->nffile->block_header->size, (unsigned long long)bsize, BUFFSIZE);
// reset buffer
fs->nffile->block_header->size = 0;
fs->nffile->block_header->NumRecords = 0;

View File

@ -1,4 +1,6 @@
/*
* Copyright (c) 2017, Peter Haag
* 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 +30,20 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Author: peter $
*
* $Id: netflow_v1.h 26 2011-07-05 18:51:25Z peter $
*
* $LastChangedRevision: 26 $
*
*/
#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

View File

@ -1,4 +1,6 @@
/*
* Copyright (c) 2017, Peter Haag
* 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,22 +30,17 @@
* 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.c 69 2010-09-09 07:17:43Z haag $
*
* $LastChangedRevision: 69 $
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#include <stdlib.h>
#include <syslog.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
@ -59,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"
@ -159,7 +155,7 @@ uint16_t map_size;
// Create a generic v5 extension map
v5_extension_info.map = (extension_map_t *)malloc((size_t)map_size);
if ( !v5_extension_info.map ) {
syslog(LOG_ERR, "Process_v5: malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
LogError("Process_v5: malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
return 0;
}
v5_extension_info.map->type = ExtensionMapType;
@ -196,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);
}
@ -204,7 +200,7 @@ char ipstr[IP_STRING_LEN];
// nothing found
*e = (exporter_v5_t *)malloc(sizeof(exporter_v5_t));
if ( !(*e)) {
syslog(LOG_ERR, "Process_v5: malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
LogError("Process_v5: malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
return NULL;
}
memset((void *)(*e), 0, sizeof(exporter_v5_t));
@ -222,7 +218,7 @@ char ipstr[IP_STRING_LEN];
sampler = (generic_sampler_t *)malloc(sizeof(generic_sampler_t));
if ( !sampler ) {
syslog(LOG_ERR, "Process_v5: malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
LogError("Process_v5: malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
return NULL;
}
(*e)->sampler = sampler;
@ -241,7 +237,7 @@ char ipstr[IP_STRING_LEN];
// copy the v5 generic extension map
(*e)->extension_map = (extension_map_t *)malloc(v5_extension_info.map->size);
if ( !(*e)->extension_map ) {
syslog(LOG_ERR, "Process_v5: malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
LogError("Process_v5: malloc() error in %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
free(*e);
*e = NULL;
return NULL;
@ -262,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);
@ -277,12 +273,12 @@ char ipstr[IP_STRING_LEN];
dbg_printf("New Exporter: v5 SysID: %u, Extension ID: %i, IP: %s, Sampling Mode: %i, Sampling Interval: %u\n",
(*e)->info.sysid, (*e)->extension_map->map_id, ipstr, sampler->info.mode ,sampler->info.interval);
syslog(LOG_INFO, "Process_v5: New exporter: SysID: %u, engine id %u, type %u, IP: %s, Sampling Mode: %i, Sampling Interval: %u\n",
LogInfo("Process_v5: New exporter: SysID: %u, engine id %u, type %u, IP: %s, Sampling Mode: %i, Sampling Interval: %u\n",
(*e)->info.sysid, ( engine_tag & 0xFF ),( (engine_tag >> 8) & 0xFF ), ipstr, sampler->info.mode ,sampler->info.interval );
if ( overwrite_sampling > 0 ) {
sampler->info.interval = overwrite_sampling;
syslog(LOG_INFO, "Process_v5: Hard overwrite sampling rate: %u\n", sampler->info.interval);
LogInfo("Process_v5: Hard overwrite sampling rate: %u\n", sampler->info.interval);
}
return (*e);
@ -312,7 +308,7 @@ char *string;
exporter = GetExporter(fs, v5_header);
if ( !exporter ) {
syslog(LOG_ERR,"Process_v5: Exporter NULL: Abort v5/v7 record processing");
LogError("Process_v5: Exporter NULL: Abort v5/v7 record processing");
return;
}
exporter->packets++;
@ -348,14 +344,14 @@ char *string;
// count check
count = ntohs(v5_header->count);
if ( count > NETFLOW_V5_MAX_RECORDS ) {
syslog(LOG_ERR,"Process_v5: Unexpected record count in header: %i. Abort v5/v7 record processing", count);
LogError("Process_v5: Unexpected record count in header: %i. Abort v5/v7 record processing", count);
fs->nffile->buff_ptr = (void *)common_record;
return;
}
// input buffer size check for all expected records
if ( size_left < ( NETFLOW_V5_HEADER_LENGTH + count * flow_record_length) ) {
syslog(LOG_ERR,"Process_v5: Not enough data to process v5 record. Abort v5/v7 record processing");
LogError("Process_v5: Not enough data to process v5 record. Abort v5/v7 record processing");
fs->nffile->buff_ptr = (void *)common_record;
return;
}
@ -363,7 +359,7 @@ char *string;
// output buffer size check for all expected records
if ( !CheckBufferSpace(fs->nffile, count * v5_output_record_size) ) {
// fishy! - should never happen. maybe disk full?
syslog(LOG_ERR,"Process_v5: output buffer size error. Abort v5/v7 record processing");
LogError("Process_v5: output buffer size error. Abort v5/v7 record processing");
return;
}
@ -389,7 +385,7 @@ char *string;
fs->nffile->stat_record->sequence_failure++;
exporter->sequence_failure++;
/*
syslog(LOG_ERR,"Flow v%d sequence last:%llu now:%llu mismatch. Missing: dist:%lu flows",
LogError("Flow v%d sequence last:%llu now:%llu mismatch. Missing: dist:%lu flows",
version, exporter->last_sequence, exporter->sequence, exporter->distance);
*/
@ -497,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;
@ -516,7 +512,7 @@ char *string;
default:
// this should never happen, as v5 has no other extensions
syslog(LOG_ERR,"Process_v5: Unexpected extension %i for v5 record. Skip extension", id);
LogError("Process_v5: Unexpected extension %i for v5 record. Skip extension", id);
}
j++;
}
@ -534,7 +530,7 @@ char *string;
*/
if ( First > Last && ( (First - Last) < 20000) ) {
uint32_t _t;
syslog(LOG_ERR,"Process_v5: Unexpected time swap: First 0x%llx smaller than boot time: 0x%llx", start_time, boot_time);
LogError("Process_v5: Unexpected time swap: First 0x%llx smaller than boot time: 0x%llx", start_time, boot_time);
_t= First;
First = Last;
Last = _t;
@ -606,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);
@ -652,9 +625,9 @@ char *string;
// buffer size sanity check - should never happen, but check it anyway
bsize = (pointer_addr_t)common_record - (pointer_addr_t)fs->nffile->block_header - sizeof(data_block_header_t);
if ( bsize >= BUFFSIZE ) {
syslog(LOG_ERR,"### Software error ###: %s line %d", __FILE__, __LINE__);
syslog(LOG_ERR,"Process_v5: Output buffer overflow! Flush buffer and skip records.");
syslog(LOG_ERR,"Buffer size: size: %u, bsize: %llu > %u", fs->nffile->block_header->size, (unsigned long long)bsize, BUFFSIZE);
LogError("### Software error ###: %s line %d", __FILE__, __LINE__);
LogError("Process_v5: Output buffer overflow! Flush buffer and skip records.");
LogError("Buffer size: size: %u, bsize: %llu > %u", fs->nffile->block_header->size, (unsigned long long)bsize, BUFFSIZE);
// reset buffer
fs->nffile->block_header->size = 0;
fs->nffile->block_header->NumRecords = 0;
@ -735,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);
@ -774,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
}

View File

@ -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

View File

@ -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"
@ -43,7 +38,6 @@
#include <sys/socket.h>
#include <unistd.h>
#include <stdlib.h>
#include <syslog.h>
#include <string.h>
#include <errno.h>
#include <time.h>
@ -60,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"
@ -104,25 +97,26 @@ typedef struct sequence_map_s {
#define move48 5
#define move56 6
#define move64 7
#define move96 8
#define move128 9
#define move32_sampling 10
#define move64_sampling 11
#define move_mac 12
#define move_mpls 13
#define move_ulatency 14
#define move_slatency 15
#define move_user_20 16
#define move_user_65 17
#define TimeMsec 18
#define PushTimeMsec 19
#define saveICMP 20
#define zero8 21
#define zero16 22
#define zero32 23
#define zero64 24
#define zero96 25
#define zero128 26
#define move64_32 8
#define move96 9
#define move128 10
#define move32_sampling 11
#define move64_sampling 12
#define move_mac 13
#define move_mpls 14
#define move_ulatency 15
#define move_slatency 16
#define move_user_20 17
#define move_user_65 18
#define TimeMsec 19
#define PushTimeMsec 20
#define saveICMP 21
#define zero8 22
#define zero16 23
#define zero32 24
#define zero64 25
#define zero96 26
#define zero128 27
uint32_t id; // sequence ID as defined above
uint16_t input_offset; // copy/process data at this input offset
@ -206,7 +200,7 @@ static struct v9_element_map_s {
char *name; // name string
uint16_t length; // type of this element ( input length )
uint16_t out_length; // type of this element ( output length )
uint32_t sequence; // output length
uint32_t sequence; // sequencer ID
uint32_t zero_sequence; //
uint16_t extension; // maps into nfdump extension ID
} v9_element_map[] = {
@ -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 },
@ -238,14 +233,17 @@ static struct v9_element_map_s {
{ NF9_DST_AS, "dst AS", _2bytes, _2bytes, move16, zero16, EX_AS_2 },
{ NF9_DST_AS, "dst AS", _4bytes, _4bytes, move32, zero32, EX_AS_4 },
{ NF9_BGP_V4_NEXT_HOP, "V4 BGP next hop", _4bytes, _4bytes, move32, zero32, EX_NEXT_HOP_BGP_v4 },
{ NF9_LAST_SWITCHED, "time sec end", _4bytes, _4bytes, move32, zero32, COMMON_BLOCK },
{ NF9_FIRST_SWITCHED, "time sec create", _4bytes, _4bytes, move32, zero32, COMMON_BLOCK },
{ NF9_FIRST_SWITCHED, "time sec create", _8bytes, _4bytes, move64_32, zero32, COMMON_BLOCK },
{ NF9_LAST_SWITCHED, "time sec end", _4bytes, _4bytes, move32, zero32, COMMON_BLOCK },
{ NF9_LAST_SWITCHED, "time sec end", _8bytes, _4bytes, move64_32, zero32, COMMON_BLOCK },
{ NF_F_FLOW_CREATE_TIME_MSEC, "time msec start",_8bytes, _8bytes, TimeMsec, nop, COMMON_BLOCK },
{ NF_F_FLOW_END_TIME_MSEC, "time msec end", _8bytes, _8bytes, TimeMsec, nop, COMMON_BLOCK },
{ NF9_OUT_BYTES, "out bytes", _4bytes, _8bytes, move32_sampling, zero64, EX_OUT_BYTES_8 },
{ 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 },
@ -451,7 +449,7 @@ int i;
cache.lookup_info = (struct element_param_s *)calloc(65536, sizeof(struct element_param_s));
cache.common_extensions = (uint32_t *)malloc((Max_num_extensions+1)*sizeof(uint32_t));
if ( !cache.common_extensions || !cache.lookup_info ) {
syslog(LOG_ERR, "Process_v9: Panic! malloc(): %s line %d: %s", __FILE__, __LINE__, strerror (errno));
LogError( "Process_v9: Panic! malloc(): %s line %d: %s", __FILE__, __LINE__, strerror (errno));
return 0;
}
@ -465,7 +463,7 @@ int i;
}
cache.max_v9_elements = i;
syslog(LOG_DEBUG,"Init v9: Max number of v9 tags: %u", cache.max_v9_elements);
dbg_printf("Init v9: Max number of v9 tags: %u\n", cache.max_v9_elements);
return 1;
@ -479,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);
@ -499,7 +497,7 @@ exporter_v9_domain_t **e = (exporter_v9_domain_t **)&(fs->exporter_data);
// nothing found
*e = (exporter_v9_domain_t *)malloc(sizeof(exporter_v9_domain_t));
if ( !(*e)) {
syslog(LOG_ERR, "Process_v9: Panic! malloc() %s line %d: %s", __FILE__, __LINE__, strerror (errno));
LogError( "Process_v9: Panic! malloc() %s line %d: %s", __FILE__, __LINE__, strerror (errno));
return NULL;
}
memset((void *)(*e), 0, sizeof(exporter_v9_domain_t));
@ -521,7 +519,7 @@ exporter_v9_domain_t **e = (exporter_v9_domain_t **)&(fs->exporter_data);
dbg_printf("Process_v9: New exporter: SysID: %u, Domain: %u, IP: %s\n",
(*e)->info.sysid, exporter_id, ipstr);
syslog(LOG_INFO, "Process_v9: New exporter: SysID: %u, Domain: %u, IP: %s\n",
LogInfo("Process_v9: New exporter: SysID: %u, Domain: %u, IP: %s\n",
(*e)->info.sysid, exporter_id, ipstr);
@ -547,6 +545,12 @@ 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);
#endif
}
dbg_printf("Skip unknown element type: %u, Length: %u\n",
Type, Length);
@ -591,12 +595,12 @@ input_translation_t **table;
// so template refreshing may change the table size without danger of overflowing
*table = calloc(1, sizeof(input_translation_t));
if ( !(*table) ) {
syslog(LOG_ERR, "Process_v9: Panic! calloc() %s line %d: %s", __FILE__, __LINE__, strerror (errno));
LogError( "Process_v9: Panic! calloc() %s line %d: %s", __FILE__, __LINE__, strerror (errno));
return NULL;
}
(*table)->sequence = calloc(cache.max_v9_elements, sizeof(sequence_map_t));
if ( !(*table)->sequence ) {
syslog(LOG_ERR, "Process_v9: Panic! malloc() %s line %d: %s", __FILE__, __LINE__, strerror (errno));
LogError( "Process_v9: Panic! malloc() %s line %d: %s", __FILE__, __LINE__, strerror (errno));
return NULL;
}
@ -614,7 +618,7 @@ uint32_t i = table->number_of_sequences;
uint32_t index = cache.lookup_info[Type].index;
if ( table->number_of_sequences >= cache.max_v9_elements ) {
syslog(LOG_ERR, "Process_v9: Software bug! Sequence table full. at %s line %d",
LogError( "Process_v9: Software bug! Sequence table full. at %s line %d",
__FILE__, __LINE__);
dbg_printf("Software bug! Sequence table full. at %s line %d",
__FILE__, __LINE__);
@ -656,7 +660,7 @@ size_t size_required;
table = GetTranslationTable(exporter, id);
if ( !table ) {
syslog(LOG_INFO, "Process_v9: [%u] Add template %u", exporter->info.id, id);
LogInfo( "Process_v9: [%u] Add template %u", exporter->info.id, id);
dbg_printf("[%u] Add template %u\n", exporter->info.id, id);
table = add_translation_table(exporter, id);
if ( !table ) {
@ -670,7 +674,7 @@ size_t size_required;
size_required = (size_required + 3) &~(size_t)3;
extension_map = malloc(size_required);
if ( !extension_map ) {
syslog(LOG_ERR, "Process_v9: Panic! malloc() error in %s line %d: %s", __FILE__, __LINE__, strerror (errno));
LogError( "Process_v9: Panic! malloc() error in %s line %d: %s", __FILE__, __LINE__, strerror (errno));
return NULL;
}
extension_map->type = ExtensionMapType;
@ -756,7 +760,7 @@ size_t size_required;
// skip exporter_sysid and reserved
offset += 4;
/* IP addresss record
/* IP address record
* This record is expected in the output stream. If not available
* in the template, assume empty v4 address.
*/
@ -781,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
*/
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);
@ -864,7 +873,12 @@ size_t size_required;
PushSequence( table, NF9_OUT_PKTS, &offset, &table->out_packets, 0);
break;
case EX_OUT_PKG_8:
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 ) {
@ -1099,7 +1113,7 @@ size_t size_required;
dbg_printf("%d byte Sampling ID included at offset %u\n", length, table->sampler_offset);
break;
default:
syslog(LOG_ERR, "Process_v9: Unexpected SAMPLER ID field length: %d",
LogError( "Process_v9: Unexpected SAMPLER ID field length: %d",
cache.lookup_info[NF9_FLOW_SAMPLER_ID].length);
dbg_printf("Unexpected SAMPLER ID field length: %d",
cache.lookup_info[NF9_FLOW_SAMPLER_ID].length);
@ -1189,7 +1203,7 @@ option_offset_t **t;
fprintf(stderr, "malloc() allocation error: %s\n", strerror(errno));
return ;
}
syslog(LOG_ERR, "Process_v9: New std sampler: interval: %i, algorithm: %i",
LogError( "Process_v9: New std sampler: interval: %i, algorithm: %i",
offset_std_sampler_interval, offset_std_sampler_algorithm);
} // else existing table
@ -1240,7 +1254,7 @@ int i;
dbg_printf("template size: %u buffersize: %u\n", size_required, size_left);
if ( size_left < size_required ) {
syslog(LOG_ERR, "Process_v9: [%u] buffer size error: expected %u available %u",
LogError( "Process_v9: [%u] buffer size error: expected %u available %u",
exporter->info.id, size_required, size_left);
size_left = 0;
continue;
@ -1334,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;
@ -1348,19 +1362,19 @@ uint16_t offset_std_sampler_interval, offset_std_sampler_algorithm, found_std_sa
option_length = GET_OPTION_TEMPLATE_OPTION_LENGTH(option_template);
if ( scope_length & 0x3 ) {
syslog(LOG_ERR, "Process_v9: [%u] scope length error: length %u not multiple of 4",
LogError( "Process_v9: [%u] scope length error: length %u not multiple of 4",
exporter->info.id, scope_length);
return;
}
if ( option_length & 0x3 ) {
syslog(LOG_ERR, "Process_v9: [%u] option length error: length %u not multiple of 4",
LogError( "Process_v9: [%u] option length error: length %u not multiple of 4",
exporter->info.id, option_length);
return;
}
if ( (scope_length + option_length) > size_left ) {
syslog(LOG_ERR, "Process_v9: [%u] option template length error: size left %u too small for %u scopes length and %u options length",
LogError( "Process_v9: [%u] option template length error: size left %u too small for %u scopes length and %u options length",
exporter->info.id, size_left, scope_length, option_length);
return;
}
@ -1390,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++ ) {
@ -1400,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 ) {
@ -1410,8 +1448,9 @@ uint16_t offset_std_sampler_interval, offset_std_sampler_algorithm, found_std_sa
}
if ( index && v9_element_map[index].length != length ) {
syslog(LOG_ERR,"Process_v9: Option field Type: %u, length %u not supported\n", type, 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) {
@ -1426,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++;
@ -1449,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);
@ -1529,9 +1572,16 @@ char *string;
while (size_left) {
common_record_t *data_record;
if ( (size_left < table->input_record_size) ) {
if ( table->input_record_size == 0 ) {
dbg_printf("Process_v9: Corrupt data flowset? table input_record_sizei = 0\n");
LogError("Process_v9: Corrupt data flowset? table input_record_sizei = 0 ");
size_left = 0;
continue;
}
if ( size_left < table->input_record_size ) {
if ( size_left > 3 ) {
syslog(LOG_WARNING,"Process_v9: Corrupt data flowset? Pad bytes: %u", size_left);
LogError("Process_v9: Corrupt data flowset? Pad bytes: %u", size_left);
dbg_printf("Process_v9: Corrupt data flowset? Pad bytes: %u, table record_size: %u\n",
size_left, table->input_record_size);
}
@ -1542,7 +1592,7 @@ char *string;
// check for enough space in output buffer
if ( !CheckBufferSpace(fs->nffile, table->output_record_size) ) {
// this should really never occur, because the buffer gets flushed ealier
syslog(LOG_ERR,"Process_v9: output buffer size error. Abort v9 record processing");
LogError("Process_v9: output buffer size error. Abort v9 record processing");
dbg_printf("Process_v9: output buffer size error. Abort v9 record processing");
return;
}
@ -1570,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++ ) {
@ -1622,6 +1672,11 @@ char *string;
*((uint32_t *)&out[output_offset]) = t.val.val32[0];
*((uint32_t *)&out[output_offset+4]) = t.val.val32[1];
} break;
case move64_32:
{ type_mask_t t;
t.val.val64 = Get_val64((void *)&in[input_offset]);
*((uint32_t *)&out[output_offset]) = t.val.val32[1];
} break;
case move96:
{ *((uint32_t *)&out[output_offset]) = Get_val32((void *)&in[input_offset]);
*((uint32_t *)&out[output_offset+4]) = Get_val32((void *)&in[input_offset+4]);
@ -1738,7 +1793,7 @@ char *string;
*((uint32_t *)&out[output_offset+12]) = 0;
} break;
default:
syslog(LOG_ERR, "Process_v9: Software bug! Unknown Sequence: %u. at %s line %d",
LogError( "Process_v9: Software bug! Unknown Sequence: %u. at %s line %d",
table->sequence[i].id, __FILE__, __LINE__);
dbg_printf("Software bug! Unknown Sequence: %u. at %s line %d",
table->sequence[i].id, __FILE__, __LINE__);
@ -1829,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;
}
}
@ -1895,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);
@ -1936,9 +1969,9 @@ char *string;
// buffer size sanity check
if ( fs->nffile->block_header->size > BUFFSIZE ) {
// should never happen
syslog(LOG_ERR,"### Software error ###: %s line %d", __FILE__, __LINE__);
syslog(LOG_ERR,"Process v9: Output buffer overflow! Flush buffer and skip records.");
syslog(LOG_ERR,"Buffer size: %u > %u", fs->nffile->block_header->size, BUFFSIZE);
LogError("### Software error ###: %s line %d", __FILE__, __LINE__);
LogError("Process v9: Output buffer overflow! Flush buffer and skip records.");
LogError("Buffer size: %u > %u", fs->nffile->block_header->size, BUFFSIZE);
// reset buffer
fs->nffile->block_header->size = 0;
@ -1963,7 +1996,7 @@ uint8_t *in;
if ( !offset_table ) {
// should never happen - catch it anyway
syslog(LOG_ERR, "Process_v9: Panic! - No Offset table found! : %s line %d", __FILE__, __LINE__);
LogError( "Process_v9: Panic! - No Offset table found! : %s line %d", __FILE__, __LINE__);
return;
}
@ -2007,7 +2040,7 @@ uint8_t *in;
dbg_printf("Sampler algorithm: %u\n", mode);
dbg_printf("Sampler interval : %u\n", interval);
syslog(LOG_INFO, "Set std sampler: algorithm: %u, interval: %u\n",
LogInfo( "Set std sampler: algorithm: %u, interval: %u\n",
mode, interval);
dbg_printf("Set std sampler: algorithm: %u, interval: %u\n",
mode, interval);
@ -2019,7 +2052,6 @@ uint8_t *in;
void Process_v9(void *in_buff, ssize_t in_buff_cnt, FlowSource_t *fs) {
exporter_v9_domain_t *exporter;
void *flowset_header;
option_template_flowset_t *option_flowset;
netflow_v9_header_t *v9_header;
int64_t distance;
uint32_t flowset_id, flowset_length, exporter_id;
@ -2027,9 +2059,11 @@ ssize_t size_left;
static int pkg_num = 0;
pkg_num++;
dbg_printf("Process_v9: Next packet: %i\n", pkg_num);
size_left = in_buff_cnt;
if ( size_left < NETFLOW_V9_HEADER_LENGTH ) {
syslog(LOG_ERR, "Process_v9: Too little data for v9 packet: '%lli'", (long long)size_left);
LogError( "Process_v9: Too little data for v9 packet: '%lli'", (long long)size_left);
return;
}
@ -2039,7 +2073,7 @@ static int pkg_num = 0;
exporter = GetExporter(fs, exporter_id);
if ( !exporter ) {
syslog(LOG_ERR,"Process_v9: Exporter NULL: Abort v9 record processing");
LogError("Process_v9: Exporter NULL: Abort v9 record processing");
return;
}
exporter->packets++;
@ -2055,7 +2089,9 @@ static int pkg_num = 0;
#ifdef DEVEL
uint32_t expected_records = ntohs(v9_header->count);
printf("\n[%u] Next packet: %i %u records, buffer: %li \n", exporter_id, pkg_num, expected_records, size_left);
uint32_t skip = 0;
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
@ -2078,10 +2114,11 @@ static int pkg_num = 0;
exporter->info.id, (long long)exporter->last_sequence, (long long)exporter->sequence, (long long)distance);
/*
if ( report_seq )
syslog(LOG_ERR,"Flow sequence mismatch. Missing: %lli packets", delta(last_count,distance));
LogError("Flow sequence mismatch. Missing: %lli packets", delta(last_count,distance));
*/
}
}
dbg_printf("Sequence: %llu\n", exporter->sequence);
processed_records = 0;
@ -2102,7 +2139,7 @@ static int pkg_num = 0;
and smaller is an illegal flowset anyway ...
if it happends, we can't determine the next flowset, so skip the entire export packet
*/
syslog(LOG_ERR,"Process_v9: flowset zero length error.");
LogError("Process_v9: flowset zero length error.");
dbg_printf("Process_v9: flowset zero length error.\n");
return;
}
@ -2116,7 +2153,7 @@ static int pkg_num = 0;
if ( flowset_length > size_left ) {
dbg_printf("flowset length error. Expected bytes: %u > buffersize: %lli",
flowset_length, (long long)size_left);
syslog(LOG_ERR,"Process_v9: flowset length error. Expected bytes: %u > buffersize: %lli",
LogError("Process_v9: flowset length error. Expected bytes: %u > buffersize: %lli",
flowset_length, (long long)size_left);
size_left = 0;
continue;
@ -2133,16 +2170,19 @@ static int pkg_num = 0;
case NF9_TEMPLATE_FLOWSET_ID:
Process_v9_templates(exporter, flowset_header, fs);
break;
case NF9_OPTIONS_FLOWSET_ID:
case NF9_OPTIONS_FLOWSET_ID: {
#ifdef DEVEL
option_template_flowset_t *option_flowset;
option_flowset = (option_template_flowset_t *)flowset_header;
syslog(LOG_DEBUG,"Process_v9: Found options flowset: template %u", ntohs(option_flowset->template_id));
dbg_printf("Process_v9: Found options flowset: template %u", ntohs(option_flowset->template_id));
#endif
Process_v9_option_templates(exporter, flowset_header, fs);
break;
} break;
default: {
input_translation_t *table;
if ( flowset_id < NF9_MIN_RECORD_FLOWSET_ID ) {
dbg_printf("Invalid flowset id: %u\n", flowset_id);
syslog(LOG_ERR,"Process_v9: Invalid flowset id: %u", flowset_id);
LogError("Process_v9: Invalid flowset id: %u", flowset_id);
} else {
dbg_printf("[%u] ID %u Data flowset\n", exporter->info.id, flowset_id);
@ -2156,6 +2196,9 @@ static int pkg_num = 0;
// maybe a flowset with option data
dbg_printf("Process v9: [%u] No table for id %u -> Skip record\n",
exporter->info.id, flowset_id);
#ifdef DEVEL
skip = 1;
#endif
}
}
}
@ -2167,8 +2210,8 @@ static int pkg_num = 0;
} // End of while
#ifdef DEVEL
if ( processed_records != expected_records ) {
syslog(LOG_ERR, "Process_v9: Processed records %u, expected %u", processed_records, expected_records);
if ( skip == 0 && processed_records != expected_records ) {
LogError( "Process_v9: Processed records %u, expected %u", processed_records, expected_records);
printf("Process_v9: Processed records %u, expected %u\n", processed_records, expected_records);
}
#endif
@ -2625,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));
}
@ -2711,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:
@ -2990,7 +3033,7 @@ generic_sampler_t *sampler;
// no samplers so far
sampler = (generic_sampler_t *)malloc(sizeof(generic_sampler_t));
if ( !sampler ) {
syslog(LOG_ERR, "Process_v9: Panic! malloc(): %s line %d: %s", __FILE__, __LINE__, strerror (errno));
LogError( "Process_v9: Panic! malloc(): %s line %d: %s", __FILE__, __LINE__, strerror (errno));
return;
}
@ -3004,7 +3047,7 @@ generic_sampler_t *sampler;
exporter->sampler = sampler;
FlushInfoSampler(fs, &(sampler->info));
syslog(LOG_INFO, "Add new sampler: ID: %i, mode: %u, interval: %u\n",
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);
@ -3015,8 +3058,6 @@ generic_sampler_t *sampler;
// test for update of existing sampler
if ( sampler->info.id == id ) {
// found same sampler id - update record
syslog(LOG_INFO, "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);
@ -3025,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");
}
@ -3037,7 +3080,7 @@ generic_sampler_t *sampler;
// end of sampler chain - insert new sampler
sampler->next = (generic_sampler_t *)malloc(sizeof(generic_sampler_t));
if ( !sampler->next ) {
syslog(LOG_ERR, "Process_v9: Panic! malloc(): %s line %d: %s", __FILE__, __LINE__, strerror (errno));
LogError( "Process_v9: Panic! malloc(): %s line %d: %s", __FILE__, __LINE__, strerror (errno));
return;
}
sampler = sampler->next;
@ -3053,7 +3096,7 @@ generic_sampler_t *sampler;
FlushInfoSampler(fs, &(sampler->info));
syslog(LOG_INFO, "Append new sampler: ID: %u, mode: %u, interval: %u\n",
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);

View File

@ -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;
@ -214,6 +220,10 @@ typedef struct common_header_s {
#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

View File

@ -1,4 +1,6 @@
/*
* Copyright (c) 2017, Peter Haag
* 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 +30,12 @@
* 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.c 69 2010-09-09 07:17:43Z haag $
*
* $LastChangedRevision: 69 $
*
*/
#include "config.h"
#include <stdio.h>
#include <stddef.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
@ -78,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)
@ -96,12 +103,20 @@ static void AddToken(int index);
static void AddString(char *string);
static void String_FlowFlags(master_record_t *r, char *string);
static void String_FirstSeen(master_record_t *r, char *string);
static void String_LastSeen(master_record_t *r, char *string);
static void String_Received(master_record_t *r, char *string);
static void String_FirstSeenRaw(master_record_t *r, char *string);
static void String_LastSeenRaw(master_record_t *r, char *string);
static void String_ReceivedRaw(master_record_t *r, char *string);
static void String_Duration(master_record_t *r, char *string);
static void String_Protocol(master_record_t *r, char *string);
@ -206,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);
@ -269,10 +286,14 @@ static struct format_token_list_s {
char *header; // header line description
string_function_t string_function; // function generation output string
} format_token_list[] = {
{ "%ff", 0, "Flow Flags", String_FlowFlags }, // flow flags in hex
{ "%tfs", 0, "Date first seen ", String_FirstSeen }, // Start Time - first seen
{ "%ts", 0, "Date first seen ", String_FirstSeen }, // Start Time - first seen
{ "%tsr", 0, "Date first seen (raw) ", String_FirstSeenRaw }, // Start Time - first seen, seconds
{ "%te", 0, "Date last seen ", String_LastSeen }, // End Time - last seen
{ "%ter", 0, "Date last seen (raw) ", String_LastSeenRaw }, // End Time - first seen, seconds
{ "%tr", 0, "Date flow received ", String_Received }, // Received Time
{ "%trr", 0, "Date flow received (raw) ", String_ReceivedRaw }, // Received Time, seconds
{ "%td", 0, " Duration", String_Duration }, // Duration
{ "%exp", 0, "Exp ID", String_ExpSysID }, // Exporter SysID
{ "%pr", 0, "Proto", String_Protocol }, // Protocol
@ -332,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
@ -370,7 +392,7 @@ static struct format_token_list_s {
{ "%pbsize", 0, "Pb-Size", String_PortBlockSize}, // Port block size
#endif
// nprobe latency
// latency extension for nfpcapd and nprobe
{ "%cl", 0, "C Latency", String_ClientLatency }, // client latency
{ "%sl", 0, "S latency", String_ServerLatency }, // server latency
{ "%al", 0, "A latency", String_AppLatency }, // app latency
@ -554,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"
@ -676,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);
@ -722,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);
@ -759,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"
@ -769,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 );
@ -858,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,
@ -872,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);
@ -890,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,
@ -904,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);
@ -1007,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,
@ -1021,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);
}
@ -1131,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;
@ -1149,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);
@ -1215,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,
@ -1253,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 )
@ -1292,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);
@ -1376,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);
@ -1389,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);
@ -1402,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);
@ -1415,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);
@ -1511,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);
@ -1524,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);
@ -1809,6 +1826,13 @@ static inline void ICMP_Port_decode(master_record_t *r, char *string) {
} // End of ICMP_Port_decode
/* functions, which create the individual strings for the output line */
static void String_FlowFlags(master_record_t *r, char *string) {
snprintf(string, MAX_STRING_LENGTH-1, "0x%.2x", r->flags);
string[MAX_STRING_LENGTH-1] = '\0';
} // End of String_FlowFlags
static void String_FirstSeen(master_record_t *r, char *string) {
time_t tt;
struct tm * ts;
@ -1851,6 +1875,28 @@ char *s;
} // End of String_Received
static void String_ReceivedRaw(master_record_t *r, char *string) {
/* snprintf does write \0, and the max is INCL the terminating \0 */
snprintf(string, MAX_STRING_LENGTH, "%.3f", r->received/1000.0);
} // End of String_ReceivedRaw
static void String_FirstSeenRaw(master_record_t *r, char *string) {
/* snprintf does write \0, and the max is INCL the terminating \0 */
snprintf(string, MAX_STRING_LENGTH, "%u.%03u", r->first, r->msec_first);
} // End of String_FirstSeenRaw
static void String_LastSeenRaw(master_record_t *r, char *string) {
/* snprintf does write \0, and the max is INCL the terminating \0 */
snprintf(string, MAX_STRING_LENGTH, "%u.%03u", r->last, r->msec_last);
} // End of String_LastSeenRaw
#ifdef NSEL
static void String_EventTime(master_record_t *r, char *string) {
time_t tt;
@ -1890,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;
@ -1919,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);
@ -1928,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 = ':';
}
@ -1950,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;
@ -1980,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;
@ -2009,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;
@ -2038,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;
@ -2069,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);
@ -2078,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 = ':';
}
@ -2103,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;
@ -2134,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;
@ -2343,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' : '.';
@ -2509,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;
@ -2700,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;
@ -2728,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;
@ -2770,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);
@ -2780,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 = ':';
@ -2803,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);
@ -2813,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 = ':';

View File

@ -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);

View File

@ -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"
@ -90,7 +84,7 @@ static void process_data(void *wfile);
static void usage(char *name) {
printf("usage %s [options] \n"
"-h\t\tthis text you see right here\n"
"-K <key>\tAnonymize IP addressses using CryptoPAn with key <key>.\n"
"-K <key>\tAnonymize IP addresses using CryptoPAn with key <key>.\n"
"-r\t\tread input from file\n"
"-M <expr>\tRead input from multiple directories.\n"
"-R <expr>\tRead input from sequence of files.\n"
@ -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
}

View File

@ -1,4 +1,6 @@
/*
* Copyright (c) 2017, Peter Haag
* 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,13 +30,6 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Author: haag $
*
* $Id: nfcapd.c 51 2010-01-29 09:01:54Z haag $
*
* $LastChangedRevision: 51 $
*
*
*/
/*
@ -90,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"
@ -152,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, 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) {
@ -172,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"
@ -185,6 +180,7 @@ static void usage(char *name) {
"-4\t\tListen on IPv4 (default).\n"
"-6\t\tListen on IPv6.\n"
"-V\t\tPrint version and exit.\n"
"-Z\t\tAdd timezone offset to filenamet.\n"
, name);
} // End of usage
@ -206,7 +202,7 @@ pid_t ret;
sleep(1);
}
if ( i >= LAUNCHER_TIMEOUT ) {
LogError("Laucher does not want to terminate - signal again");
LogError("Launcher does not want to terminate - signal again");
kill(pid, SIGTERM);
sleep(1);
}
@ -362,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, 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;
@ -400,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;
@ -431,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) {
@ -452,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++;
}
}
@ -469,10 +464,11 @@ srecord_t *commbuff;
if ( ((t_now - t_start) >= twin) || done ) {
char subfilename[64];
struct tm *now;
char *subdir;
char *subdir, fmt[64];
alarm(0);
now = localtime(&t_start);
strftime(fmt, sizeof fmt, time_extension, now);
// prepare sub dir hierarchy
if ( use_subdirs ) {
@ -483,16 +479,13 @@ srecord_t *commbuff;
// failed to generate subdir path - put flows into base directory
subdir = NULL;
snprintf(subfilename, 63, "nfcapd.%i%02i%02i%02i%02i",
now->tm_year + 1900, now->tm_mon + 1, now->tm_mday, now->tm_hour, now->tm_min);
snprintf(subfilename, 63, "nfcapd.%s", fmt);
} else {
snprintf(subfilename, 63, "%s/nfcapd.%i%02i%02i%02i%02i", subdir,
now->tm_year + 1900, now->tm_mon + 1, now->tm_mday, now->tm_hour, now->tm_min);
snprintf(subfilename, 63, "%s/nfcapd.%s", subdir, fmt);
}
} else {
subdir = NULL;
snprintf(subfilename, 63, "nfcapd.%i%02i%02i%02i%02i",
now->tm_year + 1900, now->tm_mon + 1, now->tm_mday, now->tm_hour, now->tm_min);
snprintf(subfilename, 63, "nfcapd.%s", fmt);
}
subfilename[63] = '\0';
@ -532,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
@ -588,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
@ -621,7 +602,7 @@ srecord_t *commbuff;
LogInfo("Signal launcher");
kill(launcher_pid, SIGHUP);
} else
LogError("ERROR: Launcher did unexpectedly!");
LogError("ERROR: Launcher died unexpectedly!");
}
@ -713,7 +694,7 @@ srecord_t *commbuff;
if ( verbose ) {
uint16_t count = ntohs(nf_header->count);
if ( blast_cnt != count ) {
// LogError("Missmatch blast check: Expected %u got %u\n", blast_cnt, count);
// LogError("Mismatch blast check: Expected %u got %u\n", blast_cnt, count);
blast_cnt = count;
blast_failures++;
} else {
@ -763,19 +744,19 @@ srecord_t *commbuff;
int main(int argc, char **argv) {
char *bindhost, *filter, *datadir, pidstr[32], *launch_process;
char *bindhost, *datadir, pidstr[32], *launch_process;
char *userid, *groupid, *checkptr, *listenport, *mcastgroup, *extension_tags;
char *Ident, *dynsrcdir, pidfile[MAXPATHLEN];
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, 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;
@ -793,24 +774,26 @@ char *pcap_file;
bindhost = NULL;
mcastgroup = NULL;
pidfile[0] = 0;
filter = NULL;
launch_process = NULL;
userid = groupid = NULL;
twin = TIME_WINDOW;
datadir = NULL;
subdir_index = 0;
time_extension = "%Y%m%d%H%M";
spec_time_extension = 0;
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;
dynsrcdir = NULL;
while ((c = getopt(argc, argv, "46ef:whEVI:DB:b:jl:J:M:n:p:P:R:S:s:T:t:x:Xru:g:z")) != EOF) {
while ((c = getopt(argc, argv, "46ef:whEVI:DB:b:jl:J:M:n:p:P:R:S:s:T:t:x:Xru:g:zZ")) != EOF) {
switch (c) {
case 'h':
usage(argv[0]);
@ -846,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;
@ -912,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':
@ -976,18 +965,29 @@ 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;
break;
case 'Z':
time_extension = "%Y%m%d%H%M%z";
spec_time_extension = 1;
break;
case '4':
if ( family == AF_UNSPEC )
family = AF_INET;
@ -1028,6 +1028,11 @@ char *pcap_file;
exit(255);
}
if ( expire && spec_time_extension ) {
fprintf(stderr, "ERROR, -Z timezone extension breaks expire -e\n");
exit(255);
}
InitExtensionMaps(NO_EXTENSION_LIST);
SetupExtensionDescriptors(strdup(extension_tags));
@ -1050,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 ) {
@ -1115,12 +1122,8 @@ char *pcap_file;
usage(argv[0]);
close(sock);
exit(255);
} else {
/* user specified a pcap filter */
filter = argv[optind];
}
t_start = time(NULL);
if ( synctime )
t_start = t_start - ( t_start % twin);
@ -1219,7 +1222,8 @@ char *pcap_file;
sigaction(SIGCHLD, &act, NULL);
LogInfo("Startup.");
run(receive_packet, sock, peer, twin, t_start, report_sequence, subdir_index, compress, do_xstat);
run(receive_packet, sock, repeater, twin, t_start, report_sequence, subdir_index,
time_extension, compress);
close(sock);
kill_launcher(launcher_pid);

View File

@ -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"
"-j\t\tlzo compress flows in output file. Used in combination with -w.\n"
"-z\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"
@ -297,7 +291,7 @@ static void usage(char *name) {
"-M <expr>\tRead input from multiple directories.\n"
"\t\t/dir/dir1:dir2:dir3 Read the same files from '/dir/dir1' '/dir/dir2' and '/dir/dir3'.\n"
"\t\trequests either -r filename or -R firstfile:lastfile without pathnames\n"
"-m\t\tdepricated\n"
"-m\t\tdeprecated\n"
"-O <order> Sort order for aggregated flows - tstart, tend, flows, packets bps pps bbp etc.\n"
"-R <expr>\tRead input from sequence of files.\n"
"\t\t/any/dir Read all files in that directory.\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;
@ -897,7 +884,7 @@ char Ident[IDENTLEN];
print_order = "tstart";
Parse_PrintOrder(print_order);
date_sorted = 1;
LogError("Option -m depricated. Use '-O tstart' instead\n");
LogError("Option -m deprecated. Use '-O tstart' instead\n");
break;
case 'M':
Mdirs = optarg;
@ -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;
@ -1009,7 +996,7 @@ char Ident[IDENTLEN];
}
if ( rfile && Rfile ) {
LogError("-r and -R are mutually exclusive. Plase specify either -r or -R\n");
LogError("-r and -R are mutually exclusive. Please specify either -r or -R\n");
exit(255);
}
if ( Mdirs && !(rfile || Rfile) ) {
@ -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 ) {

View File

@ -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
/*

View File

@ -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

1429
bin/nfdump.test.out Executable file

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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);
@ -376,7 +370,7 @@ channel_t *channel, *current_channel;
printf("Rescan again, due to file changes in directory!\n");
}
if ( BookSequence(current_channel->books) != last_sequence ) {
fprintf(stderr, "Could not savely rescan the directory. Data is not consistent.\n");
fprintf(stderr, "Could not safely rescan the directory. Data is not consistent.\n");
ReleaseBookkeeper(current_channel->books, DETACH_ONLY);
if ( current_channel->status == OK )
WriteStatInfo(current_channel->dirstat);

View File

@ -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"
@ -295,7 +289,7 @@ char *string;
}
if ( c != maxindex ) {
LogError("Abort: Missmatch %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
LogError("Abort: Mismatch %s line %d: %s\n", __FILE__, __LINE__, strerror (errno));
return 0;
}
@ -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 )

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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 |
* +----+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+
*
@ -475,10 +489,11 @@ typedef struct ip_addr_s {
};
uint64_t _v6[2];
} ip_union;
#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:
@ -1111,7 +1126,7 @@ typedef struct tpl_ext_43_s {
#define EX_NSEL_RESERVED 44
/*
* nprobe extensions
* latency extensions, used by nprobe and nfpcapd
*/
/*
@ -1488,7 +1503,6 @@ typedef struct master_record_s {
uint16_t icmp;
};
#ifdef WORDS_BIGENDIAN
# define OffsetPort 3
# define OffsetExporterSysID 3
@ -2045,7 +2059,6 @@ typedef struct master_record_s {
#endif
// nprobe extensions
// latency extension
uint64_t client_nw_delay_usec; // index LATENCY_BASE_OFFSET 0xffff'ffff'ffff'ffff
uint64_t server_nw_delay_usec; // index LATENCY_BASE_OFFSET + 1 0xffff'ffff'ffff'ffff
@ -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);

View File

@ -1,4 +1,6 @@
/*
* Copyright (c) 2017, Peter Haag
* 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,28 +30,15 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Author: haag $
*
* $Id: nffile_inline.c 40 2009-12-16 10:41:44Z haag $
*
* $LastChangedRevision: 40 $
*
*/
/*
* nffile_inline.c is needed for daemon code as well as normal stdio code
* therefore a generic LogError is defined, which maps to the
* approriate logging channel - either stderr or syslog
*/
void LogError(char *format, ...);
static inline int CheckBufferSpace(nffile_t *nffile, size_t required);
static inline void AppendToBuffer(nffile_t *nffile, void *record, size_t required);
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 );
@ -59,9 +48,7 @@ static void PackRecord(master_record_t *master_record, nffile_t *nffile);
static inline int CheckBufferSpace(nffile_t *nffile, size_t required) {
#ifdef DEVEL
// printf("Buffer Size %u\n", nffile->block_header->size);
#endif
dbg_printf("Buffer Size %u\n", nffile->block_header->size);
// flush current buffer to disc
if ( (nffile->block_header->size + required ) > WRITE_BUFFSIZE ) {
@ -88,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
@ -102,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
/*
@ -148,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));
}
@ -237,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;
@ -336,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;
@ -397,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;
@ -456,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];
@ -536,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));
}
@ -617,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: {
@ -709,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: {
@ -755,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: {

View File

@ -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

View File

@ -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;

View File

@ -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 */
/*

View File

@ -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;
}

View File

@ -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 );

Binary file not shown.

View File

@ -1,4 +1,6 @@
/*
* Copyright (c) 2017, Peter Haag
* Copyright (c) 2016, Peter Haag
* Copyright (c) 2014, Peter Haag
* Copyright (c) 2013, Peter Haag
* All rights reserved.
@ -27,16 +29,8 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Author$
*
* $Id$
*
* $LastChangedRevision$
*
*/
/* $Id: pcapd.c 2778 2012-03-19 09:23:26Z roethlis $ */
#include "config.h"
#ifdef HAVE_FEATURES_H
@ -62,6 +56,7 @@
#include <errno.h>
#include <signal.h>
#include <string.h>
#include <assert.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
@ -97,7 +92,6 @@
#include "flist.h"
#include "nfstatfile.h"
#include "bookkeeper.h"
#include "nfxstat.h"
#include "collector.h"
#include "exporter.h"
#include "rbtree.h"
@ -146,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;
@ -251,13 +245,14 @@ static void usage(char *name) {
"-i device\tspecify a device\n"
"-r pcapfile\tspecify a file to read from\n"
"-B cache buckets\tset the number of cache buckets. (default 1048576)\n"
"-s snaplen\tset the snapshot length\n"
"-s snaplen\tset the snapshot length - default 1500\n"
"-l flowdir \tset the flow output directory. (no default) \n"
"-l pcapdir \tset the pcapdir directory. (optional) \n"
"-p pcapdir \tset the pcapdir directory. (optional) \n"
"-S subdir\tSub directory format. see nfcapd(1) for format\n"
"-I Ident\tset the ident string for stat file. (default 'none')\n"
"-P pidfile\tset the PID file\n"
"-t time frame\tset the time window to rotate pcap/nfcapd file\n"
"-j\t\tBZ2 compress flows in output file.\n"
"-z\t\tCompress flows in output file.\n"
"-E\t\tPrint extended format of netflow data. for debugging purpose only.\n"
"-T\t\tInclude extension tags in records.\n"
@ -618,7 +613,7 @@ int compress = args->compress;
FlowSource_t *fs = args->fs;
// locals
time_t t_start, t_clock, t_udp_flush;
time_t t_start, t_clock;
int err, done;
done = 0;
@ -650,7 +645,6 @@ int err, done;
pthread_kill(args->parent, SIGUSR1);
pthread_exit((void *)args);
}
fs->xstat = NULL;
// init vars
fs->bad_packets = 0;
@ -659,7 +653,6 @@ int err, done;
t_start = 0;
t_clock = 0;
t_udp_flush = 0;
while ( 1 ) {
struct FlowNode *Node;
@ -673,7 +666,7 @@ int err, done;
}
if ( t_start == 0 ) {
t_udp_flush = t_start = t_clock - (t_clock % t_win);
t_start = t_clock - (t_clock % t_win);
}
if (((t_clock - t_start) >= t_win) || done) { /* rotate file */
@ -769,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;
@ -796,11 +789,6 @@ int err, done;
}
}
if (((t_clock - t_udp_flush) >= 10) || !done) { /* flush inactive UDP list */
UDPexpire(fs, t_clock - 10 );
t_udp_flush = t_clock;
}
if ( Node->fin != SIGNAL_NODE )
// Process the Node
ProcessFlowNode(fs, Node);
@ -1196,7 +1184,7 @@ pcap_dev_t *pcap_dev;
p_packet_thread_args_t *p_packet_thread_args;
p_flow_thread_args_t *p_flow_thread_args;
snaplen = 100;
snaplen = 1500;
do_daemonize = 0;
launcher_pid = 0;
device = NULL;
@ -1466,7 +1454,6 @@ p_flow_thread_args_t *p_flow_thread_args;
// Init the extension map list
if ( !InitExtensionMapList(fs) ) {
// error message goes to syslog
pcap_close(pcap_dev->handle);
exit(255);
}

View File

@ -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 */

Binary file not shown.

View File

@ -1,6 +1,5 @@
/*
* Copyright (c) 2014, Peter Haag
* Copyright (c) 2009, Peter Haag
* Copyright (c) 2009 - 2018, Peter Haag
* Copyright (c) 2004 - 2008, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
* All rights reserved.
*
@ -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 ) {
@ -363,7 +357,6 @@ profile_param_info_t **list = &profile_list;
profile_list = NULL;
while ( ( fgets(line, 512, stdin) != NULL )) {
LogInfo("Process line '%s'\n", line);
line[511] = '\0';
if ( *list == NULL )
@ -387,6 +380,7 @@ profile_param_info_t **list = &profile_list;
// <profilegroup>#<profilename>#<profiletype>#<channelname>#<channel_sourcelist>
p = strchr(line, '\n');
if ( p ) *p = '\0';
LogInfo("Process line '%s'\n", line);
q = line;
p = strchr(q, '#');
@ -527,18 +521,16 @@ int main( int argc, char **argv ) {
unsigned int num_channels, compress;
struct stat stat_buf;
profile_param_info_t *profile_list;
char *rfile, *ffile, *filename, *Mdirs, *tstring;
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;
tstring = NULL;
profile_datadir = NULL;
profile_statdir = NULL;
Mdirs = NULL;
tslot = 0;
syntax_only = 0;
do_xstat = 0;
compress = NOT_COMPRESSED;
subdir_index = 0;
profile_list = NULL;
@ -552,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]);
@ -567,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);
@ -604,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);
@ -669,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 ) {
@ -694,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);

View File

@ -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;

View File

@ -1,4 +1,5 @@
/*
* 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
@ -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: nfreplay.c 39 2009-11-25 08:11:15Z haag $
*
* $LastChangedRevision: 39 $
*
*/
#include "config.h"
@ -67,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"
@ -114,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);
@ -138,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);
@ -209,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
@ -412,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(&currentTime, 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(&currentTime, 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);
@ -443,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;
@ -463,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]);
@ -529,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;
@ -616,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);

View File

@ -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: nfstat.c 69 2010-09-09 07:17:43Z haag $
*
* $LastChangedRevision: 69 $
*
*/
#include "config.h"
@ -58,7 +53,6 @@
#include "nffile.h"
#include "nfx.h"
#include "bookkeeper.h"
#include "nfxstat.h"
#include "collector.h"
#include "exporter.h"
#include "nfnet.h"
@ -377,7 +371,7 @@ struct StatParameter_s {
};
enum CntIndices { FLOWS = 0, INPACKETS, INBYTES, OUTPACKETS, OUTBYTES };
enum FlowDir { IN = 0, OUT };
enum FlowDir { IN = 0, OUT, INOUT };
#define MaxStats 16
struct StatRequest_s {
@ -395,12 +389,21 @@ typedef uint64_t (*order_proc_record_t)(FlowTableRecord_t *, int);
typedef uint64_t (*order_proc_element_t)(StatRecord_t *, int);
/* order functions */
static inline uint64_t null_record(FlowTableRecord_t *record, int inout);
static inline uint64_t flows_record(FlowTableRecord_t *record, int inout);
static inline uint64_t packets_record(FlowTableRecord_t *record, int inout);
static inline uint64_t bytes_record(FlowTableRecord_t *record, int inout);
static inline uint64_t pps_record(FlowTableRecord_t *record, int inout);
static inline uint64_t bps_record(FlowTableRecord_t *record, int inout);
static inline uint64_t bpp_record(FlowTableRecord_t *record, int inout);
static inline uint64_t tstart_record(FlowTableRecord_t *record, int inout);
static inline uint64_t tend_record(FlowTableRecord_t *record, int inout);
// static inline uint64_t clat_record(FlowTableRecord_t *record, int inout);
static inline uint64_t null_element(StatRecord_t *record, int inout);
static inline uint64_t flows_element(StatRecord_t *record, int inout);
static inline uint64_t packets_element(StatRecord_t *record, int inout);
static inline uint64_t bytes_element(StatRecord_t *record, int inout);
static inline uint64_t pps_element(StatRecord_t *record, int inout);
static inline uint64_t bps_element(StatRecord_t *record, int inout);
static inline uint64_t bpp_element(StatRecord_t *record, int inout);
@ -409,36 +412,37 @@ static inline uint64_t bpp_element(StatRecord_t *record, int inout);
#define DESCENDING 0
struct order_mode_s {
char *string; // Stat name
int cindex; // Which counter to use - corresponds to CntIndices
int inout; // use IN or OUT packets/bytes
int inout; // use IN or OUT or INOUT packets/bytes
int direction; // ascending or descending
order_proc_record_t record_function; // Function to call for record stats
order_proc_element_t element_function; // Function to call for element stats
} order_mode[] = {
{ "-", 0, 0, 0, NULL, NULL}, // empty entry 0
{ "flows", FLOWS, IN, DESCENDING, NULL, NULL},
{ "packets", INPACKETS, IN, DESCENDING, NULL, NULL},
{ "ipkg", INPACKETS, IN, DESCENDING, NULL, NULL},
{ "opkg", OUTPACKETS, OUT, DESCENDING, NULL, NULL},
{ "bytes", INBYTES, IN, DESCENDING, NULL, NULL},
{ "ibyte", INBYTES, IN, DESCENDING, NULL, NULL},
{ "obyte", INBYTES, OUT, DESCENDING, NULL, NULL},
{ "pps", INPACKETS, IN, DESCENDING, pps_record, pps_element},
{ "ipps", INPACKETS, IN, DESCENDING, pps_record, pps_element},
{ "opps", INPACKETS, OUT, DESCENDING, pps_record, pps_element},
{ "bps", INBYTES, IN, DESCENDING, bps_record, bps_element},
{ "ibps", INBYTES, IN, DESCENDING, bps_record, bps_element},
{ "obps", INBYTES, OUT, DESCENDING, bps_record, bps_element},
{ "bpp", 0, IN, DESCENDING, bpp_record, bpp_element},
{ "ibpp", 0, IN, DESCENDING, bpp_record, bpp_element},
{ "obpp", 0, OUT, DESCENDING, bpp_record, bpp_element},
{ "tstart", 0, 0, ASCENDING, tstart_record, NULL},
{ "tend", 0, 0, ASCENDING, tend_record, NULL},
{ NULL, 0, 0, 0, NULL}
{ "-", 0, 0, null_record, null_element}, // empty entry 0
{ "flows", IN, DESCENDING, flows_record, flows_element},
{ "packets", INOUT, DESCENDING, packets_record, packets_element},
{ "ipkg", IN, DESCENDING, packets_record, packets_element},
{ "opkg", OUT, DESCENDING, packets_record, packets_element},
{ "bytes", INOUT, DESCENDING, bytes_record, bytes_element},
{ "ibyte", IN, DESCENDING, bytes_record, bytes_element},
{ "obyte", OUT, DESCENDING, bytes_record, bytes_element},
{ "pps", INOUT, DESCENDING, pps_record, pps_element},
{ "ipps", IN, DESCENDING, pps_record, pps_element},
{ "opps", OUT, DESCENDING, pps_record, pps_element},
{ "bps", INOUT, DESCENDING, bps_record, bps_element},
{ "ibps", IN, DESCENDING, bps_record, bps_element},
{ "obps", OUT, DESCENDING, bps_record, bps_element},
{ "bpp", INOUT, DESCENDING, bpp_record, bpp_element},
{ "ibpp", IN, DESCENDING, bpp_record, bpp_element},
{ "obpp", OUT, DESCENDING, bpp_record, bpp_element},
{ "tstart", 0, ASCENDING, tstart_record, null_element},
{ "tend", 0, ASCENDING, tend_record, null_element},
// { "clat", 0, DESCENDING, clat_record, null_element},
{ NULL, 0, 0, NULL, NULL}
};
#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;
@ -459,7 +463,7 @@ static inline void PrintSortedFlowcache(SortElement_t *SortList, uint32_t maxind
static void PrintStatLine(stat_record_t *stat, uint32_t plain_numbers, StatRecord_t *StatData, int type, int order_proto, int tag, int inout);
static void PrintPipeStatLine(StatRecord_t *StatData, int type, int order_proto, int tag);
static void PrintPipeStatLine(StatRecord_t *StatData, int type, int order_proto, int tag, int inout);
static void PrintCvsStatLine(stat_record_t *stat, StatRecord_t *StatData, int type, int order_proto, int tag, int inout);
@ -481,43 +485,78 @@ static int initialised = 0;
#include "heapsort_inline.c"
#include "applybits_inline.c"
static uint64_t null_record(FlowTableRecord_t *record, int inout) {
return 0;
}
static uint64_t flows_record(FlowTableRecord_t *record, int inout) {
return record->counter[FLOWS];
}
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)
return record->counter[OUTPACKETS];
else
return record->counter[INPACKETS] + record->counter[OUTPACKETS];
}
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)
return record->counter[OUTBYTES];
else
return record->counter[INBYTES] + record->counter[OUTBYTES];
}
static uint64_t pps_record(FlowTableRecord_t *record, int inout) {
uint64_t duration;
int index = inout == OUT ? OUTPACKETS : INPACKETS;
uint64_t packets;
/* duration in msec */
duration = 1000LL*(uint64_t)(record->flowrecord.last - record->flowrecord.first) + (uint64_t)record->flowrecord.msec_last - (uint64_t)record->flowrecord.msec_first;
if ( duration == 0 )
return 0;
else
return ( 1000LL * (uint64_t)record->counter[index] ) / duration;
else {
packets = packets_record(record, inout);
return ( 1000LL * packets ) / duration;
}
} // End of pps_record
static uint64_t bps_record(FlowTableRecord_t *record, int inout) {
uint64_t duration;
int index = inout == OUT ? OUTBYTES : INBYTES;
uint64_t bytes;
duration = 1000LL*(uint64_t)(record->flowrecord.last - record->flowrecord.first) + (uint64_t)record->flowrecord.msec_last - (uint64_t)record->flowrecord.msec_first;
if ( duration == 0 )
return 0;
else
return ( 8000LL * (uint64_t)record->counter[index] ) / duration; /* 8 bits per Octet - x 1000 for msec */
else {
bytes = bytes_record(record, inout);
return ( 8000LL * bytes ) / duration; /* 8 bits per Octet - x 1000 for msec */
}
} // End of bps_record
static uint64_t bpp_record(FlowTableRecord_t *record, int inout) {
int index_packets, index_bytes;
uint64_t packets = packets_record(record, inout);
uint64_t bytes = bytes_record(record, inout);
if ( inout == OUT ) {
index_packets = OUTPACKETS;
index_bytes = OUTBYTES;
} else {
index_packets = INPACKETS;
index_bytes = INBYTES;
}
return record->counter[index_packets] ? record->counter[index_bytes] / record->counter[index_packets] : 0;
return packets ? bytes / packets : 0;
} // End of bpp_record
@ -525,51 +564,74 @@ static uint64_t tstart_record(FlowTableRecord_t *record, int inout) {
return 1000LL * record->flowrecord.first + record->flowrecord.msec_first;
} // End of bpp_record
} // End of tstart_record
static uint64_t tend_record(FlowTableRecord_t *record, int inout) {
return 1000LL * record->flowrecord.last + record->flowrecord.msec_last;
} // End of bpp_record
} // End of tend_record
static uint64_t null_element(StatRecord_t *record, int inout) {
return 0;
}
static uint64_t flows_element(StatRecord_t *record, int inout) {
return record->counter[FLOWS];
}
static uint64_t packets_element(StatRecord_t *record, int inout) {
if (inout == IN)
return record->counter[INPACKETS];
else if (inout == OUT)
return record->counter[OUTPACKETS];
else
return record->counter[INPACKETS] + record->counter[OUTPACKETS];
}
static uint64_t bytes_element(StatRecord_t *record, int inout) {
if (inout == IN)
return record->counter[INBYTES];
else if (inout == OUT)
return record->counter[OUTBYTES];
else
return record->counter[INBYTES] + record->counter[OUTBYTES];
}
static uint64_t pps_element(StatRecord_t *record, int inout) {
uint64_t duration;
int index = inout == OUT ? OUTPACKETS : INPACKETS;
uint64_t packets;
/* duration in msec */
duration = 1000LL*(uint64_t)(record->last - record->first) + (uint64_t)record->msec_last - (uint64_t)record->msec_first;
if ( duration == 0 )
return 0;
else
return ( 1000LL * (uint64_t)record->counter[index] ) / duration;
else {
packets = packets_element(record, inout);
return ( 1000LL * packets ) / duration;
}
} // End of pps_element
static uint64_t bps_element(StatRecord_t *record, int inout) {
uint64_t duration;
int index = inout == OUT ? OUTBYTES : INBYTES;
uint64_t bytes;
duration = 1000LL*(uint64_t)(record->last - record->first) + (uint64_t)record->msec_last - (uint64_t)record->msec_first;
if ( duration == 0 )
return 0;
else
return ( 8000LL * (uint64_t)record->counter[index] ) / duration; /* 8 bits per Octet - x 1000 for msec */
else {
bytes = bytes_element(record, inout);
return ( 8000LL * bytes ) / duration; /* 8 bits per Octet - x 1000 for msec */
}
} // End of bps_element
static uint64_t bpp_element(StatRecord_t *record, int inout) {
int index_packets, index_bytes;
uint64_t packets = packets_element(record, inout);
uint64_t bytes = bytes_element(record, inout);
if ( inout == OUT ) {
index_packets = OUTPACKETS;
index_bytes = OUTBYTES;
} else {
index_packets = INPACKETS;
index_bytes = INBYTES;
}
return record->counter[index_packets] ? record->counter[index_bytes] / record->counter[index_packets] : 0;
return packets ? bytes / packets : 0;
} // End of bpp_element
@ -1062,15 +1124,13 @@ int j, i;
static void PrintStatLine(stat_record_t *stat, uint32_t plain_numbers, StatRecord_t *StatData, int type, int order_proto, int tag, int inout) {
char proto[16], valstr[40], datestr[64];
char flows_str[NUMBER_STRING_SIZE], in_byte_str[NUMBER_STRING_SIZE], in_packets_str[NUMBER_STRING_SIZE];
char out_byte_str[NUMBER_STRING_SIZE], out_packets_str[NUMBER_STRING_SIZE];
char in_pps_str[NUMBER_STRING_SIZE], in_bps_str[NUMBER_STRING_SIZE];
char out_pps_str[NUMBER_STRING_SIZE], out_bps_str[NUMBER_STRING_SIZE];
char flows_str[NUMBER_STRING_SIZE], byte_str[NUMBER_STRING_SIZE], packets_str[NUMBER_STRING_SIZE];
char pps_str[NUMBER_STRING_SIZE], bps_str[NUMBER_STRING_SIZE];
char tag_string[2];
double duration, flows_percent, in_packets_percent, in_bytes_percent;
double out_packets_percent, out_bytes_percent;
uint32_t in_bpp, out_bpp;
uint64_t in_pps, in_bps, out_pps, out_bps;
uint64_t count_flows, count_packets, count_bytes;
double duration, flows_percent, packets_percent, bytes_percent;
uint32_t bpp;
uint64_t pps, bps;
int scale;
time_t first;
struct tm *tbuff;
@ -1086,9 +1146,10 @@ struct tm *tbuff;
case IS_IPADDR:
tag_string[0] = tag ? TAG_CHAR : '\0';
if ( (StatData->record_flags & 0x1) != 0 ) { // IPv6
StatData->stat_key[0] = htonll(StatData->stat_key[0]);
StatData->stat_key[1] = htonll(StatData->stat_key[1]);
inet_ntop(AF_INET6, StatData->stat_key, valstr, sizeof(valstr));
uint64_t _key[2];
_key[0] = htonll(StatData->stat_key[0]);
_key[1] = htonll(StatData->stat_key[1]);
inet_ntop(AF_INET6, _key, valstr, sizeof(valstr));
if ( ! Getv6Mode() )
condense_v6(valstr);
@ -1146,58 +1207,44 @@ struct tm *tbuff;
valstr[39] = 0;
scale = plain_numbers == 0;
format_number(StatData->counter[FLOWS], flows_str, scale, FIXED_WIDTH);
format_number(StatData->counter[INPACKETS], in_packets_str, scale, FIXED_WIDTH);
format_number(StatData->counter[INBYTES], in_byte_str, scale, FIXED_WIDTH);
format_number(StatData->counter[OUTPACKETS], out_packets_str, scale, FIXED_WIDTH);
format_number(StatData->counter[OUTBYTES], out_byte_str, scale, FIXED_WIDTH);
count_flows = StatData->counter[FLOWS];
count_packets = packets_element(StatData, inout);
count_bytes = bytes_element(StatData, inout);
format_number(count_flows, flows_str, scale, FIXED_WIDTH);
format_number(count_packets, packets_str, scale, FIXED_WIDTH);
format_number(count_bytes, byte_str, scale, FIXED_WIDTH);
flows_percent = stat->numflows ? (double)(StatData->counter[FLOWS] * 100 ) / (double)stat->numflows : 0;
flows_percent = stat->numflows ? (double)(count_flows * 100 ) / (double)stat->numflows : 0;
if ( stat->numpackets ) {
in_packets_percent = (double)(StatData->counter[INPACKETS] * 100 ) / (double)stat->numpackets;
out_packets_percent = (double)(StatData->counter[OUTPACKETS] * 100 ) / (double)stat->numpackets;
packets_percent = (double)(count_packets * 100 ) / (double)stat->numpackets;
} else {
in_packets_percent = 0;
out_packets_percent = 0;
packets_percent = 0;
}
if ( stat->numbytes ) {
in_bytes_percent = (double)(StatData->counter[INBYTES] * 100 ) / (double)stat->numbytes;
out_bytes_percent = (double)(StatData->counter[OUTBYTES] * 100 ) / (double)stat->numbytes;
bytes_percent = (double)(count_bytes * 100 ) / (double)stat->numbytes;
} else {
in_bytes_percent = 0;
out_bytes_percent = 0;
bytes_percent = 0;
}
duration = StatData->last - StatData->first;
duration += ((double)StatData->msec_last - (double)StatData->msec_first) / 1000.0;
if ( duration != 0 ) {
in_pps = (uint64_t)((double)StatData->counter[INPACKETS] / duration);
in_bps = (uint64_t)((double)(8 * StatData->counter[INBYTES]) / duration);
out_pps = (uint64_t)((double)StatData->counter[OUTPACKETS] / duration);
out_bps = (uint64_t)((double)(8 * StatData->counter[OUTBYTES]) / duration);
pps = (uint64_t)((double)count_packets / duration);
bps = (uint64_t)((double)(8 * count_bytes) / duration);
} else {
in_pps = in_bps = 0;
out_pps = out_bps = 0;
pps = bps = 0;
}
if (StatData->counter[INPACKETS]) {
in_bpp = StatData->counter[INBYTES] / StatData->counter[INPACKETS];
if (count_packets) {
bpp = count_bytes / count_packets;
} else {
in_bpp = 0;
}
if (StatData->counter[OUTPACKETS]) {
out_bpp = StatData->counter[OUTBYTES] / StatData->counter[OUTPACKETS];
} else {
out_bpp = 0;
bpp = 0;
}
format_number(in_pps, in_pps_str, scale, FIXED_WIDTH);
format_number(in_bps, in_bps_str, scale, FIXED_WIDTH);
format_number(out_pps, out_pps_str, scale, VAR_LENGTH);
format_number(out_bps, out_bps_str, scale, VAR_LENGTH);
format_number(pps, pps_str, scale, FIXED_WIDTH);
format_number(bps, bps_str, scale, FIXED_WIDTH);
first = StatData->first;
tbuff = localtime(&first);
@ -1217,66 +1264,58 @@ struct tm *tbuff;
if ( Getv6Mode() && ( type == IS_IPADDR ) )
printf("%s.%03u %9.3f %s %s%39s %8s(%4.1f) %8s(%4.1f) %8s(%4.1f) %8s %8s %5u\n",
datestr, StatData->msec_first, duration, proto, tag_string, valstr,
flows_str, flows_percent, in_packets_str, in_packets_percent, in_byte_str,
in_bytes_percent, in_pps_str, in_bps_str, in_bpp );
flows_str, flows_percent, packets_str, packets_percent, byte_str,
bytes_percent, pps_str, bps_str, bpp );
else {
if ( inout == OUT )
printf("%s.%03u %9.3f %s %s%17s %8s(%4.1f) %8s(%4.1f) %8s(%4.1f) %8s %8s %5u\n",
datestr, StatData->msec_first, duration, proto, tag_string, valstr,
flows_str, flows_percent, out_packets_str, out_packets_percent, out_byte_str,
out_bytes_percent, out_pps_str, out_bps_str, out_bpp );
else
printf("%s.%03u %9.3f %s %s%17s %8s(%4.1f) %8s(%4.1f) %8s(%4.1f) %8s %8s %5u\n",
datestr, StatData->msec_first, duration, proto, tag_string, valstr,
flows_str, flows_percent, in_packets_str, in_packets_percent, in_byte_str,
in_bytes_percent, in_pps_str, in_bps_str, in_bpp );
/*
printf("%s.%03u %9.3f %s %s%17s %8s(%4.1f) %8s(%4.1f)/%s(%4.1f) %8s(%4.1f)/%-8s(%4.1f) %8s/%-8s %8s/%-8s %5u/%-5u\n",
datestr, StatData->msec_first, duration, proto, tag_string, valstr,
flows_str, flows_percent, in_packets_str, in_packets_percent,
out_packets_str, out_packets_percent, in_byte_str, in_bytes_percent,
out_byte_str, out_bytes_percent, in_pps_str, out_pps_str,
in_bps_str, out_bps_str, in_bpp, out_bpp );
*/
flows_str, flows_percent, packets_str, packets_percent, byte_str,
bytes_percent, pps_str, bps_str, bpp );
}
} // End of PrintStatLine
static void PrintPipeStatLine(StatRecord_t *StatData, int type, int order_proto, int tag) {
static void PrintPipeStatLine(StatRecord_t *StatData, int type, int order_proto, int tag, int inout) {
double duration;
uint64_t count_flows, count_packets, count_bytes, _key[2];
uint32_t pps, bps, bpp;
uint32_t sa[4];
int af;
sa[0] = sa[1] = sa[2] = sa[3] = 0;
af = AF_UNSPEC;
_key[0] = StatData->stat_key[0];
_key[1] = StatData->stat_key[1];
if ( type == IS_IPADDR ) {
if ( (StatData->record_flags & 0x1) != 0 ) { // IPv6
StatData->stat_key[0] = htonll(StatData->stat_key[0]);
StatData->stat_key[1] = htonll(StatData->stat_key[1]);
_key[0] = htonll(StatData->stat_key[0]);
_key[1] = htonll(StatData->stat_key[1]);
af = PF_INET6;
} else { // IPv4
af = PF_INET;
}
// Make sure Endian does not screw us up
sa[0] = ( StatData->stat_key[0] >> 32 ) & 0xffffffffLL;
sa[1] = StatData->stat_key[0] & 0xffffffffLL;
sa[2] = ( StatData->stat_key[1] >> 32 ) & 0xffffffffLL;
sa[3] = StatData->stat_key[1] & 0xffffffffLL;
sa[0] = ( _key[0] >> 32 ) & 0xffffffffLL;
sa[1] = _key[0] & 0xffffffffLL;
sa[2] = ( _key[1] >> 32 ) & 0xffffffffLL;
sa[3] = _key[1] & 0xffffffffLL;
}
duration = StatData->last - StatData->first;
duration += ((double)StatData->msec_last - (double)StatData->msec_first) / 1000.0;
count_flows = flows_element(StatData, inout);
count_packets = packets_element(StatData, inout);
count_bytes = bytes_element(StatData, inout);
if ( duration != 0 ) {
pps = (uint32_t)((double)StatData->counter[INPACKETS] / duration);
bps = (uint32_t)((double)(8 * StatData->counter[INBYTES]) / duration);
pps = (uint32_t)((double)count_packets / duration);
bps = (uint32_t)((double)(8 * count_bytes) / duration);
} else {
pps = bps = 0;
}
if ( StatData->counter[INPACKETS] )
bpp = StatData->counter[INBYTES] / StatData->counter[INPACKETS];
if ( count_packets )
bpp = count_bytes / count_packets;
else
bpp = 0;
@ -1287,24 +1326,24 @@ int af;
if ( type == IS_IPADDR )
printf("%i|%u|%u|%u|%u|%u|%u|%u|%u|%u|%llu|%llu|%llu|%u|%u|%u\n",
af, StatData->first, StatData->msec_first ,StatData->last, StatData->msec_last, StatData->prot,
sa[0], sa[1], sa[2], sa[3], (long long unsigned)StatData->counter[FLOWS],
(long long unsigned)StatData->counter[INPACKETS], (long long unsigned)StatData->counter[INBYTES],
sa[0], sa[1], sa[2], sa[3], (long long unsigned)count_flows,
(long long unsigned)count_packets, (long long unsigned)count_bytes,
pps, bps, bpp);
else
printf("%i|%u|%u|%u|%u|%u|%llu|%llu|%llu|%llu|%u|%u|%u\n",
af, StatData->first, StatData->msec_first ,StatData->last, StatData->msec_last, StatData->prot,
(long long unsigned)StatData->stat_key[1], (long long unsigned)StatData->counter[FLOWS],
(long long unsigned)StatData->counter[INPACKETS], (long long unsigned)StatData->counter[INBYTES],
(long long unsigned)_key[1], (long long unsigned)count_flows,
(long long unsigned)count_packets, (long long unsigned)count_bytes,
pps, bps, bpp);
} // End of PrintPipeStatLine
static void PrintCvsStatLine(stat_record_t *stat, StatRecord_t *StatData, int type, int order_proto, int tag, int inout) {
char proto[16], valstr[40], datestr1[64], datestr2[64];
double duration, flows_percent, in_packets_percent, in_bytes_percent;
double out_packets_percent, out_bytes_percent;
uint32_t i, in_bpp, out_bpp;
uint64_t in_pps, in_bps, out_pps, out_bps;
uint64_t count_flows, count_packets, count_bytes;
double duration, flows_percent, packets_percent, bytes_percent;
uint32_t i, bpp;
uint64_t pps, bps;
time_t when;
struct tm *tbuff;
@ -1316,9 +1355,10 @@ struct tm *tbuff;
break;
case IS_IPADDR:
if ( (StatData->record_flags & 0x1) != 0 ) { // IPv6
StatData->stat_key[0] = htonll(StatData->stat_key[0]);
StatData->stat_key[1] = htonll(StatData->stat_key[1]);
inet_ntop(AF_INET6, StatData->stat_key, valstr, sizeof(valstr));
uint64_t _key[2];
_key[0] = htonll(StatData->stat_key[0]);
_key[1] = htonll(StatData->stat_key[1]);
inet_ntop(AF_INET6, _key, valstr, sizeof(valstr));
} else { // IPv4
uint32_t ipv4;
@ -1345,35 +1385,28 @@ struct tm *tbuff;
valstr[39] = 0;
flows_percent = (double)(StatData->counter[FLOWS] * 100 ) / (double)stat->numflows;
in_packets_percent = (double)(StatData->counter[INPACKETS] * 100 ) / (double)stat->numpackets;
in_bytes_percent = (double)(StatData->counter[INBYTES] * 100 ) / (double)stat->numbytes;
out_packets_percent = (double)(StatData->counter[OUTPACKETS] * 100 ) / (double)stat->numpackets;
out_bytes_percent = (double)(StatData->counter[OUTBYTES] * 100 ) / (double)stat->numbytes;
count_flows = StatData->counter[FLOWS];
count_packets = packets_element(StatData, inout);
count_bytes = bytes_element(StatData, inout);
flows_percent = stat->numflows ? (double)(count_flows * 100 ) / (double)stat->numflows : 0;
packets_percent = stat->numpackets ? (double)(count_packets * 100 ) / (double)stat->numpackets : 0;
bytes_percent = stat->numbytes ? (double)(count_bytes * 100 ) / (double)stat->numbytes : 0;
duration = StatData->last - StatData->first;
duration += ((double)StatData->msec_last - (double)StatData->msec_first) / 1000.0;
if ( duration != 0 ) {
in_pps = (uint32_t)((double)StatData->counter[INPACKETS] / duration);
in_bps = (uint32_t)((double)(8 * StatData->counter[INBYTES]) / duration);
out_pps = (uint32_t)((double)StatData->counter[OUTPACKETS] / duration);
out_bps = (uint32_t)((double)(8 * StatData->counter[OUTBYTES]) / duration);
pps = (uint64_t)((double)count_packets / duration);
bps = (uint64_t)((double)(8 * count_bytes) / duration);
} else {
in_pps = in_bps = 0;
out_pps = out_bps = 0;
pps = bps = 0;
}
if (StatData->counter[INPACKETS]) {
in_bpp = StatData->counter[INBYTES] / StatData->counter[INPACKETS];
if (count_packets) {
bpp = count_bytes / count_packets;
} else {
in_bpp = 0;
}
if (StatData->counter[OUTPACKETS]) {
out_bpp = StatData->counter[OUTBYTES] / StatData->counter[OUTPACKETS];
} else {
out_bpp = 0;
bpp = 0;
}
when = StatData->first;
@ -1406,38 +1439,33 @@ struct tm *tbuff;
i++;
}
if ( inout == OUT )
printf("%s,%s,%.3f,%s,%s,%llu,%.1f,%llu,%.1f,%llu,%.1f,%llu,%llu,%u\n",
datestr1, datestr2, duration, proto, valstr,
(long long unsigned)StatData->counter[FLOWS], flows_percent,
(long long unsigned)StatData->counter[OUTPACKETS], out_packets_percent,
(long long unsigned)StatData->counter[OUTBYTES], out_bytes_percent,
(long long unsigned)out_pps,(long long unsigned)out_bps,out_bpp);
else
printf("%s,%s,%.3f,%s,%s,%llu,%.1f,%llu,%.1f,%llu,%.1f,%llu,%llu,%u\n",
datestr1, datestr2, duration, proto, valstr,
(long long unsigned)StatData->counter[FLOWS], flows_percent,
(long long unsigned)StatData->counter[INPACKETS], in_packets_percent,
(long long unsigned)StatData->counter[INBYTES], in_bytes_percent,
(long long unsigned)in_pps,(long long unsigned)in_bps,in_bpp);
(long long unsigned)count_flows, flows_percent,
(long long unsigned)count_packets, packets_percent,
(long long unsigned)count_bytes, bytes_percent,
(long long unsigned)pps,(long long unsigned)bps,bpp);
} // 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;
master_record_t *aggr_record_mask;
SortElement_t *SortList;
uint64_t value;
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 ) {
@ -1455,26 +1483,23 @@ char *string;
while ( r ) {
// we want to sort only those flows which pass the packet or byte limits
if ( byte_limit ) {
if (( byte_mode == LESS && r->counter[INBYTES] >= byte_limit ) ||
( byte_mode == MORE && r->counter[INBYTES] <= byte_limit ) ) {
value = bytes_record(r, order_mode[PrintOrder].inout);
if (( byte_mode == LESS && value >= byte_limit ) ||
( byte_mode == MORE && value <= byte_limit ) ) {
r = r->next;
continue;
}
}
if ( packet_limit ) {
if (( packet_mode == LESS && r->counter[INPACKETS] >= packet_limit ) ||
( packet_mode == MORE && r->counter[INPACKETS] <= packet_limit ) ) {
value = packets_record(r, order_mode[PrintOrder].inout);
if (( packet_mode == LESS && value >= packet_limit ) ||
( packet_mode == MORE && value <= packet_limit ) ) {
r = r->next;
continue;
}
}
if ( order_mode[PrintOrder].record_function ) {
SortList[c].count = order_mode[PrintOrder].record_function(r, order_mode[PrintOrder].inout);
} else {
int cindex = order_mode[PrintOrder].cindex;
SortList[c].count = r->counter[cindex];
}
SortList[c].record = (void *)r;
c++;
r = r->next;
@ -1504,15 +1529,17 @@ char *string;
// we want to print only those flows which pass the packet or byte limits
if ( byte_limit ) {
if (( byte_mode == LESS && r->counter[INBYTES] >= byte_limit ) ||
( byte_mode == MORE && r->counter[INBYTES] <= byte_limit ) ) {
value = bytes_record(r, order_mode[PrintOrder].inout);
if (( byte_mode == LESS && value >= byte_limit ) ||
( byte_mode == MORE && value <= byte_limit ) ) {
r = r->next;
continue;
}
}
if ( packet_limit ) {
if (( packet_mode == LESS && r->counter[INPACKETS] >= packet_limit ) ||
( packet_mode == MORE && r->counter[INPACKETS] <= packet_limit ) ) {
value = packets_record(r, order_mode[PrintOrder].inout);
if (( packet_mode == LESS && value >= packet_limit ) ||
( packet_mode == MORE && value <= packet_limit ) ) {
r = r->next;
continue;
}
@ -1531,16 +1558,16 @@ 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 ) {
ApplyAggrMask(flow_record, aggr_record_mask);
}
if ( GuessDir && ( flow_record->srcport < 1024 && flow_record->dstport > 1024 ) )
if ( GuessDir && ( flow_record->srcport < flow_record->dstport ) )
SwapFlow(flow_record);
print_record((void *)flow_record, &string, tag);
printf("%s\n", string);
@ -1558,6 +1585,7 @@ hash_FlowTable *FlowTable;
FlowTableRecord_t *r;
SortElement_t *SortList;
unsigned int order_index, i;
uint64_t value;
uint32_t maxindex, c;
FlowTable = GetFlowTable();
@ -1589,15 +1617,17 @@ uint32_t maxindex, c;
while ( r ) {
// we want to sort only those flows which pass the packet or byte limits
if ( byte_limit ) {
if (( byte_mode == LESS && r->counter[INBYTES] >= byte_limit ) ||
( byte_mode == MORE && r->counter[INBYTES] <= byte_limit ) ) {
value = bytes_record(r, order_mode[order_index].inout);
if (( byte_mode == LESS && value >= byte_limit ) ||
( byte_mode == MORE && value <= byte_limit ) ) {
r = r->next;
continue;
}
}
if ( packet_limit ) {
if (( packet_mode == LESS && r->counter[INPACKETS] >= packet_limit ) ||
( packet_mode == MORE && r->counter[INPACKETS] <= packet_limit ) ) {
value = packets_record(r, order_mode[order_index].inout);
if (( packet_mode == LESS && value >= packet_limit ) ||
( packet_mode == MORE && value <= packet_limit ) ) {
r = r->next;
continue;
}
@ -1605,12 +1635,7 @@ uint32_t maxindex, c;
// As we touch each flow in the list here, fill in the values for the first requested stat
// often, no more than one stat is requested anyway. This saves time
if ( order_mode[order_index].record_function ) {
SortList[c].count = order_mode[order_index].record_function(r, order_mode[order_index].inout);
} else {
int cindex = order_mode[order_index].cindex;
SortList[c].count = r->counter[cindex];
}
SortList[c].record = (void *)r;
c++;
r = r->next;
@ -1647,12 +1672,7 @@ uint32_t maxindex, c;
/* if we have some different sort orders, which are not directly available in the FlowTableRecord_t
* we need to calculate this value first - such as bpp, bps etc.
*/
if ( order_mode[order_index].record_function ) {
SortList[i].count = order_mode[order_index].record_function(r, order_mode[order_index].inout);
} else {
int cindex = order_mode[order_index].cindex;
SortList[i].count = r->counter[cindex];
}
}
if ( maxindex >= 2 )
@ -1664,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);
@ -1713,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 ) {
@ -1730,7 +1750,7 @@ int i, max;
} else if ( aggr_record_mask )
ApplyAggrMask(flow_record, aggr_record_mask);
if ( GuessFlowDirection && ( flow_record->srcport < 1024 && flow_record->dstport > 1024 ) )
if ( GuessFlowDirection && ( flow_record->srcport < flow_record->dstport ) )
SwapFlow(flow_record);
print_record((void *)flow_record, &string, tag);
@ -1773,10 +1793,12 @@ int32_t i, j, hash_num, order_index;
}
if ( cvs_output ) {
if ( order_mode[order_index].inout == OUT )
printf("ts,te,td,pr,val,fl,flP,opkt,opktP,obyt,obytP,opps,opbs,obpp\n");
if ( order_mode[order_index].inout == IN )
printf("ts,te,td,pr,val,fl,flP,ipkt,ipktP,ibyt,ibytP,ipps,ibps,ibpp\n");
else if ( order_mode[order_index].inout == OUT )
printf("ts,te,td,pr,val,fl,flP,opkt,opktP,obyt,obytP,opps,obps,obpp\n");
else
printf("ts,te,td,pr,val,fl,flP,ipkt,ipktP,ibyt,ibytP,ipps,ipbs,ibpp\n");
printf("ts,te,td,pr,val,fl,flP,pkt,pktP,byt,bytP,pps,bps,bpp\n");
}
j = numflows - topN;
@ -1787,10 +1809,10 @@ int32_t i, j, hash_num, order_index;
//if ( !topN_element_list[i].count )
//break;
// Again - ugly output formating - needs to be cleand up
// Again - ugly output formating - needs to be cleaned up
if ( pipe_output )
PrintPipeStatLine((StatRecord_t *)topN_element_list[i].record, type,
StatRequest[hash_num].order_proto, tag);
StatRequest[hash_num].order_proto, tag, order_mode[order_index].inout);
else if ( cvs_output )
PrintCvsStatLine(sum_stat, (StatRecord_t *)topN_element_list[i].record, type,
StatRequest[hash_num].order_proto, tag, order_mode[order_index].inout);
@ -1809,6 +1831,7 @@ static SortElement_t *StatTopN(int topN, uint32_t *count, int hash_num, int orde
SortElement_t *topN_list;
StatRecord_t *r;
unsigned int i;
uint64_t value;
uint32_t c, maxindex;
maxindex = ( StatTable[hash_num].NextBlock * StatTable[hash_num].Prealloc ) + StatTable[hash_num].NextElem;
@ -1830,27 +1853,23 @@ uint32_t c, maxindex;
// we want to sort only those flows which pass the packet or byte limits
if ( byte_limit ) {
if (( byte_mode == LESS && r->counter[INBYTES] >= byte_limit ) ||
( byte_mode == MORE && r->counter[INBYTES] <= byte_limit ) ) {
value = bytes_element(r, order_mode[order].inout);
if (( byte_mode == LESS && value >= byte_limit ) ||
( byte_mode == MORE && value <= byte_limit ) ) {
r = r->next;
continue;
}
}
if ( packet_limit ) {
if (( packet_mode == LESS && r->counter[INPACKETS] >= packet_limit ) ||
( packet_mode == MORE && r->counter[INPACKETS] <= packet_limit ) ) {
value = packets_element(r, order_mode[order].inout);
if (( packet_mode == LESS && value >= packet_limit ) ||
( packet_mode == MORE && value <= packet_limit ) ) {
r = r->next;
continue;
}
}
if ( order_mode[order].element_function ) {
topN_list[c].count = order_mode[order].element_function(r, order_mode[order].inout);
} else {
int cindex = order_mode[order].cindex;
topN_list[c].count = r->counter[cindex];
}
topN_list[c].record = (void *)r;
r = r->next;
c++;
@ -1883,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;
@ -1911,3 +1930,4 @@ uint32_t _tmp;
flow_record->out_bytes = _tmp_l;
} // End of SwapFlow

View File

@ -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: nfstat.h 39 2009-11-25 08:11:15Z haag $
*
* $LastChangedRevision: 39 $
*
*/
#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 */

View File

@ -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,15 +29,11 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Author: haag $
*
* $Id: nfstatfile.c 39 2009-11-25 08:11:15Z haag $
*
* $LastChangedRevision: 39 $
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
@ -55,6 +52,7 @@
#include <stdint.h>
#endif
#include "util.h"
#include "nfstatfile.h"
#define stat_filename ".nfstat"
@ -95,13 +93,6 @@ static const double _1hour = 3600.0;
static const double _1day = 86400.0;
static const double _1week = 604800.0;
/*
* expire.c is needed for daemon code as well as normal stdio code
* therefore a generic LogError is defined, which maps to the
* approriate logging channel - either stderr or syslog
*/
void LogError(char *format, ...);
static inline uint64_t string2uint64(char *s);
static int ParseString(char *str, char **key, char **value);

View File

@ -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;

View File

@ -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);

View File

@ -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;

Some files were not shown because too many files have changed in this diff Show More