s4:drepl_out_helpers: don't look at the internals of 'struct rpc_request'
[Samba/nascimento.git] / librpc / gen_ndr / ndr_drsblobs.c
blob807d15f267e19b076f3f237583658b24c55f0afa
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));
20 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
22 if (ndr_flags & NDR_BUFFERS) {
24 return NDR_ERR_SUCCESS;
27 static enum ndr_err_code ndr_pull_replPropertyMetaData1(struct ndr_pull *ndr, int ndr_flags, struct replPropertyMetaData1 *r)
29 if (ndr_flags & NDR_SCALARS) {
30 NDR_CHECK(ndr_pull_align(ndr, 8));
31 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attid));
32 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
33 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->originating_change_time));
34 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
35 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn));
36 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->local_usn));
37 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
39 if (ndr_flags & NDR_BUFFERS) {
41 return NDR_ERR_SUCCESS;
44 _PUBLIC_ void ndr_print_replPropertyMetaData1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaData1 *r)
46 ndr_print_struct(ndr, name, "replPropertyMetaData1");
47 ndr->depth++;
48 ndr_print_drsuapi_DsAttributeId(ndr, "attid", r->attid);
49 ndr_print_uint32(ndr, "version", r->version);
50 ndr_print_NTTIME_1sec(ndr, "originating_change_time", r->originating_change_time);
51 ndr_print_GUID(ndr, "originating_invocation_id", &r->originating_invocation_id);
52 ndr_print_hyper(ndr, "originating_usn", r->originating_usn);
53 ndr_print_hyper(ndr, "local_usn", r->local_usn);
54 ndr->depth--;
57 static enum ndr_err_code ndr_push_replPropertyMetaDataCtr1(struct ndr_push *ndr, int ndr_flags, const struct replPropertyMetaDataCtr1 *r)
59 uint32_t cntr_array_0;
60 if (ndr_flags & NDR_SCALARS) {
61 NDR_CHECK(ndr_push_align(ndr, 8));
62 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
63 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
64 for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) {
65 NDR_CHECK(ndr_push_replPropertyMetaData1(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
67 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
69 if (ndr_flags & NDR_BUFFERS) {
71 return NDR_ERR_SUCCESS;
74 static enum ndr_err_code ndr_pull_replPropertyMetaDataCtr1(struct ndr_pull *ndr, int ndr_flags, struct replPropertyMetaDataCtr1 *r)
76 uint32_t cntr_array_0;
77 TALLOC_CTX *_mem_save_array_0;
78 if (ndr_flags & NDR_SCALARS) {
79 NDR_CHECK(ndr_pull_align(ndr, 8));
80 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
81 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
82 NDR_PULL_ALLOC_N(ndr, r->array, r->count);
83 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
84 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
85 for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) {
86 NDR_CHECK(ndr_pull_replPropertyMetaData1(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
88 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
89 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
91 if (ndr_flags & NDR_BUFFERS) {
93 return NDR_ERR_SUCCESS;
96 _PUBLIC_ void ndr_print_replPropertyMetaDataCtr1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaDataCtr1 *r)
98 uint32_t cntr_array_0;
99 ndr_print_struct(ndr, name, "replPropertyMetaDataCtr1");
100 ndr->depth++;
101 ndr_print_uint32(ndr, "count", r->count);
102 ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
103 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
104 ndr->depth++;
105 for (cntr_array_0=0;cntr_array_0<r->count;cntr_array_0++) {
106 char *idx_0=NULL;
107 if (asprintf(&idx_0, "[%d]", cntr_array_0) != -1) {
108 ndr_print_replPropertyMetaData1(ndr, "array", &r->array[cntr_array_0]);
109 free(idx_0);
112 ndr->depth--;
113 ndr->depth--;
116 static enum ndr_err_code ndr_push_replPropertyMetaDataCtr(struct ndr_push *ndr, int ndr_flags, const union replPropertyMetaDataCtr *r)
118 if (ndr_flags & NDR_SCALARS) {
119 int level = ndr_push_get_switch_value(ndr, r);
120 NDR_CHECK(ndr_push_union_align(ndr, 8));
121 switch (level) {
122 case 1: {
123 NDR_CHECK(ndr_push_replPropertyMetaDataCtr1(ndr, NDR_SCALARS, &r->ctr1));
124 break; }
126 default:
127 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
130 if (ndr_flags & NDR_BUFFERS) {
131 int level = ndr_push_get_switch_value(ndr, r);
132 switch (level) {
133 case 1:
134 break;
136 default:
137 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
140 return NDR_ERR_SUCCESS;
143 static enum ndr_err_code ndr_pull_replPropertyMetaDataCtr(struct ndr_pull *ndr, int ndr_flags, union replPropertyMetaDataCtr *r)
145 int level;
146 level = ndr_pull_get_switch_value(ndr, r);
147 if (ndr_flags & NDR_SCALARS) {
148 NDR_CHECK(ndr_pull_union_align(ndr, 8));
149 switch (level) {
150 case 1: {
151 NDR_CHECK(ndr_pull_replPropertyMetaDataCtr1(ndr, NDR_SCALARS, &r->ctr1));
152 break; }
154 default:
155 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
158 if (ndr_flags & NDR_BUFFERS) {
159 switch (level) {
160 case 1:
161 break;
163 default:
164 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
167 return NDR_ERR_SUCCESS;
170 _PUBLIC_ void ndr_print_replPropertyMetaDataCtr(struct ndr_print *ndr, const char *name, const union replPropertyMetaDataCtr *r)
172 int level;
173 level = ndr_print_get_switch_value(ndr, r);
174 ndr_print_union(ndr, name, level, "replPropertyMetaDataCtr");
175 switch (level) {
176 case 1:
177 ndr_print_replPropertyMetaDataCtr1(ndr, "ctr1", &r->ctr1);
178 break;
180 default:
181 ndr_print_bad_level(ndr, name, level);
185 _PUBLIC_ enum ndr_err_code ndr_push_replPropertyMetaDataBlob(struct ndr_push *ndr, int ndr_flags, const struct replPropertyMetaDataBlob *r)
187 if (ndr_flags & NDR_SCALARS) {
188 NDR_CHECK(ndr_push_align(ndr, 8));
189 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
190 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
191 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
192 NDR_CHECK(ndr_push_replPropertyMetaDataCtr(ndr, NDR_SCALARS, &r->ctr));
193 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
195 if (ndr_flags & NDR_BUFFERS) {
197 return NDR_ERR_SUCCESS;
200 _PUBLIC_ enum ndr_err_code ndr_pull_replPropertyMetaDataBlob(struct ndr_pull *ndr, int ndr_flags, struct replPropertyMetaDataBlob *r)
202 if (ndr_flags & NDR_SCALARS) {
203 NDR_CHECK(ndr_pull_align(ndr, 8));
204 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
205 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
206 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
207 NDR_CHECK(ndr_pull_replPropertyMetaDataCtr(ndr, NDR_SCALARS, &r->ctr));
208 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
210 if (ndr_flags & NDR_BUFFERS) {
212 return NDR_ERR_SUCCESS;
215 _PUBLIC_ void ndr_print_replPropertyMetaDataBlob(struct ndr_print *ndr, const char *name, const struct replPropertyMetaDataBlob *r)
217 ndr_print_struct(ndr, name, "replPropertyMetaDataBlob");
218 ndr->depth++;
219 ndr_print_uint32(ndr, "version", r->version);
220 ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
221 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
222 ndr_print_replPropertyMetaDataCtr(ndr, "ctr", &r->ctr);
223 ndr->depth--;
226 static enum ndr_err_code ndr_push_replUpToDateVectorCtr1(struct ndr_push *ndr, int ndr_flags, const struct replUpToDateVectorCtr1 *r)
228 uint32_t cntr_cursors_0;
229 if (ndr_flags & NDR_SCALARS) {
230 NDR_CHECK(ndr_push_align(ndr, 8));
231 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
232 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
233 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
234 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
236 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
238 if (ndr_flags & NDR_BUFFERS) {
240 return NDR_ERR_SUCCESS;
243 static enum ndr_err_code ndr_pull_replUpToDateVectorCtr1(struct ndr_pull *ndr, int ndr_flags, struct replUpToDateVectorCtr1 *r)
245 uint32_t cntr_cursors_0;
246 TALLOC_CTX *_mem_save_cursors_0;
247 if (ndr_flags & NDR_SCALARS) {
248 NDR_CHECK(ndr_pull_align(ndr, 8));
249 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
250 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
251 NDR_PULL_ALLOC_N(ndr, r->cursors, r->count);
252 _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
253 NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
254 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
255 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
257 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
258 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
260 if (ndr_flags & NDR_BUFFERS) {
262 return NDR_ERR_SUCCESS;
265 _PUBLIC_ void ndr_print_replUpToDateVectorCtr1(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorCtr1 *r)
267 uint32_t cntr_cursors_0;
268 ndr_print_struct(ndr, name, "replUpToDateVectorCtr1");
269 ndr->depth++;
270 ndr_print_uint32(ndr, "count", r->count);
271 ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
272 ndr->print(ndr, "%s: ARRAY(%d)", "cursors", (int)r->count);
273 ndr->depth++;
274 for (cntr_cursors_0=0;cntr_cursors_0<r->count;cntr_cursors_0++) {
275 char *idx_0=NULL;
276 if (asprintf(&idx_0, "[%d]", cntr_cursors_0) != -1) {
277 ndr_print_drsuapi_DsReplicaCursor(ndr, "cursors", &r->cursors[cntr_cursors_0]);
278 free(idx_0);
281 ndr->depth--;
282 ndr->depth--;
285 static enum ndr_err_code ndr_push_replUpToDateVectorCtr2(struct ndr_push *ndr, int ndr_flags, const struct replUpToDateVectorCtr2 *r)
287 uint32_t cntr_cursors_0;
288 if (ndr_flags & NDR_SCALARS) {
289 NDR_CHECK(ndr_push_align(ndr, 8));
290 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
291 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
292 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
293 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
295 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
297 if (ndr_flags & NDR_BUFFERS) {
299 return NDR_ERR_SUCCESS;
302 static enum ndr_err_code ndr_pull_replUpToDateVectorCtr2(struct ndr_pull *ndr, int ndr_flags, struct replUpToDateVectorCtr2 *r)
304 uint32_t cntr_cursors_0;
305 TALLOC_CTX *_mem_save_cursors_0;
306 if (ndr_flags & NDR_SCALARS) {
307 NDR_CHECK(ndr_pull_align(ndr, 8));
308 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
309 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
310 NDR_PULL_ALLOC_N(ndr, r->cursors, r->count);
311 _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
312 NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
313 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
314 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
316 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
317 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
319 if (ndr_flags & NDR_BUFFERS) {
321 return NDR_ERR_SUCCESS;
324 _PUBLIC_ void ndr_print_replUpToDateVectorCtr2(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorCtr2 *r)
326 uint32_t cntr_cursors_0;
327 ndr_print_struct(ndr, name, "replUpToDateVectorCtr2");
328 ndr->depth++;
329 ndr_print_uint32(ndr, "count", r->count);
330 ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
331 ndr->print(ndr, "%s: ARRAY(%d)", "cursors", (int)r->count);
332 ndr->depth++;
333 for (cntr_cursors_0=0;cntr_cursors_0<r->count;cntr_cursors_0++) {
334 char *idx_0=NULL;
335 if (asprintf(&idx_0, "[%d]", cntr_cursors_0) != -1) {
336 ndr_print_drsuapi_DsReplicaCursor2(ndr, "cursors", &r->cursors[cntr_cursors_0]);
337 free(idx_0);
340 ndr->depth--;
341 ndr->depth--;
344 static enum ndr_err_code ndr_push_replUpToDateVectorCtr(struct ndr_push *ndr, int ndr_flags, const union replUpToDateVectorCtr *r)
346 if (ndr_flags & NDR_SCALARS) {
347 int level = ndr_push_get_switch_value(ndr, r);
348 NDR_CHECK(ndr_push_union_align(ndr, 8));
349 switch (level) {
350 case 1: {
351 NDR_CHECK(ndr_push_replUpToDateVectorCtr1(ndr, NDR_SCALARS, &r->ctr1));
352 break; }
354 case 2: {
355 NDR_CHECK(ndr_push_replUpToDateVectorCtr2(ndr, NDR_SCALARS, &r->ctr2));
356 break; }
358 default:
359 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
362 if (ndr_flags & NDR_BUFFERS) {
363 int level = ndr_push_get_switch_value(ndr, r);
364 switch (level) {
365 case 1:
366 break;
368 case 2:
369 break;
371 default:
372 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
375 return NDR_ERR_SUCCESS;
378 static enum ndr_err_code ndr_pull_replUpToDateVectorCtr(struct ndr_pull *ndr, int ndr_flags, union replUpToDateVectorCtr *r)
380 int level;
381 level = ndr_pull_get_switch_value(ndr, r);
382 if (ndr_flags & NDR_SCALARS) {
383 NDR_CHECK(ndr_pull_union_align(ndr, 8));
384 switch (level) {
385 case 1: {
386 NDR_CHECK(ndr_pull_replUpToDateVectorCtr1(ndr, NDR_SCALARS, &r->ctr1));
387 break; }
389 case 2: {
390 NDR_CHECK(ndr_pull_replUpToDateVectorCtr2(ndr, NDR_SCALARS, &r->ctr2));
391 break; }
393 default:
394 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
397 if (ndr_flags & NDR_BUFFERS) {
398 switch (level) {
399 case 1:
400 break;
402 case 2:
403 break;
405 default:
406 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
409 return NDR_ERR_SUCCESS;
412 _PUBLIC_ void ndr_print_replUpToDateVectorCtr(struct ndr_print *ndr, const char *name, const union replUpToDateVectorCtr *r)
414 int level;
415 level = ndr_print_get_switch_value(ndr, r);
416 ndr_print_union(ndr, name, level, "replUpToDateVectorCtr");
417 switch (level) {
418 case 1:
419 ndr_print_replUpToDateVectorCtr1(ndr, "ctr1", &r->ctr1);
420 break;
422 case 2:
423 ndr_print_replUpToDateVectorCtr2(ndr, "ctr2", &r->ctr2);
424 break;
426 default:
427 ndr_print_bad_level(ndr, name, level);
431 _PUBLIC_ enum ndr_err_code ndr_push_replUpToDateVectorBlob(struct ndr_push *ndr, int ndr_flags, const struct replUpToDateVectorBlob *r)
433 if (ndr_flags & NDR_SCALARS) {
434 NDR_CHECK(ndr_push_align(ndr, 8));
435 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
436 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
437 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
438 NDR_CHECK(ndr_push_replUpToDateVectorCtr(ndr, NDR_SCALARS, &r->ctr));
439 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
441 if (ndr_flags & NDR_BUFFERS) {
443 return NDR_ERR_SUCCESS;
446 _PUBLIC_ enum ndr_err_code ndr_pull_replUpToDateVectorBlob(struct ndr_pull *ndr, int ndr_flags, struct replUpToDateVectorBlob *r)
448 if (ndr_flags & NDR_SCALARS) {
449 NDR_CHECK(ndr_pull_align(ndr, 8));
450 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
451 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
452 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
453 NDR_CHECK(ndr_pull_replUpToDateVectorCtr(ndr, NDR_SCALARS, &r->ctr));
454 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
456 if (ndr_flags & NDR_BUFFERS) {
458 return NDR_ERR_SUCCESS;
461 _PUBLIC_ void ndr_print_replUpToDateVectorBlob(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorBlob *r)
463 ndr_print_struct(ndr, name, "replUpToDateVectorBlob");
464 ndr->depth++;
465 ndr_print_uint32(ndr, "version", r->version);
466 ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
467 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
468 ndr_print_replUpToDateVectorCtr(ndr, "ctr", &r->ctr);
469 ndr->depth--;
472 _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo1OtherInfo(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo1OtherInfo *r)
474 if (ndr_flags & NDR_SCALARS) {
475 NDR_CHECK(ndr_push_align(ndr, 4));
476 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen(r->dns_name) + 1));
477 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_name, strlen(r->dns_name) + 1, sizeof(uint8_t), CH_DOS));
478 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
480 if (ndr_flags & NDR_BUFFERS) {
482 return NDR_ERR_SUCCESS;
485 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo1OtherInfo(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo1OtherInfo *r)
487 if (ndr_flags & NDR_SCALARS) {
488 NDR_CHECK(ndr_pull_align(ndr, 4));
489 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__dns_name_size));
490 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_name, r->__dns_name_size, sizeof(uint8_t), CH_DOS));
491 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
493 if (ndr_flags & NDR_BUFFERS) {
495 return NDR_ERR_SUCCESS;
498 _PUBLIC_ void ndr_print_repsFromTo1OtherInfo(struct ndr_print *ndr, const char *name, const struct repsFromTo1OtherInfo *r)
500 ndr_print_struct(ndr, name, "repsFromTo1OtherInfo");
501 ndr->depth++;
502 ndr_print_uint32(ndr, "__dns_name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->dns_name) + 1:r->__dns_name_size);
503 ndr_print_string(ndr, "dns_name", r->dns_name);
504 ndr->depth--;
507 _PUBLIC_ size_t ndr_size_repsFromTo1OtherInfo(const struct repsFromTo1OtherInfo *r, struct smb_iconv_convenience *ic, int flags)
509 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo1OtherInfo, ic);
512 _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo1(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo1 *r)
515 uint32_t _flags_save_STRUCT = ndr->flags;
516 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
517 if (ndr_flags & NDR_SCALARS) {
518 NDR_CHECK(ndr_push_align(ndr, 8));
519 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo1(r, ndr->iconv_convenience, ndr->flags) + 8));
520 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->consecutive_sync_failures));
521 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_success));
522 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_attempt));
523 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->result_last_attempt));
524 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->other_info));
525 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo1OtherInfo(r->other_info, ndr->iconv_convenience, ndr->flags)));
526 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->replica_flags));
527 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
528 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
529 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
530 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
531 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
532 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->transport_guid));
533 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
535 if (ndr_flags & NDR_BUFFERS) {
536 if (r->other_info) {
537 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->other_info));
538 NDR_CHECK(ndr_push_repsFromTo1OtherInfo(ndr, NDR_SCALARS, r->other_info));
539 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->other_info));
542 ndr->flags = _flags_save_STRUCT;
544 return NDR_ERR_SUCCESS;
547 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo1(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo1 *r)
549 uint32_t _ptr_other_info;
550 TALLOC_CTX *_mem_save_other_info_0;
552 uint32_t _flags_save_STRUCT = ndr->flags;
553 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
554 if (ndr_flags & NDR_SCALARS) {
555 NDR_CHECK(ndr_pull_align(ndr, 8));
556 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->blobsize));
557 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->consecutive_sync_failures));
558 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->last_success));
559 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->last_attempt));
560 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->result_last_attempt));
561 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_other_info));
562 if (_ptr_other_info) {
563 NDR_PULL_ALLOC(ndr, r->other_info);
564 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->other_info, _ptr_other_info));
565 } else {
566 r->other_info = NULL;
568 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->other_info_length));
569 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->replica_flags));
570 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
571 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
572 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
573 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
574 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
575 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->transport_guid));
576 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
578 if (ndr_flags & NDR_BUFFERS) {
579 if (r->other_info) {
580 uint32_t _relative_save_offset;
581 _relative_save_offset = ndr->offset;
582 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->other_info));
583 _mem_save_other_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
584 NDR_PULL_SET_MEM_CTX(ndr, r->other_info, 0);
585 NDR_CHECK(ndr_pull_repsFromTo1OtherInfo(ndr, NDR_SCALARS, r->other_info));
586 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_other_info_0, 0);
587 if (ndr->offset > ndr->relative_highest_offset) {
588 ndr->relative_highest_offset = ndr->offset;
590 ndr->offset = _relative_save_offset;
593 ndr->flags = _flags_save_STRUCT;
595 return NDR_ERR_SUCCESS;
598 _PUBLIC_ void ndr_print_repsFromTo1(struct ndr_print *ndr, const char *name, const struct repsFromTo1 *r)
600 ndr_print_struct(ndr, name, "repsFromTo1");
602 uint32_t _flags_save_STRUCT = ndr->flags;
603 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
604 ndr->depth++;
605 ndr_print_uint32(ndr, "blobsize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo1(r, ndr->iconv_convenience, ndr->flags) + 8:r->blobsize);
606 ndr_print_uint32(ndr, "consecutive_sync_failures", r->consecutive_sync_failures);
607 ndr_print_NTTIME_1sec(ndr, "last_success", r->last_success);
608 ndr_print_NTTIME_1sec(ndr, "last_attempt", r->last_attempt);
609 ndr_print_WERROR(ndr, "result_last_attempt", r->result_last_attempt);
610 ndr_print_ptr(ndr, "other_info", r->other_info);
611 ndr->depth++;
612 if (r->other_info) {
613 ndr_print_repsFromTo1OtherInfo(ndr, "other_info", r->other_info);
615 ndr->depth--;
616 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);
617 ndr_print_drsuapi_DrsOptions(ndr, "replica_flags", r->replica_flags);
618 ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
619 ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
620 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
621 ndr_print_GUID(ndr, "source_dsa_obj_guid", &r->source_dsa_obj_guid);
622 ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
623 ndr_print_GUID(ndr, "transport_guid", &r->transport_guid);
624 ndr->depth--;
625 ndr->flags = _flags_save_STRUCT;
629 _PUBLIC_ size_t ndr_size_repsFromTo1(const struct repsFromTo1 *r, struct smb_iconv_convenience *ic, int flags)
631 flags |= LIBNDR_PRINT_ARRAY_HEX;
632 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo1, ic);
635 _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo2OtherInfo(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo2OtherInfo *r)
637 uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
638 if (ndr_flags & NDR_SCALARS) {
639 NDR_CHECK(ndr_push_align(ndr, 8));
640 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
641 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo2OtherInfo(r, ndr->iconv_convenience, ndr->flags)));
643 uint32_t _flags_save_string = ndr->flags;
644 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
645 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dns_name1));
646 ndr->flags = _flags_save_string;
648 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
650 uint32_t _flags_save_string = ndr->flags;
651 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
652 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dns_name2));
653 ndr->flags = _flags_save_string;
655 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown2));
656 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
658 if (ndr_flags & NDR_BUFFERS) {
659 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
661 uint32_t _flags_save_string = ndr->flags;
662 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
663 if (r->dns_name1) {
664 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->dns_name1));
665 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->dns_name1));
666 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->dns_name1));
668 ndr->flags = _flags_save_string;
671 uint32_t _flags_save_string = ndr->flags;
672 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
673 if (r->dns_name2) {
674 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->dns_name2));
675 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->dns_name2));
676 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->dns_name2));
678 ndr->flags = _flags_save_string;
681 ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
682 return NDR_ERR_SUCCESS;
685 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo2OtherInfo(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo2OtherInfo *r)
687 uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
688 uint32_t _ptr_dns_name1;
689 TALLOC_CTX *_mem_save_dns_name1_0;
690 uint32_t _ptr_dns_name2;
691 TALLOC_CTX *_mem_save_dns_name2_0;
692 if (ndr_flags & NDR_SCALARS) {
693 NDR_CHECK(ndr_pull_align(ndr, 8));
694 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
695 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
697 uint32_t _flags_save_string = ndr->flags;
698 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
699 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_name1));
700 if (_ptr_dns_name1) {
701 NDR_PULL_ALLOC(ndr, r->dns_name1);
702 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dns_name1, _ptr_dns_name1));
703 } else {
704 r->dns_name1 = NULL;
706 ndr->flags = _flags_save_string;
708 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
710 uint32_t _flags_save_string = ndr->flags;
711 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
712 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_name2));
713 if (_ptr_dns_name2) {
714 NDR_PULL_ALLOC(ndr, r->dns_name2);
715 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dns_name2, _ptr_dns_name2));
716 } else {
717 r->dns_name2 = NULL;
719 ndr->flags = _flags_save_string;
721 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown2));
722 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
724 if (ndr_flags & NDR_BUFFERS) {
725 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
727 uint32_t _flags_save_string = ndr->flags;
728 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
729 if (r->dns_name1) {
730 uint32_t _relative_save_offset;
731 _relative_save_offset = ndr->offset;
732 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dns_name1));
733 _mem_save_dns_name1_0 = NDR_PULL_GET_MEM_CTX(ndr);
734 NDR_PULL_SET_MEM_CTX(ndr, r->dns_name1, 0);
735 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->dns_name1));
736 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_name1_0, 0);
737 if (ndr->offset > ndr->relative_highest_offset) {
738 ndr->relative_highest_offset = ndr->offset;
740 ndr->offset = _relative_save_offset;
742 ndr->flags = _flags_save_string;
745 uint32_t _flags_save_string = ndr->flags;
746 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
747 if (r->dns_name2) {
748 uint32_t _relative_save_offset;
749 _relative_save_offset = ndr->offset;
750 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dns_name2));
751 _mem_save_dns_name2_0 = NDR_PULL_GET_MEM_CTX(ndr);
752 NDR_PULL_SET_MEM_CTX(ndr, r->dns_name2, 0);
753 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->dns_name2));
754 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_name2_0, 0);
755 if (ndr->offset > ndr->relative_highest_offset) {
756 ndr->relative_highest_offset = ndr->offset;
758 ndr->offset = _relative_save_offset;
760 ndr->flags = _flags_save_string;
763 ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
764 return NDR_ERR_SUCCESS;
767 _PUBLIC_ void ndr_print_repsFromTo2OtherInfo(struct ndr_print *ndr, const char *name, const struct repsFromTo2OtherInfo *r)
769 ndr_print_struct(ndr, name, "repsFromTo2OtherInfo");
770 ndr->depth++;
771 ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo2OtherInfo(r, ndr->iconv_convenience, ndr->flags):r->__ndr_size);
772 ndr_print_ptr(ndr, "dns_name1", r->dns_name1);
773 ndr->depth++;
774 if (r->dns_name1) {
775 ndr_print_string(ndr, "dns_name1", r->dns_name1);
777 ndr->depth--;
778 ndr_print_uint32(ndr, "unknown1", r->unknown1);
779 ndr_print_ptr(ndr, "dns_name2", r->dns_name2);
780 ndr->depth++;
781 if (r->dns_name2) {
782 ndr_print_string(ndr, "dns_name2", r->dns_name2);
784 ndr->depth--;
785 ndr_print_hyper(ndr, "unknown2", r->unknown2);
786 ndr->depth--;
789 _PUBLIC_ size_t ndr_size_repsFromTo2OtherInfo(const struct repsFromTo2OtherInfo *r, struct smb_iconv_convenience *ic, int flags)
791 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo2OtherInfo, ic);
794 _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo2(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo2 *r)
797 uint32_t _flags_save_STRUCT = ndr->flags;
798 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
799 if (ndr_flags & NDR_SCALARS) {
800 NDR_CHECK(ndr_push_align(ndr, 8));
801 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo2(r, ndr->iconv_convenience, ndr->flags) + 8));
802 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->consecutive_sync_failures));
803 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_success));
804 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_attempt));
805 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->result_last_attempt));
806 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->other_info));
807 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo2OtherInfo(r->other_info, ndr->iconv_convenience, ndr->flags)));
808 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->replica_flags));
809 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
810 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
811 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
812 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
813 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
814 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->transport_guid));
815 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown1));
816 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
818 if (ndr_flags & NDR_BUFFERS) {
819 if (r->other_info) {
820 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->other_info));
821 NDR_CHECK(ndr_push_repsFromTo2OtherInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->other_info));
822 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->other_info));
825 ndr->flags = _flags_save_STRUCT;
827 return NDR_ERR_SUCCESS;
830 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo2(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo2 *r)
832 uint32_t _ptr_other_info;
833 TALLOC_CTX *_mem_save_other_info_0;
835 uint32_t _flags_save_STRUCT = ndr->flags;
836 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
837 if (ndr_flags & NDR_SCALARS) {
838 NDR_CHECK(ndr_pull_align(ndr, 8));
839 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->blobsize));
840 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->consecutive_sync_failures));
841 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->last_success));
842 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->last_attempt));
843 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->result_last_attempt));
844 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_other_info));
845 if (_ptr_other_info) {
846 NDR_PULL_ALLOC(ndr, r->other_info);
847 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->other_info, _ptr_other_info));
848 } else {
849 r->other_info = NULL;
851 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->other_info_length));
852 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->replica_flags));
853 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
854 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
855 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
856 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
857 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
858 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->transport_guid));
859 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown1));
860 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
862 if (ndr_flags & NDR_BUFFERS) {
863 if (r->other_info) {
864 uint32_t _relative_save_offset;
865 _relative_save_offset = ndr->offset;
866 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->other_info));
867 _mem_save_other_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
868 NDR_PULL_SET_MEM_CTX(ndr, r->other_info, 0);
869 NDR_CHECK(ndr_pull_repsFromTo2OtherInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->other_info));
870 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_other_info_0, 0);
871 if (ndr->offset > ndr->relative_highest_offset) {
872 ndr->relative_highest_offset = ndr->offset;
874 ndr->offset = _relative_save_offset;
877 ndr->flags = _flags_save_STRUCT;
879 return NDR_ERR_SUCCESS;
882 _PUBLIC_ void ndr_print_repsFromTo2(struct ndr_print *ndr, const char *name, const struct repsFromTo2 *r)
884 ndr_print_struct(ndr, name, "repsFromTo2");
886 uint32_t _flags_save_STRUCT = ndr->flags;
887 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
888 ndr->depth++;
889 ndr_print_uint32(ndr, "blobsize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo2(r, ndr->iconv_convenience, ndr->flags) + 8:r->blobsize);
890 ndr_print_uint32(ndr, "consecutive_sync_failures", r->consecutive_sync_failures);
891 ndr_print_NTTIME_1sec(ndr, "last_success", r->last_success);
892 ndr_print_NTTIME_1sec(ndr, "last_attempt", r->last_attempt);
893 ndr_print_WERROR(ndr, "result_last_attempt", r->result_last_attempt);
894 ndr_print_ptr(ndr, "other_info", r->other_info);
895 ndr->depth++;
896 if (r->other_info) {
897 ndr_print_repsFromTo2OtherInfo(ndr, "other_info", r->other_info);
899 ndr->depth--;
900 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);
901 ndr_print_drsuapi_DrsOptions(ndr, "replica_flags", r->replica_flags);
902 ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
903 ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
904 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
905 ndr_print_GUID(ndr, "source_dsa_obj_guid", &r->source_dsa_obj_guid);
906 ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
907 ndr_print_GUID(ndr, "transport_guid", &r->transport_guid);
908 ndr_print_hyper(ndr, "unknown1", r->unknown1);
909 ndr->depth--;
910 ndr->flags = _flags_save_STRUCT;
914 _PUBLIC_ size_t ndr_size_repsFromTo2(const struct repsFromTo2 *r, struct smb_iconv_convenience *ic, int flags)
916 flags |= LIBNDR_PRINT_ARRAY_HEX;
917 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo2, ic);
920 static enum ndr_err_code ndr_push_repsFromTo(struct ndr_push *ndr, int ndr_flags, const union repsFromTo *r)
922 if (ndr_flags & NDR_SCALARS) {
923 int level = ndr_push_get_switch_value(ndr, r);
924 NDR_CHECK(ndr_push_union_align(ndr, 8));
925 switch (level) {
926 case 1: {
927 NDR_CHECK(ndr_push_repsFromTo1(ndr, NDR_SCALARS, &r->ctr1));
928 break; }
930 case 2: {
931 NDR_CHECK(ndr_push_repsFromTo2(ndr, NDR_SCALARS, &r->ctr2));
932 break; }
934 default:
935 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
938 if (ndr_flags & NDR_BUFFERS) {
939 int level = ndr_push_get_switch_value(ndr, r);
940 switch (level) {
941 case 1:
942 NDR_CHECK(ndr_push_repsFromTo1(ndr, NDR_BUFFERS, &r->ctr1));
943 break;
945 case 2:
946 NDR_CHECK(ndr_push_repsFromTo2(ndr, NDR_BUFFERS, &r->ctr2));
947 break;
949 default:
950 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
953 return NDR_ERR_SUCCESS;
956 static enum ndr_err_code ndr_pull_repsFromTo(struct ndr_pull *ndr, int ndr_flags, union repsFromTo *r)
958 int level;
959 level = ndr_pull_get_switch_value(ndr, r);
960 if (ndr_flags & NDR_SCALARS) {
961 NDR_CHECK(ndr_pull_union_align(ndr, 8));
962 switch (level) {
963 case 1: {
964 NDR_CHECK(ndr_pull_repsFromTo1(ndr, NDR_SCALARS, &r->ctr1));
965 break; }
967 case 2: {
968 NDR_CHECK(ndr_pull_repsFromTo2(ndr, NDR_SCALARS, &r->ctr2));
969 break; }
971 default:
972 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
975 if (ndr_flags & NDR_BUFFERS) {
976 switch (level) {
977 case 1:
978 NDR_CHECK(ndr_pull_repsFromTo1(ndr, NDR_BUFFERS, &r->ctr1));
979 break;
981 case 2:
982 NDR_CHECK(ndr_pull_repsFromTo2(ndr, NDR_BUFFERS, &r->ctr2));
983 break;
985 default:
986 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
989 return NDR_ERR_SUCCESS;
992 _PUBLIC_ void ndr_print_repsFromTo(struct ndr_print *ndr, const char *name, const union repsFromTo *r)
994 int level;
995 level = ndr_print_get_switch_value(ndr, r);
996 ndr_print_union(ndr, name, level, "repsFromTo");
997 switch (level) {
998 case 1:
999 ndr_print_repsFromTo1(ndr, "ctr1", &r->ctr1);
1000 break;
1002 case 2:
1003 ndr_print_repsFromTo2(ndr, "ctr2", &r->ctr2);
1004 break;
1006 default:
1007 ndr_print_bad_level(ndr, name, level);
1011 _PUBLIC_ enum ndr_err_code ndr_push_repsFromToBlob(struct ndr_push *ndr, int ndr_flags, const struct repsFromToBlob *r)
1013 if (ndr_flags & NDR_SCALARS) {
1014 NDR_CHECK(ndr_push_align(ndr, 8));
1015 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
1016 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1017 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
1018 NDR_CHECK(ndr_push_repsFromTo(ndr, NDR_SCALARS, &r->ctr));
1019 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
1021 if (ndr_flags & NDR_BUFFERS) {
1022 NDR_CHECK(ndr_push_repsFromTo(ndr, NDR_BUFFERS, &r->ctr));
1024 return NDR_ERR_SUCCESS;
1027 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromToBlob(struct ndr_pull *ndr, int ndr_flags, struct repsFromToBlob *r)
1029 if (ndr_flags & NDR_SCALARS) {
1030 NDR_CHECK(ndr_pull_align(ndr, 8));
1031 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
1032 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
1033 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
1034 NDR_CHECK(ndr_pull_repsFromTo(ndr, NDR_SCALARS, &r->ctr));
1035 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
1037 if (ndr_flags & NDR_BUFFERS) {
1038 NDR_CHECK(ndr_pull_repsFromTo(ndr, NDR_BUFFERS, &r->ctr));
1040 return NDR_ERR_SUCCESS;
1043 _PUBLIC_ void ndr_print_repsFromToBlob(struct ndr_print *ndr, const char *name, const struct repsFromToBlob *r)
1045 ndr_print_struct(ndr, name, "repsFromToBlob");
1046 ndr->depth++;
1047 ndr_print_uint32(ndr, "version", r->version);
1048 ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
1049 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
1050 ndr_print_repsFromTo(ndr, "ctr", &r->ctr);
1051 ndr->depth--;
1054 static enum ndr_err_code ndr_push_partialAttributeSetCtr1(struct ndr_push *ndr, int ndr_flags, const struct partialAttributeSetCtr1 *r)
1056 uint32_t cntr_array_0;
1057 if (ndr_flags & NDR_SCALARS) {
1058 NDR_CHECK(ndr_push_align(ndr, 4));
1059 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1060 for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) {
1061 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->array[cntr_array_0]));
1063 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1065 if (ndr_flags & NDR_BUFFERS) {
1067 return NDR_ERR_SUCCESS;
1070 static enum ndr_err_code ndr_pull_partialAttributeSetCtr1(struct ndr_pull *ndr, int ndr_flags, struct partialAttributeSetCtr1 *r)
1072 uint32_t cntr_array_0;
1073 TALLOC_CTX *_mem_save_array_0;
1074 if (ndr_flags & NDR_SCALARS) {
1075 NDR_CHECK(ndr_pull_align(ndr, 4));
1076 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1077 NDR_PULL_ALLOC_N(ndr, r->array, r->count);
1078 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1079 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1080 for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) {
1081 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
1083 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1084 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1086 if (ndr_flags & NDR_BUFFERS) {
1088 return NDR_ERR_SUCCESS;
1091 _PUBLIC_ void ndr_print_partialAttributeSetCtr1(struct ndr_print *ndr, const char *name, const struct partialAttributeSetCtr1 *r)
1093 uint32_t cntr_array_0;
1094 ndr_print_struct(ndr, name, "partialAttributeSetCtr1");
1095 ndr->depth++;
1096 ndr_print_uint32(ndr, "count", r->count);
1097 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
1098 ndr->depth++;
1099 for (cntr_array_0=0;cntr_array_0<r->count;cntr_array_0++) {
1100 char *idx_0=NULL;
1101 if (asprintf(&idx_0, "[%d]", cntr_array_0) != -1) {
1102 ndr_print_drsuapi_DsAttributeId(ndr, "array", r->array[cntr_array_0]);
1103 free(idx_0);
1106 ndr->depth--;
1107 ndr->depth--;
1110 static enum ndr_err_code ndr_push_partialAttributeSetCtr(struct ndr_push *ndr, int ndr_flags, const union partialAttributeSetCtr *r)
1112 if (ndr_flags & NDR_SCALARS) {
1113 int level = ndr_push_get_switch_value(ndr, r);
1114 NDR_CHECK(ndr_push_union_align(ndr, 4));
1115 switch (level) {
1116 case 1: {
1117 NDR_CHECK(ndr_push_partialAttributeSetCtr1(ndr, NDR_SCALARS, &r->ctr1));
1118 break; }
1120 default:
1121 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1124 if (ndr_flags & NDR_BUFFERS) {
1125 int level = ndr_push_get_switch_value(ndr, r);
1126 switch (level) {
1127 case 1:
1128 break;
1130 default:
1131 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1134 return NDR_ERR_SUCCESS;
1137 static enum ndr_err_code ndr_pull_partialAttributeSetCtr(struct ndr_pull *ndr, int ndr_flags, union partialAttributeSetCtr *r)
1139 int level;
1140 level = ndr_pull_get_switch_value(ndr, r);
1141 if (ndr_flags & NDR_SCALARS) {
1142 NDR_CHECK(ndr_pull_union_align(ndr, 4));
1143 switch (level) {
1144 case 1: {
1145 NDR_CHECK(ndr_pull_partialAttributeSetCtr1(ndr, NDR_SCALARS, &r->ctr1));
1146 break; }
1148 default:
1149 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1152 if (ndr_flags & NDR_BUFFERS) {
1153 switch (level) {
1154 case 1:
1155 break;
1157 default:
1158 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1161 return NDR_ERR_SUCCESS;
1164 _PUBLIC_ void ndr_print_partialAttributeSetCtr(struct ndr_print *ndr, const char *name, const union partialAttributeSetCtr *r)
1166 int level;
1167 level = ndr_print_get_switch_value(ndr, r);
1168 ndr_print_union(ndr, name, level, "partialAttributeSetCtr");
1169 switch (level) {
1170 case 1:
1171 ndr_print_partialAttributeSetCtr1(ndr, "ctr1", &r->ctr1);
1172 break;
1174 default:
1175 ndr_print_bad_level(ndr, name, level);
1179 _PUBLIC_ enum ndr_err_code ndr_push_partialAttributeSetBlob(struct ndr_push *ndr, int ndr_flags, const struct partialAttributeSetBlob *r)
1181 if (ndr_flags & NDR_SCALARS) {
1182 NDR_CHECK(ndr_push_align(ndr, 4));
1183 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
1184 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1185 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
1186 NDR_CHECK(ndr_push_partialAttributeSetCtr(ndr, NDR_SCALARS, &r->ctr));
1187 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1189 if (ndr_flags & NDR_BUFFERS) {
1191 return NDR_ERR_SUCCESS;
1194 _PUBLIC_ enum ndr_err_code ndr_pull_partialAttributeSetBlob(struct ndr_pull *ndr, int ndr_flags, struct partialAttributeSetBlob *r)
1196 if (ndr_flags & NDR_SCALARS) {
1197 NDR_CHECK(ndr_pull_align(ndr, 4));
1198 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
1199 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
1200 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
1201 NDR_CHECK(ndr_pull_partialAttributeSetCtr(ndr, NDR_SCALARS, &r->ctr));
1202 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1204 if (ndr_flags & NDR_BUFFERS) {
1206 return NDR_ERR_SUCCESS;
1209 _PUBLIC_ void ndr_print_partialAttributeSetBlob(struct ndr_print *ndr, const char *name, const struct partialAttributeSetBlob *r)
1211 ndr_print_struct(ndr, name, "partialAttributeSetBlob");
1212 ndr->depth++;
1213 ndr_print_uint32(ndr, "version", r->version);
1214 ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
1215 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
1216 ndr_print_partialAttributeSetCtr(ndr, "ctr", &r->ctr);
1217 ndr->depth--;
1220 static enum ndr_err_code ndr_push_drsuapi_MSPrefixMap_Entry(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_MSPrefixMap_Entry *r)
1223 uint32_t _flags_save_STRUCT = ndr->flags;
1224 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
1225 if (ndr_flags & NDR_SCALARS) {
1226 NDR_CHECK(ndr_push_align(ndr, 2));
1227 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->entryID));
1228 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
1229 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->binary_oid, r->length));
1230 NDR_CHECK(ndr_push_trailer_align(ndr, 2));
1232 if (ndr_flags & NDR_BUFFERS) {
1234 ndr->flags = _flags_save_STRUCT;
1236 return NDR_ERR_SUCCESS;
1239 static enum ndr_err_code ndr_pull_drsuapi_MSPrefixMap_Entry(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_MSPrefixMap_Entry *r)
1242 uint32_t _flags_save_STRUCT = ndr->flags;
1243 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
1244 if (ndr_flags & NDR_SCALARS) {
1245 NDR_CHECK(ndr_pull_align(ndr, 2));
1246 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->entryID));
1247 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
1248 NDR_PULL_ALLOC_N(ndr, r->binary_oid, r->length);
1249 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->binary_oid, r->length));
1250 NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
1252 if (ndr_flags & NDR_BUFFERS) {
1254 ndr->flags = _flags_save_STRUCT;
1256 return NDR_ERR_SUCCESS;
1259 _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_MSPrefixMap_Ctr(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_MSPrefixMap_Ctr *r)
1261 uint32_t cntr_entries_0;
1262 if (ndr_flags & NDR_SCALARS) {
1263 NDR_CHECK(ndr_push_align(ndr, 4));
1264 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_entries));
1265 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_MSPrefixMap_Ctr(r, ndr->iconv_convenience, ndr->flags)));
1266 for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
1267 NDR_CHECK(ndr_push_drsuapi_MSPrefixMap_Entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0]));
1269 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1271 if (ndr_flags & NDR_BUFFERS) {
1273 return NDR_ERR_SUCCESS;
1276 _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_MSPrefixMap_Ctr(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_MSPrefixMap_Ctr *r)
1278 uint32_t cntr_entries_0;
1279 TALLOC_CTX *_mem_save_entries_0;
1280 if (ndr_flags & NDR_SCALARS) {
1281 NDR_CHECK(ndr_pull_align(ndr, 4));
1282 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_entries));
1283 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
1284 NDR_PULL_ALLOC_N(ndr, r->entries, r->num_entries);
1285 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
1286 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
1287 for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
1288 NDR_CHECK(ndr_pull_drsuapi_MSPrefixMap_Entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0]));
1290 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
1291 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1293 if (ndr_flags & NDR_BUFFERS) {
1295 return NDR_ERR_SUCCESS;
1298 _PUBLIC_ void ndr_print_drsuapi_MSPrefixMap_Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_MSPrefixMap_Ctr *r)
1300 uint32_t cntr_entries_0;
1301 ndr_print_struct(ndr, name, "drsuapi_MSPrefixMap_Ctr");
1302 ndr->depth++;
1303 ndr_print_uint32(ndr, "num_entries", r->num_entries);
1304 ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_MSPrefixMap_Ctr(r, ndr->iconv_convenience, ndr->flags):r->__ndr_size);
1305 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->num_entries);
1306 ndr->depth++;
1307 for (cntr_entries_0=0;cntr_entries_0<r->num_entries;cntr_entries_0++) {
1308 char *idx_0=NULL;
1309 if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) {
1310 ndr_print_drsuapi_MSPrefixMap_Entry(ndr, "entries", &r->entries[cntr_entries_0]);
1311 free(idx_0);
1314 ndr->depth--;
1315 ndr->depth--;
1318 _PUBLIC_ size_t ndr_size_drsuapi_MSPrefixMap_Ctr(const struct drsuapi_MSPrefixMap_Ctr *r, struct smb_iconv_convenience *ic, int flags)
1320 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_MSPrefixMap_Ctr, ic);
1323 static enum ndr_err_code ndr_push_prefixMapVersion(struct ndr_push *ndr, int ndr_flags, enum prefixMapVersion r)
1325 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1326 return NDR_ERR_SUCCESS;
1329 static enum ndr_err_code ndr_pull_prefixMapVersion(struct ndr_pull *ndr, int ndr_flags, enum prefixMapVersion *r)
1331 uint32_t v;
1332 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1333 *r = v;
1334 return NDR_ERR_SUCCESS;
1337 _PUBLIC_ void ndr_print_prefixMapVersion(struct ndr_print *ndr, const char *name, enum prefixMapVersion r)
1339 const char *val = NULL;
1341 switch (r) {
1342 case PREFIX_MAP_VERSION_DSDB: val = "PREFIX_MAP_VERSION_DSDB"; break;
1344 ndr_print_enum(ndr, name, "ENUM", val, r);
1347 static enum ndr_err_code ndr_push_prefixMapCtr(struct ndr_push *ndr, int ndr_flags, const union prefixMapCtr *r)
1349 if (ndr_flags & NDR_SCALARS) {
1350 int level = ndr_push_get_switch_value(ndr, r);
1351 NDR_CHECK(ndr_push_union_align(ndr, 5));
1352 switch (level) {
1353 case PREFIX_MAP_VERSION_DSDB: {
1354 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->dsdb));
1355 break; }
1357 default:
1358 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1361 if (ndr_flags & NDR_BUFFERS) {
1362 int level = ndr_push_get_switch_value(ndr, r);
1363 switch (level) {
1364 case PREFIX_MAP_VERSION_DSDB:
1365 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->dsdb));
1366 break;
1368 default:
1369 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1372 return NDR_ERR_SUCCESS;
1375 static enum ndr_err_code ndr_pull_prefixMapCtr(struct ndr_pull *ndr, int ndr_flags, union prefixMapCtr *r)
1377 int level;
1378 level = ndr_pull_get_switch_value(ndr, r);
1379 if (ndr_flags & NDR_SCALARS) {
1380 NDR_CHECK(ndr_pull_union_align(ndr, 5));
1381 switch (level) {
1382 case PREFIX_MAP_VERSION_DSDB: {
1383 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->dsdb));
1384 break; }
1386 default:
1387 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1390 if (ndr_flags & NDR_BUFFERS) {
1391 switch (level) {
1392 case PREFIX_MAP_VERSION_DSDB:
1393 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->dsdb));
1394 break;
1396 default:
1397 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1400 return NDR_ERR_SUCCESS;
1403 _PUBLIC_ void ndr_print_prefixMapCtr(struct ndr_print *ndr, const char *name, const union prefixMapCtr *r)
1405 int level;
1406 level = ndr_print_get_switch_value(ndr, r);
1407 ndr_print_union(ndr, name, level, "prefixMapCtr");
1408 switch (level) {
1409 case PREFIX_MAP_VERSION_DSDB:
1410 ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "dsdb", &r->dsdb);
1411 break;
1413 default:
1414 ndr_print_bad_level(ndr, name, level);
1418 _PUBLIC_ enum ndr_err_code ndr_push_prefixMapBlob(struct ndr_push *ndr, int ndr_flags, const struct prefixMapBlob *r)
1420 if (ndr_flags & NDR_SCALARS) {
1421 NDR_CHECK(ndr_push_align(ndr, 5));
1422 NDR_CHECK(ndr_push_prefixMapVersion(ndr, NDR_SCALARS, r->version));
1423 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1424 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
1425 NDR_CHECK(ndr_push_prefixMapCtr(ndr, NDR_SCALARS, &r->ctr));
1426 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1428 if (ndr_flags & NDR_BUFFERS) {
1429 NDR_CHECK(ndr_push_prefixMapCtr(ndr, NDR_BUFFERS, &r->ctr));
1431 return NDR_ERR_SUCCESS;
1434 _PUBLIC_ enum ndr_err_code ndr_pull_prefixMapBlob(struct ndr_pull *ndr, int ndr_flags, struct prefixMapBlob *r)
1436 if (ndr_flags & NDR_SCALARS) {
1437 NDR_CHECK(ndr_pull_align(ndr, 5));
1438 NDR_CHECK(ndr_pull_prefixMapVersion(ndr, NDR_SCALARS, &r->version));
1439 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
1440 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
1441 NDR_CHECK(ndr_pull_prefixMapCtr(ndr, NDR_SCALARS, &r->ctr));
1442 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1444 if (ndr_flags & NDR_BUFFERS) {
1445 NDR_CHECK(ndr_pull_prefixMapCtr(ndr, NDR_BUFFERS, &r->ctr));
1447 return NDR_ERR_SUCCESS;
1450 _PUBLIC_ void ndr_print_prefixMapBlob(struct ndr_print *ndr, const char *name, const struct prefixMapBlob *r)
1452 ndr_print_struct(ndr, name, "prefixMapBlob");
1453 ndr->depth++;
1454 ndr_print_prefixMapVersion(ndr, "version", r->version);
1455 ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
1456 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
1457 ndr_print_prefixMapCtr(ndr, "ctr", &r->ctr);
1458 ndr->depth--;
1461 static enum ndr_err_code ndr_push_ldapControlDirSyncExtra(struct ndr_push *ndr, int ndr_flags, const union ldapControlDirSyncExtra *r)
1463 if (ndr_flags & NDR_SCALARS) {
1464 int level = ndr_push_get_switch_value(ndr, r);
1465 NDR_CHECK(ndr_push_union_align(ndr, 8));
1466 switch (level) {
1467 case 0: {
1468 break; }
1470 default: {
1471 NDR_CHECK(ndr_push_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->uptodateness_vector));
1472 break; }
1476 if (ndr_flags & NDR_BUFFERS) {
1477 int level = ndr_push_get_switch_value(ndr, r);
1478 switch (level) {
1479 case 0:
1480 break;
1482 default:
1483 break;
1487 return NDR_ERR_SUCCESS;
1490 static enum ndr_err_code ndr_pull_ldapControlDirSyncExtra(struct ndr_pull *ndr, int ndr_flags, union ldapControlDirSyncExtra *r)
1492 int level;
1493 level = ndr_pull_get_switch_value(ndr, r);
1494 if (ndr_flags & NDR_SCALARS) {
1495 NDR_CHECK(ndr_pull_union_align(ndr, 8));
1496 switch (level) {
1497 case 0: {
1498 break; }
1500 default: {
1501 NDR_CHECK(ndr_pull_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->uptodateness_vector));
1502 break; }
1506 if (ndr_flags & NDR_BUFFERS) {
1507 switch (level) {
1508 case 0:
1509 break;
1511 default:
1512 break;
1516 return NDR_ERR_SUCCESS;
1519 _PUBLIC_ void ndr_print_ldapControlDirSyncExtra(struct ndr_print *ndr, const char *name, const union ldapControlDirSyncExtra *r)
1521 int level;
1522 level = ndr_print_get_switch_value(ndr, r);
1523 ndr_print_union(ndr, name, level, "ldapControlDirSyncExtra");
1524 switch (level) {
1525 case 0:
1526 break;
1528 default:
1529 ndr_print_replUpToDateVectorBlob(ndr, "uptodateness_vector", &r->uptodateness_vector);
1530 break;
1535 static size_t ndr_size_ldapControlDirSyncExtra(const union ldapControlDirSyncExtra *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
1537 return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_ldapControlDirSyncExtra, ic);
1540 static enum ndr_err_code ndr_push_ldapControlDirSyncBlob(struct ndr_push *ndr, int ndr_flags, const struct ldapControlDirSyncBlob *r)
1542 if (ndr_flags & NDR_SCALARS) {
1543 NDR_CHECK(ndr_push_align(ndr, 8));
1544 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 3));
1545 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time));
1546 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u2));
1547 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u3));
1548 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, ndr->iconv_convenience, 0)));
1549 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
1550 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid1));
1551 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->extra, ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, ndr->iconv_convenience, 0)));
1552 NDR_CHECK(ndr_push_ldapControlDirSyncExtra(ndr, NDR_SCALARS, &r->extra));
1553 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
1555 if (ndr_flags & NDR_BUFFERS) {
1556 NDR_CHECK(ndr_push_ldapControlDirSyncExtra(ndr, NDR_BUFFERS, &r->extra));
1558 return NDR_ERR_SUCCESS;
1561 static enum ndr_err_code ndr_pull_ldapControlDirSyncBlob(struct ndr_pull *ndr, int ndr_flags, struct ldapControlDirSyncBlob *r)
1563 if (ndr_flags & NDR_SCALARS) {
1564 NDR_CHECK(ndr_pull_align(ndr, 8));
1565 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u1));
1566 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time));
1567 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u2));
1568 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u3));
1569 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->extra_length));
1570 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
1571 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid1));
1572 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->extra, r->extra_length));
1573 NDR_CHECK(ndr_pull_ldapControlDirSyncExtra(ndr, NDR_SCALARS, &r->extra));
1574 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
1576 if (ndr_flags & NDR_BUFFERS) {
1577 NDR_CHECK(ndr_pull_ldapControlDirSyncExtra(ndr, NDR_BUFFERS, &r->extra));
1579 return NDR_ERR_SUCCESS;
1582 _PUBLIC_ void ndr_print_ldapControlDirSyncBlob(struct ndr_print *ndr, const char *name, const struct ldapControlDirSyncBlob *r)
1584 ndr_print_struct(ndr, name, "ldapControlDirSyncBlob");
1585 ndr->depth++;
1586 ndr_print_uint32(ndr, "u1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?3:r->u1);
1587 ndr_print_NTTIME(ndr, "time", r->time);
1588 ndr_print_uint32(ndr, "u2", r->u2);
1589 ndr_print_uint32(ndr, "u3", r->u3);
1590 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);
1591 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
1592 ndr_print_GUID(ndr, "guid1", &r->guid1);
1593 ndr_print_set_switch_value(ndr, &r->extra, r->extra_length);
1594 ndr_print_ldapControlDirSyncExtra(ndr, "extra", &r->extra);
1595 ndr->depth--;
1598 _PUBLIC_ enum ndr_err_code ndr_push_ldapControlDirSyncCookie(struct ndr_push *ndr, int ndr_flags, const struct ldapControlDirSyncCookie *r)
1600 uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
1601 if (ndr_flags & NDR_SCALARS) {
1602 NDR_CHECK(ndr_push_align(ndr, 8));
1603 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
1604 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "MSDS", 4, sizeof(uint8_t), CH_DOS));
1606 struct ndr_push *_ndr_blob;
1607 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_blob, 0, -1));
1608 NDR_CHECK(ndr_push_ldapControlDirSyncBlob(_ndr_blob, NDR_SCALARS|NDR_BUFFERS, &r->blob));
1609 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_blob, 0, -1));
1611 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
1613 if (ndr_flags & NDR_BUFFERS) {
1614 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
1616 ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
1617 return NDR_ERR_SUCCESS;
1620 _PUBLIC_ enum ndr_err_code ndr_pull_ldapControlDirSyncCookie(struct ndr_pull *ndr, int ndr_flags, struct ldapControlDirSyncCookie *r)
1622 uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
1623 if (ndr_flags & NDR_SCALARS) {
1624 NDR_CHECK(ndr_pull_align(ndr, 8));
1625 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
1626 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->msds, 4, sizeof(uint8_t), CH_DOS));
1628 struct ndr_pull *_ndr_blob;
1629 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_blob, 0, -1));
1630 NDR_CHECK(ndr_pull_ldapControlDirSyncBlob(_ndr_blob, NDR_SCALARS|NDR_BUFFERS, &r->blob));
1631 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_blob, 0, -1));
1633 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
1635 if (ndr_flags & NDR_BUFFERS) {
1636 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
1638 ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
1639 return NDR_ERR_SUCCESS;
1642 _PUBLIC_ void ndr_print_ldapControlDirSyncCookie(struct ndr_print *ndr, const char *name, const struct ldapControlDirSyncCookie *r)
1644 ndr_print_struct(ndr, name, "ldapControlDirSyncCookie");
1645 ndr->depth++;
1646 ndr_print_string(ndr, "msds", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"MSDS":r->msds);
1647 ndr_print_ldapControlDirSyncBlob(ndr, "blob", &r->blob);
1648 ndr->depth--;
1651 static enum ndr_err_code ndr_push_supplementalCredentialsPackage(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsPackage *r)
1653 if (ndr_flags & NDR_SCALARS) {
1654 NDR_CHECK(ndr_push_align(ndr, 2));
1655 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->name)));
1656 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen(r->data)));
1657 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved));
1658 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, 2 * strlen_m(r->name), sizeof(uint8_t), CH_UTF16));
1659 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data, strlen(r->data), sizeof(uint8_t), CH_DOS));
1660 NDR_CHECK(ndr_push_trailer_align(ndr, 2));
1662 if (ndr_flags & NDR_BUFFERS) {
1664 return NDR_ERR_SUCCESS;
1667 static enum ndr_err_code ndr_pull_supplementalCredentialsPackage(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsPackage *r)
1669 if (ndr_flags & NDR_SCALARS) {
1670 NDR_CHECK(ndr_pull_align(ndr, 2));
1671 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->name_len));
1672 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->data_len));
1673 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
1674 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, r->name_len, sizeof(uint8_t), CH_UTF16));
1675 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data, r->data_len, sizeof(uint8_t), CH_DOS));
1676 NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
1678 if (ndr_flags & NDR_BUFFERS) {
1680 return NDR_ERR_SUCCESS;
1683 _PUBLIC_ void ndr_print_supplementalCredentialsPackage(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsPackage *r)
1685 ndr_print_struct(ndr, name, "supplementalCredentialsPackage");
1686 ndr->depth++;
1687 ndr_print_uint16(ndr, "name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->name):r->name_len);
1688 ndr_print_uint16(ndr, "data_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->data):r->data_len);
1689 ndr_print_uint16(ndr, "reserved", r->reserved);
1690 ndr_print_string(ndr, "name", r->name);
1691 ndr_print_string(ndr, "data", r->data);
1692 ndr->depth--;
1695 static enum ndr_err_code ndr_push_supplementalCredentialsSignature(struct ndr_push *ndr, int ndr_flags, enum supplementalCredentialsSignature r)
1698 uint32_t _flags_save_ENUM = ndr->flags;
1699 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1700 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
1701 ndr->flags = _flags_save_ENUM;
1703 return NDR_ERR_SUCCESS;
1706 static enum ndr_err_code ndr_pull_supplementalCredentialsSignature(struct ndr_pull *ndr, int ndr_flags, enum supplementalCredentialsSignature *r)
1708 uint16_t v;
1710 uint32_t _flags_save_ENUM = ndr->flags;
1711 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1712 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
1713 *r = v;
1714 ndr->flags = _flags_save_ENUM;
1716 return NDR_ERR_SUCCESS;
1719 _PUBLIC_ void ndr_print_supplementalCredentialsSignature(struct ndr_print *ndr, const char *name, enum supplementalCredentialsSignature r)
1721 const char *val = NULL;
1724 uint32_t _flags_save_ENUM = ndr->flags;
1725 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1726 switch (r) {
1727 case SUPPLEMENTAL_CREDENTIALS_SIGNATURE: val = "SUPPLEMENTAL_CREDENTIALS_SIGNATURE"; break;
1729 ndr_print_enum(ndr, name, "ENUM", val, r);
1730 ndr->flags = _flags_save_ENUM;
1734 static enum ndr_err_code ndr_push_supplementalCredentialsSubBlob(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsSubBlob *r)
1736 uint32_t cntr_packages_0;
1737 if (ndr_flags & NDR_SCALARS) {
1738 NDR_CHECK(ndr_push_align(ndr, 3));
1739 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, SUPPLEMENTAL_CREDENTIALS_PREFIX, 0x30, sizeof(uint16_t), CH_UTF16));
1740 NDR_CHECK(ndr_push_supplementalCredentialsSignature(ndr, NDR_SCALARS, SUPPLEMENTAL_CREDENTIALS_SIGNATURE));
1741 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_packages));
1742 for (cntr_packages_0 = 0; cntr_packages_0 < r->num_packages; cntr_packages_0++) {
1743 NDR_CHECK(ndr_push_supplementalCredentialsPackage(ndr, NDR_SCALARS, &r->packages[cntr_packages_0]));
1745 NDR_CHECK(ndr_push_trailer_align(ndr, 3));
1747 if (ndr_flags & NDR_BUFFERS) {
1749 return NDR_ERR_SUCCESS;
1752 static enum ndr_err_code ndr_pull_supplementalCredentialsSubBlob(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsSubBlob *r)
1754 uint32_t cntr_packages_0;
1755 TALLOC_CTX *_mem_save_packages_0;
1756 if (ndr_flags & NDR_SCALARS) {
1757 NDR_CHECK(ndr_pull_align(ndr, 3));
1758 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->prefix, 0x30, sizeof(uint16_t), CH_UTF16));
1759 NDR_CHECK(ndr_pull_supplementalCredentialsSignature(ndr, NDR_SCALARS, &r->signature));
1760 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_packages));
1761 NDR_PULL_ALLOC_N(ndr, r->packages, r->num_packages);
1762 _mem_save_packages_0 = NDR_PULL_GET_MEM_CTX(ndr);
1763 NDR_PULL_SET_MEM_CTX(ndr, r->packages, 0);
1764 for (cntr_packages_0 = 0; cntr_packages_0 < r->num_packages; cntr_packages_0++) {
1765 NDR_CHECK(ndr_pull_supplementalCredentialsPackage(ndr, NDR_SCALARS, &r->packages[cntr_packages_0]));
1767 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_packages_0, 0);
1768 NDR_CHECK(ndr_pull_trailer_align(ndr, 3));
1770 if (ndr_flags & NDR_BUFFERS) {
1772 return NDR_ERR_SUCCESS;
1775 _PUBLIC_ void ndr_print_supplementalCredentialsSubBlob(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsSubBlob *r)
1777 uint32_t cntr_packages_0;
1778 ndr_print_struct(ndr, name, "supplementalCredentialsSubBlob");
1779 ndr->depth++;
1780 ndr_print_string(ndr, "prefix", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?SUPPLEMENTAL_CREDENTIALS_PREFIX:r->prefix);
1781 ndr_print_supplementalCredentialsSignature(ndr, "signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?SUPPLEMENTAL_CREDENTIALS_SIGNATURE:r->signature);
1782 ndr_print_uint16(ndr, "num_packages", r->num_packages);
1783 ndr->print(ndr, "%s: ARRAY(%d)", "packages", (int)r->num_packages);
1784 ndr->depth++;
1785 for (cntr_packages_0=0;cntr_packages_0<r->num_packages;cntr_packages_0++) {
1786 char *idx_0=NULL;
1787 if (asprintf(&idx_0, "[%d]", cntr_packages_0) != -1) {
1788 ndr_print_supplementalCredentialsPackage(ndr, "packages", &r->packages[cntr_packages_0]);
1789 free(idx_0);
1792 ndr->depth--;
1793 ndr->depth--;
1796 static size_t ndr_size_supplementalCredentialsSubBlob(const struct supplementalCredentialsSubBlob *r, struct smb_iconv_convenience *ic, int flags)
1798 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_supplementalCredentialsSubBlob, ic);
1801 _PUBLIC_ enum ndr_err_code ndr_push_supplementalCredentialsBlob(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsBlob *r)
1803 if (ndr_flags & NDR_SCALARS) {
1804 NDR_CHECK(ndr_push_align(ndr, 4));
1805 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1806 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags)));
1807 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1809 struct ndr_push *_ndr_sub;
1810 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags)));
1811 NDR_CHECK(ndr_push_supplementalCredentialsSubBlob(_ndr_sub, NDR_SCALARS, &r->sub));
1812 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags)));
1814 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0));
1815 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1817 if (ndr_flags & NDR_BUFFERS) {
1819 return NDR_ERR_SUCCESS;
1822 _PUBLIC_ enum ndr_err_code ndr_pull_supplementalCredentialsBlob(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsBlob *r)
1824 if (ndr_flags & NDR_SCALARS) {
1825 NDR_CHECK(ndr_pull_align(ndr, 4));
1826 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
1827 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
1828 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
1830 struct ndr_pull *_ndr_sub;
1831 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sub, 0, r->__ndr_size));
1832 NDR_CHECK(ndr_pull_supplementalCredentialsSubBlob(_ndr_sub, NDR_SCALARS, &r->sub));
1833 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sub, 0, r->__ndr_size));
1835 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown3));
1836 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1838 if (ndr_flags & NDR_BUFFERS) {
1840 return NDR_ERR_SUCCESS;
1843 _PUBLIC_ void ndr_print_supplementalCredentialsBlob(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsBlob *r)
1845 ndr_print_struct(ndr, name, "supplementalCredentialsBlob");
1846 ndr->depth++;
1847 ndr_print_uint32(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown1);
1848 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);
1849 ndr_print_uint32(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown2);
1850 ndr_print_supplementalCredentialsSubBlob(ndr, "sub", &r->sub);
1851 ndr_print_uint8(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown3);
1852 ndr->depth--;
1855 _PUBLIC_ enum ndr_err_code ndr_push_package_PackagesBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PackagesBlob *r)
1857 if (ndr_flags & NDR_SCALARS) {
1858 NDR_CHECK(ndr_push_align(ndr, 4));
1860 uint32_t _flags_save_string_array = ndr->flags;
1861 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1862 NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->names));
1863 ndr->flags = _flags_save_string_array;
1865 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1867 if (ndr_flags & NDR_BUFFERS) {
1869 return NDR_ERR_SUCCESS;
1872 _PUBLIC_ enum ndr_err_code ndr_pull_package_PackagesBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PackagesBlob *r)
1874 if (ndr_flags & NDR_SCALARS) {
1875 NDR_CHECK(ndr_pull_align(ndr, 4));
1877 uint32_t _flags_save_string_array = ndr->flags;
1878 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1879 NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->names));
1880 ndr->flags = _flags_save_string_array;
1882 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1884 if (ndr_flags & NDR_BUFFERS) {
1886 return NDR_ERR_SUCCESS;
1889 _PUBLIC_ void ndr_print_package_PackagesBlob(struct ndr_print *ndr, const char *name, const struct package_PackagesBlob *r)
1891 ndr_print_struct(ndr, name, "package_PackagesBlob");
1892 ndr->depth++;
1893 ndr_print_string_array(ndr, "names", r->names);
1894 ndr->depth--;
1897 static enum ndr_err_code ndr_push_package_PrimaryKerberosString(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosString *r)
1899 if (ndr_flags & NDR_SCALARS) {
1900 NDR_CHECK(ndr_push_align(ndr, 5));
1901 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
1902 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
1904 uint32_t _flags_save_string = ndr->flags;
1905 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1906 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->string));
1907 ndr->flags = _flags_save_string;
1909 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1911 if (ndr_flags & NDR_BUFFERS) {
1913 uint32_t _flags_save_string = ndr->flags;
1914 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1915 if (r->string) {
1916 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->string));
1918 struct ndr_push *_ndr_string;
1919 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_string, 0, 2 * strlen_m(r->string)));
1920 NDR_CHECK(ndr_push_string(_ndr_string, NDR_SCALARS, r->string));
1921 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_string, 0, 2 * strlen_m(r->string)));
1923 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->string));
1925 ndr->flags = _flags_save_string;
1928 return NDR_ERR_SUCCESS;
1931 static enum ndr_err_code ndr_pull_package_PrimaryKerberosString(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosString *r)
1933 uint32_t _ptr_string;
1934 TALLOC_CTX *_mem_save_string_0;
1935 if (ndr_flags & NDR_SCALARS) {
1936 NDR_CHECK(ndr_pull_align(ndr, 5));
1937 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
1938 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
1940 uint32_t _flags_save_string = ndr->flags;
1941 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1942 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
1943 if (_ptr_string) {
1944 NDR_PULL_ALLOC(ndr, r->string);
1945 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->string, _ptr_string));
1946 } else {
1947 r->string = NULL;
1949 ndr->flags = _flags_save_string;
1951 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1953 if (ndr_flags & NDR_BUFFERS) {
1955 uint32_t _flags_save_string = ndr->flags;
1956 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1957 if (r->string) {
1958 uint32_t _relative_save_offset;
1959 _relative_save_offset = ndr->offset;
1960 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->string));
1961 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
1962 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
1964 struct ndr_pull *_ndr_string;
1965 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_string, 0, r->size));
1966 NDR_CHECK(ndr_pull_string(_ndr_string, NDR_SCALARS, &r->string));
1967 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_string, 0, r->size));
1969 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
1970 if (ndr->offset > ndr->relative_highest_offset) {
1971 ndr->relative_highest_offset = ndr->offset;
1973 ndr->offset = _relative_save_offset;
1975 ndr->flags = _flags_save_string;
1978 return NDR_ERR_SUCCESS;
1981 _PUBLIC_ void ndr_print_package_PrimaryKerberosString(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosString *r)
1983 ndr_print_struct(ndr, name, "package_PrimaryKerberosString");
1984 ndr->depth++;
1985 ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length);
1986 ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->size);
1987 ndr_print_ptr(ndr, "string", r->string);
1988 ndr->depth++;
1989 if (r->string) {
1990 ndr_print_string(ndr, "string", r->string);
1992 ndr->depth--;
1993 ndr->depth--;
1996 static enum ndr_err_code ndr_push_package_PrimaryKerberosKey3(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosKey3 *r)
1998 if (ndr_flags & NDR_SCALARS) {
1999 NDR_CHECK(ndr_push_align(ndr, 5));
2000 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
2001 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
2002 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2003 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->keytype));
2004 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (r->value?r->value->length:0)));
2006 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2007 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2008 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value));
2009 ndr->flags = _flags_save_DATA_BLOB;
2011 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2013 if (ndr_flags & NDR_BUFFERS) {
2015 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2016 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2017 if (r->value) {
2018 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->value));
2020 struct ndr_push *_ndr_value;
2021 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_value, 0, (r->value?r->value->length:0)));
2022 NDR_CHECK(ndr_push_DATA_BLOB(_ndr_value, NDR_SCALARS, *r->value));
2023 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_value, 0, (r->value?r->value->length:0)));
2025 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->value));
2027 ndr->flags = _flags_save_DATA_BLOB;
2030 return NDR_ERR_SUCCESS;
2033 static enum ndr_err_code ndr_pull_package_PrimaryKerberosKey3(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosKey3 *r)
2035 uint32_t _ptr_value;
2036 TALLOC_CTX *_mem_save_value_0;
2037 if (ndr_flags & NDR_SCALARS) {
2038 NDR_CHECK(ndr_pull_align(ndr, 5));
2039 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved1));
2040 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved2));
2041 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3));
2042 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->keytype));
2043 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_len));
2045 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2046 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2047 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
2048 if (_ptr_value) {
2049 NDR_PULL_ALLOC(ndr, r->value);
2050 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value, _ptr_value));
2051 } else {
2052 r->value = NULL;
2054 ndr->flags = _flags_save_DATA_BLOB;
2056 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2058 if (ndr_flags & NDR_BUFFERS) {
2060 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2061 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2062 if (r->value) {
2063 uint32_t _relative_save_offset;
2064 _relative_save_offset = ndr->offset;
2065 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value));
2066 _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
2067 NDR_PULL_SET_MEM_CTX(ndr, r->value, 0);
2069 struct ndr_pull *_ndr_value;
2070 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_value, 0, r->value_len));
2071 NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_value, NDR_SCALARS, r->value));
2072 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_value, 0, r->value_len));
2074 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
2075 if (ndr->offset > ndr->relative_highest_offset) {
2076 ndr->relative_highest_offset = ndr->offset;
2078 ndr->offset = _relative_save_offset;
2080 ndr->flags = _flags_save_DATA_BLOB;
2083 return NDR_ERR_SUCCESS;
2086 _PUBLIC_ void ndr_print_package_PrimaryKerberosKey3(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosKey3 *r)
2088 ndr_print_struct(ndr, name, "package_PrimaryKerberosKey3");
2089 ndr->depth++;
2090 ndr_print_uint16(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
2091 ndr_print_uint16(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2);
2092 ndr_print_uint32(ndr, "reserved3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved3);
2093 ndr_print_uint32(ndr, "keytype", r->keytype);
2094 ndr_print_uint32(ndr, "value_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(r->value?r->value->length:0):r->value_len);
2095 ndr_print_ptr(ndr, "value", r->value);
2096 ndr->depth++;
2097 if (r->value) {
2098 ndr_print_DATA_BLOB(ndr, "value", *r->value);
2100 ndr->depth--;
2101 ndr->depth--;
2104 static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr3(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosCtr3 *r)
2106 uint32_t cntr_keys_0;
2107 uint32_t cntr_old_keys_0;
2108 if (ndr_flags & NDR_SCALARS) {
2109 NDR_CHECK(ndr_push_align(ndr, 5));
2110 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_keys));
2111 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_old_keys));
2112 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
2113 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
2114 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
2116 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
2117 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
2119 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2120 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2121 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2122 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2123 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2124 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2126 if (ndr_flags & NDR_BUFFERS) {
2127 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
2128 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
2129 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
2131 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
2132 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
2135 return NDR_ERR_SUCCESS;
2138 static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr3(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosCtr3 *r)
2140 uint32_t cntr_keys_0;
2141 TALLOC_CTX *_mem_save_keys_0;
2142 uint32_t cntr_old_keys_0;
2143 TALLOC_CTX *_mem_save_old_keys_0;
2144 if (ndr_flags & NDR_SCALARS) {
2145 NDR_CHECK(ndr_pull_align(ndr, 5));
2146 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_keys));
2147 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_old_keys));
2148 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
2149 NDR_PULL_ALLOC_N(ndr, r->keys, r->num_keys);
2150 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2151 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
2152 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
2153 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
2155 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
2156 NDR_PULL_ALLOC_N(ndr, r->old_keys, r->num_old_keys);
2157 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2158 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
2159 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
2160 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
2162 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
2163 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding1));
2164 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding2));
2165 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding3));
2166 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding4));
2167 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding5));
2168 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2170 if (ndr_flags & NDR_BUFFERS) {
2171 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
2172 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2173 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
2174 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
2175 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
2177 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
2178 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2179 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
2180 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
2181 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
2183 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
2185 return NDR_ERR_SUCCESS;
2188 _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr3(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosCtr3 *r)
2190 uint32_t cntr_keys_0;
2191 uint32_t cntr_old_keys_0;
2192 ndr_print_struct(ndr, name, "package_PrimaryKerberosCtr3");
2193 ndr->depth++;
2194 ndr_print_uint16(ndr, "num_keys", r->num_keys);
2195 ndr_print_uint16(ndr, "num_old_keys", r->num_old_keys);
2196 ndr_print_package_PrimaryKerberosString(ndr, "salt", &r->salt);
2197 ndr->print(ndr, "%s: ARRAY(%d)", "keys", (int)r->num_keys);
2198 ndr->depth++;
2199 for (cntr_keys_0=0;cntr_keys_0<r->num_keys;cntr_keys_0++) {
2200 char *idx_0=NULL;
2201 if (asprintf(&idx_0, "[%d]", cntr_keys_0) != -1) {
2202 ndr_print_package_PrimaryKerberosKey3(ndr, "keys", &r->keys[cntr_keys_0]);
2203 free(idx_0);
2206 ndr->depth--;
2207 ndr->print(ndr, "%s: ARRAY(%d)", "old_keys", (int)r->num_old_keys);
2208 ndr->depth++;
2209 for (cntr_old_keys_0=0;cntr_old_keys_0<r->num_old_keys;cntr_old_keys_0++) {
2210 char *idx_0=NULL;
2211 if (asprintf(&idx_0, "[%d]", cntr_old_keys_0) != -1) {
2212 ndr_print_package_PrimaryKerberosKey3(ndr, "old_keys", &r->old_keys[cntr_old_keys_0]);
2213 free(idx_0);
2216 ndr->depth--;
2217 ndr_print_uint32(ndr, "padding1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding1);
2218 ndr_print_uint32(ndr, "padding2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding2);
2219 ndr_print_uint32(ndr, "padding3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding3);
2220 ndr_print_uint32(ndr, "padding4", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding4);
2221 ndr_print_uint32(ndr, "padding5", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding5);
2222 ndr->depth--;
2225 static enum ndr_err_code ndr_push_package_PrimaryKerberosKey4(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosKey4 *r)
2227 if (ndr_flags & NDR_SCALARS) {
2228 NDR_CHECK(ndr_push_align(ndr, 5));
2229 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
2230 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
2231 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2232 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->iteration_count));
2233 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->keytype));
2234 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (r->value?r->value->length:0)));
2236 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2237 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2238 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value));
2239 ndr->flags = _flags_save_DATA_BLOB;
2241 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2243 if (ndr_flags & NDR_BUFFERS) {
2245 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2246 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2247 if (r->value) {
2248 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->value));
2250 struct ndr_push *_ndr_value;
2251 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_value, 0, (r->value?r->value->length:0)));
2252 NDR_CHECK(ndr_push_DATA_BLOB(_ndr_value, NDR_SCALARS, *r->value));
2253 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_value, 0, (r->value?r->value->length:0)));
2255 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->value));
2257 ndr->flags = _flags_save_DATA_BLOB;
2260 return NDR_ERR_SUCCESS;
2263 static enum ndr_err_code ndr_pull_package_PrimaryKerberosKey4(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosKey4 *r)
2265 uint32_t _ptr_value;
2266 TALLOC_CTX *_mem_save_value_0;
2267 if (ndr_flags & NDR_SCALARS) {
2268 NDR_CHECK(ndr_pull_align(ndr, 5));
2269 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved1));
2270 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved2));
2271 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3));
2272 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->iteration_count));
2273 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->keytype));
2274 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_len));
2276 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2277 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2278 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
2279 if (_ptr_value) {
2280 NDR_PULL_ALLOC(ndr, r->value);
2281 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value, _ptr_value));
2282 } else {
2283 r->value = NULL;
2285 ndr->flags = _flags_save_DATA_BLOB;
2287 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2289 if (ndr_flags & NDR_BUFFERS) {
2291 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2292 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2293 if (r->value) {
2294 uint32_t _relative_save_offset;
2295 _relative_save_offset = ndr->offset;
2296 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value));
2297 _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
2298 NDR_PULL_SET_MEM_CTX(ndr, r->value, 0);
2300 struct ndr_pull *_ndr_value;
2301 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_value, 0, r->value_len));
2302 NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_value, NDR_SCALARS, r->value));
2303 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_value, 0, r->value_len));
2305 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
2306 if (ndr->offset > ndr->relative_highest_offset) {
2307 ndr->relative_highest_offset = ndr->offset;
2309 ndr->offset = _relative_save_offset;
2311 ndr->flags = _flags_save_DATA_BLOB;
2314 return NDR_ERR_SUCCESS;
2317 _PUBLIC_ void ndr_print_package_PrimaryKerberosKey4(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosKey4 *r)
2319 ndr_print_struct(ndr, name, "package_PrimaryKerberosKey4");
2320 ndr->depth++;
2321 ndr_print_uint16(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
2322 ndr_print_uint16(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2);
2323 ndr_print_uint32(ndr, "reserved3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved3);
2324 ndr_print_uint32(ndr, "iteration_count", r->iteration_count);
2325 ndr_print_uint32(ndr, "keytype", r->keytype);
2326 ndr_print_uint32(ndr, "value_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(r->value?r->value->length:0):r->value_len);
2327 ndr_print_ptr(ndr, "value", r->value);
2328 ndr->depth++;
2329 if (r->value) {
2330 ndr_print_DATA_BLOB(ndr, "value", *r->value);
2332 ndr->depth--;
2333 ndr->depth--;
2336 static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr4(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosCtr4 *r)
2338 uint32_t cntr_keys_0;
2339 uint32_t cntr_old_keys_0;
2340 uint32_t cntr_older_keys_0;
2341 if (ndr_flags & NDR_SCALARS) {
2342 NDR_CHECK(ndr_push_align(ndr, 5));
2343 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_keys));
2344 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
2345 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_old_keys));
2346 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_older_keys));
2347 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
2348 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->default_iteration_count));
2349 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
2350 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
2352 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
2353 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
2355 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
2356 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->older_keys[cntr_older_keys_0]));
2358 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2360 if (ndr_flags & NDR_BUFFERS) {
2361 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
2362 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
2363 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
2365 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
2366 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
2368 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
2369 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->older_keys[cntr_older_keys_0]));
2372 return NDR_ERR_SUCCESS;
2375 static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr4(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosCtr4 *r)
2377 uint32_t cntr_keys_0;
2378 TALLOC_CTX *_mem_save_keys_0;
2379 uint32_t cntr_service_keys_0;
2380 TALLOC_CTX *_mem_save_service_keys_0;
2381 uint32_t cntr_old_keys_0;
2382 TALLOC_CTX *_mem_save_old_keys_0;
2383 uint32_t cntr_older_keys_0;
2384 TALLOC_CTX *_mem_save_older_keys_0;
2385 if (ndr_flags & NDR_SCALARS) {
2386 NDR_CHECK(ndr_pull_align(ndr, 5));
2387 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_keys));
2388 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_service_keys));
2389 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_old_keys));
2390 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_older_keys));
2391 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
2392 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->default_iteration_count));
2393 NDR_PULL_ALLOC_N(ndr, r->keys, r->num_keys);
2394 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2395 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
2396 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
2397 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
2399 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
2400 NDR_PULL_ALLOC_N(ndr, r->service_keys, r->num_service_keys);
2401 _mem_save_service_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2402 NDR_PULL_SET_MEM_CTX(ndr, r->service_keys, 0);
2403 for (cntr_service_keys_0 = 0; cntr_service_keys_0 < r->num_service_keys; cntr_service_keys_0++) {
2404 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->service_keys[cntr_service_keys_0]));
2406 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_keys_0, 0);
2407 NDR_PULL_ALLOC_N(ndr, r->old_keys, r->num_old_keys);
2408 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2409 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
2410 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
2411 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
2413 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
2414 NDR_PULL_ALLOC_N(ndr, r->older_keys, r->num_older_keys);
2415 _mem_save_older_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2416 NDR_PULL_SET_MEM_CTX(ndr, r->older_keys, 0);
2417 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
2418 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->older_keys[cntr_older_keys_0]));
2420 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_older_keys_0, 0);
2421 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2423 if (ndr_flags & NDR_BUFFERS) {
2424 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
2425 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2426 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
2427 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
2428 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
2430 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
2431 _mem_save_service_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2432 NDR_PULL_SET_MEM_CTX(ndr, r->service_keys, 0);
2433 for (cntr_service_keys_0 = 0; cntr_service_keys_0 < r->num_service_keys; cntr_service_keys_0++) {
2434 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->service_keys[cntr_service_keys_0]));
2436 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_keys_0, 0);
2437 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2438 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
2439 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
2440 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
2442 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
2443 _mem_save_older_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2444 NDR_PULL_SET_MEM_CTX(ndr, r->older_keys, 0);
2445 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
2446 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->older_keys[cntr_older_keys_0]));
2448 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_older_keys_0, 0);
2450 return NDR_ERR_SUCCESS;
2453 _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr4(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosCtr4 *r)
2455 uint32_t cntr_keys_0;
2456 uint32_t cntr_service_keys_0;
2457 uint32_t cntr_old_keys_0;
2458 uint32_t cntr_older_keys_0;
2459 ndr_print_struct(ndr, name, "package_PrimaryKerberosCtr4");
2460 ndr->depth++;
2461 ndr_print_uint16(ndr, "num_keys", r->num_keys);
2462 ndr_print_uint16(ndr, "num_service_keys", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->num_service_keys);
2463 ndr_print_uint16(ndr, "num_old_keys", r->num_old_keys);
2464 ndr_print_uint16(ndr, "num_older_keys", r->num_older_keys);
2465 ndr_print_package_PrimaryKerberosString(ndr, "salt", &r->salt);
2466 ndr_print_uint32(ndr, "default_iteration_count", r->default_iteration_count);
2467 ndr->print(ndr, "%s: ARRAY(%d)", "keys", (int)r->num_keys);
2468 ndr->depth++;
2469 for (cntr_keys_0=0;cntr_keys_0<r->num_keys;cntr_keys_0++) {
2470 char *idx_0=NULL;
2471 if (asprintf(&idx_0, "[%d]", cntr_keys_0) != -1) {
2472 ndr_print_package_PrimaryKerberosKey4(ndr, "keys", &r->keys[cntr_keys_0]);
2473 free(idx_0);
2476 ndr->depth--;
2477 ndr->print(ndr, "%s: ARRAY(%d)", "service_keys", (int)r->num_service_keys);
2478 ndr->depth++;
2479 for (cntr_service_keys_0=0;cntr_service_keys_0<r->num_service_keys;cntr_service_keys_0++) {
2480 char *idx_0=NULL;
2481 if (asprintf(&idx_0, "[%d]", cntr_service_keys_0) != -1) {
2482 ndr_print_package_PrimaryKerberosKey4(ndr, "service_keys", &r->service_keys[cntr_service_keys_0]);
2483 free(idx_0);
2486 ndr->depth--;
2487 ndr->print(ndr, "%s: ARRAY(%d)", "old_keys", (int)r->num_old_keys);
2488 ndr->depth++;
2489 for (cntr_old_keys_0=0;cntr_old_keys_0<r->num_old_keys;cntr_old_keys_0++) {
2490 char *idx_0=NULL;
2491 if (asprintf(&idx_0, "[%d]", cntr_old_keys_0) != -1) {
2492 ndr_print_package_PrimaryKerberosKey4(ndr, "old_keys", &r->old_keys[cntr_old_keys_0]);
2493 free(idx_0);
2496 ndr->depth--;
2497 ndr->print(ndr, "%s: ARRAY(%d)", "older_keys", (int)r->num_older_keys);
2498 ndr->depth++;
2499 for (cntr_older_keys_0=0;cntr_older_keys_0<r->num_older_keys;cntr_older_keys_0++) {
2500 char *idx_0=NULL;
2501 if (asprintf(&idx_0, "[%d]", cntr_older_keys_0) != -1) {
2502 ndr_print_package_PrimaryKerberosKey4(ndr, "older_keys", &r->older_keys[cntr_older_keys_0]);
2503 free(idx_0);
2506 ndr->depth--;
2507 ndr->depth--;
2510 static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr(struct ndr_push *ndr, int ndr_flags, const union package_PrimaryKerberosCtr *r)
2512 if (ndr_flags & NDR_SCALARS) {
2513 int level = ndr_push_get_switch_value(ndr, r);
2514 NDR_CHECK(ndr_push_union_align(ndr, 5));
2515 switch (level) {
2516 case 3: {
2517 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr, NDR_SCALARS, &r->ctr3));
2518 break; }
2520 case 4: {
2521 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr4(ndr, NDR_SCALARS, &r->ctr4));
2522 break; }
2524 default:
2525 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2528 if (ndr_flags & NDR_BUFFERS) {
2529 int level = ndr_push_get_switch_value(ndr, r);
2530 switch (level) {
2531 case 3:
2532 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr, NDR_BUFFERS, &r->ctr3));
2533 break;
2535 case 4:
2536 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr4(ndr, NDR_BUFFERS, &r->ctr4));
2537 break;
2539 default:
2540 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2543 return NDR_ERR_SUCCESS;
2546 static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr(struct ndr_pull *ndr, int ndr_flags, union package_PrimaryKerberosCtr *r)
2548 int level;
2549 level = ndr_pull_get_switch_value(ndr, r);
2550 if (ndr_flags & NDR_SCALARS) {
2551 NDR_CHECK(ndr_pull_union_align(ndr, 5));
2552 switch (level) {
2553 case 3: {
2554 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr, NDR_SCALARS, &r->ctr3));
2555 break; }
2557 case 4: {
2558 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr4(ndr, NDR_SCALARS, &r->ctr4));
2559 break; }
2561 default:
2562 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2565 if (ndr_flags & NDR_BUFFERS) {
2566 switch (level) {
2567 case 3:
2568 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr, NDR_BUFFERS, &r->ctr3));
2569 break;
2571 case 4:
2572 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr4(ndr, NDR_BUFFERS, &r->ctr4));
2573 break;
2575 default:
2576 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2579 return NDR_ERR_SUCCESS;
2582 _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr(struct ndr_print *ndr, const char *name, const union package_PrimaryKerberosCtr *r)
2584 int level;
2585 level = ndr_print_get_switch_value(ndr, r);
2586 ndr_print_union(ndr, name, level, "package_PrimaryKerberosCtr");
2587 switch (level) {
2588 case 3:
2589 ndr_print_package_PrimaryKerberosCtr3(ndr, "ctr3", &r->ctr3);
2590 break;
2592 case 4:
2593 ndr_print_package_PrimaryKerberosCtr4(ndr, "ctr4", &r->ctr4);
2594 break;
2596 default:
2597 ndr_print_bad_level(ndr, name, level);
2601 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryKerberosBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosBlob *r)
2603 if (ndr_flags & NDR_SCALARS) {
2604 NDR_CHECK(ndr_push_align(ndr, 5));
2605 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->version));
2606 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
2607 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
2608 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr, NDR_SCALARS, &r->ctr));
2609 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2611 if (ndr_flags & NDR_BUFFERS) {
2612 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr, NDR_BUFFERS, &r->ctr));
2614 return NDR_ERR_SUCCESS;
2617 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryKerberosBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosBlob *r)
2619 if (ndr_flags & NDR_SCALARS) {
2620 NDR_CHECK(ndr_pull_align(ndr, 5));
2621 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->version));
2622 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags));
2623 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
2624 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr, NDR_SCALARS, &r->ctr));
2625 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2627 if (ndr_flags & NDR_BUFFERS) {
2628 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr, NDR_BUFFERS, &r->ctr));
2630 return NDR_ERR_SUCCESS;
2633 _PUBLIC_ void ndr_print_package_PrimaryKerberosBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosBlob *r)
2635 ndr_print_struct(ndr, name, "package_PrimaryKerberosBlob");
2636 ndr->depth++;
2637 ndr_print_uint16(ndr, "version", r->version);
2638 ndr_print_uint16(ndr, "flags", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->flags);
2639 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
2640 ndr_print_package_PrimaryKerberosCtr(ndr, "ctr", &r->ctr);
2641 ndr->depth--;
2644 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryCLEARTEXTBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryCLEARTEXTBlob *r)
2646 if (ndr_flags & NDR_SCALARS) {
2647 NDR_CHECK(ndr_push_align(ndr, 4));
2649 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2650 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2651 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->cleartext));
2652 ndr->flags = _flags_save_DATA_BLOB;
2654 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2656 if (ndr_flags & NDR_BUFFERS) {
2658 return NDR_ERR_SUCCESS;
2661 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryCLEARTEXTBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryCLEARTEXTBlob *r)
2663 if (ndr_flags & NDR_SCALARS) {
2664 NDR_CHECK(ndr_pull_align(ndr, 4));
2666 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2667 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2668 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->cleartext));
2669 ndr->flags = _flags_save_DATA_BLOB;
2671 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2673 if (ndr_flags & NDR_BUFFERS) {
2675 return NDR_ERR_SUCCESS;
2678 _PUBLIC_ void ndr_print_package_PrimaryCLEARTEXTBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryCLEARTEXTBlob *r)
2680 ndr_print_struct(ndr, name, "package_PrimaryCLEARTEXTBlob");
2681 ndr->depth++;
2682 ndr_print_DATA_BLOB(ndr, "cleartext", r->cleartext);
2683 ndr->depth--;
2686 static enum ndr_err_code ndr_push_package_PrimaryWDigestHash(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestHash *r)
2689 uint32_t _flags_save_STRUCT = ndr->flags;
2690 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2691 if (ndr_flags & NDR_SCALARS) {
2692 NDR_CHECK(ndr_push_align(ndr, 1));
2693 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
2694 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
2696 if (ndr_flags & NDR_BUFFERS) {
2698 ndr->flags = _flags_save_STRUCT;
2700 return NDR_ERR_SUCCESS;
2703 static enum ndr_err_code ndr_pull_package_PrimaryWDigestHash(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestHash *r)
2706 uint32_t _flags_save_STRUCT = ndr->flags;
2707 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2708 if (ndr_flags & NDR_SCALARS) {
2709 NDR_CHECK(ndr_pull_align(ndr, 1));
2710 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
2711 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
2713 if (ndr_flags & NDR_BUFFERS) {
2715 ndr->flags = _flags_save_STRUCT;
2717 return NDR_ERR_SUCCESS;
2720 _PUBLIC_ void ndr_print_package_PrimaryWDigestHash(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestHash *r)
2722 ndr_print_struct(ndr, name, "package_PrimaryWDigestHash");
2724 uint32_t _flags_save_STRUCT = ndr->flags;
2725 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2726 ndr->depth++;
2727 ndr_print_array_uint8(ndr, "hash", r->hash, 16);
2728 ndr->depth--;
2729 ndr->flags = _flags_save_STRUCT;
2733 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryWDigestBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestBlob *r)
2735 uint32_t cntr_hashes_0;
2736 if (ndr_flags & NDR_SCALARS) {
2737 NDR_CHECK(ndr_push_align(ndr, 4));
2738 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0x31));
2739 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0x01));
2740 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->num_hashes));
2741 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2742 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, 0));
2743 for (cntr_hashes_0 = 0; cntr_hashes_0 < r->num_hashes; cntr_hashes_0++) {
2744 NDR_CHECK(ndr_push_package_PrimaryWDigestHash(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0]));
2746 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2748 if (ndr_flags & NDR_BUFFERS) {
2750 return NDR_ERR_SUCCESS;
2753 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryWDigestBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestBlob *r)
2755 uint32_t cntr_hashes_0;
2756 TALLOC_CTX *_mem_save_hashes_0;
2757 if (ndr_flags & NDR_SCALARS) {
2758 NDR_CHECK(ndr_pull_align(ndr, 4));
2759 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown1));
2760 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown2));
2761 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->num_hashes));
2762 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
2763 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->uuknown4));
2764 NDR_PULL_ALLOC_N(ndr, r->hashes, r->num_hashes);
2765 _mem_save_hashes_0 = NDR_PULL_GET_MEM_CTX(ndr);
2766 NDR_PULL_SET_MEM_CTX(ndr, r->hashes, 0);
2767 for (cntr_hashes_0 = 0; cntr_hashes_0 < r->num_hashes; cntr_hashes_0++) {
2768 NDR_CHECK(ndr_pull_package_PrimaryWDigestHash(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0]));
2770 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hashes_0, 0);
2771 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2773 if (ndr_flags & NDR_BUFFERS) {
2775 return NDR_ERR_SUCCESS;
2778 _PUBLIC_ void ndr_print_package_PrimaryWDigestBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestBlob *r)
2780 uint32_t cntr_hashes_0;
2781 ndr_print_struct(ndr, name, "package_PrimaryWDigestBlob");
2782 ndr->depth++;
2783 ndr_print_uint16(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x31:r->unknown1);
2784 ndr_print_uint8(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x01:r->unknown2);
2785 ndr_print_uint8(ndr, "num_hashes", r->num_hashes);
2786 ndr_print_uint32(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown3);
2787 ndr_print_udlong(ndr, "uuknown4", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->uuknown4);
2788 ndr->print(ndr, "%s: ARRAY(%d)", "hashes", (int)r->num_hashes);
2789 ndr->depth++;
2790 for (cntr_hashes_0=0;cntr_hashes_0<r->num_hashes;cntr_hashes_0++) {
2791 char *idx_0=NULL;
2792 if (asprintf(&idx_0, "[%d]", cntr_hashes_0) != -1) {
2793 ndr_print_package_PrimaryWDigestHash(ndr, "hashes", &r->hashes[cntr_hashes_0]);
2794 free(idx_0);
2797 ndr->depth--;
2798 ndr->depth--;
2801 static enum ndr_err_code ndr_push_AuthInfoNone(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoNone *r)
2803 if (ndr_flags & NDR_SCALARS) {
2804 NDR_CHECK(ndr_push_align(ndr, 4));
2805 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2806 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2808 if (ndr_flags & NDR_BUFFERS) {
2810 return NDR_ERR_SUCCESS;
2813 static enum ndr_err_code ndr_pull_AuthInfoNone(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoNone *r)
2815 if (ndr_flags & NDR_SCALARS) {
2816 NDR_CHECK(ndr_pull_align(ndr, 4));
2817 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2818 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2820 if (ndr_flags & NDR_BUFFERS) {
2822 return NDR_ERR_SUCCESS;
2825 _PUBLIC_ void ndr_print_AuthInfoNone(struct ndr_print *ndr, const char *name, const struct AuthInfoNone *r)
2827 ndr_print_struct(ndr, name, "AuthInfoNone");
2828 ndr->depth++;
2829 ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->size);
2830 ndr->depth--;
2833 static enum ndr_err_code ndr_push_AuthInfoNT4Owf(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoNT4Owf *r)
2835 if (ndr_flags & NDR_SCALARS) {
2836 NDR_CHECK(ndr_push_align(ndr, 4));
2837 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 16));
2838 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->password));
2839 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2841 if (ndr_flags & NDR_BUFFERS) {
2843 return NDR_ERR_SUCCESS;
2846 static enum ndr_err_code ndr_pull_AuthInfoNT4Owf(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoNT4Owf *r)
2848 if (ndr_flags & NDR_SCALARS) {
2849 NDR_CHECK(ndr_pull_align(ndr, 4));
2850 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2851 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->password));
2852 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2854 if (ndr_flags & NDR_BUFFERS) {
2856 return NDR_ERR_SUCCESS;
2859 _PUBLIC_ void ndr_print_AuthInfoNT4Owf(struct ndr_print *ndr, const char *name, const struct AuthInfoNT4Owf *r)
2861 ndr_print_struct(ndr, name, "AuthInfoNT4Owf");
2862 ndr->depth++;
2863 ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?16:r->size);
2864 ndr_print_samr_Password(ndr, "password", &r->password);
2865 ndr->depth--;
2868 static enum ndr_err_code ndr_push_AuthInfoClear(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoClear *r)
2870 if (ndr_flags & NDR_SCALARS) {
2871 NDR_CHECK(ndr_push_align(ndr, 4));
2872 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
2873 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->password, r->size));
2874 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2876 if (ndr_flags & NDR_BUFFERS) {
2878 return NDR_ERR_SUCCESS;
2881 static enum ndr_err_code ndr_pull_AuthInfoClear(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoClear *r)
2883 if (ndr_flags & NDR_SCALARS) {
2884 NDR_CHECK(ndr_pull_align(ndr, 4));
2885 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2886 NDR_PULL_ALLOC_N(ndr, r->password, r->size);
2887 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->password, r->size));
2888 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2890 if (ndr_flags & NDR_BUFFERS) {
2892 return NDR_ERR_SUCCESS;
2895 _PUBLIC_ void ndr_print_AuthInfoClear(struct ndr_print *ndr, const char *name, const struct AuthInfoClear *r)
2897 ndr_print_struct(ndr, name, "AuthInfoClear");
2898 ndr->depth++;
2899 ndr_print_uint32(ndr, "size", r->size);
2900 ndr_print_array_uint8(ndr, "password", r->password, r->size);
2901 ndr->depth--;
2904 static enum ndr_err_code ndr_push_AuthInfoVersion(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoVersion *r)
2906 if (ndr_flags & NDR_SCALARS) {
2907 NDR_CHECK(ndr_push_align(ndr, 4));
2908 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 4));
2909 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
2910 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2912 if (ndr_flags & NDR_BUFFERS) {
2914 return NDR_ERR_SUCCESS;
2917 static enum ndr_err_code ndr_pull_AuthInfoVersion(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoVersion *r)
2919 if (ndr_flags & NDR_SCALARS) {
2920 NDR_CHECK(ndr_pull_align(ndr, 4));
2921 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2922 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
2923 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2925 if (ndr_flags & NDR_BUFFERS) {
2927 return NDR_ERR_SUCCESS;
2930 _PUBLIC_ void ndr_print_AuthInfoVersion(struct ndr_print *ndr, const char *name, const struct AuthInfoVersion *r)
2932 ndr_print_struct(ndr, name, "AuthInfoVersion");
2933 ndr->depth++;
2934 ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?4:r->size);
2935 ndr_print_uint32(ndr, "version", r->version);
2936 ndr->depth--;
2939 static enum ndr_err_code ndr_push_AuthInfo(struct ndr_push *ndr, int ndr_flags, const union AuthInfo *r)
2941 if (ndr_flags & NDR_SCALARS) {
2942 int level = ndr_push_get_switch_value(ndr, r);
2943 NDR_CHECK(ndr_push_union_align(ndr, 4));
2944 switch (level) {
2945 case TRUST_AUTH_TYPE_NONE: {
2946 NDR_CHECK(ndr_push_AuthInfoNone(ndr, NDR_SCALARS, &r->none));
2947 break; }
2949 case TRUST_AUTH_TYPE_NT4OWF: {
2950 NDR_CHECK(ndr_push_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf));
2951 break; }
2953 case TRUST_AUTH_TYPE_CLEAR: {
2954 NDR_CHECK(ndr_push_AuthInfoClear(ndr, NDR_SCALARS, &r->clear));
2955 break; }
2957 case TRUST_AUTH_TYPE_VERSION: {
2958 NDR_CHECK(ndr_push_AuthInfoVersion(ndr, NDR_SCALARS, &r->version));
2959 break; }
2961 default:
2962 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2965 if (ndr_flags & NDR_BUFFERS) {
2966 int level = ndr_push_get_switch_value(ndr, r);
2967 switch (level) {
2968 case TRUST_AUTH_TYPE_NONE:
2969 break;
2971 case TRUST_AUTH_TYPE_NT4OWF:
2972 break;
2974 case TRUST_AUTH_TYPE_CLEAR:
2975 break;
2977 case TRUST_AUTH_TYPE_VERSION:
2978 break;
2980 default:
2981 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2984 return NDR_ERR_SUCCESS;
2987 static enum ndr_err_code ndr_pull_AuthInfo(struct ndr_pull *ndr, int ndr_flags, union AuthInfo *r)
2989 int level;
2990 level = ndr_pull_get_switch_value(ndr, r);
2991 if (ndr_flags & NDR_SCALARS) {
2992 NDR_CHECK(ndr_pull_union_align(ndr, 4));
2993 switch (level) {
2994 case TRUST_AUTH_TYPE_NONE: {
2995 NDR_CHECK(ndr_pull_AuthInfoNone(ndr, NDR_SCALARS, &r->none));
2996 break; }
2998 case TRUST_AUTH_TYPE_NT4OWF: {
2999 NDR_CHECK(ndr_pull_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf));
3000 break; }
3002 case TRUST_AUTH_TYPE_CLEAR: {
3003 NDR_CHECK(ndr_pull_AuthInfoClear(ndr, NDR_SCALARS, &r->clear));
3004 break; }
3006 case TRUST_AUTH_TYPE_VERSION: {
3007 NDR_CHECK(ndr_pull_AuthInfoVersion(ndr, NDR_SCALARS, &r->version));
3008 break; }
3010 default:
3011 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3014 if (ndr_flags & NDR_BUFFERS) {
3015 switch (level) {
3016 case TRUST_AUTH_TYPE_NONE:
3017 break;
3019 case TRUST_AUTH_TYPE_NT4OWF:
3020 break;
3022 case TRUST_AUTH_TYPE_CLEAR:
3023 break;
3025 case TRUST_AUTH_TYPE_VERSION:
3026 break;
3028 default:
3029 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3032 return NDR_ERR_SUCCESS;
3035 _PUBLIC_ void ndr_print_AuthInfo(struct ndr_print *ndr, const char *name, const union AuthInfo *r)
3037 int level;
3038 level = ndr_print_get_switch_value(ndr, r);
3039 ndr_print_union(ndr, name, level, "AuthInfo");
3040 switch (level) {
3041 case TRUST_AUTH_TYPE_NONE:
3042 ndr_print_AuthInfoNone(ndr, "none", &r->none);
3043 break;
3045 case TRUST_AUTH_TYPE_NT4OWF:
3046 ndr_print_AuthInfoNT4Owf(ndr, "nt4owf", &r->nt4owf);
3047 break;
3049 case TRUST_AUTH_TYPE_CLEAR:
3050 ndr_print_AuthInfoClear(ndr, "clear", &r->clear);
3051 break;
3053 case TRUST_AUTH_TYPE_VERSION:
3054 ndr_print_AuthInfoVersion(ndr, "version", &r->version);
3055 break;
3057 default:
3058 ndr_print_bad_level(ndr, name, level);
3062 _PUBLIC_ enum ndr_err_code ndr_push_AuthenticationInformation(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformation *r)
3064 if (ndr_flags & NDR_SCALARS) {
3065 NDR_CHECK(ndr_push_align(ndr, 4));
3066 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->LastUpdateTime));
3067 NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr, NDR_SCALARS, r->AuthType));
3068 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->AuthInfo, r->AuthType));
3069 NDR_CHECK(ndr_push_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo));
3071 uint32_t _flags_save_DATA_BLOB = ndr->flags;
3072 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
3073 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
3074 ndr->flags = _flags_save_DATA_BLOB;
3076 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3078 if (ndr_flags & NDR_BUFFERS) {
3080 return NDR_ERR_SUCCESS;
3083 _PUBLIC_ enum ndr_err_code ndr_pull_AuthenticationInformation(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformation *r)
3085 if (ndr_flags & NDR_SCALARS) {
3086 NDR_CHECK(ndr_pull_align(ndr, 4));
3087 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->LastUpdateTime));
3088 NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr, NDR_SCALARS, &r->AuthType));
3089 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->AuthInfo, r->AuthType));
3090 NDR_CHECK(ndr_pull_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo));
3092 uint32_t _flags_save_DATA_BLOB = ndr->flags;
3093 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
3094 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
3095 ndr->flags = _flags_save_DATA_BLOB;
3097 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3099 if (ndr_flags & NDR_BUFFERS) {
3101 return NDR_ERR_SUCCESS;
3104 _PUBLIC_ void ndr_print_AuthenticationInformation(struct ndr_print *ndr, const char *name, const struct AuthenticationInformation *r)
3106 ndr_print_struct(ndr, name, "AuthenticationInformation");
3107 ndr->depth++;
3108 ndr_print_NTTIME(ndr, "LastUpdateTime", r->LastUpdateTime);
3109 ndr_print_lsa_TrustAuthType(ndr, "AuthType", r->AuthType);
3110 ndr_print_set_switch_value(ndr, &r->AuthInfo, r->AuthType);
3111 ndr_print_AuthInfo(ndr, "AuthInfo", &r->AuthInfo);
3112 ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
3113 ndr->depth--;
3116 _PUBLIC_ size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, struct smb_iconv_convenience *ic, int flags)
3118 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustAuthInOutBlob, ic);
3121 _PUBLIC_ enum ndr_err_code ndr_push_trustCurrentPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustCurrentPasswords *r)
3123 uint32_t cntr_current_0;
3124 if (ndr_flags & NDR_SCALARS) {
3125 NDR_CHECK(ndr_push_align(ndr, 5));
3126 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3127 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
3128 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->current[cntr_current_0]));
3130 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3132 if (ndr_flags & NDR_BUFFERS) {
3133 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
3134 if (r->current[cntr_current_0]) {
3135 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->current[cntr_current_0]));
3136 NDR_CHECK(ndr_push_AuthenticationInformation(ndr, NDR_SCALARS, r->current[cntr_current_0]));
3137 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->current[cntr_current_0]));
3141 return NDR_ERR_SUCCESS;
3144 _PUBLIC_ enum ndr_err_code ndr_pull_trustCurrentPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustCurrentPasswords *r)
3146 uint32_t _ptr_current;
3147 uint32_t cntr_current_0;
3148 TALLOC_CTX *_mem_save_current_0;
3149 TALLOC_CTX *_mem_save_current_1;
3150 if (ndr_flags & NDR_SCALARS) {
3151 NDR_CHECK(ndr_pull_align(ndr, 5));
3152 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3153 NDR_PULL_ALLOC_N(ndr, r->current, r->count);
3154 _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
3155 NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
3156 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
3157 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_current));
3158 if (_ptr_current) {
3159 NDR_PULL_ALLOC(ndr, r->current[cntr_current_0]);
3160 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->current[cntr_current_0], _ptr_current));
3161 } else {
3162 r->current[cntr_current_0] = NULL;
3165 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
3166 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3168 if (ndr_flags & NDR_BUFFERS) {
3169 _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
3170 NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
3171 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
3172 if (r->current[cntr_current_0]) {
3173 uint32_t _relative_save_offset;
3174 _relative_save_offset = ndr->offset;
3175 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->current[cntr_current_0]));
3176 _mem_save_current_1 = NDR_PULL_GET_MEM_CTX(ndr);
3177 NDR_PULL_SET_MEM_CTX(ndr, r->current[cntr_current_0], 0);
3178 NDR_CHECK(ndr_pull_AuthenticationInformation(ndr, NDR_SCALARS, r->current[cntr_current_0]));
3179 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_1, 0);
3180 if (ndr->offset > ndr->relative_highest_offset) {
3181 ndr->relative_highest_offset = ndr->offset;
3183 ndr->offset = _relative_save_offset;
3186 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
3188 return NDR_ERR_SUCCESS;
3191 _PUBLIC_ void ndr_print_trustCurrentPasswords(struct ndr_print *ndr, const char *name, const struct trustCurrentPasswords *r)
3193 uint32_t cntr_current_0;
3194 ndr_print_struct(ndr, name, "trustCurrentPasswords");
3195 ndr->depth++;
3196 ndr_print_uint32(ndr, "count", r->count);
3197 ndr->print(ndr, "%s: ARRAY(%d)", "current", (int)r->count);
3198 ndr->depth++;
3199 for (cntr_current_0=0;cntr_current_0<r->count;cntr_current_0++) {
3200 char *idx_0=NULL;
3201 if (asprintf(&idx_0, "[%d]", cntr_current_0) != -1) {
3202 ndr_print_ptr(ndr, "current", r->current[cntr_current_0]);
3203 ndr->depth++;
3204 if (r->current[cntr_current_0]) {
3205 ndr_print_AuthenticationInformation(ndr, "current", r->current[cntr_current_0]);
3207 ndr->depth--;
3208 free(idx_0);
3211 ndr->depth--;
3212 ndr->depth--;
3215 _PUBLIC_ size_t ndr_size_trustCurrentPasswords(const struct trustCurrentPasswords *r, struct smb_iconv_convenience *ic, int flags)
3217 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustCurrentPasswords, ic);
3220 _PUBLIC_ enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustDomainPasswords *r)
3222 if (ndr_flags & NDR_SCALARS) {
3223 NDR_CHECK(ndr_push_align(ndr, 5));
3224 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->confounder, 512));
3226 struct ndr_push *_ndr_outgoing;
3227 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags)));
3228 NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_outgoing, NDR_SCALARS|NDR_BUFFERS, &r->outgoing));
3229 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags)));
3232 struct ndr_push *_ndr_incoming;
3233 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags)));
3234 NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_incoming, NDR_SCALARS|NDR_BUFFERS, &r->incoming));
3235 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags)));
3237 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags)));
3238 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags)));
3239 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3241 if (ndr_flags & NDR_BUFFERS) {
3243 return NDR_ERR_SUCCESS;
3246 _PUBLIC_ void ndr_print_trustDomainPasswords(struct ndr_print *ndr, const char *name, const struct trustDomainPasswords *r)
3248 ndr_print_struct(ndr, name, "trustDomainPasswords");
3249 ndr->depth++;
3250 ndr_print_array_uint8(ndr, "confounder", r->confounder, 512);
3251 ndr_print_trustCurrentPasswords(ndr, "outgoing", &r->outgoing);
3252 ndr_print_trustCurrentPasswords(ndr, "incoming", &r->incoming);
3253 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);
3254 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);
3255 ndr->depth--;
3258 _PUBLIC_ enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r)
3260 if (ndr_flags & NDR_SCALARS) {
3261 NDR_CHECK(ndr_push_align(ndr, 4));
3262 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->marker));
3263 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
3264 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3266 if (ndr_flags & NDR_BUFFERS) {
3268 return NDR_ERR_SUCCESS;
3271 _PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r)
3273 if (ndr_flags & NDR_SCALARS) {
3274 NDR_CHECK(ndr_pull_align(ndr, 4));
3275 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->marker));
3276 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
3277 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3279 if (ndr_flags & NDR_BUFFERS) {
3281 return NDR_ERR_SUCCESS;
3284 _PUBLIC_ void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r)
3286 ndr_print_struct(ndr, name, "DsCompressedChunk");
3287 ndr->depth++;
3288 ndr_print_uint32(ndr, "marker", r->marker);
3289 ndr_print_DATA_BLOB(ndr, "data", r->data);
3290 ndr->depth--;
3293 static enum ndr_err_code ndr_push_ExtendedErrorAString(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorAString *r)
3295 if (ndr_flags & NDR_SCALARS) {
3296 NDR_CHECK(ndr_push_align(ndr, 5));
3297 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size));
3298 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
3299 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3301 if (ndr_flags & NDR_BUFFERS) {
3302 if (r->string) {
3303 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->__size));
3304 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint8_t), CH_DOS));
3307 return NDR_ERR_SUCCESS;
3310 static enum ndr_err_code ndr_pull_ExtendedErrorAString(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorAString *r)
3312 uint32_t _ptr_string;
3313 TALLOC_CTX *_mem_save_string_0;
3314 if (ndr_flags & NDR_SCALARS) {
3315 NDR_CHECK(ndr_pull_align(ndr, 5));
3316 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__size));
3317 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
3318 if (_ptr_string) {
3319 NDR_PULL_ALLOC(ndr, r->string);
3320 } else {
3321 r->string = NULL;
3323 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3325 if (ndr_flags & NDR_BUFFERS) {
3326 if (r->string) {
3327 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
3328 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
3329 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
3330 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(ndr, &r->string), sizeof(uint8_t), CH_DOS));
3331 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
3333 if (r->string) {
3334 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->__size));
3337 return NDR_ERR_SUCCESS;
3340 _PUBLIC_ void ndr_print_ExtendedErrorAString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorAString *r)
3342 ndr_print_struct(ndr, name, "ExtendedErrorAString");
3343 ndr->depth++;
3344 ndr_print_uint16(ndr, "__size", r->__size);
3345 ndr_print_ptr(ndr, "string", r->string);
3346 ndr->depth++;
3347 if (r->string) {
3348 ndr_print_string(ndr, "string", r->string);
3350 ndr->depth--;
3351 ndr->depth--;
3354 static enum ndr_err_code ndr_push_ExtendedErrorUString(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorUString *r)
3356 if (ndr_flags & NDR_SCALARS) {
3357 NDR_CHECK(ndr_push_align(ndr, 5));
3358 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size));
3359 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
3360 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3362 if (ndr_flags & NDR_BUFFERS) {
3363 if (r->string) {
3364 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->__size));
3365 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint16_t), CH_UTF16));
3368 return NDR_ERR_SUCCESS;
3371 static enum ndr_err_code ndr_pull_ExtendedErrorUString(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorUString *r)
3373 uint32_t _ptr_string;
3374 TALLOC_CTX *_mem_save_string_0;
3375 if (ndr_flags & NDR_SCALARS) {
3376 NDR_CHECK(ndr_pull_align(ndr, 5));
3377 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__size));
3378 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
3379 if (_ptr_string) {
3380 NDR_PULL_ALLOC(ndr, r->string);
3381 } else {
3382 r->string = NULL;
3384 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3386 if (ndr_flags & NDR_BUFFERS) {
3387 if (r->string) {
3388 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
3389 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
3390 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
3391 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(ndr, &r->string), sizeof(uint16_t), CH_UTF16));
3392 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
3394 if (r->string) {
3395 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->__size));
3398 return NDR_ERR_SUCCESS;
3401 _PUBLIC_ void ndr_print_ExtendedErrorUString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorUString *r)
3403 ndr_print_struct(ndr, name, "ExtendedErrorUString");
3404 ndr->depth++;
3405 ndr_print_uint16(ndr, "__size", r->__size);
3406 ndr_print_ptr(ndr, "string", r->string);
3407 ndr->depth++;
3408 if (r->string) {
3409 ndr_print_string(ndr, "string", r->string);
3411 ndr->depth--;
3412 ndr->depth--;
3415 static enum ndr_err_code ndr_push_ExtendedErrorBlob(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorBlob *r)
3417 if (ndr_flags & NDR_SCALARS) {
3418 NDR_CHECK(ndr_push_align(ndr, 5));
3419 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
3420 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
3421 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3423 if (ndr_flags & NDR_BUFFERS) {
3424 if (r->data) {
3425 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
3426 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
3429 return NDR_ERR_SUCCESS;
3432 static enum ndr_err_code ndr_pull_ExtendedErrorBlob(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorBlob *r)
3434 uint32_t _ptr_data;
3435 TALLOC_CTX *_mem_save_data_0;
3436 if (ndr_flags & NDR_SCALARS) {
3437 NDR_CHECK(ndr_pull_align(ndr, 5));
3438 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
3439 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
3440 if (_ptr_data) {
3441 NDR_PULL_ALLOC(ndr, r->data);
3442 } else {
3443 r->data = NULL;
3445 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3447 if (ndr_flags & NDR_BUFFERS) {
3448 if (r->data) {
3449 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
3450 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
3451 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
3452 NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
3453 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
3454 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
3456 if (r->data) {
3457 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length));
3460 return NDR_ERR_SUCCESS;
3463 _PUBLIC_ void ndr_print_ExtendedErrorBlob(struct ndr_print *ndr, const char *name, const struct ExtendedErrorBlob *r)
3465 ndr_print_struct(ndr, name, "ExtendedErrorBlob");
3466 ndr->depth++;
3467 ndr_print_uint16(ndr, "length", r->length);
3468 ndr_print_ptr(ndr, "data", r->data);
3469 ndr->depth++;
3470 if (r->data) {
3471 ndr_print_array_uint8(ndr, "data", r->data, r->length);
3473 ndr->depth--;
3474 ndr->depth--;
3477 static enum ndr_err_code ndr_push_ExtendedErrorComputerNamePresent(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent r)
3479 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
3480 return NDR_ERR_SUCCESS;
3483 static enum ndr_err_code ndr_pull_ExtendedErrorComputerNamePresent(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent *r)
3485 uint16_t v;
3486 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
3487 *r = v;
3488 return NDR_ERR_SUCCESS;
3491 _PUBLIC_ void ndr_print_ExtendedErrorComputerNamePresent(struct ndr_print *ndr, const char *name, enum ExtendedErrorComputerNamePresent r)
3493 const char *val = NULL;
3495 switch (r) {
3496 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_PRESENT"; break;
3497 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT"; break;
3499 ndr_print_enum(ndr, name, "ENUM", val, r);
3502 static enum ndr_err_code ndr_push_ExtendedErrorComputerNameU(struct ndr_push *ndr, int ndr_flags, const union ExtendedErrorComputerNameU *r)
3504 if (ndr_flags & NDR_SCALARS) {
3505 int level = ndr_push_get_switch_value(ndr, r);
3506 NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, level));
3507 NDR_CHECK(ndr_push_union_align(ndr, 5));
3508 switch (level) {
3509 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: {
3510 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name));
3511 break; }
3513 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: {
3514 break; }
3516 default:
3517 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3520 if (ndr_flags & NDR_BUFFERS) {
3521 int level = ndr_push_get_switch_value(ndr, r);
3522 switch (level) {
3523 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
3524 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name));
3525 break;
3527 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
3528 break;
3530 default:
3531 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3534 return NDR_ERR_SUCCESS;
3537 static enum ndr_err_code ndr_pull_ExtendedErrorComputerNameU(struct ndr_pull *ndr, int ndr_flags, union ExtendedErrorComputerNameU *r)
3539 int level;
3540 uint16_t _level;
3541 level = ndr_pull_get_switch_value(ndr, r);
3542 if (ndr_flags & NDR_SCALARS) {
3543 NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
3544 if (_level != level) {
3545 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
3547 NDR_CHECK(ndr_pull_union_align(ndr, 5));
3548 switch (level) {
3549 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: {
3550 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name));
3551 break; }
3553 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: {
3554 break; }
3556 default:
3557 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3560 if (ndr_flags & NDR_BUFFERS) {
3561 switch (level) {
3562 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
3563 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name));
3564 break;
3566 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
3567 break;
3569 default:
3570 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3573 return NDR_ERR_SUCCESS;
3576 _PUBLIC_ void ndr_print_ExtendedErrorComputerNameU(struct ndr_print *ndr, const char *name, const union ExtendedErrorComputerNameU *r)
3578 int level;
3579 level = ndr_print_get_switch_value(ndr, r);
3580 ndr_print_union(ndr, name, level, "ExtendedErrorComputerNameU");
3581 switch (level) {
3582 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
3583 ndr_print_ExtendedErrorUString(ndr, "name", &r->name);
3584 break;
3586 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
3587 break;
3589 default:
3590 ndr_print_bad_level(ndr, name, level);
3594 static enum ndr_err_code ndr_push_ExtendedErrorComputerName(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorComputerName *r)
3596 if (ndr_flags & NDR_SCALARS) {
3597 NDR_CHECK(ndr_push_align(ndr, 5));
3598 NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, r->present));
3599 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->n, r->present));
3600 NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n));
3601 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3603 if (ndr_flags & NDR_BUFFERS) {
3604 NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n));
3606 return NDR_ERR_SUCCESS;
3609 static enum ndr_err_code ndr_pull_ExtendedErrorComputerName(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorComputerName *r)
3611 if (ndr_flags & NDR_SCALARS) {
3612 NDR_CHECK(ndr_pull_align(ndr, 5));
3613 NDR_CHECK(ndr_pull_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, &r->present));
3614 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->n, r->present));
3615 NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n));
3616 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3618 if (ndr_flags & NDR_BUFFERS) {
3619 NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n));
3621 return NDR_ERR_SUCCESS;
3624 _PUBLIC_ void ndr_print_ExtendedErrorComputerName(struct ndr_print *ndr, const char *name, const struct ExtendedErrorComputerName *r)
3626 ndr_print_struct(ndr, name, "ExtendedErrorComputerName");
3627 ndr->depth++;
3628 ndr_print_ExtendedErrorComputerNamePresent(ndr, "present", r->present);
3629 ndr_print_set_switch_value(ndr, &r->n, r->present);
3630 ndr_print_ExtendedErrorComputerNameU(ndr, "n", &r->n);
3631 ndr->depth--;
3634 static enum ndr_err_code ndr_push_ExtendedErrorParamType(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorParamType r)
3636 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
3637 return NDR_ERR_SUCCESS;
3640 static enum ndr_err_code ndr_pull_ExtendedErrorParamType(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorParamType *r)
3642 uint16_t v;
3643 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
3644 *r = v;
3645 return NDR_ERR_SUCCESS;
3648 _PUBLIC_ void ndr_print_ExtendedErrorParamType(struct ndr_print *ndr, const char *name, enum ExtendedErrorParamType r)
3650 const char *val = NULL;
3652 switch (r) {
3653 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING"; break;
3654 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING"; break;
3655 case EXTENDED_ERROR_PARAM_TYPE_UINT32: val = "EXTENDED_ERROR_PARAM_TYPE_UINT32"; break;
3656 case EXTENDED_ERROR_PARAM_TYPE_UINT16: val = "EXTENDED_ERROR_PARAM_TYPE_UINT16"; break;
3657 case EXTENDED_ERROR_PARAM_TYPE_UINT64: val = "EXTENDED_ERROR_PARAM_TYPE_UINT64"; break;
3658 case EXTENDED_ERROR_PARAM_TYPE_NONE: val = "EXTENDED_ERROR_PARAM_TYPE_NONE"; break;
3659 case EXTENDED_ERROR_PARAM_TYPE_BLOB: val = "EXTENDED_ERROR_PARAM_TYPE_BLOB"; break;
3661 ndr_print_enum(ndr, name, "ENUM", val, r);
3664 static enum ndr_err_code ndr_push_ExtendedErrorParamU(struct ndr_push *ndr, int ndr_flags, const union ExtendedErrorParamU *r)
3666 if (ndr_flags & NDR_SCALARS) {
3667 int level = ndr_push_get_switch_value(ndr, r);
3668 NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, level));
3669 NDR_CHECK(ndr_push_union_align(ndr, 8));
3670 switch (level) {
3671 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: {
3672 NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string));
3673 break; }
3675 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: {
3676 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string));
3677 break; }
3679 case EXTENDED_ERROR_PARAM_TYPE_UINT32: {
3680 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->uint32));
3681 break; }
3683 case EXTENDED_ERROR_PARAM_TYPE_UINT16: {
3684 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->uint16));
3685 break; }
3687 case EXTENDED_ERROR_PARAM_TYPE_UINT64: {
3688 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->uint64));
3689 break; }
3691 case EXTENDED_ERROR_PARAM_TYPE_NONE: {
3692 break; }
3694 case EXTENDED_ERROR_PARAM_TYPE_BLOB: {
3695 NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob));
3696 break; }
3698 default:
3699 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3702 if (ndr_flags & NDR_BUFFERS) {
3703 int level = ndr_push_get_switch_value(ndr, r);
3704 switch (level) {
3705 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
3706 NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string));
3707 break;
3709 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
3710 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string));
3711 break;
3713 case EXTENDED_ERROR_PARAM_TYPE_UINT32:
3714 break;
3716 case EXTENDED_ERROR_PARAM_TYPE_UINT16:
3717 break;
3719 case EXTENDED_ERROR_PARAM_TYPE_UINT64:
3720 break;
3722 case EXTENDED_ERROR_PARAM_TYPE_NONE:
3723 break;
3725 case EXTENDED_ERROR_PARAM_TYPE_BLOB:
3726 NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob));
3727 break;
3729 default:
3730 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3733 return NDR_ERR_SUCCESS;
3736 static enum ndr_err_code ndr_pull_ExtendedErrorParamU(struct ndr_pull *ndr, int ndr_flags, union ExtendedErrorParamU *r)
3738 int level;
3739 uint16_t _level;
3740 level = ndr_pull_get_switch_value(ndr, r);
3741 if (ndr_flags & NDR_SCALARS) {
3742 NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
3743 if (_level != level) {
3744 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
3746 NDR_CHECK(ndr_pull_union_align(ndr, 8));
3747 switch (level) {
3748 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: {
3749 NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string));
3750 break; }
3752 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: {
3753 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string));
3754 break; }
3756 case EXTENDED_ERROR_PARAM_TYPE_UINT32: {
3757 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->uint32));
3758 break; }
3760 case EXTENDED_ERROR_PARAM_TYPE_UINT16: {
3761 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->uint16));
3762 break; }
3764 case EXTENDED_ERROR_PARAM_TYPE_UINT64: {
3765 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->uint64));
3766 break; }
3768 case EXTENDED_ERROR_PARAM_TYPE_NONE: {
3769 break; }
3771 case EXTENDED_ERROR_PARAM_TYPE_BLOB: {
3772 NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob));
3773 break; }
3775 default:
3776 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3779 if (ndr_flags & NDR_BUFFERS) {
3780 switch (level) {
3781 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
3782 NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string));
3783 break;
3785 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
3786 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string));
3787 break;
3789 case EXTENDED_ERROR_PARAM_TYPE_UINT32:
3790 break;
3792 case EXTENDED_ERROR_PARAM_TYPE_UINT16:
3793 break;
3795 case EXTENDED_ERROR_PARAM_TYPE_UINT64:
3796 break;
3798 case EXTENDED_ERROR_PARAM_TYPE_NONE:
3799 break;
3801 case EXTENDED_ERROR_PARAM_TYPE_BLOB:
3802 NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob));
3803 break;
3805 default:
3806 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3809 return NDR_ERR_SUCCESS;
3812 _PUBLIC_ void ndr_print_ExtendedErrorParamU(struct ndr_print *ndr, const char *name, const union ExtendedErrorParamU *r)
3814 int level;
3815 level = ndr_print_get_switch_value(ndr, r);
3816 ndr_print_union(ndr, name, level, "ExtendedErrorParamU");
3817 switch (level) {
3818 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
3819 ndr_print_ExtendedErrorAString(ndr, "a_string", &r->a_string);
3820 break;
3822 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
3823 ndr_print_ExtendedErrorUString(ndr, "u_string", &r->u_string);
3824 break;
3826 case EXTENDED_ERROR_PARAM_TYPE_UINT32:
3827 ndr_print_uint32(ndr, "uint32", r->uint32);
3828 break;
3830 case EXTENDED_ERROR_PARAM_TYPE_UINT16:
3831 ndr_print_uint16(ndr, "uint16", r->uint16);
3832 break;
3834 case EXTENDED_ERROR_PARAM_TYPE_UINT64:
3835 ndr_print_hyper(ndr, "uint64", r->uint64);
3836 break;
3838 case EXTENDED_ERROR_PARAM_TYPE_NONE:
3839 break;
3841 case EXTENDED_ERROR_PARAM_TYPE_BLOB:
3842 ndr_print_ExtendedErrorBlob(ndr, "blob", &r->blob);
3843 break;
3845 default:
3846 ndr_print_bad_level(ndr, name, level);
3850 static enum ndr_err_code ndr_push_ExtendedErrorParam(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorParam *r)
3852 if (ndr_flags & NDR_SCALARS) {
3853 NDR_CHECK(ndr_push_align(ndr, 8));
3854 NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, r->type));
3855 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->p, r->type));
3856 NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p));
3857 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
3859 if (ndr_flags & NDR_BUFFERS) {
3860 NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p));
3862 return NDR_ERR_SUCCESS;
3865 static enum ndr_err_code ndr_pull_ExtendedErrorParam(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorParam *r)
3867 if (ndr_flags & NDR_SCALARS) {
3868 NDR_CHECK(ndr_pull_align(ndr, 8));
3869 NDR_CHECK(ndr_pull_ExtendedErrorParamType(ndr, NDR_SCALARS, &r->type));
3870 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->p, r->type));
3871 NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p));
3872 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
3874 if (ndr_flags & NDR_BUFFERS) {
3875 NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p));
3877 return NDR_ERR_SUCCESS;
3880 _PUBLIC_ void ndr_print_ExtendedErrorParam(struct ndr_print *ndr, const char *name, const struct ExtendedErrorParam *r)
3882 ndr_print_struct(ndr, name, "ExtendedErrorParam");
3883 ndr->depth++;
3884 ndr_print_ExtendedErrorParamType(ndr, "type", r->type);
3885 ndr_print_set_switch_value(ndr, &r->p, r->type);
3886 ndr_print_ExtendedErrorParamU(ndr, "p", &r->p);
3887 ndr->depth--;
3890 _PUBLIC_ enum ndr_err_code ndr_push_ExtendedErrorInfo(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfo *r)
3892 uint32_t cntr_params_0;
3893 if (ndr_flags & NDR_SCALARS) {
3894 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_params));
3895 NDR_CHECK(ndr_push_align(ndr, 8));
3896 NDR_CHECK(ndr_push_unique_ptr(ndr, r->next));
3897 NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name));
3898 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->pid));
3899 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time));
3900 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->generating_component));
3901 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status));
3902 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->detection_location));
3903 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->flags));
3904 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_params));
3905 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3906 NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0]));
3908 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
3910 if (ndr_flags & NDR_BUFFERS) {
3911 if (r->next) {
3912 NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
3914 NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name));
3915 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3916 NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0]));
3919 return NDR_ERR_SUCCESS;
3922 _PUBLIC_ enum ndr_err_code ndr_pull_ExtendedErrorInfo(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfo *r)
3924 uint32_t _ptr_next;
3925 TALLOC_CTX *_mem_save_next_0;
3926 uint32_t cntr_params_0;
3927 TALLOC_CTX *_mem_save_params_0;
3928 if (ndr_flags & NDR_SCALARS) {
3929 NDR_CHECK(ndr_pull_array_size(ndr, &r->params));
3930 NDR_CHECK(ndr_pull_align(ndr, 8));
3931 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next));
3932 if (_ptr_next) {
3933 NDR_PULL_ALLOC(ndr, r->next);
3934 } else {
3935 r->next = NULL;
3937 NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name));
3938 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->pid));
3939 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time));
3940 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->generating_component));
3941 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status));
3942 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->detection_location));
3943 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags));
3944 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_params));
3945 NDR_PULL_ALLOC_N(ndr, r->params, ndr_get_array_size(ndr, &r->params));
3946 _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr);
3947 NDR_PULL_SET_MEM_CTX(ndr, r->params, 0);
3948 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3949 NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0]));
3951 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0);
3952 if (r->params) {
3953 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->params, r->num_params));
3955 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
3957 if (ndr_flags & NDR_BUFFERS) {
3958 if (r->next) {
3959 _mem_save_next_0 = NDR_PULL_GET_MEM_CTX(ndr);
3960 NDR_PULL_SET_MEM_CTX(ndr, r->next, 0);
3961 NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
3962 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_0, 0);
3964 NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name));
3965 _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr);
3966 NDR_PULL_SET_MEM_CTX(ndr, r->params, 0);
3967 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3968 NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0]));
3970 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0);
3972 return NDR_ERR_SUCCESS;
3975 _PUBLIC_ void ndr_print_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfo *r)
3977 uint32_t cntr_params_0;
3978 ndr_print_struct(ndr, name, "ExtendedErrorInfo");
3979 ndr->depth++;
3980 ndr_print_ptr(ndr, "next", r->next);
3981 ndr->depth++;
3982 if (r->next) {
3983 ndr_print_ExtendedErrorInfo(ndr, "next", r->next);
3985 ndr->depth--;
3986 ndr_print_ExtendedErrorComputerName(ndr, "computer_name", &r->computer_name);
3987 ndr_print_hyper(ndr, "pid", r->pid);
3988 ndr_print_NTTIME(ndr, "time", r->time);
3989 ndr_print_uint32(ndr, "generating_component", r->generating_component);
3990 ndr_print_WERROR(ndr, "status", r->status);
3991 ndr_print_uint16(ndr, "detection_location", r->detection_location);
3992 ndr_print_uint16(ndr, "flags", r->flags);
3993 ndr_print_uint16(ndr, "num_params", r->num_params);
3994 ndr->print(ndr, "%s: ARRAY(%d)", "params", (int)r->num_params);
3995 ndr->depth++;
3996 for (cntr_params_0=0;cntr_params_0<r->num_params;cntr_params_0++) {
3997 char *idx_0=NULL;
3998 if (asprintf(&idx_0, "[%d]", cntr_params_0) != -1) {
3999 ndr_print_ExtendedErrorParam(ndr, "params", &r->params[cntr_params_0]);
4000 free(idx_0);
4003 ndr->depth--;
4004 ndr->depth--;
4007 static enum ndr_err_code ndr_push_ExtendedErrorInfoPtr(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfoPtr *r)
4009 if (ndr_flags & NDR_SCALARS) {
4010 NDR_CHECK(ndr_push_align(ndr, 5));
4011 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
4012 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4014 if (ndr_flags & NDR_BUFFERS) {
4015 if (r->info) {
4016 NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
4019 return NDR_ERR_SUCCESS;
4022 static enum ndr_err_code ndr_pull_ExtendedErrorInfoPtr(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfoPtr *r)
4024 uint32_t _ptr_info;
4025 TALLOC_CTX *_mem_save_info_0;
4026 if (ndr_flags & NDR_SCALARS) {
4027 NDR_CHECK(ndr_pull_align(ndr, 5));
4028 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
4029 if (_ptr_info) {
4030 NDR_PULL_ALLOC(ndr, r->info);
4031 } else {
4032 r->info = NULL;
4034 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4036 if (ndr_flags & NDR_BUFFERS) {
4037 if (r->info) {
4038 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
4039 NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
4040 NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
4041 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
4044 return NDR_ERR_SUCCESS;
4047 _PUBLIC_ void ndr_print_ExtendedErrorInfoPtr(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfoPtr *r)
4049 ndr_print_struct(ndr, name, "ExtendedErrorInfoPtr");
4050 ndr->depth++;
4051 ndr_print_ptr(ndr, "info", r->info);
4052 ndr->depth++;
4053 if (r->info) {
4054 ndr_print_ExtendedErrorInfo(ndr, "info", r->info);
4056 ndr->depth--;
4057 ndr->depth--;
4060 static enum ndr_err_code ndr_push_decode_replPropertyMetaData(struct ndr_push *ndr, int flags, const struct decode_replPropertyMetaData *r)
4062 if (flags & NDR_IN) {
4063 NDR_CHECK(ndr_push_replPropertyMetaDataBlob(ndr, NDR_SCALARS, &r->in.blob));
4065 if (flags & NDR_OUT) {
4067 return NDR_ERR_SUCCESS;
4070 static enum ndr_err_code ndr_pull_decode_replPropertyMetaData(struct ndr_pull *ndr, int flags, struct decode_replPropertyMetaData *r)
4072 if (flags & NDR_IN) {
4073 NDR_CHECK(ndr_pull_replPropertyMetaDataBlob(ndr, NDR_SCALARS, &r->in.blob));
4075 if (flags & NDR_OUT) {
4077 return NDR_ERR_SUCCESS;
4080 _PUBLIC_ void ndr_print_decode_replPropertyMetaData(struct ndr_print *ndr, const char *name, int flags, const struct decode_replPropertyMetaData *r)
4082 ndr_print_struct(ndr, name, "decode_replPropertyMetaData");
4083 ndr->depth++;
4084 if (flags & NDR_SET_VALUES) {
4085 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4087 if (flags & NDR_IN) {
4088 ndr_print_struct(ndr, "in", "decode_replPropertyMetaData");
4089 ndr->depth++;
4090 ndr_print_replPropertyMetaDataBlob(ndr, "blob", &r->in.blob);
4091 ndr->depth--;
4093 if (flags & NDR_OUT) {
4094 ndr_print_struct(ndr, "out", "decode_replPropertyMetaData");
4095 ndr->depth++;
4096 ndr->depth--;
4098 ndr->depth--;
4101 static enum ndr_err_code ndr_push_decode_replUpToDateVector(struct ndr_push *ndr, int flags, const struct decode_replUpToDateVector *r)
4103 if (flags & NDR_IN) {
4104 NDR_CHECK(ndr_push_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->in.blob));
4106 if (flags & NDR_OUT) {
4108 return NDR_ERR_SUCCESS;
4111 static enum ndr_err_code ndr_pull_decode_replUpToDateVector(struct ndr_pull *ndr, int flags, struct decode_replUpToDateVector *r)
4113 if (flags & NDR_IN) {
4114 NDR_CHECK(ndr_pull_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->in.blob));
4116 if (flags & NDR_OUT) {
4118 return NDR_ERR_SUCCESS;
4121 _PUBLIC_ void ndr_print_decode_replUpToDateVector(struct ndr_print *ndr, const char *name, int flags, const struct decode_replUpToDateVector *r)
4123 ndr_print_struct(ndr, name, "decode_replUpToDateVector");
4124 ndr->depth++;
4125 if (flags & NDR_SET_VALUES) {
4126 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4128 if (flags & NDR_IN) {
4129 ndr_print_struct(ndr, "in", "decode_replUpToDateVector");
4130 ndr->depth++;
4131 ndr_print_replUpToDateVectorBlob(ndr, "blob", &r->in.blob);
4132 ndr->depth--;
4134 if (flags & NDR_OUT) {
4135 ndr_print_struct(ndr, "out", "decode_replUpToDateVector");
4136 ndr->depth++;
4137 ndr->depth--;
4139 ndr->depth--;
4142 static enum ndr_err_code ndr_push_decode_repsFromTo(struct ndr_push *ndr, int flags, const struct decode_repsFromTo *r)
4144 if (flags & NDR_IN) {
4145 NDR_CHECK(ndr_push_repsFromToBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4147 if (flags & NDR_OUT) {
4149 return NDR_ERR_SUCCESS;
4152 static enum ndr_err_code ndr_pull_decode_repsFromTo(struct ndr_pull *ndr, int flags, struct decode_repsFromTo *r)
4154 if (flags & NDR_IN) {
4155 NDR_CHECK(ndr_pull_repsFromToBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4157 if (flags & NDR_OUT) {
4159 return NDR_ERR_SUCCESS;
4162 _PUBLIC_ void ndr_print_decode_repsFromTo(struct ndr_print *ndr, const char *name, int flags, const struct decode_repsFromTo *r)
4164 ndr_print_struct(ndr, name, "decode_repsFromTo");
4165 ndr->depth++;
4166 if (flags & NDR_SET_VALUES) {
4167 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4169 if (flags & NDR_IN) {
4170 ndr_print_struct(ndr, "in", "decode_repsFromTo");
4171 ndr->depth++;
4172 ndr_print_repsFromToBlob(ndr, "blob", &r->in.blob);
4173 ndr->depth--;
4175 if (flags & NDR_OUT) {
4176 ndr_print_struct(ndr, "out", "decode_repsFromTo");
4177 ndr->depth++;
4178 ndr->depth--;
4180 ndr->depth--;
4183 static enum ndr_err_code ndr_push_decode_partialAttributeSet(struct ndr_push *ndr, int flags, const struct decode_partialAttributeSet *r)
4185 if (flags & NDR_IN) {
4186 NDR_CHECK(ndr_push_partialAttributeSetBlob(ndr, NDR_SCALARS, &r->in.blob));
4188 if (flags & NDR_OUT) {
4190 return NDR_ERR_SUCCESS;
4193 static enum ndr_err_code ndr_pull_decode_partialAttributeSet(struct ndr_pull *ndr, int flags, struct decode_partialAttributeSet *r)
4195 if (flags & NDR_IN) {
4196 NDR_CHECK(ndr_pull_partialAttributeSetBlob(ndr, NDR_SCALARS, &r->in.blob));
4198 if (flags & NDR_OUT) {
4200 return NDR_ERR_SUCCESS;
4203 _PUBLIC_ void ndr_print_decode_partialAttributeSet(struct ndr_print *ndr, const char *name, int flags, const struct decode_partialAttributeSet *r)
4205 ndr_print_struct(ndr, name, "decode_partialAttributeSet");
4206 ndr->depth++;
4207 if (flags & NDR_SET_VALUES) {
4208 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4210 if (flags & NDR_IN) {
4211 ndr_print_struct(ndr, "in", "decode_partialAttributeSet");
4212 ndr->depth++;
4213 ndr_print_partialAttributeSetBlob(ndr, "blob", &r->in.blob);
4214 ndr->depth--;
4216 if (flags & NDR_OUT) {
4217 ndr_print_struct(ndr, "out", "decode_partialAttributeSet");
4218 ndr->depth++;
4219 ndr->depth--;
4221 ndr->depth--;
4224 static enum ndr_err_code ndr_push_decode_prefixMap(struct ndr_push *ndr, int flags, const struct decode_prefixMap *r)
4226 if (flags & NDR_IN) {
4227 NDR_CHECK(ndr_push_prefixMapBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4229 if (flags & NDR_OUT) {
4231 return NDR_ERR_SUCCESS;
4234 static enum ndr_err_code ndr_pull_decode_prefixMap(struct ndr_pull *ndr, int flags, struct decode_prefixMap *r)
4236 if (flags & NDR_IN) {
4237 NDR_CHECK(ndr_pull_prefixMapBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4239 if (flags & NDR_OUT) {
4241 return NDR_ERR_SUCCESS;
4244 _PUBLIC_ void ndr_print_decode_prefixMap(struct ndr_print *ndr, const char *name, int flags, const struct decode_prefixMap *r)
4246 ndr_print_struct(ndr, name, "decode_prefixMap");
4247 ndr->depth++;
4248 if (flags & NDR_SET_VALUES) {
4249 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4251 if (flags & NDR_IN) {
4252 ndr_print_struct(ndr, "in", "decode_prefixMap");
4253 ndr->depth++;
4254 ndr_print_prefixMapBlob(ndr, "blob", &r->in.blob);
4255 ndr->depth--;
4257 if (flags & NDR_OUT) {
4258 ndr_print_struct(ndr, "out", "decode_prefixMap");
4259 ndr->depth++;
4260 ndr->depth--;
4262 ndr->depth--;
4265 static enum ndr_err_code ndr_push_decode_ldapControlDirSync(struct ndr_push *ndr, int flags, const struct decode_ldapControlDirSync *r)
4267 if (flags & NDR_IN) {
4268 NDR_CHECK(ndr_push_ldapControlDirSyncCookie(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.cookie));
4270 if (flags & NDR_OUT) {
4272 return NDR_ERR_SUCCESS;
4275 static enum ndr_err_code ndr_pull_decode_ldapControlDirSync(struct ndr_pull *ndr, int flags, struct decode_ldapControlDirSync *r)
4277 if (flags & NDR_IN) {
4278 NDR_CHECK(ndr_pull_ldapControlDirSyncCookie(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.cookie));
4280 if (flags & NDR_OUT) {
4282 return NDR_ERR_SUCCESS;
4285 _PUBLIC_ void ndr_print_decode_ldapControlDirSync(struct ndr_print *ndr, const char *name, int flags, const struct decode_ldapControlDirSync *r)
4287 ndr_print_struct(ndr, name, "decode_ldapControlDirSync");
4288 ndr->depth++;
4289 if (flags & NDR_SET_VALUES) {
4290 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4292 if (flags & NDR_IN) {
4293 ndr_print_struct(ndr, "in", "decode_ldapControlDirSync");
4294 ndr->depth++;
4295 ndr_print_ldapControlDirSyncCookie(ndr, "cookie", &r->in.cookie);
4296 ndr->depth--;
4298 if (flags & NDR_OUT) {
4299 ndr_print_struct(ndr, "out", "decode_ldapControlDirSync");
4300 ndr->depth++;
4301 ndr->depth--;
4303 ndr->depth--;
4306 static enum ndr_err_code ndr_push_decode_supplementalCredentials(struct ndr_push *ndr, int flags, const struct decode_supplementalCredentials *r)
4308 if (flags & NDR_IN) {
4309 NDR_CHECK(ndr_push_supplementalCredentialsBlob(ndr, NDR_SCALARS, &r->in.blob));
4311 if (flags & NDR_OUT) {
4313 return NDR_ERR_SUCCESS;
4316 static enum ndr_err_code ndr_pull_decode_supplementalCredentials(struct ndr_pull *ndr, int flags, struct decode_supplementalCredentials *r)
4318 if (flags & NDR_IN) {
4319 NDR_CHECK(ndr_pull_supplementalCredentialsBlob(ndr, NDR_SCALARS, &r->in.blob));
4321 if (flags & NDR_OUT) {
4323 return NDR_ERR_SUCCESS;
4326 _PUBLIC_ void ndr_print_decode_supplementalCredentials(struct ndr_print *ndr, const char *name, int flags, const struct decode_supplementalCredentials *r)
4328 ndr_print_struct(ndr, name, "decode_supplementalCredentials");
4329 ndr->depth++;
4330 if (flags & NDR_SET_VALUES) {
4331 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4333 if (flags & NDR_IN) {
4334 ndr_print_struct(ndr, "in", "decode_supplementalCredentials");
4335 ndr->depth++;
4336 ndr_print_supplementalCredentialsBlob(ndr, "blob", &r->in.blob);
4337 ndr->depth--;
4339 if (flags & NDR_OUT) {
4340 ndr_print_struct(ndr, "out", "decode_supplementalCredentials");
4341 ndr->depth++;
4342 ndr->depth--;
4344 ndr->depth--;
4347 static enum ndr_err_code ndr_push_decode_Packages(struct ndr_push *ndr, int flags, const struct decode_Packages *r)
4349 if (flags & NDR_IN) {
4350 NDR_CHECK(ndr_push_package_PackagesBlob(ndr, NDR_SCALARS, &r->in.blob));
4352 if (flags & NDR_OUT) {
4354 return NDR_ERR_SUCCESS;
4357 static enum ndr_err_code ndr_pull_decode_Packages(struct ndr_pull *ndr, int flags, struct decode_Packages *r)
4359 if (flags & NDR_IN) {
4360 NDR_CHECK(ndr_pull_package_PackagesBlob(ndr, NDR_SCALARS, &r->in.blob));
4362 if (flags & NDR_OUT) {
4364 return NDR_ERR_SUCCESS;
4367 _PUBLIC_ void ndr_print_decode_Packages(struct ndr_print *ndr, const char *name, int flags, const struct decode_Packages *r)
4369 ndr_print_struct(ndr, name, "decode_Packages");
4370 ndr->depth++;
4371 if (flags & NDR_SET_VALUES) {
4372 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4374 if (flags & NDR_IN) {
4375 ndr_print_struct(ndr, "in", "decode_Packages");
4376 ndr->depth++;
4377 ndr_print_package_PackagesBlob(ndr, "blob", &r->in.blob);
4378 ndr->depth--;
4380 if (flags & NDR_OUT) {
4381 ndr_print_struct(ndr, "out", "decode_Packages");
4382 ndr->depth++;
4383 ndr->depth--;
4385 ndr->depth--;
4388 static enum ndr_err_code ndr_push_decode_PrimaryKerberos(struct ndr_push *ndr, int flags, const struct decode_PrimaryKerberos *r)
4390 if (flags & NDR_IN) {
4391 NDR_CHECK(ndr_push_package_PrimaryKerberosBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4393 if (flags & NDR_OUT) {
4395 return NDR_ERR_SUCCESS;
4398 static enum ndr_err_code ndr_pull_decode_PrimaryKerberos(struct ndr_pull *ndr, int flags, struct decode_PrimaryKerberos *r)
4400 if (flags & NDR_IN) {
4401 NDR_CHECK(ndr_pull_package_PrimaryKerberosBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4403 if (flags & NDR_OUT) {
4405 return NDR_ERR_SUCCESS;
4408 _PUBLIC_ void ndr_print_decode_PrimaryKerberos(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryKerberos *r)
4410 ndr_print_struct(ndr, name, "decode_PrimaryKerberos");
4411 ndr->depth++;
4412 if (flags & NDR_SET_VALUES) {
4413 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4415 if (flags & NDR_IN) {
4416 ndr_print_struct(ndr, "in", "decode_PrimaryKerberos");
4417 ndr->depth++;
4418 ndr_print_package_PrimaryKerberosBlob(ndr, "blob", &r->in.blob);
4419 ndr->depth--;
4421 if (flags & NDR_OUT) {
4422 ndr_print_struct(ndr, "out", "decode_PrimaryKerberos");
4423 ndr->depth++;
4424 ndr->depth--;
4426 ndr->depth--;
4429 static enum ndr_err_code ndr_push_decode_PrimaryCLEARTEXT(struct ndr_push *ndr, int flags, const struct decode_PrimaryCLEARTEXT *r)
4431 if (flags & NDR_IN) {
4432 NDR_CHECK(ndr_push_package_PrimaryCLEARTEXTBlob(ndr, NDR_SCALARS, &r->in.blob));
4434 if (flags & NDR_OUT) {
4436 return NDR_ERR_SUCCESS;
4439 static enum ndr_err_code ndr_pull_decode_PrimaryCLEARTEXT(struct ndr_pull *ndr, int flags, struct decode_PrimaryCLEARTEXT *r)
4441 if (flags & NDR_IN) {
4442 NDR_CHECK(ndr_pull_package_PrimaryCLEARTEXTBlob(ndr, NDR_SCALARS, &r->in.blob));
4444 if (flags & NDR_OUT) {
4446 return NDR_ERR_SUCCESS;
4449 _PUBLIC_ void ndr_print_decode_PrimaryCLEARTEXT(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryCLEARTEXT *r)
4451 ndr_print_struct(ndr, name, "decode_PrimaryCLEARTEXT");
4452 ndr->depth++;
4453 if (flags & NDR_SET_VALUES) {
4454 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4456 if (flags & NDR_IN) {
4457 ndr_print_struct(ndr, "in", "decode_PrimaryCLEARTEXT");
4458 ndr->depth++;
4459 ndr_print_package_PrimaryCLEARTEXTBlob(ndr, "blob", &r->in.blob);
4460 ndr->depth--;
4462 if (flags & NDR_OUT) {
4463 ndr_print_struct(ndr, "out", "decode_PrimaryCLEARTEXT");
4464 ndr->depth++;
4465 ndr->depth--;
4467 ndr->depth--;
4470 static enum ndr_err_code ndr_push_decode_PrimaryWDigest(struct ndr_push *ndr, int flags, const struct decode_PrimaryWDigest *r)
4472 if (flags & NDR_IN) {
4473 NDR_CHECK(ndr_push_package_PrimaryWDigestBlob(ndr, NDR_SCALARS, &r->in.blob));
4475 if (flags & NDR_OUT) {
4477 return NDR_ERR_SUCCESS;
4480 static enum ndr_err_code ndr_pull_decode_PrimaryWDigest(struct ndr_pull *ndr, int flags, struct decode_PrimaryWDigest *r)
4482 if (flags & NDR_IN) {
4483 NDR_CHECK(ndr_pull_package_PrimaryWDigestBlob(ndr, NDR_SCALARS, &r->in.blob));
4485 if (flags & NDR_OUT) {
4487 return NDR_ERR_SUCCESS;
4490 _PUBLIC_ void ndr_print_decode_PrimaryWDigest(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryWDigest *r)
4492 ndr_print_struct(ndr, name, "decode_PrimaryWDigest");
4493 ndr->depth++;
4494 if (flags & NDR_SET_VALUES) {
4495 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4497 if (flags & NDR_IN) {
4498 ndr_print_struct(ndr, "in", "decode_PrimaryWDigest");
4499 ndr->depth++;
4500 ndr_print_package_PrimaryWDigestBlob(ndr, "blob", &r->in.blob);
4501 ndr->depth--;
4503 if (flags & NDR_OUT) {
4504 ndr_print_struct(ndr, "out", "decode_PrimaryWDigest");
4505 ndr->depth++;
4506 ndr->depth--;
4508 ndr->depth--;
4511 static enum ndr_err_code ndr_push_decode_trustAuthInOut(struct ndr_push *ndr, int flags, const struct decode_trustAuthInOut *r)
4513 if (flags & NDR_IN) {
4514 NDR_CHECK(ndr_push_trustAuthInOutBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4516 if (flags & NDR_OUT) {
4518 return NDR_ERR_SUCCESS;
4521 static enum ndr_err_code ndr_pull_decode_trustAuthInOut(struct ndr_pull *ndr, int flags, struct decode_trustAuthInOut *r)
4523 if (flags & NDR_IN) {
4524 NDR_CHECK(ndr_pull_trustAuthInOutBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4526 if (flags & NDR_OUT) {
4528 return NDR_ERR_SUCCESS;
4531 _PUBLIC_ void ndr_print_decode_trustAuthInOut(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustAuthInOut *r)
4533 ndr_print_struct(ndr, name, "decode_trustAuthInOut");
4534 ndr->depth++;
4535 if (flags & NDR_SET_VALUES) {
4536 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4538 if (flags & NDR_IN) {
4539 ndr_print_struct(ndr, "in", "decode_trustAuthInOut");
4540 ndr->depth++;
4541 ndr_print_trustAuthInOutBlob(ndr, "blob", &r->in.blob);
4542 ndr->depth--;
4544 if (flags & NDR_OUT) {
4545 ndr_print_struct(ndr, "out", "decode_trustAuthInOut");
4546 ndr->depth++;
4547 ndr->depth--;
4549 ndr->depth--;
4552 static enum ndr_err_code ndr_push_decode_trustDomainPasswords(struct ndr_push *ndr, int flags, const struct decode_trustDomainPasswords *r)
4554 if (flags & NDR_IN) {
4555 NDR_CHECK(ndr_push_trustDomainPasswords(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4557 if (flags & NDR_OUT) {
4559 return NDR_ERR_SUCCESS;
4562 static enum ndr_err_code ndr_pull_decode_trustDomainPasswords(struct ndr_pull *ndr, int flags, struct decode_trustDomainPasswords *r)
4564 if (flags & NDR_IN) {
4565 NDR_CHECK(ndr_pull_trustDomainPasswords(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4567 if (flags & NDR_OUT) {
4569 return NDR_ERR_SUCCESS;
4572 _PUBLIC_ void ndr_print_decode_trustDomainPasswords(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustDomainPasswords *r)
4574 ndr_print_struct(ndr, name, "decode_trustDomainPasswords");
4575 ndr->depth++;
4576 if (flags & NDR_SET_VALUES) {
4577 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4579 if (flags & NDR_IN) {
4580 ndr_print_struct(ndr, "in", "decode_trustDomainPasswords");
4581 ndr->depth++;
4582 ndr_print_trustDomainPasswords(ndr, "blob", &r->in.blob);
4583 ndr->depth--;
4585 if (flags & NDR_OUT) {
4586 ndr_print_struct(ndr, "out", "decode_trustDomainPasswords");
4587 ndr->depth++;
4588 ndr->depth--;
4590 ndr->depth--;
4593 static enum ndr_err_code ndr_push_decode_ExtendedErrorInfo(struct ndr_push *ndr, int flags, const struct decode_ExtendedErrorInfo *r)
4595 if (flags & NDR_IN) {
4597 struct ndr_push *_ndr_ptr;
4598 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ptr, 0xFFFFFC01, -1));
4599 NDR_CHECK(ndr_push_ExtendedErrorInfoPtr(_ndr_ptr, NDR_SCALARS|NDR_BUFFERS, &r->in.ptr));
4600 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ptr, 0xFFFFFC01, -1));
4603 if (flags & NDR_OUT) {
4605 return NDR_ERR_SUCCESS;
4608 static enum ndr_err_code ndr_pull_decode_ExtendedErrorInfo(struct ndr_pull *ndr, int flags, struct decode_ExtendedErrorInfo *r)
4610 if (flags & NDR_IN) {
4612 struct ndr_pull *_ndr_ptr;
4613 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ptr, 0xFFFFFC01, -1));
4614 NDR_CHECK(ndr_pull_ExtendedErrorInfoPtr(_ndr_ptr, NDR_SCALARS|NDR_BUFFERS, &r->in.ptr));
4615 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ptr, 0xFFFFFC01, -1));
4618 if (flags & NDR_OUT) {
4620 return NDR_ERR_SUCCESS;
4623 _PUBLIC_ void ndr_print_decode_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, int flags, const struct decode_ExtendedErrorInfo *r)
4625 ndr_print_struct(ndr, name, "decode_ExtendedErrorInfo");
4626 ndr->depth++;
4627 if (flags & NDR_SET_VALUES) {
4628 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4630 if (flags & NDR_IN) {
4631 ndr_print_struct(ndr, "in", "decode_ExtendedErrorInfo");
4632 ndr->depth++;
4633 ndr_print_ExtendedErrorInfoPtr(ndr, "ptr", &r->in.ptr);
4634 ndr->depth--;
4636 if (flags & NDR_OUT) {
4637 ndr_print_struct(ndr, "out", "decode_ExtendedErrorInfo");
4638 ndr->depth++;
4639 ndr->depth--;
4641 ndr->depth--;
4644 static const struct ndr_interface_call drsblobs_calls[] = {
4646 "decode_replPropertyMetaData",
4647 sizeof(struct decode_replPropertyMetaData),
4648 (ndr_push_flags_fn_t) ndr_push_decode_replPropertyMetaData,
4649 (ndr_pull_flags_fn_t) ndr_pull_decode_replPropertyMetaData,
4650 (ndr_print_function_t) ndr_print_decode_replPropertyMetaData,
4651 false,
4654 "decode_replUpToDateVector",
4655 sizeof(struct decode_replUpToDateVector),
4656 (ndr_push_flags_fn_t) ndr_push_decode_replUpToDateVector,
4657 (ndr_pull_flags_fn_t) ndr_pull_decode_replUpToDateVector,
4658 (ndr_print_function_t) ndr_print_decode_replUpToDateVector,
4659 false,
4662 "decode_repsFromTo",
4663 sizeof(struct decode_repsFromTo),
4664 (ndr_push_flags_fn_t) ndr_push_decode_repsFromTo,
4665 (ndr_pull_flags_fn_t) ndr_pull_decode_repsFromTo,
4666 (ndr_print_function_t) ndr_print_decode_repsFromTo,
4667 false,
4670 "decode_partialAttributeSet",
4671 sizeof(struct decode_partialAttributeSet),
4672 (ndr_push_flags_fn_t) ndr_push_decode_partialAttributeSet,
4673 (ndr_pull_flags_fn_t) ndr_pull_decode_partialAttributeSet,
4674 (ndr_print_function_t) ndr_print_decode_partialAttributeSet,
4675 false,
4678 "decode_prefixMap",
4679 sizeof(struct decode_prefixMap),
4680 (ndr_push_flags_fn_t) ndr_push_decode_prefixMap,
4681 (ndr_pull_flags_fn_t) ndr_pull_decode_prefixMap,
4682 (ndr_print_function_t) ndr_print_decode_prefixMap,
4683 false,
4686 "decode_ldapControlDirSync",
4687 sizeof(struct decode_ldapControlDirSync),
4688 (ndr_push_flags_fn_t) ndr_push_decode_ldapControlDirSync,
4689 (ndr_pull_flags_fn_t) ndr_pull_decode_ldapControlDirSync,
4690 (ndr_print_function_t) ndr_print_decode_ldapControlDirSync,
4691 false,
4694 "decode_supplementalCredentials",
4695 sizeof(struct decode_supplementalCredentials),
4696 (ndr_push_flags_fn_t) ndr_push_decode_supplementalCredentials,
4697 (ndr_pull_flags_fn_t) ndr_pull_decode_supplementalCredentials,
4698 (ndr_print_function_t) ndr_print_decode_supplementalCredentials,
4699 false,
4702 "decode_Packages",
4703 sizeof(struct decode_Packages),
4704 (ndr_push_flags_fn_t) ndr_push_decode_Packages,
4705 (ndr_pull_flags_fn_t) ndr_pull_decode_Packages,
4706 (ndr_print_function_t) ndr_print_decode_Packages,
4707 false,
4710 "decode_PrimaryKerberos",
4711 sizeof(struct decode_PrimaryKerberos),
4712 (ndr_push_flags_fn_t) ndr_push_decode_PrimaryKerberos,
4713 (ndr_pull_flags_fn_t) ndr_pull_decode_PrimaryKerberos,
4714 (ndr_print_function_t) ndr_print_decode_PrimaryKerberos,
4715 false,
4718 "decode_PrimaryCLEARTEXT",
4719 sizeof(struct decode_PrimaryCLEARTEXT),
4720 (ndr_push_flags_fn_t) ndr_push_decode_PrimaryCLEARTEXT,
4721 (ndr_pull_flags_fn_t) ndr_pull_decode_PrimaryCLEARTEXT,
4722 (ndr_print_function_t) ndr_print_decode_PrimaryCLEARTEXT,
4723 false,
4726 "decode_PrimaryWDigest",
4727 sizeof(struct decode_PrimaryWDigest),
4728 (ndr_push_flags_fn_t) ndr_push_decode_PrimaryWDigest,
4729 (ndr_pull_flags_fn_t) ndr_pull_decode_PrimaryWDigest,
4730 (ndr_print_function_t) ndr_print_decode_PrimaryWDigest,
4731 false,
4734 "decode_trustAuthInOut",
4735 sizeof(struct decode_trustAuthInOut),
4736 (ndr_push_flags_fn_t) ndr_push_decode_trustAuthInOut,
4737 (ndr_pull_flags_fn_t) ndr_pull_decode_trustAuthInOut,
4738 (ndr_print_function_t) ndr_print_decode_trustAuthInOut,
4739 false,
4742 "decode_trustDomainPasswords",
4743 sizeof(struct decode_trustDomainPasswords),
4744 (ndr_push_flags_fn_t) ndr_push_decode_trustDomainPasswords,
4745 (ndr_pull_flags_fn_t) ndr_pull_decode_trustDomainPasswords,
4746 (ndr_print_function_t) ndr_print_decode_trustDomainPasswords,
4747 false,
4750 "decode_ExtendedErrorInfo",
4751 sizeof(struct decode_ExtendedErrorInfo),
4752 (ndr_push_flags_fn_t) ndr_push_decode_ExtendedErrorInfo,
4753 (ndr_pull_flags_fn_t) ndr_pull_decode_ExtendedErrorInfo,
4754 (ndr_print_function_t) ndr_print_decode_ExtendedErrorInfo,
4755 false,
4757 { NULL, 0, NULL, NULL, NULL, false }
4760 static const char * const drsblobs_endpoint_strings[] = {
4761 "ncacn_np:[\\pipe\\drsblobs]",
4764 static const struct ndr_interface_string_array drsblobs_endpoints = {
4765 .count = 1,
4766 .names = drsblobs_endpoint_strings
4769 static const char * const drsblobs_authservice_strings[] = {
4770 "host",
4773 static const struct ndr_interface_string_array drsblobs_authservices = {
4774 .count = 1,
4775 .names = drsblobs_authservice_strings
4779 const struct ndr_interface_table ndr_table_drsblobs = {
4780 .name = "drsblobs",
4781 .syntax_id = {
4782 {0x12345778,0x1234,0xabcd,{0x00,0x01},{0x00,0x00,0x00,0x01}},
4783 NDR_DRSBLOBS_VERSION
4785 .helpstring = NDR_DRSBLOBS_HELPSTRING,
4786 .num_calls = 14,
4787 .calls = drsblobs_calls,
4788 .endpoints = &drsblobs_endpoints,
4789 .authservices = &drsblobs_authservices