0d729e0c8762969efcb113d7301f5c0de1272791
[metze/wireshark/wip.git] / epan / disabled_protos.h
1 /* disabled_protos.h
2  * Declarations of routines for reading and writing protocols file that determine
3  * enabling and disabling of protocols.
4  *
5  * Wireshark - Network traffic analyzer
6  * By Gerald Combs <gerald@wireshark.org>
7  * Copyright 1998 Gerald Combs
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2
12  * of the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22  */
23
24 #ifndef DISABLED_PROTOS_H
25 #define DISABLED_PROTOS_H
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif /* __cplusplus */
30
31 /*
32  * Disable a particular protocol by name
33  */
34 WS_DLL_PUBLIC void
35 proto_disable_proto_by_name(const char *name);
36
37 /*
38  * Enable a particular protocol by name.  This will only enable
39  * protocols that are disabled by default.  All others will be ignored.
40  */
41 WS_DLL_PUBLIC void
42 proto_enable_proto_by_name(const char *name);
43
44 /*
45  * Enable/disable a particular heuristic dissector by name
46  * On success (found the protocol), return TRUE.
47  * On failure (didn't find the protocol), return FALSE.
48  */
49 WS_DLL_PUBLIC gboolean
50 proto_enable_heuristic_by_name(const char *name, gboolean enable);
51
52 /*
53  * Read the files that enable and disable protocols and heuristic
54  * dissectors.  Report errors through the UI.
55  *
56  * This is called by epan_load_settings(); programs should call that
57  * rather than individually calling the routines it calls.
58  */
59 extern void
60 read_enabled_and_disabled_lists(void);
61
62 /*
63  * Write out the lists of enabled and disabled protocols and heuristic
64  * dissectors to the corresponding files.  Report errors through the UI.
65  */
66 WS_DLL_PUBLIC void
67 save_enabled_and_disabled_lists(void);
68
69 /*
70  * Free the internal structures
71  */
72 extern void
73 cleanup_enabled_and_disabled_lists(void);
74
75 #ifdef __cplusplus
76 }
77 #endif /* __cplusplus */
78
79 #endif /* DISABLED_PROTOS_H */