Add a routine to get an array of all instances of a string option.
[metze/wireshark/wip.git] / wiretap / json.h
1 /* json.h
2  *
3  * Copyright 2015, Dario Lombardo <lomato@gmail.com>
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  *
19  */
20
21 #ifndef __JSON_H__
22 #define __JSON_H__
23
24 #include <glib.h>
25
26 #include "wtap.h"
27
28 /*
29  * Impose a not-too-large limit on the maximum file size, to avoid eating
30  * up 99% of the (address space, swap partition, disk space for swap/page
31  * files); if we were to return smaller chunks and let the dissector do
32  * reassembly, it would *still* have to allocate a buffer the size of
33  * the file, so it's not as if we'd neve try to allocate a buffer the
34  * size of the file.
35  *
36  * For now, go for 50MB.
37  */
38 #define MAX_FILE_SIZE  (50*1024*1024)
39
40 wtap_open_return_val json_open(wtap *wth, int *err, gchar **err_info);
41
42 #endif
43
44 /*
45  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
46  *
47  * Local variables:
48  * c-basic-offset: 4
49  * tab-width: 8
50  * indent-tabs-mode: nil
51  * End:
52  *
53  * vi: set shiftwidth=4 tabstop=8 expandtab:
54  * :indentSize=4:tabSize=8:noTabs=true:
55  */