Changeset 2415
- Timestamp:
- 03/12/10 21:43:50 (5 months ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
-
tcpreplay_api.c (modified) (2 diffs)
-
tcpreplay_api.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tcpreplay_api.c
r2404 r2415 207 207 } 208 208 209 /* 210 * If we're preloading the pcap before the first run, then 211 * we're forcing the file cache to be true 212 */ 213 214 if (HAVE_OPT(PRELOAD_PCAP)) { 215 options->preload_pcap = true; 216 options->enable_file_cache = true; 217 } 218 209 219 if (HAVE_OPT(TIMER)) { 210 220 if (strcmp(OPT_ARG(TIMER), "select") == 0) { … … 533 543 assert(ctx); 534 544 ctx->options->enable_file_cache = value; 545 return 0; 546 } 547 548 549 /** 550 * \brief Enable or disable preloading the file cache 551 * 552 * Note: This is a global option and forces all pcaps 553 * to be preloaded for this context. If you turn this 554 * on, then it forces set_file_cache(true) 555 */ 556 int 557 tcpreplay_set_preload_pcap(tcpreplay_t *ctx, bool value) 558 { 559 assert(ctx); 560 ctx->options->preload_pcap = value; 561 if (value) 562 tcpreplay_set_file_cache(ctx, true); 535 563 return 0; 536 564 } -
trunk/src/tcpreplay_api.h
r2413 r2415 146 146 bool enable_file_cache; 147 147 file_cache_t file_cache[MAX_FILES]; 148 intpreload_pcap;148 bool preload_pcap; 149 149 150 150 /* pcap files/sources to replay */ … … 231 231 int tcpreplay_set_tcpprep_cache(tcpreplay_t *, char *); 232 232 int tcpreplay_add_pcapfile(tcpreplay_t *, char *); 233 int tcpreplay_set_preload_pcap(tcpreplay_t *, bool); 233 234 234 235 /* information */
Note: See TracChangeset
for help on using the changeset viewer.
