regen pidl all: rm epan/dissectors/pidl/*-stamp; pushd epan/dissectors/pidl/ && make...
[wireshark-sm.git] / epan / dissectors / packet-dcerpc-dssetup.c
blob8d6d7be09a472f895e6f039abfe856ba521ce129
1 /* DO NOT EDIT
2 This file was automatically generated by Pidl
3 from dssetup.idl and dssetup.cnf.
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 https://wiki.wireshark.org/Pidl
9 */
12 #include "config.h"
13 #include <string.h>
14 #include <wsutil/array.h>
15 #include <epan/packet.h>
16 #include <epan/tfs.h>
18 #include "packet-dcerpc.h"
19 #include "packet-dcerpc-nt.h"
20 #include "packet-windows-common.h"
21 #include "packet-dcerpc-dssetup.h"
22 void proto_register_dcerpc_dssetup(void);
23 void proto_reg_handoff_dcerpc_dssetup(void);
25 /* Ett declarations */
26 static int ett_dcerpc_dssetup;
27 static int ett_dssetup_dssetup_DsRoleFlags;
28 static int ett_dssetup_dssetup_DsRolePrimaryDomInfoBasic;
29 static int ett_dssetup_dssetup_DsRoleUpgradeStatus;
30 static int ett_dssetup_dssetup_DsRoleOpStatus;
31 static int ett_dssetup_dssetup_DsRoleInfo;
34 /* Header field declarations */
35 static int hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT;
36 static int hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DS_MIXED_MODE;
37 static int hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DS_RUNNING;
38 static int hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_UPGRADE_IN_PROGRESS;
39 static int hf_dssetup_dssetup_DsRoleGetPrimaryDomainInformation_info;
40 static int hf_dssetup_dssetup_DsRoleGetPrimaryDomainInformation_level;
41 static int hf_dssetup_dssetup_DsRoleInfo_basic;
42 static int hf_dssetup_dssetup_DsRoleInfo_opstatus;
43 static int hf_dssetup_dssetup_DsRoleInfo_upgrade;
44 static int hf_dssetup_dssetup_DsRoleOpStatus_status;
45 static int hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_dns_domain;
46 static int hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_domain;
47 static int hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_domain_guid;
48 static int hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_flags;
49 static int hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_forest;
50 static int hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_role;
51 static int hf_dssetup_dssetup_DsRoleUpgradeStatus_previous_role;
52 static int hf_dssetup_dssetup_DsRoleUpgradeStatus_upgrading;
53 static int hf_dssetup_opnum;
54 static int hf_dssetup_werror;
56 static int proto_dcerpc_dssetup;
57 /* Version information */
60 static e_guid_t uuid_dcerpc_dssetup = {
61 0x3919286a, 0xb10c, 0x11d0,
62 { 0x9b, 0xa8, 0x00, 0xc0, 0x4f, 0xd9, 0x2e, 0xf5 }
64 static uint16_t ver_dcerpc_dssetup = 0;
66 const value_string dssetup_dssetup_DsRole_vals[] = {
67 { DS_ROLE_STANDALONE_WORKSTATION, "DS_ROLE_STANDALONE_WORKSTATION" },
68 { DS_ROLE_MEMBER_WORKSTATION, "DS_ROLE_MEMBER_WORKSTATION" },
69 { DS_ROLE_STANDALONE_SERVER, "DS_ROLE_STANDALONE_SERVER" },
70 { DS_ROLE_MEMBER_SERVER, "DS_ROLE_MEMBER_SERVER" },
71 { DS_ROLE_BACKUP_DC, "DS_ROLE_BACKUP_DC" },
72 { DS_ROLE_PRIMARY_DC, "DS_ROLE_PRIMARY_DC" },
73 { 0, NULL }
75 static const true_false_string dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DS_RUNNING_tfs = {
76 "DS_ROLE_PRIMARY_DS_RUNNING is SET",
77 "DS_ROLE_PRIMARY_DS_RUNNING is NOT SET",
79 static const true_false_string dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DS_MIXED_MODE_tfs = {
80 "DS_ROLE_PRIMARY_DS_MIXED_MODE is SET",
81 "DS_ROLE_PRIMARY_DS_MIXED_MODE is NOT SET",
83 static const true_false_string dssetup_DsRoleFlags_DS_ROLE_UPGRADE_IN_PROGRESS_tfs = {
84 "DS_ROLE_UPGRADE_IN_PROGRESS is SET",
85 "DS_ROLE_UPGRADE_IN_PROGRESS is NOT SET",
87 static const true_false_string dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT_tfs = {
88 "DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT is SET",
89 "DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT is NOT SET",
91 static int dssetup_dissect_element_DsRolePrimaryDomInfoBasic_role(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
92 static int dssetup_dissect_element_DsRolePrimaryDomInfoBasic_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
93 static int dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
94 static int dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
95 static int dssetup_dissect_element_DsRolePrimaryDomInfoBasic_dns_domain(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
96 static int dssetup_dissect_element_DsRolePrimaryDomInfoBasic_dns_domain_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
97 static int dssetup_dissect_element_DsRolePrimaryDomInfoBasic_forest(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
98 static int dssetup_dissect_element_DsRolePrimaryDomInfoBasic_forest_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
99 static int dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain_guid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
100 const value_string dssetup_dssetup_DsUpgrade_vals[] = {
101 { DS_ROLE_NOT_UPGRADING, "DS_ROLE_NOT_UPGRADING" },
102 { DS_ROLE_UPGRADING, "DS_ROLE_UPGRADING" },
103 { 0, NULL }
105 const value_string dssetup_dssetup_DsPrevious_vals[] = {
106 { DS_ROLE_PREVIOUS_UNKNOWN, "DS_ROLE_PREVIOUS_UNKNOWN" },
107 { DS_ROLE_PREVIOUS_PRIMARY, "DS_ROLE_PREVIOUS_PRIMARY" },
108 { DS_ROLE_PREVIOUS_BACKUP, "DS_ROLE_PREVIOUS_BACKUP" },
109 { 0, NULL }
111 static int dssetup_dissect_element_DsRoleUpgradeStatus_upgrading(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
112 static int dssetup_dissect_element_DsRoleUpgradeStatus_previous_role(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
113 const value_string dssetup_dssetup_DsRoleOp_vals[] = {
114 { DS_ROLE_OP_IDLE, "DS_ROLE_OP_IDLE" },
115 { DS_ROLE_OP_ACTIVE, "DS_ROLE_OP_ACTIVE" },
116 { DS_ROLE_OP_NEEDS_REBOOT, "DS_ROLE_OP_NEEDS_REBOOT" },
117 { 0, NULL }
119 static int dssetup_dissect_element_DsRoleOpStatus_status(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
120 const value_string dssetup_dssetup_DsRoleInfoLevel_vals[] = {
121 { DS_ROLE_BASIC_INFORMATION, "DS_ROLE_BASIC_INFORMATION" },
122 { DS_ROLE_UPGRADE_STATUS, "DS_ROLE_UPGRADE_STATUS" },
123 { DS_ROLE_OP_STATUS, "DS_ROLE_OP_STATUS" },
124 { 0, NULL }
126 static int dssetup_dissect_element_DsRoleInfo_basic(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
127 static int dssetup_dissect_element_DsRoleInfo_upgrade(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
128 static int dssetup_dissect_element_DsRoleInfo_opstatus(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
129 static int dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_level(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
130 static int dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
131 static int dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_info_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
134 /* IDL: enum { */
135 /* IDL: DS_ROLE_STANDALONE_WORKSTATION=0, */
136 /* IDL: DS_ROLE_MEMBER_WORKSTATION=1, */
137 /* IDL: DS_ROLE_STANDALONE_SERVER=2, */
138 /* IDL: DS_ROLE_MEMBER_SERVER=3, */
139 /* IDL: DS_ROLE_BACKUP_DC=4, */
140 /* IDL: DS_ROLE_PRIMARY_DC=5, */
141 /* IDL: } */
144 dssetup_dissect_enum_DsRole(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_, int hf_index _U_, uint32_t *param _U_)
146 uint32_t parameter=0;
147 if (param) {
148 parameter = *param;
150 offset = dissect_ndr_uint1632(tvb, offset, pinfo, tree, di, drep, hf_index, &parameter);
151 if (param) {
152 *param = parameter;
154 return offset;
158 /* IDL: bitmap { */
159 /* IDL: DS_ROLE_PRIMARY_DS_RUNNING = 0x00000001 , */
160 /* IDL: DS_ROLE_PRIMARY_DS_MIXED_MODE = 0x00000002 , */
161 /* IDL: DS_ROLE_UPGRADE_IN_PROGRESS = 0x00000004 , */
162 /* IDL: DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT = 0x01000000 , */
163 /* IDL: } */
166 dssetup_dissect_bitmap_DsRoleFlags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_, int hf_index _U_, uint32_t param _U_)
168 proto_item *item;
169 static int * const dssetup_dssetup_DsRoleFlags_fields[] = {
170 &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DS_RUNNING,
171 &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DS_MIXED_MODE,
172 &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_UPGRADE_IN_PROGRESS,
173 &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT,
174 NULL
176 uint32_t flags;
177 ALIGN_TO_4_BYTES;
179 item = proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_index,
180 ett_dssetup_dssetup_DsRoleFlags, dssetup_dssetup_DsRoleFlags_fields, DREP_ENC_INTEGER(drep), BMT_NO_FALSE);
182 offset = dissect_ndr_uint32(tvb, offset, pinfo, parent_tree, di, drep, -1, &flags);
184 if (!flags)
185 proto_item_append_text(item, ": (No values set)");
187 if (flags & (~0x01000007)) {
188 flags &= (~0x01000007);
189 proto_item_append_text(item, "Unknown bitmap value 0x%x", flags);
192 return offset;
196 /* IDL: struct { */
197 /* IDL: dssetup_DsRole role; */
198 /* IDL: dssetup_DsRoleFlags flags; */
199 /* IDL: [charset(UTF16)] [unique(1)] uint16 *domain; */
200 /* IDL: [charset(UTF16)] [unique(1)] uint16 *dns_domain; */
201 /* IDL: [charset(UTF16)] [unique(1)] uint16 *forest; */
202 /* IDL: GUID domain_guid; */
203 /* IDL: } */
205 static int
206 dssetup_dissect_element_DsRolePrimaryDomInfoBasic_role(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
208 offset = dssetup_dissect_enum_DsRole(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_role, 0);
210 return offset;
213 static int
214 dssetup_dissect_element_DsRolePrimaryDomInfoBasic_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
216 offset = dssetup_dissect_bitmap_DsRoleFlags(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_flags, 0);
218 return offset;
221 static int
222 dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
224 offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, di, drep, dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain_, NDR_POINTER_UNIQUE, "Pointer to Domain (uint16)",hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_domain);
226 return offset;
229 static int
230 dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
232 char *data = NULL;
233 struct ndr_generic_array nga = { .is_conformant = false, };
235 offset = dissect_ndr_conformant_array_hdr(tvb, offset, pinfo, tree, di, drep, &nga);
237 offset = dissect_ndr_varying_array_hdr(tvb, offset, pinfo, tree, di, drep, &nga);
238 offset = dissect_ndr_generic_array_string(tvb, offset, pinfo, tree, di, drep, sizeof(uint16_t), hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_domain, false, &nga, &data);
239 proto_item_append_text(tree, ": %s", data);
241 return offset;
244 static int
245 dssetup_dissect_element_DsRolePrimaryDomInfoBasic_dns_domain(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
247 offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, di, drep, dssetup_dissect_element_DsRolePrimaryDomInfoBasic_dns_domain_, NDR_POINTER_UNIQUE, "Pointer to Dns Domain (uint16)",hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_dns_domain);
249 return offset;
252 static int
253 dssetup_dissect_element_DsRolePrimaryDomInfoBasic_dns_domain_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
255 char *data = NULL;
256 struct ndr_generic_array nga = { .is_conformant = false, };
258 offset = dissect_ndr_conformant_array_hdr(tvb, offset, pinfo, tree, di, drep, &nga);
260 offset = dissect_ndr_varying_array_hdr(tvb, offset, pinfo, tree, di, drep, &nga);
261 offset = dissect_ndr_generic_array_string(tvb, offset, pinfo, tree, di, drep, sizeof(uint16_t), hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_dns_domain, false, &nga, &data);
262 proto_item_append_text(tree, ": %s", data);
264 return offset;
267 static int
268 dssetup_dissect_element_DsRolePrimaryDomInfoBasic_forest(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
270 offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, di, drep, dssetup_dissect_element_DsRolePrimaryDomInfoBasic_forest_, NDR_POINTER_UNIQUE, "Pointer to Forest (uint16)",hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_forest);
272 return offset;
275 static int
276 dssetup_dissect_element_DsRolePrimaryDomInfoBasic_forest_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
278 char *data = NULL;
279 struct ndr_generic_array nga = { .is_conformant = false, };
281 offset = dissect_ndr_conformant_array_hdr(tvb, offset, pinfo, tree, di, drep, &nga);
283 offset = dissect_ndr_varying_array_hdr(tvb, offset, pinfo, tree, di, drep, &nga);
284 offset = dissect_ndr_generic_array_string(tvb, offset, pinfo, tree, di, drep, sizeof(uint16_t), hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_forest, false, &nga, &data);
285 proto_item_append_text(tree, ": %s", data);
287 return offset;
290 static int
291 dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain_guid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
293 offset = dissect_ndr_uuid_t(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_domain_guid, NULL);
295 return offset;
299 dssetup_dissect_struct_DsRolePrimaryDomInfoBasic(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_, int hf_index _U_, uint32_t param _U_)
301 proto_item *item = NULL;
302 proto_tree *tree = NULL;
303 int old_offset;
305 ALIGN_TO_5_BYTES;
307 old_offset = offset;
309 if (parent_tree) {
310 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
311 tree = proto_item_add_subtree(item, ett_dssetup_dssetup_DsRolePrimaryDomInfoBasic);
314 offset = dssetup_dissect_element_DsRolePrimaryDomInfoBasic_role(tvb, offset, pinfo, tree, di, drep);
316 offset = dssetup_dissect_element_DsRolePrimaryDomInfoBasic_flags(tvb, offset, pinfo, tree, di, drep);
318 offset = dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain(tvb, offset, pinfo, tree, di, drep);
320 offset = dssetup_dissect_element_DsRolePrimaryDomInfoBasic_dns_domain(tvb, offset, pinfo, tree, di, drep);
322 offset = dssetup_dissect_element_DsRolePrimaryDomInfoBasic_forest(tvb, offset, pinfo, tree, di, drep);
324 offset = dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain_guid(tvb, offset, pinfo, tree, di, drep);
327 proto_item_set_len(item, offset-old_offset);
330 if (di->call_data->flags & DCERPC_IS_NDR64) {
331 ALIGN_TO_5_BYTES;
334 return offset;
338 /* IDL: enum { */
339 /* IDL: DS_ROLE_NOT_UPGRADING=0, */
340 /* IDL: DS_ROLE_UPGRADING=1, */
341 /* IDL: } */
344 dssetup_dissect_enum_DsUpgrade(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_, int hf_index _U_, uint32_t *param _U_)
346 uint32_t parameter=0;
347 if (param) {
348 parameter = *param;
350 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_index, &parameter);
351 if (param) {
352 *param = parameter;
354 return offset;
358 /* IDL: enum { */
359 /* IDL: DS_ROLE_PREVIOUS_UNKNOWN=0, */
360 /* IDL: DS_ROLE_PREVIOUS_PRIMARY=1, */
361 /* IDL: DS_ROLE_PREVIOUS_BACKUP=2, */
362 /* IDL: } */
365 dssetup_dissect_enum_DsPrevious(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_, int hf_index _U_, uint32_t *param _U_)
367 uint32_t parameter=0;
368 if (param) {
369 parameter = *param;
371 offset = dissect_ndr_uint1632(tvb, offset, pinfo, tree, di, drep, hf_index, &parameter);
372 if (param) {
373 *param = parameter;
375 return offset;
379 /* IDL: struct { */
380 /* IDL: dssetup_DsUpgrade upgrading; */
381 /* IDL: dssetup_DsPrevious previous_role; */
382 /* IDL: } */
384 static int
385 dssetup_dissect_element_DsRoleUpgradeStatus_upgrading(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
387 offset = dssetup_dissect_enum_DsUpgrade(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRoleUpgradeStatus_upgrading, 0);
389 return offset;
392 static int
393 dssetup_dissect_element_DsRoleUpgradeStatus_previous_role(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
395 offset = dssetup_dissect_enum_DsPrevious(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRoleUpgradeStatus_previous_role, 0);
397 return offset;
401 dssetup_dissect_struct_DsRoleUpgradeStatus(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_, int hf_index _U_, uint32_t param _U_)
403 proto_item *item = NULL;
404 proto_tree *tree = NULL;
405 int old_offset;
407 ALIGN_TO_4_BYTES;
409 old_offset = offset;
411 if (parent_tree) {
412 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
413 tree = proto_item_add_subtree(item, ett_dssetup_dssetup_DsRoleUpgradeStatus);
416 offset = dssetup_dissect_element_DsRoleUpgradeStatus_upgrading(tvb, offset, pinfo, tree, di, drep);
418 offset = dssetup_dissect_element_DsRoleUpgradeStatus_previous_role(tvb, offset, pinfo, tree, di, drep);
421 proto_item_set_len(item, offset-old_offset);
424 if (di->call_data->flags & DCERPC_IS_NDR64) {
425 ALIGN_TO_4_BYTES;
428 return offset;
432 /* IDL: enum { */
433 /* IDL: DS_ROLE_OP_IDLE=0, */
434 /* IDL: DS_ROLE_OP_ACTIVE=1, */
435 /* IDL: DS_ROLE_OP_NEEDS_REBOOT=2, */
436 /* IDL: } */
439 dssetup_dissect_enum_DsRoleOp(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_, int hf_index _U_, uint32_t *param _U_)
441 uint32_t parameter=0;
442 if (param) {
443 parameter = *param;
445 offset = dissect_ndr_uint1632(tvb, offset, pinfo, tree, di, drep, hf_index, &parameter);
446 if (param) {
447 *param = parameter;
449 return offset;
453 /* IDL: struct { */
454 /* IDL: dssetup_DsRoleOp status; */
455 /* IDL: } */
457 static int
458 dssetup_dissect_element_DsRoleOpStatus_status(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
460 offset = dssetup_dissect_enum_DsRoleOp(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRoleOpStatus_status, 0);
462 return offset;
466 dssetup_dissect_struct_DsRoleOpStatus(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_, int hf_index _U_, uint32_t param _U_)
468 proto_item *item = NULL;
469 proto_tree *tree = NULL;
470 int old_offset;
472 ALIGN_TO_3_BYTES;
474 old_offset = offset;
476 if (parent_tree) {
477 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
478 tree = proto_item_add_subtree(item, ett_dssetup_dssetup_DsRoleOpStatus);
481 offset = dssetup_dissect_element_DsRoleOpStatus_status(tvb, offset, pinfo, tree, di, drep);
484 proto_item_set_len(item, offset-old_offset);
487 if (di->call_data->flags & DCERPC_IS_NDR64) {
488 ALIGN_TO_3_BYTES;
491 return offset;
495 /* IDL: enum { */
496 /* IDL: DS_ROLE_BASIC_INFORMATION=1, */
497 /* IDL: DS_ROLE_UPGRADE_STATUS=2, */
498 /* IDL: DS_ROLE_OP_STATUS=3, */
499 /* IDL: } */
502 dssetup_dissect_enum_DsRoleInfoLevel(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_, int hf_index _U_, uint32_t *param _U_)
504 uint32_t parameter=0;
505 if (param) {
506 parameter = *param;
508 offset = dissect_ndr_uint1632(tvb, offset, pinfo, tree, di, drep, hf_index, &parameter);
509 if (param) {
510 *param = parameter;
512 return offset;
516 /* IDL: [switch_type(dssetup_DsRoleInfoLevel)] union { */
517 /* IDL: [case(DS_ROLE_BASIC_INFORMATION)] [case(DS_ROLE_BASIC_INFORMATION)] dssetup_DsRolePrimaryDomInfoBasic basic; */
518 /* IDL: [case(DS_ROLE_UPGRADE_STATUS)] [case(DS_ROLE_UPGRADE_STATUS)] dssetup_DsRoleUpgradeStatus upgrade; */
519 /* IDL: [case(DS_ROLE_OP_STATUS)] [case(DS_ROLE_OP_STATUS)] dssetup_DsRoleOpStatus opstatus; */
520 /* IDL: } */
522 static int
523 dssetup_dissect_element_DsRoleInfo_basic(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
525 offset = dssetup_dissect_struct_DsRolePrimaryDomInfoBasic(tvb,offset,pinfo,tree,di,drep,hf_dssetup_dssetup_DsRoleInfo_basic,0);
527 return offset;
530 static int
531 dssetup_dissect_element_DsRoleInfo_upgrade(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
533 offset = dssetup_dissect_struct_DsRoleUpgradeStatus(tvb,offset,pinfo,tree,di,drep,hf_dssetup_dssetup_DsRoleInfo_upgrade,0);
535 return offset;
538 static int
539 dssetup_dissect_element_DsRoleInfo_opstatus(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
541 offset = dssetup_dissect_struct_DsRoleOpStatus(tvb,offset,pinfo,tree,di,drep,hf_dssetup_dssetup_DsRoleInfo_opstatus,0);
543 return offset;
546 static int
547 dssetup_dissect_DsRoleInfo(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_, int hf_index _U_, uint32_t param _U_)
549 proto_item *item = NULL;
550 proto_tree *tree = NULL;
551 int old_offset;
552 uint32_t level;
554 old_offset = offset;
555 if (parent_tree) {
556 tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_dssetup_dssetup_DsRoleInfo, &item, "dssetup_DsRoleInfo");
559 UNION_ALIGN_TO_5_BYTES;
560 offset = dissect_ndr_uint1632(tvb, offset, pinfo, tree, di, drep, hf_index, &level);
561 UNION_ALIGN_TO_5_BYTES;
563 switch(level) {
564 case DS_ROLE_BASIC_INFORMATION:
565 offset = dssetup_dissect_element_DsRoleInfo_basic(tvb, offset, pinfo, tree, di, drep);
566 break;
568 case DS_ROLE_UPGRADE_STATUS:
569 offset = dssetup_dissect_element_DsRoleInfo_upgrade(tvb, offset, pinfo, tree, di, drep);
570 break;
572 case DS_ROLE_OP_STATUS:
573 offset = dssetup_dissect_element_DsRoleInfo_opstatus(tvb, offset, pinfo, tree, di, drep);
574 break;
576 proto_item_set_len(item, offset-old_offset);
579 return offset;
581 static int
582 dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_level(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
584 offset = dssetup_dissect_enum_DsRoleInfoLevel(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRoleGetPrimaryDomainInformation_level, 0);
586 return offset;
589 static int
590 dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
592 offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_info_, NDR_POINTER_UNIQUE, "Pointer to Info (dssetup_DsRoleInfo)",hf_dssetup_dssetup_DsRoleGetPrimaryDomainInformation_info);
594 return offset;
597 static int
598 dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_info_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
600 offset = dssetup_dissect_DsRoleInfo(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRoleGetPrimaryDomainInformation_info, 0);
602 return offset;
605 /* IDL: WERROR dssetup_DsRoleGetPrimaryDomainInformation( */
606 /* IDL: [in] dssetup_DsRoleInfoLevel level, */
607 /* IDL: [out] [switch_is(level)] [unique(1)] dssetup_DsRoleInfo *info */
608 /* IDL: ); */
610 static int
611 dssetup_dissect_DsRoleGetPrimaryDomainInformation_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
613 uint32_t status;
615 di->dcerpc_procedure_name="DsRoleGetPrimaryDomainInformation";
616 offset = dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_info(tvb, offset, pinfo, tree, di, drep);
617 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
619 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
621 if (status != 0)
622 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
624 return offset;
627 static int
628 dssetup_dissect_DsRoleGetPrimaryDomainInformation_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
630 di->dcerpc_procedure_name="DsRoleGetPrimaryDomainInformation";
631 offset = dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_level(tvb, offset, pinfo, tree, di, drep);
632 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
633 return offset;
636 /* IDL: WERROR dssetup_DsRoleDnsNameToFlatName( */
637 /* IDL: */
638 /* IDL: ); */
640 static int
641 dssetup_dissect_DsRoleDnsNameToFlatName_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
643 uint32_t status;
645 di->dcerpc_procedure_name="DsRoleDnsNameToFlatName";
646 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
648 if (status != 0)
649 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
651 return offset;
654 static int
655 dssetup_dissect_DsRoleDnsNameToFlatName_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
657 di->dcerpc_procedure_name="DsRoleDnsNameToFlatName";
658 return offset;
661 /* IDL: WERROR dssetup_DsRoleDcAsDc( */
662 /* IDL: */
663 /* IDL: ); */
665 static int
666 dssetup_dissect_DsRoleDcAsDc_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
668 uint32_t status;
670 di->dcerpc_procedure_name="DsRoleDcAsDc";
671 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
673 if (status != 0)
674 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
676 return offset;
679 static int
680 dssetup_dissect_DsRoleDcAsDc_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
682 di->dcerpc_procedure_name="DsRoleDcAsDc";
683 return offset;
686 /* IDL: WERROR dssetup_DsRoleDcAsReplica( */
687 /* IDL: */
688 /* IDL: ); */
690 static int
691 dssetup_dissect_DsRoleDcAsReplica_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
693 uint32_t status;
695 di->dcerpc_procedure_name="DsRoleDcAsReplica";
696 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
698 if (status != 0)
699 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
701 return offset;
704 static int
705 dssetup_dissect_DsRoleDcAsReplica_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
707 di->dcerpc_procedure_name="DsRoleDcAsReplica";
708 return offset;
711 /* IDL: WERROR dssetup_DsRoleDemoteDc( */
712 /* IDL: */
713 /* IDL: ); */
715 static int
716 dssetup_dissect_DsRoleDemoteDc_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
718 uint32_t status;
720 di->dcerpc_procedure_name="DsRoleDemoteDc";
721 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
723 if (status != 0)
724 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
726 return offset;
729 static int
730 dssetup_dissect_DsRoleDemoteDc_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
732 di->dcerpc_procedure_name="DsRoleDemoteDc";
733 return offset;
736 /* IDL: WERROR dssetup_DsRoleGetDcOperationProgress( */
737 /* IDL: */
738 /* IDL: ); */
740 static int
741 dssetup_dissect_DsRoleGetDcOperationProgress_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
743 uint32_t status;
745 di->dcerpc_procedure_name="DsRoleGetDcOperationProgress";
746 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
748 if (status != 0)
749 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
751 return offset;
754 static int
755 dssetup_dissect_DsRoleGetDcOperationProgress_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
757 di->dcerpc_procedure_name="DsRoleGetDcOperationProgress";
758 return offset;
761 /* IDL: WERROR dssetup_DsRoleGetDcOperationResults( */
762 /* IDL: */
763 /* IDL: ); */
765 static int
766 dssetup_dissect_DsRoleGetDcOperationResults_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
768 uint32_t status;
770 di->dcerpc_procedure_name="DsRoleGetDcOperationResults";
771 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
773 if (status != 0)
774 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
776 return offset;
779 static int
780 dssetup_dissect_DsRoleGetDcOperationResults_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
782 di->dcerpc_procedure_name="DsRoleGetDcOperationResults";
783 return offset;
786 /* IDL: WERROR dssetup_DsRoleCancel( */
787 /* IDL: */
788 /* IDL: ); */
790 static int
791 dssetup_dissect_DsRoleCancel_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
793 uint32_t status;
795 di->dcerpc_procedure_name="DsRoleCancel";
796 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
798 if (status != 0)
799 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
801 return offset;
804 static int
805 dssetup_dissect_DsRoleCancel_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
807 di->dcerpc_procedure_name="DsRoleCancel";
808 return offset;
811 /* IDL: WERROR dssetup_DsRoleServerSaveStateForUpgrade( */
812 /* IDL: */
813 /* IDL: ); */
815 static int
816 dssetup_dissect_DsRoleServerSaveStateForUpgrade_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
818 uint32_t status;
820 di->dcerpc_procedure_name="DsRoleServerSaveStateForUpgrade";
821 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
823 if (status != 0)
824 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
826 return offset;
829 static int
830 dssetup_dissect_DsRoleServerSaveStateForUpgrade_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
832 di->dcerpc_procedure_name="DsRoleServerSaveStateForUpgrade";
833 return offset;
836 /* IDL: WERROR dssetup_DsRoleUpgradeDownlevelServer( */
837 /* IDL: */
838 /* IDL: ); */
840 static int
841 dssetup_dissect_DsRoleUpgradeDownlevelServer_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
843 uint32_t status;
845 di->dcerpc_procedure_name="DsRoleUpgradeDownlevelServer";
846 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
848 if (status != 0)
849 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
851 return offset;
854 static int
855 dssetup_dissect_DsRoleUpgradeDownlevelServer_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
857 di->dcerpc_procedure_name="DsRoleUpgradeDownlevelServer";
858 return offset;
861 /* IDL: WERROR dssetup_DsRoleAbortDownlevelServerUpgrade( */
862 /* IDL: */
863 /* IDL: ); */
865 static int
866 dssetup_dissect_DsRoleAbortDownlevelServerUpgrade_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
868 uint32_t status;
870 di->dcerpc_procedure_name="DsRoleAbortDownlevelServerUpgrade";
871 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
873 if (status != 0)
874 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
876 return offset;
879 static int
880 dssetup_dissect_DsRoleAbortDownlevelServerUpgrade_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
882 di->dcerpc_procedure_name="DsRoleAbortDownlevelServerUpgrade";
883 return offset;
887 static const dcerpc_sub_dissector dssetup_dissectors[] = {
888 { 0, "DsRoleGetPrimaryDomainInformation",
889 dssetup_dissect_DsRoleGetPrimaryDomainInformation_request, dssetup_dissect_DsRoleGetPrimaryDomainInformation_response},
890 { 1, "DsRoleDnsNameToFlatName",
891 dssetup_dissect_DsRoleDnsNameToFlatName_request, dssetup_dissect_DsRoleDnsNameToFlatName_response},
892 { 2, "DsRoleDcAsDc",
893 dssetup_dissect_DsRoleDcAsDc_request, dssetup_dissect_DsRoleDcAsDc_response},
894 { 3, "DsRoleDcAsReplica",
895 dssetup_dissect_DsRoleDcAsReplica_request, dssetup_dissect_DsRoleDcAsReplica_response},
896 { 4, "DsRoleDemoteDc",
897 dssetup_dissect_DsRoleDemoteDc_request, dssetup_dissect_DsRoleDemoteDc_response},
898 { 5, "DsRoleGetDcOperationProgress",
899 dssetup_dissect_DsRoleGetDcOperationProgress_request, dssetup_dissect_DsRoleGetDcOperationProgress_response},
900 { 6, "DsRoleGetDcOperationResults",
901 dssetup_dissect_DsRoleGetDcOperationResults_request, dssetup_dissect_DsRoleGetDcOperationResults_response},
902 { 7, "DsRoleCancel",
903 dssetup_dissect_DsRoleCancel_request, dssetup_dissect_DsRoleCancel_response},
904 { 8, "DsRoleServerSaveStateForUpgrade",
905 dssetup_dissect_DsRoleServerSaveStateForUpgrade_request, dssetup_dissect_DsRoleServerSaveStateForUpgrade_response},
906 { 9, "DsRoleUpgradeDownlevelServer",
907 dssetup_dissect_DsRoleUpgradeDownlevelServer_request, dssetup_dissect_DsRoleUpgradeDownlevelServer_response},
908 { 10, "DsRoleAbortDownlevelServerUpgrade",
909 dssetup_dissect_DsRoleAbortDownlevelServerUpgrade_request, dssetup_dissect_DsRoleAbortDownlevelServerUpgrade_response},
910 { 0, NULL, NULL, NULL }
913 void proto_register_dcerpc_dssetup(void)
915 static hf_register_info hf[] = {
916 { &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT,
917 { "DS ROLE PRIMARY DOMAIN GUID PRESENT", "dssetup.dssetup_DsRoleFlags.DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT", FT_BOOLEAN, 32, TFS(&dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT_tfs), ( 0x01000000 ), NULL, HFILL }},
918 { &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DS_MIXED_MODE,
919 { "DS ROLE PRIMARY DS MIXED MODE", "dssetup.dssetup_DsRoleFlags.DS_ROLE_PRIMARY_DS_MIXED_MODE", FT_BOOLEAN, 32, TFS(&dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DS_MIXED_MODE_tfs), ( 0x00000002 ), NULL, HFILL }},
920 { &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DS_RUNNING,
921 { "DS ROLE PRIMARY DS RUNNING", "dssetup.dssetup_DsRoleFlags.DS_ROLE_PRIMARY_DS_RUNNING", FT_BOOLEAN, 32, TFS(&dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DS_RUNNING_tfs), ( 0x00000001 ), NULL, HFILL }},
922 { &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_UPGRADE_IN_PROGRESS,
923 { "DS ROLE UPGRADE IN PROGRESS", "dssetup.dssetup_DsRoleFlags.DS_ROLE_UPGRADE_IN_PROGRESS", FT_BOOLEAN, 32, TFS(&dssetup_DsRoleFlags_DS_ROLE_UPGRADE_IN_PROGRESS_tfs), ( 0x00000004 ), NULL, HFILL }},
924 { &hf_dssetup_dssetup_DsRoleGetPrimaryDomainInformation_info,
925 { "Info", "dssetup.dssetup_DsRoleGetPrimaryDomainInformation.info", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
926 { &hf_dssetup_dssetup_DsRoleGetPrimaryDomainInformation_level,
927 { "Level", "dssetup.dssetup_DsRoleGetPrimaryDomainInformation.level", FT_UINT1632, BASE_DEC, VALS(dssetup_dssetup_DsRoleInfoLevel_vals), 0, NULL, HFILL }},
928 { &hf_dssetup_dssetup_DsRoleInfo_basic,
929 { "Basic", "dssetup.dssetup_DsRoleInfo.basic", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
930 { &hf_dssetup_dssetup_DsRoleInfo_opstatus,
931 { "Opstatus", "dssetup.dssetup_DsRoleInfo.opstatus", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
932 { &hf_dssetup_dssetup_DsRoleInfo_upgrade,
933 { "Upgrade", "dssetup.dssetup_DsRoleInfo.upgrade", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
934 { &hf_dssetup_dssetup_DsRoleOpStatus_status,
935 { "Status", "dssetup.dssetup_DsRoleOpStatus.status", FT_UINT1632, BASE_DEC, VALS(dssetup_dssetup_DsRoleOp_vals), 0, NULL, HFILL }},
936 { &hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_dns_domain,
937 { "Dns Domain", "dssetup.dssetup_DsRolePrimaryDomInfoBasic.dns_domain", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
938 { &hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_domain,
939 { "Domain", "dssetup.dssetup_DsRolePrimaryDomInfoBasic.domain", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
940 { &hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_domain_guid,
941 { "Domain Guid", "dssetup.dssetup_DsRolePrimaryDomInfoBasic.domain_guid", FT_GUID, BASE_NONE, NULL, 0, NULL, HFILL }},
942 { &hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_flags,
943 { "Flags", "dssetup.dssetup_DsRolePrimaryDomInfoBasic.flags", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
944 { &hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_forest,
945 { "Forest", "dssetup.dssetup_DsRolePrimaryDomInfoBasic.forest", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
946 { &hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_role,
947 { "Role", "dssetup.dssetup_DsRolePrimaryDomInfoBasic.role", FT_UINT1632, BASE_DEC, VALS(dssetup_dssetup_DsRole_vals), 0, NULL, HFILL }},
948 { &hf_dssetup_dssetup_DsRoleUpgradeStatus_previous_role,
949 { "Previous Role", "dssetup.dssetup_DsRoleUpgradeStatus.previous_role", FT_UINT1632, BASE_DEC, VALS(dssetup_dssetup_DsPrevious_vals), 0, NULL, HFILL }},
950 { &hf_dssetup_dssetup_DsRoleUpgradeStatus_upgrading,
951 { "Upgrading", "dssetup.dssetup_DsRoleUpgradeStatus.upgrading", FT_UINT32, BASE_DEC, VALS(dssetup_dssetup_DsUpgrade_vals), 0, NULL, HFILL }},
952 { &hf_dssetup_opnum,
953 { "Operation", "dssetup.opnum", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
954 { &hf_dssetup_werror,
955 { "Windows Error", "dssetup.werror", FT_UINT32, BASE_HEX|BASE_EXT_STRING, &WERR_errors_ext, 0, NULL, HFILL }},
959 static int *ett[] = {
960 &ett_dcerpc_dssetup,
961 &ett_dssetup_dssetup_DsRoleFlags,
962 &ett_dssetup_dssetup_DsRolePrimaryDomInfoBasic,
963 &ett_dssetup_dssetup_DsRoleUpgradeStatus,
964 &ett_dssetup_dssetup_DsRoleOpStatus,
965 &ett_dssetup_dssetup_DsRoleInfo,
968 proto_dcerpc_dssetup = proto_register_protocol("Active Directory Setup", "DSSETUP", "dssetup");
969 proto_register_field_array(proto_dcerpc_dssetup, hf, array_length (hf));
970 proto_register_subtree_array(ett, array_length(ett));
973 void proto_reg_handoff_dcerpc_dssetup(void)
975 dcerpc_init_uuid(proto_dcerpc_dssetup, ett_dcerpc_dssetup,
976 &uuid_dcerpc_dssetup, ver_dcerpc_dssetup,
977 dssetup_dissectors, hf_dssetup_opnum);