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