flowreplay.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* $Id: flowreplay.h 1293 2005-05-17 00:12:18Z aturner $ */
  2. /*
  3. * Copyright (c) 2001-2004 Aaron Turner.
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * 3. Neither the names of the copyright owners nor the names of its
  16. * contributors may be used to endorse or promote products derived from
  17. * this software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  20. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  21. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  22. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  23. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  24. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  25. * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  26. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
  27. * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  28. * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  29. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  30. */
  31. #ifndef _FLOWREPLAY_H_
  32. #define _FLOWREPLAY_H_
  33. #include "config.h"
  34. #include "defines.h"
  35. #include <sys/types.h>
  36. #define MODE_SEND 0x1
  37. #define MODE_WAIT 0x2
  38. #define MODE_BYTES 0x3
  39. #define MODE_USER 0x4
  40. #define PCAP_FILTER_LEN 1024
  41. /* runtime options */
  42. struct flowreplay_opt_s {
  43. int sendmode;
  44. int nosyn; /* require Syn to start flow? */
  45. struct in_addr targetaddr; /* target host */
  46. cidr_t *clients;
  47. cidr_t *servers;
  48. libnet_t *l;
  49. struct timeval timeout;
  50. u_int32_t pernodebufflim;
  51. u_int32_t totalbufflim;
  52. u_int16_t port;
  53. u_char proto;
  54. u_char spacer; /* make 4 byte aligned */
  55. };
  56. typedef struct flowreplay_opt_s flowreplay_opt_t;
  57. #endif
  58. /*
  59. Local Variables:
  60. mode:c
  61. indent-tabs-mode:nil
  62. c-basic-offset:4
  63. End:
  64. */