Coverage Report

Created: 2026-09-28 06:52

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wireshark/epan/dissectors/packet-dcerpc-dssetup.c
Line
Count
Source
1
/* DO NOT EDIT
2
  This file was automatically generated by Pidl
3
  from dssetup.idl and dssetup.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 https://wiki.wireshark.org/Pidl
9
*/
10
11
12
#include "config.h"
13
#include <string.h>
14
#include <wsutil/array.h>
15
#include <epan/packet.h>
16
#include <epan/tfs.h>
17
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);
24
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;
32
33
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;
55
56
static int proto_dcerpc_dssetup;
57
/* Version information */
58
59
60
static e_guid_t uuid_dcerpc_dssetup = {
61
  0x3919286a, 0xb10c, 0x11d0,
62
  { 0x9b, 0xa8, 0x00, 0xc0, 0x4f, 0xd9, 0x2e, 0xf5 }
63
};
64
static uint16_t ver_dcerpc_dssetup = 0;
65
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 }
74
};
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",
78
};
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",
82
};
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",
86
};
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",
90
};
91
static unsigned dssetup_dissect_element_DsRolePrimaryDomInfoBasic_role(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
92
static unsigned dssetup_dissect_element_DsRolePrimaryDomInfoBasic_flags(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
93
static unsigned dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
94
static unsigned dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
95
static unsigned dssetup_dissect_element_DsRolePrimaryDomInfoBasic_dns_domain(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
96
static unsigned dssetup_dissect_element_DsRolePrimaryDomInfoBasic_dns_domain_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
97
static unsigned dssetup_dissect_element_DsRolePrimaryDomInfoBasic_forest(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
98
static unsigned dssetup_dissect_element_DsRolePrimaryDomInfoBasic_forest_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
99
static unsigned dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain_guid(tvbuff_t *tvb _U_, unsigned 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 }
104
};
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 }
110
};
111
static unsigned dssetup_dissect_element_DsRoleUpgradeStatus_upgrading(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
112
static unsigned dssetup_dissect_element_DsRoleUpgradeStatus_previous_role(tvbuff_t *tvb _U_, unsigned 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 }
118
};
119
static unsigned dssetup_dissect_element_DsRoleOpStatus_status(tvbuff_t *tvb _U_, unsigned 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 }
125
};
126
static unsigned dssetup_dissect_element_DsRoleInfo_basic(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
127
static unsigned dssetup_dissect_element_DsRoleInfo_upgrade(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
128
static unsigned dssetup_dissect_element_DsRoleInfo_opstatus(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
129
static unsigned dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_level(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
130
static unsigned dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_info(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
131
static unsigned dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_info_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
132
133
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: } */
142
143
unsigned
144
dssetup_dissect_enum_DsRole(tvbuff_t *tvb _U_, unsigned 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_)
145
0
{
146
0
  uint32_t parameter=0;
147
0
  if (param) {
148
0
    parameter = *param;
149
0
  }
150
0
  offset = dissect_ndr_uint1632(tvb, offset, pinfo, tree, di, drep, hf_index, &parameter);
151
0
  if (param) {
152
0
    *param = parameter;
153
0
  }
154
0
  return offset;
155
0
}
156
157
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: } */
164
165
unsigned
166
dssetup_dissect_bitmap_DsRoleFlags(tvbuff_t *tvb _U_, unsigned 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_)
167
0
{
168
0
  proto_item *item;
169
0
  static int * const dssetup_dssetup_DsRoleFlags_fields[] = {
170
0
    &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DS_RUNNING,
171
0
    &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DS_MIXED_MODE,
172
0
    &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_UPGRADE_IN_PROGRESS,
173
0
    &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT,
174
0
    NULL
175
0
  };
176
0
  uint32_t flags;
177
0
  ALIGN_TO_4_BYTES;
178
179
0
  item = proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_index,
180
0
        ett_dssetup_dssetup_DsRoleFlags, dssetup_dssetup_DsRoleFlags_fields, DREP_ENC_INTEGER(drep), BMT_NO_FALSE);
181
182
0
  offset = dissect_ndr_uint32(tvb, offset, pinfo, parent_tree, di, drep, -1, &flags);
183
184
0
  if (!flags)
185
0
    proto_item_append_text(item, ": (No values set)");
186
187
0
  if (flags & (~0x01000007)) {
188
0
    flags &= (~0x01000007);
189
0
    proto_item_append_text(item, "Unknown bitmap value 0x%x", flags);
190
0
  }
191
192
0
  return offset;
193
0
}
194
195
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: } */
204
205
static unsigned
206
dssetup_dissect_element_DsRolePrimaryDomInfoBasic_role(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
207
0
{
208
0
  offset = dssetup_dissect_enum_DsRole(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_role, 0);
209
210
0
  return offset;
211
0
}
212
213
static unsigned
214
dssetup_dissect_element_DsRolePrimaryDomInfoBasic_flags(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
215
0
{
216
0
  offset = dssetup_dissect_bitmap_DsRoleFlags(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_flags, 0);
217
218
0
  return offset;
219
0
}
220
221
static unsigned
222
dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
223
0
{
224
0
  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);
225
226
0
  return offset;
227
0
}
228
229
static unsigned
230
dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
231
0
{
232
0
  char *data;
233
234
0
  offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(uint16_t), hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_domain, false, &data);
235
0
  proto_item_append_text(tree, ": %s", data);
236
237
0
  return offset;
238
0
}
239
240
static unsigned
241
dssetup_dissect_element_DsRolePrimaryDomInfoBasic_dns_domain(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
242
0
{
243
0
  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);
244
245
0
  return offset;
246
0
}
247
248
static unsigned
249
dssetup_dissect_element_DsRolePrimaryDomInfoBasic_dns_domain_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
250
0
{
251
0
  char *data;
252
253
0
  offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(uint16_t), hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_dns_domain, false, &data);
254
0
  proto_item_append_text(tree, ": %s", data);
255
256
0
  return offset;
257
0
}
258
259
static unsigned
260
dssetup_dissect_element_DsRolePrimaryDomInfoBasic_forest(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
261
0
{
262
0
  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);
263
264
0
  return offset;
265
0
}
266
267
static unsigned
268
dssetup_dissect_element_DsRolePrimaryDomInfoBasic_forest_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
269
0
{
270
0
  char *data;
271
272
0
  offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(uint16_t), hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_forest, false, &data);
