Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_dssetup.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 77 : static enum ndr_err_code ndr_push_dssetup_DsRole(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsRole r)
8 : {
9 77 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
10 77 : return NDR_ERR_SUCCESS;
11 : }
12 :
13 24 : static enum ndr_err_code ndr_pull_dssetup_DsRole(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsRole *r)
14 : {
15 : uint16_t v;
16 24 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
17 24 : *r = v;
18 24 : return NDR_ERR_SUCCESS;
19 : }
20 :
21 12 : _PUBLIC_ void ndr_print_dssetup_DsRole(struct ndr_print *ndr, const char *name, enum dssetup_DsRole r)
22 : {
23 12 : const char *val = NULL;
24 :
25 12 : switch (r) {
26 0 : case DS_ROLE_STANDALONE_WORKSTATION: val = "DS_ROLE_STANDALONE_WORKSTATION"; break;
27 0 : case DS_ROLE_MEMBER_WORKSTATION: val = "DS_ROLE_MEMBER_WORKSTATION"; break;
28 0 : case DS_ROLE_STANDALONE_SERVER: val = "DS_ROLE_STANDALONE_SERVER"; break;
29 0 : case DS_ROLE_MEMBER_SERVER: val = "DS_ROLE_MEMBER_SERVER"; break;
30 0 : case DS_ROLE_BACKUP_DC: val = "DS_ROLE_BACKUP_DC"; break;
31 12 : case DS_ROLE_PRIMARY_DC: val = "DS_ROLE_PRIMARY_DC"; break;
32 : }
33 12 : ndr_print_enum(ndr, name, "ENUM", val, r);
34 12 : }
35 :
36 77 : static enum ndr_err_code ndr_push_dssetup_DsRoleFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
37 : {
38 77 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
39 77 : return NDR_ERR_SUCCESS;
40 : }
41 :
42 24 : static enum ndr_err_code ndr_pull_dssetup_DsRoleFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
43 : {
44 : uint32_t v;
45 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
46 24 : *r = v;
47 24 : return NDR_ERR_SUCCESS;
48 : }
49 :
50 12 : _PUBLIC_ void ndr_print_dssetup_DsRoleFlags(struct ndr_print *ndr, const char *name, uint32_t r)
51 : {
52 12 : ndr_print_uint32(ndr, name, r);
53 12 : ndr->depth++;
54 12 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_ROLE_PRIMARY_DS_RUNNING", DS_ROLE_PRIMARY_DS_RUNNING, r);
55 12 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_ROLE_PRIMARY_DS_MIXED_MODE", DS_ROLE_PRIMARY_DS_MIXED_MODE, r);
56 12 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_ROLE_UPGRADE_IN_PROGRESS", DS_ROLE_UPGRADE_IN_PROGRESS, r);
57 12 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT", DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT, r);
58 12 : ndr->depth--;
59 12 : }
60 :
61 154 : static enum ndr_err_code ndr_push_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_push *ndr, int ndr_flags, const struct dssetup_DsRolePrimaryDomInfoBasic *r)
62 : {
63 154 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
64 154 : if (ndr_flags & NDR_SCALARS) {
65 77 : NDR_CHECK(ndr_push_align(ndr, 5));
66 77 : NDR_CHECK(ndr_push_dssetup_DsRole(ndr, NDR_SCALARS, r->role));
67 77 : NDR_CHECK(ndr_push_dssetup_DsRoleFlags(ndr, NDR_SCALARS, r->flags));
68 77 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
69 77 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_domain));
70 77 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->forest));
71 77 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid));
72 77 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
73 : }
74 154 : if (ndr_flags & NDR_BUFFERS) {
75 77 : if (r->domain) {
76 77 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
77 77 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
78 77 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
79 77 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
80 : }
81 77 : if (r->dns_domain) {
82 73 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain, CH_UTF16)));
83 73 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
84 73 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain, CH_UTF16)));
85 73 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_domain, ndr_charset_length(r->dns_domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
86 : }
87 77 : if (r->forest) {
88 73 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->forest, CH_UTF16)));
89 73 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
90 73 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->forest, CH_UTF16)));
91 73 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->forest, ndr_charset_length(r->forest, CH_UTF16), sizeof(uint16_t), CH_UTF16));
92 : }
93 : }
94 154 : return NDR_ERR_SUCCESS;
95 : }
96 :
97 48 : static enum ndr_err_code ndr_pull_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_pull *ndr, int ndr_flags, struct dssetup_DsRolePrimaryDomInfoBasic *r)
98 : {
99 : uint32_t _ptr_domain;
100 48 : uint32_t size_domain_1 = 0;
101 48 : uint32_t length_domain_1 = 0;
102 48 : TALLOC_CTX *_mem_save_domain_0 = NULL;
103 : uint32_t _ptr_dns_domain;
104 48 : uint32_t size_dns_domain_1 = 0;
105 48 : uint32_t length_dns_domain_1 = 0;
106 48 : TALLOC_CTX *_mem_save_dns_domain_0 = NULL;
107 : uint32_t _ptr_forest;
108 48 : uint32_t size_forest_1 = 0;
109 48 : uint32_t length_forest_1 = 0;
110 48 : TALLOC_CTX *_mem_save_forest_0 = NULL;
111 48 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
112 48 : if (ndr_flags & NDR_SCALARS) {
113 24 : NDR_CHECK(ndr_pull_align(ndr, 5));
114 24 : NDR_CHECK(ndr_pull_dssetup_DsRole(ndr, NDR_SCALARS, &r->role));
115 24 : NDR_CHECK(ndr_pull_dssetup_DsRoleFlags(ndr, NDR_SCALARS, &r->flags));
116 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
117 24 : if (_ptr_domain) {
118 24 : NDR_PULL_ALLOC(ndr, r->domain);
119 : } else {
120 0 : r->domain = NULL;
121 : }
122 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_domain));
123 24 : if (_ptr_dns_domain) {
124 24 : NDR_PULL_ALLOC(ndr, r->dns_domain);
125 : } else {
126 0 : r->dns_domain = NULL;
127 : }
128 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest));
129 24 : if (_ptr_forest) {
130 24 : NDR_PULL_ALLOC(ndr, r->forest);
131 : } else {
132 0 : r->forest = NULL;
133 : }
134 24 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid));
135 24 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
136 : }
137 48 : if (ndr_flags & NDR_BUFFERS) {
138 24 : if (r->domain) {
139 24 : _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
140 24 : NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
141 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
142 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
143 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
144 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
145 24 : if (length_domain_1 > size_domain_1) {
146 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
147 : }
148 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
149 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
150 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
151 : }
152 24 : if (r->dns_domain) {
153 24 : _mem_save_dns_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
154 24 : NDR_PULL_SET_MEM_CTX(ndr, r->dns_domain, 0);
155 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_domain));
156 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_domain));
157 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_domain, &size_dns_domain_1));
158 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_domain, &length_dns_domain_1));
159 24 : if (length_dns_domain_1 > size_dns_domain_1) {
160 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dns_domain_1, length_dns_domain_1);
161 : }
162 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_domain_1, sizeof(uint16_t)));
163 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_domain, length_dns_domain_1, sizeof(uint16_t), CH_UTF16));
164 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_domain_0, 0);
165 : }
166 24 : if (r->forest) {
167 24 : _mem_save_forest_0 = NDR_PULL_GET_MEM_CTX(ndr);
168 24 : NDR_PULL_SET_MEM_CTX(ndr, r->forest, 0);
169 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->forest));
170 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->forest));
171 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->forest, &size_forest_1));
172 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->forest, &length_forest_1));
173 24 : if (length_forest_1 > size_forest_1) {
174 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_forest_1, length_forest_1);
175 : }
176 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_forest_1, sizeof(uint16_t)));
177 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->forest, length_forest_1, sizeof(uint16_t), CH_UTF16));
178 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_0, 0);
179 : }
180 : }
181 48 : return NDR_ERR_SUCCESS;
182 : }
183 :
184 12 : _PUBLIC_ void ndr_print_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_print *ndr, const char *name, const struct dssetup_DsRolePrimaryDomInfoBasic *r)
185 : {
186 12 : ndr_print_struct(ndr, name, "dssetup_DsRolePrimaryDomInfoBasic");
187 12 : if (r == NULL) { ndr_print_null(ndr); return; }
188 12 : ndr->depth++;
189 12 : ndr_print_dssetup_DsRole(ndr, "role", r->role);
190 12 : ndr_print_dssetup_DsRoleFlags(ndr, "flags", r->flags);
191 12 : ndr_print_ptr(ndr, "domain", r->domain);
192 12 : ndr->depth++;
193 12 : if (r->domain) {
194 12 : ndr_print_string(ndr, "domain", r->domain);
195 : }
196 12 : ndr->depth--;
197 12 : ndr_print_ptr(ndr, "dns_domain", r->dns_domain);
198 12 : ndr->depth++;
199 12 : if (r->dns_domain) {
200 12 : ndr_print_string(ndr, "dns_domain", r->dns_domain);
201 : }
202 12 : ndr->depth--;
203 12 : ndr_print_ptr(ndr, "forest", r->forest);
204 12 : ndr->depth++;
205 12 : if (r->forest) {
206 12 : ndr_print_string(ndr, "forest", r->forest);
207 : }
208 12 : ndr->depth--;
209 12 : ndr_print_GUID(ndr, "domain_guid", &r->domain_guid);
210 12 : ndr->depth--;
211 : }
212 :
213 25 : static enum ndr_err_code ndr_push_dssetup_DsUpgrade(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsUpgrade r)
214 : {
215 25 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
216 25 : return NDR_ERR_SUCCESS;
217 : }
218 :
219 20 : static enum ndr_err_code ndr_pull_dssetup_DsUpgrade(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsUpgrade *r)
220 : {
221 : uint32_t v;
222 20 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
223 20 : *r = v;
224 20 : return NDR_ERR_SUCCESS;
225 : }
226 :
227 10 : _PUBLIC_ void ndr_print_dssetup_DsUpgrade(struct ndr_print *ndr, const char *name, enum dssetup_DsUpgrade r)
228 : {
229 10 : const char *val = NULL;
230 :
231 10 : switch (r) {
232 10 : case DS_ROLE_NOT_UPGRADING: val = "DS_ROLE_NOT_UPGRADING"; break;
233 0 : case DS_ROLE_UPGRADING: val = "DS_ROLE_UPGRADING"; break;
234 : }
235 10 : ndr_print_enum(ndr, name, "ENUM", val, r);
236 10 : }
237 :
238 25 : static enum ndr_err_code ndr_push_dssetup_DsPrevious(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsPrevious r)
239 : {
240 25 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
241 25 : return NDR_ERR_SUCCESS;
242 : }
243 :
244 20 : static enum ndr_err_code ndr_pull_dssetup_DsPrevious(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsPrevious *r)
245 : {
246 : uint16_t v;
247 20 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
248 20 : *r = v;
249 20 : return NDR_ERR_SUCCESS;
250 : }
251 :
252 10 : _PUBLIC_ void ndr_print_dssetup_DsPrevious(struct ndr_print *ndr, const char *name, enum dssetup_DsPrevious r)
253 : {
254 10 : const char *val = NULL;
255 :
256 10 : switch (r) {
257 10 : case DS_ROLE_PREVIOUS_UNKNOWN: val = "DS_ROLE_PREVIOUS_UNKNOWN"; break;
258 0 : case DS_ROLE_PREVIOUS_PRIMARY: val = "DS_ROLE_PREVIOUS_PRIMARY"; break;
259 0 : case DS_ROLE_PREVIOUS_BACKUP: val = "DS_ROLE_PREVIOUS_BACKUP"; break;
260 : }
261 10 : ndr_print_enum(ndr, name, "ENUM", val, r);
262 10 : }
263 :
264 25 : static enum ndr_err_code ndr_push_dssetup_DsRoleUpgradeStatus(struct ndr_push *ndr, int ndr_flags, const struct dssetup_DsRoleUpgradeStatus *r)
265 : {
266 25 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
267 25 : if (ndr_flags & NDR_SCALARS) {
268 25 : NDR_CHECK(ndr_push_align(ndr, 4));
269 25 : NDR_CHECK(ndr_push_dssetup_DsUpgrade(ndr, NDR_SCALARS, r->upgrading));
270 25 : NDR_CHECK(ndr_push_dssetup_DsPrevious(ndr, NDR_SCALARS, r->previous_role));
271 25 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
272 : }
273 25 : if (ndr_flags & NDR_BUFFERS) {
274 : }
275 25 : return NDR_ERR_SUCCESS;
276 : }
277 :
278 20 : static enum ndr_err_code ndr_pull_dssetup_DsRoleUpgradeStatus(struct ndr_pull *ndr, int ndr_flags, struct dssetup_DsRoleUpgradeStatus *r)
279 : {
280 20 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
281 20 : if (ndr_flags & NDR_SCALARS) {
282 20 : NDR_CHECK(ndr_pull_align(ndr, 4));
283 20 : NDR_CHECK(ndr_pull_dssetup_DsUpgrade(ndr, NDR_SCALARS, &r->upgrading));
284 20 : NDR_CHECK(ndr_pull_dssetup_DsPrevious(ndr, NDR_SCALARS, &r->previous_role));
285 20 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
286 : }
287 20 : if (ndr_flags & NDR_BUFFERS) {
288 : }
289 20 : return NDR_ERR_SUCCESS;
290 : }
291 :
292 10 : _PUBLIC_ void ndr_print_dssetup_DsRoleUpgradeStatus(struct ndr_print *ndr, const char *name, const struct dssetup_DsRoleUpgradeStatus *r)
293 : {
294 10 : ndr_print_struct(ndr, name, "dssetup_DsRoleUpgradeStatus");
295 10 : if (r == NULL) { ndr_print_null(ndr); return; }
296 10 : ndr->depth++;
297 10 : ndr_print_dssetup_DsUpgrade(ndr, "upgrading", r->upgrading);
298 10 : ndr_print_dssetup_DsPrevious(ndr, "previous_role", r->previous_role);
299 10 : ndr->depth--;
300 : }
301 :
302 25 : static enum ndr_err_code ndr_push_dssetup_DsRoleOp(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsRoleOp r)
303 : {
304 25 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
305 25 : return NDR_ERR_SUCCESS;
306 : }
307 :
308 20 : static enum ndr_err_code ndr_pull_dssetup_DsRoleOp(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsRoleOp *r)
309 : {
310 : uint16_t v;
311 20 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
312 20 : *r = v;
313 20 : return NDR_ERR_SUCCESS;
314 : }
315 :
316 10 : _PUBLIC_ void ndr_print_dssetup_DsRoleOp(struct ndr_print *ndr, const char *name, enum dssetup_DsRoleOp r)
317 : {
318 10 : const char *val = NULL;
319 :
320 10 : switch (r) {
321 10 : case DS_ROLE_OP_IDLE: val = "DS_ROLE_OP_IDLE"; break;
322 0 : case DS_ROLE_OP_ACTIVE: val = "DS_ROLE_OP_ACTIVE"; break;
323 0 : case DS_ROLE_OP_NEEDS_REBOOT: val = "DS_ROLE_OP_NEEDS_REBOOT"; break;
324 : }
325 10 : ndr_print_enum(ndr, name, "ENUM", val, r);
326 10 : }
327 :
328 25 : static enum ndr_err_code ndr_push_dssetup_DsRoleOpStatus(struct ndr_push *ndr, int ndr_flags, const struct dssetup_DsRoleOpStatus *r)
329 : {
330 25 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
331 25 : if (ndr_flags & NDR_SCALARS) {
332 25 : NDR_CHECK(ndr_push_align(ndr, 3));
333 25 : NDR_CHECK(ndr_push_dssetup_DsRoleOp(ndr, NDR_SCALARS, r->status));
334 25 : NDR_CHECK(ndr_push_trailer_align(ndr, 3));
335 : }
336 25 : if (ndr_flags & NDR_BUFFERS) {
337 : }
338 25 : return NDR_ERR_SUCCESS;
339 : }
340 :
341 20 : static enum ndr_err_code ndr_pull_dssetup_DsRoleOpStatus(struct ndr_pull *ndr, int ndr_flags, struct dssetup_DsRoleOpStatus *r)
342 : {
343 20 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
344 20 : if (ndr_flags & NDR_SCALARS) {
345 20 : NDR_CHECK(ndr_pull_align(ndr, 3));
346 20 : NDR_CHECK(ndr_pull_dssetup_DsRoleOp(ndr, NDR_SCALARS, &r->status));
347 20 : NDR_CHECK(ndr_pull_trailer_align(ndr, 3));
348 : }
349 20 : if (ndr_flags & NDR_BUFFERS) {
350 : }
351 20 : return NDR_ERR_SUCCESS;
352 : }
353 :
354 10 : _PUBLIC_ void ndr_print_dssetup_DsRoleOpStatus(struct ndr_print *ndr, const char *name, const struct dssetup_DsRoleOpStatus *r)
355 : {
356 10 : ndr_print_struct(ndr, name, "dssetup_DsRoleOpStatus");
357 10 : if (r == NULL) { ndr_print_null(ndr); return; }
358 10 : ndr->depth++;
359 10 : ndr_print_dssetup_DsRoleOp(ndr, "status", r->status);
360 10 : ndr->depth--;
361 : }
362 :
363 191 : static enum ndr_err_code ndr_push_dssetup_DsRoleInfoLevel(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsRoleInfoLevel r)
364 : {
365 191 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
366 191 : return NDR_ERR_SUCCESS;
367 : }
368 :
369 111 : static enum ndr_err_code ndr_pull_dssetup_DsRoleInfoLevel(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsRoleInfoLevel *r)
370 : {
371 : uint16_t v;
372 111 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
373 111 : *r = v;
374 111 : return NDR_ERR_SUCCESS;
375 : }
376 :
377 0 : _PUBLIC_ void ndr_print_dssetup_DsRoleInfoLevel(struct ndr_print *ndr, const char *name, enum dssetup_DsRoleInfoLevel r)
378 : {
379 0 : const char *val = NULL;
380 :
381 0 : switch (r) {
382 0 : case DS_ROLE_BASIC_INFORMATION: val = "DS_ROLE_BASIC_INFORMATION"; break;
383 0 : case DS_ROLE_UPGRADE_STATUS: val = "DS_ROLE_UPGRADE_STATUS"; break;
384 0 : case DS_ROLE_OP_STATUS: val = "DS_ROLE_OP_STATUS"; break;
385 : }
386 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
387 0 : }
388 :
389 127 : static enum ndr_err_code ndr_push_dssetup_DsRoleInfo(struct ndr_push *ndr, int ndr_flags, const union dssetup_DsRoleInfo *r)
390 : {
391 : uint32_t level;
392 127 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
393 127 : if (ndr_flags & NDR_SCALARS) {
394 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
395 127 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
396 127 : NDR_CHECK(ndr_push_union_align(ndr, 5));
397 127 : NDR_CHECK(ndr_push_dssetup_DsRoleInfoLevel(ndr, NDR_SCALARS, level));
398 127 : NDR_CHECK(ndr_push_union_align(ndr, 5));
399 127 : switch (level) {
400 77 : case DS_ROLE_BASIC_INFORMATION: {
401 77 : NDR_CHECK(ndr_push_dssetup_DsRolePrimaryDomInfoBasic(ndr, NDR_SCALARS, &r->basic));
402 77 : break; }
403 :
404 25 : case DS_ROLE_UPGRADE_STATUS: {
405 25 : NDR_CHECK(ndr_push_dssetup_DsRoleUpgradeStatus(ndr, NDR_SCALARS, &r->upgrade));
406 25 : break; }
407 :
408 25 : case DS_ROLE_OP_STATUS: {
409 25 : NDR_CHECK(ndr_push_dssetup_DsRoleOpStatus(ndr, NDR_SCALARS, &r->opstatus));
410 25 : break; }
411 :
412 0 : default:
413 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
414 : }
415 0 : }
416 127 : if (ndr_flags & NDR_BUFFERS) {
417 127 : if (!(ndr_flags & NDR_SCALARS)) {
418 : /* We didn't get it above, and the token is not needed after this. */
419 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
420 : }
421 127 : switch (level) {
422 77 : case DS_ROLE_BASIC_INFORMATION:
423 77 : NDR_CHECK(ndr_push_dssetup_DsRolePrimaryDomInfoBasic(ndr, NDR_BUFFERS, &r->basic));
424 77 : break;
425 :
426 25 : case DS_ROLE_UPGRADE_STATUS:
427 25 : break;
428 :
429 25 : case DS_ROLE_OP_STATUS:
430 25 : break;
431 :
432 0 : default:
433 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
434 : }
435 0 : }
436 127 : return NDR_ERR_SUCCESS;
437 : }
438 :
439 64 : static enum ndr_err_code ndr_pull_dssetup_DsRoleInfo(struct ndr_pull *ndr, int ndr_flags, union dssetup_DsRoleInfo *r)
440 : {
441 : uint32_t level;
442 : uint16_t _level;
443 64 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
444 64 : if (ndr_flags & NDR_SCALARS) {
445 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
446 64 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
447 64 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
448 64 : NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
449 64 : if (_level != level) {
450 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
451 : }
452 64 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
453 64 : switch (level) {
454 24 : case DS_ROLE_BASIC_INFORMATION: {
455 24 : NDR_CHECK(ndr_pull_dssetup_DsRolePrimaryDomInfoBasic(ndr, NDR_SCALARS, &r->basic));
456 24 : break; }
457 :
458 20 : case DS_ROLE_UPGRADE_STATUS: {
459 20 : NDR_CHECK(ndr_pull_dssetup_DsRoleUpgradeStatus(ndr, NDR_SCALARS, &r->upgrade));
460 20 : break; }
461 :
462 20 : case DS_ROLE_OP_STATUS: {
463 20 : NDR_CHECK(ndr_pull_dssetup_DsRoleOpStatus(ndr, NDR_SCALARS, &r->opstatus));
464 20 : break; }
465 :
466 0 : default:
467 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
468 : }
469 0 : }
470 64 : if (ndr_flags & NDR_BUFFERS) {
471 64 : if (!(ndr_flags & NDR_SCALARS)) {
472 : /* We didn't get it above, and the token is not needed after this. */
473 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
474 : }
475 64 : switch (level) {
476 24 : case DS_ROLE_BASIC_INFORMATION:
477 24 : NDR_CHECK(ndr_pull_dssetup_DsRolePrimaryDomInfoBasic(ndr, NDR_BUFFERS, &r->basic));
478 24 : break;
479 :
480 20 : case DS_ROLE_UPGRADE_STATUS:
481 20 : break;
482 :
483 20 : case DS_ROLE_OP_STATUS:
484 20 : break;
485 :
486 0 : default:
487 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
488 : }
489 0 : }
490 64 : return NDR_ERR_SUCCESS;
491 : }
492 :
493 32 : _PUBLIC_ void ndr_print_dssetup_DsRoleInfo(struct ndr_print *ndr, const char *name, const union dssetup_DsRoleInfo *r)
494 : {
495 : uint32_t level;
496 32 : level = ndr_print_steal_switch_value(ndr, r);
497 32 : ndr_print_union(ndr, name, level, "dssetup_DsRoleInfo");
498 32 : switch (level) {
499 12 : case DS_ROLE_BASIC_INFORMATION:
500 12 : ndr_print_dssetup_DsRolePrimaryDomInfoBasic(ndr, "basic", &r->basic);
501 12 : break;
502 :
503 10 : case DS_ROLE_UPGRADE_STATUS:
504 10 : ndr_print_dssetup_DsRoleUpgradeStatus(ndr, "upgrade", &r->upgrade);
505 10 : break;
506 :
507 10 : case DS_ROLE_OP_STATUS:
508 10 : ndr_print_dssetup_DsRoleOpStatus(ndr, "opstatus", &r->opstatus);
509 10 : break;
510 :
511 0 : default:
512 0 : ndr_print_bad_level(ndr, name, level);
513 : }
514 32 : }
515 :
516 191 : static enum ndr_err_code ndr_push_dssetup_DsRoleGetPrimaryDomainInformation(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleGetPrimaryDomainInformation *r)
517 : {
518 191 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
519 191 : if (flags & NDR_IN) {
520 64 : NDR_CHECK(ndr_push_dssetup_DsRoleInfoLevel(ndr, NDR_SCALARS, r->in.level));
521 : }
522 191 : if (flags & NDR_OUT) {
523 127 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
524 127 : if (r->out.info) {
525 127 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
526 127 : NDR_CHECK(ndr_push_dssetup_DsRoleInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
527 : }
528 127 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
529 : }
530 191 : return NDR_ERR_SUCCESS;
531 : }
532 :
533 175 : static enum ndr_err_code ndr_pull_dssetup_DsRoleGetPrimaryDomainInformation(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleGetPrimaryDomainInformation *r)
534 : {
535 : uint32_t _ptr_info;
536 175 : TALLOC_CTX *_mem_save_info_0 = NULL;
537 175 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
538 175 : if (flags & NDR_IN) {
539 111 : NDR_ZERO_STRUCT(r->out);
540 :
541 111 : NDR_CHECK(ndr_pull_dssetup_DsRoleInfoLevel(ndr, NDR_SCALARS, &r->in.level));
542 : }
543 175 : if (flags & NDR_OUT) {
544 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
545 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
546 64 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
547 64 : if (_ptr_info) {
548 64 : NDR_PULL_ALLOC(ndr, r->out.info);
549 : } else {
550 0 : r->out.info = NULL;
551 : }
552 64 : if (r->out.info) {
553 64 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
554 64 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
555 64 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
556 64 : NDR_CHECK(ndr_pull_dssetup_DsRoleInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
557 64 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
558 : }
559 64 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
560 : }
561 175 : return NDR_ERR_SUCCESS;
562 : }
563 :
564 32 : _PUBLIC_ void ndr_print_dssetup_DsRoleGetPrimaryDomainInformation(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetPrimaryDomainInformation *r)
565 : {
566 32 : ndr_print_struct(ndr, name, "dssetup_DsRoleGetPrimaryDomainInformation");
567 32 : if (r == NULL) { ndr_print_null(ndr); return; }
568 32 : ndr->depth++;
569 32 : if (flags & NDR_SET_VALUES) {
570 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
571 : }
572 32 : if (flags & NDR_IN) {
573 0 : ndr_print_struct(ndr, "in", "dssetup_DsRoleGetPrimaryDomainInformation");
574 0 : ndr->depth++;
575 0 : ndr_print_dssetup_DsRoleInfoLevel(ndr, "level", r->in.level);
576 0 : ndr->depth--;
577 : }
578 32 : if (flags & NDR_OUT) {
579 32 : ndr_print_struct(ndr, "out", "dssetup_DsRoleGetPrimaryDomainInformation");
580 32 : ndr->depth++;
581 32 : ndr_print_ptr(ndr, "info", r->out.info);
582 32 : ndr->depth++;
583 32 : if (r->out.info) {
584 32 : ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
585 32 : ndr_print_dssetup_DsRoleInfo(ndr, "info", r->out.info);
586 : }
587 32 : ndr->depth--;
588 32 : ndr_print_WERROR(ndr, "result", r->out.result);
589 32 : ndr->depth--;
590 : }
591 32 : ndr->depth--;
592 : }
593 :
594 0 : static enum ndr_err_code ndr_push_dssetup_DsRoleDnsNameToFlatName(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleDnsNameToFlatName *r)
595 : {
596 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
597 0 : if (flags & NDR_IN) {
598 : }
599 0 : if (flags & NDR_OUT) {
600 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
601 : }
602 0 : return NDR_ERR_SUCCESS;
603 : }
604 :
605 0 : static enum ndr_err_code ndr_pull_dssetup_DsRoleDnsNameToFlatName(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleDnsNameToFlatName *r)
606 : {
607 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
608 0 : if (flags & NDR_IN) {
609 : }
610 0 : if (flags & NDR_OUT) {
611 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
612 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
613 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
614 : }
615 0 : return NDR_ERR_SUCCESS;
616 : }
617 :
618 0 : _PUBLIC_ void ndr_print_dssetup_DsRoleDnsNameToFlatName(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDnsNameToFlatName *r)
619 : {
620 0 : ndr_print_struct(ndr, name, "dssetup_DsRoleDnsNameToFlatName");
621 0 : if (r == NULL) { ndr_print_null(ndr); return; }
622 0 : ndr->depth++;
623 0 : if (flags & NDR_SET_VALUES) {
624 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
625 : }
626 0 : if (flags & NDR_IN) {
627 0 : ndr_print_struct(ndr, "in", "dssetup_DsRoleDnsNameToFlatName");
628 0 : ndr->depth++;
629 0 : ndr->depth--;
630 : }
631 0 : if (flags & NDR_OUT) {
632 0 : ndr_print_struct(ndr, "out", "dssetup_DsRoleDnsNameToFlatName");
633 0 : ndr->depth++;
634 0 : ndr_print_WERROR(ndr, "result", r->out.result);
635 0 : ndr->depth--;
636 : }
637 0 : ndr->depth--;
638 : }
639 :
640 0 : static enum ndr_err_code ndr_push_dssetup_DsRoleDcAsDc(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleDcAsDc *r)
641 : {
642 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
643 0 : if (flags & NDR_IN) {
644 : }
645 0 : if (flags & NDR_OUT) {
646 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
647 : }
648 0 : return NDR_ERR_SUCCESS;
649 : }
650 :
651 0 : static enum ndr_err_code ndr_pull_dssetup_DsRoleDcAsDc(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleDcAsDc *r)
652 : {
653 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
654 0 : if (flags & NDR_IN) {
655 : }
656 0 : if (flags & NDR_OUT) {
657 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
658 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
659 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
660 : }
661 0 : return NDR_ERR_SUCCESS;
662 : }
663 :
664 0 : _PUBLIC_ void ndr_print_dssetup_DsRoleDcAsDc(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDcAsDc *r)
665 : {
666 0 : ndr_print_struct(ndr, name, "dssetup_DsRoleDcAsDc");
667 0 : if (r == NULL) { ndr_print_null(ndr); return; }
668 0 : ndr->depth++;
669 0 : if (flags & NDR_SET_VALUES) {
670 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
671 : }
672 0 : if (flags & NDR_IN) {
673 0 : ndr_print_struct(ndr, "in", "dssetup_DsRoleDcAsDc");
674 0 : ndr->depth++;
675 0 : ndr->depth--;
676 : }
677 0 : if (flags & NDR_OUT) {
678 0 : ndr_print_struct(ndr, "out", "dssetup_DsRoleDcAsDc");
679 0 : ndr->depth++;
680 0 : ndr_print_WERROR(ndr, "result", r->out.result);
681 0 : ndr->depth--;
682 : }
683 0 : ndr->depth--;
684 : }
685 :
686 0 : static enum ndr_err_code ndr_push_dssetup_DsRoleDcAsReplica(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleDcAsReplica *r)
687 : {
688 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
689 0 : if (flags & NDR_IN) {
690 : }
691 0 : if (flags & NDR_OUT) {
692 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
693 : }
694 0 : return NDR_ERR_SUCCESS;
695 : }
696 :
697 0 : static enum ndr_err_code ndr_pull_dssetup_DsRoleDcAsReplica(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleDcAsReplica *r)
698 : {
699 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
700 0 : if (flags & NDR_IN) {
701 : }
702 0 : if (flags & NDR_OUT) {
703 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
704 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
705 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
706 : }
707 0 : return NDR_ERR_SUCCESS;
708 : }
709 :
710 0 : _PUBLIC_ void ndr_print_dssetup_DsRoleDcAsReplica(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDcAsReplica *r)
711 : {
712 0 : ndr_print_struct(ndr, name, "dssetup_DsRoleDcAsReplica");
713 0 : if (r == NULL) { ndr_print_null(ndr); return; }
714 0 : ndr->depth++;
715 0 : if (flags & NDR_SET_VALUES) {
716 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
717 : }
718 0 : if (flags & NDR_IN) {
719 0 : ndr_print_struct(ndr, "in", "dssetup_DsRoleDcAsReplica");
720 0 : ndr->depth++;
721 0 : ndr->depth--;
722 : }
723 0 : if (flags & NDR_OUT) {
724 0 : ndr_print_struct(ndr, "out", "dssetup_DsRoleDcAsReplica");
725 0 : ndr->depth++;
726 0 : ndr_print_WERROR(ndr, "result", r->out.result);
727 0 : ndr->depth--;
728 : }
729 0 : ndr->depth--;
730 : }
731 :
732 0 : static enum ndr_err_code ndr_push_dssetup_DsRoleDemoteDc(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleDemoteDc *r)
733 : {
734 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
735 0 : if (flags & NDR_IN) {
736 : }
737 0 : if (flags & NDR_OUT) {
738 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
739 : }
740 0 : return NDR_ERR_SUCCESS;
741 : }
742 :
743 0 : static enum ndr_err_code ndr_pull_dssetup_DsRoleDemoteDc(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleDemoteDc *r)
744 : {
745 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
746 0 : if (flags & NDR_IN) {
747 : }
748 0 : if (flags & NDR_OUT) {
749 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
750 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
751 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
752 : }
753 0 : return NDR_ERR_SUCCESS;
754 : }
755 :
756 0 : _PUBLIC_ void ndr_print_dssetup_DsRoleDemoteDc(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDemoteDc *r)
757 : {
758 0 : ndr_print_struct(ndr, name, "dssetup_DsRoleDemoteDc");
759 0 : if (r == NULL) { ndr_print_null(ndr); return; }
760 0 : ndr->depth++;
761 0 : if (flags & NDR_SET_VALUES) {
762 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
763 : }
764 0 : if (flags & NDR_IN) {
765 0 : ndr_print_struct(ndr, "in", "dssetup_DsRoleDemoteDc");
766 0 : ndr->depth++;
767 0 : ndr->depth--;
768 : }
769 0 : if (flags & NDR_OUT) {
770 0 : ndr_print_struct(ndr, "out", "dssetup_DsRoleDemoteDc");
771 0 : ndr->depth++;
772 0 : ndr_print_WERROR(ndr, "result", r->out.result);
773 0 : ndr->depth--;
774 : }
775 0 : ndr->depth--;
776 : }
777 :
778 0 : static enum ndr_err_code ndr_push_dssetup_DsRoleGetDcOperationProgress(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleGetDcOperationProgress *r)
779 : {
780 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
781 0 : if (flags & NDR_IN) {
782 : }
783 0 : if (flags & NDR_OUT) {
784 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
785 : }
786 0 : return NDR_ERR_SUCCESS;
787 : }
788 :
789 0 : static enum ndr_err_code ndr_pull_dssetup_DsRoleGetDcOperationProgress(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleGetDcOperationProgress *r)
790 : {
791 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
792 0 : if (flags & NDR_IN) {
793 : }
794 0 : if (flags & NDR_OUT) {
795 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
796 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
797 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
798 : }
799 0 : return NDR_ERR_SUCCESS;
800 : }
801 :
802 0 : _PUBLIC_ void ndr_print_dssetup_DsRoleGetDcOperationProgress(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetDcOperationProgress *r)
803 : {
804 0 : ndr_print_struct(ndr, name, "dssetup_DsRoleGetDcOperationProgress");
805 0 : if (r == NULL) { ndr_print_null(ndr); return; }
806 0 : ndr->depth++;
807 0 : if (flags & NDR_SET_VALUES) {
808 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
809 : }
810 0 : if (flags & NDR_IN) {
811 0 : ndr_print_struct(ndr, "in", "dssetup_DsRoleGetDcOperationProgress");
812 0 : ndr->depth++;
813 0 : ndr->depth--;
814 : }
815 0 : if (flags & NDR_OUT) {
816 0 : ndr_print_struct(ndr, "out", "dssetup_DsRoleGetDcOperationProgress");
817 0 : ndr->depth++;
818 0 : ndr_print_WERROR(ndr, "result", r->out.result);
819 0 : ndr->depth--;
820 : }
821 0 : ndr->depth--;
822 : }
823 :
824 0 : static enum ndr_err_code ndr_push_dssetup_DsRoleGetDcOperationResults(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleGetDcOperationResults *r)
825 : {
826 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
827 0 : if (flags & NDR_IN) {
828 : }
829 0 : if (flags & NDR_OUT) {
830 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
831 : }
832 0 : return NDR_ERR_SUCCESS;
833 : }
834 :
835 0 : static enum ndr_err_code ndr_pull_dssetup_DsRoleGetDcOperationResults(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleGetDcOperationResults *r)
836 : {
837 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
838 0 : if (flags & NDR_IN) {
839 : }
840 0 : if (flags & NDR_OUT) {
841 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
842 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
843 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
844 : }
845 0 : return NDR_ERR_SUCCESS;
846 : }
847 :
848 0 : _PUBLIC_ void ndr_print_dssetup_DsRoleGetDcOperationResults(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetDcOperationResults *r)
849 : {
850 0 : ndr_print_struct(ndr, name, "dssetup_DsRoleGetDcOperationResults");
851 0 : if (r == NULL) { ndr_print_null(ndr); return; }
852 0 : ndr->depth++;
853 0 : if (flags & NDR_SET_VALUES) {
854 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
855 : }
856 0 : if (flags & NDR_IN) {
857 0 : ndr_print_struct(ndr, "in", "dssetup_DsRoleGetDcOperationResults");
858 0 : ndr->depth++;
859 0 : ndr->depth--;
860 : }
861 0 : if (flags & NDR_OUT) {
862 0 : ndr_print_struct(ndr, "out", "dssetup_DsRoleGetDcOperationResults");
863 0 : ndr->depth++;
864 0 : ndr_print_WERROR(ndr, "result", r->out.result);
865 0 : ndr->depth--;
866 : }
867 0 : ndr->depth--;
868 : }
869 :
870 0 : static enum ndr_err_code ndr_push_dssetup_DsRoleCancel(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleCancel *r)
871 : {
872 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
873 0 : if (flags & NDR_IN) {
874 : }
875 0 : if (flags & NDR_OUT) {
876 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
877 : }
878 0 : return NDR_ERR_SUCCESS;
879 : }
880 :
881 0 : static enum ndr_err_code ndr_pull_dssetup_DsRoleCancel(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleCancel *r)
882 : {
883 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
884 0 : if (flags & NDR_IN) {
885 : }
886 0 : if (flags & NDR_OUT) {
887 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
888 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
889 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
890 : }
891 0 : return NDR_ERR_SUCCESS;
892 : }
893 :
894 0 : _PUBLIC_ void ndr_print_dssetup_DsRoleCancel(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleCancel *r)
895 : {
896 0 : ndr_print_struct(ndr, name, "dssetup_DsRoleCancel");
897 0 : if (r == NULL) { ndr_print_null(ndr); return; }
898 0 : ndr->depth++;
899 0 : if (flags & NDR_SET_VALUES) {
900 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
901 : }
902 0 : if (flags & NDR_IN) {
903 0 : ndr_print_struct(ndr, "in", "dssetup_DsRoleCancel");
904 0 : ndr->depth++;
905 0 : ndr->depth--;
906 : }
907 0 : if (flags & NDR_OUT) {
908 0 : ndr_print_struct(ndr, "out", "dssetup_DsRoleCancel");
909 0 : ndr->depth++;
910 0 : ndr_print_WERROR(ndr, "result", r->out.result);
911 0 : ndr->depth--;
912 : }
913 0 : ndr->depth--;
914 : }
915 :
916 0 : static enum ndr_err_code ndr_push_dssetup_DsRoleServerSaveStateForUpgrade(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleServerSaveStateForUpgrade *r)
917 : {
918 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
919 0 : if (flags & NDR_IN) {
920 : }
921 0 : if (flags & NDR_OUT) {
922 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
923 : }
924 0 : return NDR_ERR_SUCCESS;
925 : }
926 :
927 0 : static enum ndr_err_code ndr_pull_dssetup_DsRoleServerSaveStateForUpgrade(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleServerSaveStateForUpgrade *r)
928 : {
929 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
930 0 : if (flags & NDR_IN) {
931 : }
932 0 : if (flags & NDR_OUT) {
933 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
934 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
935 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
936 : }
937 0 : return NDR_ERR_SUCCESS;
938 : }
939 :
940 0 : _PUBLIC_ void ndr_print_dssetup_DsRoleServerSaveStateForUpgrade(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleServerSaveStateForUpgrade *r)
941 : {
942 0 : ndr_print_struct(ndr, name, "dssetup_DsRoleServerSaveStateForUpgrade");
943 0 : if (r == NULL) { ndr_print_null(ndr); return; }
944 0 : ndr->depth++;
945 0 : if (flags & NDR_SET_VALUES) {
946 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
947 : }
948 0 : if (flags & NDR_IN) {
949 0 : ndr_print_struct(ndr, "in", "dssetup_DsRoleServerSaveStateForUpgrade");
950 0 : ndr->depth++;
951 0 : ndr->depth--;
952 : }
953 0 : if (flags & NDR_OUT) {
954 0 : ndr_print_struct(ndr, "out", "dssetup_DsRoleServerSaveStateForUpgrade");
955 0 : ndr->depth++;
956 0 : ndr_print_WERROR(ndr, "result", r->out.result);
957 0 : ndr->depth--;
958 : }
959 0 : ndr->depth--;
960 : }
961 :
962 0 : static enum ndr_err_code ndr_push_dssetup_DsRoleUpgradeDownlevelServer(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleUpgradeDownlevelServer *r)
963 : {
964 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
965 0 : if (flags & NDR_IN) {
966 : }
967 0 : if (flags & NDR_OUT) {
968 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
969 : }
970 0 : return NDR_ERR_SUCCESS;
971 : }
972 :
973 0 : static enum ndr_err_code ndr_pull_dssetup_DsRoleUpgradeDownlevelServer(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleUpgradeDownlevelServer *r)
974 : {
975 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
976 0 : if (flags & NDR_IN) {
977 : }
978 0 : if (flags & NDR_OUT) {
979 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
980 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
981 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
982 : }
983 0 : return NDR_ERR_SUCCESS;
984 : }
985 :
986 0 : _PUBLIC_ void ndr_print_dssetup_DsRoleUpgradeDownlevelServer(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleUpgradeDownlevelServer *r)
987 : {
988 0 : ndr_print_struct(ndr, name, "dssetup_DsRoleUpgradeDownlevelServer");
989 0 : if (r == NULL) { ndr_print_null(ndr); return; }
990 0 : ndr->depth++;
991 0 : if (flags & NDR_SET_VALUES) {
992 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
993 : }
994 0 : if (flags & NDR_IN) {
995 0 : ndr_print_struct(ndr, "in", "dssetup_DsRoleUpgradeDownlevelServer");
996 0 : ndr->depth++;
997 0 : ndr->depth--;
998 : }
999 0 : if (flags & NDR_OUT) {
1000 0 : ndr_print_struct(ndr, "out", "dssetup_DsRoleUpgradeDownlevelServer");
1001 0 : ndr->depth++;
1002 0 : ndr_print_WERROR(ndr, "result", r->out.result);
1003 0 : ndr->depth--;
1004 : }
1005 0 : ndr->depth--;
1006 : }
1007 :
1008 0 : static enum ndr_err_code ndr_push_dssetup_DsRoleAbortDownlevelServerUpgrade(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleAbortDownlevelServerUpgrade *r)
1009 : {
1010 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1011 0 : if (flags & NDR_IN) {
1012 : }
1013 0 : if (flags & NDR_OUT) {
1014 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1015 : }
1016 0 : return NDR_ERR_SUCCESS;
1017 : }
1018 :
1019 0 : static enum ndr_err_code ndr_pull_dssetup_DsRoleAbortDownlevelServerUpgrade(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleAbortDownlevelServerUpgrade *r)
1020 : {
1021 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1022 0 : if (flags & NDR_IN) {
1023 : }
1024 0 : if (flags & NDR_OUT) {
1025 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1026 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1027 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1028 : }
1029 0 : return NDR_ERR_SUCCESS;
1030 : }
1031 :
1032 0 : _PUBLIC_ void ndr_print_dssetup_DsRoleAbortDownlevelServerUpgrade(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleAbortDownlevelServerUpgrade *r)
1033 : {
1034 0 : ndr_print_struct(ndr, name, "dssetup_DsRoleAbortDownlevelServerUpgrade");
1035 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1036 0 : ndr->depth++;
1037 0 : if (flags & NDR_SET_VALUES) {
1038 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1039 : }
1040 0 : if (flags & NDR_IN) {
1041 0 : ndr_print_struct(ndr, "in", "dssetup_DsRoleAbortDownlevelServerUpgrade");
1042 0 : ndr->depth++;
1043 0 : ndr->depth--;
1044 : }
1045 0 : if (flags & NDR_OUT) {
1046 0 : ndr_print_struct(ndr, "out", "dssetup_DsRoleAbortDownlevelServerUpgrade");
1047 0 : ndr->depth++;
1048 0 : ndr_print_WERROR(ndr, "result", r->out.result);
1049 0 : ndr->depth--;
1050 : }
1051 0 : ndr->depth--;
1052 : }
1053 :
1054 : #ifndef SKIP_NDR_TABLE_dssetup
1055 : static const struct ndr_interface_public_struct dssetup_public_structs[] = {
1056 : { .name = NULL }
1057 : };
1058 :
1059 : static const struct ndr_interface_call dssetup_calls[] = {
1060 : {
1061 : "dssetup_DsRoleGetPrimaryDomainInformation",
1062 : sizeof(struct dssetup_DsRoleGetPrimaryDomainInformation),
1063 : (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleGetPrimaryDomainInformation,
1064 : (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleGetPrimaryDomainInformation,
1065 : (ndr_print_function_t) ndr_print_dssetup_DsRoleGetPrimaryDomainInformation,
1066 : { 0, NULL },
1067 : { 0, NULL },
1068 : },
1069 : {
1070 : "dssetup_DsRoleDnsNameToFlatName",
1071 : sizeof(struct dssetup_DsRoleDnsNameToFlatName),
1072 : (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleDnsNameToFlatName,
1073 : (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleDnsNameToFlatName,
1074 : (ndr_print_function_t) ndr_print_dssetup_DsRoleDnsNameToFlatName,
1075 : { 0, NULL },
1076 : { 0, NULL },
1077 : },
1078 : {
1079 : "dssetup_DsRoleDcAsDc",
1080 : sizeof(struct dssetup_DsRoleDcAsDc),
1081 : (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleDcAsDc,
1082 : (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleDcAsDc,
1083 : (ndr_print_function_t) ndr_print_dssetup_DsRoleDcAsDc,
1084 : { 0, NULL },
1085 : { 0, NULL },
1086 : },
1087 : {
1088 : "dssetup_DsRoleDcAsReplica",
1089 : sizeof(struct dssetup_DsRoleDcAsReplica),
1090 : (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleDcAsReplica,
1091 : (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleDcAsReplica,
1092 : (ndr_print_function_t) ndr_print_dssetup_DsRoleDcAsReplica,
1093 : { 0, NULL },
1094 : { 0, NULL },
1095 : },
1096 : {
1097 : "dssetup_DsRoleDemoteDc",
1098 : sizeof(struct dssetup_DsRoleDemoteDc),
1099 : (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleDemoteDc,
1100 : (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleDemoteDc,
1101 : (ndr_print_function_t) ndr_print_dssetup_DsRoleDemoteDc,
1102 : { 0, NULL },
1103 : { 0, NULL },
1104 : },
1105 : {
1106 : "dssetup_DsRoleGetDcOperationProgress",
1107 : sizeof(struct dssetup_DsRoleGetDcOperationProgress),
1108 : (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleGetDcOperationProgress,
1109 : (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleGetDcOperationProgress,
1110 : (ndr_print_function_t) ndr_print_dssetup_DsRoleGetDcOperationProgress,
1111 : { 0, NULL },
1112 : { 0, NULL },
1113 : },
1114 : {
1115 : "dssetup_DsRoleGetDcOperationResults",
1116 : sizeof(struct dssetup_DsRoleGetDcOperationResults),
1117 : (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleGetDcOperationResults,
1118 : (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleGetDcOperationResults,
1119 : (ndr_print_function_t) ndr_print_dssetup_DsRoleGetDcOperationResults,
1120 : { 0, NULL },
1121 : { 0, NULL },
1122 : },
1123 : {
1124 : "dssetup_DsRoleCancel",
1125 : sizeof(struct dssetup_DsRoleCancel),
1126 : (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleCancel,
1127 : (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleCancel,
1128 : (ndr_print_function_t) ndr_print_dssetup_DsRoleCancel,
1129 : { 0, NULL },
1130 : { 0, NULL },
1131 : },
1132 : {
1133 : "dssetup_DsRoleServerSaveStateForUpgrade",
1134 : sizeof(struct dssetup_DsRoleServerSaveStateForUpgrade),
1135 : (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleServerSaveStateForUpgrade,
1136 : (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleServerSaveStateForUpgrade,
1137 : (ndr_print_function_t) ndr_print_dssetup_DsRoleServerSaveStateForUpgrade,
1138 : { 0, NULL },
1139 : { 0, NULL },
1140 : },
1141 : {
1142 : "dssetup_DsRoleUpgradeDownlevelServer",
1143 : sizeof(struct dssetup_DsRoleUpgradeDownlevelServer),
1144 : (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleUpgradeDownlevelServer,
1145 : (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleUpgradeDownlevelServer,
1146 : (ndr_print_function_t) ndr_print_dssetup_DsRoleUpgradeDownlevelServer,
1147 : { 0, NULL },
1148 : { 0, NULL },
1149 : },
1150 : {
1151 : "dssetup_DsRoleAbortDownlevelServerUpgrade",
1152 : sizeof(struct dssetup_DsRoleAbortDownlevelServerUpgrade),
1153 : (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleAbortDownlevelServerUpgrade,
1154 : (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleAbortDownlevelServerUpgrade,
1155 : (ndr_print_function_t) ndr_print_dssetup_DsRoleAbortDownlevelServerUpgrade,
1156 : { 0, NULL },
1157 : { 0, NULL },
1158 : },
1159 : { .name = NULL }
1160 : };
1161 :
1162 : static const char * const dssetup_endpoint_strings[] = {
1163 : "ncacn_np:[\\pipe\\lsarpc]",
1164 : "ncacn_np:[\\pipe\\lsass]",
1165 : "ncacn_ip_tcp:",
1166 : "ncalrpc:",
1167 : };
1168 :
1169 : static const struct ndr_interface_string_array dssetup_endpoints = {
1170 : .count = 4,
1171 : .names = dssetup_endpoint_strings
1172 : };
1173 :
1174 : static const char * const dssetup_authservice_strings[] = {
1175 : "host",
1176 : };
1177 :
1178 : static const struct ndr_interface_string_array dssetup_authservices = {
1179 : .count = 1,
1180 : .names = dssetup_authservice_strings
1181 : };
1182 :
1183 :
1184 : const struct ndr_interface_table ndr_table_dssetup = {
1185 : .name = "dssetup",
1186 : .syntax_id = {
1187 : {0x3919286a,0xb10c,0x11d0,{0x9b,0xa8},{0x00,0xc0,0x4f,0xd9,0x2e,0xf5}},
1188 : NDR_DSSETUP_VERSION
1189 : },
1190 : .helpstring = NDR_DSSETUP_HELPSTRING,
1191 : .num_calls = 11,
1192 : .calls = dssetup_calls,
1193 : .num_public_structs = 0,
1194 : .public_structs = dssetup_public_structs,
1195 : .endpoints = &dssetup_endpoints,
1196 : .authservices = &dssetup_authservices
1197 : };
1198 :
1199 : #endif /* SKIP_NDR_TABLE_dssetup */
|