summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-04-06man: man page updates for bpfc, curvetunDaniel Borkmann2-0/+317
These are the writings so far. For sure they are not yet finished, so I will push updates for both of them as soon as possible, but for now this is a first version people can start to read. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-04-06netsniff-ng: also capture if NIC is currently downDaniel Borkmann1-5/+0
There is actually no reason why netsniff-ng should fail if the NIC is down at startup. We still can setup everything and already capture at the time it goes up. This might be useful when replugging cables on servers, for instance. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-04-05man: add ifpps.8 man pageDaniel Borkmann1-0/+99
Finally I found some time and started writing man pages. This is a first one in a series of man pages for all tools. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-30make: also credit involved people in mail messageDaniel Borkmann1-0/+4
Still untested, since we did not yet tag a release, but for now, also credit all involved people in a particular release. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-30make: when mrproper, also remove Git tree unrelated filesDaniel Borkmann1-0/+2
When we really clean up everything, also remove crap files that do not belong to the Git tree. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-28ring: purge timer before we unmap tx ring buffersDaniel Borkmann5-4/+44
If we unmap TX ring buffers and still have timer shots that trigger the kernel to traverse the TX_RING, it can send out random crap in some situations. Prevent this by destroying the timer and flush the TX_RING first in wait mode. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-27trafgen: parser: do not enforce whitesapceDaniel Borkmann1-3/+3
Do not enforce whitespace at the beginning or end of a packet configuration, there's no reason to do so. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-27trafgen: lexer: return if no needle foundDaniel Borkmann1-4/+5
Also return if no needle has been found in the shell code haystack. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-26trafgen: update help descriptionDaniel Borkmann2-1/+2
After commit f9591eebe40c (trafgen: lexer/parser: fix cpu() selection and whitespacing), we also need to fixup the help description, so that users start using the cpu(X-Y) notation instead. Also, reintroduce the alias csum16 for csumip. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-25trafgen: parser: add possibility for negative numbersDaniel Borkmann1-0/+2
The previous commit reduced it, so now we allow it within cX() containers in order to negate a result, if someone needs that. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-25trafgen: lexer/parser: fix cpu() selection and whitespacingDaniel Borkmann2-4/+14
It looks unintuitive when once needs to write cpu(0:3), so also allow cpu(0-3). Then it's quite stupid to enforce whitespace after the double colon before the curley braces open. So make this rather optional here. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-22trafgen: fix bug in packet schedulingDaniel Borkmann1-16/+22
When having a config like cpu(1): {...}, and one runs it with -n1, trafgen behaves buggy, I also noted that in other situations. Fix this by letting the loop also return on CPU state RES, and do not perform this stupid magic in the main routine. So far it seems to work now after some basic tests I did. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-19ring: first unmap, then destroy ring bufferDaniel Borkmann2-8/+6
In both, the RX_RING and TX_RING we need to unmap first and then destroy the buffer, otherwise, we get a device or resource busy. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-19bpfc: filter: add poff ancillary operationDaniel Borkmann3-1/+14
In preparation for [1], add the #poff operation, so that users can dynamically truncate packets on the payload start offset. This is useful for several reasons: privacy, speed, ... Example for bpfc: ld #poff ret a [1] http://thread.gmane.org/gmane.linux.network/262512 Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-19curvetun: Only close() file descriptor if openTobias Klauser1-3/+3
Only attempt to close the file descriptor in error cases where it is actually open. This was discovered by the coverity scanner. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-03-19flowtop: Omit return value in flow_entry_get_sain{4,6}_obj()Tobias Klauser1-10/+6
The return value is never used by the callers, so we don't need to return anything. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-03-17nacl scripts: include common header and rename build_nacl.shDaniel Borkmann5-15/+24
Add a uniform header comment to the two scripts as present in other scripts in this repository as well. Also rename build_nacl.sh into nacl_build.sh to stay conform in naming. For this, also update all mentions of build_nacl.sh to nacl_build.sh. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16dissector_fuzz: minor: add header file descriptionDaniel Borkmann1-2/+13
Add a missing header file description as present in other scripts, for example. Also credit Stefan for his help. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16trafgen: add csumicmp for ICMP checksum calculationDaniel Borkmann1-0/+2
Both, the IP and ICMP checksums use the same algorithm from RFC1071. Thus, it's enough if we give csumip an alias to csumicmp, so that it can be used in trafgen packet configurations. It's calculated from the ICMP header + data, with value 0 for this field. Suggested-by: Jon Schipp <jonschipp@gmail.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16bpfc: support different output formatsDaniel Borkmann2-22/+80
Add different bpf opcode pretty printer to support a variety of output formats for netsniff-ng, xt_bpf, tcpdump, C-like and make future integration of formats easier. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16docs: AUTHORS: add Peter Stuge for his commitDaniel Borkmann1-0/+1
Since we list all authors for their contributions in the AUTHORS, add Peter Stuge for his improvement on the build system. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16build: respect PREFIX_STRING on config file locationsDaniel Borkmann5-12/+14
When setting a prefix from the build system, also pass this through the hard coded strings for config file locations in the toolkit, so that the installed files (which use PREFIX) can be properly found. Suggested-by: Peter Stuge <peter@stuge.se> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16ring: don't care if we cannot active hw timestampingDaniel Borkmann1-13/+8
Hw timestaming is currently done, if we have the header file from the kernel available. If it fails, we currently bail out, which is bullshit. Just returning is enough, since some users might have the header available, but not a NIC supporting hw timestaming. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16ifpps: remove state from enum, since never usedDaniel Borkmann1-2/+1
We do not assign or use this particular state, so just remove it from the enum. We continue anyway in the while loop in that case. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16hash: simplify code and fix whitespacingDaniel Borkmann1-4/+30
Make whitespacing more uniform to coding conventions and also simplify some fubar if + xfree combinations by using free only. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16misc: remove dead/unreachable code from switch statementsDaniel Borkmann3-6/+0
Remove various unreachable sections from the switch statements. This was detected by the coverty scanner. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16flowtop: rcu: omit rcu_assign_pointerDaniel Borkmann1-4/+3
If the new pointer is NULL anyway, this results in a constant expression during compile time (NULL != NULL) where a barrier is left out. Thus, it will have no different effect using rcu_assign_pointer() than assigning it directly. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16xutils: check various return valuesDaniel Borkmann1-14/+35
Check various setsockopt return values and exit accordingly if some of them just fuck up. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16ring: check return value of setsockoptDaniel Borkmann2-4/+14
If something screws up, which is rather unlikely, but if it happens, let the user know. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16netsniff-ng: if we cannot get intermediate pcap statistics, panicDaniel Borkmann1-1/+5
Before we do calculations on statistics, check if we really got them. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16netsniff-ng trafgen: check return value of pull_and_flush_ringDaniel Borkmann2-2/+24
Let us check the return value when the timer triggers a TX flush request to the kernel. However, ignore the case of BADFS and NOBUFS. The socket could already have been closed before the timer triggers in the first case, and in the second, we just let the next timer continue processing if currently the buffer space is exhausted. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16astraceroute: fix getnameinfo argumentsDaniel Borkmann1-4/+4
Coverty detected a misuse of the getnameinfo API, thus, we need to fix the length parameter. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16flowtop: close dir handle first before returning backDaniel Borkmann1-0/+1
Coverty detected that the variable "dir" going out of scope leaks the storage it points to. Thus close the handle first! Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16geoip: reorder statements, so that file handles are closed firstDaniel Borkmann1-4/+3
Coverty detected, when we are in an error condition, we do not close file handles, but just return instead. Thus, reorder statements, so that file handles are closed for sure. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16netsniff-ng: do not leak file descriptors on exitDaniel Borkmann1-9/+6
Covertiy detected that when we redirect sdtin/stdout either via ``-i -'' or ``-o -'', we also need to properly close it when it goes out of scope. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16geoip: make sure we null-terminate after readDaniel Borkmann1-0/+2
Make sure raw is null-terminated after we read the buffer that we receive from the remote end. Detected by coverty scan. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16docs: update git mirror urlsDaniel Borkmann1-2/+2
Some of the official Git mirror URLs were deprecated, so update them. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-15build: minor: do announcement before taggingDaniel Borkmann1-1/+1
Do the announcement before the tagging is done, since we read out the last tag in creating the shortlog. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-15build: get latest release tag via git-describeDaniel Borkmann1-1/+1
To automatically create the shortlog for the .MAIL_MSG, we use git shortlog. However, we do not want to include old stuff, so let only commits pass that were between the previous release and now. (Untested for now, since there is no futher tag.) Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-15docs: add initial workflow documentDaniel Borkmann1-0/+64
Trying to document the workflow that comes along with using this Git repository. Further ideas, additions to this document are welcome to create a unified frame for all maintainers, developers and (advanced) users. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-15build: add make release targetDaniel Borkmann2-1/+23
It is useful to have as much as possible scripted, to be less error-prone and to have a uniform and simple workflow. Therefore, make the tagging, tarball and mail message in a uniform way. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-15build: Find libncurses by using pkg-configDaniel Borkmann3-2/+4
Call pkg-config --cflags and pkg-config --libs to find correct CFLAGS and LDFLAGS respectively. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-15netsniff-ng trafgen: Find libnl-3.0 and libnl-genl-3.0 using pkg-configPeter Stuge3-6/+6
Call pkg-config --cflags and pkg-config --libs to find correct CFLAGS and LDFLAGS respectively. Signed-off-by: Peter Stuge <peter@stuge.se> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-15all: import netsniff-ng 0.5.8-rc0 sourceDaniel Borkmann137-0/+50669
We decided to get rid of the old Git history and start a new one for several reasons: *) Allow / enforce only high-quality commits (which was not the case for many commits in the history), have a policy that is more close to the one from the Linux kernel. With high quality commits, we mean code that is logically split into commits and commit messages that are signed-off and have a proper subject and message body. We do not allow automatic Github merges anymore, since they are total bullshit. However, we will either cherry-pick your patches or pull them manually. *) The old archive was about ~27MB for no particular good reason. This basically derived from the bad decision that also some PDF files where stored there. From this moment onwards, no binary objects are allowed to be stored in this repository anymore. The old archive is not wiped away from the Internet. You will still be able to find it, e.g. on git.cryptoism.org etc. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>