1 /* decode_as_dcerpc.h
\r
3 * $Id: decode_as_dlg.h 11400 2004-07-18 00:24:25Z guy $
\r
5 * Routines to modify dcerpc bindings on the fly.
\r
6 * Only internally used between decode_as_dlg and decode_as_dcerpc
\r
8 * Copyright 2004 Ulf Lamping
\r
10 * This program is free software; you can redistribute it and/or
\r
11 * modify it under the terms of the GNU General Public License
\r
12 * as published by the Free Software Foundation; either version 2
\r
13 * of the License, or (at your option) any later version.
\r
15 * This program is distributed in the hope that it will be useful,
\r
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
18 * GNU General Public License for more details.
\r
20 * You should have received a copy of the GNU General Public License
\r
21 * along with this program; if not, write to the Free Software
\r
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
\r
26 #ifndef __DECODE_AS_DCERPC_H__
\r
27 #define __DECODE_AS_DCERPC_H__
\r
30 * "Decode As" / "User Specified Decodes" dialog box.
\r
31 * @ingroup dialog_group
\r
36 * Columns for a "Select" list.
\r
37 * Note that most of these columns aren't displayed; they're attached
\r
38 * to the row of the table as additional information.
\r
40 #define E_LIST_S_PROTO_NAME 0
\r
41 #define E_LIST_S_TABLE 1
\r
42 /* The following is for debugging in decode_add_to_list */
\r
43 #define E_LIST_S_MAX E_LIST_S_TABLE
\r
44 #define E_LIST_S_COLUMNS (E_LIST_S_MAX + 1)
\r
46 #define E_PAGE_LIST "notebook_page_list"
\r
47 #define E_PAGE_TABLE "notebook_page_table_name"
\r
48 #define E_PAGE_TITLE "notebook_page_title"
\r
49 #define E_PAGE_VALUE "notebook_page_value"
\r
51 #define E_PAGE_ACTION "notebook_page_action"
\r
53 #define E_PAGE_DCERPC "notebook_page_dcerpc" /* dcerpc only */
\r
54 #define E_PAGE_BINDING "notebook_page_binding" /* dcerpc only */
\r
58 * Enum used to track which radio button is currently selected in the
\r
59 * dialog. These buttons are labeled "Decode" and "Do not decode".
\r
62 /* The "Decode" button is currently selected. */
\r
65 /* The "Do not decode" button is currently selected. */
\r
69 extern enum action_type requested_action;
\r
72 * A list of the dialog items that only have meaning when the user has
\r
73 * selected the "Decode" radio button. When the "Do not decode"
\r
74 * button is selected these items should be dimmed.
\r
76 extern GSList *decode_dimmable;
\r
78 /* init decode_dcerpc internals */
\r
79 extern void decode_dcerpc_init(void);
\r
81 /* remove all bindings */
\r
82 extern void decode_dcerpc_reset_all(void);
\r
85 decode_dcerpc_add_show_list(gpointer user_data);
\r
88 decode_dcerpc_add_page(packet_info *pinfo);
\r
91 decode_dcerpc_binding_free(void *binding);
\r
95 /** Add an item the the Show list.
\r
98 decode_add_to_show_list (
\r
99 gpointer list_data,
\r
100 gchar *table_name,
\r
101 gchar *selector_name,
\r
102 gchar *initial_proto_name,
\r
103 gchar *current_proto_name);
\r
107 * This routine creates one entry in the list of protocol dissector
\r
108 * that can be used. It is called by the dissector_table_foreach_handle
\r
109 * routine once for each entry in a dissector table's list of handles
\r
110 * for dissectors that could be used in that table. It guarantees unique
\r
111 * entries by iterating over the list of entries build up to this point,
\r
112 * looking for a duplicate name. If there is no duplicate, then this
\r
113 * entry is added to the list of possible dissectors.
\r
115 * @param table_name The name of the dissector table currently
\r
118 * @param value The dissector handle for this entry. This is an opaque
\r
119 * pointer that can only be handed back to routines in the file packet.c
\r
121 * @param user_data A data block passed into each instance of this
\r
122 * routine. It contains information from the caller of the foreach
\r
123 * routine, specifying information about the dissector table and where
\r
124 * to store any information generated by this routine.
\r
127 decode_add_to_list (gchar *table_name, gchar *proto_name, gpointer value, gpointer user_data);
\r
130 * This routine starts the creation of a List on a notebook page. It
\r
131 * creates both a scrolled window and a list, adds the list to the
\r
132 * window, and attaches the list as a data object on the page.
\r
134 * @param page A pointer to the notebook page being created.
\r
136 * @param list_p Will be filled in with the address of a newly
\r
139 * @param scrolled_win_p Will be filled in with the address of a newly
\r
140 * created GtkScrolledWindow.
\r
143 decode_list_menu_start(GtkWidget *page, GtkWidget **list_p,
\r
144 GtkWidget **scrolled_win_p);
\r
147 * This routine finishes the creation of a List on a notebook page.
\r
148 * It adds the default entry, sets the default entry as the
\r
149 * highlighted entry, and sorts the List.
\r
151 * @param list A pointer the the List to finish.
\r
154 decode_list_menu_finish(GtkWidget *list);
\r