tcpreplay
tcpreplay copied to clipboard
Unable to read pcap file for playback
http://tcpreplay.synfin.net/ticket/527
patch:
Index: src/tcpreplay_api.c
===================================================================
--- src/tcpreplay_api.c (revision 2648)
+++ src/tcpreplay_api.c (working copy)
@@ -624,6 +624,7 @@
if (ctx->options->source_cnt < MAX_FILES) {
ctx->options->sources[ctx->options->source_cnt].filename = safe_strdup(pcap_file);
+ ctx->options->sources[ctx->options->source_cnt].type = source_filename;
/*
* prepare the cache info data struct. This doesn't actually enable
Index: src/tcpreplay.c
===================================================================
--- src/tcpreplay.c (revision 2648)
+++ src/tcpreplay.c (working copy)
@@ -122,7 +122,7 @@
}
for (i = 0; i < argc; i++) {
- ctx->options->sources[i].filename = safe_strdup(argv[i]);
+ tcpreplay_add_pcapfile(ctx, argv[i]);
/* preload our pcap file? */
if (ctx->options->preload_pcap) {