Add another DL CRC error - Duplicate NonZero RV.
[obnox/wireshark/wip.git] / gtk / text_import.h
1 /**-*-C-*-**********************************************************************
2  * text_import.h
3  * State machine for text import
4  * November 2010, Jaap Keuter <jaap.keuter@xs4all.nl>
5  *
6  * $Id$
7  *
8  * Wireshark - Network traffic analyzer
9  * By Gerald Combs <gerald@wireshark.org>
10  * Copyright 1998 Gerald Combs
11  *
12  * Based on text2pcap.h by Ashok Narayanan <ashokn@cisco.com>
13  *
14  * This program is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU General Public License
16  * as published by the Free Software Foundation; either version 2
17  * of the License, or (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with this program; if not, write to the Free Software
26  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
27  *
28  *******************************************************************************/
29
30
31 #ifndef TEXT_IMPORT_H
32 #define TEXT_IMPORT_H
33
34 #include "glib.h"
35 #include "wtap.h"
36
37 #define IMPORT_MAX_PACKET 64000
38
39 /* The parameter interface */
40
41 enum offset_type
42 {
43     OFFSET_HEX,
44     OFFSET_OCT,
45     OFFSET_DEC
46 };
47
48 enum dummy_header_type
49 {
50     HEADER_NONE,
51     HEADER_ETH,
52     HEADER_IPV4,
53     HEADER_UDP,
54     HEADER_TCP,
55     HEADER_SCTP,
56     HEADER_SCTP_DATA
57 };
58
59 typedef struct
60 {
61     /* Input info */
62     guchar *import_text_filename;
63     FILE *import_text_file;
64     enum offset_type offset_type;
65     gboolean date_timestamp;
66     guchar *date_timestamp_format;
67
68     /* Import info */
69     guint encapsulation;
70     wtap_dumper* wdh;
71
72     /* Dummy header info (if encapsulation == 1) */
73     enum dummy_header_type dummy_header_type;
74     guint pid;
75     guint protocol;
76     guint src_port;
77     guint dst_port;
78     guint tag;
79     guint ppi;
80
81     guint max_frame_length;
82 } text_import_info_t;
83
84 void text_import_setup(text_import_info_t *info);
85 void text_import_cleanup(void);
86
87 #endif