s3/smbldap: add option to disable following LDAP refs
[Samba.git] / librpc / gen_ndr / ndr_drsblobs.c
blob1045fcd312fd3bdf84fc158d1e039fba3abc030a
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 NDR_CHECK(ndr_push_union_align(ndr, 8));
117 switch (level) {
118 case 1: {
119 NDR_CHECK(ndr_push_replPropertyMetaDataCtr1(ndr, NDR_SCALARS, &r->ctr1));
120 break; }
122 default:
123 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
126 if (ndr_flags & NDR_BUFFERS) {
127 int level = ndr_push_get_switch_value(ndr, r);
128 switch (level) {
129 case 1:
130 break;
132 default:
133 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
136 return NDR_ERR_SUCCESS;
139 static enum ndr_err_code ndr_pull_replPropertyMetaDataCtr(struct ndr_pull *ndr, int ndr_flags, union replPropertyMetaDataCtr *r)
141 int level;
142 level = ndr_pull_get_switch_value(ndr, r);
143 if (ndr_flags & NDR_SCALARS) {
144 NDR_CHECK(ndr_pull_union_align(ndr, 8));
145 switch (level) {
146 case 1: {
147 NDR_CHECK(ndr_pull_replPropertyMetaDataCtr1(ndr, NDR_SCALARS, &r->ctr1));
148 break; }
150 default:
151 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
154 if (ndr_flags & NDR_BUFFERS) {
155 switch (level) {
156 case 1:
157 break;
159 default:
160 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
163 return NDR_ERR_SUCCESS;
166 _PUBLIC_ void ndr_print_replPropertyMetaDataCtr(struct ndr_print *ndr, const char *name, const union replPropertyMetaDataCtr *r)
168 int level;
169 level = ndr_print_get_switch_value(ndr, r);
170 ndr_print_union(ndr, name, level, "replPropertyMetaDataCtr");
171 switch (level) {
172 case 1:
173 ndr_print_replPropertyMetaDataCtr1(ndr, "ctr1", &r->ctr1);
174 break;
176 default:
177 ndr_print_bad_level(ndr, name, level);
181 _PUBLIC_ enum ndr_err_code ndr_push_replPropertyMetaDataBlob(struct ndr_push *ndr, int ndr_flags, const struct replPropertyMetaDataBlob *r)
183 if (ndr_flags & NDR_SCALARS) {
184 NDR_CHECK(ndr_push_align(ndr, 8));
185 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
186 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
187 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
188 NDR_CHECK(ndr_push_replPropertyMetaDataCtr(ndr, NDR_SCALARS, &r->ctr));
190 if (ndr_flags & NDR_BUFFERS) {
192 return NDR_ERR_SUCCESS;
195 _PUBLIC_ enum ndr_err_code ndr_pull_replPropertyMetaDataBlob(struct ndr_pull *ndr, int ndr_flags, struct replPropertyMetaDataBlob *r)
197 if (ndr_flags & NDR_SCALARS) {
198 NDR_CHECK(ndr_pull_align(ndr, 8));
199 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
200 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
201 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
202 NDR_CHECK(ndr_pull_replPropertyMetaDataCtr(ndr, NDR_SCALARS, &r->ctr));
204 if (ndr_flags & NDR_BUFFERS) {
206 return NDR_ERR_SUCCESS;
209 _PUBLIC_ void ndr_print_replPropertyMetaDataBlob(struct ndr_print *ndr, const char *name, const struct replPropertyMetaDataBlob *r)
211 ndr_print_struct(ndr, name, "replPropertyMetaDataBlob");
212 ndr->depth++;
213 ndr_print_uint32(ndr, "version", r->version);
214 ndr_print_uint32(ndr, "reserved", r->reserved);
215 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
216 ndr_print_replPropertyMetaDataCtr(ndr, "ctr", &r->ctr);
217 ndr->depth--;
220 static enum ndr_err_code ndr_push_replUpToDateVectorCtr1(struct ndr_push *ndr, int ndr_flags, const struct replUpToDateVectorCtr1 *r)
222 uint32_t cntr_cursors_0;
223 if (ndr_flags & NDR_SCALARS) {
224 NDR_CHECK(ndr_push_align(ndr, 8));
225 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
226 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
227 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
228 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
231 if (ndr_flags & NDR_BUFFERS) {
233 return NDR_ERR_SUCCESS;
236 static enum ndr_err_code ndr_pull_replUpToDateVectorCtr1(struct ndr_pull *ndr, int ndr_flags, struct replUpToDateVectorCtr1 *r)
238 uint32_t cntr_cursors_0;
239 TALLOC_CTX *_mem_save_cursors_0;
240 if (ndr_flags & NDR_SCALARS) {
241 NDR_CHECK(ndr_pull_align(ndr, 8));
242 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
243 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
244 NDR_PULL_ALLOC_N(ndr, r->cursors, r->count);
245 _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
246 NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
247 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
248 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
250 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
252 if (ndr_flags & NDR_BUFFERS) {
254 return NDR_ERR_SUCCESS;
257 _PUBLIC_ void ndr_print_replUpToDateVectorCtr1(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorCtr1 *r)
259 uint32_t cntr_cursors_0;
260 ndr_print_struct(ndr, name, "replUpToDateVectorCtr1");
261 ndr->depth++;
262 ndr_print_uint32(ndr, "count", r->count);
263 ndr_print_uint32(ndr, "reserved", r->reserved);
264 ndr->print(ndr, "%s: ARRAY(%d)", "cursors", (int)r->count);
265 ndr->depth++;
266 for (cntr_cursors_0=0;cntr_cursors_0<r->count;cntr_cursors_0++) {
267 char *idx_0=NULL;
268 if (asprintf(&idx_0, "[%d]", cntr_cursors_0) != -1) {
269 ndr_print_drsuapi_DsReplicaCursor(ndr, "cursors", &r->cursors[cntr_cursors_0]);
270 free(idx_0);
273 ndr->depth--;
274 ndr->depth--;
277 static enum ndr_err_code ndr_push_replUpToDateVectorCtr2(struct ndr_push *ndr, int ndr_flags, const struct replUpToDateVectorCtr2 *r)
279 uint32_t cntr_cursors_0;
280 if (ndr_flags & NDR_SCALARS) {
281 NDR_CHECK(ndr_push_align(ndr, 8));
282 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
283 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
284 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
285 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
288 if (ndr_flags & NDR_BUFFERS) {
290 return NDR_ERR_SUCCESS;
293 static enum ndr_err_code ndr_pull_replUpToDateVectorCtr2(struct ndr_pull *ndr, int ndr_flags, struct replUpToDateVectorCtr2 *r)
295 uint32_t cntr_cursors_0;
296 TALLOC_CTX *_mem_save_cursors_0;
297 if (ndr_flags & NDR_SCALARS) {
298 NDR_CHECK(ndr_pull_align(ndr, 8));
299 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
300 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
301 NDR_PULL_ALLOC_N(ndr, r->cursors, r->count);
302 _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
303 NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
304 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
305 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
307 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
309 if (ndr_flags & NDR_BUFFERS) {
311 return NDR_ERR_SUCCESS;
314 _PUBLIC_ void ndr_print_replUpToDateVectorCtr2(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorCtr2 *r)
316 uint32_t cntr_cursors_0;
317 ndr_print_struct(ndr, name, "replUpToDateVectorCtr2");
318 ndr->depth++;
319 ndr_print_uint32(ndr, "count", r->count);
320 ndr_print_uint32(ndr, "reserved", r->reserved);
321 ndr->print(ndr, "%s: ARRAY(%d)", "cursors", (int)r->count);
322 ndr->depth++;
323 for (cntr_cursors_0=0;cntr_cursors_0<r->count;cntr_cursors_0++) {
324 char *idx_0=NULL;
325 if (asprintf(&idx_0, "[%d]", cntr_cursors_0) != -1) {
326 ndr_print_drsuapi_DsReplicaCursor2(ndr, "cursors", &r->cursors[cntr_cursors_0]);
327 free(idx_0);
330 ndr->depth--;
331 ndr->depth--;
334 static enum ndr_err_code ndr_push_replUpToDateVectorCtr(struct ndr_push *ndr, int ndr_flags, const union replUpToDateVectorCtr *r)
336 if (ndr_flags & NDR_SCALARS) {
337 int level = ndr_push_get_switch_value(ndr, r);
338 NDR_CHECK(ndr_push_union_align(ndr, 8));
339 switch (level) {
340 case 1: {
341 NDR_CHECK(ndr_push_replUpToDateVectorCtr1(ndr, NDR_SCALARS, &r->ctr1));
342 break; }
344 case 2: {
345 NDR_CHECK(ndr_push_replUpToDateVectorCtr2(ndr, NDR_SCALARS, &r->ctr2));
346 break; }
348 default:
349 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
352 if (ndr_flags & NDR_BUFFERS) {
353 int level = ndr_push_get_switch_value(ndr, r);
354 switch (level) {
355 case 1:
356 break;
358 case 2:
359 break;
361 default:
362 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
365 return NDR_ERR_SUCCESS;
368 static enum ndr_err_code ndr_pull_replUpToDateVectorCtr(struct ndr_pull *ndr, int ndr_flags, union replUpToDateVectorCtr *r)
370 int level;
371 level = ndr_pull_get_switch_value(ndr, r);
372 if (ndr_flags & NDR_SCALARS) {
373 NDR_CHECK(ndr_pull_union_align(ndr, 8));
374 switch (level) {
375 case 1: {
376 NDR_CHECK(ndr_pull_replUpToDateVectorCtr1(ndr, NDR_SCALARS, &r->ctr1));
377 break; }
379 case 2: {
380 NDR_CHECK(ndr_pull_replUpToDateVectorCtr2(ndr, NDR_SCALARS, &r->ctr2));
381 break; }
383 default:
384 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
387 if (ndr_flags & NDR_BUFFERS) {
388 switch (level) {
389 case 1:
390 break;
392 case 2:
393 break;
395 default:
396 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
399 return NDR_ERR_SUCCESS;
402 _PUBLIC_ void ndr_print_replUpToDateVectorCtr(struct ndr_print *ndr, const char *name, const union replUpToDateVectorCtr *r)
404 int level;
405 level = ndr_print_get_switch_value(ndr, r);
406 ndr_print_union(ndr, name, level, "replUpToDateVectorCtr");
407 switch (level) {
408 case 1:
409 ndr_print_replUpToDateVectorCtr1(ndr, "ctr1", &r->ctr1);
410 break;
412 case 2:
413 ndr_print_replUpToDateVectorCtr2(ndr, "ctr2", &r->ctr2);
414 break;
416 default:
417 ndr_print_bad_level(ndr, name, level);
421 _PUBLIC_ enum ndr_err_code ndr_push_replUpToDateVectorBlob(struct ndr_push *ndr, int ndr_flags, const struct replUpToDateVectorBlob *r)
423 if (ndr_flags & NDR_SCALARS) {
424 NDR_CHECK(ndr_push_align(ndr, 8));
425 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
426 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
427 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
428 NDR_CHECK(ndr_push_replUpToDateVectorCtr(ndr, NDR_SCALARS, &r->ctr));
430 if (ndr_flags & NDR_BUFFERS) {
432 return NDR_ERR_SUCCESS;
435 _PUBLIC_ enum ndr_err_code ndr_pull_replUpToDateVectorBlob(struct ndr_pull *ndr, int ndr_flags, struct replUpToDateVectorBlob *r)
437 if (ndr_flags & NDR_SCALARS) {
438 NDR_CHECK(ndr_pull_align(ndr, 8));
439 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
440 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
441 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
442 NDR_CHECK(ndr_pull_replUpToDateVectorCtr(ndr, NDR_SCALARS, &r->ctr));
444 if (ndr_flags & NDR_BUFFERS) {
446 return NDR_ERR_SUCCESS;
449 _PUBLIC_ void ndr_print_replUpToDateVectorBlob(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorBlob *r)
451 ndr_print_struct(ndr, name, "replUpToDateVectorBlob");
452 ndr->depth++;
453 ndr_print_uint32(ndr, "version", r->version);
454 ndr_print_uint32(ndr, "reserved", r->reserved);
455 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
456 ndr_print_replUpToDateVectorCtr(ndr, "ctr", &r->ctr);
457 ndr->depth--;
460 _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo1OtherInfo(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo1OtherInfo *r)
462 if (ndr_flags & NDR_SCALARS) {
463 NDR_CHECK(ndr_push_align(ndr, 4));
464 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen(r->dns_name) + 1));
465 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_name, strlen(r->dns_name) + 1, sizeof(uint8_t), CH_DOS));
467 if (ndr_flags & NDR_BUFFERS) {
469 return NDR_ERR_SUCCESS;
472 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo1OtherInfo(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo1OtherInfo *r)
474 if (ndr_flags & NDR_SCALARS) {
475 NDR_CHECK(ndr_pull_align(ndr, 4));
476 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__dns_name_size));
477 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_name, r->__dns_name_size, sizeof(uint8_t), CH_DOS));
479 if (ndr_flags & NDR_BUFFERS) {
481 return NDR_ERR_SUCCESS;
484 _PUBLIC_ void ndr_print_repsFromTo1OtherInfo(struct ndr_print *ndr, const char *name, const struct repsFromTo1OtherInfo *r)
486 ndr_print_struct(ndr, name, "repsFromTo1OtherInfo");
487 ndr->depth++;
488 ndr_print_uint32(ndr, "__dns_name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->dns_name) + 1:r->__dns_name_size);
489 ndr_print_string(ndr, "dns_name", r->dns_name);
490 ndr->depth--;
493 _PUBLIC_ size_t ndr_size_repsFromTo1OtherInfo(const struct repsFromTo1OtherInfo *r, struct smb_iconv_convenience *ic, int flags)
495 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo1OtherInfo, ic);
498 _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo1(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo1 *r)
501 uint32_t _flags_save_STRUCT = ndr->flags;
502 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
503 if (ndr_flags & NDR_SCALARS) {
504 NDR_CHECK(ndr_push_align(ndr, 8));
505 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo1(r, ndr->iconv_convenience, ndr->flags) + 8));
506 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->consecutive_sync_failures));
507 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_success));
508 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_attempt));
509 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->result_last_attempt));
510 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->other_info));
511 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo1OtherInfo(r->other_info, ndr->iconv_convenience, ndr->flags)));
512 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourFlags(ndr, NDR_SCALARS, r->replica_flags));
513 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
514 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
515 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
516 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
517 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
518 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->transport_guid));
520 if (ndr_flags & NDR_BUFFERS) {
521 if (r->other_info) {
522 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->other_info));
523 NDR_CHECK(ndr_push_repsFromTo1OtherInfo(ndr, NDR_SCALARS, r->other_info));
526 ndr->flags = _flags_save_STRUCT;
528 return NDR_ERR_SUCCESS;
531 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo1(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo1 *r)
533 uint32_t _ptr_other_info;
534 TALLOC_CTX *_mem_save_other_info_0;
536 uint32_t _flags_save_STRUCT = ndr->flags;
537 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
538 if (ndr_flags & NDR_SCALARS) {
539 NDR_CHECK(ndr_pull_align(ndr, 8));
540 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->blobsize));
541 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->consecutive_sync_failures));
542 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->last_success));
543 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->last_attempt));
544 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->result_last_attempt));
545 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_other_info));
546 if (_ptr_other_info) {
547 NDR_PULL_ALLOC(ndr, r->other_info);
548 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->other_info, _ptr_other_info));
549 } else {
550 r->other_info = NULL;
552 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->other_info_length));
553 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourFlags(ndr, NDR_SCALARS, &r->replica_flags));
554 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
555 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
556 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
557 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
558 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
559 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->transport_guid));
561 if (ndr_flags & NDR_BUFFERS) {
562 if (r->other_info) {
563 uint32_t _relative_save_offset;
564 _relative_save_offset = ndr->offset;
565 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->other_info));
566 _mem_save_other_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
567 NDR_PULL_SET_MEM_CTX(ndr, r->other_info, 0);
568 NDR_CHECK(ndr_pull_repsFromTo1OtherInfo(ndr, NDR_SCALARS, r->other_info));
569 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_other_info_0, 0);
570 ndr->offset = _relative_save_offset;
573 ndr->flags = _flags_save_STRUCT;
575 return NDR_ERR_SUCCESS;
578 _PUBLIC_ void ndr_print_repsFromTo1(struct ndr_print *ndr, const char *name, const struct repsFromTo1 *r)
580 ndr_print_struct(ndr, name, "repsFromTo1");
582 uint32_t _flags_save_STRUCT = ndr->flags;
583 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
584 ndr->depth++;
585 ndr_print_uint32(ndr, "blobsize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo1(r, ndr->iconv_convenience, ndr->flags) + 8:r->blobsize);
586 ndr_print_uint32(ndr, "consecutive_sync_failures", r->consecutive_sync_failures);
587 ndr_print_NTTIME_1sec(ndr, "last_success", r->last_success);
588 ndr_print_NTTIME_1sec(ndr, "last_attempt", r->last_attempt);
589 ndr_print_WERROR(ndr, "result_last_attempt", r->result_last_attempt);
590 ndr_print_ptr(ndr, "other_info", r->other_info);
591 ndr->depth++;
592 if (r->other_info) {
593 ndr_print_repsFromTo1OtherInfo(ndr, "other_info", r->other_info);
595 ndr->depth--;
596 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);
597 ndr_print_drsuapi_DsReplicaNeighbourFlags(ndr, "replica_flags", r->replica_flags);
598 ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
599 ndr_print_uint32(ndr, "reserved", r->reserved);
600 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
601 ndr_print_GUID(ndr, "source_dsa_obj_guid", &r->source_dsa_obj_guid);
602 ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
603 ndr_print_GUID(ndr, "transport_guid", &r->transport_guid);
604 ndr->depth--;
605 ndr->flags = _flags_save_STRUCT;
609 _PUBLIC_ size_t ndr_size_repsFromTo1(const struct repsFromTo1 *r, struct smb_iconv_convenience *ic, int flags)
611 flags |= LIBNDR_PRINT_ARRAY_HEX;
612 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo1, ic);
615 _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo2OtherInfo(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo2OtherInfo *r)
617 uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
618 if (ndr_flags & NDR_SCALARS) {
619 NDR_CHECK(ndr_push_align(ndr, 8));
620 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
621 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo2OtherInfo(r, ndr->iconv_convenience, ndr->flags)));
623 uint32_t _flags_save_string = ndr->flags;
624 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
625 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dns_name1));
626 ndr->flags = _flags_save_string;
628 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
630 uint32_t _flags_save_string = ndr->flags;
631 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
632 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dns_name2));
633 ndr->flags = _flags_save_string;
635 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown2));
637 if (ndr_flags & NDR_BUFFERS) {
638 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
640 uint32_t _flags_save_string = ndr->flags;
641 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
642 if (r->dns_name1) {
643 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->dns_name1));
644 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->dns_name1));
646 ndr->flags = _flags_save_string;
649 uint32_t _flags_save_string = ndr->flags;
650 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
651 if (r->dns_name2) {
652 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->dns_name2));
653 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->dns_name2));
655 ndr->flags = _flags_save_string;
658 ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
659 return NDR_ERR_SUCCESS;
662 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo2OtherInfo(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo2OtherInfo *r)
664 uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
665 uint32_t _ptr_dns_name1;
666 TALLOC_CTX *_mem_save_dns_name1_0;
667 uint32_t _ptr_dns_name2;
668 TALLOC_CTX *_mem_save_dns_name2_0;
669 if (ndr_flags & NDR_SCALARS) {
670 NDR_CHECK(ndr_pull_align(ndr, 8));
671 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
672 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
674 uint32_t _flags_save_string = ndr->flags;
675 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
676 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_name1));
677 if (_ptr_dns_name1) {
678 NDR_PULL_ALLOC(ndr, r->dns_name1);
679 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dns_name1, _ptr_dns_name1));
680 } else {
681 r->dns_name1 = NULL;
683 ndr->flags = _flags_save_string;
685 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
687 uint32_t _flags_save_string = ndr->flags;
688 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
689 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_name2));
690 if (_ptr_dns_name2) {
691 NDR_PULL_ALLOC(ndr, r->dns_name2);
692 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dns_name2, _ptr_dns_name2));
693 } else {
694 r->dns_name2 = NULL;
696 ndr->flags = _flags_save_string;
698 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown2));
700 if (ndr_flags & NDR_BUFFERS) {
701 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
703 uint32_t _flags_save_string = ndr->flags;
704 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
705 if (r->dns_name1) {
706 uint32_t _relative_save_offset;
707 _relative_save_offset = ndr->offset;
708 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dns_name1));
709 _mem_save_dns_name1_0 = NDR_PULL_GET_MEM_CTX(ndr);
710 NDR_PULL_SET_MEM_CTX(ndr, r->dns_name1, 0);
711 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->dns_name1));
712 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_name1_0, 0);
713 ndr->offset = _relative_save_offset;
715 ndr->flags = _flags_save_string;
718 uint32_t _flags_save_string = ndr->flags;
719 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
720 if (r->dns_name2) {
721 uint32_t _relative_save_offset;
722 _relative_save_offset = ndr->offset;
723 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dns_name2));
724 _mem_save_dns_name2_0 = NDR_PULL_GET_MEM_CTX(ndr);
725 NDR_PULL_SET_MEM_CTX(ndr, r->dns_name2, 0);
726 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->dns_name2));
727 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_name2_0, 0);
728 ndr->offset = _relative_save_offset;
730 ndr->flags = _flags_save_string;
733 ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
734 return NDR_ERR_SUCCESS;
737 _PUBLIC_ void ndr_print_repsFromTo2OtherInfo(struct ndr_print *ndr, const char *name, const struct repsFromTo2OtherInfo *r)
739 ndr_print_struct(ndr, name, "repsFromTo2OtherInfo");
740 ndr->depth++;
741 ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo2OtherInfo(r, ndr->iconv_convenience, ndr->flags):r->__ndr_size);
742 ndr_print_ptr(ndr, "dns_name1", r->dns_name1);
743 ndr->depth++;
744 if (r->dns_name1) {
745 ndr_print_string(ndr, "dns_name1", r->dns_name1);
747 ndr->depth--;
748 ndr_print_uint32(ndr, "unknown1", r->unknown1);
749 ndr_print_ptr(ndr, "dns_name2", r->dns_name2);
750 ndr->depth++;
751 if (r->dns_name2) {
752 ndr_print_string(ndr, "dns_name2", r->dns_name2);
754 ndr->depth--;
755 ndr_print_hyper(ndr, "unknown2", r->unknown2);
756 ndr->depth--;
759 _PUBLIC_ size_t ndr_size_repsFromTo2OtherInfo(const struct repsFromTo2OtherInfo *r, struct smb_iconv_convenience *ic, int flags)
761 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo2OtherInfo, ic);
764 _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo2(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo2 *r)
767 uint32_t _flags_save_STRUCT = ndr->flags;
768 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
769 if (ndr_flags & NDR_SCALARS) {
770 NDR_CHECK(ndr_push_align(ndr, 8));
771 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo2(r, ndr->iconv_convenience, ndr->flags) + 8));
772 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->consecutive_sync_failures));
773 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_success));
774 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_attempt));
775 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->result_last_attempt));
776 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->other_info));
777 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo2OtherInfo(r->other_info, ndr->iconv_convenience, ndr->flags)));
778 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourFlags(ndr, NDR_SCALARS, r->replica_flags));
779 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
780 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
781 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
782 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
783 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
784 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->transport_guid));
785 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown1));
787 if (ndr_flags & NDR_BUFFERS) {
788 if (r->other_info) {
789 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->other_info));
790 NDR_CHECK(ndr_push_repsFromTo2OtherInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->other_info));
793 ndr->flags = _flags_save_STRUCT;
795 return NDR_ERR_SUCCESS;
798 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo2(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo2 *r)
800 uint32_t _ptr_other_info;
801 TALLOC_CTX *_mem_save_other_info_0;
803 uint32_t _flags_save_STRUCT = ndr->flags;
804 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
805 if (ndr_flags & NDR_SCALARS) {
806 NDR_CHECK(ndr_pull_align(ndr, 8));
807 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->blobsize));
808 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->consecutive_sync_failures));
809 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->last_success));
810 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->last_attempt));
811 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->result_last_attempt));
812 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_other_info));
813 if (_ptr_other_info) {
814 NDR_PULL_ALLOC(ndr, r->other_info);
815 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->other_info, _ptr_other_info));
816 } else {
817 r->other_info = NULL;
819 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->other_info_length));
820 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourFlags(ndr, NDR_SCALARS, &r->replica_flags));
821 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
822 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
823 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
824 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
825 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
826 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->transport_guid));
827 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown1));
829 if (ndr_flags & NDR_BUFFERS) {
830 if (r->other_info) {
831 uint32_t _relative_save_offset;
832 _relative_save_offset = ndr->offset;
833 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->other_info));
834 _mem_save_other_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
835 NDR_PULL_SET_MEM_CTX(ndr, r->other_info, 0);
836 NDR_CHECK(ndr_pull_repsFromTo2OtherInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->other_info));
837 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_other_info_0, 0);
838 ndr->offset = _relative_save_offset;
841 ndr->flags = _flags_save_STRUCT;
843 return NDR_ERR_SUCCESS;
846 _PUBLIC_ void ndr_print_repsFromTo2(struct ndr_print *ndr, const char *name, const struct repsFromTo2 *r)
848 ndr_print_struct(ndr, name, "repsFromTo2");
850 uint32_t _flags_save_STRUCT = ndr->flags;
851 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
852 ndr->depth++;
853 ndr_print_uint32(ndr, "blobsize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo2(r, ndr->iconv_convenience, ndr->flags) + 8:r->blobsize);
854 ndr_print_uint32(ndr, "consecutive_sync_failures", r->consecutive_sync_failures);
855 ndr_print_NTTIME_1sec(ndr, "last_success", r->last_success);
856 ndr_print_NTTIME_1sec(ndr, "last_attempt", r->last_attempt);
857 ndr_print_WERROR(ndr, "result_last_attempt", r->result_last_attempt);
858 ndr_print_ptr(ndr, "other_info", r->other_info);
859 ndr->depth++;
860 if (r->other_info) {
861 ndr_print_repsFromTo2OtherInfo(ndr, "other_info", r->other_info);
863 ndr->depth--;
864 ndr_print_uint32(ndr, "other_info_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo2OtherInfo(r->other_info, ndr->iconv_convenience, ndr->flags):r->other_info_length);
865 ndr_print_drsuapi_DsReplicaNeighbourFlags(ndr, "replica_flags", r->replica_flags);
866 ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
867 ndr_print_uint32(ndr, "reserved", r->reserved);
868 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
869 ndr_print_GUID(ndr, "source_dsa_obj_guid", &r->source_dsa_obj_guid);
870 ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
871 ndr_print_GUID(ndr, "transport_guid", &r->transport_guid);
872 ndr_print_hyper(ndr, "unknown1", r->unknown1);
873 ndr->depth--;
874 ndr->flags = _flags_save_STRUCT;
878 _PUBLIC_ size_t ndr_size_repsFromTo2(const struct repsFromTo2 *r, struct smb_iconv_convenience *ic, int flags)
880 flags |= LIBNDR_PRINT_ARRAY_HEX;
881 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo2, ic);
884 static enum ndr_err_code ndr_push_repsFromTo(struct ndr_push *ndr, int ndr_flags, const union repsFromTo *r)
886 if (ndr_flags & NDR_SCALARS) {
887 int level = ndr_push_get_switch_value(ndr, r);
888 NDR_CHECK(ndr_push_union_align(ndr, 8));
889 switch (level) {
890 case 1: {
891 NDR_CHECK(ndr_push_repsFromTo1(ndr, NDR_SCALARS, &r->ctr1));
892 break; }
894 case 2: {
895 NDR_CHECK(ndr_push_repsFromTo2(ndr, NDR_SCALARS, &r->ctr2));
896 break; }
898 default:
899 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
902 if (ndr_flags & NDR_BUFFERS) {
903 int level = ndr_push_get_switch_value(ndr, r);
904 switch (level) {
905 case 1:
906 NDR_CHECK(ndr_push_repsFromTo1(ndr, NDR_BUFFERS, &r->ctr1));
907 break;
909 case 2:
910 NDR_CHECK(ndr_push_repsFromTo2(ndr, NDR_BUFFERS, &r->ctr2));
911 break;
913 default:
914 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
917 return NDR_ERR_SUCCESS;
920 static enum ndr_err_code ndr_pull_repsFromTo(struct ndr_pull *ndr, int ndr_flags, union repsFromTo *r)
922 int level;
923 level = ndr_pull_get_switch_value(ndr, r);
924 if (ndr_flags & NDR_SCALARS) {
925 NDR_CHECK(ndr_pull_union_align(ndr, 8));
926 switch (level) {
927 case 1: {
928 NDR_CHECK(ndr_pull_repsFromTo1(ndr, NDR_SCALARS, &r->ctr1));
929 break; }
931 case 2: {
932 NDR_CHECK(ndr_pull_repsFromTo2(ndr, NDR_SCALARS, &r->ctr2));
933 break; }
935 default:
936 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
939 if (ndr_flags & NDR_BUFFERS) {
940 switch (level) {
941 case 1:
942 NDR_CHECK(ndr_pull_repsFromTo1(ndr, NDR_BUFFERS, &r->ctr1));
943 break;
945 case 2:
946 NDR_CHECK(ndr_pull_repsFromTo2(ndr, NDR_BUFFERS, &r->ctr2));
947 break;
949 default:
950 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
953 return NDR_ERR_SUCCESS;
956 _PUBLIC_ void ndr_print_repsFromTo(struct ndr_print *ndr, const char *name, const union repsFromTo *r)
958 int level;
959 level = ndr_print_get_switch_value(ndr, r);
960 ndr_print_union(ndr, name, level, "repsFromTo");
961 switch (level) {
962 case 1:
963 ndr_print_repsFromTo1(ndr, "ctr1", &r->ctr1);
964 break;
966 case 2:
967 ndr_print_repsFromTo2(ndr, "ctr2", &r->ctr2);
968 break;
970 default:
971 ndr_print_bad_level(ndr, name, level);
975 _PUBLIC_ enum ndr_err_code ndr_push_repsFromToBlob(struct ndr_push *ndr, int ndr_flags, const struct repsFromToBlob *r)
977 if (ndr_flags & NDR_SCALARS) {
978 NDR_CHECK(ndr_push_align(ndr, 8));
979 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
980 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
981 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
982 NDR_CHECK(ndr_push_repsFromTo(ndr, NDR_SCALARS, &r->ctr));
984 if (ndr_flags & NDR_BUFFERS) {
985 NDR_CHECK(ndr_push_repsFromTo(ndr, NDR_BUFFERS, &r->ctr));
987 return NDR_ERR_SUCCESS;
990 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromToBlob(struct ndr_pull *ndr, int ndr_flags, struct repsFromToBlob *r)
992 if (ndr_flags & NDR_SCALARS) {
993 NDR_CHECK(ndr_pull_align(ndr, 8));
994 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
995 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
996 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
997 NDR_CHECK(ndr_pull_repsFromTo(ndr, NDR_SCALARS, &r->ctr));
999 if (ndr_flags & NDR_BUFFERS) {
1000 NDR_CHECK(ndr_pull_repsFromTo(ndr, NDR_BUFFERS, &r->ctr));
1002 return NDR_ERR_SUCCESS;
1005 _PUBLIC_ void ndr_print_repsFromToBlob(struct ndr_print *ndr, const char *name, const struct repsFromToBlob *r)
1007 ndr_print_struct(ndr, name, "repsFromToBlob");
1008 ndr->depth++;
1009 ndr_print_uint32(ndr, "version", r->version);
1010 ndr_print_uint32(ndr, "reserved", r->reserved);
1011 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
1012 ndr_print_repsFromTo(ndr, "ctr", &r->ctr);
1013 ndr->depth--;
1016 static enum ndr_err_code ndr_push_partialAttributeSetCtr1(struct ndr_push *ndr, int ndr_flags, const struct partialAttributeSetCtr1 *r)
1018 uint32_t cntr_array_0;
1019 if (ndr_flags & NDR_SCALARS) {
1020 NDR_CHECK(ndr_push_align(ndr, 4));
1021 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1022 for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) {
1023 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->array[cntr_array_0]));
1026 if (ndr_flags & NDR_BUFFERS) {
1028 return NDR_ERR_SUCCESS;
1031 static enum ndr_err_code ndr_pull_partialAttributeSetCtr1(struct ndr_pull *ndr, int ndr_flags, struct partialAttributeSetCtr1 *r)
1033 uint32_t cntr_array_0;
1034 TALLOC_CTX *_mem_save_array_0;
1035 if (ndr_flags & NDR_SCALARS) {
1036 NDR_CHECK(ndr_pull_align(ndr, 4));
1037 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1038 NDR_PULL_ALLOC_N(ndr, r->array, r->count);
1039 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1040 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1041 for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) {
1042 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
1044 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1046 if (ndr_flags & NDR_BUFFERS) {
1048 return NDR_ERR_SUCCESS;
1051 _PUBLIC_ void ndr_print_partialAttributeSetCtr1(struct ndr_print *ndr, const char *name, const struct partialAttributeSetCtr1 *r)
1053 uint32_t cntr_array_0;
1054 ndr_print_struct(ndr, name, "partialAttributeSetCtr1");
1055 ndr->depth++;
1056 ndr_print_uint32(ndr, "count", r->count);
1057 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
1058 ndr->depth++;
1059 for (cntr_array_0=0;cntr_array_0<r->count;cntr_array_0++) {
1060 char *idx_0=NULL;
1061 if (asprintf(&idx_0, "[%d]", cntr_array_0) != -1) {
1062 ndr_print_drsuapi_DsAttributeId(ndr, "array", r->array[cntr_array_0]);
1063 free(idx_0);
1066 ndr->depth--;
1067 ndr->depth--;
1070 static enum ndr_err_code ndr_push_partialAttributeSetCtr(struct ndr_push *ndr, int ndr_flags, const union partialAttributeSetCtr *r)
1072 if (ndr_flags & NDR_SCALARS) {
1073 int level = ndr_push_get_switch_value(ndr, r);
1074 NDR_CHECK(ndr_push_union_align(ndr, 4));
1075 switch (level) {
1076 case 1: {
1077 NDR_CHECK(ndr_push_partialAttributeSetCtr1(ndr, NDR_SCALARS, &r->ctr1));
1078 break; }
1080 default:
1081 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1084 if (ndr_flags & NDR_BUFFERS) {
1085 int level = ndr_push_get_switch_value(ndr, r);
1086 switch (level) {
1087 case 1:
1088 break;
1090 default:
1091 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1094 return NDR_ERR_SUCCESS;
1097 static enum ndr_err_code ndr_pull_partialAttributeSetCtr(struct ndr_pull *ndr, int ndr_flags, union partialAttributeSetCtr *r)
1099 int level;
1100 level = ndr_pull_get_switch_value(ndr, r);
1101 if (ndr_flags & NDR_SCALARS) {
1102 NDR_CHECK(ndr_pull_union_align(ndr, 4));
1103 switch (level) {
1104 case 1: {
1105 NDR_CHECK(ndr_pull_partialAttributeSetCtr1(ndr, NDR_SCALARS, &r->ctr1));
1106 break; }
1108 default:
1109 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1112 if (ndr_flags & NDR_BUFFERS) {
1113 switch (level) {
1114 case 1:
1115 break;
1117 default:
1118 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1121 return NDR_ERR_SUCCESS;
1124 _PUBLIC_ void ndr_print_partialAttributeSetCtr(struct ndr_print *ndr, const char *name, const union partialAttributeSetCtr *r)
1126 int level;
1127 level = ndr_print_get_switch_value(ndr, r);
1128 ndr_print_union(ndr, name, level, "partialAttributeSetCtr");
1129 switch (level) {
1130 case 1:
1131 ndr_print_partialAttributeSetCtr1(ndr, "ctr1", &r->ctr1);
1132 break;
1134 default:
1135 ndr_print_bad_level(ndr, name, level);
1139 _PUBLIC_ enum ndr_err_code ndr_push_partialAttributeSetBlob(struct ndr_push *ndr, int ndr_flags, const struct partialAttributeSetBlob *r)
1141 if (ndr_flags & NDR_SCALARS) {
1142 NDR_CHECK(ndr_push_align(ndr, 4));
1143 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
1144 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
1145 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
1146 NDR_CHECK(ndr_push_partialAttributeSetCtr(ndr, NDR_SCALARS, &r->ctr));
1148 if (ndr_flags & NDR_BUFFERS) {
1150 return NDR_ERR_SUCCESS;
1153 _PUBLIC_ enum ndr_err_code ndr_pull_partialAttributeSetBlob(struct ndr_pull *ndr, int ndr_flags, struct partialAttributeSetBlob *r)
1155 if (ndr_flags & NDR_SCALARS) {
1156 NDR_CHECK(ndr_pull_align(ndr, 4));
1157 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
1158 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
1159 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
1160 NDR_CHECK(ndr_pull_partialAttributeSetCtr(ndr, NDR_SCALARS, &r->ctr));
1162 if (ndr_flags & NDR_BUFFERS) {
1164 return NDR_ERR_SUCCESS;
1167 _PUBLIC_ void ndr_print_partialAttributeSetBlob(struct ndr_print *ndr, const char *name, const struct partialAttributeSetBlob *r)
1169 ndr_print_struct(ndr, name, "partialAttributeSetBlob");
1170 ndr->depth++;
1171 ndr_print_uint32(ndr, "version", r->version);
1172 ndr_print_uint32(ndr, "reserved", r->reserved);
1173 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
1174 ndr_print_partialAttributeSetCtr(ndr, "ctr", &r->ctr);
1175 ndr->depth--;
1178 static enum ndr_err_code ndr_push_prefixMapVersion(struct ndr_push *ndr, int ndr_flags, enum prefixMapVersion r)
1180 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1181 return NDR_ERR_SUCCESS;
1184 static enum ndr_err_code ndr_pull_prefixMapVersion(struct ndr_pull *ndr, int ndr_flags, enum prefixMapVersion *r)
1186 uint32_t v;
1187 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1188 *r = v;
1189 return NDR_ERR_SUCCESS;
1192 _PUBLIC_ void ndr_print_prefixMapVersion(struct ndr_print *ndr, const char *name, enum prefixMapVersion r)
1194 const char *val = NULL;
1196 switch (r) {
1197 case PREFIX_MAP_VERSION_DSDB: val = "PREFIX_MAP_VERSION_DSDB"; break;
1199 ndr_print_enum(ndr, name, "ENUM", val, r);
1202 static enum ndr_err_code ndr_push_prefixMapCtr(struct ndr_push *ndr, int ndr_flags, const union prefixMapCtr *r)
1204 if (ndr_flags & NDR_SCALARS) {
1205 int level = ndr_push_get_switch_value(ndr, r);
1206 NDR_CHECK(ndr_push_union_align(ndr, 5));
1207 switch (level) {
1208 case PREFIX_MAP_VERSION_DSDB: {
1209 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->dsdb));
1210 break; }
1212 default:
1213 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1216 if (ndr_flags & NDR_BUFFERS) {
1217 int level = ndr_push_get_switch_value(ndr, r);
1218 switch (level) {
1219 case PREFIX_MAP_VERSION_DSDB:
1220 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->dsdb));
1221 break;
1223 default:
1224 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1227 return NDR_ERR_SUCCESS;
1230 static enum ndr_err_code ndr_pull_prefixMapCtr(struct ndr_pull *ndr, int ndr_flags, union prefixMapCtr *r)
1232 int level;
1233 level = ndr_pull_get_switch_value(ndr, r);
1234 if (ndr_flags & NDR_SCALARS) {
1235 NDR_CHECK(ndr_pull_union_align(ndr, 5));
1236 switch (level) {
1237 case PREFIX_MAP_VERSION_DSDB: {
1238 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->dsdb));
1239 break; }
1241 default:
1242 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1245 if (ndr_flags & NDR_BUFFERS) {
1246 switch (level) {
1247 case PREFIX_MAP_VERSION_DSDB:
1248 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->dsdb));
1249 break;
1251 default:
1252 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1255 return NDR_ERR_SUCCESS;
1258 _PUBLIC_ void ndr_print_prefixMapCtr(struct ndr_print *ndr, const char *name, const union prefixMapCtr *r)
1260 int level;
1261 level = ndr_print_get_switch_value(ndr, r);
1262 ndr_print_union(ndr, name, level, "prefixMapCtr");
1263 switch (level) {
1264 case PREFIX_MAP_VERSION_DSDB:
1265 ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "dsdb", &r->dsdb);
1266 break;
1268 default:
1269 ndr_print_bad_level(ndr, name, level);
1273 _PUBLIC_ enum ndr_err_code ndr_push_prefixMapBlob(struct ndr_push *ndr, int ndr_flags, const struct prefixMapBlob *r)
1275 if (ndr_flags & NDR_SCALARS) {
1276 NDR_CHECK(ndr_push_align(ndr, 5));
1277 NDR_CHECK(ndr_push_prefixMapVersion(ndr, NDR_SCALARS, r->version));
1278 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
1279 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
1280 NDR_CHECK(ndr_push_prefixMapCtr(ndr, NDR_SCALARS, &r->ctr));
1282 if (ndr_flags & NDR_BUFFERS) {
1283 NDR_CHECK(ndr_push_prefixMapCtr(ndr, NDR_BUFFERS, &r->ctr));
1285 return NDR_ERR_SUCCESS;
1288 _PUBLIC_ enum ndr_err_code ndr_pull_prefixMapBlob(struct ndr_pull *ndr, int ndr_flags, struct prefixMapBlob *r)
1290 if (ndr_flags & NDR_SCALARS) {
1291 NDR_CHECK(ndr_pull_align(ndr, 5));
1292 NDR_CHECK(ndr_pull_prefixMapVersion(ndr, NDR_SCALARS, &r->version));
1293 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
1294 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
1295 NDR_CHECK(ndr_pull_prefixMapCtr(ndr, NDR_SCALARS, &r->ctr));
1297 if (ndr_flags & NDR_BUFFERS) {
1298 NDR_CHECK(ndr_pull_prefixMapCtr(ndr, NDR_BUFFERS, &r->ctr));
1300 return NDR_ERR_SUCCESS;
1303 _PUBLIC_ void ndr_print_prefixMapBlob(struct ndr_print *ndr, const char *name, const struct prefixMapBlob *r)
1305 ndr_print_struct(ndr, name, "prefixMapBlob");
1306 ndr->depth++;
1307 ndr_print_prefixMapVersion(ndr, "version", r->version);
1308 ndr_print_uint32(ndr, "reserved", r->reserved);
1309 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
1310 ndr_print_prefixMapCtr(ndr, "ctr", &r->ctr);
1311 ndr->depth--;
1314 static enum ndr_err_code ndr_push_ldapControlDirSyncExtra(struct ndr_push *ndr, int ndr_flags, const union ldapControlDirSyncExtra *r)
1316 if (ndr_flags & NDR_SCALARS) {
1317 int level = ndr_push_get_switch_value(ndr, r);
1318 NDR_CHECK(ndr_push_union_align(ndr, 8));
1319 switch (level) {
1320 case 0: {
1321 break; }
1323 default: {
1324 NDR_CHECK(ndr_push_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->uptodateness_vector));
1325 break; }
1329 if (ndr_flags & NDR_BUFFERS) {
1330 int level = ndr_push_get_switch_value(ndr, r);
1331 switch (level) {
1332 case 0:
1333 break;
1335 default:
1336 break;
1340 return NDR_ERR_SUCCESS;
1343 static enum ndr_err_code ndr_pull_ldapControlDirSyncExtra(struct ndr_pull *ndr, int ndr_flags, union ldapControlDirSyncExtra *r)
1345 int level;
1346 level = ndr_pull_get_switch_value(ndr, r);
1347 if (ndr_flags & NDR_SCALARS) {
1348 NDR_CHECK(ndr_pull_union_align(ndr, 8));
1349 switch (level) {
1350 case 0: {
1351 break; }
1353 default: {
1354 NDR_CHECK(ndr_pull_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->uptodateness_vector));
1355 break; }
1359 if (ndr_flags & NDR_BUFFERS) {
1360 switch (level) {
1361 case 0:
1362 break;
1364 default:
1365 break;
1369 return NDR_ERR_SUCCESS;
1372 _PUBLIC_ void ndr_print_ldapControlDirSyncExtra(struct ndr_print *ndr, const char *name, const union ldapControlDirSyncExtra *r)
1374 int level;
1375 level = ndr_print_get_switch_value(ndr, r);
1376 ndr_print_union(ndr, name, level, "ldapControlDirSyncExtra");
1377 switch (level) {
1378 case 0:
1379 break;
1381 default:
1382 ndr_print_replUpToDateVectorBlob(ndr, "uptodateness_vector", &r->uptodateness_vector);
1383 break;
1388 static size_t ndr_size_ldapControlDirSyncExtra(const union ldapControlDirSyncExtra *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
1390 return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_ldapControlDirSyncExtra, ic);
1393 static enum ndr_err_code ndr_push_ldapControlDirSyncBlob(struct ndr_push *ndr, int ndr_flags, const struct ldapControlDirSyncBlob *r)
1395 if (ndr_flags & NDR_SCALARS) {
1396 NDR_CHECK(ndr_push_align(ndr, 8));
1397 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 3));
1398 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time));
1399 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u2));
1400 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u3));
1401 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, ndr->iconv_convenience, 0)));
1402 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
1403 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid1));
1404 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->extra, ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, ndr->iconv_convenience, 0)));
1405 NDR_CHECK(ndr_push_ldapControlDirSyncExtra(ndr, NDR_SCALARS, &r->extra));
1407 if (ndr_flags & NDR_BUFFERS) {
1408 NDR_CHECK(ndr_push_ldapControlDirSyncExtra(ndr, NDR_BUFFERS, &r->extra));
1410 return NDR_ERR_SUCCESS;
1413 static enum ndr_err_code ndr_pull_ldapControlDirSyncBlob(struct ndr_pull *ndr, int ndr_flags, struct ldapControlDirSyncBlob *r)
1415 if (ndr_flags & NDR_SCALARS) {
1416 NDR_CHECK(ndr_pull_align(ndr, 8));
1417 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u1));
1418 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time));
1419 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u2));
1420 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u3));
1421 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->extra_length));
1422 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
1423 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid1));
1424 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->extra, r->extra_length));
1425 NDR_CHECK(ndr_pull_ldapControlDirSyncExtra(ndr, NDR_SCALARS, &r->extra));
1427 if (ndr_flags & NDR_BUFFERS) {
1428 NDR_CHECK(ndr_pull_ldapControlDirSyncExtra(ndr, NDR_BUFFERS, &r->extra));
1430 return NDR_ERR_SUCCESS;
1433 _PUBLIC_ void ndr_print_ldapControlDirSyncBlob(struct ndr_print *ndr, const char *name, const struct ldapControlDirSyncBlob *r)
1435 ndr_print_struct(ndr, name, "ldapControlDirSyncBlob");
1436 ndr->depth++;
1437 ndr_print_uint32(ndr, "u1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?3:r->u1);
1438 ndr_print_NTTIME(ndr, "time", r->time);
1439 ndr_print_uint32(ndr, "u2", r->u2);
1440 ndr_print_uint32(ndr, "u3", r->u3);
1441 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);
1442 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
1443 ndr_print_GUID(ndr, "guid1", &r->guid1);
1444 ndr_print_set_switch_value(ndr, &r->extra, r->extra_length);
1445 ndr_print_ldapControlDirSyncExtra(ndr, "extra", &r->extra);
1446 ndr->depth--;
1449 _PUBLIC_ enum ndr_err_code ndr_push_ldapControlDirSyncCookie(struct ndr_push *ndr, int ndr_flags, const struct ldapControlDirSyncCookie *r)
1451 uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
1452 if (ndr_flags & NDR_SCALARS) {
1453 NDR_CHECK(ndr_push_align(ndr, 8));
1454 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
1455 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "MSDS", 4, sizeof(uint8_t), CH_DOS));
1457 struct ndr_push *_ndr_blob;
1458 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_blob, 0, -1));
1459 NDR_CHECK(ndr_push_ldapControlDirSyncBlob(_ndr_blob, NDR_SCALARS|NDR_BUFFERS, &r->blob));
1460 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_blob, 0, -1));
1463 if (ndr_flags & NDR_BUFFERS) {
1464 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
1466 ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
1467 return NDR_ERR_SUCCESS;
1470 _PUBLIC_ enum ndr_err_code ndr_pull_ldapControlDirSyncCookie(struct ndr_pull *ndr, int ndr_flags, struct ldapControlDirSyncCookie *r)
1472 uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
1473 if (ndr_flags & NDR_SCALARS) {
1474 NDR_CHECK(ndr_pull_align(ndr, 8));
1475 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
1476 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->msds, 4, sizeof(uint8_t), CH_DOS));
1478 struct ndr_pull *_ndr_blob;
1479 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_blob, 0, -1));
1480 NDR_CHECK(ndr_pull_ldapControlDirSyncBlob(_ndr_blob, NDR_SCALARS|NDR_BUFFERS, &r->blob));
1481 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_blob, 0, -1));
1484 if (ndr_flags & NDR_BUFFERS) {
1485 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
1487 ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
1488 return NDR_ERR_SUCCESS;
1491 _PUBLIC_ void ndr_print_ldapControlDirSyncCookie(struct ndr_print *ndr, const char *name, const struct ldapControlDirSyncCookie *r)
1493 ndr_print_struct(ndr, name, "ldapControlDirSyncCookie");
1494 ndr->depth++;
1495 ndr_print_string(ndr, "msds", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"MSDS":r->msds);
1496 ndr_print_ldapControlDirSyncBlob(ndr, "blob", &r->blob);
1497 ndr->depth--;
1500 static enum ndr_err_code ndr_push_supplementalCredentialsPackage(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsPackage *r)
1502 if (ndr_flags & NDR_SCALARS) {
1503 NDR_CHECK(ndr_push_align(ndr, 2));
1504 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->name)));
1505 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen(r->data)));
1506 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved));
1507 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, 2 * strlen_m(r->name), sizeof(uint8_t), CH_UTF16));
1508 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data, strlen(r->data), sizeof(uint8_t), CH_DOS));
1510 if (ndr_flags & NDR_BUFFERS) {
1512 return NDR_ERR_SUCCESS;
1515 static enum ndr_err_code ndr_pull_supplementalCredentialsPackage(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsPackage *r)
1517 if (ndr_flags & NDR_SCALARS) {
1518 NDR_CHECK(ndr_pull_align(ndr, 2));
1519 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->name_len));
1520 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->data_len));
1521 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
1522 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, r->name_len, sizeof(uint8_t), CH_UTF16));
1523 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data, r->data_len, sizeof(uint8_t), CH_DOS));
1525 if (ndr_flags & NDR_BUFFERS) {
1527 return NDR_ERR_SUCCESS;
1530 _PUBLIC_ void ndr_print_supplementalCredentialsPackage(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsPackage *r)
1532 ndr_print_struct(ndr, name, "supplementalCredentialsPackage");
1533 ndr->depth++;
1534 ndr_print_uint16(ndr, "name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->name):r->name_len);
1535 ndr_print_uint16(ndr, "data_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->data):r->data_len);
1536 ndr_print_uint16(ndr, "reserved", r->reserved);
1537 ndr_print_string(ndr, "name", r->name);
1538 ndr_print_string(ndr, "data", r->data);
1539 ndr->depth--;
1542 static enum ndr_err_code ndr_push_supplementalCredentialsSignature(struct ndr_push *ndr, int ndr_flags, enum supplementalCredentialsSignature r)
1545 uint32_t _flags_save_ENUM = ndr->flags;
1546 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1547 NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
1548 ndr->flags = _flags_save_ENUM;
1550 return NDR_ERR_SUCCESS;
1553 static enum ndr_err_code ndr_pull_supplementalCredentialsSignature(struct ndr_pull *ndr, int ndr_flags, enum supplementalCredentialsSignature *r)
1555 uint16_t v;
1557 uint32_t _flags_save_ENUM = ndr->flags;
1558 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1559 NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
1560 *r = v;
1561 ndr->flags = _flags_save_ENUM;
1563 return NDR_ERR_SUCCESS;
1566 _PUBLIC_ void ndr_print_supplementalCredentialsSignature(struct ndr_print *ndr, const char *name, enum supplementalCredentialsSignature r)
1568 const char *val = NULL;
1571 uint32_t _flags_save_ENUM = ndr->flags;
1572 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1573 switch (r) {
1574 case SUPPLEMENTAL_CREDENTIALS_SIGNATURE: val = "SUPPLEMENTAL_CREDENTIALS_SIGNATURE"; break;
1576 ndr_print_enum(ndr, name, "ENUM", val, r);
1577 ndr->flags = _flags_save_ENUM;
1581 static enum ndr_err_code ndr_push_supplementalCredentialsSubBlob(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsSubBlob *r)
1583 uint32_t cntr_packages_0;
1584 if (ndr_flags & NDR_SCALARS) {
1585 NDR_CHECK(ndr_push_align(ndr, 2));
1586 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, SUPPLEMENTAL_CREDENTIALS_PREFIX, 0x30, sizeof(uint16_t), CH_UTF16));
1587 NDR_CHECK(ndr_push_supplementalCredentialsSignature(ndr, NDR_SCALARS, SUPPLEMENTAL_CREDENTIALS_SIGNATURE));
1588 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_packages));
1589 for (cntr_packages_0 = 0; cntr_packages_0 < r->num_packages; cntr_packages_0++) {
1590 NDR_CHECK(ndr_push_supplementalCredentialsPackage(ndr, NDR_SCALARS, &r->packages[cntr_packages_0]));
1593 if (ndr_flags & NDR_BUFFERS) {
1595 return NDR_ERR_SUCCESS;
1598 static enum ndr_err_code ndr_pull_supplementalCredentialsSubBlob(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsSubBlob *r)
1600 uint32_t cntr_packages_0;
1601 TALLOC_CTX *_mem_save_packages_0;
1602 if (ndr_flags & NDR_SCALARS) {
1603 NDR_CHECK(ndr_pull_align(ndr, 2));
1604 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->prefix, 0x30, sizeof(uint16_t), CH_UTF16));
1605 NDR_CHECK(ndr_pull_supplementalCredentialsSignature(ndr, NDR_SCALARS, &r->signature));
1606 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_packages));
1607 NDR_PULL_ALLOC_N(ndr, r->packages, r->num_packages);
1608 _mem_save_packages_0 = NDR_PULL_GET_MEM_CTX(ndr);
1609 NDR_PULL_SET_MEM_CTX(ndr, r->packages, 0);
1610 for (cntr_packages_0 = 0; cntr_packages_0 < r->num_packages; cntr_packages_0++) {
1611 NDR_CHECK(ndr_pull_supplementalCredentialsPackage(ndr, NDR_SCALARS, &r->packages[cntr_packages_0]));
1613 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_packages_0, 0);
1615 if (ndr_flags & NDR_BUFFERS) {
1617 return NDR_ERR_SUCCESS;
1620 _PUBLIC_ void ndr_print_supplementalCredentialsSubBlob(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsSubBlob *r)
1622 uint32_t cntr_packages_0;
1623 ndr_print_struct(ndr, name, "supplementalCredentialsSubBlob");
1624 ndr->depth++;
1625 ndr_print_string(ndr, "prefix", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?SUPPLEMENTAL_CREDENTIALS_PREFIX:r->prefix);
1626 ndr_print_supplementalCredentialsSignature(ndr, "signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?SUPPLEMENTAL_CREDENTIALS_SIGNATURE:r->signature);
1627 ndr_print_uint16(ndr, "num_packages", r->num_packages);
1628 ndr->print(ndr, "%s: ARRAY(%d)", "packages", (int)r->num_packages);
1629 ndr->depth++;
1630 for (cntr_packages_0=0;cntr_packages_0<r->num_packages;cntr_packages_0++) {
1631 char *idx_0=NULL;
1632 if (asprintf(&idx_0, "[%d]", cntr_packages_0) != -1) {
1633 ndr_print_supplementalCredentialsPackage(ndr, "packages", &r->packages[cntr_packages_0]);
1634 free(idx_0);
1637 ndr->depth--;
1638 ndr->depth--;
1641 static size_t ndr_size_supplementalCredentialsSubBlob(const struct supplementalCredentialsSubBlob *r, struct smb_iconv_convenience *ic, int flags)
1643 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_supplementalCredentialsSubBlob, ic);
1646 _PUBLIC_ enum ndr_err_code ndr_push_supplementalCredentialsBlob(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsBlob *r)
1648 if (ndr_flags & NDR_SCALARS) {
1649 NDR_CHECK(ndr_push_align(ndr, 4));
1650 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1651 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags)));
1652 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1654 struct ndr_push *_ndr_sub;
1655 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags)));
1656 NDR_CHECK(ndr_push_supplementalCredentialsSubBlob(_ndr_sub, NDR_SCALARS, &r->sub));
1657 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags)));
1659 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0));
1661 if (ndr_flags & NDR_BUFFERS) {
1663 return NDR_ERR_SUCCESS;
1666 _PUBLIC_ enum ndr_err_code ndr_pull_supplementalCredentialsBlob(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsBlob *r)
1668 if (ndr_flags & NDR_SCALARS) {
1669 NDR_CHECK(ndr_pull_align(ndr, 4));
1670 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
1671 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
1672 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
1674 struct ndr_pull *_ndr_sub;
1675 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sub, 0, r->__ndr_size));
1676 NDR_CHECK(ndr_pull_supplementalCredentialsSubBlob(_ndr_sub, NDR_SCALARS, &r->sub));
1677 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sub, 0, r->__ndr_size));
1679 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown3));
1681 if (ndr_flags & NDR_BUFFERS) {
1683 return NDR_ERR_SUCCESS;
1686 _PUBLIC_ void ndr_print_supplementalCredentialsBlob(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsBlob *r)
1688 ndr_print_struct(ndr, name, "supplementalCredentialsBlob");
1689 ndr->depth++;
1690 ndr_print_uint32(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown1);
1691 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);
1692 ndr_print_uint32(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown2);
1693 ndr_print_supplementalCredentialsSubBlob(ndr, "sub", &r->sub);
1694 ndr_print_uint8(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown3);
1695 ndr->depth--;
1698 _PUBLIC_ enum ndr_err_code ndr_push_package_PackagesBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PackagesBlob *r)
1700 if (ndr_flags & NDR_SCALARS) {
1701 NDR_CHECK(ndr_push_align(ndr, 4));
1703 uint32_t _flags_save_string_array = ndr->flags;
1704 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1705 NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->names));
1706 ndr->flags = _flags_save_string_array;
1709 if (ndr_flags & NDR_BUFFERS) {
1711 return NDR_ERR_SUCCESS;
1714 _PUBLIC_ enum ndr_err_code ndr_pull_package_PackagesBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PackagesBlob *r)
1716 if (ndr_flags & NDR_SCALARS) {
1717 NDR_CHECK(ndr_pull_align(ndr, 4));
1719 uint32_t _flags_save_string_array = ndr->flags;
1720 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1721 NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->names));
1722 ndr->flags = _flags_save_string_array;
1725 if (ndr_flags & NDR_BUFFERS) {
1727 return NDR_ERR_SUCCESS;
1730 _PUBLIC_ void ndr_print_package_PackagesBlob(struct ndr_print *ndr, const char *name, const struct package_PackagesBlob *r)
1732 ndr_print_struct(ndr, name, "package_PackagesBlob");
1733 ndr->depth++;
1734 ndr_print_string_array(ndr, "names", r->names);
1735 ndr->depth--;
1738 static enum ndr_err_code ndr_push_package_PrimaryKerberosString(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosString *r)
1740 if (ndr_flags & NDR_SCALARS) {
1741 NDR_CHECK(ndr_push_align(ndr, 5));
1742 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
1743 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
1745 uint32_t _flags_save_string = ndr->flags;
1746 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1747 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->string));
1748 ndr->flags = _flags_save_string;
1751 if (ndr_flags & NDR_BUFFERS) {
1753 uint32_t _flags_save_string = ndr->flags;
1754 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1755 if (r->string) {
1756 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->string));
1758 struct ndr_push *_ndr_string;
1759 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_string, 0, 2 * strlen_m(r->string)));
1760 NDR_CHECK(ndr_push_string(_ndr_string, NDR_SCALARS, r->string));
1761 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_string, 0, 2 * strlen_m(r->string)));
1764 ndr->flags = _flags_save_string;
1767 return NDR_ERR_SUCCESS;
1770 static enum ndr_err_code ndr_pull_package_PrimaryKerberosString(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosString *r)
1772 uint32_t _ptr_string;
1773 TALLOC_CTX *_mem_save_string_0;
1774 if (ndr_flags & NDR_SCALARS) {
1775 NDR_CHECK(ndr_pull_align(ndr, 5));
1776 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
1777 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
1779 uint32_t _flags_save_string = ndr->flags;
1780 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1781 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
1782 if (_ptr_string) {
1783 NDR_PULL_ALLOC(ndr, r->string);
1784 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->string, _ptr_string));
1785 } else {
1786 r->string = NULL;
1788 ndr->flags = _flags_save_string;
1791 if (ndr_flags & NDR_BUFFERS) {
1793 uint32_t _flags_save_string = ndr->flags;
1794 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1795 if (r->string) {
1796 uint32_t _relative_save_offset;
1797 _relative_save_offset = ndr->offset;
1798 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->string));
1799 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
1800 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
1802 struct ndr_pull *_ndr_string;
1803 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_string, 0, r->size));
1804 NDR_CHECK(ndr_pull_string(_ndr_string, NDR_SCALARS, &r->string));
1805 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_string, 0, r->size));
1807 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
1808 ndr->offset = _relative_save_offset;
1810 ndr->flags = _flags_save_string;
1813 return NDR_ERR_SUCCESS;
1816 _PUBLIC_ void ndr_print_package_PrimaryKerberosString(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosString *r)
1818 ndr_print_struct(ndr, name, "package_PrimaryKerberosString");
1819 ndr->depth++;
1820 ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length);
1821 ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->size);
1822 ndr_print_ptr(ndr, "string", r->string);
1823 ndr->depth++;
1824 if (r->string) {
1825 ndr_print_string(ndr, "string", r->string);
1827 ndr->depth--;
1828 ndr->depth--;
1831 static enum ndr_err_code ndr_push_package_PrimaryKerberosKey3(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosKey3 *r)
1833 if (ndr_flags & NDR_SCALARS) {
1834 NDR_CHECK(ndr_push_align(ndr, 5));
1835 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
1836 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
1837 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1838 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->keytype));
1839 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (r->value?r->value->length:0)));
1841 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1842 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1843 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value));
1844 ndr->flags = _flags_save_DATA_BLOB;
1847 if (ndr_flags & NDR_BUFFERS) {
1849 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1850 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1851 if (r->value) {
1852 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value));
1854 struct ndr_push *_ndr_value;
1855 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_value, 0, (r->value?r->value->length:0)));
1856 NDR_CHECK(ndr_push_DATA_BLOB(_ndr_value, NDR_SCALARS, *r->value));
1857 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_value, 0, (r->value?r->value->length:0)));
1860 ndr->flags = _flags_save_DATA_BLOB;
1863 return NDR_ERR_SUCCESS;
1866 static enum ndr_err_code ndr_pull_package_PrimaryKerberosKey3(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosKey3 *r)
1868 uint32_t _ptr_value;
1869 TALLOC_CTX *_mem_save_value_0;
1870 if (ndr_flags & NDR_SCALARS) {
1871 NDR_CHECK(ndr_pull_align(ndr, 5));
1872 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved1));
1873 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved2));
1874 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3));
1875 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->keytype));
1876 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_len));
1878 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1879 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1880 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
1881 if (_ptr_value) {
1882 NDR_PULL_ALLOC(ndr, r->value);
1883 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value, _ptr_value));
1884 } else {
1885 r->value = NULL;
1887 ndr->flags = _flags_save_DATA_BLOB;
1890 if (ndr_flags & NDR_BUFFERS) {
1892 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1893 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1894 if (r->value) {
1895 uint32_t _relative_save_offset;
1896 _relative_save_offset = ndr->offset;
1897 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value));
1898 _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
1899 NDR_PULL_SET_MEM_CTX(ndr, r->value, 0);
1901 struct ndr_pull *_ndr_value;
1902 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_value, 0, r->value_len));
1903 NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_value, NDR_SCALARS, r->value));
1904 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_value, 0, r->value_len));
1906 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
1907 ndr->offset = _relative_save_offset;
1909 ndr->flags = _flags_save_DATA_BLOB;
1912 return NDR_ERR_SUCCESS;
1915 _PUBLIC_ void ndr_print_package_PrimaryKerberosKey3(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosKey3 *r)
1917 ndr_print_struct(ndr, name, "package_PrimaryKerberosKey3");
1918 ndr->depth++;
1919 ndr_print_uint16(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
1920 ndr_print_uint16(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2);
1921 ndr_print_uint32(ndr, "reserved3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved3);
1922 ndr_print_uint32(ndr, "keytype", r->keytype);
1923 ndr_print_uint32(ndr, "value_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(r->value?r->value->length:0):r->value_len);
1924 ndr_print_ptr(ndr, "value", r->value);
1925 ndr->depth++;
1926 if (r->value) {
1927 ndr_print_DATA_BLOB(ndr, "value", *r->value);
1929 ndr->depth--;
1930 ndr->depth--;
1933 static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr3(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosCtr3 *r)
1935 uint32_t cntr_keys_0;
1936 uint32_t cntr_old_keys_0;
1937 if (ndr_flags & NDR_SCALARS) {
1938 NDR_CHECK(ndr_push_align(ndr, 5));
1939 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_keys));
1940 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_old_keys));
1941 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
1942 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1943 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
1945 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1946 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
1948 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1949 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1950 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1951 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1952 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1954 if (ndr_flags & NDR_BUFFERS) {
1955 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
1956 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1957 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
1959 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1960 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
1963 return NDR_ERR_SUCCESS;
1966 static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr3(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosCtr3 *r)
1968 uint32_t cntr_keys_0;
1969 TALLOC_CTX *_mem_save_keys_0;
1970 uint32_t cntr_old_keys_0;
1971 TALLOC_CTX *_mem_save_old_keys_0;
1972 if (ndr_flags & NDR_SCALARS) {
1973 NDR_CHECK(ndr_pull_align(ndr, 5));
1974 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_keys));
1975 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_old_keys));
1976 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
1977 NDR_PULL_ALLOC_N(ndr, r->keys, r->num_keys);
1978 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1979 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
1980 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1981 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
1983 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
1984 NDR_PULL_ALLOC_N(ndr, r->old_keys, r->num_old_keys);
1985 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1986 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
1987 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1988 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
1990 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
1991 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding1));
1992 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding2));
1993 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding3));
1994 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding4));
1995 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding5));
1997 if (ndr_flags & NDR_BUFFERS) {
1998 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
1999 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2000 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
2001 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
2002 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
2004 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
2005 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2006 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
2007 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
2008 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
2010 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
2012 return NDR_ERR_SUCCESS;
2015 _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr3(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosCtr3 *r)
2017 uint32_t cntr_keys_0;
2018 uint32_t cntr_old_keys_0;
2019 ndr_print_struct(ndr, name, "package_PrimaryKerberosCtr3");
2020 ndr->depth++;
2021 ndr_print_uint16(ndr, "num_keys", r->num_keys);
2022 ndr_print_uint16(ndr, "num_old_keys", r->num_old_keys);
2023 ndr_print_package_PrimaryKerberosString(ndr, "salt", &r->salt);
2024 ndr->print(ndr, "%s: ARRAY(%d)", "keys", (int)r->num_keys);
2025 ndr->depth++;
2026 for (cntr_keys_0=0;cntr_keys_0<r->num_keys;cntr_keys_0++) {
2027 char *idx_0=NULL;
2028 if (asprintf(&idx_0, "[%d]", cntr_keys_0) != -1) {
2029 ndr_print_package_PrimaryKerberosKey3(ndr, "keys", &r->keys[cntr_keys_0]);
2030 free(idx_0);
2033 ndr->depth--;
2034 ndr->print(ndr, "%s: ARRAY(%d)", "old_keys", (int)r->num_old_keys);
2035 ndr->depth++;
2036 for (cntr_old_keys_0=0;cntr_old_keys_0<r->num_old_keys;cntr_old_keys_0++) {
2037 char *idx_0=NULL;
2038 if (asprintf(&idx_0, "[%d]", cntr_old_keys_0) != -1) {
2039 ndr_print_package_PrimaryKerberosKey3(ndr, "old_keys", &r->old_keys[cntr_old_keys_0]);
2040 free(idx_0);
2043 ndr->depth--;
2044 ndr_print_uint32(ndr, "padding1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding1);
2045 ndr_print_uint32(ndr, "padding2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding2);
2046 ndr_print_uint32(ndr, "padding3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding3);
2047 ndr_print_uint32(ndr, "padding4", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding4);
2048 ndr_print_uint32(ndr, "padding5", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding5);
2049 ndr->depth--;
2052 static enum ndr_err_code ndr_push_package_PrimaryKerberosKey4(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosKey4 *r)
2054 if (ndr_flags & NDR_SCALARS) {
2055 NDR_CHECK(ndr_push_align(ndr, 5));
2056 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
2057 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
2058 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2059 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->iteration_count));
2060 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->keytype));
2061 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (r->value?r->value->length:0)));
2063 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2064 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2065 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value));
2066 ndr->flags = _flags_save_DATA_BLOB;
2069 if (ndr_flags & NDR_BUFFERS) {
2071 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2072 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2073 if (r->value) {
2074 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value));
2076 struct ndr_push *_ndr_value;
2077 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_value, 0, (r->value?r->value->length:0)));
2078 NDR_CHECK(ndr_push_DATA_BLOB(_ndr_value, NDR_SCALARS, *r->value));
2079 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_value, 0, (r->value?r->value->length:0)));
2082 ndr->flags = _flags_save_DATA_BLOB;
2085 return NDR_ERR_SUCCESS;
2088 static enum ndr_err_code ndr_pull_package_PrimaryKerberosKey4(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosKey4 *r)
2090 uint32_t _ptr_value;
2091 TALLOC_CTX *_mem_save_value_0;
2092 if (ndr_flags & NDR_SCALARS) {
2093 NDR_CHECK(ndr_pull_align(ndr, 5));
2094 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved1));
2095 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved2));
2096 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3));
2097 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->iteration_count));
2098 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->keytype));
2099 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_len));
2101 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2102 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2103 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
2104 if (_ptr_value) {
2105 NDR_PULL_ALLOC(ndr, r->value);
2106 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value, _ptr_value));
2107 } else {
2108 r->value = NULL;
2110 ndr->flags = _flags_save_DATA_BLOB;
2113 if (ndr_flags & NDR_BUFFERS) {
2115 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2116 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2117 if (r->value) {
2118 uint32_t _relative_save_offset;
2119 _relative_save_offset = ndr->offset;
2120 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value));
2121 _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
2122 NDR_PULL_SET_MEM_CTX(ndr, r->value, 0);
2124 struct ndr_pull *_ndr_value;
2125 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_value, 0, r->value_len));
2126 NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_value, NDR_SCALARS, r->value));
2127 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_value, 0, r->value_len));
2129 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
2130 ndr->offset = _relative_save_offset;
2132 ndr->flags = _flags_save_DATA_BLOB;
2135 return NDR_ERR_SUCCESS;
2138 _PUBLIC_ void ndr_print_package_PrimaryKerberosKey4(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosKey4 *r)
2140 ndr_print_struct(ndr, name, "package_PrimaryKerberosKey4");
2141 ndr->depth++;
2142 ndr_print_uint16(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
2143 ndr_print_uint16(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2);
2144 ndr_print_uint32(ndr, "reserved3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved3);
2145 ndr_print_uint32(ndr, "iteration_count", r->iteration_count);
2146 ndr_print_uint32(ndr, "keytype", r->keytype);
2147 ndr_print_uint32(ndr, "value_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(r->value?r->value->length:0):r->value_len);
2148 ndr_print_ptr(ndr, "value", r->value);
2149 ndr->depth++;
2150 if (r->value) {
2151 ndr_print_DATA_BLOB(ndr, "value", *r->value);
2153 ndr->depth--;
2154 ndr->depth--;
2157 static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr4(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosCtr4 *r)
2159 uint32_t cntr_keys_0;
2160 uint32_t cntr_old_keys_0;
2161 uint32_t cntr_older_keys_0;
2162 if (ndr_flags & NDR_SCALARS) {
2163 NDR_CHECK(ndr_push_align(ndr, 5));
2164 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_keys));
2165 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
2166 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_old_keys));
2167 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_older_keys));
2168 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
2169 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->default_iteration_count));
2170 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
2171 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
2173 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
2174 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
2176 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
2177 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->older_keys[cntr_older_keys_0]));
2180 if (ndr_flags & NDR_BUFFERS) {
2181 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
2182 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
2183 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
2185 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
2186 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
2188 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
2189 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->older_keys[cntr_older_keys_0]));
2192 return NDR_ERR_SUCCESS;
2195 static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr4(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosCtr4 *r)
2197 uint32_t cntr_keys_0;
2198 TALLOC_CTX *_mem_save_keys_0;
2199 uint32_t cntr_service_keys_0;
2200 TALLOC_CTX *_mem_save_service_keys_0;
2201 uint32_t cntr_old_keys_0;
2202 TALLOC_CTX *_mem_save_old_keys_0;
2203 uint32_t cntr_older_keys_0;
2204 TALLOC_CTX *_mem_save_older_keys_0;
2205 if (ndr_flags & NDR_SCALARS) {
2206 NDR_CHECK(ndr_pull_align(ndr, 5));
2207 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_keys));
2208 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_service_keys));
2209 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_old_keys));
2210 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_older_keys));
2211 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
2212 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->default_iteration_count));
2213 NDR_PULL_ALLOC_N(ndr, r->keys, r->num_keys);
2214 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2215 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
2216 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
2217 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
2219 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
2220 NDR_PULL_ALLOC_N(ndr, r->service_keys, r->num_service_keys);
2221 _mem_save_service_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2222 NDR_PULL_SET_MEM_CTX(ndr, r->service_keys, 0);
2223 for (cntr_service_keys_0 = 0; cntr_service_keys_0 < r->num_service_keys; cntr_service_keys_0++) {
2224 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->service_keys[cntr_service_keys_0]));
2226 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_keys_0, 0);
2227 NDR_PULL_ALLOC_N(ndr, r->old_keys, r->num_old_keys);
2228 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2229 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
2230 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
2231 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
2233 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
2234 NDR_PULL_ALLOC_N(ndr, r->older_keys, r->num_older_keys);
2235 _mem_save_older_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2236 NDR_PULL_SET_MEM_CTX(ndr, r->older_keys, 0);
2237 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
2238 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->older_keys[cntr_older_keys_0]));
2240 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_older_keys_0, 0);
2242 if (ndr_flags & NDR_BUFFERS) {
2243 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
2244 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2245 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
2246 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
2247 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
2249 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
2250 _mem_save_service_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2251 NDR_PULL_SET_MEM_CTX(ndr, r->service_keys, 0);
2252 for (cntr_service_keys_0 = 0; cntr_service_keys_0 < r->num_service_keys; cntr_service_keys_0++) {
2253 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->service_keys[cntr_service_keys_0]));
2255 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_keys_0, 0);
2256 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2257 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
2258 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
2259 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
2261 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
2262 _mem_save_older_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2263 NDR_PULL_SET_MEM_CTX(ndr, r->older_keys, 0);
2264 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
2265 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->older_keys[cntr_older_keys_0]));
2267 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_older_keys_0, 0);
2269 return NDR_ERR_SUCCESS;
2272 _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr4(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosCtr4 *r)
2274 uint32_t cntr_keys_0;
2275 uint32_t cntr_service_keys_0;
2276 uint32_t cntr_old_keys_0;
2277 uint32_t cntr_older_keys_0;
2278 ndr_print_struct(ndr, name, "package_PrimaryKerberosCtr4");
2279 ndr->depth++;
2280 ndr_print_uint16(ndr, "num_keys", r->num_keys);
2281 ndr_print_uint16(ndr, "num_service_keys", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->num_service_keys);
2282 ndr_print_uint16(ndr, "num_old_keys", r->num_old_keys);
2283 ndr_print_uint16(ndr, "num_older_keys", r->num_older_keys);
2284 ndr_print_package_PrimaryKerberosString(ndr, "salt", &r->salt);
2285 ndr_print_uint32(ndr, "default_iteration_count", r->default_iteration_count);
2286 ndr->print(ndr, "%s: ARRAY(%d)", "keys", (int)r->num_keys);
2287 ndr->depth++;
2288 for (cntr_keys_0=0;cntr_keys_0<r->num_keys;cntr_keys_0++) {
2289 char *idx_0=NULL;
2290 if (asprintf(&idx_0, "[%d]", cntr_keys_0) != -1) {
2291 ndr_print_package_PrimaryKerberosKey4(ndr, "keys", &r->keys[cntr_keys_0]);
2292 free(idx_0);
2295 ndr->depth--;
2296 ndr->print(ndr, "%s: ARRAY(%d)", "service_keys", (int)r->num_service_keys);
2297 ndr->depth++;
2298 for (cntr_service_keys_0=0;cntr_service_keys_0<r->num_service_keys;cntr_service_keys_0++) {
2299 char *idx_0=NULL;
2300 if (asprintf(&idx_0, "[%d]", cntr_service_keys_0) != -1) {
2301 ndr_print_package_PrimaryKerberosKey4(ndr, "service_keys", &r->service_keys[cntr_service_keys_0]);
2302 free(idx_0);
2305 ndr->depth--;
2306 ndr->print(ndr, "%s: ARRAY(%d)", "old_keys", (int)r->num_old_keys);
2307 ndr->depth++;
2308 for (cntr_old_keys_0=0;cntr_old_keys_0<r->num_old_keys;cntr_old_keys_0++) {
2309 char *idx_0=NULL;
2310 if (asprintf(&idx_0, "[%d]", cntr_old_keys_0) != -1) {
2311 ndr_print_package_PrimaryKerberosKey4(ndr, "old_keys", &r->old_keys[cntr_old_keys_0]);
2312 free(idx_0);
2315 ndr->depth--;
2316 ndr->print(ndr, "%s: ARRAY(%d)", "older_keys", (int)r->num_older_keys);
2317 ndr->depth++;
2318 for (cntr_older_keys_0=0;cntr_older_keys_0<r->num_older_keys;cntr_older_keys_0++) {
2319 char *idx_0=NULL;
2320 if (asprintf(&idx_0, "[%d]", cntr_older_keys_0) != -1) {
2321 ndr_print_package_PrimaryKerberosKey4(ndr, "older_keys", &r->older_keys[cntr_older_keys_0]);
2322 free(idx_0);
2325 ndr->depth--;
2326 ndr->depth--;
2329 static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr(struct ndr_push *ndr, int ndr_flags, const union package_PrimaryKerberosCtr *r)
2331 if (ndr_flags & NDR_SCALARS) {
2332 int level = ndr_push_get_switch_value(ndr, r);
2333 NDR_CHECK(ndr_push_union_align(ndr, 5));
2334 switch (level) {
2335 case 3: {
2336 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr, NDR_SCALARS, &r->ctr3));
2337 break; }
2339 case 4: {
2340 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr4(ndr, NDR_SCALARS, &r->ctr4));
2341 break; }
2343 default:
2344 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2347 if (ndr_flags & NDR_BUFFERS) {
2348 int level = ndr_push_get_switch_value(ndr, r);
2349 switch (level) {
2350 case 3:
2351 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr, NDR_BUFFERS, &r->ctr3));
2352 break;
2354 case 4:
2355 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr4(ndr, NDR_BUFFERS, &r->ctr4));
2356 break;
2358 default:
2359 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2362 return NDR_ERR_SUCCESS;
2365 static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr(struct ndr_pull *ndr, int ndr_flags, union package_PrimaryKerberosCtr *r)
2367 int level;
2368 level = ndr_pull_get_switch_value(ndr, r);
2369 if (ndr_flags & NDR_SCALARS) {
2370 NDR_CHECK(ndr_pull_union_align(ndr, 5));
2371 switch (level) {
2372 case 3: {
2373 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr, NDR_SCALARS, &r->ctr3));
2374 break; }
2376 case 4: {
2377 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr4(ndr, NDR_SCALARS, &r->ctr4));
2378 break; }
2380 default:
2381 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2384 if (ndr_flags & NDR_BUFFERS) {
2385 switch (level) {
2386 case 3:
2387 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr, NDR_BUFFERS, &r->ctr3));
2388 break;
2390 case 4:
2391 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr4(ndr, NDR_BUFFERS, &r->ctr4));
2392 break;
2394 default:
2395 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2398 return NDR_ERR_SUCCESS;
2401 _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr(struct ndr_print *ndr, const char *name, const union package_PrimaryKerberosCtr *r)
2403 int level;
2404 level = ndr_print_get_switch_value(ndr, r);
2405 ndr_print_union(ndr, name, level, "package_PrimaryKerberosCtr");
2406 switch (level) {
2407 case 3:
2408 ndr_print_package_PrimaryKerberosCtr3(ndr, "ctr3", &r->ctr3);
2409 break;
2411 case 4:
2412 ndr_print_package_PrimaryKerberosCtr4(ndr, "ctr4", &r->ctr4);
2413 break;
2415 default:
2416 ndr_print_bad_level(ndr, name, level);
2420 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryKerberosBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosBlob *r)
2422 if (ndr_flags & NDR_SCALARS) {
2423 NDR_CHECK(ndr_push_align(ndr, 5));
2424 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->version));
2425 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
2426 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
2427 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr, NDR_SCALARS, &r->ctr));
2429 if (ndr_flags & NDR_BUFFERS) {
2430 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr, NDR_BUFFERS, &r->ctr));
2432 return NDR_ERR_SUCCESS;
2435 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryKerberosBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosBlob *r)
2437 if (ndr_flags & NDR_SCALARS) {
2438 NDR_CHECK(ndr_pull_align(ndr, 5));
2439 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->version));
2440 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags));
2441 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
2442 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr, NDR_SCALARS, &r->ctr));
2444 if (ndr_flags & NDR_BUFFERS) {
2445 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr, NDR_BUFFERS, &r->ctr));
2447 return NDR_ERR_SUCCESS;
2450 _PUBLIC_ void ndr_print_package_PrimaryKerberosBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosBlob *r)
2452 ndr_print_struct(ndr, name, "package_PrimaryKerberosBlob");
2453 ndr->depth++;
2454 ndr_print_uint16(ndr, "version", r->version);
2455 ndr_print_uint16(ndr, "flags", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->flags);
2456 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
2457 ndr_print_package_PrimaryKerberosCtr(ndr, "ctr", &r->ctr);
2458 ndr->depth--;
2461 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryCLEARTEXTBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryCLEARTEXTBlob *r)
2463 if (ndr_flags & NDR_SCALARS) {
2464 NDR_CHECK(ndr_push_align(ndr, 4));
2466 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2467 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2468 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->cleartext));
2469 ndr->flags = _flags_save_DATA_BLOB;
2472 if (ndr_flags & NDR_BUFFERS) {
2474 return NDR_ERR_SUCCESS;
2477 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryCLEARTEXTBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryCLEARTEXTBlob *r)
2479 if (ndr_flags & NDR_SCALARS) {
2480 NDR_CHECK(ndr_pull_align(ndr, 4));
2482 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2483 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2484 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->cleartext));
2485 ndr->flags = _flags_save_DATA_BLOB;
2488 if (ndr_flags & NDR_BUFFERS) {
2490 return NDR_ERR_SUCCESS;
2493 _PUBLIC_ void ndr_print_package_PrimaryCLEARTEXTBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryCLEARTEXTBlob *r)
2495 ndr_print_struct(ndr, name, "package_PrimaryCLEARTEXTBlob");
2496 ndr->depth++;
2497 ndr_print_DATA_BLOB(ndr, "cleartext", r->cleartext);
2498 ndr->depth--;
2501 static enum ndr_err_code ndr_push_package_PrimaryWDigestHash(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestHash *r)
2504 uint32_t _flags_save_STRUCT = ndr->flags;
2505 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2506 if (ndr_flags & NDR_SCALARS) {
2507 NDR_CHECK(ndr_push_align(ndr, 1));
2508 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
2510 if (ndr_flags & NDR_BUFFERS) {
2512 ndr->flags = _flags_save_STRUCT;
2514 return NDR_ERR_SUCCESS;
2517 static enum ndr_err_code ndr_pull_package_PrimaryWDigestHash(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestHash *r)
2520 uint32_t _flags_save_STRUCT = ndr->flags;
2521 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2522 if (ndr_flags & NDR_SCALARS) {
2523 NDR_CHECK(ndr_pull_align(ndr, 1));
2524 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
2526 if (ndr_flags & NDR_BUFFERS) {
2528 ndr->flags = _flags_save_STRUCT;
2530 return NDR_ERR_SUCCESS;
2533 _PUBLIC_ void ndr_print_package_PrimaryWDigestHash(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestHash *r)
2535 ndr_print_struct(ndr, name, "package_PrimaryWDigestHash");
2537 uint32_t _flags_save_STRUCT = ndr->flags;
2538 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2539 ndr->depth++;
2540 ndr_print_array_uint8(ndr, "hash", r->hash, 16);
2541 ndr->depth--;
2542 ndr->flags = _flags_save_STRUCT;
2546 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryWDigestBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestBlob *r)
2548 uint32_t cntr_hashes_0;
2549 if (ndr_flags & NDR_SCALARS) {
2550 NDR_CHECK(ndr_push_align(ndr, 4));
2551 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0x31));
2552 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0x01));
2553 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->num_hashes));
2554 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2555 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, 0));
2556 for (cntr_hashes_0 = 0; cntr_hashes_0 < r->num_hashes; cntr_hashes_0++) {
2557 NDR_CHECK(ndr_push_package_PrimaryWDigestHash(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0]));
2560 if (ndr_flags & NDR_BUFFERS) {
2562 return NDR_ERR_SUCCESS;
2565 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryWDigestBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestBlob *r)
2567 uint32_t cntr_hashes_0;
2568 TALLOC_CTX *_mem_save_hashes_0;
2569 if (ndr_flags & NDR_SCALARS) {
2570 NDR_CHECK(ndr_pull_align(ndr, 4));
2571 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown1));
2572 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown2));
2573 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->num_hashes));
2574 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
2575 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->uuknown4));
2576 NDR_PULL_ALLOC_N(ndr, r->hashes, r->num_hashes);
2577 _mem_save_hashes_0 = NDR_PULL_GET_MEM_CTX(ndr);
2578 NDR_PULL_SET_MEM_CTX(ndr, r->hashes, 0);
2579 for (cntr_hashes_0 = 0; cntr_hashes_0 < r->num_hashes; cntr_hashes_0++) {
2580 NDR_CHECK(ndr_pull_package_PrimaryWDigestHash(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0]));
2582 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hashes_0, 0);
2584 if (ndr_flags & NDR_BUFFERS) {
2586 return NDR_ERR_SUCCESS;
2589 _PUBLIC_ void ndr_print_package_PrimaryWDigestBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestBlob *r)
2591 uint32_t cntr_hashes_0;
2592 ndr_print_struct(ndr, name, "package_PrimaryWDigestBlob");
2593 ndr->depth++;
2594 ndr_print_uint16(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x31:r->unknown1);
2595 ndr_print_uint8(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x01:r->unknown2);
2596 ndr_print_uint8(ndr, "num_hashes", r->num_hashes);
2597 ndr_print_uint32(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown3);
2598 ndr_print_udlong(ndr, "uuknown4", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->uuknown4);
2599 ndr->print(ndr, "%s: ARRAY(%d)", "hashes", (int)r->num_hashes);
2600 ndr->depth++;
2601 for (cntr_hashes_0=0;cntr_hashes_0<r->num_hashes;cntr_hashes_0++) {
2602 char *idx_0=NULL;
2603 if (asprintf(&idx_0, "[%d]", cntr_hashes_0) != -1) {
2604 ndr_print_package_PrimaryWDigestHash(ndr, "hashes", &r->hashes[cntr_hashes_0]);
2605 free(idx_0);
2608 ndr->depth--;
2609 ndr->depth--;
2612 static enum ndr_err_code ndr_push_AuthInfoNone(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoNone *r)
2614 if (ndr_flags & NDR_SCALARS) {
2615 NDR_CHECK(ndr_push_align(ndr, 4));
2616 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2618 if (ndr_flags & NDR_BUFFERS) {
2620 return NDR_ERR_SUCCESS;
2623 static enum ndr_err_code ndr_pull_AuthInfoNone(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoNone *r)
2625 if (ndr_flags & NDR_SCALARS) {
2626 NDR_CHECK(ndr_pull_align(ndr, 4));
2627 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2629 if (ndr_flags & NDR_BUFFERS) {
2631 return NDR_ERR_SUCCESS;
2634 _PUBLIC_ void ndr_print_AuthInfoNone(struct ndr_print *ndr, const char *name, const struct AuthInfoNone *r)
2636 ndr_print_struct(ndr, name, "AuthInfoNone");
2637 ndr->depth++;
2638 ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->size);
2639 ndr->depth--;
2642 static enum ndr_err_code ndr_push_AuthInfoNT4Owf(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoNT4Owf *r)
2644 if (ndr_flags & NDR_SCALARS) {
2645 NDR_CHECK(ndr_push_align(ndr, 4));
2646 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 16));
2647 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->password));
2649 if (ndr_flags & NDR_BUFFERS) {
2651 return NDR_ERR_SUCCESS;
2654 static enum ndr_err_code ndr_pull_AuthInfoNT4Owf(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoNT4Owf *r)
2656 if (ndr_flags & NDR_SCALARS) {
2657 NDR_CHECK(ndr_pull_align(ndr, 4));
2658 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2659 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->password));
2661 if (ndr_flags & NDR_BUFFERS) {
2663 return NDR_ERR_SUCCESS;
2666 _PUBLIC_ void ndr_print_AuthInfoNT4Owf(struct ndr_print *ndr, const char *name, const struct AuthInfoNT4Owf *r)
2668 ndr_print_struct(ndr, name, "AuthInfoNT4Owf");
2669 ndr->depth++;
2670 ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?16:r->size);
2671 ndr_print_samr_Password(ndr, "password", &r->password);
2672 ndr->depth--;
2675 static enum ndr_err_code ndr_push_AuthInfoClear(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoClear *r)
2677 if (ndr_flags & NDR_SCALARS) {
2678 NDR_CHECK(ndr_push_align(ndr, 4));
2679 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
2680 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->password, r->size));
2682 if (ndr_flags & NDR_BUFFERS) {
2684 return NDR_ERR_SUCCESS;
2687 static enum ndr_err_code ndr_pull_AuthInfoClear(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoClear *r)
2689 if (ndr_flags & NDR_SCALARS) {
2690 NDR_CHECK(ndr_pull_align(ndr, 4));
2691 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2692 NDR_PULL_ALLOC_N(ndr, r->password, r->size);
2693 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->password, r->size));
2695 if (ndr_flags & NDR_BUFFERS) {
2697 return NDR_ERR_SUCCESS;
2700 _PUBLIC_ void ndr_print_AuthInfoClear(struct ndr_print *ndr, const char *name, const struct AuthInfoClear *r)
2702 ndr_print_struct(ndr, name, "AuthInfoClear");
2703 ndr->depth++;
2704 ndr_print_uint32(ndr, "size", r->size);
2705 ndr_print_array_uint8(ndr, "password", r->password, r->size);
2706 ndr->depth--;
2709 static enum ndr_err_code ndr_push_AuthInfoVersion(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoVersion *r)
2711 if (ndr_flags & NDR_SCALARS) {
2712 NDR_CHECK(ndr_push_align(ndr, 4));
2713 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 4));
2714 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
2716 if (ndr_flags & NDR_BUFFERS) {
2718 return NDR_ERR_SUCCESS;
2721 static enum ndr_err_code ndr_pull_AuthInfoVersion(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoVersion *r)
2723 if (ndr_flags & NDR_SCALARS) {
2724 NDR_CHECK(ndr_pull_align(ndr, 4));
2725 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2726 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
2728 if (ndr_flags & NDR_BUFFERS) {
2730 return NDR_ERR_SUCCESS;
2733 _PUBLIC_ void ndr_print_AuthInfoVersion(struct ndr_print *ndr, const char *name, const struct AuthInfoVersion *r)
2735 ndr_print_struct(ndr, name, "AuthInfoVersion");
2736 ndr->depth++;
2737 ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?4:r->size);
2738 ndr_print_uint32(ndr, "version", r->version);
2739 ndr->depth--;
2742 static enum ndr_err_code ndr_push_AuthInfo(struct ndr_push *ndr, int ndr_flags, const union AuthInfo *r)
2744 if (ndr_flags & NDR_SCALARS) {
2745 int level = ndr_push_get_switch_value(ndr, r);
2746 NDR_CHECK(ndr_push_union_align(ndr, 4));
2747 switch (level) {
2748 case TRUST_AUTH_TYPE_NONE: {
2749 NDR_CHECK(ndr_push_AuthInfoNone(ndr, NDR_SCALARS, &r->none));
2750 break; }
2752 case TRUST_AUTH_TYPE_NT4OWF: {
2753 NDR_CHECK(ndr_push_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf));
2754 break; }
2756 case TRUST_AUTH_TYPE_CLEAR: {
2757 NDR_CHECK(ndr_push_AuthInfoClear(ndr, NDR_SCALARS, &r->clear));
2758 break; }
2760 case TRUST_AUTH_TYPE_VERSION: {
2761 NDR_CHECK(ndr_push_AuthInfoVersion(ndr, NDR_SCALARS, &r->version));
2762 break; }
2764 default:
2765 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2768 if (ndr_flags & NDR_BUFFERS) {
2769 int level = ndr_push_get_switch_value(ndr, r);
2770 switch (level) {
2771 case TRUST_AUTH_TYPE_NONE:
2772 break;
2774 case TRUST_AUTH_TYPE_NT4OWF:
2775 break;
2777 case TRUST_AUTH_TYPE_CLEAR:
2778 break;
2780 case TRUST_AUTH_TYPE_VERSION:
2781 break;
2783 default:
2784 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2787 return NDR_ERR_SUCCESS;
2790 static enum ndr_err_code ndr_pull_AuthInfo(struct ndr_pull *ndr, int ndr_flags, union AuthInfo *r)
2792 int level;
2793 level = ndr_pull_get_switch_value(ndr, r);
2794 if (ndr_flags & NDR_SCALARS) {
2795 NDR_CHECK(ndr_pull_union_align(ndr, 4));
2796 switch (level) {
2797 case TRUST_AUTH_TYPE_NONE: {
2798 NDR_CHECK(ndr_pull_AuthInfoNone(ndr, NDR_SCALARS, &r->none));
2799 break; }
2801 case TRUST_AUTH_TYPE_NT4OWF: {
2802 NDR_CHECK(ndr_pull_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf));
2803 break; }
2805 case TRUST_AUTH_TYPE_CLEAR: {
2806 NDR_CHECK(ndr_pull_AuthInfoClear(ndr, NDR_SCALARS, &r->clear));
2807 break; }
2809 case TRUST_AUTH_TYPE_VERSION: {
2810 NDR_CHECK(ndr_pull_AuthInfoVersion(ndr, NDR_SCALARS, &r->version));
2811 break; }
2813 default:
2814 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2817 if (ndr_flags & NDR_BUFFERS) {
2818 switch (level) {
2819 case TRUST_AUTH_TYPE_NONE:
2820 break;
2822 case TRUST_AUTH_TYPE_NT4OWF:
2823 break;
2825 case TRUST_AUTH_TYPE_CLEAR:
2826 break;
2828 case TRUST_AUTH_TYPE_VERSION:
2829 break;
2831 default:
2832 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2835 return NDR_ERR_SUCCESS;
2838 _PUBLIC_ void ndr_print_AuthInfo(struct ndr_print *ndr, const char *name, const union AuthInfo *r)
2840 int level;
2841 level = ndr_print_get_switch_value(ndr, r);
2842 ndr_print_union(ndr, name, level, "AuthInfo");
2843 switch (level) {
2844 case TRUST_AUTH_TYPE_NONE:
2845 ndr_print_AuthInfoNone(ndr, "none", &r->none);
2846 break;
2848 case TRUST_AUTH_TYPE_NT4OWF:
2849 ndr_print_AuthInfoNT4Owf(ndr, "nt4owf", &r->nt4owf);
2850 break;
2852 case TRUST_AUTH_TYPE_CLEAR:
2853 ndr_print_AuthInfoClear(ndr, "clear", &r->clear);
2854 break;
2856 case TRUST_AUTH_TYPE_VERSION:
2857 ndr_print_AuthInfoVersion(ndr, "version", &r->version);
2858 break;
2860 default:
2861 ndr_print_bad_level(ndr, name, level);
2865 _PUBLIC_ enum ndr_err_code ndr_push_AuthenticationInformation(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformation *r)
2867 if (ndr_flags & NDR_SCALARS) {
2868 NDR_CHECK(ndr_push_align(ndr, 4));
2869 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->LastUpdateTime));
2870 NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr, NDR_SCALARS, r->AuthType));
2871 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->AuthInfo, r->AuthType));
2872 NDR_CHECK(ndr_push_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo));
2874 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2875 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2876 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
2877 ndr->flags = _flags_save_DATA_BLOB;
2880 if (ndr_flags & NDR_BUFFERS) {
2882 return NDR_ERR_SUCCESS;
2885 _PUBLIC_ enum ndr_err_code ndr_pull_AuthenticationInformation(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformation *r)
2887 if (ndr_flags & NDR_SCALARS) {
2888 NDR_CHECK(ndr_pull_align(ndr, 4));
2889 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->LastUpdateTime));
2890 NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr, NDR_SCALARS, &r->AuthType));
2891 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->AuthInfo, r->AuthType));
2892 NDR_CHECK(ndr_pull_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo));
2894 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2895 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2896 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
2897 ndr->flags = _flags_save_DATA_BLOB;
2900 if (ndr_flags & NDR_BUFFERS) {
2902 return NDR_ERR_SUCCESS;
2905 _PUBLIC_ void ndr_print_AuthenticationInformation(struct ndr_print *ndr, const char *name, const struct AuthenticationInformation *r)
2907 ndr_print_struct(ndr, name, "AuthenticationInformation");
2908 ndr->depth++;
2909 ndr_print_NTTIME(ndr, "LastUpdateTime", r->LastUpdateTime);
2910 ndr_print_lsa_TrustAuthType(ndr, "AuthType", r->AuthType);
2911 ndr_print_set_switch_value(ndr, &r->AuthInfo, r->AuthType);
2912 ndr_print_AuthInfo(ndr, "AuthInfo", &r->AuthInfo);
2913 ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
2914 ndr->depth--;
2917 _PUBLIC_ size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, struct smb_iconv_convenience *ic, int flags)
2919 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustAuthInOutBlob, ic);
2922 _PUBLIC_ enum ndr_err_code ndr_push_trustCurrentPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustCurrentPasswords *r)
2924 uint32_t cntr_current_0;
2925 if (ndr_flags & NDR_SCALARS) {
2926 NDR_CHECK(ndr_push_align(ndr, 5));
2927 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2928 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
2929 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->current[cntr_current_0]));
2932 if (ndr_flags & NDR_BUFFERS) {
2933 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
2934 if (r->current[cntr_current_0]) {
2935 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->current[cntr_current_0]));
2936 NDR_CHECK(ndr_push_AuthenticationInformation(ndr, NDR_SCALARS, r->current[cntr_current_0]));
2940 return NDR_ERR_SUCCESS;
2943 _PUBLIC_ enum ndr_err_code ndr_pull_trustCurrentPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustCurrentPasswords *r)
2945 uint32_t _ptr_current;
2946 uint32_t cntr_current_0;
2947 TALLOC_CTX *_mem_save_current_0;
2948 TALLOC_CTX *_mem_save_current_1;
2949 if (ndr_flags & NDR_SCALARS) {
2950 NDR_CHECK(ndr_pull_align(ndr, 5));
2951 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2952 NDR_PULL_ALLOC_N(ndr, r->current, r->count);
2953 _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
2954 NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
2955 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
2956 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_current));
2957 if (_ptr_current) {
2958 NDR_PULL_ALLOC(ndr, r->current[cntr_current_0]);
2959 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->current[cntr_current_0], _ptr_current));
2960 } else {
2961 r->current[cntr_current_0] = NULL;
2964 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
2966 if (ndr_flags & NDR_BUFFERS) {
2967 _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
2968 NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
2969 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
2970 if (r->current[cntr_current_0]) {
2971 uint32_t _relative_save_offset;
2972 _relative_save_offset = ndr->offset;
2973 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->current[cntr_current_0]));
2974 _mem_save_current_1 = NDR_PULL_GET_MEM_CTX(ndr);
2975 NDR_PULL_SET_MEM_CTX(ndr, r->current[cntr_current_0], 0);
2976 NDR_CHECK(ndr_pull_AuthenticationInformation(ndr, NDR_SCALARS, r->current[cntr_current_0]));
2977 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_1, 0);
2978 ndr->offset = _relative_save_offset;
2981 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
2983 return NDR_ERR_SUCCESS;
2986 _PUBLIC_ void ndr_print_trustCurrentPasswords(struct ndr_print *ndr, const char *name, const struct trustCurrentPasswords *r)
2988 uint32_t cntr_current_0;
2989 ndr_print_struct(ndr, name, "trustCurrentPasswords");
2990 ndr->depth++;
2991 ndr_print_uint32(ndr, "count", r->count);
2992 ndr->print(ndr, "%s: ARRAY(%d)", "current", (int)r->count);
2993 ndr->depth++;
2994 for (cntr_current_0=0;cntr_current_0<r->count;cntr_current_0++) {
2995 char *idx_0=NULL;
2996 if (asprintf(&idx_0, "[%d]", cntr_current_0) != -1) {
2997 ndr_print_ptr(ndr, "current", r->current[cntr_current_0]);
2998 ndr->depth++;
2999 if (r->current[cntr_current_0]) {
3000 ndr_print_AuthenticationInformation(ndr, "current", r->current[cntr_current_0]);
3002 ndr->depth--;
3003 free(idx_0);
3006 ndr->depth--;
3007 ndr->depth--;
3010 _PUBLIC_ size_t ndr_size_trustCurrentPasswords(const struct trustCurrentPasswords *r, struct smb_iconv_convenience *ic, int flags)
3012 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustCurrentPasswords, ic);
3015 _PUBLIC_ enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustDomainPasswords *r)
3017 if (ndr_flags & NDR_SCALARS) {
3018 NDR_CHECK(ndr_push_align(ndr, 5));
3019 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->confounder, 512));
3021 struct ndr_push *_ndr_outgoing;
3022 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags)));
3023 NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_outgoing, NDR_SCALARS|NDR_BUFFERS, &r->outgoing));
3024 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags)));
3027 struct ndr_push *_ndr_incoming;
3028 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags)));
3029 NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_incoming, NDR_SCALARS|NDR_BUFFERS, &r->incoming));
3030 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags)));
3032 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags)));
3033 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags)));
3035 if (ndr_flags & NDR_BUFFERS) {
3037 return NDR_ERR_SUCCESS;
3040 _PUBLIC_ void ndr_print_trustDomainPasswords(struct ndr_print *ndr, const char *name, const struct trustDomainPasswords *r)
3042 ndr_print_struct(ndr, name, "trustDomainPasswords");
3043 ndr->depth++;
3044 ndr_print_array_uint8(ndr, "confounder", r->confounder, 512);
3045 ndr_print_trustCurrentPasswords(ndr, "outgoing", &r->outgoing);
3046 ndr_print_trustCurrentPasswords(ndr, "incoming", &r->incoming);
3047 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);
3048 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);
3049 ndr->depth--;
3052 _PUBLIC_ enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r)
3054 if (ndr_flags & NDR_SCALARS) {
3055 NDR_CHECK(ndr_push_align(ndr, 4));
3056 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->marker));
3057 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
3059 if (ndr_flags & NDR_BUFFERS) {
3061 return NDR_ERR_SUCCESS;
3064 _PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r)
3066 if (ndr_flags & NDR_SCALARS) {
3067 NDR_CHECK(ndr_pull_align(ndr, 4));
3068 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->marker));
3069 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
3071 if (ndr_flags & NDR_BUFFERS) {
3073 return NDR_ERR_SUCCESS;
3076 _PUBLIC_ void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r)
3078 ndr_print_struct(ndr, name, "DsCompressedChunk");
3079 ndr->depth++;
3080 ndr_print_uint32(ndr, "marker", r->marker);
3081 ndr_print_DATA_BLOB(ndr, "data", r->data);
3082 ndr->depth--;
3085 static enum ndr_err_code ndr_push_ExtendedErrorAString(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorAString *r)
3087 if (ndr_flags & NDR_SCALARS) {
3088 NDR_CHECK(ndr_push_align(ndr, 5));
3089 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size));
3090 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
3092 if (ndr_flags & NDR_BUFFERS) {
3093 if (r->string) {
3094 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->__size));
3095 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint8_t), CH_DOS));
3098 return NDR_ERR_SUCCESS;
3101 static enum ndr_err_code ndr_pull_ExtendedErrorAString(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorAString *r)
3103 uint32_t _ptr_string;
3104 TALLOC_CTX *_mem_save_string_0;
3105 if (ndr_flags & NDR_SCALARS) {
3106 NDR_CHECK(ndr_pull_align(ndr, 5));
3107 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__size));
3108 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
3109 if (_ptr_string) {
3110 NDR_PULL_ALLOC(ndr, r->string);
3111 } else {
3112 r->string = NULL;
3115 if (ndr_flags & NDR_BUFFERS) {
3116 if (r->string) {
3117 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
3118 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
3119 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
3120 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(ndr, &r->string), sizeof(uint8_t), CH_DOS));
3121 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
3123 if (r->string) {
3124 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->__size));
3127 return NDR_ERR_SUCCESS;
3130 _PUBLIC_ void ndr_print_ExtendedErrorAString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorAString *r)
3132 ndr_print_struct(ndr, name, "ExtendedErrorAString");
3133 ndr->depth++;
3134 ndr_print_uint16(ndr, "__size", r->__size);
3135 ndr_print_ptr(ndr, "string", r->string);
3136 ndr->depth++;
3137 if (r->string) {
3138 ndr_print_string(ndr, "string", r->string);
3140 ndr->depth--;
3141 ndr->depth--;
3144 static enum ndr_err_code ndr_push_ExtendedErrorUString(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorUString *r)
3146 if (ndr_flags & NDR_SCALARS) {
3147 NDR_CHECK(ndr_push_align(ndr, 5));
3148 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size));
3149 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
3151 if (ndr_flags & NDR_BUFFERS) {
3152 if (r->string) {
3153 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->__size));
3154 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint16_t), CH_UTF16));
3157 return NDR_ERR_SUCCESS;
3160 static enum ndr_err_code ndr_pull_ExtendedErrorUString(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorUString *r)
3162 uint32_t _ptr_string;
3163 TALLOC_CTX *_mem_save_string_0;
3164 if (ndr_flags & NDR_SCALARS) {
3165 NDR_CHECK(ndr_pull_align(ndr, 5));
3166 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__size));
3167 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
3168 if (_ptr_string) {
3169 NDR_PULL_ALLOC(ndr, r->string);
3170 } else {
3171 r->string = NULL;
3174 if (ndr_flags & NDR_BUFFERS) {
3175 if (r->string) {
3176 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
3177 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
3178 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
3179 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(ndr, &r->string), sizeof(uint16_t), CH_UTF16));
3180 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
3182 if (r->string) {
3183 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->__size));
3186 return NDR_ERR_SUCCESS;
3189 _PUBLIC_ void ndr_print_ExtendedErrorUString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorUString *r)
3191 ndr_print_struct(ndr, name, "ExtendedErrorUString");
3192 ndr->depth++;
3193 ndr_print_uint16(ndr, "__size", r->__size);
3194 ndr_print_ptr(ndr, "string", r->string);
3195 ndr->depth++;
3196 if (r->string) {
3197 ndr_print_string(ndr, "string", r->string);
3199 ndr->depth--;
3200 ndr->depth--;
3203 static enum ndr_err_code ndr_push_ExtendedErrorBlob(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorBlob *r)
3205 if (ndr_flags & NDR_SCALARS) {
3206 NDR_CHECK(ndr_push_align(ndr, 5));
3207 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
3208 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
3210 if (ndr_flags & NDR_BUFFERS) {
3211 if (r->data) {
3212 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
3213 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
3216 return NDR_ERR_SUCCESS;
3219 static enum ndr_err_code ndr_pull_ExtendedErrorBlob(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorBlob *r)
3221 uint32_t _ptr_data;
3222 TALLOC_CTX *_mem_save_data_0;
3223 if (ndr_flags & NDR_SCALARS) {
3224 NDR_CHECK(ndr_pull_align(ndr, 5));
3225 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
3226 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
3227 if (_ptr_data) {
3228 NDR_PULL_ALLOC(ndr, r->data);
3229 } else {
3230 r->data = NULL;
3233 if (ndr_flags & NDR_BUFFERS) {
3234 if (r->data) {
3235 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
3236 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
3237 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
3238 NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
3239 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
3240 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
3242 if (r->data) {
3243 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length));
3246 return NDR_ERR_SUCCESS;
3249 _PUBLIC_ void ndr_print_ExtendedErrorBlob(struct ndr_print *ndr, const char *name, const struct ExtendedErrorBlob *r)
3251 ndr_print_struct(ndr, name, "ExtendedErrorBlob");
3252 ndr->depth++;
3253 ndr_print_uint16(ndr, "length", r->length);
3254 ndr_print_ptr(ndr, "data", r->data);
3255 ndr->depth++;
3256 if (r->data) {
3257 ndr_print_array_uint8(ndr, "data", r->data, r->length);
3259 ndr->depth--;
3260 ndr->depth--;
3263 static enum ndr_err_code ndr_push_ExtendedErrorComputerNamePresent(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent r)
3265 NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
3266 return NDR_ERR_SUCCESS;
3269 static enum ndr_err_code ndr_pull_ExtendedErrorComputerNamePresent(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent *r)
3271 uint16_t v;
3272 NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
3273 *r = v;
3274 return NDR_ERR_SUCCESS;
3277 _PUBLIC_ void ndr_print_ExtendedErrorComputerNamePresent(struct ndr_print *ndr, const char *name, enum ExtendedErrorComputerNamePresent r)
3279 const char *val = NULL;
3281 switch (r) {
3282 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_PRESENT"; break;
3283 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT"; break;
3285 ndr_print_enum(ndr, name, "ENUM", val, r);
3288 static enum ndr_err_code ndr_push_ExtendedErrorComputerNameU(struct ndr_push *ndr, int ndr_flags, const union ExtendedErrorComputerNameU *r)
3290 if (ndr_flags & NDR_SCALARS) {
3291 int level = ndr_push_get_switch_value(ndr, r);
3292 NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, level));
3293 NDR_CHECK(ndr_push_union_align(ndr, 5));
3294 switch (level) {
3295 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: {
3296 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name));
3297 break; }
3299 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: {
3300 break; }
3302 default:
3303 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3306 if (ndr_flags & NDR_BUFFERS) {
3307 int level = ndr_push_get_switch_value(ndr, r);
3308 switch (level) {
3309 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
3310 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name));
3311 break;
3313 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
3314 break;
3316 default:
3317 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3320 return NDR_ERR_SUCCESS;
3323 static enum ndr_err_code ndr_pull_ExtendedErrorComputerNameU(struct ndr_pull *ndr, int ndr_flags, union ExtendedErrorComputerNameU *r)
3325 int level;
3326 uint16_t _level;
3327 level = ndr_pull_get_switch_value(ndr, r);
3328 if (ndr_flags & NDR_SCALARS) {
3329 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
3330 if (_level != level) {
3331 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
3333 NDR_CHECK(ndr_pull_union_align(ndr, 5));
3334 switch (level) {
3335 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: {
3336 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name));
3337 break; }
3339 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: {
3340 break; }
3342 default:
3343 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3346 if (ndr_flags & NDR_BUFFERS) {
3347 switch (level) {
3348 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
3349 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name));
3350 break;
3352 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
3353 break;
3355 default:
3356 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3359 return NDR_ERR_SUCCESS;
3362 _PUBLIC_ void ndr_print_ExtendedErrorComputerNameU(struct ndr_print *ndr, const char *name, const union ExtendedErrorComputerNameU *r)
3364 int level;
3365 level = ndr_print_get_switch_value(ndr, r);
3366 ndr_print_union(ndr, name, level, "ExtendedErrorComputerNameU");
3367 switch (level) {
3368 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
3369 ndr_print_ExtendedErrorUString(ndr, "name", &r->name);
3370 break;
3372 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
3373 break;
3375 default:
3376 ndr_print_bad_level(ndr, name, level);
3380 static enum ndr_err_code ndr_push_ExtendedErrorComputerName(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorComputerName *r)
3382 if (ndr_flags & NDR_SCALARS) {
3383 NDR_CHECK(ndr_push_align(ndr, 5));
3384 NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, r->present));
3385 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->n, r->present));
3386 NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n));
3388 if (ndr_flags & NDR_BUFFERS) {
3389 NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n));
3391 return NDR_ERR_SUCCESS;
3394 static enum ndr_err_code ndr_pull_ExtendedErrorComputerName(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorComputerName *r)
3396 if (ndr_flags & NDR_SCALARS) {
3397 NDR_CHECK(ndr_pull_align(ndr, 5));
3398 NDR_CHECK(ndr_pull_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, &r->present));
3399 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->n, r->present));
3400 NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n));
3402 if (ndr_flags & NDR_BUFFERS) {
3403 NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n));
3405 return NDR_ERR_SUCCESS;
3408 _PUBLIC_ void ndr_print_ExtendedErrorComputerName(struct ndr_print *ndr, const char *name, const struct ExtendedErrorComputerName *r)
3410 ndr_print_struct(ndr, name, "ExtendedErrorComputerName");
3411 ndr->depth++;
3412 ndr_print_ExtendedErrorComputerNamePresent(ndr, "present", r->present);
3413 ndr_print_set_switch_value(ndr, &r->n, r->present);
3414 ndr_print_ExtendedErrorComputerNameU(ndr, "n", &r->n);
3415 ndr->depth--;
3418 static enum ndr_err_code ndr_push_ExtendedErrorParamType(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorParamType r)
3420 NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
3421 return NDR_ERR_SUCCESS;
3424 static enum ndr_err_code ndr_pull_ExtendedErrorParamType(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorParamType *r)
3426 uint16_t v;
3427 NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
3428 *r = v;
3429 return NDR_ERR_SUCCESS;
3432 _PUBLIC_ void ndr_print_ExtendedErrorParamType(struct ndr_print *ndr, const char *name, enum ExtendedErrorParamType r)
3434 const char *val = NULL;
3436 switch (r) {
3437 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING"; break;
3438 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING"; break;
3439 case EXTENDED_ERROR_PARAM_TYPE_UINT32: val = "EXTENDED_ERROR_PARAM_TYPE_UINT32"; break;
3440 case EXTENDED_ERROR_PARAM_TYPE_UINT16: val = "EXTENDED_ERROR_PARAM_TYPE_UINT16"; break;
3441 case EXTENDED_ERROR_PARAM_TYPE_UINT64: val = "EXTENDED_ERROR_PARAM_TYPE_UINT64"; break;
3442 case EXTENDED_ERROR_PARAM_TYPE_NONE: val = "EXTENDED_ERROR_PARAM_TYPE_NONE"; break;
3443 case EXTENDED_ERROR_PARAM_TYPE_BLOB: val = "EXTENDED_ERROR_PARAM_TYPE_BLOB"; break;
3445 ndr_print_enum(ndr, name, "ENUM", val, r);
3448 static enum ndr_err_code ndr_push_ExtendedErrorParamU(struct ndr_push *ndr, int ndr_flags, const union ExtendedErrorParamU *r)
3450 if (ndr_flags & NDR_SCALARS) {
3451 int level = ndr_push_get_switch_value(ndr, r);
3452 NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, level));
3453 NDR_CHECK(ndr_push_union_align(ndr, 8));
3454 switch (level) {
3455 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: {
3456 NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string));
3457 break; }
3459 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: {
3460 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string));
3461 break; }
3463 case EXTENDED_ERROR_PARAM_TYPE_UINT32: {
3464 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->uint32));
3465 break; }
3467 case EXTENDED_ERROR_PARAM_TYPE_UINT16: {
3468 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->uint16));
3469 break; }
3471 case EXTENDED_ERROR_PARAM_TYPE_UINT64: {
3472 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->uint64));
3473 break; }
3475 case EXTENDED_ERROR_PARAM_TYPE_NONE: {
3476 break; }
3478 case EXTENDED_ERROR_PARAM_TYPE_BLOB: {
3479 NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob));
3480 break; }
3482 default:
3483 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3486 if (ndr_flags & NDR_BUFFERS) {
3487 int level = ndr_push_get_switch_value(ndr, r);
3488 switch (level) {
3489 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
3490 NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string));
3491 break;
3493 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
3494 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string));
3495 break;
3497 case EXTENDED_ERROR_PARAM_TYPE_UINT32:
3498 break;
3500 case EXTENDED_ERROR_PARAM_TYPE_UINT16:
3501 break;
3503 case EXTENDED_ERROR_PARAM_TYPE_UINT64:
3504 break;
3506 case EXTENDED_ERROR_PARAM_TYPE_NONE:
3507 break;
3509 case EXTENDED_ERROR_PARAM_TYPE_BLOB:
3510 NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob));
3511 break;
3513 default:
3514 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3517 return NDR_ERR_SUCCESS;
3520 static enum ndr_err_code ndr_pull_ExtendedErrorParamU(struct ndr_pull *ndr, int ndr_flags, union ExtendedErrorParamU *r)
3522 int level;
3523 uint16_t _level;
3524 level = ndr_pull_get_switch_value(ndr, r);
3525 if (ndr_flags & NDR_SCALARS) {
3526 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
3527 if (_level != level) {
3528 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
3530 NDR_CHECK(ndr_pull_union_align(ndr, 8));
3531 switch (level) {
3532 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: {
3533 NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string));
3534 break; }
3536 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: {
3537 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string));
3538 break; }
3540 case EXTENDED_ERROR_PARAM_TYPE_UINT32: {
3541 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->uint32));
3542 break; }
3544 case EXTENDED_ERROR_PARAM_TYPE_UINT16: {
3545 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->uint16));
3546 break; }
3548 case EXTENDED_ERROR_PARAM_TYPE_UINT64: {
3549 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->uint64));
3550 break; }
3552 case EXTENDED_ERROR_PARAM_TYPE_NONE: {
3553 break; }
3555 case EXTENDED_ERROR_PARAM_TYPE_BLOB: {
3556 NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob));
3557 break; }
3559 default:
3560 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3563 if (ndr_flags & NDR_BUFFERS) {
3564 switch (level) {
3565 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
3566 NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string));
3567 break;
3569 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
3570 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string));
3571 break;
3573 case EXTENDED_ERROR_PARAM_TYPE_UINT32:
3574 break;
3576 case EXTENDED_ERROR_PARAM_TYPE_UINT16:
3577 break;
3579 case EXTENDED_ERROR_PARAM_TYPE_UINT64:
3580 break;
3582 case EXTENDED_ERROR_PARAM_TYPE_NONE:
3583 break;
3585 case EXTENDED_ERROR_PARAM_TYPE_BLOB:
3586 NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob));
3587 break;
3589 default:
3590 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3593 return NDR_ERR_SUCCESS;
3596 _PUBLIC_ void ndr_print_ExtendedErrorParamU(struct ndr_print *ndr, const char *name, const union ExtendedErrorParamU *r)
3598 int level;
3599 level = ndr_print_get_switch_value(ndr, r);
3600 ndr_print_union(ndr, name, level, "ExtendedErrorParamU");
3601 switch (level) {
3602 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
3603 ndr_print_ExtendedErrorAString(ndr, "a_string", &r->a_string);
3604 break;
3606 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
3607 ndr_print_ExtendedErrorUString(ndr, "u_string", &r->u_string);
3608 break;
3610 case EXTENDED_ERROR_PARAM_TYPE_UINT32:
3611 ndr_print_uint32(ndr, "uint32", r->uint32);
3612 break;
3614 case EXTENDED_ERROR_PARAM_TYPE_UINT16:
3615 ndr_print_uint16(ndr, "uint16", r->uint16);
3616 break;
3618 case EXTENDED_ERROR_PARAM_TYPE_UINT64:
3619 ndr_print_hyper(ndr, "uint64", r->uint64);
3620 break;
3622 case EXTENDED_ERROR_PARAM_TYPE_NONE:
3623 break;
3625 case EXTENDED_ERROR_PARAM_TYPE_BLOB:
3626 ndr_print_ExtendedErrorBlob(ndr, "blob", &r->blob);
3627 break;
3629 default:
3630 ndr_print_bad_level(ndr, name, level);
3634 static enum ndr_err_code ndr_push_ExtendedErrorParam(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorParam *r)
3636 if (ndr_flags & NDR_SCALARS) {
3637 NDR_CHECK(ndr_push_align(ndr, 8));
3638 NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, r->type));
3639 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->p, r->type));
3640 NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p));
3642 if (ndr_flags & NDR_BUFFERS) {
3643 NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p));
3645 return NDR_ERR_SUCCESS;
3648 static enum ndr_err_code ndr_pull_ExtendedErrorParam(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorParam *r)
3650 if (ndr_flags & NDR_SCALARS) {
3651 NDR_CHECK(ndr_pull_align(ndr, 8));
3652 NDR_CHECK(ndr_pull_ExtendedErrorParamType(ndr, NDR_SCALARS, &r->type));
3653 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->p, r->type));
3654 NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p));
3656 if (ndr_flags & NDR_BUFFERS) {
3657 NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p));
3659 return NDR_ERR_SUCCESS;
3662 _PUBLIC_ void ndr_print_ExtendedErrorParam(struct ndr_print *ndr, const char *name, const struct ExtendedErrorParam *r)
3664 ndr_print_struct(ndr, name, "ExtendedErrorParam");
3665 ndr->depth++;
3666 ndr_print_ExtendedErrorParamType(ndr, "type", r->type);
3667 ndr_print_set_switch_value(ndr, &r->p, r->type);
3668 ndr_print_ExtendedErrorParamU(ndr, "p", &r->p);
3669 ndr->depth--;
3672 _PUBLIC_ enum ndr_err_code ndr_push_ExtendedErrorInfo(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfo *r)
3674 uint32_t cntr_params_0;
3675 if (ndr_flags & NDR_SCALARS) {
3676 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_params));
3677 NDR_CHECK(ndr_push_align(ndr, 8));
3678 NDR_CHECK(ndr_push_unique_ptr(ndr, r->next));
3679 NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name));
3680 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->pid));
3681 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time));
3682 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->generating_component));
3683 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status));
3684 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->detection_location));
3685 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->flags));
3686 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_params));
3687 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3688 NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0]));
3691 if (ndr_flags & NDR_BUFFERS) {
3692 if (r->next) {
3693 NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
3695 NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name));
3696 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3697 NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0]));
3700 return NDR_ERR_SUCCESS;
3703 _PUBLIC_ enum ndr_err_code ndr_pull_ExtendedErrorInfo(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfo *r)
3705 uint32_t _ptr_next;
3706 TALLOC_CTX *_mem_save_next_0;
3707 uint32_t cntr_params_0;
3708 TALLOC_CTX *_mem_save_params_0;
3709 if (ndr_flags & NDR_SCALARS) {
3710 NDR_CHECK(ndr_pull_array_size(ndr, &r->params));
3711 NDR_CHECK(ndr_pull_align(ndr, 8));
3712 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next));
3713 if (_ptr_next) {
3714 NDR_PULL_ALLOC(ndr, r->next);
3715 } else {
3716 r->next = NULL;
3718 NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name));
3719 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->pid));
3720 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time));
3721 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->generating_component));
3722 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status));
3723 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->detection_location));
3724 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags));
3725 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_params));
3726 NDR_PULL_ALLOC_N(ndr, r->params, ndr_get_array_size(ndr, &r->params));
3727 _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr);
3728 NDR_PULL_SET_MEM_CTX(ndr, r->params, 0);
3729 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3730 NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0]));
3732 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0);
3733 if (r->params) {
3734 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->params, r->num_params));
3737 if (ndr_flags & NDR_BUFFERS) {
3738 if (r->next) {
3739 _mem_save_next_0 = NDR_PULL_GET_MEM_CTX(ndr);
3740 NDR_PULL_SET_MEM_CTX(ndr, r->next, 0);
3741 NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
3742 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_0, 0);
3744 NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name));
3745 _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr);
3746 NDR_PULL_SET_MEM_CTX(ndr, r->params, 0);
3747 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3748 NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0]));
3750 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0);
3752 return NDR_ERR_SUCCESS;
3755 _PUBLIC_ void ndr_print_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfo *r)
3757 uint32_t cntr_params_0;
3758 ndr_print_struct(ndr, name, "ExtendedErrorInfo");
3759 ndr->depth++;
3760 ndr_print_ptr(ndr, "next", r->next);
3761 ndr->depth++;
3762 if (r->next) {
3763 ndr_print_ExtendedErrorInfo(ndr, "next", r->next);
3765 ndr->depth--;
3766 ndr_print_ExtendedErrorComputerName(ndr, "computer_name", &r->computer_name);
3767 ndr_print_hyper(ndr, "pid", r->pid);
3768 ndr_print_NTTIME(ndr, "time", r->time);
3769 ndr_print_uint32(ndr, "generating_component", r->generating_component);
3770 ndr_print_WERROR(ndr, "status", r->status);
3771 ndr_print_uint16(ndr, "detection_location", r->detection_location);
3772 ndr_print_uint16(ndr, "flags", r->flags);
3773 ndr_print_uint16(ndr, "num_params", r->num_params);
3774 ndr->print(ndr, "%s: ARRAY(%d)", "params", (int)r->num_params);
3775 ndr->depth++;
3776 for (cntr_params_0=0;cntr_params_0<r->num_params;cntr_params_0++) {
3777 char *idx_0=NULL;
3778 if (asprintf(&idx_0, "[%d]", cntr_params_0) != -1) {
3779 ndr_print_ExtendedErrorParam(ndr, "params", &r->params[cntr_params_0]);
3780 free(idx_0);
3783 ndr->depth--;
3784 ndr->depth--;
3787 static enum ndr_err_code ndr_push_ExtendedErrorInfoPtr(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfoPtr *r)
3789 if (ndr_flags & NDR_SCALARS) {
3790 NDR_CHECK(ndr_push_align(ndr, 5));
3791 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
3793 if (ndr_flags & NDR_BUFFERS) {
3794 if (r->info) {
3795 NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
3798 return NDR_ERR_SUCCESS;
3801 static enum ndr_err_code ndr_pull_ExtendedErrorInfoPtr(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfoPtr *r)
3803 uint32_t _ptr_info;
3804 TALLOC_CTX *_mem_save_info_0;
3805 if (ndr_flags & NDR_SCALARS) {
3806 NDR_CHECK(ndr_pull_align(ndr, 5));
3807 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
3808 if (_ptr_info) {
3809 NDR_PULL_ALLOC(ndr, r->info);
3810 } else {
3811 r->info = NULL;
3814 if (ndr_flags & NDR_BUFFERS) {
3815 if (r->info) {
3816 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3817 NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
3818 NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
3819 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
3822 return NDR_ERR_SUCCESS;
3825 _PUBLIC_ void ndr_print_ExtendedErrorInfoPtr(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfoPtr *r)
3827 ndr_print_struct(ndr, name, "ExtendedErrorInfoPtr");
3828 ndr->depth++;
3829 ndr_print_ptr(ndr, "info", r->info);
3830 ndr->depth++;
3831 if (r->info) {
3832 ndr_print_ExtendedErrorInfo(ndr, "info", r->info);
3834 ndr->depth--;
3835 ndr->depth--;
3838 static enum ndr_err_code ndr_push_decode_replPropertyMetaData(struct ndr_push *ndr, int flags, const struct decode_replPropertyMetaData *r)
3840 if (flags & NDR_IN) {
3841 NDR_CHECK(ndr_push_replPropertyMetaDataBlob(ndr, NDR_SCALARS, &r->in.blob));
3843 if (flags & NDR_OUT) {
3845 return NDR_ERR_SUCCESS;
3848 static enum ndr_err_code ndr_pull_decode_replPropertyMetaData(struct ndr_pull *ndr, int flags, struct decode_replPropertyMetaData *r)
3850 if (flags & NDR_IN) {
3851 NDR_CHECK(ndr_pull_replPropertyMetaDataBlob(ndr, NDR_SCALARS, &r->in.blob));
3853 if (flags & NDR_OUT) {
3855 return NDR_ERR_SUCCESS;
3858 _PUBLIC_ void ndr_print_decode_replPropertyMetaData(struct ndr_print *ndr, const char *name, int flags, const struct decode_replPropertyMetaData *r)
3860 ndr_print_struct(ndr, name, "decode_replPropertyMetaData");
3861 ndr->depth++;
3862 if (flags & NDR_SET_VALUES) {
3863 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3865 if (flags & NDR_IN) {
3866 ndr_print_struct(ndr, "in", "decode_replPropertyMetaData");
3867 ndr->depth++;
3868 ndr_print_replPropertyMetaDataBlob(ndr, "blob", &r->in.blob);
3869 ndr->depth--;
3871 if (flags & NDR_OUT) {
3872 ndr_print_struct(ndr, "out", "decode_replPropertyMetaData");
3873 ndr->depth++;
3874 ndr->depth--;
3876 ndr->depth--;
3879 static enum ndr_err_code ndr_push_decode_replUpToDateVector(struct ndr_push *ndr, int flags, const struct decode_replUpToDateVector *r)
3881 if (flags & NDR_IN) {
3882 NDR_CHECK(ndr_push_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->in.blob));
3884 if (flags & NDR_OUT) {
3886 return NDR_ERR_SUCCESS;
3889 static enum ndr_err_code ndr_pull_decode_replUpToDateVector(struct ndr_pull *ndr, int flags, struct decode_replUpToDateVector *r)
3891 if (flags & NDR_IN) {
3892 NDR_CHECK(ndr_pull_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->in.blob));
3894 if (flags & NDR_OUT) {
3896 return NDR_ERR_SUCCESS;
3899 _PUBLIC_ void ndr_print_decode_replUpToDateVector(struct ndr_print *ndr, const char *name, int flags, const struct decode_replUpToDateVector *r)
3901 ndr_print_struct(ndr, name, "decode_replUpToDateVector");
3902 ndr->depth++;
3903 if (flags & NDR_SET_VALUES) {
3904 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3906 if (flags & NDR_IN) {
3907 ndr_print_struct(ndr, "in", "decode_replUpToDateVector");
3908 ndr->depth++;
3909 ndr_print_replUpToDateVectorBlob(ndr, "blob", &r->in.blob);
3910 ndr->depth--;
3912 if (flags & NDR_OUT) {
3913 ndr_print_struct(ndr, "out", "decode_replUpToDateVector");
3914 ndr->depth++;
3915 ndr->depth--;
3917 ndr->depth--;
3920 static enum ndr_err_code ndr_push_decode_repsFromTo(struct ndr_push *ndr, int flags, const struct decode_repsFromTo *r)
3922 if (flags & NDR_IN) {
3923 NDR_CHECK(ndr_push_repsFromToBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3925 if (flags & NDR_OUT) {
3927 return NDR_ERR_SUCCESS;
3930 static enum ndr_err_code ndr_pull_decode_repsFromTo(struct ndr_pull *ndr, int flags, struct decode_repsFromTo *r)
3932 if (flags & NDR_IN) {
3933 NDR_CHECK(ndr_pull_repsFromToBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3935 if (flags & NDR_OUT) {
3937 return NDR_ERR_SUCCESS;
3940 _PUBLIC_ void ndr_print_decode_repsFromTo(struct ndr_print *ndr, const char *name, int flags, const struct decode_repsFromTo *r)
3942 ndr_print_struct(ndr, name, "decode_repsFromTo");
3943 ndr->depth++;
3944 if (flags & NDR_SET_VALUES) {
3945 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3947 if (flags & NDR_IN) {
3948 ndr_print_struct(ndr, "in", "decode_repsFromTo");
3949 ndr->depth++;
3950 ndr_print_repsFromToBlob(ndr, "blob", &r->in.blob);
3951 ndr->depth--;
3953 if (flags & NDR_OUT) {
3954 ndr_print_struct(ndr, "out", "decode_repsFromTo");
3955 ndr->depth++;
3956 ndr->depth--;
3958 ndr->depth--;
3961 static enum ndr_err_code ndr_push_decode_partialAttributeSet(struct ndr_push *ndr, int flags, const struct decode_partialAttributeSet *r)
3963 if (flags & NDR_IN) {
3964 NDR_CHECK(ndr_push_partialAttributeSetBlob(ndr, NDR_SCALARS, &r->in.blob));
3966 if (flags & NDR_OUT) {
3968 return NDR_ERR_SUCCESS;
3971 static enum ndr_err_code ndr_pull_decode_partialAttributeSet(struct ndr_pull *ndr, int flags, struct decode_partialAttributeSet *r)
3973 if (flags & NDR_IN) {
3974 NDR_CHECK(ndr_pull_partialAttributeSetBlob(ndr, NDR_SCALARS, &r->in.blob));
3976 if (flags & NDR_OUT) {
3978 return NDR_ERR_SUCCESS;
3981 _PUBLIC_ void ndr_print_decode_partialAttributeSet(struct ndr_print *ndr, const char *name, int flags, const struct decode_partialAttributeSet *r)
3983 ndr_print_struct(ndr, name, "decode_partialAttributeSet");
3984 ndr->depth++;
3985 if (flags & NDR_SET_VALUES) {
3986 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3988 if (flags & NDR_IN) {
3989 ndr_print_struct(ndr, "in", "decode_partialAttributeSet");
3990 ndr->depth++;
3991 ndr_print_partialAttributeSetBlob(ndr, "blob", &r->in.blob);
3992 ndr->depth--;
3994 if (flags & NDR_OUT) {
3995 ndr_print_struct(ndr, "out", "decode_partialAttributeSet");
3996 ndr->depth++;
3997 ndr->depth--;
3999 ndr->depth--;
4002 static enum ndr_err_code ndr_push_decode_prefixMap(struct ndr_push *ndr, int flags, const struct decode_prefixMap *r)
4004 if (flags & NDR_IN) {
4005 NDR_CHECK(ndr_push_prefixMapBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4007 if (flags & NDR_OUT) {
4009 return NDR_ERR_SUCCESS;
4012 static enum ndr_err_code ndr_pull_decode_prefixMap(struct ndr_pull *ndr, int flags, struct decode_prefixMap *r)
4014 if (flags & NDR_IN) {
4015 NDR_CHECK(ndr_pull_prefixMapBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4017 if (flags & NDR_OUT) {
4019 return NDR_ERR_SUCCESS;
4022 _PUBLIC_ void ndr_print_decode_prefixMap(struct ndr_print *ndr, const char *name, int flags, const struct decode_prefixMap *r)
4024 ndr_print_struct(ndr, name, "decode_prefixMap");
4025 ndr->depth++;
4026 if (flags & NDR_SET_VALUES) {
4027 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4029 if (flags & NDR_IN) {
4030 ndr_print_struct(ndr, "in", "decode_prefixMap");
4031 ndr->depth++;
4032 ndr_print_prefixMapBlob(ndr, "blob", &r->in.blob);
4033 ndr->depth--;
4035 if (flags & NDR_OUT) {
4036 ndr_print_struct(ndr, "out", "decode_prefixMap");
4037 ndr->depth++;
4038 ndr->depth--;
4040 ndr->depth--;
4043 static enum ndr_err_code ndr_push_decode_ldapControlDirSync(struct ndr_push *ndr, int flags, const struct decode_ldapControlDirSync *r)
4045 if (flags & NDR_IN) {
4046 NDR_CHECK(ndr_push_ldapControlDirSyncCookie(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.cookie));
4048 if (flags & NDR_OUT) {
4050 return NDR_ERR_SUCCESS;
4053 static enum ndr_err_code ndr_pull_decode_ldapControlDirSync(struct ndr_pull *ndr, int flags, struct decode_ldapControlDirSync *r)
4055 if (flags & NDR_IN) {
4056 NDR_CHECK(ndr_pull_ldapControlDirSyncCookie(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.cookie));
4058 if (flags & NDR_OUT) {
4060 return NDR_ERR_SUCCESS;
4063 _PUBLIC_ void ndr_print_decode_ldapControlDirSync(struct ndr_print *ndr, const char *name, int flags, const struct decode_ldapControlDirSync *r)
4065 ndr_print_struct(ndr, name, "decode_ldapControlDirSync");
4066 ndr->depth++;
4067 if (flags & NDR_SET_VALUES) {
4068 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4070 if (flags & NDR_IN) {
4071 ndr_print_struct(ndr, "in", "decode_ldapControlDirSync");
4072 ndr->depth++;
4073 ndr_print_ldapControlDirSyncCookie(ndr, "cookie", &r->in.cookie);
4074 ndr->depth--;
4076 if (flags & NDR_OUT) {
4077 ndr_print_struct(ndr, "out", "decode_ldapControlDirSync");
4078 ndr->depth++;
4079 ndr->depth--;
4081 ndr->depth--;
4084 static enum ndr_err_code ndr_push_decode_supplementalCredentials(struct ndr_push *ndr, int flags, const struct decode_supplementalCredentials *r)
4086 if (flags & NDR_IN) {
4087 NDR_CHECK(ndr_push_supplementalCredentialsBlob(ndr, NDR_SCALARS, &r->in.blob));
4089 if (flags & NDR_OUT) {
4091 return NDR_ERR_SUCCESS;
4094 static enum ndr_err_code ndr_pull_decode_supplementalCredentials(struct ndr_pull *ndr, int flags, struct decode_supplementalCredentials *r)
4096 if (flags & NDR_IN) {
4097 NDR_CHECK(ndr_pull_supplementalCredentialsBlob(ndr, NDR_SCALARS, &r->in.blob));
4099 if (flags & NDR_OUT) {
4101 return NDR_ERR_SUCCESS;
4104 _PUBLIC_ void ndr_print_decode_supplementalCredentials(struct ndr_print *ndr, const char *name, int flags, const struct decode_supplementalCredentials *r)
4106 ndr_print_struct(ndr, name, "decode_supplementalCredentials");
4107 ndr->depth++;
4108 if (flags & NDR_SET_VALUES) {
4109 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4111 if (flags & NDR_IN) {
4112 ndr_print_struct(ndr, "in", "decode_supplementalCredentials");
4113 ndr->depth++;
4114 ndr_print_supplementalCredentialsBlob(ndr, "blob", &r->in.blob);
4115 ndr->depth--;
4117 if (flags & NDR_OUT) {
4118 ndr_print_struct(ndr, "out", "decode_supplementalCredentials");
4119 ndr->depth++;
4120 ndr->depth--;
4122 ndr->depth--;
4125 static enum ndr_err_code ndr_push_decode_Packages(struct ndr_push *ndr, int flags, const struct decode_Packages *r)
4127 if (flags & NDR_IN) {
4128 NDR_CHECK(ndr_push_package_PackagesBlob(ndr, NDR_SCALARS, &r->in.blob));
4130 if (flags & NDR_OUT) {
4132 return NDR_ERR_SUCCESS;
4135 static enum ndr_err_code ndr_pull_decode_Packages(struct ndr_pull *ndr, int flags, struct decode_Packages *r)
4137 if (flags & NDR_IN) {
4138 NDR_CHECK(ndr_pull_package_PackagesBlob(ndr, NDR_SCALARS, &r->in.blob));
4140 if (flags & NDR_OUT) {
4142 return NDR_ERR_SUCCESS;
4145 _PUBLIC_ void ndr_print_decode_Packages(struct ndr_print *ndr, const char *name, int flags, const struct decode_Packages *r)
4147 ndr_print_struct(ndr, name, "decode_Packages");
4148 ndr->depth++;
4149 if (flags & NDR_SET_VALUES) {
4150 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4152 if (flags & NDR_IN) {
4153 ndr_print_struct(ndr, "in", "decode_Packages");
4154 ndr->depth++;
4155 ndr_print_package_PackagesBlob(ndr, "blob", &r->in.blob);
4156 ndr->depth--;
4158 if (flags & NDR_OUT) {
4159 ndr_print_struct(ndr, "out", "decode_Packages");
4160 ndr->depth++;
4161 ndr->depth--;
4163 ndr->depth--;
4166 static enum ndr_err_code ndr_push_decode_PrimaryKerberos(struct ndr_push *ndr, int flags, const struct decode_PrimaryKerberos *r)
4168 if (flags & NDR_IN) {
4169 NDR_CHECK(ndr_push_package_PrimaryKerberosBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4171 if (flags & NDR_OUT) {
4173 return NDR_ERR_SUCCESS;
4176 static enum ndr_err_code ndr_pull_decode_PrimaryKerberos(struct ndr_pull *ndr, int flags, struct decode_PrimaryKerberos *r)
4178 if (flags & NDR_IN) {
4179 NDR_CHECK(ndr_pull_package_PrimaryKerberosBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4181 if (flags & NDR_OUT) {
4183 return NDR_ERR_SUCCESS;
4186 _PUBLIC_ void ndr_print_decode_PrimaryKerberos(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryKerberos *r)
4188 ndr_print_struct(ndr, name, "decode_PrimaryKerberos");
4189 ndr->depth++;
4190 if (flags & NDR_SET_VALUES) {
4191 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4193 if (flags & NDR_IN) {
4194 ndr_print_struct(ndr, "in", "decode_PrimaryKerberos");
4195 ndr->depth++;
4196 ndr_print_package_PrimaryKerberosBlob(ndr, "blob", &r->in.blob);
4197 ndr->depth--;
4199 if (flags & NDR_OUT) {
4200 ndr_print_struct(ndr, "out", "decode_PrimaryKerberos");
4201 ndr->depth++;
4202 ndr->depth--;
4204 ndr->depth--;
4207 static enum ndr_err_code ndr_push_decode_PrimaryCLEARTEXT(struct ndr_push *ndr, int flags, const struct decode_PrimaryCLEARTEXT *r)
4209 if (flags & NDR_IN) {
4210 NDR_CHECK(ndr_push_package_PrimaryCLEARTEXTBlob(ndr, NDR_SCALARS, &r->in.blob));
4212 if (flags & NDR_OUT) {
4214 return NDR_ERR_SUCCESS;
4217 static enum ndr_err_code ndr_pull_decode_PrimaryCLEARTEXT(struct ndr_pull *ndr, int flags, struct decode_PrimaryCLEARTEXT *r)
4219 if (flags & NDR_IN) {
4220 NDR_CHECK(ndr_pull_package_PrimaryCLEARTEXTBlob(ndr, NDR_SCALARS, &r->in.blob));
4222 if (flags & NDR_OUT) {
4224 return NDR_ERR_SUCCESS;
4227 _PUBLIC_ void ndr_print_decode_PrimaryCLEARTEXT(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryCLEARTEXT *r)
4229 ndr_print_struct(ndr, name, "decode_PrimaryCLEARTEXT");
4230 ndr->depth++;
4231 if (flags & NDR_SET_VALUES) {
4232 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4234 if (flags & NDR_IN) {
4235 ndr_print_struct(ndr, "in", "decode_PrimaryCLEARTEXT");
4236 ndr->depth++;
4237 ndr_print_package_PrimaryCLEARTEXTBlob(ndr, "blob", &r->in.blob);
4238 ndr->depth--;
4240 if (flags & NDR_OUT) {
4241 ndr_print_struct(ndr, "out", "decode_PrimaryCLEARTEXT");
4242 ndr->depth++;
4243 ndr->depth--;
4245 ndr->depth--;
4248 static enum ndr_err_code ndr_push_decode_PrimaryWDigest(struct ndr_push *ndr, int flags, const struct decode_PrimaryWDigest *r)
4250 if (flags & NDR_IN) {
4251 NDR_CHECK(ndr_push_package_PrimaryWDigestBlob(ndr, NDR_SCALARS, &r->in.blob));
4253 if (flags & NDR_OUT) {
4255 return NDR_ERR_SUCCESS;
4258 static enum ndr_err_code ndr_pull_decode_PrimaryWDigest(struct ndr_pull *ndr, int flags, struct decode_PrimaryWDigest *r)
4260 if (flags & NDR_IN) {
4261 NDR_CHECK(ndr_pull_package_PrimaryWDigestBlob(ndr, NDR_SCALARS, &r->in.blob));
4263 if (flags & NDR_OUT) {
4265 return NDR_ERR_SUCCESS;
4268 _PUBLIC_ void ndr_print_decode_PrimaryWDigest(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryWDigest *r)
4270 ndr_print_struct(ndr, name, "decode_PrimaryWDigest");
4271 ndr->depth++;
4272 if (flags & NDR_SET_VALUES) {
4273 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4275 if (flags & NDR_IN) {
4276 ndr_print_struct(ndr, "in", "decode_PrimaryWDigest");
4277 ndr->depth++;
4278 ndr_print_package_PrimaryWDigestBlob(ndr, "blob", &r->in.blob);
4279 ndr->depth--;
4281 if (flags & NDR_OUT) {
4282 ndr_print_struct(ndr, "out", "decode_PrimaryWDigest");
4283 ndr->depth++;
4284 ndr->depth--;
4286 ndr->depth--;
4289 static enum ndr_err_code ndr_push_decode_trustAuthInOut(struct ndr_push *ndr, int flags, const struct decode_trustAuthInOut *r)
4291 if (flags & NDR_IN) {
4292 NDR_CHECK(ndr_push_trustAuthInOutBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4294 if (flags & NDR_OUT) {
4296 return NDR_ERR_SUCCESS;
4299 static enum ndr_err_code ndr_pull_decode_trustAuthInOut(struct ndr_pull *ndr, int flags, struct decode_trustAuthInOut *r)
4301 if (flags & NDR_IN) {
4302 NDR_CHECK(ndr_pull_trustAuthInOutBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4304 if (flags & NDR_OUT) {
4306 return NDR_ERR_SUCCESS;
4309 _PUBLIC_ void ndr_print_decode_trustAuthInOut(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustAuthInOut *r)
4311 ndr_print_struct(ndr, name, "decode_trustAuthInOut");
4312 ndr->depth++;
4313 if (flags & NDR_SET_VALUES) {
4314 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4316 if (flags & NDR_IN) {
4317 ndr_print_struct(ndr, "in", "decode_trustAuthInOut");
4318 ndr->depth++;
4319 ndr_print_trustAuthInOutBlob(ndr, "blob", &r->in.blob);
4320 ndr->depth--;
4322 if (flags & NDR_OUT) {
4323 ndr_print_struct(ndr, "out", "decode_trustAuthInOut");
4324 ndr->depth++;
4325 ndr->depth--;
4327 ndr->depth--;
4330 static enum ndr_err_code ndr_push_decode_trustDomainPasswords(struct ndr_push *ndr, int flags, const struct decode_trustDomainPasswords *r)
4332 if (flags & NDR_IN) {
4333 NDR_CHECK(ndr_push_trustDomainPasswords(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4335 if (flags & NDR_OUT) {
4337 return NDR_ERR_SUCCESS;
4340 static enum ndr_err_code ndr_pull_decode_trustDomainPasswords(struct ndr_pull *ndr, int flags, struct decode_trustDomainPasswords *r)
4342 if (flags & NDR_IN) {
4343 NDR_CHECK(ndr_pull_trustDomainPasswords(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4345 if (flags & NDR_OUT) {
4347 return NDR_ERR_SUCCESS;
4350 _PUBLIC_ void ndr_print_decode_trustDomainPasswords(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustDomainPasswords *r)
4352 ndr_print_struct(ndr, name, "decode_trustDomainPasswords");
4353 ndr->depth++;
4354 if (flags & NDR_SET_VALUES) {
4355 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4357 if (flags & NDR_IN) {
4358 ndr_print_struct(ndr, "in", "decode_trustDomainPasswords");
4359 ndr->depth++;
4360 ndr_print_trustDomainPasswords(ndr, "blob", &r->in.blob);
4361 ndr->depth--;
4363 if (flags & NDR_OUT) {
4364 ndr_print_struct(ndr, "out", "decode_trustDomainPasswords");
4365 ndr->depth++;
4366 ndr->depth--;
4368 ndr->depth--;
4371 static enum ndr_err_code ndr_push_decode_ExtendedErrorInfo(struct ndr_push *ndr, int flags, const struct decode_ExtendedErrorInfo *r)
4373 if (flags & NDR_IN) {
4375 struct ndr_push *_ndr_ptr;
4376 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ptr, 0xFFFFFC01, -1));
4377 NDR_CHECK(ndr_push_ExtendedErrorInfoPtr(_ndr_ptr, NDR_SCALARS|NDR_BUFFERS, &r->in.ptr));
4378 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ptr, 0xFFFFFC01, -1));
4381 if (flags & NDR_OUT) {
4383 return NDR_ERR_SUCCESS;
4386 static enum ndr_err_code ndr_pull_decode_ExtendedErrorInfo(struct ndr_pull *ndr, int flags, struct decode_ExtendedErrorInfo *r)
4388 if (flags & NDR_IN) {
4390 struct ndr_pull *_ndr_ptr;
4391 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ptr, 0xFFFFFC01, -1));
4392 NDR_CHECK(ndr_pull_ExtendedErrorInfoPtr(_ndr_ptr, NDR_SCALARS|NDR_BUFFERS, &r->in.ptr));
4393 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ptr, 0xFFFFFC01, -1));
4396 if (flags & NDR_OUT) {
4398 return NDR_ERR_SUCCESS;
4401 _PUBLIC_ void ndr_print_decode_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, int flags, const struct decode_ExtendedErrorInfo *r)
4403 ndr_print_struct(ndr, name, "decode_ExtendedErrorInfo");
4404 ndr->depth++;
4405 if (flags & NDR_SET_VALUES) {
4406 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4408 if (flags & NDR_IN) {
4409 ndr_print_struct(ndr, "in", "decode_ExtendedErrorInfo");
4410 ndr->depth++;
4411 ndr_print_ExtendedErrorInfoPtr(ndr, "ptr", &r->in.ptr);
4412 ndr->depth--;
4414 if (flags & NDR_OUT) {
4415 ndr_print_struct(ndr, "out", "decode_ExtendedErrorInfo");
4416 ndr->depth++;
4417 ndr->depth--;
4419 ndr->depth--;
4422 static const struct ndr_interface_call drsblobs_calls[] = {
4424 "decode_replPropertyMetaData",
4425 sizeof(struct decode_replPropertyMetaData),
4426 (ndr_push_flags_fn_t) ndr_push_decode_replPropertyMetaData,
4427 (ndr_pull_flags_fn_t) ndr_pull_decode_replPropertyMetaData,
4428 (ndr_print_function_t) ndr_print_decode_replPropertyMetaData,
4429 false,
4432 "decode_replUpToDateVector",
4433 sizeof(struct decode_replUpToDateVector),
4434 (ndr_push_flags_fn_t) ndr_push_decode_replUpToDateVector,
4435 (ndr_pull_flags_fn_t) ndr_pull_decode_replUpToDateVector,
4436 (ndr_print_function_t) ndr_print_decode_replUpToDateVector,
4437 false,
4440 "decode_repsFromTo",
4441 sizeof(struct decode_repsFromTo),
4442 (ndr_push_flags_fn_t) ndr_push_decode_repsFromTo,
4443 (ndr_pull_flags_fn_t) ndr_pull_decode_repsFromTo,
4444 (ndr_print_function_t) ndr_print_decode_repsFromTo,
4445 false,
4448 "decode_partialAttributeSet",
4449 sizeof(struct decode_partialAttributeSet),
4450 (ndr_push_flags_fn_t) ndr_push_decode_partialAttributeSet,
4451 (ndr_pull_flags_fn_t) ndr_pull_decode_partialAttributeSet,
4452 (ndr_print_function_t) ndr_print_decode_partialAttributeSet,
4453 false,
4456 "decode_prefixMap",
4457 sizeof(struct decode_prefixMap),
4458 (ndr_push_flags_fn_t) ndr_push_decode_prefixMap,
4459 (ndr_pull_flags_fn_t) ndr_pull_decode_prefixMap,
4460 (ndr_print_function_t) ndr_print_decode_prefixMap,
4461 false,
4464 "decode_ldapControlDirSync",
4465 sizeof(struct decode_ldapControlDirSync),
4466 (ndr_push_flags_fn_t) ndr_push_decode_ldapControlDirSync,
4467 (ndr_pull_flags_fn_t) ndr_pull_decode_ldapControlDirSync,
4468 (ndr_print_function_t) ndr_print_decode_ldapControlDirSync,
4469 false,
4472 "decode_supplementalCredentials",
4473 sizeof(struct decode_supplementalCredentials),
4474 (ndr_push_flags_fn_t) ndr_push_decode_supplementalCredentials,
4475 (ndr_pull_flags_fn_t) ndr_pull_decode_supplementalCredentials,
4476 (ndr_print_function_t) ndr_print_decode_supplementalCredentials,
4477 false,
4480 "decode_Packages",
4481 sizeof(struct decode_Packages),
4482 (ndr_push_flags_fn_t) ndr_push_decode_Packages,
4483 (ndr_pull_flags_fn_t) ndr_pull_decode_Packages,
4484 (ndr_print_function_t) ndr_print_decode_Packages,
4485 false,
4488 "decode_PrimaryKerberos",
4489 sizeof(struct decode_PrimaryKerberos),
4490 (ndr_push_flags_fn_t) ndr_push_decode_PrimaryKerberos,
4491 (ndr_pull_flags_fn_t) ndr_pull_decode_PrimaryKerberos,
4492 (ndr_print_function_t) ndr_print_decode_PrimaryKerberos,
4493 false,
4496 "decode_PrimaryCLEARTEXT",
4497 sizeof(struct decode_PrimaryCLEARTEXT),
4498 (ndr_push_flags_fn_t) ndr_push_decode_PrimaryCLEARTEXT,
4499 (ndr_pull_flags_fn_t) ndr_pull_decode_PrimaryCLEARTEXT,
4500 (ndr_print_function_t) ndr_print_decode_PrimaryCLEARTEXT,
4501 false,
4504 "decode_PrimaryWDigest",
4505 sizeof(struct decode_PrimaryWDigest),
4506 (ndr_push_flags_fn_t) ndr_push_decode_PrimaryWDigest,
4507 (ndr_pull_flags_fn_t) ndr_pull_decode_PrimaryWDigest,
4508 (ndr_print_function_t) ndr_print_decode_PrimaryWDigest,
4509 false,
4512 "decode_trustAuthInOut",
4513 sizeof(struct decode_trustAuthInOut),
4514 (ndr_push_flags_fn_t) ndr_push_decode_trustAuthInOut,
4515 (ndr_pull_flags_fn_t) ndr_pull_decode_trustAuthInOut,
4516 (ndr_print_function_t) ndr_print_decode_trustAuthInOut,
4517 false,
4520 "decode_trustDomainPasswords",
4521 sizeof(struct decode_trustDomainPasswords),
4522 (ndr_push_flags_fn_t) ndr_push_decode_trustDomainPasswords,
4523 (ndr_pull_flags_fn_t) ndr_pull_decode_trustDomainPasswords,
4524 (ndr_print_function_t) ndr_print_decode_trustDomainPasswords,
4525 false,
4528 "decode_ExtendedErrorInfo",
4529 sizeof(struct decode_ExtendedErrorInfo),
4530 (ndr_push_flags_fn_t) ndr_push_decode_ExtendedErrorInfo,
4531 (ndr_pull_flags_fn_t) ndr_pull_decode_ExtendedErrorInfo,
4532 (ndr_print_function_t) ndr_print_decode_ExtendedErrorInfo,
4533 false,
4535 { NULL, 0, NULL, NULL, NULL, false }
4538 static const char * const drsblobs_endpoint_strings[] = {
4539 "ncacn_np:[\\pipe\\drsblobs]",
4542 static const struct ndr_interface_string_array drsblobs_endpoints = {
4543 .count = 1,
4544 .names = drsblobs_endpoint_strings
4547 static const char * const drsblobs_authservice_strings[] = {
4548 "host",
4551 static const struct ndr_interface_string_array drsblobs_authservices = {
4552 .count = 1,
4553 .names = drsblobs_authservice_strings
4557 const struct ndr_interface_table ndr_table_drsblobs = {
4558 .name = "drsblobs",
4559 .syntax_id = {
4560 {0x12345778,0x1234,0xabcd,{0x00,0x01},{0x00,0x00,0x00,0x01}},
4561 NDR_DRSBLOBS_VERSION
4563 .helpstring = NDR_DRSBLOBS_HELPSTRING,
4564 .num_calls = 14,
4565 .calls = drsblobs_calls,
4566 .endpoints = &drsblobs_endpoints,
4567 .authservices = &drsblobs_authservices