summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-07-13pcap_io: Use iterator variable of correct typeTobias Klauser1-1/+1
array_size() returns size_t, thus make i size_t too to avoid a warning regarding comparison of signed/unsigned. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-07-13make: put newline after Git peopleDaniel Borkmann1-1/+1
Place a newline after GIT_PEOPLE in the mail announcement target. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-13build: use git describe --alwaysDaniel Borkmann1-1/+1
Use git describe --always in the Makefile instead of git describe as it can fail otherwise. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-13pcap_mm: Mark unused parameters with __maybe_unusedTobias Klauser1-3/+3
In order to avoid compiler warnings when compiling with -W/-Wunused-parameter, mark unused function parameters with __maybe_unused. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-07-13tprintf: Fix compiler warningsTobias Klauser1-5/+5
Fix the following warning when compiling with -W/-Wsign-compare/-Wunused-parameter: tprintf.c: In function ‘__tprintf_flush_skip’: tprintf.c:54:65: warning: unused parameter ‘max’ [-Wunused-parameter] tprintf.c: In function ‘__tprintf_flush’: tprintf.c:70:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] tprintf.c:76:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] tprintf.c:80:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] tprintf.c: In function ‘tprintf’: tprintf.c:131:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-07-13oui-update.py: oui: minor config updatesDaniel Borkmann1-0/+7
There have been minor updates after letting the script run. Some are spelling fixes, some modified entries. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-13trafgen: switch for skipping cpu time statistics on exitDaniel Borkmann2-3/+11
For systems with >8 CPUs it might be i) annoying or ii) uninteresting to print CPU time statistics. So introduce a switch that can skip this at exit. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-13sparse: netsniff-ng, trafgen: fix remaining time(0) warningsDaniel Borkmann2-3/+3
Those are the last occurences of warnings like: netsniff-ng.c:697:48: warning: Using plain integer as NULL pointer netsniff-ng.c:726:48: warning: Using plain integer as NULL pointer ... Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-13dissector: Mark unused parameters with __maybe_unusedTobias Klauser3-9/+9
In order to avoid compiler warnings when compiling with -W/-Wunused-parameter, mark unused function parameters with __maybe_unused. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-07-13trafgen: setup_shared_var: fix reamaindersDaniel Borkmann1-4/+3
Commit bf9232fb6 ("trafgen: setup_shared_var: fix couple of things") forgot to amend the remaining changes in 'len' usage. So lets fix them right now. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-13proto_80211_mac_hdr: fix sparse warningDaniel Borkmann1-2/+2
This patch fixes the followingf sparse warning: proto_80211_mac_hdr.c:3389:24: warning: Using plain integer as NULL pointer Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-13trafgen: sparse: make seed staticDaniel Borkmann1-4/+4
sparse reported that the variable seed can be made static: trafgen.c:110:14: warning: symbol 'seed' was not declared. Should it be static? While at it, also rename a local variable 'seed' to not overlap contexts. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-13bpf: Use iterator variable of correct typeTobias Klauser1-1/+1
array_size() returns size_t, thus make i size_t too to avoid a warning regarding comparison of signed/unsigned. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-07-13trafgen: setup_shared_var: fix couple of thingsDaniel Borkmann1-5/+6
1) Fix a couple of sparse warnings: trafgen.c:382:27: error: cannot size expression trafgen.c:391:33: error: cannot size expression trafgen.c:393:33: error: cannot size expression trafgen.c:401:25: error: cannot size expression 2) Use MAP_FAILED instead of (void *) -1 3) No need to cast to void * on mmap(2) 4) Use NULL instead of 0 as mmap(2)'s first argument Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-13ring_rx: fix format string sparse warningDaniel Borkmann1-1/+1
Found by sparse: ring_rx.c:155:44: warning: Unknown escape '%' Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-13ifpps: Remove unused parameter to term_csv()Tobias Klauser1-3/+2
term_csv() doesn't use the ifname and ms_interval parameters, they're only used in term_csv_header(). Thus remove them from term_csv(). This fixes a warning when compiling with -W/-Wunused-parameter. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-07-13ifpps: Use unsigned int to store number of CPUsTobias Klauser1-3/+4
Since get_number_cpus() now returns unsigned int store it's return value and derived values in unsigned int variables as well. This fixes the some warnings when compiling with -W/-Wsign-compare: Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-07-13misc: fix multiple NULL pointer sparse warningsDaniel Borkmann4-5/+5
Those are fixes for the following warnings: pcap_mm.c:119:29: warning: Using plain integer as NULL pointer pcap_mm.c:141:29: warning: Using plain integer as NULL pointer ring.c:24:31: warning: Using plain integer as NULL pointer flowtop.c:1114:22: warning: Using plain integer as NULL pointer ifpps.c:1133:29: warning: Using plain integer as NULL pointer Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-13dissector_eth: sparse: fix sparse warningDaniel Borkmann1-1/+1
This fixes the following sparse warnings: dissector_eth.c:43:16: warning: Using plain integer as NULL pointer dissector_eth.c:48:16: warning: Using plain integer as NULL pointer dissector_eth.c:53:16: warning: Using plain integer as NULL pointer Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-13ifpps: help: reduce option description to one lineDaniel Borkmann1-2/+1
Make this conform to trafgen/netsniff-ng and reduce it to 1 line description. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-13ifpps: release stats on exitDaniel Borkmann1-0/+20
The stack trace of valgrind --leak-check=full --show-reachable=yes ifpps \ -lpcd wlan0 showed that at exit members from stats are still reachable. They have been alloced through stats_alloc, but not freed. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-13ifpps: warn when 1Gbit/s and interval < 1secDaniel Borkmann1-2/+6
It is possible to use a interval even of 0, although it would not really make sense. It's not a bug either, so throw a warning to the user in that case on 1Gbit/s. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-13ifpps: Correct calculation of median values for CPU loadTobias Klauser1-10/+11
ifpps always reported the same values for median as for average in the CPU load fields (usr, sys, idle, iowait). This is of course incorrect. The bug was due to 3 sub-problems: - Summing up long double values (m_cpu_*) in an uint64_t (all) - Not using %Lf (for long double) in mvwprintw() - Explicitely use floating point division in MEDIAN_EVEN Fix the bug by summing up in a separate accumulator of type long double, use the correct format string for long double and divide by 2.0 in MEDIAN_EVEN to force the result to be (long) double. Reported-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-07-12ifpps: Consistently list command line optionsTobias Klauser2-10/+10
Instead of (more or less) arbitrarily listing the command line options, sort them according to the following rule: - options with required argument, alphabetically by short option - options without argument, alphabetically by short option - common options -v/--version and -h/--help Do this in the short options string, the long options struct, the in-program usage and the man page. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-07-12ifpps: median: add whitespace padding in one occurenceDaniel Borkmann1-2/+2
Add whitespace padding in one occurence of 'med:' output. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-12gitignore: add config.log file to git ignoreDaniel Borkmann1-0/+1
Ignore the config.log file in Git as this is automatically generated. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-12ifpps: Update usage with respect to median valuesTobias Klauser1-0/+1
This was missing in commit 971b1d95 ("ifpps: Optionally display median values for CPU load and interrupts"). Update the usage to reflect the changes too. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-07-12ifpps: Optionally display median values for CPU load and interruptsTobias Klauser2-2/+97
Using the -m/--median command line option, median values across all CPUs are displayed for CPU load, interrupts per interval, sw interrupts per interval and absolute number of interrupts. Also update the manpage accordingly. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-07-12bpf_comp: pass NEED_TCPDUMP_LIKE_FILTER through gccDaniel Borkmann3-5/+1
We have to pass NEED_TCPDUMP_LIKE_FILTER define through gcc as it otherwise is not possible to let the pcap compiler invoke through netsniff-ng, but not through astraceroute. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-12configure: fix wrong whitespacingDaniel Borkmann1-2/+2
Not sure how this came in with the last commit, but fix it to the correct format. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-12configure: redirect all compile output to our local config.logDaniel Borkmann1-24/+24
On errors in the configuration, redirect everything to config.log, and not some parts to config.log and some others to $TMPDIR/config.log. This will give a nice summary of what goes wrong to the user. Also, in case everything looks fine, the config.log file will be created, but with size 0 and no warning is thrown. So looks good. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-12configure: do not use bash's expr matchDaniel Borkmann1-6/+6
It looks like there are some incompatibilities in bash's expr match among different versions. Using set -x, gives us on bash 4.2.45: + TOOLS=' netsniff-ng trafgen ifpps bpfc' + for tool in '$_tools' + case "$tool" in ++ expr match '"curvetun' 'astraceroute"' '$1' expr: syntax error + m= + '[' '' == 0 ']' So rather avoid using "expr match" and switch to "case" for substring matching, which should be more portable. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-12configure: fix libnetfilter_conntrack dependency removalDaniel Borkmann1-1/+1
tools_remove "libnetfilter-conntrack" makes no sense, so replace it with the actual correct tools_remove "flowtop". Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-11configure: Redirect pkg-config errors to log fileTobias Klauser2-6/+14
If pkg-config doesn't find a library it prints an error to stderr. Instead of directly printing them as part of the configure output, redirect them to config.log and let the user know about it in case there are any messages. Suggested-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-07-11ifpps: align avg on systems with >8 CPUsDaniel Borkmann1-5/+8
When running ifpps on systems with 16, 32 or more CPUs, 'avg:...' field is not being padded with witespaces as the rest of the CPU lines. This patch does that. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-11ifpps: warn about increase -t when high speedDaniel Borkmann2-8/+32
Collecting device statistics on high speed every second can be very costly, so warn about this in ncurses mode. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-11ifpps: show machine type only if not in already release nameDaniel Borkmann1-3/+9
In Fedora or RHEL/CentOS releases the machine type is already part of the package name, so show it only, if it does not appear there. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-11ifpps: show kernel version and machine typeDaniel Borkmann1-2/+6
Lets make the headline output a bit more useful and show the current kernel version and well as the machine/hardware type. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-11link: allow future ethtool speed formats to be supportedDaniel Borkmann1-11/+2
In case some in the near future NICs with 40Gbit/s will appear. Allow ifpps to get the correct ethtool speed. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-11ifpps: make '+' to '-' sort more clearDaniel Borkmann1-15/+14
If will now look like the following: cpu6 +: 237357 irqs cpu2 |: 117538 irqs cpu0 |: 8419 irqs cpu7 |: 4523 irqs cpu5 |: 4312 irqs cpu1 -: 1432 irqs avg: 47606.8 This makes it a bit more precise/intuitive that we sort from max to min. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-11ifpps: align avg numbers and remove unitDaniel Borkmann1-8/+8
In order to get a better overview, lets align the avg numbers to the other shown decimals. However, for this we would need to remove the avg units as we deal with floats here. But we know the units from the above numbers anyway. I think this makes it more clear to follow. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-11ifpps: align string to format stringDaniel Borkmann1-12/+12
Just a whitespace fix to align the strings to the fmt string. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-11man: ifpps: emphasize gnuplot output formatDaniel Borkmann1-0/+3
As this is useful for a couple of people, emphasize this in ifpps' manpage as well. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-11dissector: rename __WITH_PROTOS into HAVE_DISSECTOR_PROTOSDaniel Borkmann6-11/+10
To be more consistent with config.h, rename __WITH_PROTOS into HAVE_DISSECTOR_PROTOS. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-11build: refactor tool specific flags into <tool>/MakefileDaniel Borkmann9-9/+28
To get the normal Makefile a bit cleaner, push the tool specific build options into <tool>/Makefile. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-11build: for an -rc release exclude curvetun for nowDaniel Borkmann1-2/+8
As curvetun needs to undergo some major cleanups, we exclude it from the main build process for the moment until we have fixed all of it in a non-rc release. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-11curvetun: give short note in version infoDaniel Borkmann1-0/+1
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-11configure, netsniff-ng: if no libgeopip, do not link against libzDaniel Borkmann3-7/+22
In netsniff-ng, we only use libz in combination with libgeoip, so if we lack either one of them, do not link against the other either. This would be a waste otherwise. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-11netsniff-ng: fix recognition of -U command line optionDaniel Borkmann1-1/+1
"-U" has been forgotten to add into shortopts. "--update" works as expeceted however. So simply add "U". Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-11configure, netsniff-ng: make netsniff-ng's geoip dependency optionalDaniel Borkmann3-4/+101
Geoip dependency should not be mandatory as it's not a core part of netsniff-ng. This also facilitates compilation on platforms where geoip is not available. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>