1
0

tcprewrite.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* $Id$ */
  2. /*
  3. * Copyright (c) 2001-2010 Aaron Turner <aturner at synfin dot net>
  4. * Copyright (c) 2013-2024 Fred Klassen <tcpreplay at appneta dot com> - AppNeta
  5. *
  6. * The Tcpreplay Suite of tools is free software: you can redistribute it
  7. * and/or modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation, either version 3 of the
  9. * License, or with the authors permission any later version.
  10. *
  11. * The Tcpreplay Suite is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with the Tcpreplay Suite. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #pragma once
  20. #include "defines.h"
  21. #include "config.h"
  22. #include "tcpedit/tcpedit.h"
  23. #ifdef ENABLE_DMALLOC
  24. #include <dmalloc.h>
  25. #endif
  26. #ifdef ENABLE_FRAGROUTE
  27. #include "fragroute/fragroute.h"
  28. #endif
  29. /* runtime options */
  30. struct tcprewrite_opt_s {
  31. /* input and output pcap filenames & handles */
  32. char *infile;
  33. char *outfile;
  34. pcap_t *pin;
  35. pcap_dumper_t *pout;
  36. /* tcpprep cache data */
  37. COUNTER cache_packets;
  38. char *cachedata;
  39. /* tcpprep cache file comment */
  40. char *comment;
  41. #ifdef ENABLE_VERBOSE
  42. /* tcpdump verbose printing */
  43. int verbose;
  44. char *tcpdump_args;
  45. #endif
  46. #ifdef ENABLE_FRAGROUTE
  47. char *fragroute_args;
  48. fragroute_t *frag_ctx;
  49. #define FRAGROUTE_DIR_C2S 1
  50. #define FRAGROUTE_DIR_S2C 2
  51. #define FRAGROUTE_DIR_BOTH 4
  52. int fragroute_dir;
  53. #endif
  54. tcpedit_t *tcpedit;
  55. };
  56. typedef struct tcprewrite_opt_s tcprewrite_opt_t;