Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
The parameter `name' to tun_open_or_die() is never modified
inside the function, thus mark it as const.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
The parameter `ifname' to device_up_and_running() is never modified
inside the function, thus mark it as const.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Make the call to `head' equivalent to the one to `tail'.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Improve the build system, so that configuration files are installed
per tool basis. Also, introduce post_install targets, so that config
files can be altered in some way, e.g. done by trafgen. Moreover,
move custom targets from Extra to tool-specific Makefiles.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Several of the tools install/uninstall files from $NCONF_FILES,
however if we call the uninstall target for a specific tool (e.g. `make
astraceroute_uninstall') but other tools depending on one or more of the
config files are still installed, the file is still removed
unconditionally. As it would require quite some logic in the Makefile
in order to detect installed tools and their dependencies, we just don't
uninstall the configuration files anymore.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Bring the announce message in line with the latest released announce
message from rc1. So that in future this can be generated automatically.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Fix them up so that a proper changelog can be generated automatically.
Also while at it, add two "hidden" targets that can be used to test
their output.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
We need to add a 'v' prefix to the actual version for the tag name.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
We have recently changed VERSION_STRING to append CONFIG_RC at the
end of the string. Thus, for the build system, change it to
VERSION_SHORT where needed, e.g. in release targets where the "+"
appendix is not wished.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
In all the tools' man pages the synopsis line is indented by one space
with respect to the text in the sections above and below. Remove the
space to have consistent alignment.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Fix the following compiler warnings that occur when building with "-W
-Wall -Wextra":
flowtop.c: In function ‘walk_process’:
flowtop.c:417:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
flowtop.c: In function ‘presenter_screen_update’:
flowtop.c:937:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
flowtop.c:938:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
The environment variables $NACL_INC_DIR/$NACL_LIB_DIR might not always
be set, but the configure script will attempt to detect an existing NaCl
installation if they aren't. Thus use the
$CONFIG_NACL_INC_DIR/$CONFIG_NACL_LIB_DIR variables as emitted by the
configure script for the build.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Minor addition that notes the use of short hand commands.
Signed-off-by: Jon Schipp <jonschipp@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Change Cisco-like short form commands to long form ones for easier readability.
Signed-off-by: Jon Schipp <jonschipp@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Just a minor whitespace alignment, nothing else.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
For each build that has no tag name (thus for all commits except
releases), we add a "+" version appendix to indicate that it is
further than the rc tag itself, like in the kernel. Do this during
configure automatically. This is useful in case someone wants to
package a relase, so that the full version name indicates that.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Split the build system into smaller manageable pieces, grouped by
context. In that sense, we can keep the most important information
within the Makefile itself, and group out misc bits and pieces that
we just include into it. E.g. 'Cmds' contains all defined commands
that we call from other locations, 'Template' contains the generic
build template for all tools, 'Extra' has pieces that need special
treatment for the tools to build and 'Misc' contains help and release
code. This makes it more manageable on the long run. While at it, I
also simplified some code and removed all Wflags expect "-Wall" as
we want to convert into "-Wall -Wextra -W" anyway.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Lets just move it instead of symlink as there is no concrete need
for it.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
101-103 do not have official link types and seem to be non-portable.
Just add them so that we can replay pcap's of such types as well.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Some 3.x kernel versions seem not to ship yet the definition of
ARPHRD_IEEE802154_MONITOR. Add it into built_in.h to let the
tools build.
Reported-by: Pablo Henrique <phenrique@gmail.com>
Reported-by: Tobias Kalbitz <tobias.kalbitz@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
This silences a complaint if the toolkit is not built within a Git
repository:
...
[*] Checking libnet ... [YES]
fatal: Not a git repository (or any of the parent directories): .git
[*] Generating config.h ...
[*] Looks good! All tools will be built!
This is not problematic as the build can be done without any problems.
It will just have an empty Git id in --version output. So simply
silence this complaint and move on.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Fix the following compiler warnings that occur when building with "-W -Wall":
pcap_sg.c: In function ‘__pcap_sg_inter_iov_hdr_read’:
pcap_sg.c:46:89: warning: unused parameter ‘type’ [-Wunused-parameter]
pcap_sg.c:47:19: warning: unused parameter ‘packet’ [-Wunused-parameter]
pcap_sg.c:47:34: warning: unused parameter ‘len’ [-Wunused-parameter]
pcap_sg.c: In function ‘__pcap_sg_inter_iov_data_read’:
pcap_sg.c:77:78: warning: unused parameter ‘len’ [-Wunused-parameter]
pcap_sg.c: In function ‘pcap_sg_prepare_access’:
pcap_sg.c:163:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
pcap_sg.c: In function ‘pcap_sg_prepare_close’:
pcap_sg.c:184:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
pcap_sg.c:180:39: warning: unused parameter ‘fd’ [-Wunused-parameter]
pcap_sg.c:180:58: warning: unused parameter ‘mode’ [-Wunused-parameter]
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
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>
|
|
array_size() returns size_t, thus make iterator variables comparing
against it size_t too to avoid a warning regarding comparison of
signed/unsigned.
Also cast some ssize_t variables passed to min() for the same reason.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
This should be ``numeric'' instead of ``nemeric''.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Add -C option to zsh support.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Add -m and -W options to zsh support.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
The sll parameter is not used anywhere in the function, so remove it.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
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>
|
|
Place a newline after GIT_PEOPLE in the mail announcement target.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Use git describe --always in the Makefile instead of git describe
as it can fail otherwise.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Found by sparse:
ring_rx.c:155:44: warning: Unknown escape '%'
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Make this conform to trafgen/netsniff-ng and reduce it to 1 line
description.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|