tcprewrite.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /* $Id$ */
  2. /*
  3. * Copyright (c) 2001-2010 Aaron Turner <aturner at synfin dot net>
  4. * Copyright (c) 2013-2018 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. #ifndef __TCPREWRITE_H__
  20. #define __TCPREWRITE_H__
  21. #include "config.h"
  22. #include "defines.h"
  23. #include "tcpedit/tcpedit.h"
  24. #ifdef ENABLE_DMALLOC
  25. #include <dmalloc.h>
  26. #endif
  27. #ifdef ENABLE_FRAGROUTE
  28. #include "fragroute/fragroute.h"
  29. #endif
  30. /* runtime options */
  31. struct tcprewrite_opt_s {
  32. /* input and output pcap filenames & handles */
  33. char *infile;
  34. char *outfile;
  35. pcap_t *pin;
  36. pcap_dumper_t *pout;
  37. /* tcpprep cache data */
  38. COUNTER cache_packets;
  39. char *cachedata;
  40. /* tcpprep cache file comment */
  41. char *comment;
  42. #ifdef ENABLE_VERBOSE
  43. /* tcpdump verbose printing */
  44. int verbose;
  45. char *tcpdump_args;
  46. #endif
  47. #ifdef ENABLE_FRAGROUTE
  48. char *fragroute_args;
  49. fragroute_t *frag_ctx;
  50. #define FRAGROUTE_DIR_C2S 1
  51. #define FRAGROUTE_DIR_S2C 2
  52. #define FRAGROUTE_DIR_BOTH 4
  53. int fragroute_dir;
  54. #endif
  55. tcpedit_t *tcpedit;
  56. };
  57. typedef struct tcprewrite_opt_s tcprewrite_opt_t;
  58. #endif /* __TCPREWRITE_H__ */