summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-11-18trafgen: don't bother about device going down, just continue sendingDaniel Borkmann1-2/+2
If we loose carrier, don't bother about panic'ing, but continue sending! Only exit in case we're doing a smoke test. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-10-15trafgen: set interpacket gap in time units (s/ms/us/ns)Jon Schipp3-21/+51
Add ability to set IGP in time units in seconds, milliseconds, microseconds, and nanoseconds by appending a postfix to --gap e.g. --gap 100ms. Also, update the man page and trafgen.zsh to reflect the changes. [Fix whitespaces, coding style and minor wording changes -- tklauser] Signed-off-by: Jon Schipp <jonschipp@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-10-11bpfc: alias xt_bpf to tcDaniel Borkmann1-2/+3
Alias output format for tc/xt_bpf. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-10-10netsniff-ng: Don't modify optarg/argvTobias Klauser1-2/+0
We shouldn't modify optarg (and thus argv) since it's e.g. used to display the commandline string in `ps'. Since strtoul() reads until it encounters the first non-numeric character and ignores the rest, we can just revert from setting a NULL byte after the numeric part of the string. Reported-by: Jon Schipp <jonschipp@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-10-10netsniff-ng: Use strtoul() instead of strtol() for unsigned longTobias Klauser1-4/+4
If setting an unsigned long variable, use strtoul() instead of strtol(). Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-10-07build: Create GPG signatures as part of release targetTobias Klauser2-1/+10
Create detached ASCII format GPG signatures for the to be released tarballs. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-10-07netsniff-ng 0.5.8-rc4v0.5.8-rc4Tobias Klauser1-1/+1
Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-10-02ifpps: Simplify logic wrt. omit_header in term_main()Tobias Klauser1-6/+3
We can reuse the omit_header variable to get rid of the existing variable 'first', which was used to make sure the header gets only printed once at the beginning. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-10-02ifpps: Mark omit_header parameter to screen_main() as unusedTobias Klauser1-1/+1
Otherwise we get a warning when compiling with "-W -Wall". Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-10-02ifpps: min: minor: Keep options sorted alphabeticallyTobias Klauser2-6/+6
Keep the options sorted alphabetically, argument options first. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-10-02ifpps: zsh: Add -o optionTobias Klauser1-0/+1
Add the -o/--omit-header option to ZSH autocompletion. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-10-02netsniff-ng: modify mmap option in usage to be grammatically correctJon Schipp1-1/+1
Incorrect usage of "i.e." leads one to believe that replaying is possible only. Signed-off-by: Jon Schipp <jonschipp@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-10-02ifpps: man: grammar and typo editsJon Schipp1-3/+3
Removed, word "be", which was seen twice and removed unnecessary comma. Signed-off-by: Jon Schipp <jonschipp@gmail.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-10-02ifpps: man: document new option to omit CSV headerJon Schipp1-0/+3
Manual page entry for option -c|--omit-header. Signed-off-by: Jon Schipp <jonschipp@gmail.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-10-02ifpps: add option that omits CSV headerJon Schipp1-6/+16
Adds option -o|--omit-header which does not print the CSV header e.g. when the user does not need it. Signed-off-by: Jon Schipp <jonschipp@gmail.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-09-30netsniff-ng: Display pcap I/O method in verbose modeTobias Klauser2-3/+6
If a user accidentially specifies more than one of --mm/--sg/--clrw, the option specified last will be used - as expected from standard command line tools. In order to still prevent users from being confused by this, explicitely display the pcap I/O method used in verbose mode. In order for the output to be more user-friendly, actually write out the method names in const char *pcap_ops_group_to_str, which isn't used anywhere else anyway. Suggested-by: Jon Schipp <jonschipp@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-09-23trafgen: remove inner loopDaniel Borkmann1-31/+31
Get rid of inner loop in fast path. This simplifies code and readability. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-09-19doc: readme: give note about what tools are still experimentalDaniel Borkmann1-2/+5
We still have to get curvetun and mausezahn in line with the rest of the landscape, as they are not ready and in a quality we wish they would be. Therefore, mark and document them as experiemental for now until they are fixed up. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-09-19doc: authors: moved Tobias one upDaniel Borkmann1-1/+1
Nothing changes in that regard, Tobias and myself are both maintaining and continue to do so on one and the same level. Tobias does an awesome job, so this should be credited to him right here! Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-09-12trafgen: combine likely conditionsDaniel Borkmann1-2/+2
Combine multiple likely conditions into one. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-09-09ifpps: correct calculation of line rate percentageTobias Klauser1-2/+2
The line rate is given in Mbit rather than MiB (in which {rx,tx}_bytes were converted). Correct the calculation by converting {rx,tx}_bytes to Mbit: (n bytes * 8 bits per byte) / 1000^2 = (n bytes) / 125000 Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-09-06bpfc: add gnu as style %-register prefixDaniel Borkmann3-3/+71
Let a and x register also be addressed as %x and %a. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-09-05ifpps: zsh: add -P optionDaniel Borkmann1-0/+1
Add an entry for autocompletion support. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-09-05ifpps: man: add -P optionDaniel Borkmann1-0/+3
Add a man page entry for the new -P option. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-09-05ifpps: make display of line rate percentage optionalTobias Klauser1-4/+11
In order to not to clutter the display too much, make the display of the percentage of the theoretical line rate dependent on a command line option. Suggested-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-09-04ifpps: show percentage of theoretical line-rateTobias Klauser1-0/+17
Also show the percentage of the (theoretical) line rate, not just the current rate. Suggested-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-09-04ifpps: Reuse device bitrate for screen_header()Tobias Klauser1-3/+2
Instead of issuing another call to device_bitrate(), reuse the the value acquired in screen_update() and pass it to screen_header(). Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-09-03bpf: ldi,ldxi: allow for '#' prefix in numbersDaniel Borkmann1-2/+6
For consistency, allow for '#' prefix in numbers, which we currently do not do. So keep old mode as compatibility to not break current programs, and add new one with '#' prefix. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-09-02netsniff-ng: Remove unnecessary fmemset() of struct statTobias Klauser1-1/+0
The struct stat is filled by the call to stat(2) in the next line, so there is no need to explicitely set it to 0 before. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-09-01man: netsniff-ng: add note about netsniffJon Schipp1-0/+4
Add a note to the man-page that there's a other tool that is unrelated to netsniff-ng. Signed-off-by: Jon Schipp <jonschipp@gmail.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-08-30netsniff-ng: Simplify dump file creation logicTobias Klauser1-9/+5
Instead of using goto, just check stats if stat() returned 0 and used ctx->dump_dir afterwards. This makes the logic a bit easier to follow. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-08-30ifpps: Skip reading IRQ number from /proc/interruptsTobias Klauser1-7/+5
We don't use the IRQ number we read from /proc/interrupts, so just skip it while reading. This also allows us to drop the irq_nr member from struct ifstat. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-08-29ifpps: Don't bug out if interface went downTobias Klauser1-2/+5
In case the interface ifpps is running on went down, ifpps bugged out because the stats didn't look plausible anymore, due to the IRQ count being reset: ifpps: ifpps.c:563: stats_diff: Assertion `!((new->irqs[i] - old->irqs[i]) > (new->irqs[i]))' failed Fix this by setting the difference to 0 in this case. ifpps will thus display a irqs/t value of 0 instead of bugging out. This fixes #74. Reported-by: Jon Schipp <jonschipp@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-08-29ifpps: Use unsigned int to store number of cpusTobias Klauser1-23/+24
The number of CPUs can never be negative and get_number_cpus() returns unsigned int too, so consistently conver all variables holding a CPU number or number of CPUs to type unsigned int. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-08-23conf: oui: update oui.confTobias Klauser1-131/+325
Update OUI entries using oui-update.py Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-08-23oui-update: minor: Fix typo in error messageTobias Klauser1-1/+1
s/Eror/Error/ Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-08-21build: announcement: also add v prefix to checkout commandDaniel Borkmann1-1/+1
We also need to add a v prefix for the version tag to the checkout command, as similarly done for the GPG verification. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-08-21netsniff-ng 0.5.8-rc3v0.5.8-rc3Tobias Klauser1-1/+1
Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-08-21ring_{rx,tx}: verbose: output version and v3 specific infoDaniel Borkmann2-4/+10
Kevin says: With netsniff-ng 0.5.8-rc2+, when I run the below packet capture session, the output seems to imply that 64K of memory is being allocated per frame, which does not look like what I want since my interface MTU is only 1500. This appears to be severely limiting the number of frames I can fit into my packet capture ring. As TPACKET_V3 is used in capturing to pcap files, frames are written continuously to the ring, thus the above will give a wrong impression to the user. Therefore, output such information in verbose mode differently when TPACKET_V3 is being used, as it works block-wise. Reported-by: Kevin Branch <branchnetconsulting@gmail.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-08-21build: minor: Mention proper versioned tag in release announcementTobias Klauser1-1/+1
The tags created by the 'release' target have a 'v' prefix, so add it to the verification command mentioned in the generated release message. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-08-21configure: minor: Rephrase and reformat some messagesTobias Klauser1-12/+11
Make sure all messages use a max. text width of 70 characters (in order for them to be easily pasteable into an email), remove a trailing whitespace and reword some bits. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-08-21astraceroute: zsh: add auto-completion entryDaniel Borkmann1-0/+1
Add an auto-completion entry for commit 5e739 ("astraceroute: Support binding to a specific IP address.") Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Cc: Oliver Smith <oliver@zerolag.com>
2013-08-21astraceroute: Support binding to a specific IP address.Oliver Smith2-4/+32
In a situation where the IP that you wish to use as the source address differs from the interface it needs to be sent from, it is now possible to manually specify an address to bind to whilst still being able to specify the physical interface to send from. [Fixed up whitespace, minor coding style and added man-page entry --DB] Signed-off-by: Oliver Smith <oliver@zerolag.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-08-20configure: allow trafgen build when only TPACKET_V2 is availableDaniel Borkmann2-0/+17
On machines like RHEL6 that do not have support for TPACKET_V3, we should still allow at least trafgen to be built for network testing. Thus, do something useful with the TPACKET_V3 configure check and comment out in ring.h relevant structures. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-08-19netsniff-ng: poll: don't panic on EINTRDaniel Borkmann1-4/+8
When signal occurs, don't panic on EINTR, rather gracefully return. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-08-13ifpps: minor: Add parentheses to do {} while in padding_from_num()Tobias Klauser1-2/+3
Even though the loop contains only one statement, add parentheses around it to make it more readable. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-08-12build: Add Makefile target for Coverity scannerTobias Klauser3-0/+24
Add a Makefile target to build and upload a snapshot of netsniff-ng to the Coverity scanner. The variables COV_EMAIL and COV_PASSWD need to be set accordingly: make coverity COV_EMAIL=tklauser@distanz.ch COV_PASSWD=... Currently the sub-make which is part of the cov-built call issues warnings about undefined variables from the template. This can be ignored, the build works just fine. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-08-12netsniff-ng: Check return value of poll()Tobias Klauser1-3/+7
The return value of two calls to poll() are never check, despite the (unlikely) possibility of them returning an error, fix it by checking the return value and panic()ing on error. This issue was discovered using the Coverity scanner. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-08-12trafgen: Fix compiler warningsTobias Klauser1-17/+21
Fix the following compiler warnings that occur when building with "-W -Wall -Wextra": trafgen.c: In function ‘timer_elapsed’: trafgen.c:136:31: warning: unused parameter ‘number’ [-Wunused-parameter] trafgen.c: In function ‘apply_csum16’: trafgen.c:346:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] trafgen.c: In function ‘dump_trafgen_snippet’: trafgen.c:415:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] trafgen.c: In function ‘xmit_smoke_probe’: trafgen.c:490:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] trafgen.c:506:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] trafgen.c:509:56: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] trafgen.c:512:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] trafgen.c: In function ‘__wait_and_sum_others’: trafgen.c:721:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] trafgen.c: In function ‘__correct_global_delta’: trafgen.c:743:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] trafgen.c:761:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] trafgen.c: In function ‘xmit_packet_precheck’: trafgen.c:797:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] trafgen.c:816:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] trafgen.c: In function ‘main_loop’: trafgen.c:837:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] trafgen.c: In function ‘main’: trafgen.c:1047:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] trafgen.c:1065:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] trafgen.c:1078:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] trafgen.c:1090:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-08-12dissector: icmpv6: Fix compiler warningsTobias Klauser1-2/+2
Fix the following compiler warnings that occur when building with "-W -Wall -Wextra": proto_icmpv6.c: In function ‘dissect_icmpv6_mcast_rec’: proto_icmpv6.c:326:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] proto_icmpv6.c: In function ‘dissect_neighb_disc_ops_15’: proto_icmpv6.c:537:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] proto_icmpv6.c:542:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] proto_icmpv6.c: In function ‘dissect_neighb_disc_ops_16’: proto_icmpv6.c:604:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] proto_icmpv6.c: In function ‘dissect_neighb_disc_ops_17’: proto_icmpv6.c:650:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Tobias Klauser <tklauser@distanz.ch>