From 859f1fe60ae57d49c6a475117f3fbbfc46293448 Mon Sep 17 00:00:00 2001 From: Jon Schipp Date: Mon, 14 Oct 2013 12:59:25 -0700 Subject: trafgen: set interpacket gap in time units (s/ms/us/ns) 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 Signed-off-by: Tobias Klauser --- trafgen.8 | 20 +++++++++++--------- trafgen.c | 50 +++++++++++++++++++++++++++++++++++++++----------- trafgen.zsh | 2 +- 3 files changed, 51 insertions(+), 21 deletions(-) diff --git a/trafgen.8 b/trafgen.8 index e4a4e84..d311084 100644 --- a/trafgen.8 +++ b/trafgen.8 @@ -122,14 +122,16 @@ Specify the number of processes trafgen shall fork(2) off. By default trafgen will start as many processes as CPUs that are online and pin them to each, respectively. Allowed value must be within interval [1,CPUs]. .PP -.SS -t , --gap -Specify a static inter-packet timegap in micro-seconds. If this option is given, -then instead of packet(7)'s TX_RING interface, trafgen will use sendto(2) I/O -for network packets, even if the argument is 0. This option is useful for -a couple of reasons: i) comparison between sendto(2) and TX_RING performance, -ii) low-traffic packet probing for a given interval, iii) ping-like debugging -with specific payload patterns. Furthermore, the TX_RING interface does not cope -with interpacket gaps. +.SS -t