s3:streams: check for :$DATA only in the backend (fix bug #6642)
[Samba/bb.git] / librpc / gen_ndr / ndr_drsblobs.c
blob020d5b33762d581e7e85873a01e19d1febb418b1
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_drsblobs.h"
6 #include "librpc/gen_ndr/ndr_drsuapi.h"
7 #include "librpc/gen_ndr/ndr_misc.h"
8 #include "librpc/gen_ndr/ndr_samr.h"
9 #include "librpc/gen_ndr/ndr_lsa.h"
10 static enum ndr_err_code ndr_push_replPropertyMetaData1(struct ndr_push *ndr, int ndr_flags, const struct replPropertyMetaData1 *r)
12 if (ndr_flags & NDR_SCALARS) {
13 NDR_CHECK(ndr_push_align(ndr, 8));
14 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attid));
15 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
16 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->originating_change_time));
17 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
18 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn));
19 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->local_usn));
21 if (ndr_flags & NDR_BUFFERS) {
23 return NDR_ERR_SUCCESS;
26 static enum ndr_err_code ndr_pull_replPropertyMetaData1(struct ndr_pull *ndr, int ndr_flags, struct replPropertyMetaData1 *r)
28 if (ndr_flags & NDR_SCALARS) {
29 NDR_CHECK(ndr_pull_align(ndr, 8));
30 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attid));
31 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
32 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->originating_change_time));
33 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
34 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn));
35 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->local_usn));
37 if (ndr_flags & NDR_BUFFERS) {
39 return NDR_ERR_SUCCESS;
42 _PUBLIC_ void ndr_print_replPropertyMetaData1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaData1 *r)
44 ndr_print_struct(ndr, name, "replPropertyMetaData1");
45 ndr->depth++;
46 ndr_print_drsuapi_DsAttributeId(ndr, "attid", r->attid);
47 ndr_print_uint32(ndr, "version", r->version);
48 ndr_print_NTTIME_1sec(ndr, "originating_change_time", r->originating_change_time);
49 ndr_print_GUID(ndr, "originating_invocation_id", &r->originating_invocation_id);
50 ndr_print_hyper(ndr, "originating_usn", r->originating_usn);
51 ndr_print_hyper(ndr, "local_usn", r->local_usn);
52 ndr->depth--;
55 static enum ndr_err_code ndr_push_replPropertyMetaDataCtr1(struct ndr_push *ndr, int ndr_flags, const struct replPropertyMetaDataCtr1 *r)
57 uint32_t cntr_array_0;
58 if (ndr_flags & NDR_SCALARS) {
59 NDR_CHECK(ndr_push_align(ndr, 8));
60 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
61 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
62 for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) {
63 NDR_CHECK(ndr_push_replPropertyMetaData1(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
66 if (ndr_flags & NDR_BUFFERS) {
68 return NDR_ERR_SUCCESS;
71 static enum ndr_err_code ndr_pull_replPropertyMetaDataCtr1(struct ndr_pull *ndr, int ndr_flags, struct replPropertyMetaDataCtr1 *r)
73 uint32_t cntr_array_0;
74 TALLOC_CTX *_mem_save_array_0;
75 if (ndr_flags & NDR_SCALARS) {
76 NDR_CHECK(ndr_pull_align(ndr, 8));
77 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
78 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
79 NDR_PULL_ALLOC_N(ndr, r->array, r->count);
80 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
81 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
82 for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) {
83 NDR_CHECK(ndr_pull_replPropertyMetaData1(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
85 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
87 if (ndr_flags & NDR_BUFFERS) {
89 return NDR_ERR_SUCCESS;
92 _PUBLIC_ void ndr_print_replPropertyMetaDataCtr1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaDataCtr1 *r)
94 uint32_t cntr_array_0;
95 ndr_print_struct(ndr, name, "replPropertyMetaDataCtr1");
96 ndr->depth++;
97 ndr_print_uint32(ndr, "count", r->count);
98 ndr_print_uint32(ndr, "reserved", r->reserved);
99 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
100 ndr->depth++;
101 for (cntr_array_0=0;cntr_array_0<r->count;cntr_array_0++) {
102 char *idx_0=NULL;
103 if (asprintf(&idx_0, "[%d]", cntr_array_0) != -1) {
104 ndr_print_replPropertyMetaData1(ndr, "array", &r->array[cntr_array_0]);
105 free(idx_0);
108 ndr->depth--;
109 ndr->depth--;
112 static enum ndr_err_code ndr_push_replPropertyMetaDataCtr(struct ndr_push *ndr, int ndr_flags, const union replPropertyMetaDataCtr *r)
114 if (ndr_flags & NDR_SCALARS) {
115 int level = ndr_push_get_switch_value(ndr, r);
116 switch (level) {
117 case 1: {
118 NDR_CHECK(ndr_push_replPropertyMetaDataCtr1(ndr, NDR_SCALARS, &r->ctr1));
119 break; }
121 default:
122 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
125 if (ndr_flags & NDR_BUFFERS) {
126 int level = ndr_push_get_switch_value(ndr, r);
127 switch (level) {
128 case 1:
129 break;
131 default:
132 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
135 return NDR_ERR_SUCCESS;
138 static enum ndr_err_code ndr_pull_replPropertyMetaDataCtr(struct ndr_pull *ndr, int ndr_flags, union replPropertyMetaDataCtr *r)
140 int level;
141 level = ndr_pull_get_switch_value(ndr, r);
142 if (ndr_flags & NDR_SCALARS) {
143 switch (level) {
144 case 1: {
145 NDR_CHECK(ndr_pull_replPropertyMetaDataCtr1(ndr, NDR_SCALARS, &r->ctr1));
146 break; }
148 default:
149 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
152 if (ndr_flags & NDR_BUFFERS) {
153 switch (level) {
154 case 1:
155 break;
157 default:
158 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
161 return NDR_ERR_SUCCESS;
164 _PUBLIC_ void ndr_print_replPropertyMetaDataCtr(struct ndr_print *ndr, const char *name, const union replPropertyMetaDataCtr *r)
166 int level;
167 level = ndr_print_get_switch_value(ndr, r);
168 ndr_print_union(ndr, name, level, "replPropertyMetaDataCtr");
169 switch (level) {
170 case 1:
171 ndr_print_replPropertyMetaDataCtr1(ndr, "ctr1", &r->ctr1);
172 break;
174 default:
175 ndr_print_bad_level(ndr, name, level);
179 _PUBLIC_ enum ndr_err_code ndr_push_replPropertyMetaDataBlob(struct ndr_push *ndr, int ndr_flags, const struct replPropertyMetaDataBlob *r)
181 if (ndr_flags & NDR_SCALARS) {
182 NDR_CHECK(ndr_push_align(ndr, 8));
183 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
184 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
185 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
186 NDR_CHECK(ndr_push_replPropertyMetaDataCtr(ndr, NDR_SCALARS, &r->ctr));
188 if (ndr_flags & NDR_BUFFERS) {
190 return NDR_ERR_SUCCESS;
193 _PUBLIC_ enum ndr_err_code ndr_pull_replPropertyMetaDataBlob(struct ndr_pull *ndr, int ndr_flags, struct replPropertyMetaDataBlob *r)
195 if (ndr_flags & NDR_SCALARS) {
196 NDR_CHECK(ndr_pull_align(ndr, 8));
197 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
198 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
199 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
200 NDR_CHECK(ndr_pull_replPropertyMetaDataCtr(ndr, NDR_SCALARS, &r->ctr));
202 if (ndr_flags & NDR_BUFFERS) {
204 return NDR_ERR_SUCCESS;
207 _PUBLIC_ void ndr_print_replPropertyMetaDataBlob(struct ndr_print *ndr, const char *name, const struct replPropertyMetaDataBlob *r)
209 ndr_print_struct(ndr, name, "replPropertyMetaDataBlob");
210 ndr->depth++;
211 ndr_print_uint32(ndr, "version", r->version);
212 ndr_print_uint32(ndr, "reserved", r->reserved);
213 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
214 ndr_print_replPropertyMetaDataCtr(ndr, "ctr", &r->ctr);
215 ndr->depth--;
218 static enum ndr_err_code ndr_push_replUpToDateVectorCtr1(struct ndr_push *ndr, int ndr_flags, const struct replUpToDateVectorCtr1 *r)
220 uint32_t cntr_cursors_0;
221 if (ndr_flags & NDR_SCALARS) {
222 NDR_CHECK(ndr_push_align(ndr, 8));
223 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
224 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
225 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
226 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
229 if (ndr_flags & NDR_BUFFERS) {
231 return NDR_ERR_SUCCESS;
234 static enum ndr_err_code ndr_pull_replUpToDateVectorCtr1(struct ndr_pull *ndr, int ndr_flags, struct replUpToDateVectorCtr1 *r)
236 uint32_t cntr_cursors_0;
237 TALLOC_CTX *_mem_save_cursors_0;
238 if (ndr_flags & NDR_SCALARS) {
239 NDR_CHECK(ndr_pull_align(ndr, 8));
240 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
241 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
242 NDR_PULL_ALLOC_N(ndr, r->cursors, r->count);
243 _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
244 NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
245 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
246 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
248 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
250 if (ndr_flags & NDR_BUFFERS) {
252 return NDR_ERR_SUCCESS;
255 _PUBLIC_ void ndr_print_replUpToDateVectorCtr1(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorCtr1 *r)
257 uint32_t cntr_cursors_0;
258 ndr_print_struct(ndr, name, "replUpToDateVectorCtr1");
259 ndr->depth++;
260 ndr_print_uint32(ndr, "count", r->count);
261 ndr_print_uint32(ndr, "reserved", r->reserved);
262 ndr->print(ndr, "%s: ARRAY(%d)", "cursors", (int)r->count);
263 ndr->depth++;
264 for (cntr_cursors_0=0;cntr_cursors_0<r->count;cntr_cursors_0++) {
265 char *idx_0=NULL;
266 if (asprintf(&idx_0, "[%d]", cntr_cursors_0) != -1) {
267 ndr_print_drsuapi_DsReplicaCursor(ndr, "cursors", &r->cursors[cntr_cursors_0]);
268 free(idx_0);
271 ndr->depth--;
272 ndr->depth--;
275 static enum ndr_err_code ndr_push_replUpToDateVectorCtr2(struct ndr_push *ndr, int ndr_flags, const struct replUpToDateVectorCtr2 *r)
277 uint32_t cntr_cursors_0;
278 if (ndr_flags & NDR_SCALARS) {
279 NDR_CHECK(ndr_push_align(ndr, 8));
280 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
282 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
283 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
286 if (ndr_flags & NDR_BUFFERS) {
288 return NDR_ERR_SUCCESS;
291 static enum ndr_err_code ndr_pull_replUpToDateVectorCtr2(struct ndr_pull *ndr, int ndr_flags, struct replUpToDateVectorCtr2 *r)
293 uint32_t cntr_cursors_0;
294 TALLOC_CTX *_mem_save_cursors_0;
295 if (ndr_flags & NDR_SCALARS) {
296 NDR_CHECK(ndr_pull_align(ndr, 8));
297 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
298 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
299 NDR_PULL_ALLOC_N(ndr, r->cursors, r->count);
300 _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
301 NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
302 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
303 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
305 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
307 if (ndr_flags & NDR_BUFFERS) {
309 return NDR_ERR_SUCCESS;
312 _PUBLIC_ void ndr_print_replUpToDateVectorCtr2(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorCtr2 *r)
314 uint32_t cntr_cursors_0;
315 ndr_print_struct(ndr, name, "replUpToDateVectorCtr2");
316 ndr->depth++;
317 ndr_print_uint32(ndr, "count", r->count);
318 ndr_print_uint32(ndr, "reserved", r->reserved);
319 ndr->print(ndr, "%s: ARRAY(%d)", "cursors", (int)r->count);
320 ndr->depth++;
321 for (cntr_cursors_0=0;cntr_cursors_0<r->count;cntr_cursors_0++) {
322 char *idx_0=NULL;
323 if (asprintf(&idx_0, "[%d]", cntr_cursors_0) != -1) {
324 ndr_print_drsuapi_DsReplicaCursor2(ndr, "cursors", &r->cursors[cntr_cursors_0]);
325 free(idx_0);
328 ndr->depth--;
329 ndr->depth--;
332 static enum ndr_err_code ndr_push_replUpToDateVectorCtr(struct ndr_push *ndr, int ndr_flags, const union replUpToDateVectorCtr *r)
334 if (ndr_flags & NDR_SCALARS) {
335 int level = ndr_push_get_switch_value(ndr, r);
336 switch (level) {
337 case 1: {
338 NDR_CHECK(ndr_push_replUpToDateVectorCtr1(ndr, NDR_SCALARS, &r->ctr1));
339 break; }
341 case 2: {
342 NDR_CHECK(ndr_push_replUpToDateVectorCtr2(ndr, NDR_SCALARS, &r->ctr2));
343 break; }
345 default:
346 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
349 if (ndr_flags & NDR_BUFFERS) {
350 int level = ndr_push_get_switch_value(ndr, r);
351 switch (level) {
352 case 1:
353 break;
355 case 2:
356 break;
358 default:
359 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
362 return NDR_ERR_SUCCESS;
365 static enum ndr_err_code ndr_pull_replUpToDateVectorCtr(struct ndr_pull *ndr, int ndr_flags, union replUpToDateVectorCtr *r)
367 int level;
368 level = ndr_pull_get_switch_value(ndr, r);
369 if (ndr_flags & NDR_SCALARS) {
370 switch (level) {
371 case 1: {
372 NDR_CHECK(ndr_pull_replUpToDateVectorCtr1(ndr, NDR_SCALARS, &r->ctr1));
373 break; }
375 case 2: {
376 NDR_CHECK(ndr_pull_replUpToDateVectorCtr2(ndr, NDR_SCALARS, &r->ctr2));
377 break; }
379 default:
380 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
383 if (ndr_flags & NDR_BUFFERS) {
384 switch (level) {
385 case 1:
386 break;
388 case 2:
389 break;
391 default:
392 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
395 return NDR_ERR_SUCCESS;
398 _PUBLIC_ void ndr_print_replUpToDateVectorCtr(struct ndr_print *ndr, const char *name, const union replUpToDateVectorCtr *r)
400 int level;
401 level = ndr_print_get_switch_value(ndr, r);
402 ndr_print_union(ndr, name, level, "replUpToDateVectorCtr");
403 switch (level) {
404 case 1:
405 ndr_print_replUpToDateVectorCtr1(ndr, "ctr1", &r->ctr1);
406 break;
408 case 2:
409 ndr_print_replUpToDateVectorCtr2(ndr, "ctr2", &r->ctr2);
410 break;
412 default:
413 ndr_print_bad_level(ndr, name, level);
417 _PUBLIC_ enum ndr_err_code ndr_push_replUpToDateVectorBlob(struct ndr_push *ndr, int ndr_flags, const struct replUpToDateVectorBlob *r)
419 if (ndr_flags & NDR_SCALARS) {
420 NDR_CHECK(ndr_push_align(ndr, 8));
421 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
422 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
423 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
424 NDR_CHECK(ndr_push_replUpToDateVectorCtr(ndr, NDR_SCALARS, &r->ctr));
426 if (ndr_flags & NDR_BUFFERS) {
428 return NDR_ERR_SUCCESS;
431 _PUBLIC_ enum ndr_err_code ndr_pull_replUpToDateVectorBlob(struct ndr_pull *ndr, int ndr_flags, struct replUpToDateVectorBlob *r)
433 if (ndr_flags & NDR_SCALARS) {
434 NDR_CHECK(ndr_pull_align(ndr, 8));
435 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
436 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
437 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
438 NDR_CHECK(ndr_pull_replUpToDateVectorCtr(ndr, NDR_SCALARS, &r->ctr));
440 if (ndr_flags & NDR_BUFFERS) {
442 return NDR_ERR_SUCCESS;
445 _PUBLIC_ void ndr_print_replUpToDateVectorBlob(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorBlob *r)
447 ndr_print_struct(ndr, name, "replUpToDateVectorBlob");
448 ndr->depth++;
449 ndr_print_uint32(ndr, "version", r->version);
450 ndr_print_uint32(ndr, "reserved", r->reserved);
451 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
452 ndr_print_replUpToDateVectorCtr(ndr, "ctr", &r->ctr);
453 ndr->depth--;
456 _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo1OtherInfo(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo1OtherInfo *r)
458 if (ndr_flags & NDR_SCALARS) {
459 NDR_CHECK(ndr_push_align(ndr, 4));
460 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen(r->dns_name) + 1));
461 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_name, strlen(r->dns_name) + 1, sizeof(uint8_t), CH_DOS));
463 if (ndr_flags & NDR_BUFFERS) {
465 return NDR_ERR_SUCCESS;
468 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo1OtherInfo(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo1OtherInfo *r)
470 if (ndr_flags & NDR_SCALARS) {
471 NDR_CHECK(ndr_pull_align(ndr, 4));
472 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__dns_name_size));
473 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_name, r->__dns_name_size, sizeof(uint8_t), CH_DOS));
475 if (ndr_flags & NDR_BUFFERS) {
477 return NDR_ERR_SUCCESS;
480 _PUBLIC_ void ndr_print_repsFromTo1OtherInfo(struct ndr_print *ndr, const char *name, const struct repsFromTo1OtherInfo *r)
482 ndr_print_struct(ndr, name, "repsFromTo1OtherInfo");
483 ndr->depth++;
484 ndr_print_uint32(ndr, "__dns_name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->dns_name) + 1:r->__dns_name_size);
485 ndr_print_string(ndr, "dns_name", r->dns_name);
486 ndr->depth--;
489 _PUBLIC_ size_t ndr_size_repsFromTo1OtherInfo(const struct repsFromTo1OtherInfo *r, struct smb_iconv_convenience *ic, int flags)
491 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo1OtherInfo, ic);
494 _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo1(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo1 *r)
497 uint32_t _flags_save_STRUCT = ndr->flags;
498 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
499 if (ndr_flags & NDR_SCALARS) {
500 NDR_CHECK(ndr_push_align(ndr, 8));
501 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo1(r, ndr->iconv_convenience, ndr->flags) + 8));
502 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->consecutive_sync_failures));
503 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_success));
504 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_attempt));
505 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->result_last_attempt));
506 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->other_info));
507 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo1OtherInfo(r->other_info, ndr->iconv_convenience, ndr->flags)));
508 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourFlags(ndr, NDR_SCALARS, r->replica_flags));
509 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
510 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
511 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
512 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
513 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
514 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->transport_guid));
516 if (ndr_flags & NDR_BUFFERS) {
517 if (r->other_info) {
518 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->other_info));
519 NDR_CHECK(ndr_push_repsFromTo1OtherInfo(ndr, NDR_SCALARS, r->other_info));
522 ndr->flags = _flags_save_STRUCT;
524 return NDR_ERR_SUCCESS;
527 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo1(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo1 *r)
529 uint32_t _ptr_other_info;
530 TALLOC_CTX *_mem_save_other_info_0;
532 uint32_t _flags_save_STRUCT = ndr->flags;
533 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
534 if (ndr_flags & NDR_SCALARS) {
535 NDR_CHECK(ndr_pull_align(ndr, 8));
536 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->blobsize));
537 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->consecutive_sync_failures));
538 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->last_success));
539 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->last_attempt));
540 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->result_last_attempt));
541 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_other_info));
542 if (_ptr_other_info) {
543 NDR_PULL_ALLOC(ndr, r->other_info);
544 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->other_info, _ptr_other_info));
545 } else {
546 r->other_info = NULL;
548 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->other_info_length));
549 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourFlags(ndr, NDR_SCALARS, &r->replica_flags));
550 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
551 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
552 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
553 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
554 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
555 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->transport_guid));
557 if (ndr_flags & NDR_BUFFERS) {
558 if (r->other_info) {
559 uint32_t _relative_save_offset;
560 _relative_save_offset = ndr->offset;
561 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->other_info));
562 _mem_save_other_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
563 NDR_PULL_SET_MEM_CTX(ndr, r->other_info, 0);
564 NDR_CHECK(ndr_pull_repsFromTo1OtherInfo(ndr, NDR_SCALARS, r->other_info));
565 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_other_info_0, 0);
566 ndr->offset = _relative_save_offset;
569 ndr->flags = _flags_save_STRUCT;
571 return NDR_ERR_SUCCESS;
574 _PUBLIC_ void ndr_print_repsFromTo1(struct ndr_print *ndr, const char *name, const struct repsFromTo1 *r)
576 ndr_print_struct(ndr, name, "repsFromTo1");
578 uint32_t _flags_save_STRUCT = ndr->flags;
579 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
580 ndr->depth++;
581 ndr_print_uint32(ndr, "blobsize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo1(r, ndr->iconv_convenience, ndr->flags) + 8:r->blobsize);
582 ndr_print_uint32(ndr, "consecutive_sync_failures", r->consecutive_sync_failures);
583 ndr_print_NTTIME_1sec(ndr, "last_success", r->last_success);
584 ndr_print_NTTIME_1sec(ndr, "last_attempt", r->last_attempt);
585 ndr_print_WERROR(ndr, "result_last_attempt", r->result_last_attempt);
586 ndr_print_ptr(ndr, "other_info", r->other_info);
587 ndr->depth++;
588 if (r->other_info) {
589 ndr_print_repsFromTo1OtherInfo(ndr, "other_info", r->other_info);
591 ndr->depth--;
592 ndr_print_uint32(ndr, "other_info_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo1OtherInfo(r->other_info, ndr->iconv_convenience, ndr->flags):r->other_info_length);
593 ndr_print_drsuapi_DsReplicaNeighbourFlags(ndr, "replica_flags", r->replica_flags);
594 ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
595 ndr_print_uint32(ndr, "reserved", r->reserved);
596 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
597 ndr_print_GUID(ndr, "source_dsa_obj_guid", &r->source_dsa_obj_guid);
598 ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
599 ndr_print_GUID(ndr, "transport_guid", &r->transport_guid);
600 ndr->depth--;
601 ndr->flags = _flags_save_STRUCT;
605 _PUBLIC_ size_t ndr_size_repsFromTo1(const struct repsFromTo1 *r, struct smb_iconv_convenience *ic, int flags)
607 flags |= LIBNDR_PRINT_ARRAY_HEX;
608 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo1, ic);
611 static enum ndr_err_code ndr_push_repsFromTo(struct ndr_push *ndr, int ndr_flags, const union repsFromTo *r)
613 if (ndr_flags & NDR_SCALARS) {
614 int level = ndr_push_get_switch_value(ndr, r);
615 switch (level) {
616 case 1: {
617 NDR_CHECK(ndr_push_repsFromTo1(ndr, NDR_SCALARS, &r->ctr1));
618 break; }
620 default:
621 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
624 if (ndr_flags & NDR_BUFFERS) {
625 int level = ndr_push_get_switch_value(ndr, r);
626 switch (level) {
627 case 1:
628 NDR_CHECK(ndr_push_repsFromTo1(ndr, NDR_BUFFERS, &r->ctr1));
629 break;
631 default:
632 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
635 return NDR_ERR_SUCCESS;
638 static enum ndr_err_code ndr_pull_repsFromTo(struct ndr_pull *ndr, int ndr_flags, union repsFromTo *r)
640 int level;
641 level = ndr_pull_get_switch_value(ndr, r);
642 if (ndr_flags & NDR_SCALARS) {
643 switch (level) {
644 case 1: {
645 NDR_CHECK(ndr_pull_repsFromTo1(ndr, NDR_SCALARS, &r->ctr1));
646 break; }
648 default:
649 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
652 if (ndr_flags & NDR_BUFFERS) {
653 switch (level) {
654 case 1:
655 NDR_CHECK(ndr_pull_repsFromTo1(ndr, NDR_BUFFERS, &r->ctr1));
656 break;
658 default:
659 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
662 return NDR_ERR_SUCCESS;
665 _PUBLIC_ void ndr_print_repsFromTo(struct ndr_print *ndr, const char *name, const union repsFromTo *r)
667 int level;
668 level = ndr_print_get_switch_value(ndr, r);
669 ndr_print_union(ndr, name, level, "repsFromTo");
670 switch (level) {
671 case 1:
672 ndr_print_repsFromTo1(ndr, "ctr1", &r->ctr1);
673 break;
675 default:
676 ndr_print_bad_level(ndr, name, level);
680 _PUBLIC_ enum ndr_err_code ndr_push_repsFromToBlob(struct ndr_push *ndr, int ndr_flags, const struct repsFromToBlob *r)
682 if (ndr_flags & NDR_SCALARS) {
683 NDR_CHECK(ndr_push_align(ndr, 8));
684 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
685 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
686 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
687 NDR_CHECK(ndr_push_repsFromTo(ndr, NDR_SCALARS, &r->ctr));
689 if (ndr_flags & NDR_BUFFERS) {
690 NDR_CHECK(ndr_push_repsFromTo(ndr, NDR_BUFFERS, &r->ctr));
692 return NDR_ERR_SUCCESS;
695 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromToBlob(struct ndr_pull *ndr, int ndr_flags, struct repsFromToBlob *r)
697 if (ndr_flags & NDR_SCALARS) {
698 NDR_CHECK(ndr_pull_align(ndr, 8));
699 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
700 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
701 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
702 NDR_CHECK(ndr_pull_repsFromTo(ndr, NDR_SCALARS, &r->ctr));
704 if (ndr_flags & NDR_BUFFERS) {
705 NDR_CHECK(ndr_pull_repsFromTo(ndr, NDR_BUFFERS, &r->ctr));
707 return NDR_ERR_SUCCESS;
710 _PUBLIC_ void ndr_print_repsFromToBlob(struct ndr_print *ndr, const char *name, const struct repsFromToBlob *r)
712 ndr_print_struct(ndr, name, "repsFromToBlob");
713 ndr->depth++;
714 ndr_print_uint32(ndr, "version", r->version);
715 ndr_print_uint32(ndr, "reserved", r->reserved);
716 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
717 ndr_print_repsFromTo(ndr, "ctr", &r->ctr);
718 ndr->depth--;
721 static enum ndr_err_code ndr_push_partialAttributeSetCtr1(struct ndr_push *ndr, int ndr_flags, const struct partialAttributeSetCtr1 *r)
723 uint32_t cntr_array_0;
724 if (ndr_flags & NDR_SCALARS) {
725 NDR_CHECK(ndr_push_align(ndr, 4));
726 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
727 for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) {
728 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->array[cntr_array_0]));
731 if (ndr_flags & NDR_BUFFERS) {
733 return NDR_ERR_SUCCESS;
736 static enum ndr_err_code ndr_pull_partialAttributeSetCtr1(struct ndr_pull *ndr, int ndr_flags, struct partialAttributeSetCtr1 *r)
738 uint32_t cntr_array_0;
739 TALLOC_CTX *_mem_save_array_0;
740 if (ndr_flags & NDR_SCALARS) {
741 NDR_CHECK(ndr_pull_align(ndr, 4));
742 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
743 NDR_PULL_ALLOC_N(ndr, r->array, r->count);
744 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
745 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
746 for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) {
747 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
749 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
751 if (ndr_flags & NDR_BUFFERS) {
753 return NDR_ERR_SUCCESS;
756 _PUBLIC_ void ndr_print_partialAttributeSetCtr1(struct ndr_print *ndr, const char *name, const struct partialAttributeSetCtr1 *r)
758 uint32_t cntr_array_0;
759 ndr_print_struct(ndr, name, "partialAttributeSetCtr1");
760 ndr->depth++;
761 ndr_print_uint32(ndr, "count", r->count);
762 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
763 ndr->depth++;
764 for (cntr_array_0=0;cntr_array_0<r->count;cntr_array_0++) {
765 char *idx_0=NULL;
766 if (asprintf(&idx_0, "[%d]", cntr_array_0) != -1) {
767 ndr_print_drsuapi_DsAttributeId(ndr, "array", r->array[cntr_array_0]);
768 free(idx_0);
771 ndr->depth--;
772 ndr->depth--;
775 static enum ndr_err_code ndr_push_partialAttributeSetCtr(struct ndr_push *ndr, int ndr_flags, const union partialAttributeSetCtr *r)
777 if (ndr_flags & NDR_SCALARS) {
778 int level = ndr_push_get_switch_value(ndr, r);
779 switch (level) {
780 case 1: {
781 NDR_CHECK(ndr_push_partialAttributeSetCtr1(ndr, NDR_SCALARS, &r->ctr1));
782 break; }
784 default:
785 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
788 if (ndr_flags & NDR_BUFFERS) {
789 int level = ndr_push_get_switch_value(ndr, r);
790 switch (level) {
791 case 1:
792 break;
794 default:
795 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
798 return NDR_ERR_SUCCESS;
801 static enum ndr_err_code ndr_pull_partialAttributeSetCtr(struct ndr_pull *ndr, int ndr_flags, union partialAttributeSetCtr *r)
803 int level;
804 level = ndr_pull_get_switch_value(ndr, r);
805 if (ndr_flags & NDR_SCALARS) {
806 switch (level) {
807 case 1: {
808 NDR_CHECK(ndr_pull_partialAttributeSetCtr1(ndr, NDR_SCALARS, &r->ctr1));
809 break; }
811 default:
812 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
815 if (ndr_flags & NDR_BUFFERS) {
816 switch (level) {
817 case 1:
818 break;
820 default:
821 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
824 return NDR_ERR_SUCCESS;
827 _PUBLIC_ void ndr_print_partialAttributeSetCtr(struct ndr_print *ndr, const char *name, const union partialAttributeSetCtr *r)
829 int level;
830 level = ndr_print_get_switch_value(ndr, r);
831 ndr_print_union(ndr, name, level, "partialAttributeSetCtr");
832 switch (level) {
833 case 1:
834 ndr_print_partialAttributeSetCtr1(ndr, "ctr1", &r->ctr1);
835 break;
837 default:
838 ndr_print_bad_level(ndr, name, level);
842 _PUBLIC_ enum ndr_err_code ndr_push_partialAttributeSetBlob(struct ndr_push *ndr, int ndr_flags, const struct partialAttributeSetBlob *r)
844 if (ndr_flags & NDR_SCALARS) {
845 NDR_CHECK(ndr_push_align(ndr, 4));
846 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
847 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
848 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
849 NDR_CHECK(ndr_push_partialAttributeSetCtr(ndr, NDR_SCALARS, &r->ctr));
851 if (ndr_flags & NDR_BUFFERS) {
853 return NDR_ERR_SUCCESS;
856 _PUBLIC_ enum ndr_err_code ndr_pull_partialAttributeSetBlob(struct ndr_pull *ndr, int ndr_flags, struct partialAttributeSetBlob *r)
858 if (ndr_flags & NDR_SCALARS) {
859 NDR_CHECK(ndr_pull_align(ndr, 4));
860 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
861 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
862 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
863 NDR_CHECK(ndr_pull_partialAttributeSetCtr(ndr, NDR_SCALARS, &r->ctr));
865 if (ndr_flags & NDR_BUFFERS) {
867 return NDR_ERR_SUCCESS;
870 _PUBLIC_ void ndr_print_partialAttributeSetBlob(struct ndr_print *ndr, const char *name, const struct partialAttributeSetBlob *r)
872 ndr_print_struct(ndr, name, "partialAttributeSetBlob");
873 ndr->depth++;
874 ndr_print_uint32(ndr, "version", r->version);
875 ndr_print_uint32(ndr, "reserved", r->reserved);
876 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
877 ndr_print_partialAttributeSetCtr(ndr, "ctr", &r->ctr);
878 ndr->depth--;
881 static enum ndr_err_code ndr_push_prefixMapVersion(struct ndr_push *ndr, int ndr_flags, enum prefixMapVersion r)
883 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
884 return NDR_ERR_SUCCESS;
887 static enum ndr_err_code ndr_pull_prefixMapVersion(struct ndr_pull *ndr, int ndr_flags, enum prefixMapVersion *r)
889 uint32_t v;
890 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
891 *r = v;
892 return NDR_ERR_SUCCESS;
895 _PUBLIC_ void ndr_print_prefixMapVersion(struct ndr_print *ndr, const char *name, enum prefixMapVersion r)
897 const char *val = NULL;
899 switch (r) {
900 case PREFIX_MAP_VERSION_DSDB: val = "PREFIX_MAP_VERSION_DSDB"; break;
902 ndr_print_enum(ndr, name, "ENUM", val, r);
905 static enum ndr_err_code ndr_push_prefixMapCtr(struct ndr_push *ndr, int ndr_flags, const union prefixMapCtr *r)
907 if (ndr_flags & NDR_SCALARS) {
908 int level = ndr_push_get_switch_value(ndr, r);
909 switch (level) {
910 case PREFIX_MAP_VERSION_DSDB: {
911 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->dsdb));
912 break; }
914 default:
915 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
918 if (ndr_flags & NDR_BUFFERS) {
919 int level = ndr_push_get_switch_value(ndr, r);
920 switch (level) {
921 case PREFIX_MAP_VERSION_DSDB:
922 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->dsdb));
923 break;
925 default:
926 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
929 return NDR_ERR_SUCCESS;
932 static enum ndr_err_code ndr_pull_prefixMapCtr(struct ndr_pull *ndr, int ndr_flags, union prefixMapCtr *r)
934 int level;
935 level = ndr_pull_get_switch_value(ndr, r);
936 if (ndr_flags & NDR_SCALARS) {
937 switch (level) {
938 case PREFIX_MAP_VERSION_DSDB: {
939 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->dsdb));
940 break; }
942 default:
943 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
946 if (ndr_flags & NDR_BUFFERS) {
947 switch (level) {
948 case PREFIX_MAP_VERSION_DSDB:
949 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->dsdb));
950 break;
952 default:
953 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
956 return NDR_ERR_SUCCESS;
959 _PUBLIC_ void ndr_print_prefixMapCtr(struct ndr_print *ndr, const char *name, const union prefixMapCtr *r)
961 int level;
962 level = ndr_print_get_switch_value(ndr, r);
963 ndr_print_union(ndr, name, level, "prefixMapCtr");
964 switch (level) {
965 case PREFIX_MAP_VERSION_DSDB:
966 ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "dsdb", &r->dsdb);
967 break;
969 default:
970 ndr_print_bad_level(ndr, name, level);
974 _PUBLIC_ enum ndr_err_code ndr_push_prefixMapBlob(struct ndr_push *ndr, int ndr_flags, const struct prefixMapBlob *r)
976 if (ndr_flags & NDR_SCALARS) {
977 NDR_CHECK(ndr_push_align(ndr, 4));
978 NDR_CHECK(ndr_push_prefixMapVersion(ndr, NDR_SCALARS, r->version));
979 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
980 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
981 NDR_CHECK(ndr_push_prefixMapCtr(ndr, NDR_SCALARS, &r->ctr));
983 if (ndr_flags & NDR_BUFFERS) {
984 NDR_CHECK(ndr_push_prefixMapCtr(ndr, NDR_BUFFERS, &r->ctr));
986 return NDR_ERR_SUCCESS;
989 _PUBLIC_ enum ndr_err_code ndr_pull_prefixMapBlob(struct ndr_pull *ndr, int ndr_flags, struct prefixMapBlob *r)
991 if (ndr_flags & NDR_SCALARS) {
992 NDR_CHECK(ndr_pull_align(ndr, 4));
993 NDR_CHECK(ndr_pull_prefixMapVersion(ndr, NDR_SCALARS, &r->version));
994 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
995 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
996 NDR_CHECK(ndr_pull_prefixMapCtr(ndr, NDR_SCALARS, &r->ctr));
998 if (ndr_flags & NDR_BUFFERS) {
999 NDR_CHECK(ndr_pull_prefixMapCtr(ndr, NDR_BUFFERS, &r->ctr));
1001 return NDR_ERR_SUCCESS;
1004 _PUBLIC_ void ndr_print_prefixMapBlob(struct ndr_print *ndr, const char *name, const struct prefixMapBlob *r)
1006 ndr_print_struct(ndr, name, "prefixMapBlob");
1007 ndr->depth++;
1008 ndr_print_prefixMapVersion(ndr, "version", r->version);
1009 ndr_print_uint32(ndr, "reserved", r->reserved);
1010 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
1011 ndr_print_prefixMapCtr(ndr, "ctr", &r->ctr);
1012 ndr->depth--;
1015 static enum ndr_err_code ndr_push_ldapControlDirSyncExtra(struct ndr_push *ndr, int ndr_flags, const union ldapControlDirSyncExtra *r)
1017 if (ndr_flags & NDR_SCALARS) {
1018 int level = ndr_push_get_switch_value(ndr, r);
1019 switch (level) {
1020 case 0: {
1021 break; }
1023 default: {
1024 NDR_CHECK(ndr_push_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->uptodateness_vector));
1025 break; }
1029 if (ndr_flags & NDR_BUFFERS) {
1030 int level = ndr_push_get_switch_value(ndr, r);
1031 switch (level) {
1032 case 0:
1033 break;
1035 default:
1036 break;
1040 return NDR_ERR_SUCCESS;
1043 static enum ndr_err_code ndr_pull_ldapControlDirSyncExtra(struct ndr_pull *ndr, int ndr_flags, union ldapControlDirSyncExtra *r)
1045 int level;
1046 level = ndr_pull_get_switch_value(ndr, r);
1047 if (ndr_flags & NDR_SCALARS) {
1048 switch (level) {
1049 case 0: {
1050 break; }
1052 default: {
1053 NDR_CHECK(ndr_pull_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->uptodateness_vector));
1054 break; }
1058 if (ndr_flags & NDR_BUFFERS) {
1059 switch (level) {
1060 case 0:
1061 break;
1063 default:
1064 break;
1068 return NDR_ERR_SUCCESS;
1071 _PUBLIC_ void ndr_print_ldapControlDirSyncExtra(struct ndr_print *ndr, const char *name, const union ldapControlDirSyncExtra *r)
1073 int level;
1074 level = ndr_print_get_switch_value(ndr, r);
1075 ndr_print_union(ndr, name, level, "ldapControlDirSyncExtra");
1076 switch (level) {
1077 case 0:
1078 break;
1080 default:
1081 ndr_print_replUpToDateVectorBlob(ndr, "uptodateness_vector", &r->uptodateness_vector);
1082 break;
1087 static size_t ndr_size_ldapControlDirSyncExtra(const union ldapControlDirSyncExtra *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
1089 return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_ldapControlDirSyncExtra, ic);
1092 static enum ndr_err_code ndr_push_ldapControlDirSyncBlob(struct ndr_push *ndr, int ndr_flags, const struct ldapControlDirSyncBlob *r)
1094 if (ndr_flags & NDR_SCALARS) {
1095 NDR_CHECK(ndr_push_align(ndr, 8));
1096 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 3));
1097 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time));
1098 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u2));
1099 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u3));
1100 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, ndr->iconv_convenience, 0)));
1101 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
1102 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid1));
1103 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->extra, ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, ndr->iconv_convenience, 0)));
1104 NDR_CHECK(ndr_push_ldapControlDirSyncExtra(ndr, NDR_SCALARS, &r->extra));
1106 if (ndr_flags & NDR_BUFFERS) {
1107 NDR_CHECK(ndr_push_ldapControlDirSyncExtra(ndr, NDR_BUFFERS, &r->extra));
1109 return NDR_ERR_SUCCESS;
1112 static enum ndr_err_code ndr_pull_ldapControlDirSyncBlob(struct ndr_pull *ndr, int ndr_flags, struct ldapControlDirSyncBlob *r)
1114 if (ndr_flags & NDR_SCALARS) {
1115 NDR_CHECK(ndr_pull_align(ndr, 8));
1116 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u1));
1117 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time));
1118 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u2));
1119 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u3));
1120 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->extra_length));
1121 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
1122 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid1));
1123 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->extra, r->extra_length));
1124 NDR_CHECK(ndr_pull_ldapControlDirSyncExtra(ndr, NDR_SCALARS, &r->extra));
1126 if (ndr_flags & NDR_BUFFERS) {
1127 NDR_CHECK(ndr_pull_ldapControlDirSyncExtra(ndr, NDR_BUFFERS, &r->extra));
1129 return NDR_ERR_SUCCESS;
1132 _PUBLIC_ void ndr_print_ldapControlDirSyncBlob(struct ndr_print *ndr, const char *name, const struct ldapControlDirSyncBlob *r)
1134 ndr_print_struct(ndr, name, "ldapControlDirSyncBlob");
1135 ndr->depth++;
1136 ndr_print_uint32(ndr, "u1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?3:r->u1);
1137 ndr_print_NTTIME(ndr, "time", r->time);
1138 ndr_print_uint32(ndr, "u2", r->u2);
1139 ndr_print_uint32(ndr, "u3", r->u3);
1140 ndr_print_uint32(ndr, "extra_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, ndr->iconv_convenience, 0):r->extra_length);
1141 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
1142 ndr_print_GUID(ndr, "guid1", &r->guid1);
1143 ndr_print_set_switch_value(ndr, &r->extra, r->extra_length);
1144 ndr_print_ldapControlDirSyncExtra(ndr, "extra", &r->extra);
1145 ndr->depth--;
1148 _PUBLIC_ enum ndr_err_code ndr_push_ldapControlDirSyncCookie(struct ndr_push *ndr, int ndr_flags, const struct ldapControlDirSyncCookie *r)
1150 uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
1151 if (ndr_flags & NDR_SCALARS) {
1152 NDR_CHECK(ndr_push_align(ndr, 8));
1153 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
1154 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "MSDS", 4, sizeof(uint8_t), CH_DOS));
1156 struct ndr_push *_ndr_blob;
1157 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_blob, 0, -1));
1158 NDR_CHECK(ndr_push_ldapControlDirSyncBlob(_ndr_blob, NDR_SCALARS|NDR_BUFFERS, &r->blob));
1159 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_blob, 0, -1));
1162 if (ndr_flags & NDR_BUFFERS) {
1163 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
1165 ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
1166 return NDR_ERR_SUCCESS;
1169 _PUBLIC_ enum ndr_err_code ndr_pull_ldapControlDirSyncCookie(struct ndr_pull *ndr, int ndr_flags, struct ldapControlDirSyncCookie *r)
1171 uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
1172 if (ndr_flags & NDR_SCALARS) {
1173 NDR_CHECK(ndr_pull_align(ndr, 8));
1174 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
1175 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->msds, 4, sizeof(uint8_t), CH_DOS));
1177 struct ndr_pull *_ndr_blob;
1178 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_blob, 0, -1));
1179 NDR_CHECK(ndr_pull_ldapControlDirSyncBlob(_ndr_blob, NDR_SCALARS|NDR_BUFFERS, &r->blob));
1180 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_blob, 0, -1));
1183 if (ndr_flags & NDR_BUFFERS) {
1184 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
1186 ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
1187 return NDR_ERR_SUCCESS;
1190 _PUBLIC_ void ndr_print_ldapControlDirSyncCookie(struct ndr_print *ndr, const char *name, const struct ldapControlDirSyncCookie *r)
1192 ndr_print_struct(ndr, name, "ldapControlDirSyncCookie");
1193 ndr->depth++;
1194 ndr_print_string(ndr, "msds", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"MSDS":r->msds);
1195 ndr_print_ldapControlDirSyncBlob(ndr, "blob", &r->blob);
1196 ndr->depth--;
1199 static enum ndr_err_code ndr_push_supplementalCredentialsPackage(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsPackage *r)
1201 if (ndr_flags & NDR_SCALARS) {
1202 NDR_CHECK(ndr_push_align(ndr, 2));
1203 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->name)));
1204 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen(r->data)));
1205 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved));
1206 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, 2 * strlen_m(r->name), sizeof(uint8_t), CH_UTF16));
1207 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data, strlen(r->data), sizeof(uint8_t), CH_DOS));
1209 if (ndr_flags & NDR_BUFFERS) {
1211 return NDR_ERR_SUCCESS;
1214 static enum ndr_err_code ndr_pull_supplementalCredentialsPackage(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsPackage *r)
1216 if (ndr_flags & NDR_SCALARS) {
1217 NDR_CHECK(ndr_pull_align(ndr, 2));
1218 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->name_len));
1219 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->data_len));
1220 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
1221 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, r->name_len, sizeof(uint8_t), CH_UTF16));
1222 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data, r->data_len, sizeof(uint8_t), CH_DOS));
1224 if (ndr_flags & NDR_BUFFERS) {
1226 return NDR_ERR_SUCCESS;
1229 _PUBLIC_ void ndr_print_supplementalCredentialsPackage(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsPackage *r)
1231 ndr_print_struct(ndr, name, "supplementalCredentialsPackage");
1232 ndr->depth++;
1233 ndr_print_uint16(ndr, "name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->name):r->name_len);
1234 ndr_print_uint16(ndr, "data_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->data):r->data_len);
1235 ndr_print_uint16(ndr, "reserved", r->reserved);
1236 ndr_print_string(ndr, "name", r->name);
1237 ndr_print_string(ndr, "data", r->data);
1238 ndr->depth--;
1241 static enum ndr_err_code ndr_push_supplementalCredentialsSignature(struct ndr_push *ndr, int ndr_flags, enum supplementalCredentialsSignature r)
1244 uint32_t _flags_save_ENUM = ndr->flags;
1245 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1246 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
1247 ndr->flags = _flags_save_ENUM;
1249 return NDR_ERR_SUCCESS;
1252 static enum ndr_err_code ndr_pull_supplementalCredentialsSignature(struct ndr_pull *ndr, int ndr_flags, enum supplementalCredentialsSignature *r)
1254 uint16_t v;
1256 uint32_t _flags_save_ENUM = ndr->flags;
1257 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1258 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
1259 *r = v;
1260 ndr->flags = _flags_save_ENUM;
1262 return NDR_ERR_SUCCESS;
1265 _PUBLIC_ void ndr_print_supplementalCredentialsSignature(struct ndr_print *ndr, const char *name, enum supplementalCredentialsSignature r)
1267 const char *val = NULL;
1270 uint32_t _flags_save_ENUM = ndr->flags;
1271 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1272 switch (r) {
1273 case SUPPLEMENTAL_CREDENTIALS_SIGNATURE: val = "SUPPLEMENTAL_CREDENTIALS_SIGNATURE"; break;
1275 ndr_print_enum(ndr, name, "ENUM", val, r);
1276 ndr->flags = _flags_save_ENUM;
1280 static enum ndr_err_code ndr_push_supplementalCredentialsSubBlob(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsSubBlob *r)
1282 uint32_t cntr_packages_0;
1283 if (ndr_flags & NDR_SCALARS) {
1284 NDR_CHECK(ndr_push_align(ndr, 2));
1285 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, SUPPLEMENTAL_CREDENTIALS_PREFIX, 0x30, sizeof(uint16_t), CH_UTF16));
1286 NDR_CHECK(ndr_push_supplementalCredentialsSignature(ndr, NDR_SCALARS, SUPPLEMENTAL_CREDENTIALS_SIGNATURE));
1287 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_packages));
1288 for (cntr_packages_0 = 0; cntr_packages_0 < r->num_packages; cntr_packages_0++) {
1289 NDR_CHECK(ndr_push_supplementalCredentialsPackage(ndr, NDR_SCALARS, &r->packages[cntr_packages_0]));
1292 if (ndr_flags & NDR_BUFFERS) {
1294 return NDR_ERR_SUCCESS;
1297 static enum ndr_err_code ndr_pull_supplementalCredentialsSubBlob(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsSubBlob *r)
1299 uint32_t cntr_packages_0;
1300 TALLOC_CTX *_mem_save_packages_0;
1301 if (ndr_flags & NDR_SCALARS) {
1302 NDR_CHECK(ndr_pull_align(ndr, 2));
1303 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->prefix, 0x30, sizeof(uint16_t), CH_UTF16));
1304 NDR_CHECK(ndr_pull_supplementalCredentialsSignature(ndr, NDR_SCALARS, &r->signature));
1305 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_packages));
1306 NDR_PULL_ALLOC_N(ndr, r->packages, r->num_packages);
1307 _mem_save_packages_0 = NDR_PULL_GET_MEM_CTX(ndr);
1308 NDR_PULL_SET_MEM_CTX(ndr, r->packages, 0);
1309 for (cntr_packages_0 = 0; cntr_packages_0 < r->num_packages; cntr_packages_0++) {
1310 NDR_CHECK(ndr_pull_supplementalCredentialsPackage(ndr, NDR_SCALARS, &r->packages[cntr_packages_0]));
1312 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_packages_0, 0);
1314 if (ndr_flags & NDR_BUFFERS) {
1316 return NDR_ERR_SUCCESS;
1319 _PUBLIC_ void ndr_print_supplementalCredentialsSubBlob(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsSubBlob *r)
1321 uint32_t cntr_packages_0;
1322 ndr_print_struct(ndr, name, "supplementalCredentialsSubBlob");
1323 ndr->depth++;
1324 ndr_print_string(ndr, "prefix", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?SUPPLEMENTAL_CREDENTIALS_PREFIX:r->prefix);
1325 ndr_print_supplementalCredentialsSignature(ndr, "signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?SUPPLEMENTAL_CREDENTIALS_SIGNATURE:r->signature);
1326 ndr_print_uint16(ndr, "num_packages", r->num_packages);
1327 ndr->print(ndr, "%s: ARRAY(%d)", "packages", (int)r->num_packages);
1328 ndr->depth++;
1329 for (cntr_packages_0=0;cntr_packages_0<r->num_packages;cntr_packages_0++) {
1330 char *idx_0=NULL;
1331 if (asprintf(&idx_0, "[%d]", cntr_packages_0) != -1) {
1332 ndr_print_supplementalCredentialsPackage(ndr, "packages", &r->packages[cntr_packages_0]);
1333 free(idx_0);
1336 ndr->depth--;
1337 ndr->depth--;
1340 static size_t ndr_size_supplementalCredentialsSubBlob(const struct supplementalCredentialsSubBlob *r, struct smb_iconv_convenience *ic, int flags)
1342 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_supplementalCredentialsSubBlob, ic);
1345 _PUBLIC_ enum ndr_err_code ndr_push_supplementalCredentialsBlob(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsBlob *r)
1347 if (ndr_flags & NDR_SCALARS) {
1348 NDR_CHECK(ndr_push_align(ndr, 4));
1349 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1350 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags)));
1351 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1353 struct ndr_push *_ndr_sub;
1354 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags)));
1355 NDR_CHECK(ndr_push_supplementalCredentialsSubBlob(_ndr_sub, NDR_SCALARS, &r->sub));
1356 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags)));
1358 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0));
1360 if (ndr_flags & NDR_BUFFERS) {
1362 return NDR_ERR_SUCCESS;
1365 _PUBLIC_ enum ndr_err_code ndr_pull_supplementalCredentialsBlob(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsBlob *r)
1367 if (ndr_flags & NDR_SCALARS) {
1368 NDR_CHECK(ndr_pull_align(ndr, 4));
1369 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
1370 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
1371 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
1373 struct ndr_pull *_ndr_sub;
1374 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sub, 0, r->__ndr_size));
1375 NDR_CHECK(ndr_pull_supplementalCredentialsSubBlob(_ndr_sub, NDR_SCALARS, &r->sub));
1376 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sub, 0, r->__ndr_size));
1378 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown3));
1380 if (ndr_flags & NDR_BUFFERS) {
1382 return NDR_ERR_SUCCESS;
1385 _PUBLIC_ void ndr_print_supplementalCredentialsBlob(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsBlob *r)
1387 ndr_print_struct(ndr, name, "supplementalCredentialsBlob");
1388 ndr->depth++;
1389 ndr_print_uint32(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown1);
1390 ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags):r->__ndr_size);
1391 ndr_print_uint32(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown2);
1392 ndr_print_supplementalCredentialsSubBlob(ndr, "sub", &r->sub);
1393 ndr_print_uint8(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown3);
1394 ndr->depth--;
1397 _PUBLIC_ enum ndr_err_code ndr_push_package_PackagesBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PackagesBlob *r)
1399 if (ndr_flags & NDR_SCALARS) {
1400 NDR_CHECK(ndr_push_align(ndr, 4));
1402 uint32_t _flags_save_string_array = ndr->flags;
1403 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1404 NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->names));
1405 ndr->flags = _flags_save_string_array;
1408 if (ndr_flags & NDR_BUFFERS) {
1410 return NDR_ERR_SUCCESS;
1413 _PUBLIC_ enum ndr_err_code ndr_pull_package_PackagesBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PackagesBlob *r)
1415 if (ndr_flags & NDR_SCALARS) {
1416 NDR_CHECK(ndr_pull_align(ndr, 4));
1418 uint32_t _flags_save_string_array = ndr->flags;
1419 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1420 NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->names));
1421 ndr->flags = _flags_save_string_array;
1424 if (ndr_flags & NDR_BUFFERS) {
1426 return NDR_ERR_SUCCESS;
1429 _PUBLIC_ void ndr_print_package_PackagesBlob(struct ndr_print *ndr, const char *name, const struct package_PackagesBlob *r)
1431 ndr_print_struct(ndr, name, "package_PackagesBlob");
1432 ndr->depth++;
1433 ndr_print_string_array(ndr, "names", r->names);
1434 ndr->depth--;
1437 static enum ndr_err_code ndr_push_package_PrimaryKerberosString(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosString *r)
1439 if (ndr_flags & NDR_SCALARS) {
1440 NDR_CHECK(ndr_push_align(ndr, 4));
1441 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
1442 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
1444 uint32_t _flags_save_string = ndr->flags;
1445 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1446 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->string));
1447 ndr->flags = _flags_save_string;
1450 if (ndr_flags & NDR_BUFFERS) {
1452 uint32_t _flags_save_string = ndr->flags;
1453 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1454 if (r->string) {
1455 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->string));
1457 struct ndr_push *_ndr_string;
1458 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_string, 0, 2 * strlen_m(r->string)));
1459 NDR_CHECK(ndr_push_string(_ndr_string, NDR_SCALARS, r->string));
1460 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_string, 0, 2 * strlen_m(r->string)));
1463 ndr->flags = _flags_save_string;
1466 return NDR_ERR_SUCCESS;
1469 static enum ndr_err_code ndr_pull_package_PrimaryKerberosString(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosString *r)
1471 uint32_t _ptr_string;
1472 TALLOC_CTX *_mem_save_string_0;
1473 if (ndr_flags & NDR_SCALARS) {
1474 NDR_CHECK(ndr_pull_align(ndr, 4));
1475 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
1476 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
1478 uint32_t _flags_save_string = ndr->flags;
1479 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1480 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
1481 if (_ptr_string) {
1482 NDR_PULL_ALLOC(ndr, r->string);
1483 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->string, _ptr_string));
1484 } else {
1485 r->string = NULL;
1487 ndr->flags = _flags_save_string;
1490 if (ndr_flags & NDR_BUFFERS) {
1492 uint32_t _flags_save_string = ndr->flags;
1493 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1494 if (r->string) {
1495 uint32_t _relative_save_offset;
1496 _relative_save_offset = ndr->offset;
1497 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->string));
1498 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
1499 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
1501 struct ndr_pull *_ndr_string;
1502 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_string, 0, r->size));
1503 NDR_CHECK(ndr_pull_string(_ndr_string, NDR_SCALARS, &r->string));
1504 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_string, 0, r->size));
1506 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
1507 ndr->offset = _relative_save_offset;
1509 ndr->flags = _flags_save_string;
1512 return NDR_ERR_SUCCESS;
1515 _PUBLIC_ void ndr_print_package_PrimaryKerberosString(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosString *r)
1517 ndr_print_struct(ndr, name, "package_PrimaryKerberosString");
1518 ndr->depth++;
1519 ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length);
1520 ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->size);
1521 ndr_print_ptr(ndr, "string", r->string);
1522 ndr->depth++;
1523 if (r->string) {
1524 ndr_print_string(ndr, "string", r->string);
1526 ndr->depth--;
1527 ndr->depth--;
1530 static enum ndr_err_code ndr_push_package_PrimaryKerberosKey3(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosKey3 *r)
1532 if (ndr_flags & NDR_SCALARS) {
1533 NDR_CHECK(ndr_push_align(ndr, 4));
1534 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
1535 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
1536 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1537 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->keytype));
1538 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (r->value?r->value->length:0)));
1540 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1541 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1542 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value));
1543 ndr->flags = _flags_save_DATA_BLOB;
1546 if (ndr_flags & NDR_BUFFERS) {
1548 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1549 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1550 if (r->value) {
1551 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value));
1553 struct ndr_push *_ndr_value;
1554 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_value, 0, (r->value?r->value->length:0)));
1555 NDR_CHECK(ndr_push_DATA_BLOB(_ndr_value, NDR_SCALARS, *r->value));
1556 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_value, 0, (r->value?r->value->length:0)));
1559 ndr->flags = _flags_save_DATA_BLOB;
1562 return NDR_ERR_SUCCESS;
1565 static enum ndr_err_code ndr_pull_package_PrimaryKerberosKey3(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosKey3 *r)
1567 uint32_t _ptr_value;
1568 TALLOC_CTX *_mem_save_value_0;
1569 if (ndr_flags & NDR_SCALARS) {
1570 NDR_CHECK(ndr_pull_align(ndr, 4));
1571 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved1));
1572 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved2));
1573 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3));
1574 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->keytype));
1575 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_len));
1577 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1578 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1579 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
1580 if (_ptr_value) {
1581 NDR_PULL_ALLOC(ndr, r->value);
1582 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value, _ptr_value));
1583 } else {
1584 r->value = NULL;
1586 ndr->flags = _flags_save_DATA_BLOB;
1589 if (ndr_flags & NDR_BUFFERS) {
1591 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1592 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1593 if (r->value) {
1594 uint32_t _relative_save_offset;
1595 _relative_save_offset = ndr->offset;
1596 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value));
1597 _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
1598 NDR_PULL_SET_MEM_CTX(ndr, r->value, 0);
1600 struct ndr_pull *_ndr_value;
1601 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_value, 0, r->value_len));
1602 NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_value, NDR_SCALARS, r->value));
1603 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_value, 0, r->value_len));
1605 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
1606 ndr->offset = _relative_save_offset;
1608 ndr->flags = _flags_save_DATA_BLOB;
1611 return NDR_ERR_SUCCESS;
1614 _PUBLIC_ void ndr_print_package_PrimaryKerberosKey3(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosKey3 *r)
1616 ndr_print_struct(ndr, name, "package_PrimaryKerberosKey3");
1617 ndr->depth++;
1618 ndr_print_uint16(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
1619 ndr_print_uint16(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2);
1620 ndr_print_uint32(ndr, "reserved3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved3);
1621 ndr_print_uint32(ndr, "keytype", r->keytype);
1622 ndr_print_uint32(ndr, "value_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(r->value?r->value->length:0):r->value_len);
1623 ndr_print_ptr(ndr, "value", r->value);
1624 ndr->depth++;
1625 if (r->value) {
1626 ndr_print_DATA_BLOB(ndr, "value", *r->value);
1628 ndr->depth--;
1629 ndr->depth--;
1632 static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr3(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosCtr3 *r)
1634 uint32_t cntr_keys_0;
1635 uint32_t cntr_old_keys_0;
1636 if (ndr_flags & NDR_SCALARS) {
1637 NDR_CHECK(ndr_push_align(ndr, 4));
1638 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_keys));
1639 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_old_keys));
1640 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
1641 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1642 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
1644 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1645 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
1647 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1648 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1649 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1650 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1651 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1653 if (ndr_flags & NDR_BUFFERS) {
1654 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
1655 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1656 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
1658 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1659 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
1662 return NDR_ERR_SUCCESS;
1665 static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr3(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosCtr3 *r)
1667 uint32_t cntr_keys_0;
1668 TALLOC_CTX *_mem_save_keys_0;
1669 uint32_t cntr_old_keys_0;
1670 TALLOC_CTX *_mem_save_old_keys_0;
1671 if (ndr_flags & NDR_SCALARS) {
1672 NDR_CHECK(ndr_pull_align(ndr, 4));
1673 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_keys));
1674 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_old_keys));
1675 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
1676 NDR_PULL_ALLOC_N(ndr, r->keys, r->num_keys);
1677 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1678 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
1679 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1680 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
1682 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
1683 NDR_PULL_ALLOC_N(ndr, r->old_keys, r->num_old_keys);
1684 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1685 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
1686 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1687 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
1689 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
1690 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding1));
1691 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding2));
1692 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding3));
1693 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding4));
1694 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding5));
1696 if (ndr_flags & NDR_BUFFERS) {
1697 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
1698 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1699 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
1700 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1701 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
1703 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
1704 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1705 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
1706 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1707 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
1709 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
1711 return NDR_ERR_SUCCESS;
1714 _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr3(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosCtr3 *r)
1716 uint32_t cntr_keys_0;
1717 uint32_t cntr_old_keys_0;
1718 ndr_print_struct(ndr, name, "package_PrimaryKerberosCtr3");
1719 ndr->depth++;
1720 ndr_print_uint16(ndr, "num_keys", r->num_keys);
1721 ndr_print_uint16(ndr, "num_old_keys", r->num_old_keys);
1722 ndr_print_package_PrimaryKerberosString(ndr, "salt", &r->salt);
1723 ndr->print(ndr, "%s: ARRAY(%d)", "keys", (int)r->num_keys);
1724 ndr->depth++;
1725 for (cntr_keys_0=0;cntr_keys_0<r->num_keys;cntr_keys_0++) {
1726 char *idx_0=NULL;
1727 if (asprintf(&idx_0, "[%d]", cntr_keys_0) != -1) {
1728 ndr_print_package_PrimaryKerberosKey3(ndr, "keys", &r->keys[cntr_keys_0]);
1729 free(idx_0);
1732 ndr->depth--;
1733 ndr->print(ndr, "%s: ARRAY(%d)", "old_keys", (int)r->num_old_keys);
1734 ndr->depth++;
1735 for (cntr_old_keys_0=0;cntr_old_keys_0<r->num_old_keys;cntr_old_keys_0++) {
1736 char *idx_0=NULL;
1737 if (asprintf(&idx_0, "[%d]", cntr_old_keys_0) != -1) {
1738 ndr_print_package_PrimaryKerberosKey3(ndr, "old_keys", &r->old_keys[cntr_old_keys_0]);
1739 free(idx_0);
1742 ndr->depth--;
1743 ndr_print_uint32(ndr, "padding1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding1);
1744 ndr_print_uint32(ndr, "padding2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding2);
1745 ndr_print_uint32(ndr, "padding3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding3);
1746 ndr_print_uint32(ndr, "padding4", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding4);
1747 ndr_print_uint32(ndr, "padding5", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding5);
1748 ndr->depth--;
1751 static enum ndr_err_code ndr_push_package_PrimaryKerberosKey4(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosKey4 *r)
1753 if (ndr_flags & NDR_SCALARS) {
1754 NDR_CHECK(ndr_push_align(ndr, 4));
1755 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
1756 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
1757 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1758 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->iteration_count));
1759 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->keytype));
1760 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (r->value?r->value->length:0)));
1762 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1763 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1764 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value));
1765 ndr->flags = _flags_save_DATA_BLOB;
1768 if (ndr_flags & NDR_BUFFERS) {
1770 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1771 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1772 if (r->value) {
1773 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value));
1775 struct ndr_push *_ndr_value;
1776 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_value, 0, (r->value?r->value->length:0)));
1777 NDR_CHECK(ndr_push_DATA_BLOB(_ndr_value, NDR_SCALARS, *r->value));
1778 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_value, 0, (r->value?r->value->length:0)));
1781 ndr->flags = _flags_save_DATA_BLOB;
1784 return NDR_ERR_SUCCESS;
1787 static enum ndr_err_code ndr_pull_package_PrimaryKerberosKey4(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosKey4 *r)
1789 uint32_t _ptr_value;
1790 TALLOC_CTX *_mem_save_value_0;
1791 if (ndr_flags & NDR_SCALARS) {
1792 NDR_CHECK(ndr_pull_align(ndr, 4));
1793 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved1));
1794 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved2));
1795 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3));
1796 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->iteration_count));
1797 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->keytype));
1798 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_len));
1800 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1801 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1802 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
1803 if (_ptr_value) {
1804 NDR_PULL_ALLOC(ndr, r->value);
1805 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value, _ptr_value));
1806 } else {
1807 r->value = NULL;
1809 ndr->flags = _flags_save_DATA_BLOB;
1812 if (ndr_flags & NDR_BUFFERS) {
1814 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1815 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1816 if (r->value) {
1817 uint32_t _relative_save_offset;
1818 _relative_save_offset = ndr->offset;
1819 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value));
1820 _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
1821 NDR_PULL_SET_MEM_CTX(ndr, r->value, 0);
1823 struct ndr_pull *_ndr_value;
1824 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_value, 0, r->value_len));
1825 NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_value, NDR_SCALARS, r->value));
1826 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_value, 0, r->value_len));
1828 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
1829 ndr->offset = _relative_save_offset;
1831 ndr->flags = _flags_save_DATA_BLOB;
1834 return NDR_ERR_SUCCESS;
1837 _PUBLIC_ void ndr_print_package_PrimaryKerberosKey4(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosKey4 *r)
1839 ndr_print_struct(ndr, name, "package_PrimaryKerberosKey4");
1840 ndr->depth++;
1841 ndr_print_uint16(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
1842 ndr_print_uint16(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2);
1843 ndr_print_uint32(ndr, "reserved3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved3);
1844 ndr_print_uint32(ndr, "iteration_count", r->iteration_count);
1845 ndr_print_uint32(ndr, "keytype", r->keytype);
1846 ndr_print_uint32(ndr, "value_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(r->value?r->value->length:0):r->value_len);
1847 ndr_print_ptr(ndr, "value", r->value);
1848 ndr->depth++;
1849 if (r->value) {
1850 ndr_print_DATA_BLOB(ndr, "value", *r->value);
1852 ndr->depth--;
1853 ndr->depth--;
1856 static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr4(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosCtr4 *r)
1858 uint32_t cntr_keys_0;
1859 uint32_t cntr_old_keys_0;
1860 uint32_t cntr_older_keys_0;
1861 if (ndr_flags & NDR_SCALARS) {
1862 NDR_CHECK(ndr_push_align(ndr, 4));
1863 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_keys));
1864 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
1865 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_old_keys));
1866 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_older_keys));
1867 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
1868 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->default_iteration_count));
1869 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1870 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
1872 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1873 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
1875 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
1876 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->older_keys[cntr_older_keys_0]));
1879 if (ndr_flags & NDR_BUFFERS) {
1880 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
1881 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1882 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
1884 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1885 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
1887 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
1888 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->older_keys[cntr_older_keys_0]));
1891 return NDR_ERR_SUCCESS;
1894 static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr4(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosCtr4 *r)
1896 uint32_t cntr_keys_0;
1897 TALLOC_CTX *_mem_save_keys_0;
1898 uint32_t cntr_service_keys_0;
1899 TALLOC_CTX *_mem_save_service_keys_0;
1900 uint32_t cntr_old_keys_0;
1901 TALLOC_CTX *_mem_save_old_keys_0;
1902 uint32_t cntr_older_keys_0;
1903 TALLOC_CTX *_mem_save_older_keys_0;
1904 if (ndr_flags & NDR_SCALARS) {
1905 NDR_CHECK(ndr_pull_align(ndr, 4));
1906 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_keys));
1907 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_service_keys));
1908 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_old_keys));
1909 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_older_keys));
1910 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
1911 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->default_iteration_count));
1912 NDR_PULL_ALLOC_N(ndr, r->keys, r->num_keys);
1913 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1914 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
1915 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1916 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
1918 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
1919 NDR_PULL_ALLOC_N(ndr, r->service_keys, r->num_service_keys);
1920 _mem_save_service_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1921 NDR_PULL_SET_MEM_CTX(ndr, r->service_keys, 0);
1922 for (cntr_service_keys_0 = 0; cntr_service_keys_0 < r->num_service_keys; cntr_service_keys_0++) {
1923 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->service_keys[cntr_service_keys_0]));
1925 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_keys_0, 0);
1926 NDR_PULL_ALLOC_N(ndr, r->old_keys, r->num_old_keys);
1927 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1928 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
1929 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1930 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
1932 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
1933 NDR_PULL_ALLOC_N(ndr, r->older_keys, r->num_older_keys);
1934 _mem_save_older_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1935 NDR_PULL_SET_MEM_CTX(ndr, r->older_keys, 0);
1936 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
1937 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->older_keys[cntr_older_keys_0]));
1939 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_older_keys_0, 0);
1941 if (ndr_flags & NDR_BUFFERS) {
1942 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
1943 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1944 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
1945 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1946 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
1948 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
1949 _mem_save_service_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1950 NDR_PULL_SET_MEM_CTX(ndr, r->service_keys, 0);
1951 for (cntr_service_keys_0 = 0; cntr_service_keys_0 < r->num_service_keys; cntr_service_keys_0++) {
1952 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->service_keys[cntr_service_keys_0]));
1954 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_keys_0, 0);
1955 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1956 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
1957 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1958 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
1960 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
1961 _mem_save_older_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1962 NDR_PULL_SET_MEM_CTX(ndr, r->older_keys, 0);
1963 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
1964 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->older_keys[cntr_older_keys_0]));
1966 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_older_keys_0, 0);
1968 return NDR_ERR_SUCCESS;
1971 _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr4(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosCtr4 *r)
1973 uint32_t cntr_keys_0;
1974 uint32_t cntr_service_keys_0;
1975 uint32_t cntr_old_keys_0;
1976 uint32_t cntr_older_keys_0;
1977 ndr_print_struct(ndr, name, "package_PrimaryKerberosCtr4");
1978 ndr->depth++;
1979 ndr_print_uint16(ndr, "num_keys", r->num_keys);
1980 ndr_print_uint16(ndr, "num_service_keys", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->num_service_keys);
1981 ndr_print_uint16(ndr, "num_old_keys", r->num_old_keys);
1982 ndr_print_uint16(ndr, "num_older_keys", r->num_older_keys);
1983 ndr_print_package_PrimaryKerberosString(ndr, "salt", &r->salt);
1984 ndr_print_uint32(ndr, "default_iteration_count", r->default_iteration_count);
1985 ndr->print(ndr, "%s: ARRAY(%d)", "keys", (int)r->num_keys);
1986 ndr->depth++;
1987 for (cntr_keys_0=0;cntr_keys_0<r->num_keys;cntr_keys_0++) {
1988 char *idx_0=NULL;
1989 if (asprintf(&idx_0, "[%d]", cntr_keys_0) != -1) {
1990 ndr_print_package_PrimaryKerberosKey4(ndr, "keys", &r->keys[cntr_keys_0]);
1991 free(idx_0);
1994 ndr->depth--;
1995 ndr->print(ndr, "%s: ARRAY(%d)", "service_keys", (int)r->num_service_keys);
1996 ndr->depth++;
1997 for (cntr_service_keys_0=0;cntr_service_keys_0<r->num_service_keys;cntr_service_keys_0++) {
1998 char *idx_0=NULL;
1999 if (asprintf(&idx_0, "[%d]", cntr_service_keys_0) != -1) {
2000 ndr_print_package_PrimaryKerberosKey4(ndr, "service_keys", &r->service_keys[cntr_service_keys_0]);
2001 free(idx_0);
2004 ndr->depth--;
2005 ndr->print(ndr, "%s: ARRAY(%d)", "old_keys", (int)r->num_old_keys);
2006 ndr->depth++;
2007 for (cntr_old_keys_0=0;cntr_old_keys_0<r->num_old_keys;cntr_old_keys_0++) {
2008 char *idx_0=NULL;
2009 if (asprintf(&idx_0, "[%d]", cntr_old_keys_0) != -1) {
2010 ndr_print_package_PrimaryKerberosKey4(ndr, "old_keys", &r->old_keys[cntr_old_keys_0]);
2011 free(idx_0);
2014 ndr->depth--;
2015 ndr->print(ndr, "%s: ARRAY(%d)", "older_keys", (int)r->num_older_keys);
2016 ndr->depth++;
2017 for (cntr_older_keys_0=0;cntr_older_keys_0<r->num_older_keys;cntr_older_keys_0++) {
2018 char *idx_0=NULL;
2019 if (asprintf(&idx_0, "[%d]", cntr_older_keys_0) != -1) {
2020 ndr_print_package_PrimaryKerberosKey4(ndr, "older_keys", &r->older_keys[cntr_older_keys_0]);
2021 free(idx_0);
2024 ndr->depth--;
2025 ndr->depth--;
2028 static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr(struct ndr_push *ndr, int ndr_flags, const union package_PrimaryKerberosCtr *r)
2030 if (ndr_flags & NDR_SCALARS) {
2031 int level = ndr_push_get_switch_value(ndr, r);
2032 switch (level) {
2033 case 3: {
2034 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr, NDR_SCALARS, &r->ctr3));
2035 break; }
2037 case 4: {
2038 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr4(ndr, NDR_SCALARS, &r->ctr4));
2039 break; }
2041 default:
2042 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2045 if (ndr_flags & NDR_BUFFERS) {
2046 int level = ndr_push_get_switch_value(ndr, r);
2047 switch (level) {
2048 case 3:
2049 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr, NDR_BUFFERS, &r->ctr3));
2050 break;
2052 case 4:
2053 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr4(ndr, NDR_BUFFERS, &r->ctr4));
2054 break;
2056 default:
2057 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2060 return NDR_ERR_SUCCESS;
2063 static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr(struct ndr_pull *ndr, int ndr_flags, union package_PrimaryKerberosCtr *r)
2065 int level;
2066 level = ndr_pull_get_switch_value(ndr, r);
2067 if (ndr_flags & NDR_SCALARS) {
2068 switch (level) {
2069 case 3: {
2070 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr, NDR_SCALARS, &r->ctr3));
2071 break; }
2073 case 4: {
2074 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr4(ndr, NDR_SCALARS, &r->ctr4));
2075 break; }
2077 default:
2078 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2081 if (ndr_flags & NDR_BUFFERS) {
2082 switch (level) {
2083 case 3:
2084 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr, NDR_BUFFERS, &r->ctr3));
2085 break;
2087 case 4:
2088 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr4(ndr, NDR_BUFFERS, &r->ctr4));
2089 break;
2091 default:
2092 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2095 return NDR_ERR_SUCCESS;
2098 _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr(struct ndr_print *ndr, const char *name, const union package_PrimaryKerberosCtr *r)
2100 int level;
2101 level = ndr_print_get_switch_value(ndr, r);
2102 ndr_print_union(ndr, name, level, "package_PrimaryKerberosCtr");
2103 switch (level) {
2104 case 3:
2105 ndr_print_package_PrimaryKerberosCtr3(ndr, "ctr3", &r->ctr3);
2106 break;
2108 case 4:
2109 ndr_print_package_PrimaryKerberosCtr4(ndr, "ctr4", &r->ctr4);
2110 break;
2112 default:
2113 ndr_print_bad_level(ndr, name, level);
2117 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryKerberosBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosBlob *r)
2119 if (ndr_flags & NDR_SCALARS) {
2120 NDR_CHECK(ndr_push_align(ndr, 4));
2121 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->version));
2122 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
2123 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
2124 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr, NDR_SCALARS, &r->ctr));
2126 if (ndr_flags & NDR_BUFFERS) {
2127 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr, NDR_BUFFERS, &r->ctr));
2129 return NDR_ERR_SUCCESS;
2132 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryKerberosBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosBlob *r)
2134 if (ndr_flags & NDR_SCALARS) {
2135 NDR_CHECK(ndr_pull_align(ndr, 4));
2136 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->version));
2137 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags));
2138 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
2139 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr, NDR_SCALARS, &r->ctr));
2141 if (ndr_flags & NDR_BUFFERS) {
2142 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr, NDR_BUFFERS, &r->ctr));
2144 return NDR_ERR_SUCCESS;
2147 _PUBLIC_ void ndr_print_package_PrimaryKerberosBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosBlob *r)
2149 ndr_print_struct(ndr, name, "package_PrimaryKerberosBlob");
2150 ndr->depth++;
2151 ndr_print_uint16(ndr, "version", r->version);
2152 ndr_print_uint16(ndr, "flags", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->flags);
2153 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
2154 ndr_print_package_PrimaryKerberosCtr(ndr, "ctr", &r->ctr);
2155 ndr->depth--;
2158 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryCLEARTEXTBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryCLEARTEXTBlob *r)
2160 if (ndr_flags & NDR_SCALARS) {
2161 NDR_CHECK(ndr_push_align(ndr, 4));
2163 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2164 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2165 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->cleartext));
2166 ndr->flags = _flags_save_DATA_BLOB;
2169 if (ndr_flags & NDR_BUFFERS) {
2171 return NDR_ERR_SUCCESS;
2174 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryCLEARTEXTBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryCLEARTEXTBlob *r)
2176 if (ndr_flags & NDR_SCALARS) {
2177 NDR_CHECK(ndr_pull_align(ndr, 4));
2179 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2180 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2181 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->cleartext));
2182 ndr->flags = _flags_save_DATA_BLOB;
2185 if (ndr_flags & NDR_BUFFERS) {
2187 return NDR_ERR_SUCCESS;
2190 _PUBLIC_ void ndr_print_package_PrimaryCLEARTEXTBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryCLEARTEXTBlob *r)
2192 ndr_print_struct(ndr, name, "package_PrimaryCLEARTEXTBlob");
2193 ndr->depth++;
2194 ndr_print_DATA_BLOB(ndr, "cleartext", r->cleartext);
2195 ndr->depth--;
2198 static enum ndr_err_code ndr_push_package_PrimaryWDigestHash(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestHash *r)
2201 uint32_t _flags_save_STRUCT = ndr->flags;
2202 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2203 if (ndr_flags & NDR_SCALARS) {
2204 NDR_CHECK(ndr_push_align(ndr, 1));
2205 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
2207 if (ndr_flags & NDR_BUFFERS) {
2209 ndr->flags = _flags_save_STRUCT;
2211 return NDR_ERR_SUCCESS;
2214 static enum ndr_err_code ndr_pull_package_PrimaryWDigestHash(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestHash *r)
2217 uint32_t _flags_save_STRUCT = ndr->flags;
2218 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2219 if (ndr_flags & NDR_SCALARS) {
2220 NDR_CHECK(ndr_pull_align(ndr, 1));
2221 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
2223 if (ndr_flags & NDR_BUFFERS) {
2225 ndr->flags = _flags_save_STRUCT;
2227 return NDR_ERR_SUCCESS;
2230 _PUBLIC_ void ndr_print_package_PrimaryWDigestHash(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestHash *r)
2232 ndr_print_struct(ndr, name, "package_PrimaryWDigestHash");
2234 uint32_t _flags_save_STRUCT = ndr->flags;
2235 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2236 ndr->depth++;
2237 ndr_print_array_uint8(ndr, "hash", r->hash, 16);
2238 ndr->depth--;
2239 ndr->flags = _flags_save_STRUCT;
2243 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryWDigestBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestBlob *r)
2245 uint32_t cntr_hashes_0;
2246 if (ndr_flags & NDR_SCALARS) {
2247 NDR_CHECK(ndr_push_align(ndr, 4));
2248 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0x31));
2249 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0x01));
2250 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->num_hashes));
2251 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2252 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, 0));
2253 for (cntr_hashes_0 = 0; cntr_hashes_0 < r->num_hashes; cntr_hashes_0++) {
2254 NDR_CHECK(ndr_push_package_PrimaryWDigestHash(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0]));
2257 if (ndr_flags & NDR_BUFFERS) {
2259 return NDR_ERR_SUCCESS;
2262 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryWDigestBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestBlob *r)
2264 uint32_t cntr_hashes_0;
2265 TALLOC_CTX *_mem_save_hashes_0;
2266 if (ndr_flags & NDR_SCALARS) {
2267 NDR_CHECK(ndr_pull_align(ndr, 4));
2268 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown1));
2269 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown2));
2270 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->num_hashes));
2271 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
2272 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->uuknown4));
2273 NDR_PULL_ALLOC_N(ndr, r->hashes, r->num_hashes);
2274 _mem_save_hashes_0 = NDR_PULL_GET_MEM_CTX(ndr);
2275 NDR_PULL_SET_MEM_CTX(ndr, r->hashes, 0);
2276 for (cntr_hashes_0 = 0; cntr_hashes_0 < r->num_hashes; cntr_hashes_0++) {
2277 NDR_CHECK(ndr_pull_package_PrimaryWDigestHash(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0]));
2279 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hashes_0, 0);
2281 if (ndr_flags & NDR_BUFFERS) {
2283 return NDR_ERR_SUCCESS;
2286 _PUBLIC_ void ndr_print_package_PrimaryWDigestBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestBlob *r)
2288 uint32_t cntr_hashes_0;
2289 ndr_print_struct(ndr, name, "package_PrimaryWDigestBlob");
2290 ndr->depth++;
2291 ndr_print_uint16(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x31:r->unknown1);
2292 ndr_print_uint8(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x01:r->unknown2);
2293 ndr_print_uint8(ndr, "num_hashes", r->num_hashes);
2294 ndr_print_uint32(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown3);
2295 ndr_print_udlong(ndr, "uuknown4", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->uuknown4);
2296 ndr->print(ndr, "%s: ARRAY(%d)", "hashes", (int)r->num_hashes);
2297 ndr->depth++;
2298 for (cntr_hashes_0=0;cntr_hashes_0<r->num_hashes;cntr_hashes_0++) {
2299 char *idx_0=NULL;
2300 if (asprintf(&idx_0, "[%d]", cntr_hashes_0) != -1) {
2301 ndr_print_package_PrimaryWDigestHash(ndr, "hashes", &r->hashes[cntr_hashes_0]);
2302 free(idx_0);
2305 ndr->depth--;
2306 ndr->depth--;
2309 static enum ndr_err_code ndr_push_AuthInfoNone(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoNone *r)
2311 if (ndr_flags & NDR_SCALARS) {
2312 NDR_CHECK(ndr_push_align(ndr, 4));
2313 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2315 if (ndr_flags & NDR_BUFFERS) {
2317 return NDR_ERR_SUCCESS;
2320 static enum ndr_err_code ndr_pull_AuthInfoNone(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoNone *r)
2322 if (ndr_flags & NDR_SCALARS) {
2323 NDR_CHECK(ndr_pull_align(ndr, 4));
2324 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2326 if (ndr_flags & NDR_BUFFERS) {
2328 return NDR_ERR_SUCCESS;
2331 _PUBLIC_ void ndr_print_AuthInfoNone(struct ndr_print *ndr, const char *name, const struct AuthInfoNone *r)
2333 ndr_print_struct(ndr, name, "AuthInfoNone");
2334 ndr->depth++;
2335 ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->size);
2336 ndr->depth--;
2339 static enum ndr_err_code ndr_push_AuthInfoNT4Owf(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoNT4Owf *r)
2341 if (ndr_flags & NDR_SCALARS) {
2342 NDR_CHECK(ndr_push_align(ndr, 4));
2343 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 16));
2344 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->password));
2346 if (ndr_flags & NDR_BUFFERS) {
2348 return NDR_ERR_SUCCESS;
2351 static enum ndr_err_code ndr_pull_AuthInfoNT4Owf(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoNT4Owf *r)
2353 if (ndr_flags & NDR_SCALARS) {
2354 NDR_CHECK(ndr_pull_align(ndr, 4));
2355 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2356 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->password));
2358 if (ndr_flags & NDR_BUFFERS) {
2360 return NDR_ERR_SUCCESS;
2363 _PUBLIC_ void ndr_print_AuthInfoNT4Owf(struct ndr_print *ndr, const char *name, const struct AuthInfoNT4Owf *r)
2365 ndr_print_struct(ndr, name, "AuthInfoNT4Owf");
2366 ndr->depth++;
2367 ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?16:r->size);
2368 ndr_print_samr_Password(ndr, "password", &r->password);
2369 ndr->depth--;
2372 static enum ndr_err_code ndr_push_AuthInfoClear(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoClear *r)
2374 if (ndr_flags & NDR_SCALARS) {
2375 NDR_CHECK(ndr_push_align(ndr, 4));
2376 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
2377 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->password, r->size));
2379 if (ndr_flags & NDR_BUFFERS) {
2381 return NDR_ERR_SUCCESS;
2384 static enum ndr_err_code ndr_pull_AuthInfoClear(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoClear *r)
2386 if (ndr_flags & NDR_SCALARS) {
2387 NDR_CHECK(ndr_pull_align(ndr, 4));
2388 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2389 NDR_PULL_ALLOC_N(ndr, r->password, r->size);
2390 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->password, r->size));
2392 if (ndr_flags & NDR_BUFFERS) {
2394 return NDR_ERR_SUCCESS;
2397 _PUBLIC_ void ndr_print_AuthInfoClear(struct ndr_print *ndr, const char *name, const struct AuthInfoClear *r)
2399 ndr_print_struct(ndr, name, "AuthInfoClear");
2400 ndr->depth++;
2401 ndr_print_uint32(ndr, "size", r->size);
2402 ndr_print_array_uint8(ndr, "password", r->password, r->size);
2403 ndr->depth--;
2406 static enum ndr_err_code ndr_push_AuthInfoVersion(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoVersion *r)
2408 if (ndr_flags & NDR_SCALARS) {
2409 NDR_CHECK(ndr_push_align(ndr, 4));
2410 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 4));
2411 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
2413 if (ndr_flags & NDR_BUFFERS) {
2415 return NDR_ERR_SUCCESS;
2418 static enum ndr_err_code ndr_pull_AuthInfoVersion(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoVersion *r)
2420 if (ndr_flags & NDR_SCALARS) {
2421 NDR_CHECK(ndr_pull_align(ndr, 4));
2422 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2423 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
2425 if (ndr_flags & NDR_BUFFERS) {
2427 return NDR_ERR_SUCCESS;
2430 _PUBLIC_ void ndr_print_AuthInfoVersion(struct ndr_print *ndr, const char *name, const struct AuthInfoVersion *r)
2432 ndr_print_struct(ndr, name, "AuthInfoVersion");
2433 ndr->depth++;
2434 ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?4:r->size);
2435 ndr_print_uint32(ndr, "version", r->version);
2436 ndr->depth--;
2439 static enum ndr_err_code ndr_push_AuthInfo(struct ndr_push *ndr, int ndr_flags, const union AuthInfo *r)
2441 if (ndr_flags & NDR_SCALARS) {
2442 int level = ndr_push_get_switch_value(ndr, r);
2443 switch (level) {
2444 case TRUST_AUTH_TYPE_NONE: {
2445 NDR_CHECK(ndr_push_AuthInfoNone(ndr, NDR_SCALARS, &r->none));
2446 break; }
2448 case TRUST_AUTH_TYPE_NT4OWF: {
2449 NDR_CHECK(ndr_push_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf));
2450 break; }
2452 case TRUST_AUTH_TYPE_CLEAR: {
2453 NDR_CHECK(ndr_push_AuthInfoClear(ndr, NDR_SCALARS, &r->clear));
2454 break; }
2456 case TRUST_AUTH_TYPE_VERSION: {
2457 NDR_CHECK(ndr_push_AuthInfoVersion(ndr, NDR_SCALARS, &r->version));
2458 break; }
2460 default:
2461 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2464 if (ndr_flags & NDR_BUFFERS) {
2465 int level = ndr_push_get_switch_value(ndr, r);
2466 switch (level) {
2467 case TRUST_AUTH_TYPE_NONE:
2468 break;
2470 case TRUST_AUTH_TYPE_NT4OWF:
2471 break;
2473 case TRUST_AUTH_TYPE_CLEAR:
2474 break;
2476 case TRUST_AUTH_TYPE_VERSION:
2477 break;
2479 default:
2480 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2483 return NDR_ERR_SUCCESS;
2486 static enum ndr_err_code ndr_pull_AuthInfo(struct ndr_pull *ndr, int ndr_flags, union AuthInfo *r)
2488 int level;
2489 level = ndr_pull_get_switch_value(ndr, r);
2490 if (ndr_flags & NDR_SCALARS) {
2491 switch (level) {
2492 case TRUST_AUTH_TYPE_NONE: {
2493 NDR_CHECK(ndr_pull_AuthInfoNone(ndr, NDR_SCALARS, &r->none));
2494 break; }
2496 case TRUST_AUTH_TYPE_NT4OWF: {
2497 NDR_CHECK(ndr_pull_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf));
2498 break; }
2500 case TRUST_AUTH_TYPE_CLEAR: {
2501 NDR_CHECK(ndr_pull_AuthInfoClear(ndr, NDR_SCALARS, &r->clear));
2502 break; }
2504 case TRUST_AUTH_TYPE_VERSION: {
2505 NDR_CHECK(ndr_pull_AuthInfoVersion(ndr, NDR_SCALARS, &r->version));
2506 break; }
2508 default:
2509 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2512 if (ndr_flags & NDR_BUFFERS) {
2513 switch (level) {
2514 case TRUST_AUTH_TYPE_NONE:
2515 break;
2517 case TRUST_AUTH_TYPE_NT4OWF:
2518 break;
2520 case TRUST_AUTH_TYPE_CLEAR:
2521 break;
2523 case TRUST_AUTH_TYPE_VERSION:
2524 break;
2526 default:
2527 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2530 return NDR_ERR_SUCCESS;
2533 _PUBLIC_ void ndr_print_AuthInfo(struct ndr_print *ndr, const char *name, const union AuthInfo *r)
2535 int level;
2536 level = ndr_print_get_switch_value(ndr, r);
2537 ndr_print_union(ndr, name, level, "AuthInfo");
2538 switch (level) {
2539 case TRUST_AUTH_TYPE_NONE:
2540 ndr_print_AuthInfoNone(ndr, "none", &r->none);
2541 break;
2543 case TRUST_AUTH_TYPE_NT4OWF:
2544 ndr_print_AuthInfoNT4Owf(ndr, "nt4owf", &r->nt4owf);
2545 break;
2547 case TRUST_AUTH_TYPE_CLEAR:
2548 ndr_print_AuthInfoClear(ndr, "clear", &r->clear);
2549 break;
2551 case TRUST_AUTH_TYPE_VERSION:
2552 ndr_print_AuthInfoVersion(ndr, "version", &r->version);
2553 break;
2555 default:
2556 ndr_print_bad_level(ndr, name, level);
2560 _PUBLIC_ enum ndr_err_code ndr_push_AuthenticationInformation(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformation *r)
2562 if (ndr_flags & NDR_SCALARS) {
2563 NDR_CHECK(ndr_push_align(ndr, 4));
2564 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->LastUpdateTime));
2565 NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr, NDR_SCALARS, r->AuthType));
2566 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->AuthInfo, r->AuthType));
2567 NDR_CHECK(ndr_push_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo));
2569 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2570 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2571 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
2572 ndr->flags = _flags_save_DATA_BLOB;
2575 if (ndr_flags & NDR_BUFFERS) {
2577 return NDR_ERR_SUCCESS;
2580 _PUBLIC_ enum ndr_err_code ndr_pull_AuthenticationInformation(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformation *r)
2582 if (ndr_flags & NDR_SCALARS) {
2583 NDR_CHECK(ndr_pull_align(ndr, 4));
2584 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->LastUpdateTime));
2585 NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr, NDR_SCALARS, &r->AuthType));
2586 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->AuthInfo, r->AuthType));
2587 NDR_CHECK(ndr_pull_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo));
2589 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2590 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2591 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
2592 ndr->flags = _flags_save_DATA_BLOB;
2595 if (ndr_flags & NDR_BUFFERS) {
2597 return NDR_ERR_SUCCESS;
2600 _PUBLIC_ void ndr_print_AuthenticationInformation(struct ndr_print *ndr, const char *name, const struct AuthenticationInformation *r)
2602 ndr_print_struct(ndr, name, "AuthenticationInformation");
2603 ndr->depth++;
2604 ndr_print_NTTIME(ndr, "LastUpdateTime", r->LastUpdateTime);
2605 ndr_print_lsa_TrustAuthType(ndr, "AuthType", r->AuthType);
2606 ndr_print_set_switch_value(ndr, &r->AuthInfo, r->AuthType);
2607 ndr_print_AuthInfo(ndr, "AuthInfo", &r->AuthInfo);
2608 ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
2609 ndr->depth--;
2612 _PUBLIC_ size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, struct smb_iconv_convenience *ic, int flags)
2614 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustAuthInOutBlob, ic);
2617 _PUBLIC_ enum ndr_err_code ndr_push_trustCurrentPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustCurrentPasswords *r)
2619 uint32_t cntr_current_0;
2620 if (ndr_flags & NDR_SCALARS) {
2621 NDR_CHECK(ndr_push_align(ndr, 4));
2622 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2623 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
2624 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->current[cntr_current_0]));
2627 if (ndr_flags & NDR_BUFFERS) {
2628 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
2629 if (r->current[cntr_current_0]) {
2630 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->current[cntr_current_0]));
2631 NDR_CHECK(ndr_push_AuthenticationInformation(ndr, NDR_SCALARS, r->current[cntr_current_0]));
2635 return NDR_ERR_SUCCESS;
2638 _PUBLIC_ enum ndr_err_code ndr_pull_trustCurrentPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustCurrentPasswords *r)
2640 uint32_t _ptr_current;
2641 uint32_t cntr_current_0;
2642 TALLOC_CTX *_mem_save_current_0;
2643 TALLOC_CTX *_mem_save_current_1;
2644 if (ndr_flags & NDR_SCALARS) {
2645 NDR_CHECK(ndr_pull_align(ndr, 4));
2646 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2647 NDR_PULL_ALLOC_N(ndr, r->current, r->count);
2648 _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
2649 NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
2650 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
2651 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_current));
2652 if (_ptr_current) {
2653 NDR_PULL_ALLOC(ndr, r->current[cntr_current_0]);
2654 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->current[cntr_current_0], _ptr_current));
2655 } else {
2656 r->current[cntr_current_0] = NULL;
2659 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
2661 if (ndr_flags & NDR_BUFFERS) {
2662 _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
2663 NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
2664 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
2665 if (r->current[cntr_current_0]) {
2666 uint32_t _relative_save_offset;
2667 _relative_save_offset = ndr->offset;
2668 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->current[cntr_current_0]));
2669 _mem_save_current_1 = NDR_PULL_GET_MEM_CTX(ndr);
2670 NDR_PULL_SET_MEM_CTX(ndr, r->current[cntr_current_0], 0);
2671 NDR_CHECK(ndr_pull_AuthenticationInformation(ndr, NDR_SCALARS, r->current[cntr_current_0]));
2672 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_1, 0);
2673 ndr->offset = _relative_save_offset;
2676 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
2678 return NDR_ERR_SUCCESS;
2681 _PUBLIC_ void ndr_print_trustCurrentPasswords(struct ndr_print *ndr, const char *name, const struct trustCurrentPasswords *r)
2683 uint32_t cntr_current_0;
2684 ndr_print_struct(ndr, name, "trustCurrentPasswords");
2685 ndr->depth++;
2686 ndr_print_uint32(ndr, "count", r->count);
2687 ndr->print(ndr, "%s: ARRAY(%d)", "current", (int)r->count);
2688 ndr->depth++;
2689 for (cntr_current_0=0;cntr_current_0<r->count;cntr_current_0++) {
2690 char *idx_0=NULL;
2691 if (asprintf(&idx_0, "[%d]", cntr_current_0) != -1) {
2692 ndr_print_ptr(ndr, "current", r->current[cntr_current_0]);
2693 ndr->depth++;
2694 if (r->current[cntr_current_0]) {
2695 ndr_print_AuthenticationInformation(ndr, "current", r->current[cntr_current_0]);
2697 ndr->depth--;
2698 free(idx_0);
2701 ndr->depth--;
2702 ndr->depth--;
2705 _PUBLIC_ size_t ndr_size_trustCurrentPasswords(const struct trustCurrentPasswords *r, struct smb_iconv_convenience *ic, int flags)
2707 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustCurrentPasswords, ic);
2710 _PUBLIC_ enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustDomainPasswords *r)
2712 if (ndr_flags & NDR_SCALARS) {
2713 NDR_CHECK(ndr_push_align(ndr, 4));
2714 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->confounder, 512));
2716 struct ndr_push *_ndr_outgoing;
2717 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags)));
2718 NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_outgoing, NDR_SCALARS|NDR_BUFFERS, &r->outgoing));
2719 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags)));
2722 struct ndr_push *_ndr_incoming;
2723 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags)));
2724 NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_incoming, NDR_SCALARS|NDR_BUFFERS, &r->incoming));
2725 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags)));
2727 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags)));
2728 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags)));
2730 if (ndr_flags & NDR_BUFFERS) {
2732 return NDR_ERR_SUCCESS;
2735 _PUBLIC_ void ndr_print_trustDomainPasswords(struct ndr_print *ndr, const char *name, const struct trustDomainPasswords *r)
2737 ndr_print_struct(ndr, name, "trustDomainPasswords");
2738 ndr->depth++;
2739 ndr_print_array_uint8(ndr, "confounder", r->confounder, 512);
2740 ndr_print_trustCurrentPasswords(ndr, "outgoing", &r->outgoing);
2741 ndr_print_trustCurrentPasswords(ndr, "incoming", &r->incoming);
2742 ndr_print_uint32(ndr, "outgoing_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags):r->outgoing_size);
2743 ndr_print_uint32(ndr, "incoming_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags):r->incoming_size);
2744 ndr->depth--;
2747 _PUBLIC_ enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r)
2749 if (ndr_flags & NDR_SCALARS) {
2750 NDR_CHECK(ndr_push_align(ndr, 4));
2751 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->marker));
2752 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
2754 if (ndr_flags & NDR_BUFFERS) {
2756 return NDR_ERR_SUCCESS;
2759 _PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r)
2761 if (ndr_flags & NDR_SCALARS) {
2762 NDR_CHECK(ndr_pull_align(ndr, 4));
2763 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->marker));
2764 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
2766 if (ndr_flags & NDR_BUFFERS) {
2768 return NDR_ERR_SUCCESS;
2771 _PUBLIC_ void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r)
2773 ndr_print_struct(ndr, name, "DsCompressedChunk");
2774 ndr->depth++;
2775 ndr_print_uint32(ndr, "marker", r->marker);
2776 ndr_print_DATA_BLOB(ndr, "data", r->data);
2777 ndr->depth--;
2780 static enum ndr_err_code ndr_push_ExtendedErrorAString(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorAString *r)
2782 if (ndr_flags & NDR_SCALARS) {
2783 NDR_CHECK(ndr_push_align(ndr, 4));
2784 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size));
2785 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
2787 if (ndr_flags & NDR_BUFFERS) {
2788 if (r->string) {
2789 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->__size));
2790 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint8_t), CH_DOS));
2793 return NDR_ERR_SUCCESS;
2796 static enum ndr_err_code ndr_pull_ExtendedErrorAString(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorAString *r)
2798 uint32_t _ptr_string;
2799 TALLOC_CTX *_mem_save_string_0;
2800 if (ndr_flags & NDR_SCALARS) {
2801 NDR_CHECK(ndr_pull_align(ndr, 4));
2802 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__size));
2803 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
2804 if (_ptr_string) {
2805 NDR_PULL_ALLOC(ndr, r->string);
2806 } else {
2807 r->string = NULL;
2810 if (ndr_flags & NDR_BUFFERS) {
2811 if (r->string) {
2812 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
2813 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
2814 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
2815 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(ndr, &r->string), sizeof(uint8_t), CH_DOS));
2816 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
2818 if (r->string) {
2819 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->__size));
2822 return NDR_ERR_SUCCESS;
2825 _PUBLIC_ void ndr_print_ExtendedErrorAString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorAString *r)
2827 ndr_print_struct(ndr, name, "ExtendedErrorAString");
2828 ndr->depth++;
2829 ndr_print_uint16(ndr, "__size", r->__size);
2830 ndr_print_ptr(ndr, "string", r->string);
2831 ndr->depth++;
2832 if (r->string) {
2833 ndr_print_string(ndr, "string", r->string);
2835 ndr->depth--;
2836 ndr->depth--;
2839 static enum ndr_err_code ndr_push_ExtendedErrorUString(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorUString *r)
2841 if (ndr_flags & NDR_SCALARS) {
2842 NDR_CHECK(ndr_push_align(ndr, 4));
2843 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size));
2844 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
2846 if (ndr_flags & NDR_BUFFERS) {
2847 if (r->string) {
2848 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->__size));
2849 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint16_t), CH_UTF16));
2852 return NDR_ERR_SUCCESS;
2855 static enum ndr_err_code ndr_pull_ExtendedErrorUString(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorUString *r)
2857 uint32_t _ptr_string;
2858 TALLOC_CTX *_mem_save_string_0;
2859 if (ndr_flags & NDR_SCALARS) {
2860 NDR_CHECK(ndr_pull_align(ndr, 4));
2861 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__size));
2862 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
2863 if (_ptr_string) {
2864 NDR_PULL_ALLOC(ndr, r->string);
2865 } else {
2866 r->string = NULL;
2869 if (ndr_flags & NDR_BUFFERS) {
2870 if (r->string) {
2871 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
2872 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
2873 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
2874 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(ndr, &r->string), sizeof(uint16_t), CH_UTF16));
2875 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
2877 if (r->string) {
2878 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->__size));
2881 return NDR_ERR_SUCCESS;
2884 _PUBLIC_ void ndr_print_ExtendedErrorUString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorUString *r)
2886 ndr_print_struct(ndr, name, "ExtendedErrorUString");
2887 ndr->depth++;
2888 ndr_print_uint16(ndr, "__size", r->__size);
2889 ndr_print_ptr(ndr, "string", r->string);
2890 ndr->depth++;
2891 if (r->string) {
2892 ndr_print_string(ndr, "string", r->string);
2894 ndr->depth--;
2895 ndr->depth--;
2898 static enum ndr_err_code ndr_push_ExtendedErrorBlob(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorBlob *r)
2900 if (ndr_flags & NDR_SCALARS) {
2901 NDR_CHECK(ndr_push_align(ndr, 4));
2902 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
2903 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
2905 if (ndr_flags & NDR_BUFFERS) {
2906 if (r->data) {
2907 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
2908 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
2911 return NDR_ERR_SUCCESS;
2914 static enum ndr_err_code ndr_pull_ExtendedErrorBlob(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorBlob *r)
2916 uint32_t _ptr_data;
2917 TALLOC_CTX *_mem_save_data_0;
2918 if (ndr_flags & NDR_SCALARS) {
2919 NDR_CHECK(ndr_pull_align(ndr, 4));
2920 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
2921 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
2922 if (_ptr_data) {
2923 NDR_PULL_ALLOC(ndr, r->data);
2924 } else {
2925 r->data = NULL;
2928 if (ndr_flags & NDR_BUFFERS) {
2929 if (r->data) {
2930 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2931 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
2932 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
2933 NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
2934 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
2935 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
2937 if (r->data) {
2938 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length));
2941 return NDR_ERR_SUCCESS;
2944 _PUBLIC_ void ndr_print_ExtendedErrorBlob(struct ndr_print *ndr, const char *name, const struct ExtendedErrorBlob *r)
2946 ndr_print_struct(ndr, name, "ExtendedErrorBlob");
2947 ndr->depth++;
2948 ndr_print_uint16(ndr, "length", r->length);
2949 ndr_print_ptr(ndr, "data", r->data);
2950 ndr->depth++;
2951 if (r->data) {
2952 ndr_print_array_uint8(ndr, "data", r->data, r->length);
2954 ndr->depth--;
2955 ndr->depth--;
2958 static enum ndr_err_code ndr_push_ExtendedErrorComputerNamePresent(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent r)
2960 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
2961 return NDR_ERR_SUCCESS;
2964 static enum ndr_err_code ndr_pull_ExtendedErrorComputerNamePresent(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent *r)
2966 uint16_t v;
2967 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
2968 *r = v;
2969 return NDR_ERR_SUCCESS;
2972 _PUBLIC_ void ndr_print_ExtendedErrorComputerNamePresent(struct ndr_print *ndr, const char *name, enum ExtendedErrorComputerNamePresent r)
2974 const char *val = NULL;
2976 switch (r) {
2977 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_PRESENT"; break;
2978 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT"; break;
2980 ndr_print_enum(ndr, name, "ENUM", val, r);
2983 static enum ndr_err_code ndr_push_ExtendedErrorComputerNameU(struct ndr_push *ndr, int ndr_flags, const union ExtendedErrorComputerNameU *r)
2985 if (ndr_flags & NDR_SCALARS) {
2986 int level = ndr_push_get_switch_value(ndr, r);
2987 NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, level));
2988 switch (level) {
2989 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: {
2990 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name));
2991 break; }
2993 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: {
2994 break; }
2996 default:
2997 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3000 if (ndr_flags & NDR_BUFFERS) {
3001 int level = ndr_push_get_switch_value(ndr, r);
3002 switch (level) {
3003 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
3004 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name));
3005 break;
3007 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
3008 break;
3010 default:
3011 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3014 return NDR_ERR_SUCCESS;
3017 static enum ndr_err_code ndr_pull_ExtendedErrorComputerNameU(struct ndr_pull *ndr, int ndr_flags, union ExtendedErrorComputerNameU *r)
3019 int level;
3020 uint16_t _level;
3021 level = ndr_pull_get_switch_value(ndr, r);
3022 if (ndr_flags & NDR_SCALARS) {
3023 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
3024 if (_level != level) {
3025 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
3027 switch (level) {
3028 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: {
3029 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name));
3030 break; }
3032 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: {
3033 break; }
3035 default:
3036 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3039 if (ndr_flags & NDR_BUFFERS) {
3040 switch (level) {
3041 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
3042 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name));
3043 break;
3045 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
3046 break;
3048 default:
3049 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3052 return NDR_ERR_SUCCESS;
3055 _PUBLIC_ void ndr_print_ExtendedErrorComputerNameU(struct ndr_print *ndr, const char *name, const union ExtendedErrorComputerNameU *r)
3057 int level;
3058 level = ndr_print_get_switch_value(ndr, r);
3059 ndr_print_union(ndr, name, level, "ExtendedErrorComputerNameU");
3060 switch (level) {
3061 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
3062 ndr_print_ExtendedErrorUString(ndr, "name", &r->name);
3063 break;
3065 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
3066 break;
3068 default:
3069 ndr_print_bad_level(ndr, name, level);
3073 static enum ndr_err_code ndr_push_ExtendedErrorComputerName(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorComputerName *r)
3075 if (ndr_flags & NDR_SCALARS) {
3076 NDR_CHECK(ndr_push_align(ndr, 4));
3077 NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, r->present));
3078 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->n, r->present));
3079 NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n));
3081 if (ndr_flags & NDR_BUFFERS) {
3082 NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n));
3084 return NDR_ERR_SUCCESS;
3087 static enum ndr_err_code ndr_pull_ExtendedErrorComputerName(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorComputerName *r)
3089 if (ndr_flags & NDR_SCALARS) {
3090 NDR_CHECK(ndr_pull_align(ndr, 4));
3091 NDR_CHECK(ndr_pull_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, &r->present));
3092 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->n, r->present));
3093 NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n));
3095 if (ndr_flags & NDR_BUFFERS) {
3096 NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n));
3098 return NDR_ERR_SUCCESS;
3101 _PUBLIC_ void ndr_print_ExtendedErrorComputerName(struct ndr_print *ndr, const char *name, const struct ExtendedErrorComputerName *r)
3103 ndr_print_struct(ndr, name, "ExtendedErrorComputerName");
3104 ndr->depth++;
3105 ndr_print_ExtendedErrorComputerNamePresent(ndr, "present", r->present);
3106 ndr_print_set_switch_value(ndr, &r->n, r->present);
3107 ndr_print_ExtendedErrorComputerNameU(ndr, "n", &r->n);
3108 ndr->depth--;
3111 static enum ndr_err_code ndr_push_ExtendedErrorParamType(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorParamType r)
3113 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
3114 return NDR_ERR_SUCCESS;
3117 static enum ndr_err_code ndr_pull_ExtendedErrorParamType(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorParamType *r)
3119 uint16_t v;
3120 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
3121 *r = v;
3122 return NDR_ERR_SUCCESS;
3125 _PUBLIC_ void ndr_print_ExtendedErrorParamType(struct ndr_print *ndr, const char *name, enum ExtendedErrorParamType r)
3127 const char *val = NULL;
3129 switch (r) {
3130 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING"; break;
3131 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING"; break;
3132 case EXTENDED_ERROR_PARAM_TYPE_UINT32: val = "EXTENDED_ERROR_PARAM_TYPE_UINT32"; break;
3133 case EXTENDED_ERROR_PARAM_TYPE_UINT16: val = "EXTENDED_ERROR_PARAM_TYPE_UINT16"; break;
3134 case EXTENDED_ERROR_PARAM_TYPE_UINT64: val = "EXTENDED_ERROR_PARAM_TYPE_UINT64"; break;
3135 case EXTENDED_ERROR_PARAM_TYPE_NONE: val = "EXTENDED_ERROR_PARAM_TYPE_NONE"; break;
3136 case EXTENDED_ERROR_PARAM_TYPE_BLOB: val = "EXTENDED_ERROR_PARAM_TYPE_BLOB"; break;
3138 ndr_print_enum(ndr, name, "ENUM", val, r);
3141 static enum ndr_err_code ndr_push_ExtendedErrorParamU(struct ndr_push *ndr, int ndr_flags, const union ExtendedErrorParamU *r)
3143 if (ndr_flags & NDR_SCALARS) {
3144 int level = ndr_push_get_switch_value(ndr, r);
3145 NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, level));
3146 switch (level) {
3147 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: {
3148 NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string));
3149 break; }
3151 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: {
3152 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string));
3153 break; }
3155 case EXTENDED_ERROR_PARAM_TYPE_UINT32: {
3156 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->uint32));
3157 break; }
3159 case EXTENDED_ERROR_PARAM_TYPE_UINT16: {
3160 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->uint16));
3161 break; }
3163 case EXTENDED_ERROR_PARAM_TYPE_UINT64: {
3164 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->uint64));
3165 break; }
3167 case EXTENDED_ERROR_PARAM_TYPE_NONE: {
3168 break; }
3170 case EXTENDED_ERROR_PARAM_TYPE_BLOB: {
3171 NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob));
3172 break; }
3174 default:
3175 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3178 if (ndr_flags & NDR_BUFFERS) {
3179 int level = ndr_push_get_switch_value(ndr, r);
3180 switch (level) {
3181 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
3182 NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string));
3183 break;
3185 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
3186 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string));
3187 break;
3189 case EXTENDED_ERROR_PARAM_TYPE_UINT32:
3190 break;
3192 case EXTENDED_ERROR_PARAM_TYPE_UINT16:
3193 break;
3195 case EXTENDED_ERROR_PARAM_TYPE_UINT64:
3196 break;
3198 case EXTENDED_ERROR_PARAM_TYPE_NONE:
3199 break;
3201 case EXTENDED_ERROR_PARAM_TYPE_BLOB:
3202 NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob));
3203 break;
3205 default:
3206 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3209 return NDR_ERR_SUCCESS;
3212 static enum ndr_err_code ndr_pull_ExtendedErrorParamU(struct ndr_pull *ndr, int ndr_flags, union ExtendedErrorParamU *r)
3214 int level;
3215 uint16_t _level;
3216 level = ndr_pull_get_switch_value(ndr, r);
3217 if (ndr_flags & NDR_SCALARS) {
3218 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
3219 if (_level != level) {
3220 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
3222 switch (level) {
3223 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: {
3224 NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string));
3225 break; }
3227 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: {
3228 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string));
3229 break; }
3231 case EXTENDED_ERROR_PARAM_TYPE_UINT32: {
3232 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->uint32));
3233 break; }
3235 case EXTENDED_ERROR_PARAM_TYPE_UINT16: {
3236 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->uint16));
3237 break; }
3239 case EXTENDED_ERROR_PARAM_TYPE_UINT64: {
3240 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->uint64));
3241 break; }
3243 case EXTENDED_ERROR_PARAM_TYPE_NONE: {
3244 break; }
3246 case EXTENDED_ERROR_PARAM_TYPE_BLOB: {
3247 NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob));
3248 break; }
3250 default:
3251 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3254 if (ndr_flags & NDR_BUFFERS) {
3255 switch (level) {
3256 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
3257 NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string));
3258 break;
3260 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
3261 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string));
3262 break;
3264 case EXTENDED_ERROR_PARAM_TYPE_UINT32:
3265 break;
3267 case EXTENDED_ERROR_PARAM_TYPE_UINT16:
3268 break;
3270 case EXTENDED_ERROR_PARAM_TYPE_UINT64:
3271 break;
3273 case EXTENDED_ERROR_PARAM_TYPE_NONE:
3274 break;
3276 case EXTENDED_ERROR_PARAM_TYPE_BLOB:
3277 NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob));
3278 break;
3280 default:
3281 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3284 return NDR_ERR_SUCCESS;
3287 _PUBLIC_ void ndr_print_ExtendedErrorParamU(struct ndr_print *ndr, const char *name, const union ExtendedErrorParamU *r)
3289 int level;
3290 level = ndr_print_get_switch_value(ndr, r);
3291 ndr_print_union(ndr, name, level, "ExtendedErrorParamU");
3292 switch (level) {
3293 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
3294 ndr_print_ExtendedErrorAString(ndr, "a_string", &r->a_string);
3295 break;
3297 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
3298 ndr_print_ExtendedErrorUString(ndr, "u_string", &r->u_string);
3299 break;
3301 case EXTENDED_ERROR_PARAM_TYPE_UINT32:
3302 ndr_print_uint32(ndr, "uint32", r->uint32);
3303 break;
3305 case EXTENDED_ERROR_PARAM_TYPE_UINT16:
3306 ndr_print_uint16(ndr, "uint16", r->uint16);
3307 break;
3309 case EXTENDED_ERROR_PARAM_TYPE_UINT64:
3310 ndr_print_hyper(ndr, "uint64", r->uint64);
3311 break;
3313 case EXTENDED_ERROR_PARAM_TYPE_NONE:
3314 break;
3316 case EXTENDED_ERROR_PARAM_TYPE_BLOB:
3317 ndr_print_ExtendedErrorBlob(ndr, "blob", &r->blob);
3318 break;
3320 default:
3321 ndr_print_bad_level(ndr, name, level);
3325 static enum ndr_err_code ndr_push_ExtendedErrorParam(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorParam *r)
3327 if (ndr_flags & NDR_SCALARS) {
3328 NDR_CHECK(ndr_push_align(ndr, 8));
3329 NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, r->type));
3330 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->p, r->type));
3331 NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p));
3333 if (ndr_flags & NDR_BUFFERS) {
3334 NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p));
3336 return NDR_ERR_SUCCESS;
3339 static enum ndr_err_code ndr_pull_ExtendedErrorParam(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorParam *r)
3341 if (ndr_flags & NDR_SCALARS) {
3342 NDR_CHECK(ndr_pull_align(ndr, 8));
3343 NDR_CHECK(ndr_pull_ExtendedErrorParamType(ndr, NDR_SCALARS, &r->type));
3344 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->p, r->type));
3345 NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p));
3347 if (ndr_flags & NDR_BUFFERS) {
3348 NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p));
3350 return NDR_ERR_SUCCESS;
3353 _PUBLIC_ void ndr_print_ExtendedErrorParam(struct ndr_print *ndr, const char *name, const struct ExtendedErrorParam *r)
3355 ndr_print_struct(ndr, name, "ExtendedErrorParam");
3356 ndr->depth++;
3357 ndr_print_ExtendedErrorParamType(ndr, "type", r->type);
3358 ndr_print_set_switch_value(ndr, &r->p, r->type);
3359 ndr_print_ExtendedErrorParamU(ndr, "p", &r->p);
3360 ndr->depth--;
3363 _PUBLIC_ enum ndr_err_code ndr_push_ExtendedErrorInfo(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfo *r)
3365 uint32_t cntr_params_0;
3366 if (ndr_flags & NDR_SCALARS) {
3367 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_params));
3368 NDR_CHECK(ndr_push_align(ndr, 8));
3369 NDR_CHECK(ndr_push_unique_ptr(ndr, r->next));
3370 NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name));
3371 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->pid));
3372 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time));
3373 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->generating_component));
3374 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status));
3375 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->detection_location));
3376 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->flags));
3377 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_params));
3378 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3379 NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0]));
3382 if (ndr_flags & NDR_BUFFERS) {
3383 if (r->next) {
3384 NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
3386 NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name));
3387 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3388 NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0]));
3391 return NDR_ERR_SUCCESS;
3394 _PUBLIC_ enum ndr_err_code ndr_pull_ExtendedErrorInfo(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfo *r)
3396 uint32_t _ptr_next;
3397 TALLOC_CTX *_mem_save_next_0;
3398 uint32_t cntr_params_0;
3399 TALLOC_CTX *_mem_save_params_0;
3400 if (ndr_flags & NDR_SCALARS) {
3401 NDR_CHECK(ndr_pull_array_size(ndr, &r->params));
3402 NDR_CHECK(ndr_pull_align(ndr, 8));
3403 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next));
3404 if (_ptr_next) {
3405 NDR_PULL_ALLOC(ndr, r->next);
3406 } else {
3407 r->next = NULL;
3409 NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name));
3410 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->pid));
3411 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time));
3412 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->generating_component));
3413 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status));
3414 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->detection_location));
3415 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags));
3416 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_params));
3417 NDR_PULL_ALLOC_N(ndr, r->params, ndr_get_array_size(ndr, &r->params));
3418 _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr);
3419 NDR_PULL_SET_MEM_CTX(ndr, r->params, 0);
3420 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3421 NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0]));
3423 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0);
3424 if (r->params) {
3425 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->params, r->num_params));
3428 if (ndr_flags & NDR_BUFFERS) {
3429 if (r->next) {
3430 _mem_save_next_0 = NDR_PULL_GET_MEM_CTX(ndr);
3431 NDR_PULL_SET_MEM_CTX(ndr, r->next, 0);
3432 NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
3433 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_0, 0);
3435 NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name));
3436 _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr);
3437 NDR_PULL_SET_MEM_CTX(ndr, r->params, 0);
3438 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3439 NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0]));
3441 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0);
3443 return NDR_ERR_SUCCESS;
3446 _PUBLIC_ void ndr_print_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfo *r)
3448 uint32_t cntr_params_0;
3449 ndr_print_struct(ndr, name, "ExtendedErrorInfo");
3450 ndr->depth++;
3451 ndr_print_ptr(ndr, "next", r->next);
3452 ndr->depth++;
3453 if (r->next) {
3454 ndr_print_ExtendedErrorInfo(ndr, "next", r->next);
3456 ndr->depth--;
3457 ndr_print_ExtendedErrorComputerName(ndr, "computer_name", &r->computer_name);
3458 ndr_print_hyper(ndr, "pid", r->pid);
3459 ndr_print_NTTIME(ndr, "time", r->time);
3460 ndr_print_uint32(ndr, "generating_component", r->generating_component);
3461 ndr_print_WERROR(ndr, "status", r->status);
3462 ndr_print_uint16(ndr, "detection_location", r->detection_location);
3463 ndr_print_uint16(ndr, "flags", r->flags);
3464 ndr_print_uint16(ndr, "num_params", r->num_params);
3465 ndr->print(ndr, "%s: ARRAY(%d)", "params", (int)r->num_params);
3466 ndr->depth++;
3467 for (cntr_params_0=0;cntr_params_0<r->num_params;cntr_params_0++) {
3468 char *idx_0=NULL;
3469 if (asprintf(&idx_0, "[%d]", cntr_params_0) != -1) {
3470 ndr_print_ExtendedErrorParam(ndr, "params", &r->params[cntr_params_0]);
3471 free(idx_0);
3474 ndr->depth--;
3475 ndr->depth--;
3478 static enum ndr_err_code ndr_push_ExtendedErrorInfoPtr(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfoPtr *r)
3480 if (ndr_flags & NDR_SCALARS) {
3481 NDR_CHECK(ndr_push_align(ndr, 4));
3482 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
3484 if (ndr_flags & NDR_BUFFERS) {
3485 if (r->info) {
3486 NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
3489 return NDR_ERR_SUCCESS;
3492 static enum ndr_err_code ndr_pull_ExtendedErrorInfoPtr(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfoPtr *r)
3494 uint32_t _ptr_info;
3495 TALLOC_CTX *_mem_save_info_0;
3496 if (ndr_flags & NDR_SCALARS) {
3497 NDR_CHECK(ndr_pull_align(ndr, 4));
3498 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
3499 if (_ptr_info) {
3500 NDR_PULL_ALLOC(ndr, r->info);
3501 } else {
3502 r->info = NULL;
3505 if (ndr_flags & NDR_BUFFERS) {
3506 if (r->info) {
3507 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3508 NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
3509 NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
3510 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
3513 return NDR_ERR_SUCCESS;
3516 _PUBLIC_ void ndr_print_ExtendedErrorInfoPtr(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfoPtr *r)
3518 ndr_print_struct(ndr, name, "ExtendedErrorInfoPtr");
3519 ndr->depth++;
3520 ndr_print_ptr(ndr, "info", r->info);
3521 ndr->depth++;
3522 if (r->info) {
3523 ndr_print_ExtendedErrorInfo(ndr, "info", r->info);
3525 ndr->depth--;
3526 ndr->depth--;
3529 static enum ndr_err_code ndr_push_decode_replPropertyMetaData(struct ndr_push *ndr, int flags, const struct decode_replPropertyMetaData *r)
3531 if (flags & NDR_IN) {
3532 NDR_CHECK(ndr_push_replPropertyMetaDataBlob(ndr, NDR_SCALARS, &r->in.blob));
3534 if (flags & NDR_OUT) {
3536 return NDR_ERR_SUCCESS;
3539 static enum ndr_err_code ndr_pull_decode_replPropertyMetaData(struct ndr_pull *ndr, int flags, struct decode_replPropertyMetaData *r)
3541 if (flags & NDR_IN) {
3542 NDR_CHECK(ndr_pull_replPropertyMetaDataBlob(ndr, NDR_SCALARS, &r->in.blob));
3544 if (flags & NDR_OUT) {
3546 return NDR_ERR_SUCCESS;
3549 _PUBLIC_ void ndr_print_decode_replPropertyMetaData(struct ndr_print *ndr, const char *name, int flags, const struct decode_replPropertyMetaData *r)
3551 ndr_print_struct(ndr, name, "decode_replPropertyMetaData");
3552 ndr->depth++;
3553 if (flags & NDR_SET_VALUES) {
3554 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3556 if (flags & NDR_IN) {
3557 ndr_print_struct(ndr, "in", "decode_replPropertyMetaData");
3558 ndr->depth++;
3559 ndr_print_replPropertyMetaDataBlob(ndr, "blob", &r->in.blob);
3560 ndr->depth--;
3562 if (flags & NDR_OUT) {
3563 ndr_print_struct(ndr, "out", "decode_replPropertyMetaData");
3564 ndr->depth++;
3565 ndr->depth--;
3567 ndr->depth--;
3570 static enum ndr_err_code ndr_push_decode_replUpToDateVector(struct ndr_push *ndr, int flags, const struct decode_replUpToDateVector *r)
3572 if (flags & NDR_IN) {
3573 NDR_CHECK(ndr_push_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->in.blob));
3575 if (flags & NDR_OUT) {
3577 return NDR_ERR_SUCCESS;
3580 static enum ndr_err_code ndr_pull_decode_replUpToDateVector(struct ndr_pull *ndr, int flags, struct decode_replUpToDateVector *r)
3582 if (flags & NDR_IN) {
3583 NDR_CHECK(ndr_pull_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->in.blob));
3585 if (flags & NDR_OUT) {
3587 return NDR_ERR_SUCCESS;
3590 _PUBLIC_ void ndr_print_decode_replUpToDateVector(struct ndr_print *ndr, const char *name, int flags, const struct decode_replUpToDateVector *r)
3592 ndr_print_struct(ndr, name, "decode_replUpToDateVector");
3593 ndr->depth++;
3594 if (flags & NDR_SET_VALUES) {
3595 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3597 if (flags & NDR_IN) {
3598 ndr_print_struct(ndr, "in", "decode_replUpToDateVector");
3599 ndr->depth++;
3600 ndr_print_replUpToDateVectorBlob(ndr, "blob", &r->in.blob);
3601 ndr->depth--;
3603 if (flags & NDR_OUT) {
3604 ndr_print_struct(ndr, "out", "decode_replUpToDateVector");
3605 ndr->depth++;
3606 ndr->depth--;
3608 ndr->depth--;
3611 static enum ndr_err_code ndr_push_decode_repsFromTo(struct ndr_push *ndr, int flags, const struct decode_repsFromTo *r)
3613 if (flags & NDR_IN) {
3614 NDR_CHECK(ndr_push_repsFromToBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3616 if (flags & NDR_OUT) {
3618 return NDR_ERR_SUCCESS;
3621 static enum ndr_err_code ndr_pull_decode_repsFromTo(struct ndr_pull *ndr, int flags, struct decode_repsFromTo *r)
3623 if (flags & NDR_IN) {
3624 NDR_CHECK(ndr_pull_repsFromToBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3626 if (flags & NDR_OUT) {
3628 return NDR_ERR_SUCCESS;
3631 _PUBLIC_ void ndr_print_decode_repsFromTo(struct ndr_print *ndr, const char *name, int flags, const struct decode_repsFromTo *r)
3633 ndr_print_struct(ndr, name, "decode_repsFromTo");
3634 ndr->depth++;
3635 if (flags & NDR_SET_VALUES) {
3636 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3638 if (flags & NDR_IN) {
3639 ndr_print_struct(ndr, "in", "decode_repsFromTo");
3640 ndr->depth++;
3641 ndr_print_repsFromToBlob(ndr, "blob", &r->in.blob);
3642 ndr->depth--;
3644 if (flags & NDR_OUT) {
3645 ndr_print_struct(ndr, "out", "decode_repsFromTo");
3646 ndr->depth++;
3647 ndr->depth--;
3649 ndr->depth--;
3652 static enum ndr_err_code ndr_push_decode_partialAttributeSet(struct ndr_push *ndr, int flags, const struct decode_partialAttributeSet *r)
3654 if (flags & NDR_IN) {
3655 NDR_CHECK(ndr_push_partialAttributeSetBlob(ndr, NDR_SCALARS, &r->in.blob));
3657 if (flags & NDR_OUT) {
3659 return NDR_ERR_SUCCESS;
3662 static enum ndr_err_code ndr_pull_decode_partialAttributeSet(struct ndr_pull *ndr, int flags, struct decode_partialAttributeSet *r)
3664 if (flags & NDR_IN) {
3665 NDR_CHECK(ndr_pull_partialAttributeSetBlob(ndr, NDR_SCALARS, &r->in.blob));
3667 if (flags & NDR_OUT) {
3669 return NDR_ERR_SUCCESS;
3672 _PUBLIC_ void ndr_print_decode_partialAttributeSet(struct ndr_print *ndr, const char *name, int flags, const struct decode_partialAttributeSet *r)
3674 ndr_print_struct(ndr, name, "decode_partialAttributeSet");
3675 ndr->depth++;
3676 if (flags & NDR_SET_VALUES) {
3677 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3679 if (flags & NDR_IN) {
3680 ndr_print_struct(ndr, "in", "decode_partialAttributeSet");
3681 ndr->depth++;
3682 ndr_print_partialAttributeSetBlob(ndr, "blob", &r->in.blob);
3683 ndr->depth--;
3685 if (flags & NDR_OUT) {
3686 ndr_print_struct(ndr, "out", "decode_partialAttributeSet");
3687 ndr->depth++;
3688 ndr->depth--;
3690 ndr->depth--;
3693 static enum ndr_err_code ndr_push_decode_prefixMap(struct ndr_push *ndr, int flags, const struct decode_prefixMap *r)
3695 if (flags & NDR_IN) {
3696 NDR_CHECK(ndr_push_prefixMapBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3698 if (flags & NDR_OUT) {
3700 return NDR_ERR_SUCCESS;
3703 static enum ndr_err_code ndr_pull_decode_prefixMap(struct ndr_pull *ndr, int flags, struct decode_prefixMap *r)
3705 if (flags & NDR_IN) {
3706 NDR_CHECK(ndr_pull_prefixMapBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3708 if (flags & NDR_OUT) {
3710 return NDR_ERR_SUCCESS;
3713 _PUBLIC_ void ndr_print_decode_prefixMap(struct ndr_print *ndr, const char *name, int flags, const struct decode_prefixMap *r)
3715 ndr_print_struct(ndr, name, "decode_prefixMap");
3716 ndr->depth++;
3717 if (flags & NDR_SET_VALUES) {
3718 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3720 if (flags & NDR_IN) {
3721 ndr_print_struct(ndr, "in", "decode_prefixMap");
3722 ndr->depth++;
3723 ndr_print_prefixMapBlob(ndr, "blob", &r->in.blob);
3724 ndr->depth--;
3726 if (flags & NDR_OUT) {
3727 ndr_print_struct(ndr, "out", "decode_prefixMap");
3728 ndr->depth++;
3729 ndr->depth--;
3731 ndr->depth--;
3734 static enum ndr_err_code ndr_push_decode_ldapControlDirSync(struct ndr_push *ndr, int flags, const struct decode_ldapControlDirSync *r)
3736 if (flags & NDR_IN) {
3737 NDR_CHECK(ndr_push_ldapControlDirSyncCookie(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.cookie));
3739 if (flags & NDR_OUT) {
3741 return NDR_ERR_SUCCESS;
3744 static enum ndr_err_code ndr_pull_decode_ldapControlDirSync(struct ndr_pull *ndr, int flags, struct decode_ldapControlDirSync *r)
3746 if (flags & NDR_IN) {
3747 NDR_CHECK(ndr_pull_ldapControlDirSyncCookie(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.cookie));
3749 if (flags & NDR_OUT) {
3751 return NDR_ERR_SUCCESS;
3754 _PUBLIC_ void ndr_print_decode_ldapControlDirSync(struct ndr_print *ndr, const char *name, int flags, const struct decode_ldapControlDirSync *r)
3756 ndr_print_struct(ndr, name, "decode_ldapControlDirSync");
3757 ndr->depth++;
3758 if (flags & NDR_SET_VALUES) {
3759 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3761 if (flags & NDR_IN) {
3762 ndr_print_struct(ndr, "in", "decode_ldapControlDirSync");
3763 ndr->depth++;
3764 ndr_print_ldapControlDirSyncCookie(ndr, "cookie", &r->in.cookie);
3765 ndr->depth--;
3767 if (flags & NDR_OUT) {
3768 ndr_print_struct(ndr, "out", "decode_ldapControlDirSync");
3769 ndr->depth++;
3770 ndr->depth--;
3772 ndr->depth--;
3775 static enum ndr_err_code ndr_push_decode_supplementalCredentials(struct ndr_push *ndr, int flags, const struct decode_supplementalCredentials *r)
3777 if (flags & NDR_IN) {
3778 NDR_CHECK(ndr_push_supplementalCredentialsBlob(ndr, NDR_SCALARS, &r->in.blob));
3780 if (flags & NDR_OUT) {
3782 return NDR_ERR_SUCCESS;
3785 static enum ndr_err_code ndr_pull_decode_supplementalCredentials(struct ndr_pull *ndr, int flags, struct decode_supplementalCredentials *r)
3787 if (flags & NDR_IN) {
3788 NDR_CHECK(ndr_pull_supplementalCredentialsBlob(ndr, NDR_SCALARS, &r->in.blob));
3790 if (flags & NDR_OUT) {
3792 return NDR_ERR_SUCCESS;
3795 _PUBLIC_ void ndr_print_decode_supplementalCredentials(struct ndr_print *ndr, const char *name, int flags, const struct decode_supplementalCredentials *r)
3797 ndr_print_struct(ndr, name, "decode_supplementalCredentials");
3798 ndr->depth++;
3799 if (flags & NDR_SET_VALUES) {
3800 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3802 if (flags & NDR_IN) {
3803 ndr_print_struct(ndr, "in", "decode_supplementalCredentials");
3804 ndr->depth++;
3805 ndr_print_supplementalCredentialsBlob(ndr, "blob", &r->in.blob);
3806 ndr->depth--;
3808 if (flags & NDR_OUT) {
3809 ndr_print_struct(ndr, "out", "decode_supplementalCredentials");
3810 ndr->depth++;
3811 ndr->depth--;
3813 ndr->depth--;
3816 static enum ndr_err_code ndr_push_decode_Packages(struct ndr_push *ndr, int flags, const struct decode_Packages *r)
3818 if (flags & NDR_IN) {
3819 NDR_CHECK(ndr_push_package_PackagesBlob(ndr, NDR_SCALARS, &r->in.blob));
3821 if (flags & NDR_OUT) {
3823 return NDR_ERR_SUCCESS;
3826 static enum ndr_err_code ndr_pull_decode_Packages(struct ndr_pull *ndr, int flags, struct decode_Packages *r)
3828 if (flags & NDR_IN) {
3829 NDR_CHECK(ndr_pull_package_PackagesBlob(ndr, NDR_SCALARS, &r->in.blob));
3831 if (flags & NDR_OUT) {
3833 return NDR_ERR_SUCCESS;
3836 _PUBLIC_ void ndr_print_decode_Packages(struct ndr_print *ndr, const char *name, int flags, const struct decode_Packages *r)
3838 ndr_print_struct(ndr, name, "decode_Packages");
3839 ndr->depth++;
3840 if (flags & NDR_SET_VALUES) {
3841 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3843 if (flags & NDR_IN) {
3844 ndr_print_struct(ndr, "in", "decode_Packages");
3845 ndr->depth++;
3846 ndr_print_package_PackagesBlob(ndr, "blob", &r->in.blob);
3847 ndr->depth--;
3849 if (flags & NDR_OUT) {
3850 ndr_print_struct(ndr, "out", "decode_Packages");
3851 ndr->depth++;
3852 ndr->depth--;
3854 ndr->depth--;
3857 static enum ndr_err_code ndr_push_decode_PrimaryKerberos(struct ndr_push *ndr, int flags, const struct decode_PrimaryKerberos *r)
3859 if (flags & NDR_IN) {
3860 NDR_CHECK(ndr_push_package_PrimaryKerberosBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3862 if (flags & NDR_OUT) {
3864 return NDR_ERR_SUCCESS;
3867 static enum ndr_err_code ndr_pull_decode_PrimaryKerberos(struct ndr_pull *ndr, int flags, struct decode_PrimaryKerberos *r)
3869 if (flags & NDR_IN) {
3870 NDR_CHECK(ndr_pull_package_PrimaryKerberosBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3872 if (flags & NDR_OUT) {
3874 return NDR_ERR_SUCCESS;
3877 _PUBLIC_ void ndr_print_decode_PrimaryKerberos(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryKerberos *r)
3879 ndr_print_struct(ndr, name, "decode_PrimaryKerberos");
3880 ndr->depth++;
3881 if (flags & NDR_SET_VALUES) {
3882 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3884 if (flags & NDR_IN) {
3885 ndr_print_struct(ndr, "in", "decode_PrimaryKerberos");
3886 ndr->depth++;
3887 ndr_print_package_PrimaryKerberosBlob(ndr, "blob", &r->in.blob);
3888 ndr->depth--;
3890 if (flags & NDR_OUT) {
3891 ndr_print_struct(ndr, "out", "decode_PrimaryKerberos");
3892 ndr->depth++;
3893 ndr->depth--;
3895 ndr->depth--;
3898 static enum ndr_err_code ndr_push_decode_PrimaryCLEARTEXT(struct ndr_push *ndr, int flags, const struct decode_PrimaryCLEARTEXT *r)
3900 if (flags & NDR_IN) {
3901 NDR_CHECK(ndr_push_package_PrimaryCLEARTEXTBlob(ndr, NDR_SCALARS, &r->in.blob));
3903 if (flags & NDR_OUT) {
3905 return NDR_ERR_SUCCESS;
3908 static enum ndr_err_code ndr_pull_decode_PrimaryCLEARTEXT(struct ndr_pull *ndr, int flags, struct decode_PrimaryCLEARTEXT *r)
3910 if (flags & NDR_IN) {
3911 NDR_CHECK(ndr_pull_package_PrimaryCLEARTEXTBlob(ndr, NDR_SCALARS, &r->in.blob));
3913 if (flags & NDR_OUT) {
3915 return NDR_ERR_SUCCESS;
3918 _PUBLIC_ void ndr_print_decode_PrimaryCLEARTEXT(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryCLEARTEXT *r)
3920 ndr_print_struct(ndr, name, "decode_PrimaryCLEARTEXT");
3921 ndr->depth++;
3922 if (flags & NDR_SET_VALUES) {
3923 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3925 if (flags & NDR_IN) {
3926 ndr_print_struct(ndr, "in", "decode_PrimaryCLEARTEXT");
3927 ndr->depth++;
3928 ndr_print_package_PrimaryCLEARTEXTBlob(ndr, "blob", &r->in.blob);
3929 ndr->depth--;
3931 if (flags & NDR_OUT) {
3932 ndr_print_struct(ndr, "out", "decode_PrimaryCLEARTEXT");
3933 ndr->depth++;
3934 ndr->depth--;
3936 ndr->depth--;
3939 static enum ndr_err_code ndr_push_decode_PrimaryWDigest(struct ndr_push *ndr, int flags, const struct decode_PrimaryWDigest *r)
3941 if (flags & NDR_IN) {
3942 NDR_CHECK(ndr_push_package_PrimaryWDigestBlob(ndr, NDR_SCALARS, &r->in.blob));
3944 if (flags & NDR_OUT) {
3946 return NDR_ERR_SUCCESS;
3949 static enum ndr_err_code ndr_pull_decode_PrimaryWDigest(struct ndr_pull *ndr, int flags, struct decode_PrimaryWDigest *r)
3951 if (flags & NDR_IN) {
3952 NDR_CHECK(ndr_pull_package_PrimaryWDigestBlob(ndr, NDR_SCALARS, &r->in.blob));
3954 if (flags & NDR_OUT) {
3956 return NDR_ERR_SUCCESS;
3959 _PUBLIC_ void ndr_print_decode_PrimaryWDigest(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryWDigest *r)
3961 ndr_print_struct(ndr, name, "decode_PrimaryWDigest");
3962 ndr->depth++;
3963 if (flags & NDR_SET_VALUES) {
3964 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3966 if (flags & NDR_IN) {
3967 ndr_print_struct(ndr, "in", "decode_PrimaryWDigest");
3968 ndr->depth++;
3969 ndr_print_package_PrimaryWDigestBlob(ndr, "blob", &r->in.blob);
3970 ndr->depth--;
3972 if (flags & NDR_OUT) {
3973 ndr_print_struct(ndr, "out", "decode_PrimaryWDigest");
3974 ndr->depth++;
3975 ndr->depth--;
3977 ndr->depth--;
3980 static enum ndr_err_code ndr_push_decode_trustAuthInOut(struct ndr_push *ndr, int flags, const struct decode_trustAuthInOut *r)
3982 if (flags & NDR_IN) {
3983 NDR_CHECK(ndr_push_trustAuthInOutBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3985 if (flags & NDR_OUT) {
3987 return NDR_ERR_SUCCESS;
3990 static enum ndr_err_code ndr_pull_decode_trustAuthInOut(struct ndr_pull *ndr, int flags, struct decode_trustAuthInOut *r)
3992 if (flags & NDR_IN) {
3993 NDR_CHECK(ndr_pull_trustAuthInOutBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3995 if (flags & NDR_OUT) {
3997 return NDR_ERR_SUCCESS;
4000 _PUBLIC_ void ndr_print_decode_trustAuthInOut(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustAuthInOut *r)
4002 ndr_print_struct(ndr, name, "decode_trustAuthInOut");
4003 ndr->depth++;
4004 if (flags & NDR_SET_VALUES) {
4005 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4007 if (flags & NDR_IN) {
4008 ndr_print_struct(ndr, "in", "decode_trustAuthInOut");
4009 ndr->depth++;
4010 ndr_print_trustAuthInOutBlob(ndr, "blob", &r->in.blob);
4011 ndr->depth--;
4013 if (flags & NDR_OUT) {
4014 ndr_print_struct(ndr, "out", "decode_trustAuthInOut");
4015 ndr->depth++;
4016 ndr->depth--;
4018 ndr->depth--;
4021 static enum ndr_err_code ndr_push_decode_trustDomainPasswords(struct ndr_push *ndr, int flags, const struct decode_trustDomainPasswords *r)
4023 if (flags & NDR_IN) {
4024 NDR_CHECK(ndr_push_trustDomainPasswords(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4026 if (flags & NDR_OUT) {
4028 return NDR_ERR_SUCCESS;
4031 static enum ndr_err_code ndr_pull_decode_trustDomainPasswords(struct ndr_pull *ndr, int flags, struct decode_trustDomainPasswords *r)
4033 if (flags & NDR_IN) {
4034 NDR_CHECK(ndr_pull_trustDomainPasswords(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4036 if (flags & NDR_OUT) {
4038 return NDR_ERR_SUCCESS;
4041 _PUBLIC_ void ndr_print_decode_trustDomainPasswords(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustDomainPasswords *r)
4043 ndr_print_struct(ndr, name, "decode_trustDomainPasswords");
4044 ndr->depth++;
4045 if (flags & NDR_SET_VALUES) {
4046 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4048 if (flags & NDR_IN) {
4049 ndr_print_struct(ndr, "in", "decode_trustDomainPasswords");
4050 ndr->depth++;
4051 ndr_print_trustDomainPasswords(ndr, "blob", &r->in.blob);
4052 ndr->depth--;
4054 if (flags & NDR_OUT) {
4055 ndr_print_struct(ndr, "out", "decode_trustDomainPasswords");
4056 ndr->depth++;
4057 ndr->depth--;
4059 ndr->depth--;
4062 static enum ndr_err_code ndr_push_decode_ExtendedErrorInfo(struct ndr_push *ndr, int flags, const struct decode_ExtendedErrorInfo *r)
4064 if (flags & NDR_IN) {
4066 struct ndr_push *_ndr_ptr;
4067 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ptr, 0xFFFFFC01, -1));
4068 NDR_CHECK(ndr_push_ExtendedErrorInfoPtr(_ndr_ptr, NDR_SCALARS|NDR_BUFFERS, &r->in.ptr));
4069 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ptr, 0xFFFFFC01, -1));
4072 if (flags & NDR_OUT) {
4074 return NDR_ERR_SUCCESS;
4077 static enum ndr_err_code ndr_pull_decode_ExtendedErrorInfo(struct ndr_pull *ndr, int flags, struct decode_ExtendedErrorInfo *r)
4079 if (flags & NDR_IN) {
4081 struct ndr_pull *_ndr_ptr;
4082 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ptr, 0xFFFFFC01, -1));
4083 NDR_CHECK(ndr_pull_ExtendedErrorInfoPtr(_ndr_ptr, NDR_SCALARS|NDR_BUFFERS, &r->in.ptr));
4084 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ptr, 0xFFFFFC01, -1));
4087 if (flags & NDR_OUT) {
4089 return NDR_ERR_SUCCESS;
4092 _PUBLIC_ void ndr_print_decode_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, int flags, const struct decode_ExtendedErrorInfo *r)
4094 ndr_print_struct(ndr, name, "decode_ExtendedErrorInfo");
4095 ndr->depth++;
4096 if (flags & NDR_SET_VALUES) {
4097 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4099 if (flags & NDR_IN) {
4100 ndr_print_struct(ndr, "in", "decode_ExtendedErrorInfo");
4101 ndr->depth++;
4102 ndr_print_ExtendedErrorInfoPtr(ndr, "ptr", &r->in.ptr);
4103 ndr->depth--;
4105 if (flags & NDR_OUT) {
4106 ndr_print_struct(ndr, "out", "decode_ExtendedErrorInfo");
4107 ndr->depth++;
4108 ndr->depth--;
4110 ndr->depth--;
4113 static const struct ndr_interface_call drsblobs_calls[] = {
4115 "decode_replPropertyMetaData",
4116 sizeof(struct decode_replPropertyMetaData),
4117 (ndr_push_flags_fn_t) ndr_push_decode_replPropertyMetaData,
4118 (ndr_pull_flags_fn_t) ndr_pull_decode_replPropertyMetaData,
4119 (ndr_print_function_t) ndr_print_decode_replPropertyMetaData,
4120 false,
4123 "decode_replUpToDateVector",
4124 sizeof(struct decode_replUpToDateVector),
4125 (ndr_push_flags_fn_t) ndr_push_decode_replUpToDateVector,
4126 (ndr_pull_flags_fn_t) ndr_pull_decode_replUpToDateVector,
4127 (ndr_print_function_t) ndr_print_decode_replUpToDateVector,
4128 false,
4131 "decode_repsFromTo",
4132 sizeof(struct decode_repsFromTo),
4133 (ndr_push_flags_fn_t) ndr_push_decode_repsFromTo,
4134 (ndr_pull_flags_fn_t) ndr_pull_decode_repsFromTo,
4135 (ndr_print_function_t) ndr_print_decode_repsFromTo,
4136 false,
4139 "decode_partialAttributeSet",
4140 sizeof(struct decode_partialAttributeSet),
4141 (ndr_push_flags_fn_t) ndr_push_decode_partialAttributeSet,
4142 (ndr_pull_flags_fn_t) ndr_pull_decode_partialAttributeSet,
4143 (ndr_print_function_t) ndr_print_decode_partialAttributeSet,
4144 false,
4147 "decode_prefixMap",
4148 sizeof(struct decode_prefixMap),
4149 (ndr_push_flags_fn_t) ndr_push_decode_prefixMap,
4150 (ndr_pull_flags_fn_t) ndr_pull_decode_prefixMap,
4151 (ndr_print_function_t) ndr_print_decode_prefixMap,
4152 false,
4155 "decode_ldapControlDirSync",
4156 sizeof(struct decode_ldapControlDirSync),
4157 (ndr_push_flags_fn_t) ndr_push_decode_ldapControlDirSync,
4158 (ndr_pull_flags_fn_t) ndr_pull_decode_ldapControlDirSync,
4159 (ndr_print_function_t) ndr_print_decode_ldapControlDirSync,
4160 false,
4163 "decode_supplementalCredentials",
4164 sizeof(struct decode_supplementalCredentials),
4165 (ndr_push_flags_fn_t) ndr_push_decode_supplementalCredentials,
4166 (ndr_pull_flags_fn_t) ndr_pull_decode_supplementalCredentials,
4167 (ndr_print_function_t) ndr_print_decode_supplementalCredentials,
4168 false,
4171 "decode_Packages",
4172 sizeof(struct decode_Packages),
4173 (ndr_push_flags_fn_t) ndr_push_decode_Packages,
4174 (ndr_pull_flags_fn_t) ndr_pull_decode_Packages,
4175 (ndr_print_function_t) ndr_print_decode_Packages,
4176 false,
4179 "decode_PrimaryKerberos",
4180 sizeof(struct decode_PrimaryKerberos),
4181 (ndr_push_flags_fn_t) ndr_push_decode_PrimaryKerberos,
4182 (ndr_pull_flags_fn_t) ndr_pull_decode_PrimaryKerberos,
4183 (ndr_print_function_t) ndr_print_decode_PrimaryKerberos,
4184 false,
4187 "decode_PrimaryCLEARTEXT",
4188 sizeof(struct decode_PrimaryCLEARTEXT),
4189 (ndr_push_flags_fn_t) ndr_push_decode_PrimaryCLEARTEXT,
4190 (ndr_pull_flags_fn_t) ndr_pull_decode_PrimaryCLEARTEXT,
4191 (ndr_print_function_t) ndr_print_decode_PrimaryCLEARTEXT,
4192 false,
4195 "decode_PrimaryWDigest",
4196 sizeof(struct decode_PrimaryWDigest),
4197 (ndr_push_flags_fn_t) ndr_push_decode_PrimaryWDigest,
4198 (ndr_pull_flags_fn_t) ndr_pull_decode_PrimaryWDigest,
4199 (ndr_print_function_t) ndr_print_decode_PrimaryWDigest,
4200 false,
4203 "decode_trustAuthInOut",
4204 sizeof(struct decode_trustAuthInOut),
4205 (ndr_push_flags_fn_t) ndr_push_decode_trustAuthInOut,
4206 (ndr_pull_flags_fn_t) ndr_pull_decode_trustAuthInOut,
4207 (ndr_print_function_t) ndr_print_decode_trustAuthInOut,
4208 false,
4211 "decode_trustDomainPasswords",
4212 sizeof(struct decode_trustDomainPasswords),
4213 (ndr_push_flags_fn_t) ndr_push_decode_trustDomainPasswords,
4214 (ndr_pull_flags_fn_t) ndr_pull_decode_trustDomainPasswords,
4215 (ndr_print_function_t) ndr_print_decode_trustDomainPasswords,
4216 false,
4219 "decode_ExtendedErrorInfo",
4220 sizeof(struct decode_ExtendedErrorInfo),
4221 (ndr_push_flags_fn_t) ndr_push_decode_ExtendedErrorInfo,
4222 (ndr_pull_flags_fn_t) ndr_pull_decode_ExtendedErrorInfo,
4223 (ndr_print_function_t) ndr_print_decode_ExtendedErrorInfo,
4224 false,
4226 { NULL, 0, NULL, NULL, NULL, false }
4229 static const char * const drsblobs_endpoint_strings[] = {
4230 "ncacn_np:[\\pipe\\drsblobs]",
4233 static const struct ndr_interface_string_array drsblobs_endpoints = {
4234 .count = 1,
4235 .names = drsblobs_endpoint_strings
4238 static const char * const drsblobs_authservice_strings[] = {
4239 "host",
4242 static const struct ndr_interface_string_array drsblobs_authservices = {
4243 .count = 1,
4244 .names = drsblobs_authservice_strings
4248 const struct ndr_interface_table ndr_table_drsblobs = {
4249 .name = "drsblobs",
4250 .syntax_id = {
4251 {0x12345778,0x1234,0xabcd,{0x00,0x01},{0x00,0x00,0x00,0x01}},
4252 NDR_DRSBLOBS_VERSION
4254 .helpstring = NDR_DRSBLOBS_HELPSTRING,
4255 .num_calls = 14,
4256 .calls = drsblobs_calls,
4257 .endpoints = &drsblobs_endpoints,
4258 .authservices = &drsblobs_authservices