epan/dissectors/pidl/ C99 drsuapi
[wireshark-sm.git] / epan / dissectors / packet-dcerpc-dssetup.c
blob1ace251acb35a93fb06cfda04c6041254d3bfe65
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;
234 offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(uint16_t), hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_domain, false, &data);
235 proto_item_append_text(tree, ": %s", data);
237 return offset;
240 static int
241 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_)
243 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);
245 return offset;
248 static int
249 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_)
251 char *data;
253 offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(uint16_t), hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_dns_domain, false, &data);
254 proto_item_append_text(tree, ": %s", data);
256 return offset;
259 static int
260 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_)
262 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);
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 char *data;
272 offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(uint16_t), hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_forest, false, &data);
273 proto_item_append_text(tree, ": %s", data);
275 return offset;
278 static int
279 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_)
281 offset = dissect_ndr_uuid_t(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_domain_guid, NULL);
283 return offset;
287 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_)
289 proto_item *item = NULL;
290 proto_tree *tree = NULL;
291 int old_offset;
293 ALIGN_TO_5_BYTES;
295 old_offset = offset;
297 if (parent_tree) {
298 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
299 tree = proto_item_add_subtree(item, ett_dssetup_dssetup_DsRolePrimaryDomInfoBasic);
302 offset = dssetup_dissect_element_DsRolePrimaryDomInfoBasic_role(tvb, offset, pinfo, tree, di, drep);
304 offset = dssetup_dissect_element_DsRolePrimaryDomInfoBasic_flags(tvb, offset, pinfo, tree, di, drep);
306 offset = dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain(tvb, offset, pinfo, tree, di, drep);
308 offset = dssetup_dissect_element_DsRolePrimaryDomInfoBasic_dns_domain(tvb, offset, pinfo, tree, di, drep);
310 offset = dssetup_dissect_element_DsRolePrimaryDomInfoBasic_forest(tvb, offset, pinfo, tree, di, drep);
312 offset = dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain_guid(tvb, offset, pinfo, tree, di, drep);
315 proto_item_set_len(item, offset-old_offset);
318 if (di->call_data->flags & DCERPC_IS_NDR64) {
319 ALIGN_TO_5_BYTES;
322 return offset;
326 /* IDL: enum { */
327 /* IDL: DS_ROLE_NOT_UPGRADING=0, */
328 /* IDL: DS_ROLE_UPGRADING=1, */
329 /* IDL: } */
332 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_)
334 uint32_t parameter=0;
335 if (param) {
336 parameter = *param;
338 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_index, &parameter);
339 if (param) {
340 *param = parameter;
342 return offset;
346 /* IDL: enum { */
347 /* IDL: DS_ROLE_PREVIOUS_UNKNOWN=0, */
348 /* IDL: DS_ROLE_PREVIOUS_PRIMARY=1, */
349 /* IDL: DS_ROLE_PREVIOUS_BACKUP=2, */
350 /* IDL: } */
353 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_)
355 uint32_t parameter=0;
356 if (param) {
357 parameter = *param;
359 offset = dissect_ndr_uint1632(tvb, offset, pinfo, tree, di, drep, hf_index, &parameter);
360 if (param) {
361 *param = parameter;
363 return offset;
367 /* IDL: struct { */
368 /* IDL: dssetup_DsUpgrade upgrading; */
369 /* IDL: dssetup_DsPrevious previous_role; */
370 /* IDL: } */
372 static int
373 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_)
375 offset = dssetup_dissect_enum_DsUpgrade(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRoleUpgradeStatus_upgrading, 0);
377 return offset;
380 static int
381 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_)
383 offset = dssetup_dissect_enum_DsPrevious(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRoleUpgradeStatus_previous_role, 0);
385 return offset;
389 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_)
391 proto_item *item = NULL;
392 proto_tree *tree = NULL;
393 int old_offset;
395 ALIGN_TO_4_BYTES;
397 old_offset = offset;
399 if (parent_tree) {
400 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
401 tree = proto_item_add_subtree(item, ett_dssetup_dssetup_DsRoleUpgradeStatus);
404 offset = dssetup_dissect_element_DsRoleUpgradeStatus_upgrading(tvb, offset, pinfo, tree, di, drep);
406 offset = dssetup_dissect_element_DsRoleUpgradeStatus_previous_role(tvb, offset, pinfo, tree, di, drep);
409 proto_item_set_len(item, offset-old_offset);
412 if (di->call_data->flags & DCERPC_IS_NDR64) {
413 ALIGN_TO_4_BYTES;
416 return offset;
420 /* IDL: enum { */
421 /* IDL: DS_ROLE_OP_IDLE=0, */
422 /* IDL: DS_ROLE_OP_ACTIVE=1, */
423 /* IDL: DS_ROLE_OP_NEEDS_REBOOT=2, */
424 /* IDL: } */
427 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_)
429 uint32_t parameter=0;
430 if (param) {
431 parameter = *param;
433 offset = dissect_ndr_uint1632(tvb, offset, pinfo, tree, di, drep, hf_index, &parameter);
434 if (param) {
435 *param = parameter;
437 return offset;
441 /* IDL: struct { */
442 /* IDL: dssetup_DsRoleOp status; */
443 /* IDL: } */
445 static int
446 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_)
448 offset = dssetup_dissect_enum_DsRoleOp(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRoleOpStatus_status, 0);
450 return offset;
454 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_)
456 proto_item *item = NULL;
457 proto_tree *tree = NULL;
458 int old_offset;
460 ALIGN_TO_3_BYTES;
462 old_offset = offset;
464 if (parent_tree) {
465 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
466 tree = proto_item_add_subtree(item, ett_dssetup_dssetup_DsRoleOpStatus);
469 offset = dssetup_dissect_element_DsRoleOpStatus_status(tvb, offset, pinfo, tree, di, drep);
472 proto_item_set_len(item, offset-old_offset);
475 if (di->call_data->flags & DCERPC_IS_NDR64) {
476 ALIGN_TO_3_BYTES;
479 return offset;
483 /* IDL: enum { */
484 /* IDL: DS_ROLE_BASIC_INFORMATION=1, */
485 /* IDL: DS_ROLE_UPGRADE_STATUS=2, */
486 /* IDL: DS_ROLE_OP_STATUS=3, */
487 /* IDL: } */
490 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_)
492 uint32_t parameter=0;
493 if (param) {
494 parameter = *param;
496 offset = dissect_ndr_uint1632(tvb, offset, pinfo, tree, di, drep, hf_index, &parameter);
497 if (param) {
498 *param = parameter;
500 return offset;
504 /* IDL: [switch_type(dssetup_DsRoleInfoLevel)] union { */
505 /* IDL: [case(DS_ROLE_BASIC_INFORMATION)] [case(DS_ROLE_BASIC_INFORMATION)] dssetup_DsRolePrimaryDomInfoBasic basic; */
506 /* IDL: [case(DS_ROLE_UPGRADE_STATUS)] [case(DS_ROLE_UPGRADE_STATUS)] dssetup_DsRoleUpgradeStatus upgrade; */
507 /* IDL: [case(DS_ROLE_OP_STATUS)] [case(DS_ROLE_OP_STATUS)] dssetup_DsRoleOpStatus opstatus; */
508 /* IDL: } */
510 static int
511 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_)
513 offset = dssetup_dissect_struct_DsRolePrimaryDomInfoBasic(tvb,offset,pinfo,tree,di,drep,hf_dssetup_dssetup_DsRoleInfo_basic,0);
515 return offset;
518 static int
519 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_)
521 offset = dssetup_dissect_struct_DsRoleUpgradeStatus(tvb,offset,pinfo,tree,di,drep,hf_dssetup_dssetup_DsRoleInfo_upgrade,0);
523 return offset;
526 static int
527 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_)
529 offset = dssetup_dissect_struct_DsRoleOpStatus(tvb,offset,pinfo,tree,di,drep,hf_dssetup_dssetup_DsRoleInfo_opstatus,0);
531 return offset;
534 static int
535 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_)
537 proto_item *item = NULL;
538 proto_tree *tree = NULL;
539 int old_offset;
540 uint32_t level;
542 old_offset = offset;
543 if (parent_tree) {
544 tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_dssetup_dssetup_DsRoleInfo, &item, "dssetup_DsRoleInfo");
547 offset = dissect_ndr_uint1632(tvb, offset, pinfo, tree, di, drep, hf_index, &level);
548 ALIGN_TO_5_BYTES;
550 switch(level) {
551 case DS_ROLE_BASIC_INFORMATION:
552 offset = dssetup_dissect_element_DsRoleInfo_basic(tvb, offset, pinfo, tree, di, drep);
553 break;
555 case DS_ROLE_UPGRADE_STATUS:
556 offset = dssetup_dissect_element_DsRoleInfo_upgrade(tvb, offset, pinfo, tree, di, drep);
557 break;
559 case DS_ROLE_OP_STATUS:
560 offset = dssetup_dissect_element_DsRoleInfo_opstatus(tvb, offset, pinfo, tree, di, drep);
561 break;
563 proto_item_set_len(item, offset-old_offset);
566 return offset;
568 static int
569 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_)
571 offset = dssetup_dissect_enum_DsRoleInfoLevel(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRoleGetPrimaryDomainInformation_level, 0);
573 return offset;
576 static int
577 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_)
579 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);
581 return offset;
584 static int
585 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_)
587 offset = dssetup_dissect_DsRoleInfo(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRoleGetPrimaryDomainInformation_info, 0);
589 return offset;
592 /* IDL: WERROR dssetup_DsRoleGetPrimaryDomainInformation( */
593 /* IDL: [in] dssetup_DsRoleInfoLevel level, */
594 /* IDL: [out] [switch_is(level)] [unique(1)] dssetup_DsRoleInfo *info */
595 /* IDL: ); */
597 static int
598 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_)
600 uint32_t status;
602 di->dcerpc_procedure_name="DsRoleGetPrimaryDomainInformation";
603 offset = dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_info(tvb, offset, pinfo, tree, di, drep);
604 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
606 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
608 if (status != 0)
609 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
611 return offset;
614 static int
615 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_)
617 di->dcerpc_procedure_name="DsRoleGetPrimaryDomainInformation";
618 offset = dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_level(tvb, offset, pinfo, tree, di, drep);
619 offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
620 return offset;
623 /* IDL: WERROR dssetup_DsRoleDnsNameToFlatName( */
624 /* IDL: */
625 /* IDL: ); */
627 static int
628 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_)
630 uint32_t status;
632 di->dcerpc_procedure_name="DsRoleDnsNameToFlatName";
633 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
635 if (status != 0)
636 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
638 return offset;
641 static int
642 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_)
644 di->dcerpc_procedure_name="DsRoleDnsNameToFlatName";
645 return offset;
648 /* IDL: WERROR dssetup_DsRoleDcAsDc( */
649 /* IDL: */
650 /* IDL: ); */
652 static int
653 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_)
655 uint32_t status;
657 di->dcerpc_procedure_name="DsRoleDcAsDc";
658 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
660 if (status != 0)
661 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
663 return offset;
666 static int
667 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_)
669 di->dcerpc_procedure_name="DsRoleDcAsDc";
670 return offset;
673 /* IDL: WERROR dssetup_DsRoleDcAsReplica( */
674 /* IDL: */
675 /* IDL: ); */
677 static int
678 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_)
680 uint32_t status;
682 di->dcerpc_procedure_name="DsRoleDcAsReplica";
683 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
685 if (status != 0)
686 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
688 return offset;
691 static int
692 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_)
694 di->dcerpc_procedure_name="DsRoleDcAsReplica";
695 return offset;
698 /* IDL: WERROR dssetup_DsRoleDemoteDc( */
699 /* IDL: */
700 /* IDL: ); */
702 static int
703 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_)
705 uint32_t status;
707 di->dcerpc_procedure_name="DsRoleDemoteDc";
708 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
710 if (status != 0)
711 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
713 return offset;
716 static int
717 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_)
719 di->dcerpc_procedure_name="DsRoleDemoteDc";
720 return offset;
723 /* IDL: WERROR dssetup_DsRoleGetDcOperationProgress( */
724 /* IDL: */
725 /* IDL: ); */
727 static int
728 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_)
730 uint32_t status;
732 di->dcerpc_procedure_name="DsRoleGetDcOperationProgress";
733 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
735 if (status != 0)
736 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
738 return offset;
741 static int
742 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_)
744 di->dcerpc_procedure_name="DsRoleGetDcOperationProgress";
745 return offset;
748 /* IDL: WERROR dssetup_DsRoleGetDcOperationResults( */
749 /* IDL: */
750 /* IDL: ); */
752 static int
753 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_)
755 uint32_t status;
757 di->dcerpc_procedure_name="DsRoleGetDcOperationResults";
758 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
760 if (status != 0)
761 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
763 return offset;
766 static int
767 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_)
769 di->dcerpc_procedure_name="DsRoleGetDcOperationResults";
770 return offset;
773 /* IDL: WERROR dssetup_DsRoleCancel( */
774 /* IDL: */
775 /* IDL: ); */
777 static int
778 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_)
780 uint32_t status;
782 di->dcerpc_procedure_name="DsRoleCancel";
783 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
785 if (status != 0)
786 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
788 return offset;
791 static int
792 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_)
794 di->dcerpc_procedure_name="DsRoleCancel";
795 return offset;
798 /* IDL: WERROR dssetup_DsRoleServerSaveStateForUpgrade( */
799 /* IDL: */
800 /* IDL: ); */
802 static int
803 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_)
805 uint32_t status;
807 di->dcerpc_procedure_name="DsRoleServerSaveStateForUpgrade";
808 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
810 if (status != 0)
811 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
813 return offset;
816 static int
817 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_)
819 di->dcerpc_procedure_name="DsRoleServerSaveStateForUpgrade";
820 return offset;
823 /* IDL: WERROR dssetup_DsRoleUpgradeDownlevelServer( */
824 /* IDL: */
825 /* IDL: ); */
827 static int
828 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_)
830 uint32_t status;
832 di->dcerpc_procedure_name="DsRoleUpgradeDownlevelServer";
833 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
835 if (status != 0)
836 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
838 return offset;
841 static int
842 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_)
844 di->dcerpc_procedure_name="DsRoleUpgradeDownlevelServer";
845 return offset;
848 /* IDL: WERROR dssetup_DsRoleAbortDownlevelServerUpgrade( */
849 /* IDL: */
850 /* IDL: ); */
852 static int
853 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_)
855 uint32_t status;
857 di->dcerpc_procedure_name="DsRoleAbortDownlevelServerUpgrade";
858 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
860 if (status != 0)
861 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
863 return offset;
866 static int
867 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_)
869 di->dcerpc_procedure_name="DsRoleAbortDownlevelServerUpgrade";
870 return offset;
874 static const dcerpc_sub_dissector dssetup_dissectors[] = {
875 { 0, "DsRoleGetPrimaryDomainInformation",
876 dssetup_dissect_DsRoleGetPrimaryDomainInformation_request, dssetup_dissect_DsRoleGetPrimaryDomainInformation_response},
877 { 1, "DsRoleDnsNameToFlatName",
878 dssetup_dissect_DsRoleDnsNameToFlatName_request, dssetup_dissect_DsRoleDnsNameToFlatName_response},
879 { 2, "DsRoleDcAsDc",
880 dssetup_dissect_DsRoleDcAsDc_request, dssetup_dissect_DsRoleDcAsDc_response},
881 { 3, "DsRoleDcAsReplica",
882 dssetup_dissect_DsRoleDcAsReplica_request, dssetup_dissect_DsRoleDcAsReplica_response},
883 { 4, "DsRoleDemoteDc",
884 dssetup_dissect_DsRoleDemoteDc_request, dssetup_dissect_DsRoleDemoteDc_response},
885 { 5, "DsRoleGetDcOperationProgress",
886 dssetup_dissect_DsRoleGetDcOperationProgress_request, dssetup_dissect_DsRoleGetDcOperationProgress_response},
887 { 6, "DsRoleGetDcOperationResults",
888 dssetup_dissect_DsRoleGetDcOperationResults_request, dssetup_dissect_DsRoleGetDcOperationResults_response},
889 { 7, "DsRoleCancel",
890 dssetup_dissect_DsRoleCancel_request, dssetup_dissect_DsRoleCancel_response},
891 { 8, "DsRoleServerSaveStateForUpgrade",
892 dssetup_dissect_DsRoleServerSaveStateForUpgrade_request, dssetup_dissect_DsRoleServerSaveStateForUpgrade_response},
893 { 9, "DsRoleUpgradeDownlevelServer",
894 dssetup_dissect_DsRoleUpgradeDownlevelServer_request, dssetup_dissect_DsRoleUpgradeDownlevelServer_response},
895 { 10, "DsRoleAbortDownlevelServerUpgrade",
896 dssetup_dissect_DsRoleAbortDownlevelServerUpgrade_request, dssetup_dissect_DsRoleAbortDownlevelServerUpgrade_response},
897 { 0, NULL, NULL, NULL }
900 void proto_register_dcerpc_dssetup(void)
902 static hf_register_info hf[] = {
903 { &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT,
904 { "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 }},
905 { &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DS_MIXED_MODE,
906 { "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 }},
907 { &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DS_RUNNING,
908 { "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 }},
909 { &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_UPGRADE_IN_PROGRESS,
910 { "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 }},
911 { &hf_dssetup_dssetup_DsRoleGetPrimaryDomainInformation_info,
912 { "Info", "dssetup.dssetup_DsRoleGetPrimaryDomainInformation.info", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
913 { &hf_dssetup_dssetup_DsRoleGetPrimaryDomainInformation_level,
914 { "Level", "dssetup.dssetup_DsRoleGetPrimaryDomainInformation.level", FT_UINT1632, BASE_DEC, VALS(dssetup_dssetup_DsRoleInfoLevel_vals), 0, NULL, HFILL }},
915 { &hf_dssetup_dssetup_DsRoleInfo_basic,
916 { "Basic", "dssetup.dssetup_DsRoleInfo.basic", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
917 { &hf_dssetup_dssetup_DsRoleInfo_opstatus,
918 { "Opstatus", "dssetup.dssetup_DsRoleInfo.opstatus", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
919 { &hf_dssetup_dssetup_DsRoleInfo_upgrade,
920 { "Upgrade", "dssetup.dssetup_DsRoleInfo.upgrade", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
921 { &hf_dssetup_dssetup_DsRoleOpStatus_status,
922 { "Status", "dssetup.dssetup_DsRoleOpStatus.status", FT_UINT1632, BASE_DEC, VALS(dssetup_dssetup_DsRoleOp_vals), 0, NULL, HFILL }},
923 { &hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_dns_domain,
924 { "Dns Domain", "dssetup.dssetup_DsRolePrimaryDomInfoBasic.dns_domain", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
925 { &hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_domain,
926 { "Domain", "dssetup.dssetup_DsRolePrimaryDomInfoBasic.domain", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
927 { &hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_domain_guid,
928 { "Domain Guid", "dssetup.dssetup_DsRolePrimaryDomInfoBasic.domain_guid", FT_GUID, BASE_NONE, NULL, 0, NULL, HFILL }},
929 { &hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_flags,
930 { "Flags", "dssetup.dssetup_DsRolePrimaryDomInfoBasic.flags", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
931 { &hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_forest,
932 { "Forest", "dssetup.dssetup_DsRolePrimaryDomInfoBasic.forest", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
933 { &hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_role,
934 { "Role", "dssetup.dssetup_DsRolePrimaryDomInfoBasic.role", FT_UINT1632, BASE_DEC, VALS(dssetup_dssetup_DsRole_vals), 0, NULL, HFILL }},
935 { &hf_dssetup_dssetup_DsRoleUpgradeStatus_previous_role,
936 { "Previous Role", "dssetup.dssetup_DsRoleUpgradeStatus.previous_role", FT_UINT1632, BASE_DEC, VALS(dssetup_dssetup_DsPrevious_vals), 0, NULL, HFILL }},
937 { &hf_dssetup_dssetup_DsRoleUpgradeStatus_upgrading,
938 { "Upgrading", "dssetup.dssetup_DsRoleUpgradeStatus.upgrading", FT_UINT32, BASE_DEC, VALS(dssetup_dssetup_DsUpgrade_vals), 0, NULL, HFILL }},
939 { &hf_dssetup_opnum,
940 { "Operation", "dssetup.opnum", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
941 { &hf_dssetup_werror,
942 { "Windows Error", "dssetup.werror", FT_UINT32, BASE_HEX|BASE_EXT_STRING, &WERR_errors_ext, 0, NULL, HFILL }},
946 static int *ett[] = {
947 &ett_dcerpc_dssetup,
948 &ett_dssetup_dssetup_DsRoleFlags,
949 &ett_dssetup_dssetup_DsRolePrimaryDomInfoBasic,
950 &ett_dssetup_dssetup_DsRoleUpgradeStatus,
951 &ett_dssetup_dssetup_DsRoleOpStatus,
952 &ett_dssetup_dssetup_DsRoleInfo,
955 proto_dcerpc_dssetup = proto_register_protocol("Active Directory Setup", "DSSETUP", "dssetup");
956 proto_register_field_array(proto_dcerpc_dssetup, hf, array_length (hf));
957 proto_register_subtree_array(ett, array_length(ett));
960 void proto_reg_handoff_dcerpc_dssetup(void)
962 dcerpc_init_uuid(proto_dcerpc_dssetup, ett_dcerpc_dssetup,
963 &uuid_dcerpc_dssetup, ver_dcerpc_dssetup,
964 dssetup_dissectors, hf_dssetup_opnum);