summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Ribas <jonathan.ribas@fraudbuster.mobi>2019-01-26 20:49:16 +0100
committerJonathan Ribas <jonathan.ribas@fraudbuster.mobi>2019-01-26 20:49:16 +0100
commitf14dc4286b20d7cd4e72bc6ccf8430770a04f6a3 (patch)
tree9f77a237cf3feafb2db7004897874c801f9dc599
parent7e0c000767b601cec18b93e18cdd0c232f050441 (diff)
downloaddpdk-burst-replay-f14dc4286b20d7cd4e72bc6ccf8430770a04f6a3.zip
dpdk-burst-replay-f14dc4286b20d7cd4e72bc6ccf8430770a04f6a3.tar.gz
dpdk-burst-replay-f14dc4286b20d7cd4e72bc6ccf8430770a04f6a3.tar.xz
Start a branch to add the possibility to replay pcap by respecting its packets timestamps.
First, add a --topspeed option (like tcpreplay) to replay the pcap like how it's already implemented. If we do not put this new options, pcap will have to be send by respecting timers.
-rw-r--r--src/main.c7
-rw-r--r--src/main.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index fbaea46..a879f13 100644
--- a/src/main.c
+++ b/src/main.c
@@ -24,6 +24,7 @@ void usage(void)
"--nbruns X : set the wanted number of replay (1 by default). Set to 0 to infinite mode.\n"
"--wait-enter: will wait until you press ENTER to start the replay "
" (asked once all the initialization are done)"
+ "--topspeed: pcap will be replayed at maximum hardware speed."
/* TODO: */
/* "[--maxbitrate bitrate]|[--normalspeed] : bitrate not to be exceeded (default: no limit) in ko/s.\n" */
/* " specify --normalspeed to replay the trace with the good timings." */
@@ -128,6 +129,12 @@ int parse_options(const int ac, char** av, struct cmd_opts* opts)
continue;
}
+ /* --topspeed */
+ if (!strcmp(av[i], "--topspeed")) {
+ opts->topspeed = 1;
+ continue;
+ }
+
break;
}
if (i + 2 > ac)
diff --git a/src/main.h b/src/main.h
index 13b730c..660596f 100644
--- a/src/main.h
+++ b/src/main.h
@@ -34,6 +34,7 @@ struct cmd_opts {
int nbruns;
unsigned int maxbitrate;
int wait;
+ int topspeed;
char* trace;
};