use the latest version of PIDL to regenerate winreg using the new TYPE
[metze/wireshark/wip.git] / epan / dissectors / packet-dcerpc-winreg.c
1 /* DO NOT EDIT
2         This filter was automatically generated
3         from winreg.idl and winreg.cnf.
4         
5         Pidl is a perl based IDL compiler for DCE/RPC idl files. 
6         It is maintained by the Samba team, not the Wireshark team.
7         Instructions on how to download and install Pidl can be 
8         found at http://wiki.wireshark.org/Pidl
9 */
10
11
12 #ifdef HAVE_CONFIG_H
13 #include "config.h"
14 #endif
15
16 #include <glib.h>
17 #include <string.h>
18 #include <epan/packet.h>
19
20 #include "packet-dcerpc.h"
21 #include "packet-dcerpc-nt.h"
22 #include "packet-windows-common.h"
23 #include "packet-dcerpc-winreg.h"
24
25 /* Ett declarations */
26 static gint ett_dcerpc_winreg = -1;
27 static gint ett_winreg_winreg_AccessMask = -1;
28 static gint ett_winreg_winreg_String = -1;
29 static gint ett_winreg_KeySecurityData = -1;
30 static gint ett_winreg_winreg_SecBuf = -1;
31 static gint ett_winreg_winreg_StringBuf = -1;
32 static gint ett_winreg_KeySecurityAttribute = -1;
33 static gint ett_winreg_QueryMultipleValue = -1;
34
35
36 /* Header field declarations */
37 static gint hf_winreg_winreg_AccessMask_KEY_ENUMERATE_SUB_KEYS = -1;
38 static gint hf_winreg_winreg_NotifyChangeKeyValue_string2 = -1;
39 static gint hf_winreg_winreg_InitiateSystemShutdown_message = -1;
40 static gint hf_winreg_KeySecurityData_size = -1;
41 static gint hf_winreg_winreg_String_name = -1;
42 static gint hf_winreg_winreg_InitiateSystemShutdownEx_message = -1;
43 static gint hf_winreg_winreg_InitiateSystemShutdown_reboot = -1;
44 static gint hf_winreg_winreg_EnumValue_enum_index = -1;
45 static gint hf_winreg_access_mask = -1;
46 static gint hf_winreg_winreg_QueryMultipleValues_key_handle = -1;
47 static gint hf_winreg_winreg_LoadKey_keyname = -1;
48 static gint hf_winreg_winreg_EnumKey_name = -1;
49 static gint hf_winreg_winreg_CreateKey_options = -1;
50 static gint hf_winreg_winreg_EnumValue_type = -1;
51 static gint hf_winreg_winreg_InitiateSystemShutdownEx_timeout = -1;
52 static gint hf_winreg_winreg_EnumKey_last_changed_time = -1;
53 static gint hf_winreg_winreg_QueryValue_size = -1;
54 static gint hf_winreg_winreg_EnumValue_size = -1;
55 static gint hf_winreg_handle = -1;
56 static gint hf_winreg_winreg_SaveKey_sec_attrib = -1;
57 static gint hf_winreg_winreg_QueryInfoKey_max_valnamelen = -1;
58 static gint hf_winreg_winreg_SecBuf_length = -1;
59 static gint hf_winreg_winreg_InitiateSystemShutdownEx_reboot = -1;
60 static gint hf_winreg_sd = -1;
61 static gint hf_winreg_winreg_SaveKey_filename = -1;
62 static gint hf_winreg_winreg_QueryMultipleValues_buffer_size = -1;
63 static gint hf_winreg_winreg_QueryValue_data = -1;
64 static gint hf_winreg_winreg_CreateKey_new_handle = -1;
65 static gint hf_winreg_winreg_QueryInfoKey_max_subkeysize = -1;
66 static gint hf_winreg_winreg_InitiateSystemShutdown_hostname = -1;
67 static gint hf_winreg_KeySecurityData_data = -1;
68 static gint hf_winreg_KeySecurityAttribute_sec_data = -1;
69 static gint hf_winreg_winreg_OpenKey_access_mask = -1;
70 static gint hf_winreg_QueryMultipleValue_name = -1;
71 static gint hf_winreg_winreg_GetKeySecurity_sec_info = -1;
72 static gint hf_winreg_winreg_StringBuf_size = -1;
73 static gint hf_winreg_winreg_SecBuf_sd = -1;
74 static gint hf_winreg_winreg_QueryInfoKey_secdescsize = -1;
75 static gint hf_winreg_winreg_OpenKey_keyname = -1;
76 static gint hf_winreg_QueryMultipleValue_type = -1;
77 static gint hf_winreg_winreg_SetValue_name = -1;
78 static gint hf_winreg_winreg_RestoreKey_flags = -1;
79 static gint hf_winreg_winreg_NotifyChangeKeyValue_watch_subtree = -1;
80 static gint hf_winreg_winreg_CreateKey_secdesc = -1;
81 static gint hf_winreg_winreg_InitiateSystemShutdownEx_force_apps = -1;
82 static gint hf_winreg_winreg_SetValue_type = -1;
83 static gint hf_winreg_winreg_CreateKey_name = -1;
84 static gint hf_winreg_KeySecurityData_len = -1;
85 static gint hf_winreg_winreg_String_name_len = -1;
86 static gint hf_winreg_opnum = -1;
87 static gint hf_winreg_winreg_DeleteKey_key = -1;
88 static gint hf_winreg_winreg_EnumValue_name = -1;
89 static gint hf_winreg_winreg_LoadKey_filename = -1;
90 static gint hf_winreg_winreg_AccessMask_KEY_CREATE_LINK = -1;
91 static gint hf_winreg_winreg_DeleteValue_value = -1;
92 static gint hf_winreg_system_name = -1;
93 static gint hf_winreg_QueryMultipleValue_length = -1;
94 static gint hf_winreg_winreg_QueryMultipleValues_num_values = -1;
95 static gint hf_winreg_winreg_AccessMask_KEY_NOTIFY = -1;
96 static gint hf_winreg_KeySecurityAttribute_data_size = -1;
97 static gint hf_winreg_winreg_OpenKey_parent_handle = -1;
98 static gint hf_winreg_winreg_StringBuf_name = -1;
99 static gint hf_winreg_winreg_NotifyChangeKeyValue_unknown2 = -1;
100 static gint hf_winreg_winreg_QueryInfoKey_num_subkeys = -1;
101 static gint hf_winreg_sd_offset = -1;
102 static gint hf_winreg_winreg_AccessMask_KEY_WOW64_32KEY = -1;
103 static gint hf_winreg_winreg_StringBuf_length = -1;
104 static gint hf_winreg_winreg_QueryInfoKey_last_changed_time = -1;
105 static gint hf_winreg_winreg_OpenHKPD_access_mask = -1;
106 static gint hf_winreg_winreg_AbortSystemShutdown_server = -1;
107 static gint hf_winreg_winreg_QueryValue_type = -1;
108 static gint hf_winreg_sd_actual_size = -1;
109 static gint hf_winreg_winreg_String_name_size = -1;
110 static gint hf_winreg_winreg_NotifyChangeKeyValue_unknown = -1;
111 static gint hf_winreg_winreg_QueryValue_length = -1;
112 static gint hf_winreg_winreg_AccessMask_KEY_CREATE_SUB_KEY = -1;
113 static gint hf_winreg_winreg_OpenKey_unknown = -1;
114 static gint hf_winreg_winreg_RestoreKey_filename = -1;
115 static gint hf_winreg_winreg_QueryInfoKey_max_valbufsize = -1;
116 static gint hf_winreg_winreg_InitiateSystemShutdownEx_reason = -1;
117 static gint hf_winreg_winreg_SecBuf_inherit = -1;
118 static gint hf_winreg_winreg_SetValue_size = -1;
119 static gint hf_winreg_winreg_EnumValue_length = -1;
120 static gint hf_winreg_winreg_QueryMultipleValues_values = -1;
121 static gint hf_winreg_winreg_QueryInfoKey_max_subkeylen = -1;
122 static gint hf_winreg_winreg_InitiateSystemShutdown_timeout = -1;
123 static gint hf_winreg_winreg_InitiateSystemShutdownEx_hostname = -1;
124 static gint hf_winreg_winreg_SaveKey_handle = -1;
125 static gint hf_winreg_KeySecurityAttribute_inherit = -1;
126 static gint hf_winreg_werror = -1;
127 static gint hf_winreg_winreg_GetVersion_version = -1;
128 static gint hf_winreg_winreg_AccessMask_KEY_QUERY_VALUE = -1;
129 static gint hf_winreg_winreg_CreateKey_action_taken = -1;
130 static gint hf_winreg_winreg_QueryInfoKey_num_values = -1;
131 static gint hf_winreg_winreg_EnumKey_keyclass = -1;
132 static gint hf_winreg_winreg_AccessMask_KEY_SET_VALUE = -1;
133 static gint hf_winreg_winreg_EnumKey_enum_index = -1;
134 static gint hf_winreg_winreg_RestoreKey_handle = -1;
135 static gint hf_winreg_winreg_SetValue_data = -1;
136 static gint hf_winreg_winreg_CreateKey_keyclass = -1;
137 static gint hf_winreg_winreg_InitiateSystemShutdown_force_apps = -1;
138 static gint hf_winreg_winreg_EnumValue_value = -1;
139 static gint hf_winreg_winreg_NotifyChangeKeyValue_string1 = -1;
140 static gint hf_winreg_winreg_QueryMultipleValues_buffer = -1;
141 static gint hf_winreg_winreg_SetKeySecurity_access_mask = -1;
142 static gint hf_winreg_winreg_QueryValue_value_name = -1;
143 static gint hf_winreg_winreg_QueryInfoKey_classname = -1;
144 static gint hf_winreg_winreg_AccessMask_KEY_WOW64_64KEY = -1;
145 static gint hf_winreg_winreg_OpenHKCU_access_mask = -1;
146 static gint hf_winreg_sd_max_size = -1;
147 static gint hf_winreg_winreg_NotifyChangeKeyValue_notify_filter = -1;
148 static gint hf_winreg_QueryMultipleValue_offset = -1;
149
150 static gint proto_dcerpc_winreg = -1;
151 /* Version information */
152
153
154 static e_uuid_t uuid_dcerpc_winreg = {
155         0x338cd001, 0x2244, 0x31f1,
156         { 0xaa, 0xaa, 0x90, 0x00, 0x38, 0x00, 0x10, 0x03 }
157 };
158 static guint16 ver_dcerpc_winreg = 1;
159
160 static const true_false_string winreg_AccessMask_KEY_QUERY_VALUE_tfs = {
161    "KEY_QUERY_VALUE is SET",
162    "KEY_QUERY_VALUE is NOT SET",
163 };
164 static const true_false_string winreg_AccessMask_KEY_SET_VALUE_tfs = {
165    "KEY_SET_VALUE is SET",
166    "KEY_SET_VALUE is NOT SET",
167 };
168 static const true_false_string winreg_AccessMask_KEY_CREATE_SUB_KEY_tfs = {
169    "KEY_CREATE_SUB_KEY is SET",
170    "KEY_CREATE_SUB_KEY is NOT SET",
171 };
172 static const true_false_string winreg_AccessMask_KEY_ENUMERATE_SUB_KEYS_tfs = {
173    "KEY_ENUMERATE_SUB_KEYS is SET",
174    "KEY_ENUMERATE_SUB_KEYS is NOT SET",
175 };
176 static const true_false_string winreg_AccessMask_KEY_NOTIFY_tfs = {
177    "KEY_NOTIFY is SET",
178    "KEY_NOTIFY is NOT SET",
179 };
180 static const true_false_string winreg_AccessMask_KEY_CREATE_LINK_tfs = {
181    "KEY_CREATE_LINK is SET",
182    "KEY_CREATE_LINK is NOT SET",
183 };
184 static const true_false_string winreg_AccessMask_KEY_WOW64_64KEY_tfs = {
185    "KEY_WOW64_64KEY is SET",
186    "KEY_WOW64_64KEY is NOT SET",
187 };
188 static const true_false_string winreg_AccessMask_KEY_WOW64_32KEY_tfs = {
189    "KEY_WOW64_32KEY is SET",
190    "KEY_WOW64_32KEY is NOT SET",
191 };
192 const value_string winreg_winreg_Type_vals[] = {
193         { REG_NONE, "REG_NONE" },
194         { REG_SZ, "REG_SZ" },
195         { REG_EXPAND_SZ, "REG_EXPAND_SZ" },
196         { REG_BINARY, "REG_BINARY" },
197         { REG_DWORD, "REG_DWORD" },
198         { REG_DWORD_BIG_ENDIAN, "REG_DWORD_BIG_ENDIAN" },
199         { REG_LINK, "REG_LINK" },
200         { REG_MULTI_SZ, "REG_MULTI_SZ" },
201         { REG_RESOURCE_LIST, "REG_RESOURCE_LIST" },
202         { REG_FULL_RESOURCE_DESCRIPTOR, "REG_FULL_RESOURCE_DESCRIPTOR" },
203         { REG_RESOURCE_REQUIREMENTS_LIST, "REG_RESOURCE_REQUIREMENTS_LIST" },
204         { REG_QWORD, "REG_QWORD" },
205 { 0, NULL }
206 };
207 static int winreg_dissect_element_String_name_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
208 static int winreg_dissect_element_String_name_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
209 static int winreg_dissect_element_String_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
210 static int winreg_dissect_element_String_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
211 static int winreg_dissect_element_KeySecurityData_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
212 static int winreg_dissect_element_KeySecurityData_data_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
213 static int winreg_dissect_element_KeySecurityData_data__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
214 static int winreg_dissect_element_KeySecurityData_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
215 static int winreg_dissect_element_KeySecurityData_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
216 static int winreg_dissect_element_SecBuf_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
217 static int winreg_dissect_element_SecBuf_sd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
218 static int winreg_dissect_element_SecBuf_inherit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
219 const value_string winreg_winreg_CreateAction_vals[] = {
220         { REG_ACTION_NONE, "REG_ACTION_NONE" },
221         { REG_CREATED_NEW_KEY, "REG_CREATED_NEW_KEY" },
222         { REG_OPENED_EXISTING_KEY, "REG_OPENED_EXISTING_KEY" },
223 { 0, NULL }
224 };
225 static int winreg_dissect_element_StringBuf_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
226 static int winreg_dissect_element_StringBuf_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
227 static int winreg_dissect_element_StringBuf_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
228 static int winreg_dissect_element_StringBuf_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
229 static int winreg_dissect_element_StringBuf_name__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
230 static int winreg_dissect_element_KeySecurityAttribute_data_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
231 static int winreg_dissect_element_KeySecurityAttribute_sec_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
232 static int winreg_dissect_element_KeySecurityAttribute_inherit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
233 static int winreg_dissect_element_QueryMultipleValue_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
234 static int winreg_dissect_element_QueryMultipleValue_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
235 static int winreg_dissect_element_QueryMultipleValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
236 static int winreg_dissect_element_QueryMultipleValue_offset(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
237 static int winreg_dissect_element_QueryMultipleValue_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
238 static int winreg_dissect_element_OpenHKCR_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
239 static int winreg_dissect_element_OpenHKCR_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
240 static int winreg_dissect_element_OpenHKCR_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
241 static int winreg_dissect_element_OpenHKCR_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
242 static int winreg_dissect_element_OpenHKCR_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
243 static int winreg_dissect_element_OpenHKCU_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
244 static int winreg_dissect_element_OpenHKCU_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
245 static int winreg_dissect_element_OpenHKCU_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
246 static int winreg_dissect_element_OpenHKCU_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
247 static int winreg_dissect_element_OpenHKCU_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
248 static int winreg_dissect_element_OpenHKLM_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
249 static int winreg_dissect_element_OpenHKLM_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
250 static int winreg_dissect_element_OpenHKLM_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
251 static int winreg_dissect_element_OpenHKLM_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
252 static int winreg_dissect_element_OpenHKLM_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
253 static int winreg_dissect_element_OpenHKPD_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
254 static int winreg_dissect_element_OpenHKPD_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
255 static int winreg_dissect_element_OpenHKPD_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
256 static int winreg_dissect_element_OpenHKPD_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
257 static int winreg_dissect_element_OpenHKPD_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
258 static int winreg_dissect_element_OpenHKU_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
259 static int winreg_dissect_element_OpenHKU_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
260 static int winreg_dissect_element_OpenHKU_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
261 static int winreg_dissect_element_OpenHKU_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
262 static int winreg_dissect_element_OpenHKU_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
263 static int winreg_dissect_element_CloseKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
264 static int winreg_dissect_element_CloseKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
265 static int winreg_dissect_element_CreateKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
266 static int winreg_dissect_element_CreateKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
267 static int winreg_dissect_element_CreateKey_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
268 static int winreg_dissect_element_CreateKey_keyclass(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
269 static int winreg_dissect_element_CreateKey_options(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
270 static int winreg_dissect_element_CreateKey_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
271 static int winreg_dissect_element_CreateKey_secdesc(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
272 static int winreg_dissect_element_CreateKey_secdesc_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
273 static int winreg_dissect_element_CreateKey_new_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
274 static int winreg_dissect_element_CreateKey_new_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
275 static int winreg_dissect_element_CreateKey_action_taken(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
276 static int winreg_dissect_element_CreateKey_action_taken_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
277 static int winreg_dissect_element_DeleteKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
278 static int winreg_dissect_element_DeleteKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
279 static int winreg_dissect_element_DeleteKey_key(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
280 static int winreg_dissect_element_DeleteValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
281 static int winreg_dissect_element_DeleteValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
282 static int winreg_dissect_element_DeleteValue_value(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
283 static int winreg_dissect_element_EnumKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
284 static int winreg_dissect_element_EnumKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
285 static int winreg_dissect_element_EnumKey_enum_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
286 static int winreg_dissect_element_EnumKey_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
287 static int winreg_dissect_element_EnumKey_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
288 static int winreg_dissect_element_EnumKey_keyclass(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
289 static int winreg_dissect_element_EnumKey_keyclass_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
290 static int winreg_dissect_element_EnumKey_last_changed_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
291 static int winreg_dissect_element_EnumKey_last_changed_time_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
292 static int winreg_dissect_element_EnumValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
293 static int winreg_dissect_element_EnumValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
294 static int winreg_dissect_element_EnumValue_enum_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
295 static int winreg_dissect_element_EnumValue_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
296 static int winreg_dissect_element_EnumValue_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
297 static int winreg_dissect_element_EnumValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
298 static int winreg_dissect_element_EnumValue_type_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
299 static int winreg_dissect_element_EnumValue_value(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
300 static int winreg_dissect_element_EnumValue_value_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
301 static int winreg_dissect_element_EnumValue_value__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
302 static int winreg_dissect_element_EnumValue_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
303 static int winreg_dissect_element_EnumValue_size_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
304 static int winreg_dissect_element_EnumValue_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
305 static int winreg_dissect_element_EnumValue_length_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
306 static int winreg_dissect_element_FlushKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
307 static int winreg_dissect_element_FlushKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
308 static int winreg_dissect_element_GetKeySecurity_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
309 static int winreg_dissect_element_GetKeySecurity_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
310 static int winreg_dissect_element_GetKeySecurity_sec_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
311 static int winreg_dissect_element_GetKeySecurity_sd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
312 static int winreg_dissect_element_GetKeySecurity_sd_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
313 static int winreg_dissect_element_LoadKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
314 static int winreg_dissect_element_LoadKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
315 static int winreg_dissect_element_LoadKey_keyname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
316 static int winreg_dissect_element_LoadKey_keyname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
317 static int winreg_dissect_element_LoadKey_filename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
318 static int winreg_dissect_element_LoadKey_filename_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
319 static int winreg_dissect_element_NotifyChangeKeyValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
320 static int winreg_dissect_element_NotifyChangeKeyValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
321 static int winreg_dissect_element_NotifyChangeKeyValue_watch_subtree(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
322 static int winreg_dissect_element_NotifyChangeKeyValue_notify_filter(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
323 static int winreg_dissect_element_NotifyChangeKeyValue_unknown(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
324 static int winreg_dissect_element_NotifyChangeKeyValue_string1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
325 static int winreg_dissect_element_NotifyChangeKeyValue_string2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
326 static int winreg_dissect_element_NotifyChangeKeyValue_unknown2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
327 static int winreg_dissect_element_OpenKey_parent_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
328 static int winreg_dissect_element_OpenKey_parent_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
329 static int winreg_dissect_element_OpenKey_keyname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
330 static int winreg_dissect_element_OpenKey_unknown(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
331 static int winreg_dissect_element_OpenKey_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
332 static int winreg_dissect_element_OpenKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
333 static int winreg_dissect_element_OpenKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
334 static int winreg_dissect_element_QueryInfoKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
335 static int winreg_dissect_element_QueryInfoKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
336 static int winreg_dissect_element_QueryInfoKey_classname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
337 static int winreg_dissect_element_QueryInfoKey_classname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
338 static int winreg_dissect_element_QueryInfoKey_num_subkeys(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
339 static int winreg_dissect_element_QueryInfoKey_num_subkeys_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
340 static int winreg_dissect_element_QueryInfoKey_max_subkeylen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
341 static int winreg_dissect_element_QueryInfoKey_max_subkeylen_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
342 static int winreg_dissect_element_QueryInfoKey_max_subkeysize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
343 static int winreg_dissect_element_QueryInfoKey_max_subkeysize_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
344 static int winreg_dissect_element_QueryInfoKey_num_values(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
345 static int winreg_dissect_element_QueryInfoKey_num_values_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
346 static int winreg_dissect_element_QueryInfoKey_max_valnamelen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
347 static int winreg_dissect_element_QueryInfoKey_max_valnamelen_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
348 static int winreg_dissect_element_QueryInfoKey_max_valbufsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
349 static int winreg_dissect_element_QueryInfoKey_max_valbufsize_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
350 static int winreg_dissect_element_QueryInfoKey_secdescsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
351 static int winreg_dissect_element_QueryInfoKey_secdescsize_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
352 static int winreg_dissect_element_QueryInfoKey_last_changed_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
353 static int winreg_dissect_element_QueryInfoKey_last_changed_time_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
354 static int winreg_dissect_element_QueryValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
355 static int winreg_dissect_element_QueryValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
356 static int winreg_dissect_element_QueryValue_value_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
357 static int winreg_dissect_element_QueryValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
358 static int winreg_dissect_element_QueryValue_type_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
359 static int winreg_dissect_element_QueryValue_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
360 static int winreg_dissect_element_QueryValue_data_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
361 static int winreg_dissect_element_QueryValue_data__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
362 static int winreg_dissect_element_QueryValue_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
363 static int winreg_dissect_element_QueryValue_size_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
364 static int winreg_dissect_element_QueryValue_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
365 static int winreg_dissect_element_QueryValue_length_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
366 static int winreg_dissect_element_RestoreKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
367 static int winreg_dissect_element_RestoreKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
368 static int winreg_dissect_element_RestoreKey_filename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
369 static int winreg_dissect_element_RestoreKey_filename_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
370 static int winreg_dissect_element_RestoreKey_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
371 static int winreg_dissect_element_SaveKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
372 static int winreg_dissect_element_SaveKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
373 static int winreg_dissect_element_SaveKey_filename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
374 static int winreg_dissect_element_SaveKey_filename_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
375 static int winreg_dissect_element_SaveKey_sec_attrib(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
376 static int winreg_dissect_element_SaveKey_sec_attrib_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
377 static int winreg_dissect_element_SetKeySecurity_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
378 static int winreg_dissect_element_SetKeySecurity_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
379 static int winreg_dissect_element_SetKeySecurity_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
380 static int winreg_dissect_element_SetKeySecurity_sd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
381 static int winreg_dissect_element_SetKeySecurity_sd_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
382 static int winreg_dissect_element_SetValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
383 static int winreg_dissect_element_SetValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
384 static int winreg_dissect_element_SetValue_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
385 static int winreg_dissect_element_SetValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
386 static int winreg_dissect_element_SetValue_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
387 static int winreg_dissect_element_SetValue_data_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
388 static int winreg_dissect_element_SetValue_data__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
389 static int winreg_dissect_element_SetValue_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
390 static int winreg_dissect_element_InitiateSystemShutdown_hostname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
391 static int winreg_dissect_element_InitiateSystemShutdown_hostname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
392 static int winreg_dissect_element_InitiateSystemShutdown_message(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
393 static int winreg_dissect_element_InitiateSystemShutdown_message_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
394 static int winreg_dissect_element_InitiateSystemShutdown_timeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
395 static int winreg_dissect_element_InitiateSystemShutdown_force_apps(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
396 static int winreg_dissect_element_InitiateSystemShutdown_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
397 static int winreg_dissect_element_AbortSystemShutdown_server(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
398 static int winreg_dissect_element_AbortSystemShutdown_server_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
399 static int winreg_dissect_element_GetVersion_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
400 static int winreg_dissect_element_GetVersion_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
401 static int winreg_dissect_element_GetVersion_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
402 static int winreg_dissect_element_GetVersion_version_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
403 static int winreg_dissect_element_OpenHKCC_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
404 static int winreg_dissect_element_OpenHKCC_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
405 static int winreg_dissect_element_OpenHKCC_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
406 static int winreg_dissect_element_OpenHKCC_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
407 static int winreg_dissect_element_OpenHKCC_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
408 static int winreg_dissect_element_OpenHKDD_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
409 static int winreg_dissect_element_OpenHKDD_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
410 static int winreg_dissect_element_OpenHKDD_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
411 static int winreg_dissect_element_OpenHKDD_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
412 static int winreg_dissect_element_OpenHKDD_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
413 static int winreg_dissect_element_QueryMultipleValues_key_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
414 static int winreg_dissect_element_QueryMultipleValues_key_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
415 static int winreg_dissect_element_QueryMultipleValues_values(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
416 static int winreg_dissect_element_QueryMultipleValues_values_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
417 static int winreg_dissect_element_QueryMultipleValues_values__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
418 static int winreg_dissect_element_QueryMultipleValues_num_values(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
419 static int winreg_dissect_element_QueryMultipleValues_buffer(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
420 static int winreg_dissect_element_QueryMultipleValues_buffer_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
421 static int winreg_dissect_element_QueryMultipleValues_buffer__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
422 static int winreg_dissect_element_QueryMultipleValues_buffer_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
423 static int winreg_dissect_element_QueryMultipleValues_buffer_size_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
424 static int winreg_dissect_element_InitiateSystemShutdownEx_hostname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
425 static int winreg_dissect_element_InitiateSystemShutdownEx_hostname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
426 static int winreg_dissect_element_InitiateSystemShutdownEx_message(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
427 static int winreg_dissect_element_InitiateSystemShutdownEx_message_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
428 static int winreg_dissect_element_InitiateSystemShutdownEx_timeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
429 static int winreg_dissect_element_InitiateSystemShutdownEx_force_apps(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
430 static int winreg_dissect_element_InitiateSystemShutdownEx_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
431 static int winreg_dissect_element_InitiateSystemShutdownEx_reason(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
432 static int winreg_dissect_element_OpenHKPT_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
433 static int winreg_dissect_element_OpenHKPT_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
434 static int winreg_dissect_element_OpenHKPT_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
435 static int winreg_dissect_element_OpenHKPT_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
436 static int winreg_dissect_element_OpenHKPT_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
437 static int winreg_dissect_element_OpenHKPN_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
438 static int winreg_dissect_element_OpenHKPN_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
439 static int winreg_dissect_element_OpenHKPN_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
440 static int winreg_dissect_element_OpenHKPN_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
441 static int winreg_dissect_element_OpenHKPN_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
442 static void
443 winreg_specific_rights(tvbuff_t *tvb, gint offset, proto_tree *tree, guint32 access)
444 {
445         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_WOW64_32KEY, tvb, offset, 4, access);
446         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_WOW64_64KEY, tvb, offset, 4, access);
447         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_CREATE_LINK, tvb, offset, 4, access);
448         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_NOTIFY, tvb, offset, 4, access);
449         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_ENUMERATE_SUB_KEYS, tvb, offset, 4, access);
450         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_CREATE_SUB_KEY, tvb, offset, 4, access);
451         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_SET_VALUE, tvb, offset, 4, access);
452         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_QUERY_VALUE, tvb, offset, 4, access);
453 }
454 struct access_mask_info winreg_access_mask_info = {
455         "WINREG",               /* Name of specific rights */
456         winreg_specific_rights, /* Dissection function */
457         NULL,                   /* Generic mapping table */
458         NULL                    /* Standard mapping table */
459 };
460 static int
461 winreg_dissect_element_KeySecurityData_data_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep)
462 {
463         guint32 len;
464         dcerpc_info *di;
465         di=pinfo->private_data;
466         if(di->conformant_run){
467                 /*just a run to handle conformant arrays, nothing to dissect */
468                 return offset;
469         }
470         /* this is a varying and conformant array */
471         offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
472                                      hf_winreg_sd_max_size, NULL);
473         offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
474                                      hf_winreg_sd_offset, NULL);
475         offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
476                                      hf_winreg_sd_actual_size, &len);
477         dissect_nt_sec_desc(tvb, offset, pinfo, tree, drep, TRUE, len,
478                 &winreg_access_mask_info);
479         offset += len;
480         return offset;
481 }
482 int
483 winreg_dissect_bitmap_AccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index _U_, guint32 param _U_)
484 {
485         offset = dissect_nt_access_mask(
486                 tvb, offset, pinfo, tree, drep, hf_winreg_access_mask,
487                 &winreg_access_mask_info, NULL);
488         return offset;
489 }
490 /* FIXME: pidl generates the wrong name for external symbols */
491 static int
492 winreg_dissect_struct_initshutdown_String(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, guint8 *drep, int hf_index, guint32 param)
493 {
494         #include "packet-dcerpc-initshutdown.h"
495         return initshutdown_dissect_struct_String(tvb, offset, pinfo, parent_tree, drep, hf_index, param);
496 }
497 /* winreg_String :
498  *      typedef [public,noejs] struct {
499  *              [value(strlen_m_term(name)*2)] uint16 name_len;
500  *              [value(strlen_m_term(name)*2)] uint16 name_size;
501  *              [string,charset(UTF16)] uint16 *name;
502  *      } winreg_String;
503  */
504 static int
505 cnf_dissect_winreg_String(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, guint8 *drep, guint32 param, int hfindex)
506 {
507         proto_item *item = NULL;
508         proto_tree *tree = NULL;
509         int old_offset;
510         header_field_info *hf_info;
511         ALIGN_TO_4_BYTES;
512         old_offset = offset;
513         hf_info=proto_registrar_get_nth(hfindex);
514         if (parent_tree) {
515                 item = proto_tree_add_text(parent_tree, tvb, offset, 0, "%s: ", hf_info->name);
516                 tree = proto_item_add_subtree(item, ett_winreg_winreg_String);
517         }
518         
519         offset = winreg_dissect_element_String_name_len(tvb, offset, pinfo, tree, drep);
520         offset = winreg_dissect_element_String_name_size(tvb, offset, pinfo, tree, drep);
521         offset = dissect_ndr_pointer_cb(
522                 tvb, offset, pinfo, tree, drep,
523                 dissect_ndr_wchar_cvstring, NDR_POINTER_UNIQUE,
524                 hf_info->name, hfindex, cb_wstr_postprocess,
525                 GINT_TO_POINTER(param));
526         proto_item_set_len(item, offset-old_offset);
527         return offset;
528 }
529
530
531 /* IDL: bitmap { */
532 /* IDL:         KEY_QUERY_VALUE =  0x00001 , */
533 /* IDL:         KEY_SET_VALUE =  0x00002 , */
534 /* IDL:         KEY_CREATE_SUB_KEY =  0x00004 , */
535 /* IDL:         KEY_ENUMERATE_SUB_KEYS =  0x00008 , */
536 /* IDL:         KEY_NOTIFY =  0x00010 , */
537 /* IDL:         KEY_CREATE_LINK =  0x00020 , */
538 /* IDL:         KEY_WOW64_64KEY =  0x00100 , */
539 /* IDL:         KEY_WOW64_32KEY =  0x00200 , */
540 /* IDL: } */
541
542
543 /* IDL: enum { */
544 /* IDL:         REG_NONE=0, */
545 /* IDL:         REG_SZ=1, */
546 /* IDL:         REG_EXPAND_SZ=2, */
547 /* IDL:         REG_BINARY=3, */
548 /* IDL:         REG_DWORD=4, */
549 /* IDL:         REG_DWORD_BIG_ENDIAN=5, */
550 /* IDL:         REG_LINK=6, */
551 /* IDL:         REG_MULTI_SZ=7, */
552 /* IDL:         REG_RESOURCE_LIST=8, */
553 /* IDL:         REG_FULL_RESOURCE_DESCRIPTOR=9, */
554 /* IDL:         REG_RESOURCE_REQUIREMENTS_LIST=10, */
555 /* IDL:         REG_QWORD=11, */
556 /* IDL: } */
557
558 int
559 winreg_dissect_enum_Type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)
560 {
561         guint32 parameter=0;
562         if(param){
563                 parameter=(guint32)*param;
564         }
565         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_index, &parameter);
566         if(param){
567                 *param=(guint32)parameter;
568         }
569         return offset;
570 }
571
572
573 /* IDL: struct { */
574 /* IDL:         [value(strlen_m_term(name)*2)] uint16 name_len; */
575 /* IDL:         [value(strlen_m_term(name)*2)] uint16 name_size; */
576 /* IDL:         [unique(1)] [charset(UTF16)] uint16 *name; */
577 /* IDL: } */
578
579 static int
580 winreg_dissect_element_String_name_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
581 {
582         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_String_name_len, 0);
583
584         return offset;
585 }
586
587 static int
588 winreg_dissect_element_String_name_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
589 {
590         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_String_name_size, 0);
591
592         return offset;
593 }
594
595 static int
596 winreg_dissect_element_String_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
597 {
598         offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_String_name_, NDR_POINTER_UNIQUE, "Pointer to Name (uint16)",hf_winreg_winreg_String_name);
599
600         return offset;
601 }
602
603 static int
604 winreg_dissect_element_String_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
605 {
606         char *data;
607
608         offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, drep, sizeof(guint16), hf_winreg_winreg_String_name, FALSE, &data);
609         proto_item_append_text(tree, ": %s", data);
610
611         return offset;
612 }
613
614 int
615 winreg_dissect_struct_String(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
616 {
617         proto_item *item = NULL;
618         proto_tree *tree = NULL;
619         int old_offset;
620
621         ALIGN_TO_4_BYTES;
622
623         old_offset = offset;
624
625         if (parent_tree) {
626                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
627                 tree = proto_item_add_subtree(item, ett_winreg_winreg_String);
628         }
629         
630         offset = winreg_dissect_element_String_name_len(tvb, offset, pinfo, tree, drep);
631
632         offset = winreg_dissect_element_String_name_size(tvb, offset, pinfo, tree, drep);
633
634         offset = winreg_dissect_element_String_name(tvb, offset, pinfo, tree, drep);
635
636
637         proto_item_set_len(item, offset-old_offset);
638
639         return offset;
640 }
641
642
643 /* IDL: struct { */
644 /* IDL:         [unique(1)] [length_is(len)] [size_is(size)] uint8 *data; */
645 /* IDL:         uint32 size; */
646 /* IDL:         uint32 len; */
647 /* IDL: } */
648
649 static int
650 winreg_dissect_element_KeySecurityData_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
651 {
652         offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_KeySecurityData_data_, NDR_POINTER_UNIQUE, "Pointer to Data (uint8)",hf_winreg_KeySecurityData_data);
653
654         return offset;
655 }
656
657 static int
658 winreg_dissect_element_KeySecurityData_data__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
659 {
660         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_KeySecurityData_data, 0);
661
662         return offset;
663 }
664
665 static int
666 winreg_dissect_element_KeySecurityData_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
667 {
668         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_KeySecurityData_size, 0);
669
670         return offset;
671 }
672
673 static int
674 winreg_dissect_element_KeySecurityData_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
675 {
676         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_KeySecurityData_len, 0);
677
678         return offset;
679 }
680
681 int
682 winreg_dissect_struct_KeySecurityData(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
683 {
684         proto_item *item = NULL;
685         proto_tree *tree = NULL;
686         int old_offset;
687
688         ALIGN_TO_4_BYTES;
689
690         old_offset = offset;
691
692         if (parent_tree) {
693                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
694                 tree = proto_item_add_subtree(item, ett_winreg_KeySecurityData);
695         }
696         
697         offset = winreg_dissect_element_KeySecurityData_data(tvb, offset, pinfo, tree, drep);
698
699         offset = winreg_dissect_element_KeySecurityData_size(tvb, offset, pinfo, tree, drep);
700
701         offset = winreg_dissect_element_KeySecurityData_len(tvb, offset, pinfo, tree, drep);
702
703
704         proto_item_set_len(item, offset-old_offset);
705
706         return offset;
707 }
708
709
710 /* IDL: struct { */
711 /* IDL:         uint32 length; */
712 /* IDL:         KeySecurityData sd; */
713 /* IDL:         uint8 inherit; */
714 /* IDL: } */
715
716 static int
717 winreg_dissect_element_SecBuf_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
718 {
719         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_SecBuf_length, 0);
720
721         return offset;
722 }
723
724 static int
725 winreg_dissect_element_SecBuf_sd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
726 {
727         offset = winreg_dissect_struct_KeySecurityData(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_SecBuf_sd,0);
728
729         return offset;
730 }
731
732 static int
733 winreg_dissect_element_SecBuf_inherit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
734 {
735         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_SecBuf_inherit, 0);
736
737         return offset;
738 }
739
740 int
741 winreg_dissect_struct_SecBuf(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
742 {
743         proto_item *item = NULL;
744         proto_tree *tree = NULL;
745         int old_offset;
746
747         ALIGN_TO_4_BYTES;
748
749         old_offset = offset;
750
751         if (parent_tree) {
752                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
753                 tree = proto_item_add_subtree(item, ett_winreg_winreg_SecBuf);
754         }
755         
756         offset = winreg_dissect_element_SecBuf_length(tvb, offset, pinfo, tree, drep);
757
758         offset = winreg_dissect_element_SecBuf_sd(tvb, offset, pinfo, tree, drep);
759
760         offset = winreg_dissect_element_SecBuf_inherit(tvb, offset, pinfo, tree, drep);
761
762
763         proto_item_set_len(item, offset-old_offset);
764
765         return offset;
766 }
767
768
769 /* IDL: enum { */
770 /* IDL:         REG_ACTION_NONE=0, */
771 /* IDL:         REG_CREATED_NEW_KEY=1, */
772 /* IDL:         REG_OPENED_EXISTING_KEY=2, */
773 /* IDL: } */
774
775 int
776 winreg_dissect_enum_CreateAction(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)
777 {
778         guint32 parameter=0;
779         if(param){
780                 parameter=(guint32)*param;
781         }
782         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_index, &parameter);
783         if(param){
784                 *param=(guint32)parameter;
785         }
786         return offset;
787 }
788
789
790 /* IDL: struct { */
791 /* IDL:         [value(strlen_m_term(name)*2)] uint16 length; */
792 /* IDL:         uint16 size; */
793 /* IDL:         [unique(1)] [length_is(length/2)] [charset(UTF16)] [size_is(size/2)] uint16 *name; */
794 /* IDL: } */
795
796 static int
797 winreg_dissect_element_StringBuf_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
798 {
799         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_StringBuf_length, 0);
800
801         return offset;
802 }
803
804 static int
805 winreg_dissect_element_StringBuf_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
806 {
807         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_StringBuf_size, 0);
808
809         return offset;
810 }
811
812 static int
813 winreg_dissect_element_StringBuf_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
814 {
815         offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_StringBuf_name_, NDR_POINTER_UNIQUE, "Pointer to Name (uint16)",hf_winreg_winreg_StringBuf_name);
816
817         return offset;
818 }
819
820 static int
821 winreg_dissect_element_StringBuf_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
822 {
823         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, drep, winreg_dissect_element_StringBuf_name__);
824
825         return offset;
826 }
827
828 static int
829 winreg_dissect_element_StringBuf_name__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
830 {
831         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_StringBuf_name, 0);
832
833         return offset;
834 }
835
836 int
837 winreg_dissect_struct_StringBuf(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
838 {
839         proto_item *item = NULL;
840         proto_tree *tree = NULL;
841         int old_offset;
842
843         ALIGN_TO_4_BYTES;
844
845         old_offset = offset;
846
847         if (parent_tree) {
848                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
849                 tree = proto_item_add_subtree(item, ett_winreg_winreg_StringBuf);
850         }
851         
852         offset = winreg_dissect_element_StringBuf_length(tvb, offset, pinfo, tree, drep);
853
854         offset = winreg_dissect_element_StringBuf_size(tvb, offset, pinfo, tree, drep);
855
856         offset = winreg_dissect_element_StringBuf_name(tvb, offset, pinfo, tree, drep);
857
858
859         proto_item_set_len(item, offset-old_offset);
860
861         return offset;
862 }
863
864
865 /* IDL: struct { */
866 /* IDL:         uint32 data_size; */
867 /* IDL:         KeySecurityData sec_data; */
868 /* IDL:         uint8 inherit; */
869 /* IDL: } */
870
871 static int
872 winreg_dissect_element_KeySecurityAttribute_data_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
873 {
874         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_KeySecurityAttribute_data_size, 0);
875
876         return offset;
877 }
878
879 static int
880 winreg_dissect_element_KeySecurityAttribute_sec_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
881 {
882         offset = winreg_dissect_struct_KeySecurityData(tvb,offset,pinfo,tree,drep,hf_winreg_KeySecurityAttribute_sec_data,0);
883
884         return offset;
885 }
886
887 static int
888 winreg_dissect_element_KeySecurityAttribute_inherit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
889 {
890         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_KeySecurityAttribute_inherit, 0);
891
892         return offset;
893 }
894
895 int
896 winreg_dissect_struct_KeySecurityAttribute(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
897 {
898         proto_item *item = NULL;
899         proto_tree *tree = NULL;
900         int old_offset;
901
902         ALIGN_TO_4_BYTES;
903
904         old_offset = offset;
905
906         if (parent_tree) {
907                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
908                 tree = proto_item_add_subtree(item, ett_winreg_KeySecurityAttribute);
909         }
910         
911         offset = winreg_dissect_element_KeySecurityAttribute_data_size(tvb, offset, pinfo, tree, drep);
912
913         offset = winreg_dissect_element_KeySecurityAttribute_sec_data(tvb, offset, pinfo, tree, drep);
914
915         offset = winreg_dissect_element_KeySecurityAttribute_inherit(tvb, offset, pinfo, tree, drep);
916
917
918         proto_item_set_len(item, offset-old_offset);
919
920         return offset;
921 }
922
923
924 /* IDL: struct { */
925 /* IDL:         [unique(1)] winreg_String *name; */
926 /* IDL:         winreg_Type type; */
927 /* IDL:         uint32 offset; */
928 /* IDL:         uint32 length; */
929 /* IDL: } */
930
931 static int
932 winreg_dissect_element_QueryMultipleValue_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
933 {
934         offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryMultipleValue_name_, NDR_POINTER_UNIQUE, "Pointer to Name (winreg_String)",hf_winreg_QueryMultipleValue_name);
935
936         return offset;
937 }
938
939 static int
940 winreg_dissect_element_QueryMultipleValue_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
941 {
942         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, drep, 0, hf_winreg_QueryMultipleValue_name);
943
944         return offset;
945 }
946
947 static int
948 winreg_dissect_element_QueryMultipleValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
949 {
950         offset = winreg_dissect_enum_Type(tvb, offset, pinfo, tree, drep, hf_winreg_QueryMultipleValue_type, 0);
951
952         return offset;
953 }
954
955 static int
956 winreg_dissect_element_QueryMultipleValue_offset(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
957 {
958         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_QueryMultipleValue_offset, 0);
959
960         return offset;
961 }
962
963 static int
964 winreg_dissect_element_QueryMultipleValue_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
965 {
966         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_QueryMultipleValue_length, 0);
967
968         return offset;
969 }
970
971 int
972 winreg_dissect_struct_QueryMultipleValue(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
973 {
974         proto_item *item = NULL;
975         proto_tree *tree = NULL;
976         int old_offset;
977
978         ALIGN_TO_4_BYTES;
979
980         old_offset = offset;
981
982         if (parent_tree) {
983                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
984                 tree = proto_item_add_subtree(item, ett_winreg_QueryMultipleValue);
985         }
986         
987         offset = winreg_dissect_element_QueryMultipleValue_name(tvb, offset, pinfo, tree, drep);
988
989         offset = winreg_dissect_element_QueryMultipleValue_type(tvb, offset, pinfo, tree, drep);
990
991         offset = winreg_dissect_element_QueryMultipleValue_offset(tvb, offset, pinfo, tree, drep);
992
993         offset = winreg_dissect_element_QueryMultipleValue_length(tvb, offset, pinfo, tree, drep);
994
995
996         proto_item_set_len(item, offset-old_offset);
997
998         return offset;
999 }
1000
1001 static int
1002 winreg_dissect_element_OpenHKCR_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1003 {
1004         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKCR_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
1005
1006         return offset;
1007 }
1008
1009 static int
1010 winreg_dissect_element_OpenHKCR_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1011 {
1012         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_system_name, 0);
1013
1014         return offset;
1015 }
1016
1017 static int
1018 winreg_dissect_element_OpenHKCR_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1019 {
1020         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_access_mask, 0);
1021
1022         return offset;
1023 }
1024
1025 static int
1026 winreg_dissect_element_OpenHKCR_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1027 {
1028         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKCR_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1029
1030         return offset;
1031 }
1032
1033 static int
1034 winreg_dissect_element_OpenHKCR_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1035 {
1036         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
1037
1038         return offset;
1039 }
1040
1041 /* IDL: WERROR winreg_OpenHKCR( */
1042 /* IDL: [unique(1)] [in] uint16 *system_name, */
1043 /* IDL: [in] winreg_AccessMask access_mask, */
1044 /* IDL: [out] [ref] policy_handle *handle */
1045 /* IDL: ); */
1046
1047 static int
1048 winreg_dissect_OpenHKCR_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1049 {
1050         guint32 status;
1051
1052         pinfo->dcerpc_procedure_name="OpenHKCR";
1053         offset = winreg_dissect_element_OpenHKCR_handle(tvb, offset, pinfo, tree, drep);
1054         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1055
1056         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1057
1058         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1059                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1060
1061         return offset;
1062 }
1063
1064 static int
1065 winreg_dissect_OpenHKCR_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1066 {
1067         pinfo->dcerpc_procedure_name="OpenHKCR";
1068         offset = winreg_dissect_element_OpenHKCR_system_name(tvb, offset, pinfo, tree, drep);
1069         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1070         offset = winreg_dissect_element_OpenHKCR_access_mask(tvb, offset, pinfo, tree, drep);
1071         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1072         return offset;
1073 }
1074
1075 static int
1076 winreg_dissect_element_OpenHKCU_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1077 {
1078         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKCU_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
1079
1080         return offset;
1081 }
1082
1083 static int
1084 winreg_dissect_element_OpenHKCU_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1085 {
1086         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_system_name, 0);
1087
1088         return offset;
1089 }
1090
1091 static int
1092 winreg_dissect_element_OpenHKCU_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1093 {
1094         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_OpenHKCU_access_mask, 0);
1095
1096         return offset;
1097 }
1098
1099 static int
1100 winreg_dissect_element_OpenHKCU_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1101 {
1102         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKCU_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1103
1104         return offset;
1105 }
1106
1107 static int
1108 winreg_dissect_element_OpenHKCU_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1109 {
1110         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
1111
1112         return offset;
1113 }
1114
1115 /* IDL: WERROR winreg_OpenHKCU( */
1116 /* IDL: [unique(1)] [in] uint16 *system_name, */
1117 /* IDL: [in] winreg_AccessMask access_mask, */
1118 /* IDL: [out] [ref] policy_handle *handle */
1119 /* IDL: ); */
1120
1121 static int
1122 winreg_dissect_OpenHKCU_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1123 {
1124         guint32 status;
1125
1126         pinfo->dcerpc_procedure_name="OpenHKCU";
1127         offset = winreg_dissect_element_OpenHKCU_handle(tvb, offset, pinfo, tree, drep);
1128         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1129
1130         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1131
1132         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1133                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1134
1135         return offset;
1136 }
1137
1138 static int
1139 winreg_dissect_OpenHKCU_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1140 {
1141         pinfo->dcerpc_procedure_name="OpenHKCU";
1142         offset = winreg_dissect_element_OpenHKCU_system_name(tvb, offset, pinfo, tree, drep);
1143         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1144         offset = winreg_dissect_element_OpenHKCU_access_mask(tvb, offset, pinfo, tree, drep);
1145         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1146         return offset;
1147 }
1148
1149 static int
1150 winreg_dissect_element_OpenHKLM_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1151 {
1152         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKLM_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
1153
1154         return offset;
1155 }
1156
1157 static int
1158 winreg_dissect_element_OpenHKLM_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1159 {
1160         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_system_name, 0);
1161
1162         return offset;
1163 }
1164
1165 static int
1166 winreg_dissect_element_OpenHKLM_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1167 {
1168         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_access_mask, 0);
1169
1170         return offset;
1171 }
1172
1173 static int
1174 winreg_dissect_element_OpenHKLM_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1175 {
1176         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKLM_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1177
1178         return offset;
1179 }
1180
1181 static int
1182 winreg_dissect_element_OpenHKLM_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1183 {
1184         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
1185
1186         return offset;
1187 }
1188
1189 /* IDL: WERROR winreg_OpenHKLM( */
1190 /* IDL: [unique(1)] [in] uint16 *system_name, */
1191 /* IDL: [in] winreg_AccessMask access_mask, */
1192 /* IDL: [out] [ref] policy_handle *handle */
1193 /* IDL: ); */
1194
1195 static int
1196 winreg_dissect_OpenHKLM_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1197 {
1198         guint32 status;
1199
1200         pinfo->dcerpc_procedure_name="OpenHKLM";
1201         offset = winreg_dissect_element_OpenHKLM_handle(tvb, offset, pinfo, tree, drep);
1202         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1203
1204         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1205
1206         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1207                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1208
1209         return offset;
1210 }
1211
1212 static int
1213 winreg_dissect_OpenHKLM_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1214 {
1215         pinfo->dcerpc_procedure_name="OpenHKLM";
1216         offset = winreg_dissect_element_OpenHKLM_system_name(tvb, offset, pinfo, tree, drep);
1217         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1218         offset = winreg_dissect_element_OpenHKLM_access_mask(tvb, offset, pinfo, tree, drep);
1219         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1220         return offset;
1221 }
1222
1223 static int
1224 winreg_dissect_element_OpenHKPD_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1225 {
1226         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKPD_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
1227
1228         return offset;
1229 }
1230
1231 static int
1232 winreg_dissect_element_OpenHKPD_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1233 {
1234         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_system_name, 0);
1235
1236         return offset;
1237 }
1238
1239 static int
1240 winreg_dissect_element_OpenHKPD_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1241 {
1242         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_OpenHKPD_access_mask, 0);
1243
1244         return offset;
1245 }
1246
1247 static int
1248 winreg_dissect_element_OpenHKPD_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1249 {
1250         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKPD_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1251
1252         return offset;
1253 }
1254
1255 static int
1256 winreg_dissect_element_OpenHKPD_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1257 {
1258         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
1259
1260         return offset;
1261 }
1262
1263 /* IDL: WERROR winreg_OpenHKPD( */
1264 /* IDL: [unique(1)] [in] uint16 *system_name, */
1265 /* IDL: [in] winreg_AccessMask access_mask, */
1266 /* IDL: [out] [ref] policy_handle *handle */
1267 /* IDL: ); */
1268
1269 static int
1270 winreg_dissect_OpenHKPD_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1271 {
1272         guint32 status;
1273
1274         pinfo->dcerpc_procedure_name="OpenHKPD";
1275         offset = winreg_dissect_element_OpenHKPD_handle(tvb, offset, pinfo, tree, drep);
1276         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1277
1278         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1279
1280         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1281                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1282
1283         return offset;
1284 }
1285
1286 static int
1287 winreg_dissect_OpenHKPD_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1288 {
1289         pinfo->dcerpc_procedure_name="OpenHKPD";
1290         offset = winreg_dissect_element_OpenHKPD_system_name(tvb, offset, pinfo, tree, drep);
1291         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1292         offset = winreg_dissect_element_OpenHKPD_access_mask(tvb, offset, pinfo, tree, drep);
1293         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1294         return offset;
1295 }
1296
1297 static int
1298 winreg_dissect_element_OpenHKU_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1299 {
1300         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKU_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
1301
1302         return offset;
1303 }
1304
1305 static int
1306 winreg_dissect_element_OpenHKU_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1307 {
1308         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_system_name, 0);
1309
1310         return offset;
1311 }
1312
1313 static int
1314 winreg_dissect_element_OpenHKU_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1315 {
1316         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_access_mask, 0);
1317
1318         return offset;
1319 }
1320
1321 static int
1322 winreg_dissect_element_OpenHKU_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1323 {
1324         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKU_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1325
1326         return offset;
1327 }
1328
1329 static int
1330 winreg_dissect_element_OpenHKU_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1331 {
1332         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
1333
1334         return offset;
1335 }
1336
1337 /* IDL: WERROR winreg_OpenHKU( */
1338 /* IDL: [unique(1)] [in] uint16 *system_name, */
1339 /* IDL: [in] winreg_AccessMask access_mask, */
1340 /* IDL: [out] [ref] policy_handle *handle */
1341 /* IDL: ); */
1342
1343 static int
1344 winreg_dissect_OpenHKU_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1345 {
1346         guint32 status;
1347
1348         pinfo->dcerpc_procedure_name="OpenHKU";
1349         offset = winreg_dissect_element_OpenHKU_handle(tvb, offset, pinfo, tree, drep);
1350         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1351
1352         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1353
1354         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1355                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1356
1357         return offset;
1358 }
1359
1360 static int
1361 winreg_dissect_OpenHKU_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1362 {
1363         pinfo->dcerpc_procedure_name="OpenHKU";
1364         offset = winreg_dissect_element_OpenHKU_system_name(tvb, offset, pinfo, tree, drep);
1365         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1366         offset = winreg_dissect_element_OpenHKU_access_mask(tvb, offset, pinfo, tree, drep);
1367         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1368         return offset;
1369 }
1370
1371 static int
1372 winreg_dissect_element_CloseKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1373 {
1374         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_CloseKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1375
1376         return offset;
1377 }
1378
1379 static int
1380 winreg_dissect_element_CloseKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1381 {
1382         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_CLOSE);
1383
1384         return offset;
1385 }
1386
1387 /* IDL: WERROR winreg_CloseKey( */
1388 /* IDL: [out] [in] [ref] policy_handle *handle */
1389 /* IDL: ); */
1390
1391 static int
1392 winreg_dissect_CloseKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1393 {
1394         guint32 status;
1395
1396         pinfo->dcerpc_procedure_name="CloseKey";
1397         offset = winreg_dissect_element_CloseKey_handle(tvb, offset, pinfo, tree, drep);
1398         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1399
1400         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1401
1402         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1403                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1404
1405         return offset;
1406 }
1407
1408 static int
1409 winreg_dissect_CloseKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1410 {
1411         pinfo->dcerpc_procedure_name="CloseKey";
1412         offset = winreg_dissect_element_CloseKey_handle(tvb, offset, pinfo, tree, drep);
1413         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1414         return offset;
1415 }
1416
1417 static int
1418 winreg_dissect_element_CreateKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1419 {
1420         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_CreateKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1421
1422         return offset;
1423 }
1424
1425 static int
1426 winreg_dissect_element_CreateKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1427 {
1428         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
1429
1430         return offset;
1431 }
1432
1433 static int
1434 winreg_dissect_element_CreateKey_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1435 {
1436         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, drep, 0, hf_winreg_winreg_CreateKey_name);
1437
1438         return offset;
1439 }
1440
1441 static int
1442 winreg_dissect_element_CreateKey_keyclass(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1443 {
1444         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, drep, 0, hf_winreg_winreg_CreateKey_keyclass);
1445
1446         return offset;
1447 }
1448
1449 static int
1450 winreg_dissect_element_CreateKey_options(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1451 {
1452         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_CreateKey_options, 0);
1453
1454         return offset;
1455 }
1456
1457 static int
1458 winreg_dissect_element_CreateKey_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1459 {
1460         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_access_mask, 0);
1461
1462         return offset;
1463 }
1464
1465 static int
1466 winreg_dissect_element_CreateKey_secdesc(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1467 {
1468         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_CreateKey_secdesc_, NDR_POINTER_UNIQUE, "Pointer to Secdesc (winreg_SecBuf)",hf_winreg_winreg_CreateKey_secdesc);
1469
1470         return offset;
1471 }
1472
1473 static int
1474 winreg_dissect_element_CreateKey_secdesc_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1475 {
1476         offset = winreg_dissect_struct_SecBuf(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_CreateKey_secdesc,0);
1477
1478         return offset;
1479 }
1480
1481 static int
1482 winreg_dissect_element_CreateKey_new_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1483 {
1484         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_CreateKey_new_handle_, NDR_POINTER_REF, "Pointer to New Handle (policy_handle)",hf_winreg_winreg_CreateKey_new_handle);
1485
1486         return offset;
1487 }
1488
1489 static int
1490 winreg_dissect_element_CreateKey_new_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1491 {
1492         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_CreateKey_new_handle, PIDL_POLHND_OPEN);
1493
1494         return offset;
1495 }
1496
1497 static int
1498 winreg_dissect_element_CreateKey_action_taken(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1499 {
1500         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_CreateKey_action_taken_, NDR_POINTER_UNIQUE, "Pointer to Action Taken (winreg_CreateAction)",hf_winreg_winreg_CreateKey_action_taken);
1501
1502         return offset;
1503 }
1504
1505 static int
1506 winreg_dissect_element_CreateKey_action_taken_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1507 {
1508         offset = winreg_dissect_enum_CreateAction(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_CreateKey_action_taken, 0);
1509
1510         return offset;
1511 }
1512
1513 /* IDL: WERROR winreg_CreateKey( */
1514 /* IDL: [in] [ref] policy_handle *handle, */
1515 /* IDL: [in] winreg_String name, */
1516 /* IDL: [in] winreg_String keyclass, */
1517 /* IDL: [in] uint32 options, */
1518 /* IDL: [in] winreg_AccessMask access_mask, */
1519 /* IDL: [unique(1)] [in] winreg_SecBuf *secdesc, */
1520 /* IDL: [out] [ref] policy_handle *new_handle, */
1521 /* IDL: [out] [unique(1)] [in] winreg_CreateAction *action_taken */
1522 /* IDL: ); */
1523
1524 static int
1525 winreg_dissect_CreateKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1526 {
1527         guint32 status;
1528
1529         pinfo->dcerpc_procedure_name="CreateKey";
1530         offset = winreg_dissect_element_CreateKey_new_handle(tvb, offset, pinfo, tree, drep);
1531         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1532
1533         offset = winreg_dissect_element_CreateKey_action_taken(tvb, offset, pinfo, tree, drep);
1534         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1535
1536         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1537
1538         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1539                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1540
1541         return offset;
1542 }
1543
1544 static int
1545 winreg_dissect_CreateKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1546 {
1547         pinfo->dcerpc_procedure_name="CreateKey";
1548         offset = winreg_dissect_element_CreateKey_handle(tvb, offset, pinfo, tree, drep);
1549         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1550         offset = winreg_dissect_element_CreateKey_name(tvb, offset, pinfo, tree, drep);
1551         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1552         offset = winreg_dissect_element_CreateKey_keyclass(tvb, offset, pinfo, tree, drep);
1553         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1554         offset = winreg_dissect_element_CreateKey_options(tvb, offset, pinfo, tree, drep);
1555         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1556         offset = winreg_dissect_element_CreateKey_access_mask(tvb, offset, pinfo, tree, drep);
1557         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1558         offset = winreg_dissect_element_CreateKey_secdesc(tvb, offset, pinfo, tree, drep);
1559         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1560         offset = winreg_dissect_element_CreateKey_action_taken(tvb, offset, pinfo, tree, drep);
1561         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1562         return offset;
1563 }
1564
1565 static int
1566 winreg_dissect_element_DeleteKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1567 {
1568         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_DeleteKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1569
1570         return offset;
1571 }
1572
1573 static int
1574 winreg_dissect_element_DeleteKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1575 {
1576         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
1577
1578         return offset;
1579 }
1580
1581 static int
1582 winreg_dissect_element_DeleteKey_key(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1583 {
1584         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, drep, 0, hf_winreg_winreg_DeleteKey_key);
1585
1586         return offset;
1587 }
1588
1589 /* IDL: WERROR winreg_DeleteKey( */
1590 /* IDL: [in] [ref] policy_handle *handle, */
1591 /* IDL: [in] winreg_String key */
1592 /* IDL: ); */
1593
1594 static int
1595 winreg_dissect_DeleteKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1596 {
1597         guint32 status;
1598
1599         pinfo->dcerpc_procedure_name="DeleteKey";
1600         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1601
1602         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1603                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1604
1605         return offset;
1606 }
1607
1608 static int
1609 winreg_dissect_DeleteKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1610 {
1611         pinfo->dcerpc_procedure_name="DeleteKey";
1612         offset = winreg_dissect_element_DeleteKey_handle(tvb, offset, pinfo, tree, drep);
1613         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1614         offset = winreg_dissect_element_DeleteKey_key(tvb, offset, pinfo, tree, drep);
1615         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1616         return offset;
1617 }
1618
1619 static int
1620 winreg_dissect_element_DeleteValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1621 {
1622         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_DeleteValue_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1623
1624         return offset;
1625 }
1626
1627 static int
1628 winreg_dissect_element_DeleteValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1629 {
1630         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
1631
1632         return offset;
1633 }
1634
1635 static int
1636 winreg_dissect_element_DeleteValue_value(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1637 {
1638         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, drep, 0, hf_winreg_winreg_DeleteValue_value);
1639
1640         return offset;
1641 }
1642
1643 /* IDL: WERROR winreg_DeleteValue( */
1644 /* IDL: [in] [ref] policy_handle *handle, */
1645 /* IDL: [in] winreg_String value */
1646 /* IDL: ); */
1647
1648 static int
1649 winreg_dissect_DeleteValue_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1650 {
1651         guint32 status;
1652
1653         pinfo->dcerpc_procedure_name="DeleteValue";
1654         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1655
1656         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1657                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1658
1659         return offset;
1660 }
1661
1662 static int
1663 winreg_dissect_DeleteValue_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1664 {
1665         pinfo->dcerpc_procedure_name="DeleteValue";
1666         offset = winreg_dissect_element_DeleteValue_handle(tvb, offset, pinfo, tree, drep);
1667         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1668         offset = winreg_dissect_element_DeleteValue_value(tvb, offset, pinfo, tree, drep);
1669         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1670         return offset;
1671 }
1672
1673 static int
1674 winreg_dissect_element_EnumKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1675 {
1676         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1677
1678         return offset;
1679 }
1680
1681 static int
1682 winreg_dissect_element_EnumKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1683 {
1684         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
1685
1686         return offset;
1687 }
1688
1689 static int
1690 winreg_dissect_element_EnumKey_enum_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1691 {
1692         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_EnumKey_enum_index, 0);
1693
1694         return offset;
1695 }
1696
1697 static int
1698 winreg_dissect_element_EnumKey_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1699 {
1700         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumKey_name_, NDR_POINTER_REF, "Pointer to Name (winreg_StringBuf)",hf_winreg_winreg_EnumKey_name);
1701
1702         return offset;
1703 }
1704
1705 static int
1706 winreg_dissect_element_EnumKey_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1707 {
1708         offset = winreg_dissect_struct_StringBuf(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_EnumKey_name,0);
1709
1710         return offset;
1711 }
1712
1713 static int
1714 winreg_dissect_element_EnumKey_keyclass(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1715 {
1716         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumKey_keyclass_, NDR_POINTER_UNIQUE, "Pointer to Keyclass (winreg_StringBuf)",hf_winreg_winreg_EnumKey_keyclass);
1717
1718         return offset;
1719 }
1720
1721 static int
1722 winreg_dissect_element_EnumKey_keyclass_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1723 {
1724         offset = winreg_dissect_struct_StringBuf(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_EnumKey_keyclass,0);
1725
1726         return offset;
1727 }
1728
1729 static int
1730 winreg_dissect_element_EnumKey_last_changed_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1731 {
1732         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumKey_last_changed_time_, NDR_POINTER_UNIQUE, "Pointer to Last Changed Time (NTTIME)",hf_winreg_winreg_EnumKey_last_changed_time);
1733
1734         return offset;
1735 }
1736
1737 static int
1738 winreg_dissect_element_EnumKey_last_changed_time_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1739 {
1740         offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_EnumKey_last_changed_time);
1741
1742         return offset;
1743 }
1744
1745 /* IDL: WERROR winreg_EnumKey( */
1746 /* IDL: [in] [ref] policy_handle *handle, */
1747 /* IDL: [in] uint32 enum_index, */
1748 /* IDL: [out] [in] [ref] winreg_StringBuf *name, */
1749 /* IDL: [out] [unique(1)] [in] winreg_StringBuf *keyclass, */
1750 /* IDL: [out] [unique(1)] [in] NTTIME *last_changed_time */
1751 /* IDL: ); */
1752
1753 static int
1754 winreg_dissect_EnumKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1755 {
1756         guint32 status;
1757
1758         pinfo->dcerpc_procedure_name="EnumKey";
1759         offset = winreg_dissect_element_EnumKey_name(tvb, offset, pinfo, tree, drep);
1760         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1761
1762         offset = winreg_dissect_element_EnumKey_keyclass(tvb, offset, pinfo, tree, drep);
1763         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1764
1765         offset = winreg_dissect_element_EnumKey_last_changed_time(tvb, offset, pinfo, tree, drep);
1766         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1767
1768         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1769
1770         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1771                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1772
1773         return offset;
1774 }
1775
1776 static int
1777 winreg_dissect_EnumKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1778 {
1779         pinfo->dcerpc_procedure_name="EnumKey";
1780         offset = winreg_dissect_element_EnumKey_handle(tvb, offset, pinfo, tree, drep);
1781         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1782         offset = winreg_dissect_element_EnumKey_enum_index(tvb, offset, pinfo, tree, drep);
1783         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1784         offset = winreg_dissect_element_EnumKey_name(tvb, offset, pinfo, tree, drep);
1785         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1786         offset = winreg_dissect_element_EnumKey_keyclass(tvb, offset, pinfo, tree, drep);
1787         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1788         offset = winreg_dissect_element_EnumKey_last_changed_time(tvb, offset, pinfo, tree, drep);
1789         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1790         return offset;
1791 }
1792
1793 static int
1794 winreg_dissect_element_EnumValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1795 {
1796         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumValue_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1797
1798         return offset;
1799 }
1800
1801 static int
1802 winreg_dissect_element_EnumValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1803 {
1804         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
1805
1806         return offset;
1807 }
1808
1809 static int
1810 winreg_dissect_element_EnumValue_enum_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1811 {
1812         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_EnumValue_enum_index, 0);
1813
1814         return offset;
1815 }
1816
1817 static int
1818 winreg_dissect_element_EnumValue_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1819 {
1820         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumValue_name_, NDR_POINTER_REF, "Pointer to Name (winreg_StringBuf)",hf_winreg_winreg_EnumValue_name);
1821
1822         return offset;
1823 }
1824
1825 static int
1826 winreg_dissect_element_EnumValue_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1827 {
1828         offset = winreg_dissect_struct_StringBuf(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_EnumValue_name,0);
1829
1830         return offset;
1831 }
1832
1833 static int
1834 winreg_dissect_element_EnumValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1835 {
1836         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumValue_type_, NDR_POINTER_UNIQUE, "Pointer to Type (winreg_Type)",hf_winreg_winreg_EnumValue_type);
1837
1838         return offset;
1839 }
1840
1841 static int
1842 winreg_dissect_element_EnumValue_type_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1843 {
1844         offset = winreg_dissect_enum_Type(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_EnumValue_type, 0);
1845
1846         return offset;
1847 }
1848
1849 static int
1850 winreg_dissect_element_EnumValue_value(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1851 {
1852         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumValue_value_, NDR_POINTER_UNIQUE, "Pointer to Value (uint8)",hf_winreg_winreg_EnumValue_value);
1853
1854         return offset;
1855 }
1856
1857 static int
1858 winreg_dissect_element_EnumValue_value_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1859 {
1860         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumValue_value__);
1861
1862         return offset;
1863 }
1864
1865 static int
1866 winreg_dissect_element_EnumValue_value__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1867 {
1868         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_EnumValue_value, 0);
1869
1870         return offset;
1871 }
1872
1873 static int
1874 winreg_dissect_element_EnumValue_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1875 {
1876         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumValue_size_, NDR_POINTER_UNIQUE, "Pointer to Size (uint32)",hf_winreg_winreg_EnumValue_size);
1877
1878         return offset;
1879 }
1880
1881 static int
1882 winreg_dissect_element_EnumValue_size_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1883 {
1884         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_EnumValue_size, 0);
1885
1886         return offset;
1887 }
1888
1889 static int
1890 winreg_dissect_element_EnumValue_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1891 {
1892         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumValue_length_, NDR_POINTER_UNIQUE, "Pointer to Length (uint32)",hf_winreg_winreg_EnumValue_length);
1893
1894         return offset;
1895 }
1896
1897 static int
1898 winreg_dissect_element_EnumValue_length_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1899 {
1900         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_EnumValue_length, 0);
1901
1902         return offset;
1903 }
1904
1905 /* IDL: WERROR winreg_EnumValue( */
1906 /* IDL: [in] [ref] policy_handle *handle, */
1907 /* IDL: [in] uint32 enum_index, */
1908 /* IDL: [out] [in] [ref] winreg_StringBuf *name, */
1909 /* IDL: [out] [unique(1)] [in] winreg_Type *type, */
1910 /* IDL: [out] [unique(1)] [in] [length_is(*length)] [size_is(*size)] uint8 *value, */
1911 /* IDL: [out] [unique(1)] [in] uint32 *size, */
1912 /* IDL: [out] [unique(1)] [in] uint32 *length */
1913 /* IDL: ); */
1914
1915 static int
1916 winreg_dissect_EnumValue_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1917 {
1918         guint32 status;
1919
1920         pinfo->dcerpc_procedure_name="EnumValue";
1921         offset = winreg_dissect_element_EnumValue_name(tvb, offset, pinfo, tree, drep);
1922         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1923
1924         offset = winreg_dissect_element_EnumValue_type(tvb, offset, pinfo, tree, drep);
1925         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1926
1927         offset = winreg_dissect_element_EnumValue_value(tvb, offset, pinfo, tree, drep);
1928         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1929
1930         offset = winreg_dissect_element_EnumValue_size(tvb, offset, pinfo, tree, drep);
1931         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1932
1933         offset = winreg_dissect_element_EnumValue_length(tvb, offset, pinfo, tree, drep);
1934         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1935
1936         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1937
1938         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1939                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1940
1941         return offset;
1942 }
1943
1944 static int
1945 winreg_dissect_EnumValue_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1946 {
1947         pinfo->dcerpc_procedure_name="EnumValue";
1948         offset = winreg_dissect_element_EnumValue_handle(tvb, offset, pinfo, tree, drep);
1949         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1950         offset = winreg_dissect_element_EnumValue_enum_index(tvb, offset, pinfo, tree, drep);
1951         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1952         offset = winreg_dissect_element_EnumValue_name(tvb, offset, pinfo, tree, drep);
1953         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1954         offset = winreg_dissect_element_EnumValue_type(tvb, offset, pinfo, tree, drep);
1955         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1956         offset = winreg_dissect_element_EnumValue_value(tvb, offset, pinfo, tree, drep);
1957         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1958         offset = winreg_dissect_element_EnumValue_size(tvb, offset, pinfo, tree, drep);
1959         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1960         offset = winreg_dissect_element_EnumValue_length(tvb, offset, pinfo, tree, drep);
1961         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1962         return offset;
1963 }
1964
1965 static int
1966 winreg_dissect_element_FlushKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1967 {
1968         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_FlushKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1969
1970         return offset;
1971 }
1972
1973 static int
1974 winreg_dissect_element_FlushKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1975 {
1976         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
1977
1978         return offset;
1979 }
1980
1981 /* IDL: WERROR winreg_FlushKey( */
1982 /* IDL: [in] [ref] policy_handle *handle */
1983 /* IDL: ); */
1984
1985 static int
1986 winreg_dissect_FlushKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1987 {
1988         guint32 status;
1989
1990         pinfo->dcerpc_procedure_name="FlushKey";
1991         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1992
1993         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1994                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1995
1996         return offset;
1997 }
1998
1999 static int
2000 winreg_dissect_FlushKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2001 {
2002         pinfo->dcerpc_procedure_name="FlushKey";
2003         offset = winreg_dissect_element_FlushKey_handle(tvb, offset, pinfo, tree, drep);
2004         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2005         return offset;
2006 }
2007
2008 static int
2009 winreg_dissect_element_GetKeySecurity_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2010 {
2011         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_GetKeySecurity_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2012
2013         return offset;
2014 }
2015
2016 static int
2017 winreg_dissect_element_GetKeySecurity_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2018 {
2019         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
2020
2021         return offset;
2022 }
2023
2024 static int
2025 winreg_dissect_element_GetKeySecurity_sec_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2026 {
2027                 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_GetKeySecurity_sec_info, NULL);
2028
2029         return offset;
2030 }
2031
2032 static int
2033 winreg_dissect_element_GetKeySecurity_sd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2034 {
2035         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_GetKeySecurity_sd_, NDR_POINTER_REF, "Pointer to Sd (KeySecurityData)",hf_winreg_sd);
2036
2037         return offset;
2038 }
2039
2040 static int
2041 winreg_dissect_element_GetKeySecurity_sd_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2042 {
2043         offset = winreg_dissect_struct_KeySecurityData(tvb,offset,pinfo,tree,drep,hf_winreg_sd,0);
2044
2045         return offset;
2046 }
2047
2048 /* IDL: WERROR winreg_GetKeySecurity( */
2049 /* IDL: [in] [ref] policy_handle *handle, */
2050 /* IDL: [in] security_secinfo sec_info, */
2051 /* IDL: [out] [in] [ref] KeySecurityData *sd */
2052 /* IDL: ); */
2053
2054 static int
2055 winreg_dissect_GetKeySecurity_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2056 {
2057         guint32 status;
2058
2059         pinfo->dcerpc_procedure_name="GetKeySecurity";
2060         offset = winreg_dissect_element_GetKeySecurity_sd(tvb, offset, pinfo, tree, drep);
2061         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2062
2063         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2064
2065         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2066                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2067
2068         return offset;
2069 }
2070
2071 static int
2072 winreg_dissect_GetKeySecurity_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2073 {
2074         pinfo->dcerpc_procedure_name="GetKeySecurity";
2075         offset = winreg_dissect_element_GetKeySecurity_handle(tvb, offset, pinfo, tree, drep);
2076         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2077         offset = winreg_dissect_element_GetKeySecurity_sec_info(tvb, offset, pinfo, tree, drep);
2078         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2079         offset = winreg_dissect_element_GetKeySecurity_sd(tvb, offset, pinfo, tree, drep);
2080         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2081         return offset;
2082 }
2083
2084 static int
2085 winreg_dissect_element_LoadKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2086 {
2087         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_LoadKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2088
2089         return offset;
2090 }
2091
2092 static int
2093 winreg_dissect_element_LoadKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2094 {
2095         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
2096
2097         return offset;
2098 }
2099
2100 static int
2101 winreg_dissect_element_LoadKey_keyname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2102 {
2103         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_LoadKey_keyname_, NDR_POINTER_UNIQUE, "Pointer to Keyname (winreg_String)",hf_winreg_winreg_LoadKey_keyname);
2104
2105         return offset;
2106 }
2107
2108 static int
2109 winreg_dissect_element_LoadKey_keyname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2110 {
2111         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, drep, 0, hf_winreg_winreg_LoadKey_keyname);
2112
2113         return offset;
2114 }
2115
2116 static int
2117 winreg_dissect_element_LoadKey_filename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2118 {
2119         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_LoadKey_filename_, NDR_POINTER_UNIQUE, "Pointer to Filename (winreg_String)",hf_winreg_winreg_LoadKey_filename);
2120
2121         return offset;
2122 }
2123
2124 static int
2125 winreg_dissect_element_LoadKey_filename_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2126 {
2127         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, drep, 0, hf_winreg_winreg_LoadKey_filename);
2128
2129         return offset;
2130 }
2131
2132 /* IDL: WERROR winreg_LoadKey( */
2133 /* IDL: [in] [ref] policy_handle *handle, */
2134 /* IDL: [unique(1)] [in] winreg_String *keyname, */
2135 /* IDL: [unique(1)] [in] winreg_String *filename */
2136 /* IDL: ); */
2137
2138 static int
2139 winreg_dissect_LoadKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2140 {
2141         guint32 status;
2142
2143         pinfo->dcerpc_procedure_name="LoadKey";
2144         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2145
2146         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2147                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2148
2149         return offset;
2150 }
2151
2152 static int
2153 winreg_dissect_LoadKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2154 {
2155         pinfo->dcerpc_procedure_name="LoadKey";
2156         offset = winreg_dissect_element_LoadKey_handle(tvb, offset, pinfo, tree, drep);
2157         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2158         offset = winreg_dissect_element_LoadKey_keyname(tvb, offset, pinfo, tree, drep);
2159         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2160         offset = winreg_dissect_element_LoadKey_filename(tvb, offset, pinfo, tree, drep);
2161         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2162         return offset;
2163 }
2164
2165 static int
2166 winreg_dissect_element_NotifyChangeKeyValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2167 {
2168         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_NotifyChangeKeyValue_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2169
2170         return offset;
2171 }
2172
2173 static int
2174 winreg_dissect_element_NotifyChangeKeyValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2175 {
2176         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
2177
2178         return offset;
2179 }
2180
2181 static int
2182 winreg_dissect_element_NotifyChangeKeyValue_watch_subtree(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2183 {
2184         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_NotifyChangeKeyValue_watch_subtree, 0);
2185
2186         return offset;
2187 }
2188
2189 static int
2190 winreg_dissect_element_NotifyChangeKeyValue_notify_filter(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2191 {
2192         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_NotifyChangeKeyValue_notify_filter, 0);
2193
2194         return offset;
2195 }
2196
2197 static int
2198 winreg_dissect_element_NotifyChangeKeyValue_unknown(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2199 {
2200         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_NotifyChangeKeyValue_unknown, 0);
2201
2202         return offset;
2203 }
2204
2205 static int
2206 winreg_dissect_element_NotifyChangeKeyValue_string1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2207 {
2208         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, drep, 0, hf_winreg_winreg_NotifyChangeKeyValue_string1);
2209
2210         return offset;
2211 }
2212
2213 static int
2214 winreg_dissect_element_NotifyChangeKeyValue_string2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2215 {
2216         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, drep, 0, hf_winreg_winreg_NotifyChangeKeyValue_string2);
2217
2218         return offset;
2219 }
2220
2221 static int
2222 winreg_dissect_element_NotifyChangeKeyValue_unknown2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2223 {
2224         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_NotifyChangeKeyValue_unknown2, 0);
2225
2226         return offset;
2227 }
2228
2229 /* IDL: WERROR winreg_NotifyChangeKeyValue( */
2230 /* IDL: [in] [ref] policy_handle *handle, */
2231 /* IDL: [in] uint8 watch_subtree, */
2232 /* IDL: [in] uint32 notify_filter, */
2233 /* IDL: [in] uint32 unknown, */
2234 /* IDL: [in] winreg_String string1, */
2235 /* IDL: [in] winreg_String string2, */
2236 /* IDL: [in] uint32 unknown2 */
2237 /* IDL: ); */
2238
2239 static int
2240 winreg_dissect_NotifyChangeKeyValue_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2241 {
2242         guint32 status;
2243
2244         pinfo->dcerpc_procedure_name="NotifyChangeKeyValue";
2245         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2246
2247         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2248                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2249
2250         return offset;
2251 }
2252
2253 static int
2254 winreg_dissect_NotifyChangeKeyValue_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2255 {
2256         pinfo->dcerpc_procedure_name="NotifyChangeKeyValue";
2257         offset = winreg_dissect_element_NotifyChangeKeyValue_handle(tvb, offset, pinfo, tree, drep);
2258         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2259         offset = winreg_dissect_element_NotifyChangeKeyValue_watch_subtree(tvb, offset, pinfo, tree, drep);
2260         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2261         offset = winreg_dissect_element_NotifyChangeKeyValue_notify_filter(tvb, offset, pinfo, tree, drep);
2262         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2263         offset = winreg_dissect_element_NotifyChangeKeyValue_unknown(tvb, offset, pinfo, tree, drep);
2264         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2265         offset = winreg_dissect_element_NotifyChangeKeyValue_string1(tvb, offset, pinfo, tree, drep);
2266         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2267         offset = winreg_dissect_element_NotifyChangeKeyValue_string2(tvb, offset, pinfo, tree, drep);
2268         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2269         offset = winreg_dissect_element_NotifyChangeKeyValue_unknown2(tvb, offset, pinfo, tree, drep);
2270         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2271         return offset;
2272 }
2273
2274 static int
2275 winreg_dissect_element_OpenKey_parent_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2276 {
2277         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenKey_parent_handle_, NDR_POINTER_REF, "Pointer to Parent Handle (policy_handle)",hf_winreg_winreg_OpenKey_parent_handle);
2278
2279         return offset;
2280 }
2281
2282 static int
2283 winreg_dissect_element_OpenKey_parent_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2284 {
2285         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_OpenKey_parent_handle, 0);
2286
2287         return offset;
2288 }
2289
2290 static int
2291 winreg_dissect_element_OpenKey_keyname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2292 {
2293         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, drep, 0, hf_winreg_winreg_OpenKey_keyname);
2294
2295         return offset;
2296 }
2297
2298 static int
2299 winreg_dissect_element_OpenKey_unknown(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2300 {
2301         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_OpenKey_unknown, 0);
2302
2303         return offset;
2304 }
2305
2306 static int
2307 winreg_dissect_element_OpenKey_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2308 {
2309         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_OpenKey_access_mask, 0);
2310
2311         return offset;
2312 }
2313
2314 static int
2315 winreg_dissect_element_OpenKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2316 {
2317         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2318
2319         return offset;
2320 }
2321
2322 static int
2323 winreg_dissect_element_OpenKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2324 {
2325         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
2326
2327         return offset;
2328 }
2329
2330 /* IDL: WERROR winreg_OpenKey( */
2331 /* IDL: [in] [ref] policy_handle *parent_handle, */
2332 /* IDL: [in] winreg_String keyname, */
2333 /* IDL: [in] uint32 unknown, */
2334 /* IDL: [in] winreg_AccessMask access_mask, */
2335 /* IDL: [out] [ref] policy_handle *handle */
2336 /* IDL: ); */
2337
2338 static int
2339 winreg_dissect_OpenKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2340 {
2341         guint32 status;
2342
2343         pinfo->dcerpc_procedure_name="OpenKey";
2344         offset = winreg_dissect_element_OpenKey_handle(tvb, offset, pinfo, tree, drep);
2345         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2346
2347         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2348
2349         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2350                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2351
2352         return offset;
2353 }
2354
2355 static int
2356 winreg_dissect_OpenKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2357 {
2358         pinfo->dcerpc_procedure_name="OpenKey";
2359         offset = winreg_dissect_element_OpenKey_parent_handle(tvb, offset, pinfo, tree, drep);
2360         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2361         offset = winreg_dissect_element_OpenKey_keyname(tvb, offset, pinfo, tree, drep);
2362         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2363         offset = winreg_dissect_element_OpenKey_unknown(tvb, offset, pinfo, tree, drep);
2364         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2365         offset = winreg_dissect_element_OpenKey_access_mask(tvb, offset, pinfo, tree, drep);
2366         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2367         return offset;
2368 }
2369
2370 static int
2371 winreg_dissect_element_QueryInfoKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2372 {
2373         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2374
2375         return offset;
2376 }
2377
2378 static int
2379 winreg_dissect_element_QueryInfoKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2380 {
2381         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
2382
2383         return offset;
2384 }
2385
2386 static int
2387 winreg_dissect_element_QueryInfoKey_classname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2388 {
2389         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_classname_, NDR_POINTER_REF, "Pointer to Classname (winreg_String)",hf_winreg_winreg_QueryInfoKey_classname);
2390
2391         return offset;
2392 }
2393
2394 static int
2395 winreg_dissect_element_QueryInfoKey_classname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2396 {
2397         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, drep, 0, hf_winreg_winreg_QueryInfoKey_classname);
2398
2399         return offset;
2400 }
2401
2402 static int
2403 winreg_dissect_element_QueryInfoKey_num_subkeys(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2404 {
2405         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_num_subkeys_, NDR_POINTER_REF, "Pointer to Num Subkeys (uint32)",hf_winreg_winreg_QueryInfoKey_num_subkeys);
2406
2407         return offset;
2408 }
2409
2410 static int
2411 winreg_dissect_element_QueryInfoKey_num_subkeys_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2412 {
2413         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryInfoKey_num_subkeys, 0);
2414
2415         return offset;
2416 }
2417
2418 static int
2419 winreg_dissect_element_QueryInfoKey_max_subkeylen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2420 {
2421         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_max_subkeylen_, NDR_POINTER_REF, "Pointer to Max Subkeylen (uint32)",hf_winreg_winreg_QueryInfoKey_max_subkeylen);
2422
2423         return offset;
2424 }
2425
2426 static int
2427 winreg_dissect_element_QueryInfoKey_max_subkeylen_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2428 {
2429         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryInfoKey_max_subkeylen, 0);
2430
2431         return offset;
2432 }
2433
2434 static int
2435 winreg_dissect_element_QueryInfoKey_max_subkeysize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2436 {
2437         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_max_subkeysize_, NDR_POINTER_REF, "Pointer to Max Subkeysize (uint32)",hf_winreg_winreg_QueryInfoKey_max_subkeysize);
2438
2439         return offset;
2440 }
2441
2442 static int
2443 winreg_dissect_element_QueryInfoKey_max_subkeysize_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2444 {
2445         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryInfoKey_max_subkeysize, 0);
2446
2447         return offset;
2448 }
2449
2450 static int
2451 winreg_dissect_element_QueryInfoKey_num_values(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2452 {
2453         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_num_values_, NDR_POINTER_REF, "Pointer to Num Values (uint32)",hf_winreg_winreg_QueryInfoKey_num_values);
2454
2455         return offset;
2456 }
2457
2458 static int
2459 winreg_dissect_element_QueryInfoKey_num_values_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2460 {
2461         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryInfoKey_num_values, 0);
2462
2463         return offset;
2464 }
2465
2466 static int
2467 winreg_dissect_element_QueryInfoKey_max_valnamelen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2468 {
2469         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_max_valnamelen_, NDR_POINTER_REF, "Pointer to Max Valnamelen (uint32)",hf_winreg_winreg_QueryInfoKey_max_valnamelen);
2470
2471         return offset;
2472 }
2473
2474 static int
2475 winreg_dissect_element_QueryInfoKey_max_valnamelen_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2476 {
2477         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryInfoKey_max_valnamelen, 0);
2478
2479         return offset;
2480 }
2481
2482 static int
2483 winreg_dissect_element_QueryInfoKey_max_valbufsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2484 {
2485         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_max_valbufsize_, NDR_POINTER_REF, "Pointer to Max Valbufsize (uint32)",hf_winreg_winreg_QueryInfoKey_max_valbufsize);
2486
2487         return offset;
2488 }
2489
2490 static int
2491 winreg_dissect_element_QueryInfoKey_max_valbufsize_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2492 {
2493         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryInfoKey_max_valbufsize, 0);
2494
2495         return offset;
2496 }
2497
2498 static int
2499 winreg_dissect_element_QueryInfoKey_secdescsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2500 {
2501         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_secdescsize_, NDR_POINTER_REF, "Pointer to Secdescsize (uint32)",hf_winreg_winreg_QueryInfoKey_secdescsize);
2502
2503         return offset;
2504 }
2505
2506 static int
2507 winreg_dissect_element_QueryInfoKey_secdescsize_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2508 {
2509         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryInfoKey_secdescsize, 0);
2510
2511         return offset;
2512 }
2513
2514 static int
2515 winreg_dissect_element_QueryInfoKey_last_changed_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2516 {
2517         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_last_changed_time_, NDR_POINTER_REF, "Pointer to Last Changed Time (NTTIME)",hf_winreg_winreg_QueryInfoKey_last_changed_time);
2518
2519         return offset;
2520 }
2521
2522 static int
2523 winreg_dissect_element_QueryInfoKey_last_changed_time_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2524 {
2525         offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryInfoKey_last_changed_time);
2526
2527         return offset;
2528 }
2529
2530 /* IDL: WERROR winreg_QueryInfoKey( */
2531 /* IDL: [in] [ref] policy_handle *handle, */
2532 /* IDL: [out] [in] [ref] winreg_String *classname, */
2533 /* IDL: [out] [ref] uint32 *num_subkeys, */
2534 /* IDL: [out] [ref] uint32 *max_subkeylen, */
2535 /* IDL: [out] [ref] uint32 *max_subkeysize, */
2536 /* IDL: [out] [ref] uint32 *num_values, */
2537 /* IDL: [out] [ref] uint32 *max_valnamelen, */
2538 /* IDL: [out] [ref] uint32 *max_valbufsize, */
2539 /* IDL: [out] [ref] uint32 *secdescsize, */
2540 /* IDL: [out] [ref] NTTIME *last_changed_time */
2541 /* IDL: ); */
2542
2543 static int
2544 winreg_dissect_QueryInfoKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2545 {
2546         guint32 status;
2547
2548         pinfo->dcerpc_procedure_name="QueryInfoKey";
2549         offset = winreg_dissect_element_QueryInfoKey_classname(tvb, offset, pinfo, tree, drep);
2550         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2551
2552         offset = winreg_dissect_element_QueryInfoKey_num_subkeys(tvb, offset, pinfo, tree, drep);
2553         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2554
2555         offset = winreg_dissect_element_QueryInfoKey_max_subkeylen(tvb, offset, pinfo, tree, drep);
2556         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2557
2558         offset = winreg_dissect_element_QueryInfoKey_max_subkeysize(tvb, offset, pinfo, tree, drep);
2559         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2560
2561         offset = winreg_dissect_element_QueryInfoKey_num_values(tvb, offset, pinfo, tree, drep);
2562         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2563
2564         offset = winreg_dissect_element_QueryInfoKey_max_valnamelen(tvb, offset, pinfo, tree, drep);
2565         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2566
2567         offset = winreg_dissect_element_QueryInfoKey_max_valbufsize(tvb, offset, pinfo, tree, drep);
2568         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2569
2570         offset = winreg_dissect_element_QueryInfoKey_secdescsize(tvb, offset, pinfo, tree, drep);
2571         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2572
2573         offset = winreg_dissect_element_QueryInfoKey_last_changed_time(tvb, offset, pinfo, tree, drep);
2574         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2575
2576         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2577
2578         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2579                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2580
2581         return offset;
2582 }
2583
2584 static int
2585 winreg_dissect_QueryInfoKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2586 {
2587         pinfo->dcerpc_procedure_name="QueryInfoKey";
2588         offset = winreg_dissect_element_QueryInfoKey_handle(tvb, offset, pinfo, tree, drep);
2589         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2590         offset = winreg_dissect_element_QueryInfoKey_classname(tvb, offset, pinfo, tree, drep);
2591         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2592         return offset;
2593 }
2594
2595 static int
2596 winreg_dissect_element_QueryValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2597 {
2598         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryValue_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2599
2600         return offset;
2601 }
2602
2603 static int
2604 winreg_dissect_element_QueryValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2605 {
2606         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
2607
2608         return offset;
2609 }
2610
2611 static int
2612 winreg_dissect_element_QueryValue_value_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2613 {
2614         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, drep, 0, hf_winreg_winreg_QueryValue_value_name);
2615
2616         return offset;
2617 }
2618
2619 static int
2620 winreg_dissect_element_QueryValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2621 {
2622         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryValue_type_, NDR_POINTER_UNIQUE, "Pointer to Type (winreg_Type)",hf_winreg_winreg_QueryValue_type);
2623
2624         return offset;
2625 }
2626
2627 static int
2628 winreg_dissect_element_QueryValue_type_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2629 {
2630         offset = winreg_dissect_enum_Type(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryValue_type, 0);
2631
2632         return offset;
2633 }
2634
2635 static int
2636 winreg_dissect_element_QueryValue_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2637 {
2638         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryValue_data_, NDR_POINTER_UNIQUE, "Pointer to Data (uint8)",hf_winreg_winreg_QueryValue_data);
2639
2640         return offset;
2641 }
2642
2643 static int
2644 winreg_dissect_element_QueryValue_data_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2645 {
2646         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryValue_data__);
2647
2648         return offset;
2649 }
2650
2651 static int
2652 winreg_dissect_element_QueryValue_data__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2653 {
2654         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryValue_data, 0);
2655
2656         return offset;
2657 }
2658
2659 static int
2660 winreg_dissect_element_QueryValue_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2661 {
2662         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryValue_size_, NDR_POINTER_UNIQUE, "Pointer to Size (uint32)",hf_winreg_winreg_QueryValue_size);
2663
2664         return offset;
2665 }
2666
2667 static int
2668 winreg_dissect_element_QueryValue_size_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2669 {
2670         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryValue_size, 0);
2671
2672         return offset;
2673 }
2674
2675 static int
2676 winreg_dissect_element_QueryValue_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2677 {
2678         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryValue_length_, NDR_POINTER_UNIQUE, "Pointer to Length (uint32)",hf_winreg_winreg_QueryValue_length);
2679
2680         return offset;
2681 }
2682
2683 static int
2684 winreg_dissect_element_QueryValue_length_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2685 {
2686         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryValue_length, 0);
2687
2688         return offset;
2689 }
2690
2691 /* IDL: WERROR winreg_QueryValue( */
2692 /* IDL: [in] [ref] policy_handle *handle, */
2693 /* IDL: [in] winreg_String value_name, */
2694 /* IDL: [unique(1)] [out] [in] winreg_Type *type, */
2695 /* IDL: [unique(1)] [out] [in] [length_is(*length)] [size_is(*size)] uint8 *data, */
2696 /* IDL: [unique(1)] [out] [in] uint32 *size, */
2697 /* IDL: [unique(1)] [out] [in] uint32 *length */
2698 /* IDL: ); */
2699
2700 static int
2701 winreg_dissect_QueryValue_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2702 {
2703         guint32 status;
2704
2705         pinfo->dcerpc_procedure_name="QueryValue";
2706         offset = winreg_dissect_element_QueryValue_type(tvb, offset, pinfo, tree, drep);
2707         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2708
2709         offset = winreg_dissect_element_QueryValue_data(tvb, offset, pinfo, tree, drep);
2710         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2711
2712         offset = winreg_dissect_element_QueryValue_size(tvb, offset, pinfo, tree, drep);
2713         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2714
2715         offset = winreg_dissect_element_QueryValue_length(tvb, offset, pinfo, tree, drep);
2716         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2717
2718         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2719
2720         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2721                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2722
2723         return offset;
2724 }
2725
2726 static int
2727 winreg_dissect_QueryValue_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2728 {
2729         pinfo->dcerpc_procedure_name="QueryValue";
2730         offset = winreg_dissect_element_QueryValue_handle(tvb, offset, pinfo, tree, drep);
2731         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2732         offset = winreg_dissect_element_QueryValue_value_name(tvb, offset, pinfo, tree, drep);
2733         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2734         offset = winreg_dissect_element_QueryValue_type(tvb, offset, pinfo, tree, drep);
2735         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2736         offset = winreg_dissect_element_QueryValue_data(tvb, offset, pinfo, tree, drep);
2737         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2738         offset = winreg_dissect_element_QueryValue_size(tvb, offset, pinfo, tree, drep);
2739         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2740         offset = winreg_dissect_element_QueryValue_length(tvb, offset, pinfo, tree, drep);
2741         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2742         return offset;
2743 }
2744
2745 /* IDL: WERROR winreg_ReplaceKey( */
2746 /* IDL:  */
2747 /* IDL: ); */
2748
2749 static int
2750 winreg_dissect_ReplaceKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2751 {
2752         guint32 status;
2753
2754         pinfo->dcerpc_procedure_name="ReplaceKey";
2755         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2756
2757         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2758                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2759
2760         return offset;
2761 }
2762
2763 static int
2764 winreg_dissect_ReplaceKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2765 {
2766         pinfo->dcerpc_procedure_name="ReplaceKey";
2767         return offset;
2768 }
2769
2770 static int
2771 winreg_dissect_element_RestoreKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2772 {
2773         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_RestoreKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_winreg_RestoreKey_handle);
2774
2775         return offset;
2776 }
2777
2778 static int
2779 winreg_dissect_element_RestoreKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2780 {
2781         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_RestoreKey_handle, 0);
2782
2783         return offset;
2784 }
2785
2786 static int
2787 winreg_dissect_element_RestoreKey_filename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2788 {
2789         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_RestoreKey_filename_, NDR_POINTER_REF, "Pointer to Filename (winreg_String)",hf_winreg_winreg_RestoreKey_filename);
2790
2791         return offset;
2792 }
2793
2794 static int
2795 winreg_dissect_element_RestoreKey_filename_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2796 {
2797         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, drep, 0, hf_winreg_winreg_RestoreKey_filename);
2798
2799         return offset;
2800 }
2801
2802 static int
2803 winreg_dissect_element_RestoreKey_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2804 {
2805         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_RestoreKey_flags, 0);
2806
2807         return offset;
2808 }
2809
2810 /* IDL: WERROR winreg_RestoreKey( */
2811 /* IDL: [in] [ref] policy_handle *handle, */
2812 /* IDL: [in] [ref] winreg_String *filename, */
2813 /* IDL: [in] uint32 flags */
2814 /* IDL: ); */
2815
2816 static int
2817 winreg_dissect_RestoreKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2818 {
2819         guint32 status;
2820
2821         pinfo->dcerpc_procedure_name="RestoreKey";
2822         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2823
2824         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2825                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2826
2827         return offset;
2828 }
2829
2830 static int
2831 winreg_dissect_RestoreKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2832 {
2833         pinfo->dcerpc_procedure_name="RestoreKey";
2834         offset = winreg_dissect_element_RestoreKey_handle(tvb, offset, pinfo, tree, drep);
2835         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2836         offset = winreg_dissect_element_RestoreKey_filename(tvb, offset, pinfo, tree, drep);
2837         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2838         offset = winreg_dissect_element_RestoreKey_flags(tvb, offset, pinfo, tree, drep);
2839         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2840         return offset;
2841 }
2842
2843 static int
2844 winreg_dissect_element_SaveKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2845 {
2846         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_SaveKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_winreg_SaveKey_handle);
2847
2848         return offset;
2849 }
2850
2851 static int
2852 winreg_dissect_element_SaveKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2853 {
2854         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_SaveKey_handle, 0);
2855
2856         return offset;
2857 }
2858
2859 static int
2860 winreg_dissect_element_SaveKey_filename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2861 {
2862         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_SaveKey_filename_, NDR_POINTER_REF, "Pointer to Filename (winreg_String)",hf_winreg_winreg_SaveKey_filename);
2863
2864         return offset;
2865 }
2866
2867 static int
2868 winreg_dissect_element_SaveKey_filename_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2869 {
2870         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, drep, 0, hf_winreg_winreg_SaveKey_filename);
2871
2872         return offset;
2873 }
2874
2875 static int
2876 winreg_dissect_element_SaveKey_sec_attrib(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2877 {
2878         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_SaveKey_sec_attrib_, NDR_POINTER_UNIQUE, "Pointer to Sec Attrib (KeySecurityAttribute)",hf_winreg_winreg_SaveKey_sec_attrib);
2879
2880         return offset;
2881 }
2882
2883 static int
2884 winreg_dissect_element_SaveKey_sec_attrib_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2885 {
2886         offset = winreg_dissect_struct_KeySecurityAttribute(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_SaveKey_sec_attrib,0);
2887
2888         return offset;
2889 }
2890
2891 /* IDL: WERROR winreg_SaveKey( */
2892 /* IDL: [in] [ref] policy_handle *handle, */
2893 /* IDL: [in] [ref] winreg_String *filename, */
2894 /* IDL: [unique(1)] [in] KeySecurityAttribute *sec_attrib */
2895 /* IDL: ); */
2896
2897 static int
2898 winreg_dissect_SaveKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2899 {
2900         guint32 status;
2901
2902         pinfo->dcerpc_procedure_name="SaveKey";
2903         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2904
2905         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2906                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2907
2908         return offset;
2909 }
2910
2911 static int
2912 winreg_dissect_SaveKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2913 {
2914         pinfo->dcerpc_procedure_name="SaveKey";
2915         offset = winreg_dissect_element_SaveKey_handle(tvb, offset, pinfo, tree, drep);
2916         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2917         offset = winreg_dissect_element_SaveKey_filename(tvb, offset, pinfo, tree, drep);
2918         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2919         offset = winreg_dissect_element_SaveKey_sec_attrib(tvb, offset, pinfo, tree, drep);
2920         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2921         return offset;
2922 }
2923
2924 static int
2925 winreg_dissect_element_SetKeySecurity_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2926 {
2927         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_SetKeySecurity_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2928
2929         return offset;
2930 }
2931
2932 static int
2933 winreg_dissect_element_SetKeySecurity_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2934 {
2935         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
2936
2937         return offset;
2938 }
2939
2940 static int
2941 winreg_dissect_element_SetKeySecurity_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2942 {
2943         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_SetKeySecurity_access_mask, 0);
2944
2945         return offset;
2946 }
2947
2948 static int
2949 winreg_dissect_element_SetKeySecurity_sd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2950 {
2951         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_SetKeySecurity_sd_, NDR_POINTER_REF, "Pointer to Sd (KeySecurityData)",hf_winreg_sd);
2952
2953         return offset;
2954 }
2955
2956 static int
2957 winreg_dissect_element_SetKeySecurity_sd_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2958 {
2959         offset = winreg_dissect_struct_KeySecurityData(tvb,offset,pinfo,tree,drep,hf_winreg_sd,0);
2960
2961         return offset;
2962 }
2963
2964 /* IDL: WERROR winreg_SetKeySecurity( */
2965 /* IDL: [in] [ref] policy_handle *handle, */
2966 /* IDL: [in] winreg_AccessMask access_mask, */
2967 /* IDL: [in] [ref] KeySecurityData *sd */
2968 /* IDL: ); */
2969
2970 static int
2971 winreg_dissect_SetKeySecurity_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2972 {
2973         guint32 status;
2974
2975         pinfo->dcerpc_procedure_name="SetKeySecurity";
2976         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2977
2978         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2979                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2980
2981         return offset;
2982 }
2983
2984 static int
2985 winreg_dissect_SetKeySecurity_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2986 {
2987         pinfo->dcerpc_procedure_name="SetKeySecurity";
2988         offset = winreg_dissect_element_SetKeySecurity_handle(tvb, offset, pinfo, tree, drep);
2989         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2990         offset = winreg_dissect_element_SetKeySecurity_access_mask(tvb, offset, pinfo, tree, drep);
2991         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2992         offset = winreg_dissect_element_SetKeySecurity_sd(tvb, offset, pinfo, tree, drep);
2993         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2994         return offset;
2995 }
2996
2997 static int
2998 winreg_dissect_element_SetValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2999 {
3000         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_SetValue_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
3001
3002         return offset;
3003 }
3004
3005 static int
3006 winreg_dissect_element_SetValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3007 {
3008         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
3009
3010         return offset;
3011 }
3012
3013 static int
3014 winreg_dissect_element_SetValue_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3015 {
3016         offset=cnf_dissect_winreg_String(tvb, offset, pinfo, tree, drep, 0, hf_winreg_winreg_SetValue_name);
3017
3018         return offset;
3019 }
3020
3021 static int
3022 winreg_dissect_element_SetValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3023 {
3024         offset = winreg_dissect_enum_Type(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_SetValue_type, 0);
3025
3026         return offset;
3027 }
3028
3029 static int
3030 winreg_dissect_element_SetValue_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3031 {
3032         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_SetValue_data_, NDR_POINTER_REF, "Pointer to Data (uint8)",hf_winreg_winreg_SetValue_data);
3033
3034         return offset;
3035 }
3036
3037 static int
3038 winreg_dissect_element_SetValue_data_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3039 {
3040         offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep, winreg_dissect_element_SetValue_data__);
3041
3042         return offset;
3043 }
3044
3045 static int
3046 winreg_dissect_element_SetValue_data__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3047 {
3048         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_SetValue_data, 0);
3049
3050         return offset;
3051 }
3052
3053 static int
3054 winreg_dissect_element_SetValue_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3055 {
3056         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_SetValue_size, 0);
3057
3058         return offset;
3059 }
3060
3061 /* IDL: WERROR winreg_SetValue( */
3062 /* IDL: [in] [ref] policy_handle *handle, */
3063 /* IDL: [in] winreg_String name, */
3064 /* IDL: [in] winreg_Type type, */
3065 /* IDL: [in] [ref] [size_is(size)] uint8 *data, */
3066 /* IDL: [in] uint32 size */
3067 /* IDL: ); */
3068
3069 static int
3070 winreg_dissect_SetValue_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3071 {
3072         guint32 status;
3073
3074         pinfo->dcerpc_procedure_name="SetValue";
3075         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3076
3077         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3078                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3079
3080         return offset;
3081 }
3082
3083 static int
3084 winreg_dissect_SetValue_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3085 {
3086         pinfo->dcerpc_procedure_name="SetValue";
3087         offset = winreg_dissect_element_SetValue_handle(tvb, offset, pinfo, tree, drep);
3088         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3089         offset = winreg_dissect_element_SetValue_name(tvb, offset, pinfo, tree, drep);
3090         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3091         offset = winreg_dissect_element_SetValue_type(tvb, offset, pinfo, tree, drep);
3092         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3093         offset = winreg_dissect_element_SetValue_data(tvb, offset, pinfo, tree, drep);
3094         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3095         offset = winreg_dissect_element_SetValue_size(tvb, offset, pinfo, tree, drep);
3096         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3097         return offset;
3098 }
3099
3100 /* IDL: WERROR winreg_UnLoadKey( */
3101 /* IDL:  */
3102 /* IDL: ); */
3103
3104 static int
3105 winreg_dissect_UnLoadKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3106 {
3107         guint32 status;
3108
3109         pinfo->dcerpc_procedure_name="UnLoadKey";
3110         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3111
3112         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3113                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3114
3115         return offset;
3116 }
3117
3118 static int
3119 winreg_dissect_UnLoadKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3120 {
3121         pinfo->dcerpc_procedure_name="UnLoadKey";
3122         return offset;
3123 }
3124
3125 static int
3126 winreg_dissect_element_InitiateSystemShutdown_hostname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3127 {
3128         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_InitiateSystemShutdown_hostname_, NDR_POINTER_UNIQUE, "Pointer to Hostname (uint16)",hf_winreg_winreg_InitiateSystemShutdown_hostname);
3129
3130         return offset;
3131 }
3132
3133 static int
3134 winreg_dissect_element_InitiateSystemShutdown_hostname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3135 {
3136         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_InitiateSystemShutdown_hostname, 0);
3137
3138         return offset;
3139 }
3140
3141 static int
3142 winreg_dissect_element_InitiateSystemShutdown_message(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3143 {
3144         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_InitiateSystemShutdown_message_, NDR_POINTER_UNIQUE, "Pointer to Message (initshutdown_String)",hf_winreg_winreg_InitiateSystemShutdown_message);
3145
3146         return offset;
3147 }
3148
3149 static int
3150 winreg_dissect_element_InitiateSystemShutdown_message_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3151 {
3152         offset = winreg_dissect_struct_initshutdown_String(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_InitiateSystemShutdown_message,0);
3153
3154         return offset;
3155 }
3156
3157 static int
3158 winreg_dissect_element_InitiateSystemShutdown_timeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3159 {
3160         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_InitiateSystemShutdown_timeout, 0);
3161
3162         return offset;
3163 }
3164
3165 static int
3166 winreg_dissect_element_InitiateSystemShutdown_force_apps(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3167 {
3168         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_InitiateSystemShutdown_force_apps, 0);
3169
3170         return offset;
3171 }
3172
3173 static int
3174 winreg_dissect_element_InitiateSystemShutdown_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3175 {
3176         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_InitiateSystemShutdown_reboot, 0);
3177
3178         return offset;
3179 }
3180
3181 /* IDL: WERROR winreg_InitiateSystemShutdown( */
3182 /* IDL: [unique(1)] [in] uint16 *hostname, */
3183 /* IDL: [unique(1)] [in] initshutdown_String *message, */
3184 /* IDL: [in] uint32 timeout, */
3185 /* IDL: [in] uint8 force_apps, */
3186 /* IDL: [in] uint8 reboot */
3187 /* IDL: ); */
3188
3189 static int
3190 winreg_dissect_InitiateSystemShutdown_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3191 {
3192         guint32 status;
3193
3194         pinfo->dcerpc_procedure_name="InitiateSystemShutdown";
3195         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3196
3197         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3198                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3199
3200         return offset;
3201 }
3202
3203 static int
3204 winreg_dissect_InitiateSystemShutdown_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3205 {
3206         pinfo->dcerpc_procedure_name="InitiateSystemShutdown";
3207         offset = winreg_dissect_element_InitiateSystemShutdown_hostname(tvb, offset, pinfo, tree, drep);
3208         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3209         offset = winreg_dissect_element_InitiateSystemShutdown_message(tvb, offset, pinfo, tree, drep);
3210         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3211         offset = winreg_dissect_element_InitiateSystemShutdown_timeout(tvb, offset, pinfo, tree, drep);
3212         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3213         offset = winreg_dissect_element_InitiateSystemShutdown_force_apps(tvb, offset, pinfo, tree, drep);
3214         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3215         offset = winreg_dissect_element_InitiateSystemShutdown_reboot(tvb, offset, pinfo, tree, drep);
3216         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3217         return offset;
3218 }
3219
3220 static int
3221 winreg_dissect_element_AbortSystemShutdown_server(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3222 {
3223         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_AbortSystemShutdown_server_, NDR_POINTER_UNIQUE, "Pointer to Server (uint16)",hf_winreg_winreg_AbortSystemShutdown_server);
3224
3225         return offset;
3226 }
3227
3228 static int
3229 winreg_dissect_element_AbortSystemShutdown_server_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3230 {
3231         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_AbortSystemShutdown_server, 0);
3232
3233         return offset;
3234 }
3235
3236 /* IDL: WERROR winreg_AbortSystemShutdown( */
3237 /* IDL: [unique(1)] [in] uint16 *server */
3238 /* IDL: ); */
3239
3240 static int
3241 winreg_dissect_AbortSystemShutdown_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3242 {
3243         guint32 status;
3244
3245         pinfo->dcerpc_procedure_name="AbortSystemShutdown";
3246         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3247
3248         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3249                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3250
3251         return offset;
3252 }
3253
3254 static int
3255 winreg_dissect_AbortSystemShutdown_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3256 {
3257         pinfo->dcerpc_procedure_name="AbortSystemShutdown";
3258         offset = winreg_dissect_element_AbortSystemShutdown_server(tvb, offset, pinfo, tree, drep);
3259         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3260         return offset;
3261 }
3262
3263 static int
3264 winreg_dissect_element_GetVersion_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3265 {
3266         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_GetVersion_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
3267
3268         return offset;
3269 }
3270
3271 static int
3272 winreg_dissect_element_GetVersion_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3273 {
3274         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
3275
3276         return offset;
3277 }
3278
3279 static int
3280 winreg_dissect_element_GetVersion_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3281 {
3282         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_GetVersion_version_, NDR_POINTER_REF, "Pointer to Version (uint32)",hf_winreg_winreg_GetVersion_version);
3283
3284         return offset;
3285 }
3286
3287 static int
3288 winreg_dissect_element_GetVersion_version_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3289 {
3290         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_GetVersion_version, 0);
3291
3292         return offset;
3293 }
3294
3295 /* IDL: WERROR winreg_GetVersion( */
3296 /* IDL: [in] [ref] policy_handle *handle, */
3297 /* IDL: [out] [ref] uint32 *version */
3298 /* IDL: ); */
3299
3300 static int
3301 winreg_dissect_GetVersion_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3302 {
3303         guint32 status;
3304
3305         pinfo->dcerpc_procedure_name="GetVersion";
3306         offset = winreg_dissect_element_GetVersion_version(tvb, offset, pinfo, tree, drep);
3307         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3308
3309         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3310
3311         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3312                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3313
3314         return offset;
3315 }
3316
3317 static int
3318 winreg_dissect_GetVersion_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3319 {
3320         pinfo->dcerpc_procedure_name="GetVersion";
3321         offset = winreg_dissect_element_GetVersion_handle(tvb, offset, pinfo, tree, drep);
3322         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3323         return offset;
3324 }
3325
3326 static int
3327 winreg_dissect_element_OpenHKCC_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3328 {
3329         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKCC_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
3330
3331         return offset;
3332 }
3333
3334 static int
3335 winreg_dissect_element_OpenHKCC_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3336 {
3337         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_system_name, 0);
3338
3339         return offset;
3340 }
3341
3342 static int
3343 winreg_dissect_element_OpenHKCC_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3344 {
3345         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_access_mask, 0);
3346
3347         return offset;
3348 }
3349
3350 static int
3351 winreg_dissect_element_OpenHKCC_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3352 {
3353         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKCC_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
3354
3355         return offset;
3356 }
3357
3358 static int
3359 winreg_dissect_element_OpenHKCC_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3360 {
3361         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
3362
3363         return offset;
3364 }
3365
3366 /* IDL: WERROR winreg_OpenHKCC( */
3367 /* IDL: [unique(1)] [in] uint16 *system_name, */
3368 /* IDL: [in] winreg_AccessMask access_mask, */
3369 /* IDL: [out] [ref] policy_handle *handle */
3370 /* IDL: ); */
3371
3372 static int
3373 winreg_dissect_OpenHKCC_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3374 {
3375         guint32 status;
3376
3377         pinfo->dcerpc_procedure_name="OpenHKCC";
3378         offset = winreg_dissect_element_OpenHKCC_handle(tvb, offset, pinfo, tree, drep);
3379         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3380
3381         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3382
3383         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3384                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3385
3386         return offset;
3387 }
3388
3389 static int
3390 winreg_dissect_OpenHKCC_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3391 {
3392         pinfo->dcerpc_procedure_name="OpenHKCC";
3393         offset = winreg_dissect_element_OpenHKCC_system_name(tvb, offset, pinfo, tree, drep);
3394         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3395         offset = winreg_dissect_element_OpenHKCC_access_mask(tvb, offset, pinfo, tree, drep);
3396         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3397         return offset;
3398 }
3399
3400 static int
3401 winreg_dissect_element_OpenHKDD_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3402 {
3403         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKDD_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
3404
3405         return offset;
3406 }
3407
3408 static int
3409 winreg_dissect_element_OpenHKDD_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3410 {
3411         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_system_name, 0);
3412
3413         return offset;
3414 }
3415
3416 static int
3417 winreg_dissect_element_OpenHKDD_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3418 {
3419         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_access_mask, 0);
3420
3421         return offset;
3422 }
3423
3424 static int
3425 winreg_dissect_element_OpenHKDD_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3426 {
3427         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKDD_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
3428
3429         return offset;
3430 }
3431
3432 static int
3433 winreg_dissect_element_OpenHKDD_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3434 {
3435         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
3436
3437         return offset;
3438 }
3439
3440 /* IDL: WERROR winreg_OpenHKDD( */
3441 /* IDL: [unique(1)] [in] uint16 *system_name, */
3442 /* IDL: [in] winreg_AccessMask access_mask, */
3443 /* IDL: [out] [ref] policy_handle *handle */
3444 /* IDL: ); */
3445
3446 static int
3447 winreg_dissect_OpenHKDD_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3448 {
3449         guint32 status;
3450
3451         pinfo->dcerpc_procedure_name="OpenHKDD";
3452         offset = winreg_dissect_element_OpenHKDD_handle(tvb, offset, pinfo, tree, drep);
3453         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3454
3455         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3456
3457         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3458                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3459
3460         return offset;
3461 }
3462
3463 static int
3464 winreg_dissect_OpenHKDD_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3465 {
3466         pinfo->dcerpc_procedure_name="OpenHKDD";
3467         offset = winreg_dissect_element_OpenHKDD_system_name(tvb, offset, pinfo, tree, drep);
3468         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3469         offset = winreg_dissect_element_OpenHKDD_access_mask(tvb, offset, pinfo, tree, drep);
3470         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3471         return offset;
3472 }
3473
3474 static int
3475 winreg_dissect_element_QueryMultipleValues_key_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3476 {
3477         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryMultipleValues_key_handle_, NDR_POINTER_REF, "Pointer to Key Handle (policy_handle)",hf_winreg_winreg_QueryMultipleValues_key_handle);
3478
3479         return offset;
3480 }
3481
3482 static int
3483 winreg_dissect_element_QueryMultipleValues_key_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3484 {
3485         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryMultipleValues_key_handle, 0);
3486
3487         return offset;
3488 }
3489
3490 static int
3491 winreg_dissect_element_QueryMultipleValues_values(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3492 {
3493         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryMultipleValues_values_, NDR_POINTER_REF, "Pointer to Values (QueryMultipleValue)",hf_winreg_winreg_QueryMultipleValues_values);
3494
3495         return offset;
3496 }
3497
3498 static int
3499 winreg_dissect_element_QueryMultipleValues_values_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3500 {
3501         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryMultipleValues_values__);
3502
3503         return offset;
3504 }
3505
3506 static int
3507 winreg_dissect_element_QueryMultipleValues_values__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3508 {
3509         offset = winreg_dissect_struct_QueryMultipleValue(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_QueryMultipleValues_values,0);
3510
3511         return offset;
3512 }
3513
3514 static int
3515 winreg_dissect_element_QueryMultipleValues_num_values(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3516 {
3517         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryMultipleValues_num_values, 0);
3518
3519         return offset;
3520 }
3521
3522 static int
3523 winreg_dissect_element_QueryMultipleValues_buffer(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3524 {
3525         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryMultipleValues_buffer_, NDR_POINTER_UNIQUE, "Pointer to Buffer (uint8)",hf_winreg_winreg_QueryMultipleValues_buffer);
3526
3527         return offset;
3528 }
3529
3530 static int
3531 winreg_dissect_element_QueryMultipleValues_buffer_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3532 {
3533         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryMultipleValues_buffer__);
3534
3535         return offset;
3536 }
3537
3538 static int
3539 winreg_dissect_element_QueryMultipleValues_buffer__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3540 {
3541         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryMultipleValues_buffer, 0);
3542
3543         return offset;
3544 }
3545
3546 static int
3547 winreg_dissect_element_QueryMultipleValues_buffer_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3548 {
3549         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryMultipleValues_buffer_size_, NDR_POINTER_REF, "Pointer to Buffer Size (uint32)",hf_winreg_winreg_QueryMultipleValues_buffer_size);
3550
3551         return offset;
3552 }
3553
3554 static int
3555 winreg_dissect_element_QueryMultipleValues_buffer_size_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3556 {
3557         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryMultipleValues_buffer_size, 0);
3558
3559         return offset;
3560 }
3561
3562 /* IDL: WERROR winreg_QueryMultipleValues( */
3563 /* IDL: [in] [ref] policy_handle *key_handle, */
3564 /* IDL: [out] [in] [ref] [length_is(num_values)] [size_is(num_values)] QueryMultipleValue *values, */
3565 /* IDL: [in] uint32 num_values, */
3566 /* IDL: [unique(1)] [out] [in] [length_is(*buffer_size)] [size_is(*buffer_size)] uint8 *buffer, */
3567 /* IDL: [out] [in] [ref] uint32 *buffer_size */
3568 /* IDL: ); */
3569
3570 static int
3571 winreg_dissect_QueryMultipleValues_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3572 {
3573         guint32 status;
3574
3575         pinfo->dcerpc_procedure_name="QueryMultipleValues";
3576         offset = winreg_dissect_element_QueryMultipleValues_values(tvb, offset, pinfo, tree, drep);
3577         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3578
3579         offset = winreg_dissect_element_QueryMultipleValues_buffer(tvb, offset, pinfo, tree, drep);
3580         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3581
3582         offset = winreg_dissect_element_QueryMultipleValues_buffer_size(tvb, offset, pinfo, tree, drep);
3583         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3584
3585         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3586
3587         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3588                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3589
3590         return offset;
3591 }
3592
3593 static int
3594 winreg_dissect_QueryMultipleValues_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3595 {
3596         pinfo->dcerpc_procedure_name="QueryMultipleValues";
3597         offset = winreg_dissect_element_QueryMultipleValues_key_handle(tvb, offset, pinfo, tree, drep);
3598         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3599         offset = winreg_dissect_element_QueryMultipleValues_values(tvb, offset, pinfo, tree, drep);
3600         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3601         offset = winreg_dissect_element_QueryMultipleValues_num_values(tvb, offset, pinfo, tree, drep);
3602         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3603         offset = winreg_dissect_element_QueryMultipleValues_buffer(tvb, offset, pinfo, tree, drep);
3604         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3605         offset = winreg_dissect_element_QueryMultipleValues_buffer_size(tvb, offset, pinfo, tree, drep);
3606         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3607         return offset;
3608 }
3609
3610 static int
3611 winreg_dissect_element_InitiateSystemShutdownEx_hostname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3612 {
3613         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_InitiateSystemShutdownEx_hostname_, NDR_POINTER_UNIQUE, "Pointer to Hostname (uint16)",hf_winreg_winreg_InitiateSystemShutdownEx_hostname);
3614
3615         return offset;
3616 }
3617
3618 static int
3619 winreg_dissect_element_InitiateSystemShutdownEx_hostname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3620 {
3621         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_InitiateSystemShutdownEx_hostname, 0);
3622
3623         return offset;
3624 }
3625
3626 static int
3627 winreg_dissect_element_InitiateSystemShutdownEx_message(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3628 {
3629         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_InitiateSystemShutdownEx_message_, NDR_POINTER_UNIQUE, "Pointer to Message (initshutdown_String)",hf_winreg_winreg_InitiateSystemShutdownEx_message);
3630
3631         return offset;
3632 }
3633
3634 static int
3635 winreg_dissect_element_InitiateSystemShutdownEx_message_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3636 {
3637         offset = winreg_dissect_struct_initshutdown_String(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_InitiateSystemShutdownEx_message,0);
3638
3639         return offset;
3640 }
3641
3642 static int
3643 winreg_dissect_element_InitiateSystemShutdownEx_timeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3644 {
3645         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_InitiateSystemShutdownEx_timeout, 0);
3646
3647         return offset;
3648 }
3649
3650 static int
3651 winreg_dissect_element_InitiateSystemShutdownEx_force_apps(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3652 {
3653         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_InitiateSystemShutdownEx_force_apps, 0);
3654
3655         return offset;
3656 }
3657
3658 static int
3659 winreg_dissect_element_InitiateSystemShutdownEx_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3660 {
3661         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_InitiateSystemShutdownEx_reboot, 0);
3662
3663         return offset;
3664 }
3665
3666 static int
3667 winreg_dissect_element_InitiateSystemShutdownEx_reason(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3668 {
3669         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_InitiateSystemShutdownEx_reason, 0);
3670
3671         return offset;
3672 }
3673
3674 /* IDL: WERROR winreg_InitiateSystemShutdownEx( */
3675 /* IDL: [unique(1)] [in] uint16 *hostname, */
3676 /* IDL: [unique(1)] [in] initshutdown_String *message, */
3677 /* IDL: [in] uint32 timeout, */
3678 /* IDL: [in] uint8 force_apps, */
3679 /* IDL: [in] uint8 reboot, */
3680 /* IDL: [in] uint32 reason */
3681 /* IDL: ); */
3682
3683 static int
3684 winreg_dissect_InitiateSystemShutdownEx_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3685 {
3686         guint32 status;
3687
3688         pinfo->dcerpc_procedure_name="InitiateSystemShutdownEx";
3689         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3690
3691         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3692                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3693
3694         return offset;
3695 }
3696
3697 static int
3698 winreg_dissect_InitiateSystemShutdownEx_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3699 {
3700         pinfo->dcerpc_procedure_name="InitiateSystemShutdownEx";
3701         offset = winreg_dissect_element_InitiateSystemShutdownEx_hostname(tvb, offset, pinfo, tree, drep);
3702         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3703         offset = winreg_dissect_element_InitiateSystemShutdownEx_message(tvb, offset, pinfo, tree, drep);
3704         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3705         offset = winreg_dissect_element_InitiateSystemShutdownEx_timeout(tvb, offset, pinfo, tree, drep);
3706         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3707         offset = winreg_dissect_element_InitiateSystemShutdownEx_force_apps(tvb, offset, pinfo, tree, drep);
3708         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3709         offset = winreg_dissect_element_InitiateSystemShutdownEx_reboot(tvb, offset, pinfo, tree, drep);
3710         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3711         offset = winreg_dissect_element_InitiateSystemShutdownEx_reason(tvb, offset, pinfo, tree, drep);
3712         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3713         return offset;
3714 }
3715
3716 /* IDL: WERROR winreg_SaveKeyEx( */
3717 /* IDL:  */
3718 /* IDL: ); */
3719
3720 static int
3721 winreg_dissect_SaveKeyEx_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3722 {
3723         guint32 status;
3724
3725         pinfo->dcerpc_procedure_name="SaveKeyEx";
3726         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3727
3728         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3729                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3730
3731         return offset;
3732 }
3733
3734 static int
3735 winreg_dissect_SaveKeyEx_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3736 {
3737         pinfo->dcerpc_procedure_name="SaveKeyEx";
3738         return offset;
3739 }
3740
3741 static int
3742 winreg_dissect_element_OpenHKPT_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3743 {
3744         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKPT_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
3745
3746         return offset;
3747 }
3748
3749 static int
3750 winreg_dissect_element_OpenHKPT_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3751 {
3752         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_system_name, 0);
3753
3754         return offset;
3755 }
3756
3757 static int
3758 winreg_dissect_element_OpenHKPT_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3759 {
3760         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_access_mask, 0);
3761
3762         return offset;
3763 }
3764
3765 static int
3766 winreg_dissect_element_OpenHKPT_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3767 {
3768         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKPT_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
3769
3770         return offset;
3771 }
3772
3773 static int
3774 winreg_dissect_element_OpenHKPT_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3775 {
3776         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
3777
3778         return offset;
3779 }
3780
3781 /* IDL: WERROR winreg_OpenHKPT( */
3782 /* IDL: [unique(1)] [in] uint16 *system_name, */
3783 /* IDL: [in] winreg_AccessMask access_mask, */
3784 /* IDL: [out] [ref] policy_handle *handle */
3785 /* IDL: ); */
3786
3787 static int
3788 winreg_dissect_OpenHKPT_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3789 {
3790         guint32 status;
3791
3792         pinfo->dcerpc_procedure_name="OpenHKPT";
3793         offset = winreg_dissect_element_OpenHKPT_handle(tvb, offset, pinfo, tree, drep);
3794         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3795
3796         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3797
3798         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3799                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3800
3801         return offset;
3802 }
3803
3804 static int
3805 winreg_dissect_OpenHKPT_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3806 {
3807         pinfo->dcerpc_procedure_name="OpenHKPT";
3808         offset = winreg_dissect_element_OpenHKPT_system_name(tvb, offset, pinfo, tree, drep);
3809         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3810         offset = winreg_dissect_element_OpenHKPT_access_mask(tvb, offset, pinfo, tree, drep);
3811         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3812         return offset;
3813 }
3814
3815 static int
3816 winreg_dissect_element_OpenHKPN_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3817 {
3818         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKPN_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
3819
3820         return offset;
3821 }
3822
3823 static int
3824 winreg_dissect_element_OpenHKPN_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3825 {
3826         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_system_name, 0);
3827
3828         return offset;
3829 }
3830
3831 static int
3832 winreg_dissect_element_OpenHKPN_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3833 {
3834         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_access_mask, 0);
3835
3836         return offset;
3837 }
3838
3839 static int
3840 winreg_dissect_element_OpenHKPN_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3841 {
3842         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKPN_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
3843
3844         return offset;
3845 }
3846
3847 static int
3848 winreg_dissect_element_OpenHKPN_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3849 {
3850         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
3851
3852         return offset;
3853 }
3854
3855 /* IDL: WERROR winreg_OpenHKPN( */
3856 /* IDL: [unique(1)] [in] uint16 *system_name, */
3857 /* IDL: [in] winreg_AccessMask access_mask, */
3858 /* IDL: [out] [ref] policy_handle *handle */
3859 /* IDL: ); */
3860
3861 static int
3862 winreg_dissect_OpenHKPN_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3863 {
3864         guint32 status;
3865
3866         pinfo->dcerpc_procedure_name="OpenHKPN";
3867         offset = winreg_dissect_element_OpenHKPN_handle(tvb, offset, pinfo, tree, drep);
3868         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3869
3870         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3871
3872         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3873                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3874
3875         return offset;
3876 }
3877
3878 static int
3879 winreg_dissect_OpenHKPN_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3880 {
3881         pinfo->dcerpc_procedure_name="OpenHKPN";
3882         offset = winreg_dissect_element_OpenHKPN_system_name(tvb, offset, pinfo, tree, drep);
3883         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3884         offset = winreg_dissect_element_OpenHKPN_access_mask(tvb, offset, pinfo, tree, drep);
3885         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3886         return offset;
3887 }
3888
3889 /* IDL: WERROR winreg_QueryMultipleValues2( */
3890 /* IDL:  */
3891 /* IDL: ); */
3892
3893 static int
3894 winreg_dissect_QueryMultipleValues2_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3895 {
3896         guint32 status;
3897
3898         pinfo->dcerpc_procedure_name="QueryMultipleValues2";
3899         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3900
3901         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3902                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3903
3904         return offset;
3905 }
3906
3907 static int
3908 winreg_dissect_QueryMultipleValues2_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3909 {
3910         pinfo->dcerpc_procedure_name="QueryMultipleValues2";
3911         return offset;
3912 }
3913
3914
3915 static dcerpc_sub_dissector winreg_dissectors[] = {
3916         { 0, "OpenHKCR",
3917            winreg_dissect_OpenHKCR_request, winreg_dissect_OpenHKCR_response},
3918         { 1, "OpenHKCU",
3919            winreg_dissect_OpenHKCU_request, winreg_dissect_OpenHKCU_response},
3920         { 2, "OpenHKLM",
3921            winreg_dissect_OpenHKLM_request, winreg_dissect_OpenHKLM_response},
3922         { 3, "OpenHKPD",
3923            winreg_dissect_OpenHKPD_request, winreg_dissect_OpenHKPD_response},
3924         { 4, "OpenHKU",
3925            winreg_dissect_OpenHKU_request, winreg_dissect_OpenHKU_response},
3926         { 5, "CloseKey",
3927            winreg_dissect_CloseKey_request, winreg_dissect_CloseKey_response},
3928         { 6, "CreateKey",
3929            winreg_dissect_CreateKey_request, winreg_dissect_CreateKey_response},
3930         { 7, "DeleteKey",
3931            winreg_dissect_DeleteKey_request, winreg_dissect_DeleteKey_response},
3932         { 8, "DeleteValue",
3933            winreg_dissect_DeleteValue_request, winreg_dissect_DeleteValue_response},
3934         { 9, "EnumKey",
3935            winreg_dissect_EnumKey_request, winreg_dissect_EnumKey_response},
3936         { 10, "EnumValue",
3937            winreg_dissect_EnumValue_request, winreg_dissect_EnumValue_response},
3938         { 11, "FlushKey",
3939            winreg_dissect_FlushKey_request, winreg_dissect_FlushKey_response},
3940         { 12, "GetKeySecurity",
3941            winreg_dissect_GetKeySecurity_request, winreg_dissect_GetKeySecurity_response},
3942         { 13, "LoadKey",
3943            winreg_dissect_LoadKey_request, winreg_dissect_LoadKey_response},
3944         { 14, "NotifyChangeKeyValue",
3945            winreg_dissect_NotifyChangeKeyValue_request, winreg_dissect_NotifyChangeKeyValue_response},
3946         { 15, "OpenKey",
3947            winreg_dissect_OpenKey_request, winreg_dissect_OpenKey_response},
3948         { 16, "QueryInfoKey",
3949            winreg_dissect_QueryInfoKey_request, winreg_dissect_QueryInfoKey_response},
3950         { 17, "QueryValue",
3951            winreg_dissect_QueryValue_request, winreg_dissect_QueryValue_response},
3952         { 18, "ReplaceKey",
3953            winreg_dissect_ReplaceKey_request, winreg_dissect_ReplaceKey_response},
3954         { 19, "RestoreKey",
3955            winreg_dissect_RestoreKey_request, winreg_dissect_RestoreKey_response},
3956         { 20, "SaveKey",
3957            winreg_dissect_SaveKey_request, winreg_dissect_SaveKey_response},
3958         { 21, "SetKeySecurity",
3959            winreg_dissect_SetKeySecurity_request, winreg_dissect_SetKeySecurity_response},
3960         { 22, "SetValue",
3961            winreg_dissect_SetValue_request, winreg_dissect_SetValue_response},
3962         { 23, "UnLoadKey",
3963            winreg_dissect_UnLoadKey_request, winreg_dissect_UnLoadKey_response},
3964         { 24, "InitiateSystemShutdown",
3965            winreg_dissect_InitiateSystemShutdown_request, winreg_dissect_InitiateSystemShutdown_response},
3966         { 25, "AbortSystemShutdown",
3967            winreg_dissect_AbortSystemShutdown_request, winreg_dissect_AbortSystemShutdown_response},
3968         { 26, "GetVersion",
3969            winreg_dissect_GetVersion_request, winreg_dissect_GetVersion_response},
3970         { 27, "OpenHKCC",
3971            winreg_dissect_OpenHKCC_request, winreg_dissect_OpenHKCC_response},
3972         { 28, "OpenHKDD",
3973            winreg_dissect_OpenHKDD_request, winreg_dissect_OpenHKDD_response},
3974         { 29, "QueryMultipleValues",
3975            winreg_dissect_QueryMultipleValues_request, winreg_dissect_QueryMultipleValues_response},
3976         { 30, "InitiateSystemShutdownEx",
3977            winreg_dissect_InitiateSystemShutdownEx_request, winreg_dissect_InitiateSystemShutdownEx_response},
3978         { 31, "SaveKeyEx",
3979            winreg_dissect_SaveKeyEx_request, winreg_dissect_SaveKeyEx_response},
3980         { 32, "OpenHKPT",
3981            winreg_dissect_OpenHKPT_request, winreg_dissect_OpenHKPT_response},
3982         { 33, "OpenHKPN",
3983            winreg_dissect_OpenHKPN_request, winreg_dissect_OpenHKPN_response},
3984         { 34, "QueryMultipleValues2",
3985            winreg_dissect_QueryMultipleValues2_request, winreg_dissect_QueryMultipleValues2_response},
3986         { 0, NULL, NULL, NULL }
3987 };
3988
3989 void proto_register_dcerpc_winreg(void)
3990 {
3991         static hf_register_info hf[] = {
3992         { &hf_winreg_winreg_AccessMask_KEY_ENUMERATE_SUB_KEYS, 
3993           { "Key Enumerate Sub Keys", "winreg.winreg_AccessMask.KEY_ENUMERATE_SUB_KEYS", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_ENUMERATE_SUB_KEYS_tfs), ( 0x00008 ), "", HFILL }},
3994         { &hf_winreg_winreg_NotifyChangeKeyValue_string2, 
3995           { "String2", "winreg.winreg_NotifyChangeKeyValue.string2", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
3996         { &hf_winreg_winreg_InitiateSystemShutdown_message, 
3997           { "Message", "winreg.winreg_InitiateSystemShutdown.message", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
3998         { &hf_winreg_KeySecurityData_size, 
3999           { "Size", "winreg.KeySecurityData.size", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4000         { &hf_winreg_winreg_String_name, 
4001           { "Name", "winreg.winreg_String.name", FT_STRING, BASE_DEC, NULL, 0, "", HFILL }},
4002         { &hf_winreg_winreg_InitiateSystemShutdownEx_message, 
4003           { "Message", "winreg.winreg_InitiateSystemShutdownEx.message", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
4004         { &hf_winreg_winreg_InitiateSystemShutdown_reboot, 
4005           { "Reboot", "winreg.winreg_InitiateSystemShutdown.reboot", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
4006         { &hf_winreg_winreg_EnumValue_enum_index, 
4007           { "Enum Index", "winreg.winreg_EnumValue.enum_index", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4008         { &hf_winreg_access_mask, 
4009           { "Access Mask", "winreg.access_mask", FT_UINT32, BASE_HEX, NULL, 0, " ", HFILL }},
4010         { &hf_winreg_winreg_QueryMultipleValues_key_handle, 
4011           { "Key Handle", "winreg.winreg_QueryMultipleValues.key_handle", FT_BYTES, BASE_NONE, NULL, 0, "", HFILL }},
4012         { &hf_winreg_winreg_LoadKey_keyname, 
4013           { "Keyname", "winreg.winreg_LoadKey.keyname", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
4014         { &hf_winreg_winreg_EnumKey_name, 
4015           { "Name", "winreg.winreg_EnumKey.name", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
4016         { &hf_winreg_winreg_CreateKey_options, 
4017           { "Options", "winreg.winreg_CreateKey.options", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4018         { &hf_winreg_winreg_EnumValue_type, 
4019           { "Type", "winreg.winreg_EnumValue.type", FT_UINT32, BASE_DEC, VALS(winreg_winreg_Type_vals), 0, "", HFILL }},
4020         { &hf_winreg_winreg_InitiateSystemShutdownEx_timeout, 
4021           { "Timeout", "winreg.winreg_InitiateSystemShutdownEx.timeout", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4022         { &hf_winreg_winreg_EnumKey_last_changed_time, 
4023           { "Last Changed Time", "winreg.winreg_EnumKey.last_changed_time", FT_ABSOLUTE_TIME, BASE_NONE, NULL, 0, "", HFILL }},
4024         { &hf_winreg_winreg_QueryValue_size, 
4025           { "Size", "winreg.winreg_QueryValue.size", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4026         { &hf_winreg_winreg_EnumValue_size, 
4027           { "Size", "winreg.winreg_EnumValue.size", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4028         { &hf_winreg_handle, 
4029           { "Handle", "winreg.handle", FT_BYTES, BASE_NONE, NULL, 0, " ", HFILL }},
4030         { &hf_winreg_winreg_SaveKey_sec_attrib, 
4031           { "Sec Attrib", "winreg.winreg_SaveKey.sec_attrib", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
4032         { &hf_winreg_winreg_QueryInfoKey_max_valnamelen, 
4033           { "Max Valnamelen", "winreg.winreg_QueryInfoKey.max_valnamelen", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4034         { &hf_winreg_winreg_SecBuf_length, 
4035           { "Length", "winreg.winreg_SecBuf.length", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4036         { &hf_winreg_winreg_InitiateSystemShutdownEx_reboot, 
4037           { "Reboot", "winreg.winreg_InitiateSystemShutdownEx.reboot", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
4038         { &hf_winreg_sd, 
4039           { "KeySecurityData", "winreg.sd", FT_NONE, BASE_NONE, NULL, 0, " ", HFILL }},
4040         { &hf_winreg_winreg_SaveKey_filename, 
4041           { "Filename", "winreg.winreg_SaveKey.filename", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
4042         { &hf_winreg_winreg_QueryMultipleValues_buffer_size, 
4043           { "Buffer Size", "winreg.winreg_QueryMultipleValues.buffer_size", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4044         { &hf_winreg_winreg_QueryValue_data, 
4045           { "Data", "winreg.winreg_QueryValue.data", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
4046         { &hf_winreg_winreg_CreateKey_new_handle, 
4047           { "New Handle", "winreg.winreg_CreateKey.new_handle", FT_BYTES, BASE_NONE, NULL, 0, "", HFILL }},
4048         { &hf_winreg_winreg_QueryInfoKey_max_subkeysize, 
4049           { "Max Subkeysize", "winreg.winreg_QueryInfoKey.max_subkeysize", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4050         { &hf_winreg_winreg_InitiateSystemShutdown_hostname, 
4051           { "Hostname", "winreg.winreg_InitiateSystemShutdown.hostname", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
4052         { &hf_winreg_KeySecurityData_data, 
4053           { "Data", "winreg.KeySecurityData.data", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
4054         { &hf_winreg_KeySecurityAttribute_sec_data, 
4055           { "Sec Data", "winreg.KeySecurityAttribute.sec_data", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
4056         { &hf_winreg_winreg_OpenKey_access_mask, 
4057           { "Access Mask", "winreg.winreg_OpenKey.access_mask", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},
4058         { &hf_winreg_QueryMultipleValue_name, 
4059           { "Name", "winreg.QueryMultipleValue.name", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
4060         { &hf_winreg_winreg_GetKeySecurity_sec_info, 
4061           { "Sec Info", "winreg.winreg_GetKeySecurity.sec_info", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
4062         { &hf_winreg_winreg_StringBuf_size, 
4063           { "Size", "winreg.winreg_StringBuf.size", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
4064         { &hf_winreg_winreg_SecBuf_sd, 
4065           { "Sd", "winreg.winreg_SecBuf.sd", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
4066         { &hf_winreg_winreg_QueryInfoKey_secdescsize, 
4067           { "Secdescsize", "winreg.winreg_QueryInfoKey.secdescsize", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4068         { &hf_winreg_winreg_OpenKey_keyname, 
4069           { "Keyname", "winreg.winreg_OpenKey.keyname", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
4070         { &hf_winreg_QueryMultipleValue_type, 
4071           { "Type", "winreg.QueryMultipleValue.type", FT_UINT32, BASE_DEC, VALS(winreg_winreg_Type_vals), 0, "", HFILL }},
4072         { &hf_winreg_winreg_SetValue_name, 
4073           { "Name", "winreg.winreg_SetValue.name", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
4074         { &hf_winreg_winreg_RestoreKey_flags, 
4075           { "Flags", "winreg.winreg_RestoreKey.flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4076         { &hf_winreg_winreg_NotifyChangeKeyValue_watch_subtree, 
4077           { "Watch Subtree", "winreg.winreg_NotifyChangeKeyValue.watch_subtree", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
4078         { &hf_winreg_winreg_CreateKey_secdesc, 
4079           { "Secdesc", "winreg.winreg_CreateKey.secdesc", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
4080         { &hf_winreg_winreg_InitiateSystemShutdownEx_force_apps, 
4081           { "Force Apps", "winreg.winreg_InitiateSystemShutdownEx.force_apps", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
4082         { &hf_winreg_winreg_SetValue_type, 
4083           { "Type", "winreg.winreg_SetValue.type", FT_UINT32, BASE_DEC, VALS(winreg_winreg_Type_vals), 0, "", HFILL }},
4084         { &hf_winreg_winreg_CreateKey_name, 
4085           { "Name", "winreg.winreg_CreateKey.name", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
4086         { &hf_winreg_KeySecurityData_len, 
4087           { "Len", "winreg.KeySecurityData.len", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4088         { &hf_winreg_winreg_String_name_len, 
4089           { "Name Len", "winreg.winreg_String.name_len", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
4090         { &hf_winreg_opnum, 
4091           { "Operation", "winreg.opnum", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
4092         { &hf_winreg_winreg_DeleteKey_key, 
4093           { "Key", "winreg.winreg_DeleteKey.key", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
4094         { &hf_winreg_winreg_EnumValue_name, 
4095           { "Name", "winreg.winreg_EnumValue.name", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
4096         { &hf_winreg_winreg_LoadKey_filename, 
4097           { "Filename", "winreg.winreg_LoadKey.filename", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
4098         { &hf_winreg_winreg_AccessMask_KEY_CREATE_LINK, 
4099           { "Key Create Link", "winreg.winreg_AccessMask.KEY_CREATE_LINK", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_CREATE_LINK_tfs), ( 0x00020 ), "", HFILL }},
4100         { &hf_winreg_winreg_DeleteValue_value, 
4101           { "Value", "winreg.winreg_DeleteValue.value", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
4102         { &hf_winreg_system_name, 
4103           { "System Name", "winreg.system_name", FT_UINT16, BASE_DEC, NULL, 0, " ", HFILL }},
4104         { &hf_winreg_QueryMultipleValue_length, 
4105           { "Length", "winreg.QueryMultipleValue.length", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4106         { &hf_winreg_winreg_QueryMultipleValues_num_values, 
4107           { "Num Values", "winreg.winreg_QueryMultipleValues.num_values", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4108         { &hf_winreg_winreg_AccessMask_KEY_NOTIFY, 
4109           { "Key Notify", "winreg.winreg_AccessMask.KEY_NOTIFY", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_NOTIFY_tfs), ( 0x00010 ), "", HFILL }},
4110         { &hf_winreg_KeySecurityAttribute_data_size, 
4111           { "Data Size", "winreg.KeySecurityAttribute.data_size", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4112         { &hf_winreg_winreg_OpenKey_parent_handle, 
4113           { "Parent Handle", "winreg.winreg_OpenKey.parent_handle", FT_BYTES, BASE_NONE, NULL, 0, "", HFILL }},
4114         { &hf_winreg_winreg_StringBuf_name, 
4115           { "Name", "winreg.winreg_StringBuf.name", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
4116         { &hf_winreg_winreg_NotifyChangeKeyValue_unknown2, 
4117           { "Unknown2", "winreg.winreg_NotifyChangeKeyValue.unknown2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4118         { &hf_winreg_winreg_QueryInfoKey_num_subkeys, 
4119           { "Num Subkeys", "winreg.winreg_QueryInfoKey.num_subkeys", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4120         { &hf_winreg_sd_offset, 
4121           { "Offset", "winreg.sd.offset", FT_UINT32, BASE_DEC, NULL, 0, " ", HFILL }},
4122         { &hf_winreg_winreg_AccessMask_KEY_WOW64_32KEY, 
4123           { "Key Wow64 32key", "winreg.winreg_AccessMask.KEY_WOW64_32KEY", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_WOW64_32KEY_tfs), ( 0x00200 ), "", HFILL }},
4124         { &hf_winreg_winreg_StringBuf_length, 
4125           { "Length", "winreg.winreg_StringBuf.length", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
4126         { &hf_winreg_winreg_QueryInfoKey_last_changed_time, 
4127           { "Last Changed Time", "winreg.winreg_QueryInfoKey.last_changed_time", FT_ABSOLUTE_TIME, BASE_NONE, NULL, 0, "", HFILL }},
4128         { &hf_winreg_winreg_OpenHKPD_access_mask, 
4129           { "Access Mask", "winreg.winreg_OpenHKPD.access_mask", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},
4130         { &hf_winreg_winreg_AbortSystemShutdown_server, 
4131           { "Server", "winreg.winreg_AbortSystemShutdown.server", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
4132         { &hf_winreg_winreg_QueryValue_type, 
4133           { "Type", "winreg.winreg_QueryValue.type", FT_UINT32, BASE_DEC, VALS(winreg_winreg_Type_vals), 0, "", HFILL }},
4134         { &hf_winreg_sd_actual_size, 
4135           { "Actual Size", "winreg.sd.actual_size", FT_UINT32, BASE_DEC, NULL, 0, " ", HFILL }},
4136         { &hf_winreg_winreg_String_name_size, 
4137           { "Name Size", "winreg.winreg_String.name_size", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
4138         { &hf_winreg_winreg_NotifyChangeKeyValue_unknown, 
4139           { "Unknown", "winreg.winreg_NotifyChangeKeyValue.unknown", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4140         { &hf_winreg_winreg_QueryValue_length, 
4141           { "Length", "winreg.winreg_QueryValue.length", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4142         { &hf_winreg_winreg_AccessMask_KEY_CREATE_SUB_KEY, 
4143           { "Key Create Sub Key", "winreg.winreg_AccessMask.KEY_CREATE_SUB_KEY", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_CREATE_SUB_KEY_tfs), ( 0x00004 ), "", HFILL }},
4144         { &hf_winreg_winreg_OpenKey_unknown, 
4145           { "Unknown", "winreg.winreg_OpenKey.unknown", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4146         { &hf_winreg_winreg_RestoreKey_filename, 
4147           { "Filename", "winreg.winreg_RestoreKey.filename", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
4148         { &hf_winreg_winreg_QueryInfoKey_max_valbufsize, 
4149           { "Max Valbufsize", "winreg.winreg_QueryInfoKey.max_valbufsize", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4150         { &hf_winreg_winreg_InitiateSystemShutdownEx_reason, 
4151           { "Reason", "winreg.winreg_InitiateSystemShutdownEx.reason", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4152         { &hf_winreg_winreg_SecBuf_inherit, 
4153           { "Inherit", "winreg.winreg_SecBuf.inherit", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
4154         { &hf_winreg_winreg_SetValue_size, 
4155           { "Size", "winreg.winreg_SetValue.size", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4156         { &hf_winreg_winreg_EnumValue_length, 
4157           { "Length", "winreg.winreg_EnumValue.length", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4158         { &hf_winreg_winreg_QueryMultipleValues_values, 
4159           { "Values", "winreg.winreg_QueryMultipleValues.values", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
4160         { &hf_winreg_winreg_QueryInfoKey_max_subkeylen, 
4161           { "Max Subkeylen", "winreg.winreg_QueryInfoKey.max_subkeylen", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4162         { &hf_winreg_winreg_InitiateSystemShutdown_timeout, 
4163           { "Timeout", "winreg.winreg_InitiateSystemShutdown.timeout", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4164         { &hf_winreg_winreg_InitiateSystemShutdownEx_hostname, 
4165           { "Hostname", "winreg.winreg_InitiateSystemShutdownEx.hostname", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
4166         { &hf_winreg_winreg_SaveKey_handle, 
4167           { "Handle", "winreg.winreg_SaveKey.handle", FT_BYTES, BASE_NONE, NULL, 0, "", HFILL }},
4168         { &hf_winreg_KeySecurityAttribute_inherit, 
4169           { "Inherit", "winreg.KeySecurityAttribute.inherit", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
4170         { &hf_winreg_werror, 
4171           { "Windows Error", "winreg.werror", FT_UINT32, BASE_HEX, VALS(WERR_errors), 0, "", HFILL }},
4172         { &hf_winreg_winreg_GetVersion_version, 
4173           { "Version", "winreg.winreg_GetVersion.version", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4174         { &hf_winreg_winreg_AccessMask_KEY_QUERY_VALUE, 
4175           { "Key Query Value", "winreg.winreg_AccessMask.KEY_QUERY_VALUE", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_QUERY_VALUE_tfs), ( 0x00001 ), "", HFILL }},
4176         { &hf_winreg_winreg_CreateKey_action_taken, 
4177           { "Action Taken", "winreg.winreg_CreateKey.action_taken", FT_UINT32, BASE_DEC, VALS(winreg_winreg_CreateAction_vals), 0, "", HFILL }},
4178         { &hf_winreg_winreg_QueryInfoKey_num_values, 
4179           { "Num Values", "winreg.winreg_QueryInfoKey.num_values", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4180         { &hf_winreg_winreg_EnumKey_keyclass, 
4181           { "Keyclass", "winreg.winreg_EnumKey.keyclass", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
4182         { &hf_winreg_winreg_AccessMask_KEY_SET_VALUE, 
4183           { "Key Set Value", "winreg.winreg_AccessMask.KEY_SET_VALUE", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_SET_VALUE_tfs), ( 0x00002 ), "", HFILL }},
4184         { &hf_winreg_winreg_EnumKey_enum_index, 
4185           { "Enum Index", "winreg.winreg_EnumKey.enum_index", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4186         { &hf_winreg_winreg_RestoreKey_handle, 
4187           { "Handle", "winreg.winreg_RestoreKey.handle", FT_BYTES, BASE_NONE, NULL, 0, "", HFILL }},
4188         { &hf_winreg_winreg_SetValue_data, 
4189           { "Data", "winreg.winreg_SetValue.data", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
4190         { &hf_winreg_winreg_CreateKey_keyclass, 
4191           { "Keyclass", "winreg.winreg_CreateKey.keyclass", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
4192         { &hf_winreg_winreg_InitiateSystemShutdown_force_apps, 
4193           { "Force Apps", "winreg.winreg_InitiateSystemShutdown.force_apps", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
4194         { &hf_winreg_winreg_EnumValue_value, 
4195           { "Value", "winreg.winreg_EnumValue.value", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
4196         { &hf_winreg_winreg_NotifyChangeKeyValue_string1, 
4197           { "String1", "winreg.winreg_NotifyChangeKeyValue.string1", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
4198         { &hf_winreg_winreg_QueryMultipleValues_buffer, 
4199           { "Buffer", "winreg.winreg_QueryMultipleValues.buffer", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
4200         { &hf_winreg_winreg_SetKeySecurity_access_mask, 
4201           { "Access Mask", "winreg.winreg_SetKeySecurity.access_mask", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},
4202         { &hf_winreg_winreg_QueryValue_value_name, 
4203           { "Value Name", "winreg.winreg_QueryValue.value_name", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
4204         { &hf_winreg_winreg_QueryInfoKey_classname, 
4205           { "Classname", "winreg.winreg_QueryInfoKey.classname", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
4206         { &hf_winreg_winreg_AccessMask_KEY_WOW64_64KEY, 
4207           { "Key Wow64 64key", "winreg.winreg_AccessMask.KEY_WOW64_64KEY", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_WOW64_64KEY_tfs), ( 0x00100 ), "", HFILL }},
4208         { &hf_winreg_winreg_OpenHKCU_access_mask, 
4209           { "Access Mask", "winreg.winreg_OpenHKCU.access_mask", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},
4210         { &hf_winreg_sd_max_size, 
4211           { "Max Size", "winreg.sd.max_size", FT_UINT32, BASE_DEC, NULL, 0, " ", HFILL }},
4212         { &hf_winreg_winreg_NotifyChangeKeyValue_notify_filter, 
4213           { "Notify Filter", "winreg.winreg_NotifyChangeKeyValue.notify_filter", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4214         { &hf_winreg_QueryMultipleValue_offset, 
4215           { "Offset", "winreg.QueryMultipleValue.offset", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
4216         };
4217
4218
4219         static gint *ett[] = {
4220                 &ett_dcerpc_winreg,
4221                 &ett_winreg_winreg_AccessMask,
4222                 &ett_winreg_winreg_String,
4223                 &ett_winreg_KeySecurityData,
4224                 &ett_winreg_winreg_SecBuf,
4225                 &ett_winreg_winreg_StringBuf,
4226                 &ett_winreg_KeySecurityAttribute,
4227                 &ett_winreg_QueryMultipleValue,
4228         };
4229
4230         proto_dcerpc_winreg = proto_register_protocol("Remote Registry Service", "WINREG", "winreg");
4231         proto_register_field_array(proto_dcerpc_winreg, hf, array_length (hf));
4232         proto_register_subtree_array(ett, array_length(ett));
4233 }
4234
4235 void proto_reg_handoff_dcerpc_winreg(void)
4236 {
4237         dcerpc_init_uuid(proto_dcerpc_winreg, ett_dcerpc_winreg,
4238                 &uuid_dcerpc_winreg, ver_dcerpc_winreg,
4239                 winreg_dissectors, hf_winreg_opnum);
4240 }