more
[metze/wireshark/wip.git] / ui / text_import_scanner.h
1 /**-*-C-*-**********************************************************************
2  * text_import_scanner.h
3  * Scanner for text import
4  * November 2010, Jaap Keuter <jaap.keuter@xs4all.nl>
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
8  * Copyright 1998 Gerald Combs
9  *
10  * Based on text2pcap.h by Ashok Narayanan <ashokn@cisco.com>
11  *
12  * SPDX-License-Identifier: GPL-2.0-or-later*
13  *******************************************************************************/
14
15
16 #ifndef __TEXT_IMPORT_SCANNER_H__
17 #define __TEXT_IMPORT_SCANNER_H__
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif /* __cplusplus */
22
23 typedef enum {
24     T_BYTE = 1,
25     T_OFFSET,
26     T_DIRECTIVE,
27     T_TEXT,
28     T_EOL
29 } token_t;
30
31
32 void parse_token(token_t token, char *str);
33 void write_current_packet(void);
34
35 extern FILE *text_importin;
36
37 int text_import_scan(FILE *input_file);
38
39 #ifdef __cplusplus
40 }
41 #endif /* __cplusplus */
42
43 #endif /* __TEXT_IMPORT_SCANNER_H__ */
44
45 /*
46  * Editor modelines
47  *
48  * Local Variables:
49  * c-basic-offset: 4
50  * tab-width: 8
51  * indent-tabs-mode: nil
52  * End:
53  *
54  * ex: set shiftwidth=4 tabstop=8 expandtab:
55  * :indentSize=4:tabSize=8:noTabs=true:
56  */