Attempt to fix the build
[Samba.git] / librpc / gen_ndr / ndr_drsblobs.c
blob72e182d3ff3092a31b7302a7d907698618815e5c
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", level);
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", level);
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", level);
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", level);
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", level);
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", level);
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", level);
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", level);
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", level);
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", level);
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", level);
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", level);
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", level);
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", level);
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", level);
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", level);
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", level);
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", level);
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", level);
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", level);
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_service_keys_0;
1860 uint32_t cntr_old_keys_0;
1861 uint32_t cntr_older_keys_0;
1862 if (ndr_flags & NDR_SCALARS) {
1863 NDR_CHECK(ndr_push_align(ndr, 4));
1864 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_keys));
1865 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
1866 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_old_keys));
1867 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_older_keys));
1868 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
1869 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->default_iteration_count));
1870 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1871 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
1873 for (cntr_service_keys_0 = 0; cntr_service_keys_0 < 0; cntr_service_keys_0++) {
1874 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->service_keys[cntr_service_keys_0]));
1876 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1877 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
1879 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
1880 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->older_keys[cntr_older_keys_0]));
1883 if (ndr_flags & NDR_BUFFERS) {
1884 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
1885 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1886 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
1888 for (cntr_service_keys_0 = 0; cntr_service_keys_0 < 0; cntr_service_keys_0++) {
1889 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->service_keys[cntr_service_keys_0]));
1891 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1892 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
1894 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
1895 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->older_keys[cntr_older_keys_0]));
1898 return NDR_ERR_SUCCESS;
1901 static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr4(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosCtr4 *r)
1903 uint32_t cntr_keys_0;
1904 TALLOC_CTX *_mem_save_keys_0;
1905 uint32_t cntr_service_keys_0;
1906 TALLOC_CTX *_mem_save_service_keys_0;
1907 uint32_t cntr_old_keys_0;
1908 TALLOC_CTX *_mem_save_old_keys_0;
1909 uint32_t cntr_older_keys_0;
1910 TALLOC_CTX *_mem_save_older_keys_0;
1911 if (ndr_flags & NDR_SCALARS) {
1912 NDR_CHECK(ndr_pull_align(ndr, 4));
1913 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_keys));
1914 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_service_keys));
1915 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_old_keys));
1916 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_older_keys));
1917 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
1918 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->default_iteration_count));
1919 NDR_PULL_ALLOC_N(ndr, r->keys, r->num_keys);
1920 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1921 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
1922 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1923 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
1925 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
1926 NDR_PULL_ALLOC_N(ndr, r->service_keys, r->num_service_keys);
1927 _mem_save_service_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1928 NDR_PULL_SET_MEM_CTX(ndr, r->service_keys, 0);
1929 for (cntr_service_keys_0 = 0; cntr_service_keys_0 < r->num_service_keys; cntr_service_keys_0++) {
1930 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->service_keys[cntr_service_keys_0]));
1932 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_keys_0, 0);
1933 NDR_PULL_ALLOC_N(ndr, r->old_keys, r->num_old_keys);
1934 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1935 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
1936 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1937 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
1939 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
1940 NDR_PULL_ALLOC_N(ndr, r->older_keys, r->num_older_keys);
1941 _mem_save_older_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1942 NDR_PULL_SET_MEM_CTX(ndr, r->older_keys, 0);
1943 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
1944 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->older_keys[cntr_older_keys_0]));
1946 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_older_keys_0, 0);
1948 if (ndr_flags & NDR_BUFFERS) {
1949 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
1950 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1951 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
1952 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1953 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
1955 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
1956 _mem_save_service_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1957 NDR_PULL_SET_MEM_CTX(ndr, r->service_keys, 0);
1958 for (cntr_service_keys_0 = 0; cntr_service_keys_0 < r->num_service_keys; cntr_service_keys_0++) {
1959 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->service_keys[cntr_service_keys_0]));
1961 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_keys_0, 0);
1962 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1963 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
1964 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1965 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
1967 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
1968 _mem_save_older_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1969 NDR_PULL_SET_MEM_CTX(ndr, r->older_keys, 0);
1970 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
1971 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->older_keys[cntr_older_keys_0]));
1973 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_older_keys_0, 0);
1975 return NDR_ERR_SUCCESS;
1978 _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr4(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosCtr4 *r)
1980 uint32_t cntr_keys_0;
1981 uint32_t cntr_service_keys_0;
1982 uint32_t cntr_old_keys_0;
1983 uint32_t cntr_older_keys_0;
1984 ndr_print_struct(ndr, name, "package_PrimaryKerberosCtr4");
1985 ndr->depth++;
1986 ndr_print_uint16(ndr, "num_keys", r->num_keys);
1987 ndr_print_uint16(ndr, "num_service_keys", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->num_service_keys);
1988 ndr_print_uint16(ndr, "num_old_keys", r->num_old_keys);
1989 ndr_print_uint16(ndr, "num_older_keys", r->num_older_keys);
1990 ndr_print_package_PrimaryKerberosString(ndr, "salt", &r->salt);
1991 ndr_print_uint32(ndr, "default_iteration_count", r->default_iteration_count);
1992 ndr->print(ndr, "%s: ARRAY(%d)", "keys", (int)r->num_keys);
1993 ndr->depth++;
1994 for (cntr_keys_0=0;cntr_keys_0<r->num_keys;cntr_keys_0++) {
1995 char *idx_0=NULL;
1996 if (asprintf(&idx_0, "[%d]", cntr_keys_0) != -1) {
1997 ndr_print_package_PrimaryKerberosKey4(ndr, "keys", &r->keys[cntr_keys_0]);
1998 free(idx_0);
2001 ndr->depth--;
2002 ndr->print(ndr, "%s: ARRAY(%d)", "service_keys", (int)r->num_service_keys);
2003 ndr->depth++;
2004 for (cntr_service_keys_0=0;cntr_service_keys_0<r->num_service_keys;cntr_service_keys_0++) {
2005 char *idx_0=NULL;
2006 if (asprintf(&idx_0, "[%d]", cntr_service_keys_0) != -1) {
2007 ndr_print_package_PrimaryKerberosKey4(ndr, "service_keys", &r->service_keys[cntr_service_keys_0]);
2008 free(idx_0);
2011 ndr->depth--;
2012 ndr->print(ndr, "%s: ARRAY(%d)", "old_keys", (int)r->num_old_keys);
2013 ndr->depth++;
2014 for (cntr_old_keys_0=0;cntr_old_keys_0<r->num_old_keys;cntr_old_keys_0++) {
2015 char *idx_0=NULL;
2016 if (asprintf(&idx_0, "[%d]", cntr_old_keys_0) != -1) {
2017 ndr_print_package_PrimaryKerberosKey4(ndr, "old_keys", &r->old_keys[cntr_old_keys_0]);
2018 free(idx_0);
2021 ndr->depth--;
2022 ndr->print(ndr, "%s: ARRAY(%d)", "older_keys", (int)r->num_older_keys);
2023 ndr->depth++;
2024 for (cntr_older_keys_0=0;cntr_older_keys_0<r->num_older_keys;cntr_older_keys_0++) {
2025 char *idx_0=NULL;
2026 if (asprintf(&idx_0, "[%d]", cntr_older_keys_0) != -1) {
2027 ndr_print_package_PrimaryKerberosKey4(ndr, "older_keys", &r->older_keys[cntr_older_keys_0]);
2028 free(idx_0);
2031 ndr->depth--;
2032 ndr->depth--;
2035 static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr(struct ndr_push *ndr, int ndr_flags, const union package_PrimaryKerberosCtr *r)
2037 if (ndr_flags & NDR_SCALARS) {
2038 int level = ndr_push_get_switch_value(ndr, r);
2039 switch (level) {
2040 case 3: {
2041 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr, NDR_SCALARS, &r->ctr3));
2042 break; }
2044 case 4: {
2045 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr4(ndr, NDR_SCALARS, &r->ctr4));
2046 break; }
2048 default:
2049 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2052 if (ndr_flags & NDR_BUFFERS) {
2053 int level = ndr_push_get_switch_value(ndr, r);
2054 switch (level) {
2055 case 3:
2056 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr, NDR_BUFFERS, &r->ctr3));
2057 break;
2059 case 4:
2060 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr4(ndr, NDR_BUFFERS, &r->ctr4));
2061 break;
2063 default:
2064 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2067 return NDR_ERR_SUCCESS;
2070 static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr(struct ndr_pull *ndr, int ndr_flags, union package_PrimaryKerberosCtr *r)
2072 int level;
2073 level = ndr_pull_get_switch_value(ndr, r);
2074 if (ndr_flags & NDR_SCALARS) {
2075 switch (level) {
2076 case 3: {
2077 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr, NDR_SCALARS, &r->ctr3));
2078 break; }
2080 case 4: {
2081 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr4(ndr, NDR_SCALARS, &r->ctr4));
2082 break; }
2084 default:
2085 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2088 if (ndr_flags & NDR_BUFFERS) {
2089 switch (level) {
2090 case 3:
2091 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr, NDR_BUFFERS, &r->ctr3));
2092 break;
2094 case 4:
2095 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr4(ndr, NDR_BUFFERS, &r->ctr4));
2096 break;
2098 default:
2099 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2102 return NDR_ERR_SUCCESS;
2105 _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr(struct ndr_print *ndr, const char *name, const union package_PrimaryKerberosCtr *r)
2107 int level;
2108 level = ndr_print_get_switch_value(ndr, r);
2109 ndr_print_union(ndr, name, level, "package_PrimaryKerberosCtr");
2110 switch (level) {
2111 case 3:
2112 ndr_print_package_PrimaryKerberosCtr3(ndr, "ctr3", &r->ctr3);
2113 break;
2115 case 4:
2116 ndr_print_package_PrimaryKerberosCtr4(ndr, "ctr4", &r->ctr4);
2117 break;
2119 default:
2120 ndr_print_bad_level(ndr, name, level);
2124 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryKerberosBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosBlob *r)
2126 if (ndr_flags & NDR_SCALARS) {
2127 NDR_CHECK(ndr_push_align(ndr, 4));
2128 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->version));
2129 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
2130 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
2131 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr, NDR_SCALARS, &r->ctr));
2133 if (ndr_flags & NDR_BUFFERS) {
2134 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr, NDR_BUFFERS, &r->ctr));
2136 return NDR_ERR_SUCCESS;
2139 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryKerberosBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosBlob *r)
2141 if (ndr_flags & NDR_SCALARS) {
2142 NDR_CHECK(ndr_pull_align(ndr, 4));
2143 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->version));
2144 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags));
2145 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
2146 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr, NDR_SCALARS, &r->ctr));
2148 if (ndr_flags & NDR_BUFFERS) {
2149 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr, NDR_BUFFERS, &r->ctr));
2151 return NDR_ERR_SUCCESS;
2154 _PUBLIC_ void ndr_print_package_PrimaryKerberosBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosBlob *r)
2156 ndr_print_struct(ndr, name, "package_PrimaryKerberosBlob");
2157 ndr->depth++;
2158 ndr_print_uint16(ndr, "version", r->version);
2159 ndr_print_uint16(ndr, "flags", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->flags);
2160 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
2161 ndr_print_package_PrimaryKerberosCtr(ndr, "ctr", &r->ctr);
2162 ndr->depth--;
2165 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryCLEARTEXTBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryCLEARTEXTBlob *r)
2167 if (ndr_flags & NDR_SCALARS) {
2168 NDR_CHECK(ndr_push_align(ndr, 4));
2170 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2171 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2172 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->cleartext));
2173 ndr->flags = _flags_save_DATA_BLOB;
2176 if (ndr_flags & NDR_BUFFERS) {
2178 return NDR_ERR_SUCCESS;
2181 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryCLEARTEXTBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryCLEARTEXTBlob *r)
2183 if (ndr_flags & NDR_SCALARS) {
2184 NDR_CHECK(ndr_pull_align(ndr, 4));
2186 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2187 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2188 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->cleartext));
2189 ndr->flags = _flags_save_DATA_BLOB;
2192 if (ndr_flags & NDR_BUFFERS) {
2194 return NDR_ERR_SUCCESS;
2197 _PUBLIC_ void ndr_print_package_PrimaryCLEARTEXTBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryCLEARTEXTBlob *r)
2199 ndr_print_struct(ndr, name, "package_PrimaryCLEARTEXTBlob");
2200 ndr->depth++;
2201 ndr_print_DATA_BLOB(ndr, "cleartext", r->cleartext);
2202 ndr->depth--;
2205 static enum ndr_err_code ndr_push_package_PrimaryWDigestHash(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestHash *r)
2208 uint32_t _flags_save_STRUCT = ndr->flags;
2209 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2210 if (ndr_flags & NDR_SCALARS) {
2211 NDR_CHECK(ndr_push_align(ndr, 1));
2212 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
2214 if (ndr_flags & NDR_BUFFERS) {
2216 ndr->flags = _flags_save_STRUCT;
2218 return NDR_ERR_SUCCESS;
2221 static enum ndr_err_code ndr_pull_package_PrimaryWDigestHash(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestHash *r)
2224 uint32_t _flags_save_STRUCT = ndr->flags;
2225 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2226 if (ndr_flags & NDR_SCALARS) {
2227 NDR_CHECK(ndr_pull_align(ndr, 1));
2228 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
2230 if (ndr_flags & NDR_BUFFERS) {
2232 ndr->flags = _flags_save_STRUCT;
2234 return NDR_ERR_SUCCESS;
2237 _PUBLIC_ void ndr_print_package_PrimaryWDigestHash(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestHash *r)
2239 ndr_print_struct(ndr, name, "package_PrimaryWDigestHash");
2241 uint32_t _flags_save_STRUCT = ndr->flags;
2242 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2243 ndr->depth++;
2244 ndr_print_array_uint8(ndr, "hash", r->hash, 16);
2245 ndr->depth--;
2246 ndr->flags = _flags_save_STRUCT;
2250 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryWDigestBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestBlob *r)
2252 uint32_t cntr_hashes_0;
2253 if (ndr_flags & NDR_SCALARS) {
2254 NDR_CHECK(ndr_push_align(ndr, 4));
2255 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0x31));
2256 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0x01));
2257 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->num_hashes));
2258 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2259 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, 0));
2260 for (cntr_hashes_0 = 0; cntr_hashes_0 < r->num_hashes; cntr_hashes_0++) {
2261 NDR_CHECK(ndr_push_package_PrimaryWDigestHash(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0]));
2264 if (ndr_flags & NDR_BUFFERS) {
2266 return NDR_ERR_SUCCESS;
2269 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryWDigestBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestBlob *r)
2271 uint32_t cntr_hashes_0;
2272 TALLOC_CTX *_mem_save_hashes_0;
2273 if (ndr_flags & NDR_SCALARS) {
2274 NDR_CHECK(ndr_pull_align(ndr, 4));
2275 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown1));
2276 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown2));
2277 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->num_hashes));
2278 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
2279 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->uuknown4));
2280 NDR_PULL_ALLOC_N(ndr, r->hashes, r->num_hashes);
2281 _mem_save_hashes_0 = NDR_PULL_GET_MEM_CTX(ndr);
2282 NDR_PULL_SET_MEM_CTX(ndr, r->hashes, 0);
2283 for (cntr_hashes_0 = 0; cntr_hashes_0 < r->num_hashes; cntr_hashes_0++) {
2284 NDR_CHECK(ndr_pull_package_PrimaryWDigestHash(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0]));
2286 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hashes_0, 0);
2288 if (ndr_flags & NDR_BUFFERS) {
2290 return NDR_ERR_SUCCESS;
2293 _PUBLIC_ void ndr_print_package_PrimaryWDigestBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestBlob *r)
2295 uint32_t cntr_hashes_0;
2296 ndr_print_struct(ndr, name, "package_PrimaryWDigestBlob");
2297 ndr->depth++;
2298 ndr_print_uint16(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x31:r->unknown1);
2299 ndr_print_uint8(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x01:r->unknown2);
2300 ndr_print_uint8(ndr, "num_hashes", r->num_hashes);
2301 ndr_print_uint32(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown3);
2302 ndr_print_udlong(ndr, "uuknown4", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->uuknown4);
2303 ndr->print(ndr, "%s: ARRAY(%d)", "hashes", (int)r->num_hashes);
2304 ndr->depth++;
2305 for (cntr_hashes_0=0;cntr_hashes_0<r->num_hashes;cntr_hashes_0++) {
2306 char *idx_0=NULL;
2307 if (asprintf(&idx_0, "[%d]", cntr_hashes_0) != -1) {
2308 ndr_print_package_PrimaryWDigestHash(ndr, "hashes", &r->hashes[cntr_hashes_0]);
2309 free(idx_0);
2312 ndr->depth--;
2313 ndr->depth--;
2316 static enum ndr_err_code ndr_push_AuthInfoNone(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoNone *r)
2318 if (ndr_flags & NDR_SCALARS) {
2319 NDR_CHECK(ndr_push_align(ndr, 4));
2320 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2322 if (ndr_flags & NDR_BUFFERS) {
2324 return NDR_ERR_SUCCESS;
2327 static enum ndr_err_code ndr_pull_AuthInfoNone(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoNone *r)
2329 if (ndr_flags & NDR_SCALARS) {
2330 NDR_CHECK(ndr_pull_align(ndr, 4));
2331 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2333 if (ndr_flags & NDR_BUFFERS) {
2335 return NDR_ERR_SUCCESS;
2338 _PUBLIC_ void ndr_print_AuthInfoNone(struct ndr_print *ndr, const char *name, const struct AuthInfoNone *r)
2340 ndr_print_struct(ndr, name, "AuthInfoNone");
2341 ndr->depth++;
2342 ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->size);
2343 ndr->depth--;
2346 static enum ndr_err_code ndr_push_AuthInfoNT4Owf(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoNT4Owf *r)
2348 if (ndr_flags & NDR_SCALARS) {
2349 NDR_CHECK(ndr_push_align(ndr, 4));
2350 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 16));
2351 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->password));
2353 if (ndr_flags & NDR_BUFFERS) {
2355 return NDR_ERR_SUCCESS;
2358 static enum ndr_err_code ndr_pull_AuthInfoNT4Owf(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoNT4Owf *r)
2360 if (ndr_flags & NDR_SCALARS) {
2361 NDR_CHECK(ndr_pull_align(ndr, 4));
2362 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2363 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->password));
2365 if (ndr_flags & NDR_BUFFERS) {
2367 return NDR_ERR_SUCCESS;
2370 _PUBLIC_ void ndr_print_AuthInfoNT4Owf(struct ndr_print *ndr, const char *name, const struct AuthInfoNT4Owf *r)
2372 ndr_print_struct(ndr, name, "AuthInfoNT4Owf");
2373 ndr->depth++;
2374 ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?16:r->size);
2375 ndr_print_samr_Password(ndr, "password", &r->password);
2376 ndr->depth--;
2379 static enum ndr_err_code ndr_push_AuthInfoClear(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoClear *r)
2381 if (ndr_flags & NDR_SCALARS) {
2382 NDR_CHECK(ndr_push_align(ndr, 4));
2383 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
2384 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->password, r->size));
2386 if (ndr_flags & NDR_BUFFERS) {
2388 return NDR_ERR_SUCCESS;
2391 static enum ndr_err_code ndr_pull_AuthInfoClear(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoClear *r)
2393 if (ndr_flags & NDR_SCALARS) {
2394 NDR_CHECK(ndr_pull_align(ndr, 4));
2395 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2396 NDR_PULL_ALLOC_N(ndr, r->password, r->size);
2397 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->password, r->size));
2399 if (ndr_flags & NDR_BUFFERS) {
2401 return NDR_ERR_SUCCESS;
2404 _PUBLIC_ void ndr_print_AuthInfoClear(struct ndr_print *ndr, const char *name, const struct AuthInfoClear *r)
2406 ndr_print_struct(ndr, name, "AuthInfoClear");
2407 ndr->depth++;
2408 ndr_print_uint32(ndr, "size", r->size);
2409 ndr_print_array_uint8(ndr, "password", r->password, r->size);
2410 ndr->depth--;
2413 static enum ndr_err_code ndr_push_AuthInfoVersion(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoVersion *r)
2415 if (ndr_flags & NDR_SCALARS) {
2416 NDR_CHECK(ndr_push_align(ndr, 4));
2417 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 4));
2418 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
2420 if (ndr_flags & NDR_BUFFERS) {
2422 return NDR_ERR_SUCCESS;
2425 static enum ndr_err_code ndr_pull_AuthInfoVersion(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoVersion *r)
2427 if (ndr_flags & NDR_SCALARS) {
2428 NDR_CHECK(ndr_pull_align(ndr, 4));
2429 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2430 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
2432 if (ndr_flags & NDR_BUFFERS) {
2434 return NDR_ERR_SUCCESS;
2437 _PUBLIC_ void ndr_print_AuthInfoVersion(struct ndr_print *ndr, const char *name, const struct AuthInfoVersion *r)
2439 ndr_print_struct(ndr, name, "AuthInfoVersion");
2440 ndr->depth++;
2441 ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?4:r->size);
2442 ndr_print_uint32(ndr, "version", r->version);
2443 ndr->depth--;
2446 static enum ndr_err_code ndr_push_AuthInfo(struct ndr_push *ndr, int ndr_flags, const union AuthInfo *r)
2448 if (ndr_flags & NDR_SCALARS) {
2449 int level = ndr_push_get_switch_value(ndr, r);
2450 switch (level) {
2451 case TRUST_AUTH_TYPE_NONE: {
2452 NDR_CHECK(ndr_push_AuthInfoNone(ndr, NDR_SCALARS, &r->none));
2453 break; }
2455 case TRUST_AUTH_TYPE_NT4OWF: {
2456 NDR_CHECK(ndr_push_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf));
2457 break; }
2459 case TRUST_AUTH_TYPE_CLEAR: {
2460 NDR_CHECK(ndr_push_AuthInfoClear(ndr, NDR_SCALARS, &r->clear));
2461 break; }
2463 case TRUST_AUTH_TYPE_VERSION: {
2464 NDR_CHECK(ndr_push_AuthInfoVersion(ndr, NDR_SCALARS, &r->version));
2465 break; }
2467 default:
2468 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2471 if (ndr_flags & NDR_BUFFERS) {
2472 int level = ndr_push_get_switch_value(ndr, r);
2473 switch (level) {
2474 case TRUST_AUTH_TYPE_NONE:
2475 break;
2477 case TRUST_AUTH_TYPE_NT4OWF:
2478 break;
2480 case TRUST_AUTH_TYPE_CLEAR:
2481 break;
2483 case TRUST_AUTH_TYPE_VERSION:
2484 break;
2486 default:
2487 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2490 return NDR_ERR_SUCCESS;
2493 static enum ndr_err_code ndr_pull_AuthInfo(struct ndr_pull *ndr, int ndr_flags, union AuthInfo *r)
2495 int level;
2496 level = ndr_pull_get_switch_value(ndr, r);
2497 if (ndr_flags & NDR_SCALARS) {
2498 switch (level) {
2499 case TRUST_AUTH_TYPE_NONE: {
2500 NDR_CHECK(ndr_pull_AuthInfoNone(ndr, NDR_SCALARS, &r->none));
2501 break; }
2503 case TRUST_AUTH_TYPE_NT4OWF: {
2504 NDR_CHECK(ndr_pull_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf));
2505 break; }
2507 case TRUST_AUTH_TYPE_CLEAR: {
2508 NDR_CHECK(ndr_pull_AuthInfoClear(ndr, NDR_SCALARS, &r->clear));
2509 break; }
2511 case TRUST_AUTH_TYPE_VERSION: {
2512 NDR_CHECK(ndr_pull_AuthInfoVersion(ndr, NDR_SCALARS, &r->version));
2513 break; }
2515 default:
2516 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2519 if (ndr_flags & NDR_BUFFERS) {
2520 switch (level) {
2521 case TRUST_AUTH_TYPE_NONE:
2522 break;
2524 case TRUST_AUTH_TYPE_NT4OWF:
2525 break;
2527 case TRUST_AUTH_TYPE_CLEAR:
2528 break;
2530 case TRUST_AUTH_TYPE_VERSION:
2531 break;
2533 default:
2534 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2537 return NDR_ERR_SUCCESS;
2540 _PUBLIC_ void ndr_print_AuthInfo(struct ndr_print *ndr, const char *name, const union AuthInfo *r)
2542 int level;
2543 level = ndr_print_get_switch_value(ndr, r);
2544 ndr_print_union(ndr, name, level, "AuthInfo");
2545 switch (level) {
2546 case TRUST_AUTH_TYPE_NONE:
2547 ndr_print_AuthInfoNone(ndr, "none", &r->none);
2548 break;
2550 case TRUST_AUTH_TYPE_NT4OWF:
2551 ndr_print_AuthInfoNT4Owf(ndr, "nt4owf", &r->nt4owf);
2552 break;
2554 case TRUST_AUTH_TYPE_CLEAR:
2555 ndr_print_AuthInfoClear(ndr, "clear", &r->clear);
2556 break;
2558 case TRUST_AUTH_TYPE_VERSION:
2559 ndr_print_AuthInfoVersion(ndr, "version", &r->version);
2560 break;
2562 default:
2563 ndr_print_bad_level(ndr, name, level);
2567 _PUBLIC_ enum ndr_err_code ndr_push_AuthenticationInformation(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformation *r)
2569 if (ndr_flags & NDR_SCALARS) {
2570 NDR_CHECK(ndr_push_align(ndr, 4));
2571 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->LastUpdateTime));
2572 NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr, NDR_SCALARS, r->AuthType));
2573 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->AuthInfo, r->AuthType));
2574 NDR_CHECK(ndr_push_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo));
2576 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2577 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2578 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
2579 ndr->flags = _flags_save_DATA_BLOB;
2582 if (ndr_flags & NDR_BUFFERS) {
2584 return NDR_ERR_SUCCESS;
2587 _PUBLIC_ enum ndr_err_code ndr_pull_AuthenticationInformation(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformation *r)
2589 if (ndr_flags & NDR_SCALARS) {
2590 NDR_CHECK(ndr_pull_align(ndr, 4));
2591 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->LastUpdateTime));
2592 NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr, NDR_SCALARS, &r->AuthType));
2593 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->AuthInfo, r->AuthType));
2594 NDR_CHECK(ndr_pull_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo));
2596 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2597 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2598 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
2599 ndr->flags = _flags_save_DATA_BLOB;
2602 if (ndr_flags & NDR_BUFFERS) {
2604 return NDR_ERR_SUCCESS;
2607 _PUBLIC_ void ndr_print_AuthenticationInformation(struct ndr_print *ndr, const char *name, const struct AuthenticationInformation *r)
2609 ndr_print_struct(ndr, name, "AuthenticationInformation");
2610 ndr->depth++;
2611 ndr_print_NTTIME(ndr, "LastUpdateTime", r->LastUpdateTime);
2612 ndr_print_lsa_TrustAuthType(ndr, "AuthType", r->AuthType);
2613 ndr_print_set_switch_value(ndr, &r->AuthInfo, r->AuthType);
2614 ndr_print_AuthInfo(ndr, "AuthInfo", &r->AuthInfo);
2615 ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
2616 ndr->depth--;
2619 _PUBLIC_ size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, struct smb_iconv_convenience *ic, int flags)
2621 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustAuthInOutBlob, ic);
2624 _PUBLIC_ enum ndr_err_code ndr_push_trustCurrentPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustCurrentPasswords *r)
2626 uint32_t cntr_current_0;
2627 if (ndr_flags & NDR_SCALARS) {
2628 NDR_CHECK(ndr_push_align(ndr, 4));
2629 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2630 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
2631 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->current[cntr_current_0]));
2634 if (ndr_flags & NDR_BUFFERS) {
2635 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
2636 if (r->current[cntr_current_0]) {
2637 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->current[cntr_current_0]));
2638 NDR_CHECK(ndr_push_AuthenticationInformation(ndr, NDR_SCALARS, r->current[cntr_current_0]));
2642 return NDR_ERR_SUCCESS;
2645 _PUBLIC_ enum ndr_err_code ndr_pull_trustCurrentPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustCurrentPasswords *r)
2647 uint32_t _ptr_current;
2648 uint32_t cntr_current_0;
2649 TALLOC_CTX *_mem_save_current_0;
2650 TALLOC_CTX *_mem_save_current_1;
2651 if (ndr_flags & NDR_SCALARS) {
2652 NDR_CHECK(ndr_pull_align(ndr, 4));
2653 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2654 NDR_PULL_ALLOC_N(ndr, r->current, r->count);
2655 _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
2656 NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
2657 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
2658 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_current));
2659 if (_ptr_current) {
2660 NDR_PULL_ALLOC(ndr, r->current[cntr_current_0]);
2661 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->current[cntr_current_0], _ptr_current));
2662 } else {
2663 r->current[cntr_current_0] = NULL;
2666 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
2668 if (ndr_flags & NDR_BUFFERS) {
2669 _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
2670 NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
2671 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
2672 if (r->current[cntr_current_0]) {
2673 uint32_t _relative_save_offset;
2674 _relative_save_offset = ndr->offset;
2675 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->current[cntr_current_0]));
2676 _mem_save_current_1 = NDR_PULL_GET_MEM_CTX(ndr);
2677 NDR_PULL_SET_MEM_CTX(ndr, r->current[cntr_current_0], 0);
2678 NDR_CHECK(ndr_pull_AuthenticationInformation(ndr, NDR_SCALARS, r->current[cntr_current_0]));
2679 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_1, 0);
2680 ndr->offset = _relative_save_offset;
2683 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
2685 return NDR_ERR_SUCCESS;
2688 _PUBLIC_ void ndr_print_trustCurrentPasswords(struct ndr_print *ndr, const char *name, const struct trustCurrentPasswords *r)
2690 uint32_t cntr_current_0;
2691 ndr_print_struct(ndr, name, "trustCurrentPasswords");
2692 ndr->depth++;
2693 ndr_print_uint32(ndr, "count", r->count);
2694 ndr->print(ndr, "%s: ARRAY(%d)", "current", (int)r->count);
2695 ndr->depth++;
2696 for (cntr_current_0=0;cntr_current_0<r->count;cntr_current_0++) {
2697 char *idx_0=NULL;
2698 if (asprintf(&idx_0, "[%d]", cntr_current_0) != -1) {
2699 ndr_print_ptr(ndr, "current", r->current[cntr_current_0]);
2700 ndr->depth++;
2701 if (r->current[cntr_current_0]) {
2702 ndr_print_AuthenticationInformation(ndr, "current", r->current[cntr_current_0]);
2704 ndr->depth--;
2705 free(idx_0);
2708 ndr->depth--;
2709 ndr->depth--;
2712 _PUBLIC_ size_t ndr_size_trustCurrentPasswords(const struct trustCurrentPasswords *r, struct smb_iconv_convenience *ic, int flags)
2714 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustCurrentPasswords, ic);
2717 _PUBLIC_ enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustDomainPasswords *r)
2719 if (ndr_flags & NDR_SCALARS) {
2720 NDR_CHECK(ndr_push_align(ndr, 4));
2721 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->confounder, 512));
2723 struct ndr_push *_ndr_outgoing;
2724 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags)));
2725 NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_outgoing, NDR_SCALARS|NDR_BUFFERS, &r->outgoing));
2726 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags)));
2729 struct ndr_push *_ndr_incoming;
2730 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags)));
2731 NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_incoming, NDR_SCALARS|NDR_BUFFERS, &r->incoming));
2732 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags)));
2734 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags)));
2735 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags)));
2737 if (ndr_flags & NDR_BUFFERS) {
2739 return NDR_ERR_SUCCESS;
2742 _PUBLIC_ void ndr_print_trustDomainPasswords(struct ndr_print *ndr, const char *name, const struct trustDomainPasswords *r)
2744 ndr_print_struct(ndr, name, "trustDomainPasswords");
2745 ndr->depth++;
2746 ndr_print_array_uint8(ndr, "confounder", r->confounder, 512);
2747 ndr_print_trustCurrentPasswords(ndr, "outgoing", &r->outgoing);
2748 ndr_print_trustCurrentPasswords(ndr, "incoming", &r->incoming);
2749 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);
2750 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);
2751 ndr->depth--;
2754 _PUBLIC_ enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r)
2756 if (ndr_flags & NDR_SCALARS) {
2757 NDR_CHECK(ndr_push_align(ndr, 4));
2758 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->marker));
2759 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
2761 if (ndr_flags & NDR_BUFFERS) {
2763 return NDR_ERR_SUCCESS;
2766 _PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r)
2768 if (ndr_flags & NDR_SCALARS) {
2769 NDR_CHECK(ndr_pull_align(ndr, 4));
2770 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->marker));
2771 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
2773 if (ndr_flags & NDR_BUFFERS) {
2775 return NDR_ERR_SUCCESS;
2778 _PUBLIC_ void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r)
2780 ndr_print_struct(ndr, name, "DsCompressedChunk");
2781 ndr->depth++;
2782 ndr_print_uint32(ndr, "marker", r->marker);
2783 ndr_print_DATA_BLOB(ndr, "data", r->data);
2784 ndr->depth--;
2787 static enum ndr_err_code ndr_push_ExtendedErrorAString(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorAString *r)
2789 if (ndr_flags & NDR_SCALARS) {
2790 NDR_CHECK(ndr_push_align(ndr, 4));
2791 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size));
2792 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
2794 if (ndr_flags & NDR_BUFFERS) {
2795 if (r->string) {
2796 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->__size));
2797 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint8_t), CH_DOS));
2800 return NDR_ERR_SUCCESS;
2803 static enum ndr_err_code ndr_pull_ExtendedErrorAString(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorAString *r)
2805 uint32_t _ptr_string;
2806 TALLOC_CTX *_mem_save_string_0;
2807 if (ndr_flags & NDR_SCALARS) {
2808 NDR_CHECK(ndr_pull_align(ndr, 4));
2809 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__size));
2810 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
2811 if (_ptr_string) {
2812 NDR_PULL_ALLOC(ndr, r->string);
2813 } else {
2814 r->string = NULL;
2817 if (ndr_flags & NDR_BUFFERS) {
2818 if (r->string) {
2819 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
2820 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
2821 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
2822 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(ndr, &r->string), sizeof(uint8_t), CH_DOS));
2823 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
2825 if (r->string) {
2826 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->__size));
2829 return NDR_ERR_SUCCESS;
2832 _PUBLIC_ void ndr_print_ExtendedErrorAString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorAString *r)
2834 ndr_print_struct(ndr, name, "ExtendedErrorAString");
2835 ndr->depth++;
2836 ndr_print_uint16(ndr, "__size", r->__size);
2837 ndr_print_ptr(ndr, "string", r->string);
2838 ndr->depth++;
2839 if (r->string) {
2840 ndr_print_string(ndr, "string", r->string);
2842 ndr->depth--;
2843 ndr->depth--;
2846 static enum ndr_err_code ndr_push_ExtendedErrorUString(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorUString *r)
2848 if (ndr_flags & NDR_SCALARS) {
2849 NDR_CHECK(ndr_push_align(ndr, 4));
2850 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size));
2851 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
2853 if (ndr_flags & NDR_BUFFERS) {
2854 if (r->string) {
2855 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->__size));
2856 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint16_t), CH_UTF16));
2859 return NDR_ERR_SUCCESS;
2862 static enum ndr_err_code ndr_pull_ExtendedErrorUString(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorUString *r)
2864 uint32_t _ptr_string;
2865 TALLOC_CTX *_mem_save_string_0;
2866 if (ndr_flags & NDR_SCALARS) {
2867 NDR_CHECK(ndr_pull_align(ndr, 4));
2868 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__size));
2869 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
2870 if (_ptr_string) {
2871 NDR_PULL_ALLOC(ndr, r->string);
2872 } else {
2873 r->string = NULL;
2876 if (ndr_flags & NDR_BUFFERS) {
2877 if (r->string) {
2878 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
2879 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
2880 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
2881 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(ndr, &r->string), sizeof(uint16_t), CH_UTF16));
2882 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
2884 if (r->string) {
2885 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->__size));
2888 return NDR_ERR_SUCCESS;
2891 _PUBLIC_ void ndr_print_ExtendedErrorUString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorUString *r)
2893 ndr_print_struct(ndr, name, "ExtendedErrorUString");
2894 ndr->depth++;
2895 ndr_print_uint16(ndr, "__size", r->__size);
2896 ndr_print_ptr(ndr, "string", r->string);
2897 ndr->depth++;
2898 if (r->string) {
2899 ndr_print_string(ndr, "string", r->string);
2901 ndr->depth--;
2902 ndr->depth--;
2905 static enum ndr_err_code ndr_push_ExtendedErrorBlob(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorBlob *r)
2907 if (ndr_flags & NDR_SCALARS) {
2908 NDR_CHECK(ndr_push_align(ndr, 4));
2909 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
2910 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
2912 if (ndr_flags & NDR_BUFFERS) {
2913 if (r->data) {
2914 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
2915 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
2918 return NDR_ERR_SUCCESS;
2921 static enum ndr_err_code ndr_pull_ExtendedErrorBlob(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorBlob *r)
2923 uint32_t _ptr_data;
2924 TALLOC_CTX *_mem_save_data_0;
2925 if (ndr_flags & NDR_SCALARS) {
2926 NDR_CHECK(ndr_pull_align(ndr, 4));
2927 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
2928 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
2929 if (_ptr_data) {
2930 NDR_PULL_ALLOC(ndr, r->data);
2931 } else {
2932 r->data = NULL;
2935 if (ndr_flags & NDR_BUFFERS) {
2936 if (r->data) {
2937 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2938 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
2939 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
2940 NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
2941 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
2942 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
2944 if (r->data) {
2945 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length));
2948 return NDR_ERR_SUCCESS;
2951 _PUBLIC_ void ndr_print_ExtendedErrorBlob(struct ndr_print *ndr, const char *name, const struct ExtendedErrorBlob *r)
2953 ndr_print_struct(ndr, name, "ExtendedErrorBlob");
2954 ndr->depth++;
2955 ndr_print_uint16(ndr, "length", r->length);
2956 ndr_print_ptr(ndr, "data", r->data);
2957 ndr->depth++;
2958 if (r->data) {
2959 ndr_print_array_uint8(ndr, "data", r->data, r->length);
2961 ndr->depth--;
2962 ndr->depth--;
2965 static enum ndr_err_code ndr_push_ExtendedErrorComputerNamePresent(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent r)
2967 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
2968 return NDR_ERR_SUCCESS;
2971 static enum ndr_err_code ndr_pull_ExtendedErrorComputerNamePresent(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent *r)
2973 uint16_t v;
2974 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
2975 *r = v;
2976 return NDR_ERR_SUCCESS;
2979 _PUBLIC_ void ndr_print_ExtendedErrorComputerNamePresent(struct ndr_print *ndr, const char *name, enum ExtendedErrorComputerNamePresent r)
2981 const char *val = NULL;
2983 switch (r) {
2984 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_PRESENT"; break;
2985 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT"; break;
2987 ndr_print_enum(ndr, name, "ENUM", val, r);
2990 static enum ndr_err_code ndr_push_ExtendedErrorComputerNameU(struct ndr_push *ndr, int ndr_flags, const union ExtendedErrorComputerNameU *r)
2992 if (ndr_flags & NDR_SCALARS) {
2993 int level = ndr_push_get_switch_value(ndr, r);
2994 NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, level));
2995 switch (level) {
2996 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: {
2997 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name));
2998 break; }
3000 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: {
3001 break; }
3003 default:
3004 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3007 if (ndr_flags & NDR_BUFFERS) {
3008 int level = ndr_push_get_switch_value(ndr, r);
3009 switch (level) {
3010 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
3011 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name));
3012 break;
3014 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
3015 break;
3017 default:
3018 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3021 return NDR_ERR_SUCCESS;
3024 static enum ndr_err_code ndr_pull_ExtendedErrorComputerNameU(struct ndr_pull *ndr, int ndr_flags, union ExtendedErrorComputerNameU *r)
3026 int level;
3027 uint16_t _level;
3028 level = ndr_pull_get_switch_value(ndr, r);
3029 if (ndr_flags & NDR_SCALARS) {
3030 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
3031 if (_level != level) {
3032 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
3034 switch (level) {
3035 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: {
3036 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name));
3037 break; }
3039 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: {
3040 break; }
3042 default:
3043 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3046 if (ndr_flags & NDR_BUFFERS) {
3047 switch (level) {
3048 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
3049 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name));
3050 break;
3052 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
3053 break;
3055 default:
3056 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3059 return NDR_ERR_SUCCESS;
3062 _PUBLIC_ void ndr_print_ExtendedErrorComputerNameU(struct ndr_print *ndr, const char *name, const union ExtendedErrorComputerNameU *r)
3064 int level;
3065 level = ndr_print_get_switch_value(ndr, r);
3066 ndr_print_union(ndr, name, level, "ExtendedErrorComputerNameU");
3067 switch (level) {
3068 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
3069 ndr_print_ExtendedErrorUString(ndr, "name", &r->name);
3070 break;
3072 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
3073 break;
3075 default:
3076 ndr_print_bad_level(ndr, name, level);
3080 static enum ndr_err_code ndr_push_ExtendedErrorComputerName(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorComputerName *r)
3082 if (ndr_flags & NDR_SCALARS) {
3083 NDR_CHECK(ndr_push_align(ndr, 4));
3084 NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, r->present));
3085 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->n, r->present));
3086 NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n));
3088 if (ndr_flags & NDR_BUFFERS) {
3089 NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n));
3091 return NDR_ERR_SUCCESS;
3094 static enum ndr_err_code ndr_pull_ExtendedErrorComputerName(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorComputerName *r)
3096 if (ndr_flags & NDR_SCALARS) {
3097 NDR_CHECK(ndr_pull_align(ndr, 4));
3098 NDR_CHECK(ndr_pull_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, &r->present));
3099 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->n, r->present));
3100 NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n));
3102 if (ndr_flags & NDR_BUFFERS) {
3103 NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n));
3105 return NDR_ERR_SUCCESS;
3108 _PUBLIC_ void ndr_print_ExtendedErrorComputerName(struct ndr_print *ndr, const char *name, const struct ExtendedErrorComputerName *r)
3110 ndr_print_struct(ndr, name, "ExtendedErrorComputerName");
3111 ndr->depth++;
3112 ndr_print_ExtendedErrorComputerNamePresent(ndr, "present", r->present);
3113 ndr_print_set_switch_value(ndr, &r->n, r->present);
3114 ndr_print_ExtendedErrorComputerNameU(ndr, "n", &r->n);
3115 ndr->depth--;
3118 static enum ndr_err_code ndr_push_ExtendedErrorParamType(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorParamType r)
3120 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
3121 return NDR_ERR_SUCCESS;
3124 static enum ndr_err_code ndr_pull_ExtendedErrorParamType(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorParamType *r)
3126 uint16_t v;
3127 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
3128 *r = v;
3129 return NDR_ERR_SUCCESS;
3132 _PUBLIC_ void ndr_print_ExtendedErrorParamType(struct ndr_print *ndr, const char *name, enum ExtendedErrorParamType r)
3134 const char *val = NULL;
3136 switch (r) {
3137 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING"; break;
3138 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING"; break;
3139 case EXTENDED_ERROR_PARAM_TYPE_UINT32: val = "EXTENDED_ERROR_PARAM_TYPE_UINT32"; break;
3140 case EXTENDED_ERROR_PARAM_TYPE_UINT16: val = "EXTENDED_ERROR_PARAM_TYPE_UINT16"; break;
3141 case EXTENDED_ERROR_PARAM_TYPE_UINT64: val = "EXTENDED_ERROR_PARAM_TYPE_UINT64"; break;
3142 case EXTENDED_ERROR_PARAM_TYPE_NONE: val = "EXTENDED_ERROR_PARAM_TYPE_NONE"; break;
3143 case EXTENDED_ERROR_PARAM_TYPE_BLOB: val = "EXTENDED_ERROR_PARAM_TYPE_BLOB"; break;
3145 ndr_print_enum(ndr, name, "ENUM", val, r);
3148 static enum ndr_err_code ndr_push_ExtendedErrorParamU(struct ndr_push *ndr, int ndr_flags, const union ExtendedErrorParamU *r)
3150 if (ndr_flags & NDR_SCALARS) {
3151 int level = ndr_push_get_switch_value(ndr, r);
3152 NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, level));
3153 switch (level) {
3154 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: {
3155 NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string));
3156 break; }
3158 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: {
3159 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string));
3160 break; }
3162 case EXTENDED_ERROR_PARAM_TYPE_UINT32: {
3163 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->uint32));
3164 break; }
3166 case EXTENDED_ERROR_PARAM_TYPE_UINT16: {
3167 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->uint16));
3168 break; }
3170 case EXTENDED_ERROR_PARAM_TYPE_UINT64: {
3171 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->uint64));
3172 break; }
3174 case EXTENDED_ERROR_PARAM_TYPE_NONE: {
3175 break; }
3177 case EXTENDED_ERROR_PARAM_TYPE_BLOB: {
3178 NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob));
3179 break; }
3181 default:
3182 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3185 if (ndr_flags & NDR_BUFFERS) {
3186 int level = ndr_push_get_switch_value(ndr, r);
3187 switch (level) {
3188 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
3189 NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string));
3190 break;
3192 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
3193 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string));
3194 break;
3196 case EXTENDED_ERROR_PARAM_TYPE_UINT32:
3197 break;
3199 case EXTENDED_ERROR_PARAM_TYPE_UINT16:
3200 break;
3202 case EXTENDED_ERROR_PARAM_TYPE_UINT64:
3203 break;
3205 case EXTENDED_ERROR_PARAM_TYPE_NONE:
3206 break;
3208 case EXTENDED_ERROR_PARAM_TYPE_BLOB:
3209 NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob));
3210 break;
3212 default:
3213 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3216 return NDR_ERR_SUCCESS;
3219 static enum ndr_err_code ndr_pull_ExtendedErrorParamU(struct ndr_pull *ndr, int ndr_flags, union ExtendedErrorParamU *r)
3221 int level;
3222 uint16_t _level;
3223 level = ndr_pull_get_switch_value(ndr, r);
3224 if (ndr_flags & NDR_SCALARS) {
3225 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
3226 if (_level != level) {
3227 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
3229 switch (level) {
3230 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: {
3231 NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string));
3232 break; }
3234 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: {
3235 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string));
3236 break; }
3238 case EXTENDED_ERROR_PARAM_TYPE_UINT32: {
3239 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->uint32));
3240 break; }
3242 case EXTENDED_ERROR_PARAM_TYPE_UINT16: {
3243 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->uint16));
3244 break; }
3246 case EXTENDED_ERROR_PARAM_TYPE_UINT64: {
3247 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->uint64));
3248 break; }
3250 case EXTENDED_ERROR_PARAM_TYPE_NONE: {
3251 break; }
3253 case EXTENDED_ERROR_PARAM_TYPE_BLOB: {
3254 NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob));
3255 break; }
3257 default:
3258 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3261 if (ndr_flags & NDR_BUFFERS) {
3262 switch (level) {
3263 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
3264 NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string));
3265 break;
3267 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
3268 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string));
3269 break;
3271 case EXTENDED_ERROR_PARAM_TYPE_UINT32:
3272 break;
3274 case EXTENDED_ERROR_PARAM_TYPE_UINT16:
3275 break;
3277 case EXTENDED_ERROR_PARAM_TYPE_UINT64:
3278 break;
3280 case EXTENDED_ERROR_PARAM_TYPE_NONE:
3281 break;
3283 case EXTENDED_ERROR_PARAM_TYPE_BLOB:
3284 NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob));
3285 break;
3287 default:
3288 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3291 return NDR_ERR_SUCCESS;
3294 _PUBLIC_ void ndr_print_ExtendedErrorParamU(struct ndr_print *ndr, const char *name, const union ExtendedErrorParamU *r)
3296 int level;
3297 level = ndr_print_get_switch_value(ndr, r);
3298 ndr_print_union(ndr, name, level, "ExtendedErrorParamU");
3299 switch (level) {
3300 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
3301 ndr_print_ExtendedErrorAString(ndr, "a_string", &r->a_string);
3302 break;
3304 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
3305 ndr_print_ExtendedErrorUString(ndr, "u_string", &r->u_string);
3306 break;
3308 case EXTENDED_ERROR_PARAM_TYPE_UINT32:
3309 ndr_print_uint32(ndr, "uint32", r->uint32);
3310 break;
3312 case EXTENDED_ERROR_PARAM_TYPE_UINT16:
3313 ndr_print_uint16(ndr, "uint16", r->uint16);
3314 break;
3316 case EXTENDED_ERROR_PARAM_TYPE_UINT64:
3317 ndr_print_hyper(ndr, "uint64", r->uint64);
3318 break;
3320 case EXTENDED_ERROR_PARAM_TYPE_NONE:
3321 break;
3323 case EXTENDED_ERROR_PARAM_TYPE_BLOB:
3324 ndr_print_ExtendedErrorBlob(ndr, "blob", &r->blob);
3325 break;
3327 default:
3328 ndr_print_bad_level(ndr, name, level);
3332 static enum ndr_err_code ndr_push_ExtendedErrorParam(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorParam *r)
3334 if (ndr_flags & NDR_SCALARS) {
3335 NDR_CHECK(ndr_push_align(ndr, 8));
3336 NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, r->type));
3337 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->p, r->type));
3338 NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p));
3340 if (ndr_flags & NDR_BUFFERS) {
3341 NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p));
3343 return NDR_ERR_SUCCESS;
3346 static enum ndr_err_code ndr_pull_ExtendedErrorParam(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorParam *r)
3348 if (ndr_flags & NDR_SCALARS) {
3349 NDR_CHECK(ndr_pull_align(ndr, 8));
3350 NDR_CHECK(ndr_pull_ExtendedErrorParamType(ndr, NDR_SCALARS, &r->type));
3351 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->p, r->type));
3352 NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p));
3354 if (ndr_flags & NDR_BUFFERS) {
3355 NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p));
3357 return NDR_ERR_SUCCESS;
3360 _PUBLIC_ void ndr_print_ExtendedErrorParam(struct ndr_print *ndr, const char *name, const struct ExtendedErrorParam *r)
3362 ndr_print_struct(ndr, name, "ExtendedErrorParam");
3363 ndr->depth++;
3364 ndr_print_ExtendedErrorParamType(ndr, "type", r->type);
3365 ndr_print_set_switch_value(ndr, &r->p, r->type);
3366 ndr_print_ExtendedErrorParamU(ndr, "p", &r->p);
3367 ndr->depth--;
3370 _PUBLIC_ enum ndr_err_code ndr_push_ExtendedErrorInfo(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfo *r)
3372 uint32_t cntr_params_0;
3373 if (ndr_flags & NDR_SCALARS) {
3374 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_params));
3375 NDR_CHECK(ndr_push_align(ndr, 8));
3376 NDR_CHECK(ndr_push_unique_ptr(ndr, r->next));
3377 NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name));
3378 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->pid));
3379 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time));
3380 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->generating_component));
3381 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status));
3382 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->detection_location));
3383 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->flags));
3384 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_params));
3385 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3386 NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0]));
3389 if (ndr_flags & NDR_BUFFERS) {
3390 if (r->next) {
3391 NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
3393 NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name));
3394 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3395 NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0]));
3398 return NDR_ERR_SUCCESS;
3401 _PUBLIC_ enum ndr_err_code ndr_pull_ExtendedErrorInfo(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfo *r)
3403 uint32_t _ptr_next;
3404 TALLOC_CTX *_mem_save_next_0;
3405 uint32_t cntr_params_0;
3406 TALLOC_CTX *_mem_save_params_0;
3407 if (ndr_flags & NDR_SCALARS) {
3408 NDR_CHECK(ndr_pull_array_size(ndr, &r->params));
3409 NDR_CHECK(ndr_pull_align(ndr, 8));
3410 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next));
3411 if (_ptr_next) {
3412 NDR_PULL_ALLOC(ndr, r->next);
3413 } else {
3414 r->next = NULL;
3416 NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name));
3417 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->pid));
3418 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time));
3419 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->generating_component));
3420 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status));
3421 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->detection_location));
3422 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags));
3423 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_params));
3424 NDR_PULL_ALLOC_N(ndr, r->params, ndr_get_array_size(ndr, &r->params));
3425 _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr);
3426 NDR_PULL_SET_MEM_CTX(ndr, r->params, 0);
3427 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3428 NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0]));
3430 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0);
3431 if (r->params) {
3432 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->params, r->num_params));
3435 if (ndr_flags & NDR_BUFFERS) {
3436 if (r->next) {
3437 _mem_save_next_0 = NDR_PULL_GET_MEM_CTX(ndr);
3438 NDR_PULL_SET_MEM_CTX(ndr, r->next, 0);
3439 NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
3440 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_0, 0);
3442 NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name));
3443 _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr);
3444 NDR_PULL_SET_MEM_CTX(ndr, r->params, 0);
3445 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3446 NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0]));
3448 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0);
3450 return NDR_ERR_SUCCESS;
3453 _PUBLIC_ void ndr_print_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfo *r)
3455 uint32_t cntr_params_0;
3456 ndr_print_struct(ndr, name, "ExtendedErrorInfo");
3457 ndr->depth++;
3458 ndr_print_ptr(ndr, "next", r->next);
3459 ndr->depth++;
3460 if (r->next) {
3461 ndr_print_ExtendedErrorInfo(ndr, "next", r->next);
3463 ndr->depth--;
3464 ndr_print_ExtendedErrorComputerName(ndr, "computer_name", &r->computer_name);
3465 ndr_print_hyper(ndr, "pid", r->pid);
3466 ndr_print_NTTIME(ndr, "time", r->time);
3467 ndr_print_uint32(ndr, "generating_component", r->generating_component);
3468 ndr_print_WERROR(ndr, "status", r->status);
3469 ndr_print_uint16(ndr, "detection_location", r->detection_location);
3470 ndr_print_uint16(ndr, "flags", r->flags);
3471 ndr_print_uint16(ndr, "num_params", r->num_params);
3472 ndr->print(ndr, "%s: ARRAY(%d)", "params", (int)r->num_params);
3473 ndr->depth++;
3474 for (cntr_params_0=0;cntr_params_0<r->num_params;cntr_params_0++) {
3475 char *idx_0=NULL;
3476 if (asprintf(&idx_0, "[%d]", cntr_params_0) != -1) {
3477 ndr_print_ExtendedErrorParam(ndr, "params", &r->params[cntr_params_0]);
3478 free(idx_0);
3481 ndr->depth--;
3482 ndr->depth--;
3485 static enum ndr_err_code ndr_push_ExtendedErrorInfoPtr(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfoPtr *r)
3487 if (ndr_flags & NDR_SCALARS) {
3488 NDR_CHECK(ndr_push_align(ndr, 4));
3489 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
3491 if (ndr_flags & NDR_BUFFERS) {
3492 if (r->info) {
3493 NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
3496 return NDR_ERR_SUCCESS;
3499 static enum ndr_err_code ndr_pull_ExtendedErrorInfoPtr(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfoPtr *r)
3501 uint32_t _ptr_info;
3502 TALLOC_CTX *_mem_save_info_0;
3503 if (ndr_flags & NDR_SCALARS) {
3504 NDR_CHECK(ndr_pull_align(ndr, 4));
3505 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
3506 if (_ptr_info) {
3507 NDR_PULL_ALLOC(ndr, r->info);
3508 } else {
3509 r->info = NULL;
3512 if (ndr_flags & NDR_BUFFERS) {
3513 if (r->info) {
3514 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3515 NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
3516 NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
3517 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
3520 return NDR_ERR_SUCCESS;
3523 _PUBLIC_ void ndr_print_ExtendedErrorInfoPtr(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfoPtr *r)
3525 ndr_print_struct(ndr, name, "ExtendedErrorInfoPtr");
3526 ndr->depth++;
3527 ndr_print_ptr(ndr, "info", r->info);
3528 ndr->depth++;
3529 if (r->info) {
3530 ndr_print_ExtendedErrorInfo(ndr, "info", r->info);
3532 ndr->depth--;
3533 ndr->depth--;
3536 static enum ndr_err_code ndr_push_decode_replPropertyMetaData(struct ndr_push *ndr, int flags, const struct decode_replPropertyMetaData *r)
3538 if (flags & NDR_IN) {
3539 NDR_CHECK(ndr_push_replPropertyMetaDataBlob(ndr, NDR_SCALARS, &r->in.blob));
3541 if (flags & NDR_OUT) {
3543 return NDR_ERR_SUCCESS;
3546 static enum ndr_err_code ndr_pull_decode_replPropertyMetaData(struct ndr_pull *ndr, int flags, struct decode_replPropertyMetaData *r)
3548 if (flags & NDR_IN) {
3549 NDR_CHECK(ndr_pull_replPropertyMetaDataBlob(ndr, NDR_SCALARS, &r->in.blob));
3551 if (flags & NDR_OUT) {
3553 return NDR_ERR_SUCCESS;
3556 _PUBLIC_ void ndr_print_decode_replPropertyMetaData(struct ndr_print *ndr, const char *name, int flags, const struct decode_replPropertyMetaData *r)
3558 ndr_print_struct(ndr, name, "decode_replPropertyMetaData");
3559 ndr->depth++;
3560 if (flags & NDR_SET_VALUES) {
3561 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3563 if (flags & NDR_IN) {
3564 ndr_print_struct(ndr, "in", "decode_replPropertyMetaData");
3565 ndr->depth++;
3566 ndr_print_replPropertyMetaDataBlob(ndr, "blob", &r->in.blob);
3567 ndr->depth--;
3569 if (flags & NDR_OUT) {
3570 ndr_print_struct(ndr, "out", "decode_replPropertyMetaData");
3571 ndr->depth++;
3572 ndr->depth--;
3574 ndr->depth--;
3577 static enum ndr_err_code ndr_push_decode_replUpToDateVector(struct ndr_push *ndr, int flags, const struct decode_replUpToDateVector *r)
3579 if (flags & NDR_IN) {
3580 NDR_CHECK(ndr_push_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->in.blob));
3582 if (flags & NDR_OUT) {
3584 return NDR_ERR_SUCCESS;
3587 static enum ndr_err_code ndr_pull_decode_replUpToDateVector(struct ndr_pull *ndr, int flags, struct decode_replUpToDateVector *r)
3589 if (flags & NDR_IN) {
3590 NDR_CHECK(ndr_pull_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->in.blob));
3592 if (flags & NDR_OUT) {
3594 return NDR_ERR_SUCCESS;
3597 _PUBLIC_ void ndr_print_decode_replUpToDateVector(struct ndr_print *ndr, const char *name, int flags, const struct decode_replUpToDateVector *r)
3599 ndr_print_struct(ndr, name, "decode_replUpToDateVector");
3600 ndr->depth++;
3601 if (flags & NDR_SET_VALUES) {
3602 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3604 if (flags & NDR_IN) {
3605 ndr_print_struct(ndr, "in", "decode_replUpToDateVector");
3606 ndr->depth++;
3607 ndr_print_replUpToDateVectorBlob(ndr, "blob", &r->in.blob);
3608 ndr->depth--;
3610 if (flags & NDR_OUT) {
3611 ndr_print_struct(ndr, "out", "decode_replUpToDateVector");
3612 ndr->depth++;
3613 ndr->depth--;
3615 ndr->depth--;
3618 static enum ndr_err_code ndr_push_decode_repsFromTo(struct ndr_push *ndr, int flags, const struct decode_repsFromTo *r)
3620 if (flags & NDR_IN) {
3621 NDR_CHECK(ndr_push_repsFromToBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3623 if (flags & NDR_OUT) {
3625 return NDR_ERR_SUCCESS;
3628 static enum ndr_err_code ndr_pull_decode_repsFromTo(struct ndr_pull *ndr, int flags, struct decode_repsFromTo *r)
3630 if (flags & NDR_IN) {
3631 NDR_CHECK(ndr_pull_repsFromToBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3633 if (flags & NDR_OUT) {
3635 return NDR_ERR_SUCCESS;
3638 _PUBLIC_ void ndr_print_decode_repsFromTo(struct ndr_print *ndr, const char *name, int flags, const struct decode_repsFromTo *r)
3640 ndr_print_struct(ndr, name, "decode_repsFromTo");
3641 ndr->depth++;
3642 if (flags & NDR_SET_VALUES) {
3643 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3645 if (flags & NDR_IN) {
3646 ndr_print_struct(ndr, "in", "decode_repsFromTo");
3647 ndr->depth++;
3648 ndr_print_repsFromToBlob(ndr, "blob", &r->in.blob);
3649 ndr->depth--;
3651 if (flags & NDR_OUT) {
3652 ndr_print_struct(ndr, "out", "decode_repsFromTo");
3653 ndr->depth++;
3654 ndr->depth--;
3656 ndr->depth--;
3659 static enum ndr_err_code ndr_push_decode_partialAttributeSet(struct ndr_push *ndr, int flags, const struct decode_partialAttributeSet *r)
3661 if (flags & NDR_IN) {
3662 NDR_CHECK(ndr_push_partialAttributeSetBlob(ndr, NDR_SCALARS, &r->in.blob));
3664 if (flags & NDR_OUT) {
3666 return NDR_ERR_SUCCESS;
3669 static enum ndr_err_code ndr_pull_decode_partialAttributeSet(struct ndr_pull *ndr, int flags, struct decode_partialAttributeSet *r)
3671 if (flags & NDR_IN) {
3672 NDR_CHECK(ndr_pull_partialAttributeSetBlob(ndr, NDR_SCALARS, &r->in.blob));
3674 if (flags & NDR_OUT) {
3676 return NDR_ERR_SUCCESS;
3679 _PUBLIC_ void ndr_print_decode_partialAttributeSet(struct ndr_print *ndr, const char *name, int flags, const struct decode_partialAttributeSet *r)
3681 ndr_print_struct(ndr, name, "decode_partialAttributeSet");
3682 ndr->depth++;
3683 if (flags & NDR_SET_VALUES) {
3684 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3686 if (flags & NDR_IN) {
3687 ndr_print_struct(ndr, "in", "decode_partialAttributeSet");
3688 ndr->depth++;
3689 ndr_print_partialAttributeSetBlob(ndr, "blob", &r->in.blob);
3690 ndr->depth--;
3692 if (flags & NDR_OUT) {
3693 ndr_print_struct(ndr, "out", "decode_partialAttributeSet");
3694 ndr->depth++;
3695 ndr->depth--;
3697 ndr->depth--;
3700 static enum ndr_err_code ndr_push_decode_prefixMap(struct ndr_push *ndr, int flags, const struct decode_prefixMap *r)
3702 if (flags & NDR_IN) {
3703 NDR_CHECK(ndr_push_prefixMapBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3705 if (flags & NDR_OUT) {
3707 return NDR_ERR_SUCCESS;
3710 static enum ndr_err_code ndr_pull_decode_prefixMap(struct ndr_pull *ndr, int flags, struct decode_prefixMap *r)
3712 if (flags & NDR_IN) {
3713 NDR_CHECK(ndr_pull_prefixMapBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3715 if (flags & NDR_OUT) {
3717 return NDR_ERR_SUCCESS;
3720 _PUBLIC_ void ndr_print_decode_prefixMap(struct ndr_print *ndr, const char *name, int flags, const struct decode_prefixMap *r)
3722 ndr_print_struct(ndr, name, "decode_prefixMap");
3723 ndr->depth++;
3724 if (flags & NDR_SET_VALUES) {
3725 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3727 if (flags & NDR_IN) {
3728 ndr_print_struct(ndr, "in", "decode_prefixMap");
3729 ndr->depth++;
3730 ndr_print_prefixMapBlob(ndr, "blob", &r->in.blob);
3731 ndr->depth--;
3733 if (flags & NDR_OUT) {
3734 ndr_print_struct(ndr, "out", "decode_prefixMap");
3735 ndr->depth++;
3736 ndr->depth--;
3738 ndr->depth--;
3741 static enum ndr_err_code ndr_push_decode_ldapControlDirSync(struct ndr_push *ndr, int flags, const struct decode_ldapControlDirSync *r)
3743 if (flags & NDR_IN) {
3744 NDR_CHECK(ndr_push_ldapControlDirSyncCookie(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.cookie));
3746 if (flags & NDR_OUT) {
3748 return NDR_ERR_SUCCESS;
3751 static enum ndr_err_code ndr_pull_decode_ldapControlDirSync(struct ndr_pull *ndr, int flags, struct decode_ldapControlDirSync *r)
3753 if (flags & NDR_IN) {
3754 NDR_CHECK(ndr_pull_ldapControlDirSyncCookie(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.cookie));
3756 if (flags & NDR_OUT) {
3758 return NDR_ERR_SUCCESS;
3761 _PUBLIC_ void ndr_print_decode_ldapControlDirSync(struct ndr_print *ndr, const char *name, int flags, const struct decode_ldapControlDirSync *r)
3763 ndr_print_struct(ndr, name, "decode_ldapControlDirSync");
3764 ndr->depth++;
3765 if (flags & NDR_SET_VALUES) {
3766 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3768 if (flags & NDR_IN) {
3769 ndr_print_struct(ndr, "in", "decode_ldapControlDirSync");
3770 ndr->depth++;
3771 ndr_print_ldapControlDirSyncCookie(ndr, "cookie", &r->in.cookie);
3772 ndr->depth--;
3774 if (flags & NDR_OUT) {
3775 ndr_print_struct(ndr, "out", "decode_ldapControlDirSync");
3776 ndr->depth++;
3777 ndr->depth--;
3779 ndr->depth--;
3782 static enum ndr_err_code ndr_push_decode_supplementalCredentials(struct ndr_push *ndr, int flags, const struct decode_supplementalCredentials *r)
3784 if (flags & NDR_IN) {
3785 NDR_CHECK(ndr_push_supplementalCredentialsBlob(ndr, NDR_SCALARS, &r->in.blob));
3787 if (flags & NDR_OUT) {
3789 return NDR_ERR_SUCCESS;
3792 static enum ndr_err_code ndr_pull_decode_supplementalCredentials(struct ndr_pull *ndr, int flags, struct decode_supplementalCredentials *r)
3794 if (flags & NDR_IN) {
3795 NDR_CHECK(ndr_pull_supplementalCredentialsBlob(ndr, NDR_SCALARS, &r->in.blob));
3797 if (flags & NDR_OUT) {
3799 return NDR_ERR_SUCCESS;
3802 _PUBLIC_ void ndr_print_decode_supplementalCredentials(struct ndr_print *ndr, const char *name, int flags, const struct decode_supplementalCredentials *r)
3804 ndr_print_struct(ndr, name, "decode_supplementalCredentials");
3805 ndr->depth++;
3806 if (flags & NDR_SET_VALUES) {
3807 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3809 if (flags & NDR_IN) {
3810 ndr_print_struct(ndr, "in", "decode_supplementalCredentials");
3811 ndr->depth++;
3812 ndr_print_supplementalCredentialsBlob(ndr, "blob", &r->in.blob);
3813 ndr->depth--;
3815 if (flags & NDR_OUT) {
3816 ndr_print_struct(ndr, "out", "decode_supplementalCredentials");
3817 ndr->depth++;
3818 ndr->depth--;
3820 ndr->depth--;
3823 static enum ndr_err_code ndr_push_decode_Packages(struct ndr_push *ndr, int flags, const struct decode_Packages *r)
3825 if (flags & NDR_IN) {
3826 NDR_CHECK(ndr_push_package_PackagesBlob(ndr, NDR_SCALARS, &r->in.blob));
3828 if (flags & NDR_OUT) {
3830 return NDR_ERR_SUCCESS;
3833 static enum ndr_err_code ndr_pull_decode_Packages(struct ndr_pull *ndr, int flags, struct decode_Packages *r)
3835 if (flags & NDR_IN) {
3836 NDR_CHECK(ndr_pull_package_PackagesBlob(ndr, NDR_SCALARS, &r->in.blob));
3838 if (flags & NDR_OUT) {
3840 return NDR_ERR_SUCCESS;
3843 _PUBLIC_ void ndr_print_decode_Packages(struct ndr_print *ndr, const char *name, int flags, const struct decode_Packages *r)
3845 ndr_print_struct(ndr, name, "decode_Packages");
3846 ndr->depth++;
3847 if (flags & NDR_SET_VALUES) {
3848 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3850 if (flags & NDR_IN) {
3851 ndr_print_struct(ndr, "in", "decode_Packages");
3852 ndr->depth++;
3853 ndr_print_package_PackagesBlob(ndr, "blob", &r->in.blob);
3854 ndr->depth--;
3856 if (flags & NDR_OUT) {
3857 ndr_print_struct(ndr, "out", "decode_Packages");
3858 ndr->depth++;
3859 ndr->depth--;
3861 ndr->depth--;
3864 static enum ndr_err_code ndr_push_decode_PrimaryKerberos(struct ndr_push *ndr, int flags, const struct decode_PrimaryKerberos *r)
3866 if (flags & NDR_IN) {
3867 NDR_CHECK(ndr_push_package_PrimaryKerberosBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3869 if (flags & NDR_OUT) {
3871 return NDR_ERR_SUCCESS;
3874 static enum ndr_err_code ndr_pull_decode_PrimaryKerberos(struct ndr_pull *ndr, int flags, struct decode_PrimaryKerberos *r)
3876 if (flags & NDR_IN) {
3877 NDR_CHECK(ndr_pull_package_PrimaryKerberosBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3879 if (flags & NDR_OUT) {
3881 return NDR_ERR_SUCCESS;
3884 _PUBLIC_ void ndr_print_decode_PrimaryKerberos(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryKerberos *r)
3886 ndr_print_struct(ndr, name, "decode_PrimaryKerberos");
3887 ndr->depth++;
3888 if (flags & NDR_SET_VALUES) {
3889 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3891 if (flags & NDR_IN) {
3892 ndr_print_struct(ndr, "in", "decode_PrimaryKerberos");
3893 ndr->depth++;
3894 ndr_print_package_PrimaryKerberosBlob(ndr, "blob", &r->in.blob);
3895 ndr->depth--;
3897 if (flags & NDR_OUT) {
3898 ndr_print_struct(ndr, "out", "decode_PrimaryKerberos");
3899 ndr->depth++;
3900 ndr->depth--;
3902 ndr->depth--;
3905 static enum ndr_err_code ndr_push_decode_PrimaryCLEARTEXT(struct ndr_push *ndr, int flags, const struct decode_PrimaryCLEARTEXT *r)
3907 if (flags & NDR_IN) {
3908 NDR_CHECK(ndr_push_package_PrimaryCLEARTEXTBlob(ndr, NDR_SCALARS, &r->in.blob));
3910 if (flags & NDR_OUT) {
3912 return NDR_ERR_SUCCESS;
3915 static enum ndr_err_code ndr_pull_decode_PrimaryCLEARTEXT(struct ndr_pull *ndr, int flags, struct decode_PrimaryCLEARTEXT *r)
3917 if (flags & NDR_IN) {
3918 NDR_CHECK(ndr_pull_package_PrimaryCLEARTEXTBlob(ndr, NDR_SCALARS, &r->in.blob));
3920 if (flags & NDR_OUT) {
3922 return NDR_ERR_SUCCESS;
3925 _PUBLIC_ void ndr_print_decode_PrimaryCLEARTEXT(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryCLEARTEXT *r)
3927 ndr_print_struct(ndr, name, "decode_PrimaryCLEARTEXT");
3928 ndr->depth++;
3929 if (flags & NDR_SET_VALUES) {
3930 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3932 if (flags & NDR_IN) {
3933 ndr_print_struct(ndr, "in", "decode_PrimaryCLEARTEXT");
3934 ndr->depth++;
3935 ndr_print_package_PrimaryCLEARTEXTBlob(ndr, "blob", &r->in.blob);
3936 ndr->depth--;
3938 if (flags & NDR_OUT) {
3939 ndr_print_struct(ndr, "out", "decode_PrimaryCLEARTEXT");
3940 ndr->depth++;
3941 ndr->depth--;
3943 ndr->depth--;
3946 static enum ndr_err_code ndr_push_decode_PrimaryWDigest(struct ndr_push *ndr, int flags, const struct decode_PrimaryWDigest *r)
3948 if (flags & NDR_IN) {
3949 NDR_CHECK(ndr_push_package_PrimaryWDigestBlob(ndr, NDR_SCALARS, &r->in.blob));
3951 if (flags & NDR_OUT) {
3953 return NDR_ERR_SUCCESS;
3956 static enum ndr_err_code ndr_pull_decode_PrimaryWDigest(struct ndr_pull *ndr, int flags, struct decode_PrimaryWDigest *r)
3958 if (flags & NDR_IN) {
3959 NDR_CHECK(ndr_pull_package_PrimaryWDigestBlob(ndr, NDR_SCALARS, &r->in.blob));
3961 if (flags & NDR_OUT) {
3963 return NDR_ERR_SUCCESS;
3966 _PUBLIC_ void ndr_print_decode_PrimaryWDigest(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryWDigest *r)
3968 ndr_print_struct(ndr, name, "decode_PrimaryWDigest");
3969 ndr->depth++;
3970 if (flags & NDR_SET_VALUES) {
3971 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3973 if (flags & NDR_IN) {
3974 ndr_print_struct(ndr, "in", "decode_PrimaryWDigest");
3975 ndr->depth++;
3976 ndr_print_package_PrimaryWDigestBlob(ndr, "blob", &r->in.blob);
3977 ndr->depth--;
3979 if (flags & NDR_OUT) {
3980 ndr_print_struct(ndr, "out", "decode_PrimaryWDigest");
3981 ndr->depth++;
3982 ndr->depth--;
3984 ndr->depth--;
3987 static enum ndr_err_code ndr_push_decode_trustAuthInOut(struct ndr_push *ndr, int flags, const struct decode_trustAuthInOut *r)
3989 if (flags & NDR_IN) {
3990 NDR_CHECK(ndr_push_trustAuthInOutBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3992 if (flags & NDR_OUT) {
3994 return NDR_ERR_SUCCESS;
3997 static enum ndr_err_code ndr_pull_decode_trustAuthInOut(struct ndr_pull *ndr, int flags, struct decode_trustAuthInOut *r)
3999 if (flags & NDR_IN) {
4000 NDR_CHECK(ndr_pull_trustAuthInOutBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4002 if (flags & NDR_OUT) {
4004 return NDR_ERR_SUCCESS;
4007 _PUBLIC_ void ndr_print_decode_trustAuthInOut(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustAuthInOut *r)
4009 ndr_print_struct(ndr, name, "decode_trustAuthInOut");
4010 ndr->depth++;
4011 if (flags & NDR_SET_VALUES) {
4012 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4014 if (flags & NDR_IN) {
4015 ndr_print_struct(ndr, "in", "decode_trustAuthInOut");
4016 ndr->depth++;
4017 ndr_print_trustAuthInOutBlob(ndr, "blob", &r->in.blob);
4018 ndr->depth--;
4020 if (flags & NDR_OUT) {
4021 ndr_print_struct(ndr, "out", "decode_trustAuthInOut");
4022 ndr->depth++;
4023 ndr->depth--;
4025 ndr->depth--;
4028 static enum ndr_err_code ndr_push_decode_trustDomainPasswords(struct ndr_push *ndr, int flags, const struct decode_trustDomainPasswords *r)
4030 if (flags & NDR_IN) {
4031 NDR_CHECK(ndr_push_trustDomainPasswords(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4033 if (flags & NDR_OUT) {
4035 return NDR_ERR_SUCCESS;
4038 static enum ndr_err_code ndr_pull_decode_trustDomainPasswords(struct ndr_pull *ndr, int flags, struct decode_trustDomainPasswords *r)
4040 if (flags & NDR_IN) {
4041 NDR_CHECK(ndr_pull_trustDomainPasswords(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4043 if (flags & NDR_OUT) {
4045 return NDR_ERR_SUCCESS;
4048 _PUBLIC_ void ndr_print_decode_trustDomainPasswords(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustDomainPasswords *r)
4050 ndr_print_struct(ndr, name, "decode_trustDomainPasswords");
4051 ndr->depth++;
4052 if (flags & NDR_SET_VALUES) {
4053 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4055 if (flags & NDR_IN) {
4056 ndr_print_struct(ndr, "in", "decode_trustDomainPasswords");
4057 ndr->depth++;
4058 ndr_print_trustDomainPasswords(ndr, "blob", &r->in.blob);
4059 ndr->depth--;
4061 if (flags & NDR_OUT) {
4062 ndr_print_struct(ndr, "out", "decode_trustDomainPasswords");
4063 ndr->depth++;
4064 ndr->depth--;
4066 ndr->depth--;
4069 static enum ndr_err_code ndr_push_decode_ExtendedErrorInfo(struct ndr_push *ndr, int flags, const struct decode_ExtendedErrorInfo *r)
4071 if (flags & NDR_IN) {
4073 struct ndr_push *_ndr_ptr;
4074 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ptr, 0xFFFFFC01, -1));
4075 NDR_CHECK(ndr_push_ExtendedErrorInfoPtr(_ndr_ptr, NDR_SCALARS|NDR_BUFFERS, &r->in.ptr));
4076 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ptr, 0xFFFFFC01, -1));
4079 if (flags & NDR_OUT) {
4081 return NDR_ERR_SUCCESS;
4084 static enum ndr_err_code ndr_pull_decode_ExtendedErrorInfo(struct ndr_pull *ndr, int flags, struct decode_ExtendedErrorInfo *r)
4086 if (flags & NDR_IN) {
4088 struct ndr_pull *_ndr_ptr;
4089 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ptr, 0xFFFFFC01, -1));
4090 NDR_CHECK(ndr_pull_ExtendedErrorInfoPtr(_ndr_ptr, NDR_SCALARS|NDR_BUFFERS, &r->in.ptr));
4091 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ptr, 0xFFFFFC01, -1));
4094 if (flags & NDR_OUT) {
4096 return NDR_ERR_SUCCESS;
4099 _PUBLIC_ void ndr_print_decode_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, int flags, const struct decode_ExtendedErrorInfo *r)
4101 ndr_print_struct(ndr, name, "decode_ExtendedErrorInfo");
4102 ndr->depth++;
4103 if (flags & NDR_SET_VALUES) {
4104 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4106 if (flags & NDR_IN) {
4107 ndr_print_struct(ndr, "in", "decode_ExtendedErrorInfo");
4108 ndr->depth++;
4109 ndr_print_ExtendedErrorInfoPtr(ndr, "ptr", &r->in.ptr);
4110 ndr->depth--;
4112 if (flags & NDR_OUT) {
4113 ndr_print_struct(ndr, "out", "decode_ExtendedErrorInfo");
4114 ndr->depth++;
4115 ndr->depth--;
4117 ndr->depth--;
4120 static const struct ndr_interface_call drsblobs_calls[] = {
4122 "decode_replPropertyMetaData",
4123 sizeof(struct decode_replPropertyMetaData),
4124 (ndr_push_flags_fn_t) ndr_push_decode_replPropertyMetaData,
4125 (ndr_pull_flags_fn_t) ndr_pull_decode_replPropertyMetaData,
4126 (ndr_print_function_t) ndr_print_decode_replPropertyMetaData,
4127 false,
4130 "decode_replUpToDateVector",
4131 sizeof(struct decode_replUpToDateVector),
4132 (ndr_push_flags_fn_t) ndr_push_decode_replUpToDateVector,
4133 (ndr_pull_flags_fn_t) ndr_pull_decode_replUpToDateVector,
4134 (ndr_print_function_t) ndr_print_decode_replUpToDateVector,
4135 false,
4138 "decode_repsFromTo",
4139 sizeof(struct decode_repsFromTo),
4140 (ndr_push_flags_fn_t) ndr_push_decode_repsFromTo,
4141 (ndr_pull_flags_fn_t) ndr_pull_decode_repsFromTo,
4142 (ndr_print_function_t) ndr_print_decode_repsFromTo,
4143 false,
4146 "decode_partialAttributeSet",
4147 sizeof(struct decode_partialAttributeSet),
4148 (ndr_push_flags_fn_t) ndr_push_decode_partialAttributeSet,
4149 (ndr_pull_flags_fn_t) ndr_pull_decode_partialAttributeSet,
4150 (ndr_print_function_t) ndr_print_decode_partialAttributeSet,
4151 false,
4154 "decode_prefixMap",
4155 sizeof(struct decode_prefixMap),
4156 (ndr_push_flags_fn_t) ndr_push_decode_prefixMap,
4157 (ndr_pull_flags_fn_t) ndr_pull_decode_prefixMap,
4158 (ndr_print_function_t) ndr_print_decode_prefixMap,
4159 false,
4162 "decode_ldapControlDirSync",
4163 sizeof(struct decode_ldapControlDirSync),
4164 (ndr_push_flags_fn_t) ndr_push_decode_ldapControlDirSync,
4165 (ndr_pull_flags_fn_t) ndr_pull_decode_ldapControlDirSync,
4166 (ndr_print_function_t) ndr_print_decode_ldapControlDirSync,
4167 false,
4170 "decode_supplementalCredentials",
4171 sizeof(struct decode_supplementalCredentials),
4172 (ndr_push_flags_fn_t) ndr_push_decode_supplementalCredentials,
4173 (ndr_pull_flags_fn_t) ndr_pull_decode_supplementalCredentials,
4174 (ndr_print_function_t) ndr_print_decode_supplementalCredentials,
4175 false,
4178 "decode_Packages",
4179 sizeof(struct decode_Packages),
4180 (ndr_push_flags_fn_t) ndr_push_decode_Packages,
4181 (ndr_pull_flags_fn_t) ndr_pull_decode_Packages,
4182 (ndr_print_function_t) ndr_print_decode_Packages,
4183 false,
4186 "decode_PrimaryKerberos",
4187 sizeof(struct decode_PrimaryKerberos),
4188 (ndr_push_flags_fn_t) ndr_push_decode_PrimaryKerberos,
4189 (ndr_pull_flags_fn_t) ndr_pull_decode_PrimaryKerberos,
4190 (ndr_print_function_t) ndr_print_decode_PrimaryKerberos,
4191 false,
4194 "decode_PrimaryCLEARTEXT",
4195 sizeof(struct decode_PrimaryCLEARTEXT),
4196 (ndr_push_flags_fn_t) ndr_push_decode_PrimaryCLEARTEXT,
4197 (ndr_pull_flags_fn_t) ndr_pull_decode_PrimaryCLEARTEXT,
4198 (ndr_print_function_t) ndr_print_decode_PrimaryCLEARTEXT,
4199 false,
4202 "decode_PrimaryWDigest",
4203 sizeof(struct decode_PrimaryWDigest),
4204 (ndr_push_flags_fn_t) ndr_push_decode_PrimaryWDigest,
4205 (ndr_pull_flags_fn_t) ndr_pull_decode_PrimaryWDigest,
4206 (ndr_print_function_t) ndr_print_decode_PrimaryWDigest,
4207 false,
4210 "decode_trustAuthInOut",
4211 sizeof(struct decode_trustAuthInOut),
4212 (ndr_push_flags_fn_t) ndr_push_decode_trustAuthInOut,
4213 (ndr_pull_flags_fn_t) ndr_pull_decode_trustAuthInOut,
4214 (ndr_print_function_t) ndr_print_decode_trustAuthInOut,
4215 false,
4218 "decode_trustDomainPasswords",
4219 sizeof(struct decode_trustDomainPasswords),
4220 (ndr_push_flags_fn_t) ndr_push_decode_trustDomainPasswords,
4221 (ndr_pull_flags_fn_t) ndr_pull_decode_trustDomainPasswords,
4222 (ndr_print_function_t) ndr_print_decode_trustDomainPasswords,
4223 false,
4226 "decode_ExtendedErrorInfo",
4227 sizeof(struct decode_ExtendedErrorInfo),
4228 (ndr_push_flags_fn_t) ndr_push_decode_ExtendedErrorInfo,
4229 (ndr_pull_flags_fn_t) ndr_pull_decode_ExtendedErrorInfo,
4230 (ndr_print_function_t) ndr_print_decode_ExtendedErrorInfo,
4231 false,
4233 { NULL, 0, NULL, NULL, NULL, false }
4236 static const char * const drsblobs_endpoint_strings[] = {
4237 "ncacn_np:[\\pipe\\drsblobs]",
4240 static const struct ndr_interface_string_array drsblobs_endpoints = {
4241 .count = 1,
4242 .names = drsblobs_endpoint_strings
4245 static const char * const drsblobs_authservice_strings[] = {
4246 "host",
4249 static const struct ndr_interface_string_array drsblobs_authservices = {
4250 .count = 1,
4251 .names = drsblobs_authservice_strings
4255 const struct ndr_interface_table ndr_table_drsblobs = {
4256 .name = "drsblobs",
4257 .syntax_id = {
4258 {0x12345778,0x1234,0xabcd,{0x00,0x01},{0x00,0x00,0x00,0x01}},
4259 NDR_DRSBLOBS_VERSION
4261 .helpstring = NDR_DRSBLOBS_HELPSTRING,
4262 .num_calls = 14,
4263 .calls = drsblobs_calls,
4264 .endpoints = &drsblobs_endpoints,
4265 .authservices = &drsblobs_authservices