273
0
  proto_item_append_text(tree, ": %s", data);
274
275
0
  return offset;
276
0
}
277
278
static unsigned
279
dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain_guid(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
280
0
{
281
0
  offset = dissect_ndr_uuid_t(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_domain_guid, NULL);
282
283
0
  return offset;
284
0
}
285
286
unsigned
287
dssetup_dissect_struct_DsRolePrimaryDomInfoBasic(tvbuff_t *tvb _U_, unsigned 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_)
288
0
{
289
0
  proto_item *item = NULL;
290
0
  proto_tree *tree = NULL;
291
0
  unsigned old_offset;
292
293
0
  ALIGN_TO_5_BYTES;
294
295
0
  old_offset = offset;
296
297
0
  if (parent_tree) {
298
0
    item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
299
0
    tree = proto_item_add_subtree(item, ett_dssetup_dssetup_DsRolePrimaryDomInfoBasic);
300
0
  }
301
302
0
  offset = dssetup_dissect_element_DsRolePrimaryDomInfoBasic_role(tvb, offset, pinfo, tree, di, drep);
303
304
0
  offset = dssetup_dissect_element_DsRolePrimaryDomInfoBasic_flags(tvb, offset, pinfo, tree, di, drep);
305
306
0
  offset = dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain(tvb, offset, pinfo, tree, di, drep);
307
308
0
  offset = dssetup_dissect_element_DsRolePrimaryDomInfoBasic_dns_domain(tvb, offset, pinfo, tree, di, drep);
309
310
0
  offset = dssetup_dissect_element_DsRolePrimaryDomInfoBasic_forest(tvb, offset, pinfo, tree, di, drep);
311
312
0
  offset = dssetup_dissect_element_DsRolePrimaryDomInfoBasic_domain_guid(tvb, offset, pinfo, tree, di, drep);
313
314
315
0
  proto_item_set_len(item, offset-old_offset);
316
317
318
0
  if (di->call_data->flags & DCERPC_IS_NDR64) {
319
0
    ALIGN_TO_5_BYTES;
320
0
  }
321
322
0
  return offset;
323
0
}
324
325
326
/* IDL: enum { */
327
/* IDL:   DS_ROLE_NOT_UPGRADING=0, */
328
/* IDL:   DS_ROLE_UPGRADING=1, */
329
/* IDL: } */
330
331
unsigned
332
dssetup_dissect_enum_DsUpgrade(tvbuff_t *tvb _U_, unsigned 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_)
333
0
{
334
0
  uint32_t parameter=0;
335
0
  if (param) {
336
0
    parameter = *param;
337
0
  }
338
0
  offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_index, &parameter);
339
0
  if (param) {
340
0
    *param = parameter;
341
0
  }
342
0
  return offset;
343
0
}
344
345
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: } */
351
352
unsigned
353
dssetup_dissect_enum_DsPrevious(tvbuff_t *tvb _U_, unsigned 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_)
354
0
{
355
0
  uint32_t parameter=0;
356
0
  if (param) {
357
0
    parameter = *param;
358
0
  }
359
0
  offset = dissect_ndr_uint1632(tvb, offset, pinfo, tree, di, drep, hf_index, &parameter);
360
0
  if (param) {
361
0
    *param = parameter;
362
0
  }
363
0
  return offset;
364
0
}
365
366
367
/* IDL: struct { */
368
/* IDL:   dssetup_DsUpgrade upgrading; */
369
/* IDL:   dssetup_DsPrevious previous_role; */
370
/* IDL: } */
371
372
static unsigned
373
dssetup_dissect_element_DsRoleUpgradeStatus_upgrading(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
374
0
{
375
0
  offset = dssetup_dissect_enum_DsUpgrade(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRoleUpgradeStatus_upgrading, 0);
376
377
0
  return offset;
378
0
}
379
380
static unsigned
381
dssetup_dissect_element_DsRoleUpgradeStatus_previous_role(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
382
0
{
383
0
  offset = dssetup_dissect_enum_DsPrevious(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRoleUpgradeStatus_previous_role, 0);
384
385
0
  return offset;
386
0
}
387
388
unsigned
389
dssetup_dissect_struct_DsRoleUpgradeStatus(tvbuff_t *tvb _U_, unsigned 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_)
390
0
{
391
0
  proto_item *item = NULL;
392
0
  proto_tree *tree = NULL;
393
0
  unsigned old_offset;
394
395
0
  ALIGN_TO_4_BYTES;
396
397
0
  old_offset = offset;
398
399
0
  if (parent_tree) {
400
0
    item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
401
0
    tree = proto_item_add_subtree(item, ett_dssetup_dssetup_DsRoleUpgradeStatus);
402
0
  }
403
404
0
  offset = dssetup_dissect_element_DsRoleUpgradeStatus_upgrading(tvb, offset, pinfo, tree, di, drep);
405
406
0
  offset = dssetup_dissect_element_DsRoleUpgradeStatus_previous_role(tvb, offset, pinfo, tree, di, drep);
407
408
409
0
  proto_item_set_len(item, offset-old_offset);
410
411
412
0
  if (di->call_data->flags & DCERPC_IS_NDR64) {
413
0
    ALIGN_TO_4_BYTES;
414
0
  }
415
416
0
  return offset;
417
0
}
418
419
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: } */
425
426
unsigned
427
dssetup_dissect_enum_DsRoleOp(tvbuff_t *tvb _U_, unsigned 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_)
428
0
{
429
0
  uint32_t parameter=0;
430
0
  if (param) {
431
0
    parameter = *param;
432
0
  }
433
0
  offset = dissect_ndr_uint1632(tvb, offset, pinfo, tree, di, drep, hf_index, &parameter);
434
0
  if (param) {
435
0
    *param = parameter;
436
0
  }
437
0
  return offset;
438
0
}
439
440
441
/* IDL: struct { */
442
/* IDL:   dssetup_DsRoleOp status; */
443
/* IDL: } */
444
445
static unsigned
446
dssetup_dissect_element_DsRoleOpStatus_status(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
447
0
{
448
0
  offset = dssetup_dissect_enum_DsRoleOp(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRoleOpStatus_status, 0);
449
450
0
  return offset;
451
0
}
452
453
unsigned
454
dssetup_dissect_struct_DsRoleOpStatus(tvbuff_t *tvb _U_, unsigned 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_)
455
0
{
456
0
  proto_item *item = NULL;
457
0
  proto_tree *tree = NULL;
458
0
  unsigned old_offset;
459
460
0
  ALIGN_TO_3_BYTES;
461
462
0
  old_offset = offset;
463
464
0
  if (parent_tree) {
465
0
    item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
466
0
    tree = proto_item_add_subtree(item, ett_dssetup_dssetup_DsRoleOpStatus);
467
0
  }
468
469
0
  offset = dssetup_dissect_element_DsRoleOpStatus_status(tvb, offset, pinfo, tree, di, drep);
470
471
472
0
  proto_item_set_len(item, offset-old_offset);
473
474
475
0
  if (di->call_data->flags & DCERPC_IS_NDR64) {
476
0
    ALIGN_TO_3_BYTES;
477
0
  }
478
479
0
  return offset;
480
0
}
481
482
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: } */
488
489
unsigned
490
dssetup_dissect_enum_DsRoleInfoLevel(tvbuff_t *tvb _U_, unsigned 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_)
491
0
{
492
0
  uint32_t parameter=0;
493
0
  if (param) {
494
0
    parameter = *param;
495
0
  }
496
0
  offset = dissect_ndr_uint1632(tvb, offset, pinfo, tree, di, drep, hf_index, &parameter);
497
0
  if (param) {
498
0
    *param = parameter;
499
0
  }
500
0
  return offset;
501
0
}
502
503
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: } */
509
510
static unsigned
511
dssetup_dissect_element_DsRoleInfo_basic(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
512
0
{
513
0
  offset = dssetup_dissect_struct_DsRolePrimaryDomInfoBasic(tvb,offset,pinfo,tree,di,drep,hf_dssetup_dssetup_DsRoleInfo_basic,0);
514
515
0
  return offset;
516
0
}
517
518
static unsigned
519
dssetup_dissect_element_DsRoleInfo_upgrade(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
520
0
{
521
0
  offset = dssetup_dissect_struct_DsRoleUpgradeStatus(tvb,offset,pinfo,tree,di,drep,hf_dssetup_dssetup_DsRoleInfo_upgrade,0);
522
523
0
  return offset;
524
0
}
525
526
static unsigned
527
dssetup_dissect_element_DsRoleInfo_opstatus(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
528
0
{
529
0
  offset = dssetup_dissect_struct_DsRoleOpStatus(tvb,offset,pinfo,tree,di,drep,hf_dssetup_dssetup_DsRoleInfo_opstatus,0);
530
531
0
  return offset;
532
0
}
533
534
static unsigned
535
dssetup_dissect_DsRoleInfo(tvbuff_t *tvb _U_, unsigned 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_)
536
0
{
537
0
  proto_item *item = NULL;
538
0
  proto_tree *tree = NULL;
539
0
  unsigned old_offset;
540
0
  uint32_t level;
541
542
0
  old_offset = offset;
543
0
  if (parent_tree) {
544
0
    tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_dssetup_dssetup_DsRoleInfo, &item, "dssetup_DsRoleInfo");
545
0
  }
546
547
0
  offset = dissect_ndr_uint1632(tvb, offset, pinfo, tree, di, drep, hf_index, &level);
548
0
  ALIGN_TO_5_BYTES;
549
550
0
  switch(level) {
551
0
    case DS_ROLE_BASIC_INFORMATION:
552
0
      offset = dssetup_dissect_element_DsRoleInfo_basic(tvb, offset, pinfo, tree, di, drep);
553
0
    break;
554
555
0
    case DS_ROLE_UPGRADE_STATUS:
556
0
      offset = dssetup_dissect_element_DsRoleInfo_upgrade(tvb, offset, pinfo, tree, di, drep);
557
0
    break;
558
559
0
    case DS_ROLE_OP_STATUS:
560
0
      offset = dssetup_dissect_element_DsRoleInfo_opstatus(tvb, offset, pinfo, tree, di, drep);
561
0
    break;
562
0
  }
563
0
  proto_item_set_len(item, offset-old_offset);
564
565
566
0
  return offset;
567
0
}
568
static unsigned
569
dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_level(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
570
0
{
571
0
  offset = dssetup_dissect_enum_DsRoleInfoLevel(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRoleGetPrimaryDomainInformation_level, 0);
572
573
0
  return offset;
574
0
}
575
576
static unsigned
577
dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_info(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
578
0
{
579
0
  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);
580
581
0
  return offset;
582
0
}
583
584
static unsigned
585
dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_info_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
586
0
{
587
0
  offset = dssetup_dissect_DsRoleInfo(tvb, offset, pinfo, tree, di, drep, hf_dssetup_dssetup_DsRoleGetPrimaryDomainInformation_info, 0);
588
589
0
  return offset;
590
0
}
591
592
/* IDL: WERROR dssetup_DsRoleGetPrimaryDomainInformation( */
593
/* IDL: [in] dssetup_DsRoleInfoLevel level, */
594
/* IDL: [out] [switch_is(level)] [unique(1)] dssetup_DsRoleInfo *info */
595
/* IDL: ); */
596
597
static unsigned
598
dssetup_dissect_DsRoleGetPrimaryDomainInformation_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
599
0
{
600
0
  uint32_t status;
601
602
0
  di->dcerpc_procedure_name="DsRoleGetPrimaryDomainInformation";
603
0
  offset = dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_info(tvb, offset, pinfo, tree, di, drep);
604
0
  offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
605
606
0
  offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
607
608
0
  if (status != 0)
609
0
    col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
610
611
0
  return offset;
612
0
}
613
614
static unsigned
615
dssetup_dissect_DsRoleGetPrimaryDomainInformation_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
616
0
{
617
0
  di->dcerpc_procedure_name="DsRoleGetPrimaryDomainInformation";
618
0
  offset = dssetup_dissect_element_DsRoleGetPrimaryDomainInformation_level(tvb, offset, pinfo, tree, di, drep);
619
0
  offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
620
0
  return offset;
621
0
}
622
623
/* IDL: WERROR dssetup_DsRoleDnsNameToFlatName( */
624
/* IDL:  */
625
/* IDL: ); */
626
627
static unsigned
628
dssetup_dissect_DsRoleDnsNameToFlatName_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
629
0
{
630
0
  uint32_t status;
631
632
0
  di->dcerpc_procedure_name="DsRoleDnsNameToFlatName";
633
0
  offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
634
635
0
  if (status != 0)
636
0
    col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
637
638
0
  return offset;
639
0
}
640
641
static unsigned
642
dssetup_dissect_DsRoleDnsNameToFlatName_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
643
0
{
644
0
  di->dcerpc_procedure_name="DsRoleDnsNameToFlatName";
645
0
  return offset;
646
0
}
647
648
/* IDL: WERROR dssetup_DsRoleDcAsDc( */
649
/* IDL:  */
650
/* IDL: ); */
651
652
static unsigned
653
dssetup_dissect_DsRoleDcAsDc_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
654
0
{
655
0
  uint32_t status;
656
657
0
  di->dcerpc_procedure_name="DsRoleDcAsDc";
658
0
  offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
659
660
0
  if (status != 0)
661
0
    col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
662
663
0
  return offset;
664
0
}
665
666
static unsigned
667
dssetup_dissect_DsRoleDcAsDc_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
668
0
{
669
0
  di->dcerpc_procedure_name="DsRoleDcAsDc";
670
0
  return offset;
671
0
}
672
673
/* IDL: WERROR dssetup_DsRoleDcAsReplica( */
674
/* IDL:  */
675
/* IDL: ); */
676
677
static unsigned
678
dssetup_dissect_DsRoleDcAsReplica_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
679
0
{
680
0
  uint32_t status;
681
682
0
  di->dcerpc_procedure_name="DsRoleDcAsReplica";
683
0
  offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
684
685
0
  if (status != 0)
686
0
    col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
687
688
0
  return offset;
689
0
}
690
691
static unsigned
692
dssetup_dissect_DsRoleDcAsReplica_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
693
0
{
694
0
  di->dcerpc_procedure_name="DsRoleDcAsReplica";
695
0
  return offset;
696
0
}
697
698
/* IDL: WERROR dssetup_DsRoleDemoteDc( */
699
/* IDL:  */
700
/* IDL: ); */
701
702
static unsigned
703
dssetup_dissect_DsRoleDemoteDc_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
704
0
{
705
0
  uint32_t status;
706
707
0
  di->dcerpc_procedure_name="DsRoleDemoteDc";
708
0
  offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
709
710
0
  if (status != 0)
711
0
    col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
712
713
0
  return offset;
714
0
}
715
716
static unsigned
717
dssetup_dissect_DsRoleDemoteDc_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
718
0
{
719
0
  di->dcerpc_procedure_name="DsRoleDemoteDc";
720
0
  return offset;
721
0
}
722
723
/* IDL: WERROR dssetup_DsRoleGetDcOperationProgress( */
724
/* IDL:  */
725
/* IDL: ); */
726
727
static unsigned
728
dssetup_dissect_DsRoleGetDcOperationProgress_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
729
0
{
730
0
  uint32_t status;
731
732
0
  di->dcerpc_procedure_name="DsRoleGetDcOperationProgress";
733
0
  offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
734
735
0
  if (status != 0)
736
0
    col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
737
738
0
  return offset;
739
0
}
740
741
static unsigned
742
dssetup_dissect_DsRoleGetDcOperationProgress_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
743
0
{
744
0
  di->dcerpc_procedure_name="DsRoleGetDcOperationProgress";
745
0
  return offset;
746
0
}
747
748
/* IDL: WERROR dssetup_DsRoleGetDcOperationResults( */
749
/* IDL:  */
750
/* IDL: ); */
751
752
static unsigned
753
dssetup_dissect_DsRoleGetDcOperationResults_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
754
0
{
755
0
  uint32_t status;
756
757
0
  di->dcerpc_procedure_name="DsRoleGetDcOperationResults";
758
0
  offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
759
760
0
  if (status != 0)
761
0
    col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
762
763
0
  return offset;
764
0
}
765
766
static unsigned
767
dssetup_dissect_DsRoleGetDcOperationResults_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
768
0
{
769
0
  di->dcerpc_procedure_name="DsRoleGetDcOperationResults";
770
0
  return offset;
771
0
}
772
773
/* IDL: WERROR dssetup_DsRoleCancel( */
774
/* IDL:  */
775
/* IDL: ); */
776
777
static unsigned
778
dssetup_dissect_DsRoleCancel_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
779
0
{
780
0
  uint32_t status;
781
782
0
  di->dcerpc_procedure_name="DsRoleCancel";
783
0
  offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
784
785
0
  if (status != 0)
786
0
    col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
787
788
0
  return offset;
789
0
}
790
791
static unsigned
792
dssetup_dissect_DsRoleCancel_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
793
0
{
794
0
  di->dcerpc_procedure_name="DsRoleCancel";
795
0
  return offset;
796
0
}
797
798
/* IDL: WERROR dssetup_DsRoleServerSaveStateForUpgrade( */
799
/* IDL:  */
800
/* IDL: ); */
801
802
static unsigned
803
dssetup_dissect_DsRoleServerSaveStateForUpgrade_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
804
0
{
805
0
  uint32_t status;
806
807
0
  di->dcerpc_procedure_name="DsRoleServerSaveStateForUpgrade";
808
0
  offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
809
810
0
  if (status != 0)
811
0
    col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
812
813
0
  return offset;
814
0
}
815
816
static unsigned
817
dssetup_dissect_DsRoleServerSaveStateForUpgrade_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
818
0
{
819
0
  di->dcerpc_procedure_name="DsRoleServerSaveStateForUpgrade";
820
0
  return offset;
821
0
}
822
823
/* IDL: WERROR dssetup_DsRoleUpgradeDownlevelServer( */
824
/* IDL:  */
825
/* IDL: ); */
826
827
static unsigned
828
dssetup_dissect_DsRoleUpgradeDownlevelServer_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
829
0
{
830
0
  uint32_t status;
831
832
0
  di->dcerpc_procedure_name="DsRoleUpgradeDownlevelServer";
833
0
  offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
834
835
0
  if (status != 0)
836
0
    col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
837
838
0
  return offset;
839
0
}
840
841
static unsigned
842
dssetup_dissect_DsRoleUpgradeDownlevelServer_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
843
0
{
844
0
  di->dcerpc_procedure_name="DsRoleUpgradeDownlevelServer";
845
0
  return offset;
846
0
}
847
848
/* IDL: WERROR dssetup_DsRoleAbortDownlevelServerUpgrade( */
849
/* IDL:  */
850
/* IDL: ); */
851
852
static unsigned
853
dssetup_dissect_DsRoleAbortDownlevelServerUpgrade_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
854
0
{
855
0
  uint32_t status;
856
857
0
  di->dcerpc_procedure_name="DsRoleAbortDownlevelServerUpgrade";
858
0
  offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_dssetup_werror, &status);
859
860
0
  if (status != 0)
861
0
    col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
862
863
0
  return offset;
864
0
}
865
866
static unsigned
867
dssetup_dissect_DsRoleAbortDownlevelServerUpgrade_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
868
0
{
869
0
  di->dcerpc_procedure_name="DsRoleAbortDownlevelServerUpgrade";
870
0
  return offset;
871
0
}
872
873
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 }
898
};
899
900
void proto_register_dcerpc_dssetup(void)
901
16
{
902
16
  static hf_register_info hf[] = {
903
16
  { &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT,
904
16
    { "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
16
  { &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DS_MIXED_MODE,
906
16
    { "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
16
  { &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_PRIMARY_DS_RUNNING,
908
16
    { "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
16
  { &hf_dssetup_dssetup_DsRoleFlags_DS_ROLE_UPGRADE_IN_PROGRESS,
910
16
    { "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
16
  { &hf_dssetup_dssetup_DsRoleGetPrimaryDomainInformation_info,
912
16
    { "Info", "dssetup.dssetup_DsRoleGetPrimaryDomainInformation.info", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
913
16
  { &hf_dssetup_dssetup_DsRoleGetPrimaryDomainInformation_level,
914
16
    { "Level", "dssetup.dssetup_DsRoleGetPrimaryDomainInformation.level", FT_UINT1632, BASE_DEC, VALS(dssetup_dssetup_DsRoleInfoLevel_vals), 0, NULL, HFILL }},
915
16
  { &hf_dssetup_dssetup_DsRoleInfo_basic,
916
16
    { "Basic", "dssetup.dssetup_DsRoleInfo.basic", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
917
16
  { &hf_dssetup_dssetup_DsRoleInfo_opstatus,
918
16
    { "Opstatus", "dssetup.dssetup_DsRoleInfo.opstatus", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
919
16
  { &hf_dssetup_dssetup_DsRoleInfo_upgrade,
920
16
    { "Upgrade", "dssetup.dssetup_DsRoleInfo.upgrade", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
921
16
  { &hf_dssetup_dssetup_DsRoleOpStatus_status,
922
16
    { "Status", "dssetup.dssetup_DsRoleOpStatus.status", FT_UINT1632, BASE_DEC, VALS(dssetup_dssetup_DsRoleOp_vals), 0, NULL, HFILL }},
923
16
  { &hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_dns_domain,
924
16
    { "Dns Domain", "dssetup.dssetup_DsRolePrimaryDomInfoBasic.dns_domain", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
925
16
  { &hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_domain,
926
16
    { "Domain", "dssetup.dssetup_DsRolePrimaryDomInfoBasic.domain", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
927
16
  { &hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_domain_guid,
928
16
    { "Domain Guid", "dssetup.dssetup_DsRolePrimaryDomInfoBasic.domain_guid", FT_GUID, BASE_NONE, NULL, 0, NULL, HFILL }},
929
16
  { &hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_flags,
930
16
    { "Flags", "dssetup.dssetup_DsRolePrimaryDomInfoBasic.flags", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
931
16
  { &hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_forest,
932
16
    { "Forest", "dssetup.dssetup_DsRolePrimaryDomInfoBasic.forest", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
933
16
  { &hf_dssetup_dssetup_DsRolePrimaryDomInfoBasic_role,
934
16
    { "Role", "dssetup.dssetup_DsRolePrimaryDomInfoBasic.role", FT_UINT1632, BASE_DEC, VALS(dssetup_dssetup_DsRole_vals), 0, NULL, HFILL }},
935
16
  { &hf_dssetup_dssetup_DsRoleUpgradeStatus_previous_role,
936
16
    { "Previous Role", "dssetup.dssetup_DsRoleUpgradeStatus.previous_role", FT_UINT1632, BASE_DEC, VALS(dssetup_dssetup_DsPrevious_vals), 0, NULL, HFILL }},
937
16
  { &hf_dssetup_dssetup_DsRoleUpgradeStatus_upgrading,
938
16
    { "Upgrading", "dssetup.dssetup_DsRoleUpgradeStatus.upgrading", FT_UINT32, BASE_DEC, VALS(dssetup_dssetup_DsUpgrade_vals), 0, NULL, HFILL }},
939
16
  { &hf_dssetup_opnum,
940
16
    { "Operation", "dssetup.opnum", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
941
16
  { &hf_dssetup_werror,
942
16
    { "Windows Error", "dssetup.werror", FT_UINT32, BASE_HEX|BASE_EXT_STRING, &WERR_errors_ext, 0, NULL, HFILL }},
943
16
  };
944
945
946
16
  static int *ett[] = {
947
16
    &ett_dcerpc_dssetup,
948
16
    &ett_dssetup_dssetup_DsRoleFlags,
949
16
    &ett_dssetup_dssetup_DsRolePrimaryDomInfoBasic,
950
16
    &ett_dssetup_dssetup_DsRoleUpgradeStatus,
951
16
    &ett_dssetup_dssetup_DsRoleOpStatus,
952
16
    &ett_dssetup_dssetup_DsRoleInfo,
953
16
  };
954
955
16
  proto_dcerpc_dssetup = proto_register_protocol("Active Directory Setup", "DSSETUP", "dssetup");
956
16
  proto_register_field_array(proto_dcerpc_dssetup, hf, array_length (hf));
957
16
  proto_register_subtree_array(ett, array_length(ett));
958
16
}
959
960
void proto_reg_handoff_dcerpc_dssetup(void)
961
16
{
962
16
  dcerpc_init_uuid(proto_dcerpc_dssetup, ett_dcerpc_dssetup,
963
16
    &uuid_dcerpc_dssetup, ver_dcerpc_dssetup,
964
16
    dssetup_dissectors, hf_dssetup_opnum);
965
16
}