nexmon – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 /* decode_as_utils.h
2 *
3 * "Decode As" UI utility routines.
4 *
5 * By David Hampton <dhampton@mac.com>
6 * Copyright 2001 David Hampton
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 */
23  
24 #ifndef __DECODE_AS_UTILS_H__
25 #define __DECODE_AS_UTILS_H__
26  
27 #include "ws_symbol_export.h"
28  
29 /** @file
30 * "Decode As" / "User Specified Decodes" dialog box.
31 * @ingroup main_ui_group
32 */
33  
34 #ifdef __cplusplus
35 extern "C" {
36 #endif /* __cplusplus */
37  
38 /** Reset the "decode as" entries and reload ones of the current profile.
39 */
40 void load_decode_as_entries(void);
41  
42 /** Write out the "decode as" entries of the current profile.
43 */
44 int save_decode_as_entries(gchar** err);
45  
46 /** This routine creates one entry in the list of protocol dissector
47 * that need to be reset. It is called by the g_hash_table_foreach
48 * routine once for each changed entry in a dissector table.
49 * Unfortunately it cannot delete the entry immediately as this screws
50 * up the foreach function, so it builds a list of dissectors to be
51 * reset once the foreach routine finishes.
52 *
53 * @param table_name The table name in which this dissector is found.
54 *
55 * @param key A pointer to the key for this entry in the dissector
56 * hash table. This is generally the numeric selector of the
57 * protocol, i.e. the ethernet type code, IP port number, TCP port
58 * number, etc.
59 *
60 * @param selector_type The type of the selector in that dissector table
61 *
62 * @param value A pointer to the value for this entry in the dissector
63 * hash table. This is an opaque pointer that can only be handed back
64 * to routine in the file packet.c - but it's unused.
65 *
66 * @param user_data Unused.
67 */
68 void decode_build_reset_list (const gchar *table_name, ftenum_t selector_type,
69 gpointer key, gpointer value _U_,
70 gpointer user_data _U_);
71  
72 /** Clear all "decode as" settings.
73 */
74 void decode_clear_all(void);
75  
76 /*
77 * This is the template for the decode as option; it is shared between the
78 * various functions that output the usage for this parameter.
79 */
80 #define DECODE_AS_ARG_TEMPLATE "<layer_type>==<selector>,<decode_as_protocol>"
81  
82 gboolean decode_as_command_option(const gchar *cl_param);
83  
84 #ifdef __cplusplus
85 }
86 #endif /* __cplusplus */
87  
88 #endif /* __DECODE_AS_UTILS_H__ */
89  
90 /*
91 * Editor modelines - http://www.wireshark.org/tools/modelines.html
92 *
93 * Local variables:
94 * c-basic-offset: 4
95 * tab-width: 8
96 * indent-tabs-mode: nil
97 * End:
98 *
99 * vi: set shiftwidth=4 tabstop=8 expandtab:
100 * :indentSize=4:tabSize=8:noTabs=true:
101 */