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