drsuapi: rerun make idl and add drsblobs generated files.
[kai/samba-autobuild/.git] / source / librpc / gen_ndr / ndr_drsblobs.c
1 /* parser auto-generated by pidl */
2
3 #include "includes.h"
4 #include "librpc/gen_ndr/ndr_drsblobs.h"
5
6 #include "librpc/gen_ndr/ndr_drsuapi.h"
7 #include "librpc/gen_ndr/ndr_misc.h"
8 static enum ndr_err_code ndr_push_replPropertyMetaData1(struct ndr_push *ndr, int ndr_flags, const struct replPropertyMetaData1 *r)
9 {
10         if (ndr_flags & NDR_SCALARS) {
11                 NDR_CHECK(ndr_push_align(ndr, 8));
12                 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attid));
13                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
14                 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->originating_change_time));
15                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
16                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn));
17                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->local_usn));
18         }
19         if (ndr_flags & NDR_BUFFERS) {
20         }
21         return NDR_ERR_SUCCESS;
22 }
23
24 static enum ndr_err_code ndr_pull_replPropertyMetaData1(struct ndr_pull *ndr, int ndr_flags, struct replPropertyMetaData1 *r)
25 {
26         if (ndr_flags & NDR_SCALARS) {
27                 NDR_CHECK(ndr_pull_align(ndr, 8));
28                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attid));
29                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
30                 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->originating_change_time));
31                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
32                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn));
33                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->local_usn));
34         }
35         if (ndr_flags & NDR_BUFFERS) {
36         }
37         return NDR_ERR_SUCCESS;
38 }
39
40 _PUBLIC_ void ndr_print_replPropertyMetaData1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaData1 *r)
41 {
42         ndr_print_struct(ndr, name, "replPropertyMetaData1");
43         ndr->depth++;
44         ndr_print_drsuapi_DsAttributeId(ndr, "attid", r->attid);
45         ndr_print_uint32(ndr, "version", r->version);
46         ndr_print_NTTIME_1sec(ndr, "originating_change_time", r->originating_change_time);
47         ndr_print_GUID(ndr, "originating_invocation_id", &r->originating_invocation_id);
48         ndr_print_hyper(ndr, "originating_usn", r->originating_usn);
49         ndr_print_hyper(ndr, "local_usn", r->local_usn);
50         ndr->depth--;
51 }
52
53 static enum ndr_err_code ndr_push_replPropertyMetaDataCtr1(struct ndr_push *ndr, int ndr_flags, const struct replPropertyMetaDataCtr1 *r)
54 {
55         uint32_t cntr_array_0;
56         if (ndr_flags & NDR_SCALARS) {
57                 NDR_CHECK(ndr_push_align(ndr, 8));
58                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
59                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
60                 for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) {
61                         NDR_CHECK(ndr_push_replPropertyMetaData1(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
62                 }
63         }
64         if (ndr_flags & NDR_BUFFERS) {
65         }
66         return NDR_ERR_SUCCESS;
67 }
68
69 static enum ndr_err_code ndr_pull_replPropertyMetaDataCtr1(struct ndr_pull *ndr, int ndr_flags, struct replPropertyMetaDataCtr1 *r)
70 {
71         uint32_t cntr_array_0;
72         TALLOC_CTX *_mem_save_array_0;
73         if (ndr_flags & NDR_SCALARS) {
74                 NDR_CHECK(ndr_pull_align(ndr, 8));
75                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
76                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
77                 NDR_PULL_ALLOC_N(ndr, r->array, r->count);
78                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
79                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
80                 for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) {
81                         NDR_CHECK(ndr_pull_replPropertyMetaData1(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
82                 }
83                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
84         }
85         if (ndr_flags & NDR_BUFFERS) {
86         }
87         return NDR_ERR_SUCCESS;
88 }
89
90 _PUBLIC_ void ndr_print_replPropertyMetaDataCtr1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaDataCtr1 *r)
91 {
92         uint32_t cntr_array_0;
93         ndr_print_struct(ndr, name, "replPropertyMetaDataCtr1");
94         ndr->depth++;
95         ndr_print_uint32(ndr, "count", r->count);
96         ndr_print_uint32(ndr, "reserved", r->reserved);
97         ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
98         ndr->depth++;
99         for (cntr_array_0=0;cntr_array_0<r->count;cntr_array_0++) {
100                 char *idx_0=NULL;
101                 if (asprintf(&idx_0, "[%d]", cntr_array_0) != -1) {
102                         ndr_print_replPropertyMetaData1(ndr, "array", &r->array[cntr_array_0]);
103                         free(idx_0);
104                 }
105         }
106         ndr->depth--;
107         ndr->depth--;
108 }
109
110 static enum ndr_err_code ndr_push_replPropertyMetaDataCtr(struct ndr_push *ndr, int ndr_flags, const union replPropertyMetaDataCtr *r)
111 {
112         if (ndr_flags & NDR_SCALARS) {
113                 int level = ndr_push_get_switch_value(ndr, r);
114                 switch (level) {
115                         case 1: {
116                                 NDR_CHECK(ndr_push_replPropertyMetaDataCtr1(ndr, NDR_SCALARS, &r->ctr1));
117                         break; }
118
119                         default:
120                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
121                 }
122         }
123         if (ndr_flags & NDR_BUFFERS) {
124                 int level = ndr_push_get_switch_value(ndr, r);
125                 switch (level) {
126                         case 1:
127                         break;
128
129                         default:
130                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
131                 }
132         }
133         return NDR_ERR_SUCCESS;
134 }
135
136 static enum ndr_err_code ndr_pull_replPropertyMetaDataCtr(struct ndr_pull *ndr, int ndr_flags, union replPropertyMetaDataCtr *r)
137 {
138         int level;
139         level = ndr_pull_get_switch_value(ndr, r);
140         if (ndr_flags & NDR_SCALARS) {
141                 switch (level) {
142                         case 1: {
143                                 NDR_CHECK(ndr_pull_replPropertyMetaDataCtr1(ndr, NDR_SCALARS, &r->ctr1));
144                         break; }
145
146                         default:
147                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
148                 }
149         }
150         if (ndr_flags & NDR_BUFFERS) {
151                 switch (level) {
152                         case 1:
153                         break;
154
155                         default:
156                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
157                 }
158         }
159         return NDR_ERR_SUCCESS;
160 }
161
162 _PUBLIC_ void ndr_print_replPropertyMetaDataCtr(struct ndr_print *ndr, const char *name, const union replPropertyMetaDataCtr *r)
163 {
164         int level;
165         level = ndr_print_get_switch_value(ndr, r);
166         ndr_print_union(ndr, name, level, "replPropertyMetaDataCtr");
167         switch (level) {
168                 case 1:
169                         ndr_print_replPropertyMetaDataCtr1(ndr, "ctr1", &r->ctr1);
170                 break;
171
172                 default:
173                         ndr_print_bad_level(ndr, name, level);
174         }
175 }
176
177 _PUBLIC_ enum ndr_err_code ndr_push_replPropertyMetaDataBlob(struct ndr_push *ndr, int ndr_flags, const struct replPropertyMetaDataBlob *r)
178 {
179         if (ndr_flags & NDR_SCALARS) {
180                 NDR_CHECK(ndr_push_align(ndr, 8));
181                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
182                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
183                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
184                 NDR_CHECK(ndr_push_replPropertyMetaDataCtr(ndr, NDR_SCALARS, &r->ctr));
185         }
186         if (ndr_flags & NDR_BUFFERS) {
187         }
188         return NDR_ERR_SUCCESS;
189 }
190
191 _PUBLIC_ enum ndr_err_code ndr_pull_replPropertyMetaDataBlob(struct ndr_pull *ndr, int ndr_flags, struct replPropertyMetaDataBlob *r)
192 {
193         if (ndr_flags & NDR_SCALARS) {
194                 NDR_CHECK(ndr_pull_align(ndr, 8));
195                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
196                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
197                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
198                 NDR_CHECK(ndr_pull_replPropertyMetaDataCtr(ndr, NDR_SCALARS, &r->ctr));
199         }
200         if (ndr_flags & NDR_BUFFERS) {
201         }
202         return NDR_ERR_SUCCESS;
203 }
204
205 _PUBLIC_ void ndr_print_replPropertyMetaDataBlob(struct ndr_print *ndr, const char *name, const struct replPropertyMetaDataBlob *r)
206 {
207         ndr_print_struct(ndr, name, "replPropertyMetaDataBlob");
208         ndr->depth++;
209         ndr_print_uint32(ndr, "version", r->version);
210         ndr_print_uint32(ndr, "reserved", r->reserved);
211         ndr_print_set_switch_value(ndr, &r->ctr, r->version);
212         ndr_print_replPropertyMetaDataCtr(ndr, "ctr", &r->ctr);
213         ndr->depth--;
214 }
215
216 static enum ndr_err_code ndr_push_replUpToDateVectorCtr1(struct ndr_push *ndr, int ndr_flags, const struct replUpToDateVectorCtr1 *r)
217 {
218         uint32_t cntr_cursors_0;
219         if (ndr_flags & NDR_SCALARS) {
220                 NDR_CHECK(ndr_push_align(ndr, 8));
221                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
222                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
223                 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
224                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
225                 }
226         }
227         if (ndr_flags & NDR_BUFFERS) {
228         }
229         return NDR_ERR_SUCCESS;
230 }
231
232 static enum ndr_err_code ndr_pull_replUpToDateVectorCtr1(struct ndr_pull *ndr, int ndr_flags, struct replUpToDateVectorCtr1 *r)
233 {
234         uint32_t cntr_cursors_0;
235         TALLOC_CTX *_mem_save_cursors_0;
236         if (ndr_flags & NDR_SCALARS) {
237                 NDR_CHECK(ndr_pull_align(ndr, 8));
238                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
239                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
240                 NDR_PULL_ALLOC_N(ndr, r->cursors, r->count);
241                 _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
242                 NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
243                 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
244                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
245                 }
246                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
247         }
248         if (ndr_flags & NDR_BUFFERS) {
249         }
250         return NDR_ERR_SUCCESS;
251 }
252
253 _PUBLIC_ void ndr_print_replUpToDateVectorCtr1(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorCtr1 *r)
254 {
255         uint32_t cntr_cursors_0;
256         ndr_print_struct(ndr, name, "replUpToDateVectorCtr1");
257         ndr->depth++;
258         ndr_print_uint32(ndr, "count", r->count);
259         ndr_print_uint32(ndr, "reserved", r->reserved);
260         ndr->print(ndr, "%s: ARRAY(%d)", "cursors", r->count);
261         ndr->depth++;
262         for (cntr_cursors_0=0;cntr_cursors_0<r->count;cntr_cursors_0++) {
263                 char *idx_0=NULL;
264                 if (asprintf(&idx_0, "[%d]", cntr_cursors_0) != -1) {
265                         ndr_print_drsuapi_DsReplicaCursor(ndr, "cursors", &r->cursors[cntr_cursors_0]);
266                         free(idx_0);
267                 }
268         }
269         ndr->depth--;
270         ndr->depth--;
271 }
272
273 static enum ndr_err_code ndr_push_replUpToDateVectorCtr2(struct ndr_push *ndr, int ndr_flags, const struct replUpToDateVectorCtr2 *r)
274 {
275         uint32_t cntr_cursors_0;
276         if (ndr_flags & NDR_SCALARS) {
277                 NDR_CHECK(ndr_push_align(ndr, 8));
278                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
279                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
280                 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
281                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
282                 }
283         }
284         if (ndr_flags & NDR_BUFFERS) {
285         }
286         return NDR_ERR_SUCCESS;
287 }
288
289 static enum ndr_err_code ndr_pull_replUpToDateVectorCtr2(struct ndr_pull *ndr, int ndr_flags, struct replUpToDateVectorCtr2 *r)
290 {
291         uint32_t cntr_cursors_0;
292         TALLOC_CTX *_mem_save_cursors_0;
293         if (ndr_flags & NDR_SCALARS) {
294                 NDR_CHECK(ndr_pull_align(ndr, 8));
295                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
296                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
297                 NDR_PULL_ALLOC_N(ndr, r->cursors, r->count);
298                 _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
299                 NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
300                 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
301                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
302                 }
303                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
304         }
305         if (ndr_flags & NDR_BUFFERS) {
306         }
307         return NDR_ERR_SUCCESS;
308 }
309
310 _PUBLIC_ void ndr_print_replUpToDateVectorCtr2(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorCtr2 *r)
311 {
312         uint32_t cntr_cursors_0;
313         ndr_print_struct(ndr, name, "replUpToDateVectorCtr2");
314         ndr->depth++;
315         ndr_print_uint32(ndr, "count", r->count);
316         ndr_print_uint32(ndr, "reserved", r->reserved);
317         ndr->print(ndr, "%s: ARRAY(%d)", "cursors", r->count);
318         ndr->depth++;
319         for (cntr_cursors_0=0;cntr_cursors_0<r->count;cntr_cursors_0++) {
320                 char *idx_0=NULL;
321                 if (asprintf(&idx_0, "[%d]", cntr_cursors_0) != -1) {
322                         ndr_print_drsuapi_DsReplicaCursor2(ndr, "cursors", &r->cursors[cntr_cursors_0]);
323                         free(idx_0);
324                 }
325         }
326         ndr->depth--;
327         ndr->depth--;
328 }
329
330 static enum ndr_err_code ndr_push_replUpToDateVectorCtr(struct ndr_push *ndr, int ndr_flags, const union replUpToDateVectorCtr *r)
331 {
332         if (ndr_flags & NDR_SCALARS) {
333                 int level = ndr_push_get_switch_value(ndr, r);
334                 switch (level) {
335                         case 1: {
336                                 NDR_CHECK(ndr_push_replUpToDateVectorCtr1(ndr, NDR_SCALARS, &r->ctr1));
337                         break; }
338
339                         case 2: {
340                                 NDR_CHECK(ndr_push_replUpToDateVectorCtr2(ndr, NDR_SCALARS, &r->ctr2));
341                         break; }
342
343                         default:
344                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
345                 }
346         }
347         if (ndr_flags & NDR_BUFFERS) {
348                 int level = ndr_push_get_switch_value(ndr, r);
349                 switch (level) {
350                         case 1:
351                         break;
352
353                         case 2:
354                         break;
355
356                         default:
357                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
358                 }
359         }
360         return NDR_ERR_SUCCESS;
361 }
362
363 static enum ndr_err_code ndr_pull_replUpToDateVectorCtr(struct ndr_pull *ndr, int ndr_flags, union replUpToDateVectorCtr *r)
364 {
365         int level;
366         level = ndr_pull_get_switch_value(ndr, r);
367         if (ndr_flags & NDR_SCALARS) {
368                 switch (level) {
369                         case 1: {
370                                 NDR_CHECK(ndr_pull_replUpToDateVectorCtr1(ndr, NDR_SCALARS, &r->ctr1));
371                         break; }
372
373                         case 2: {
374                                 NDR_CHECK(ndr_pull_replUpToDateVectorCtr2(ndr, NDR_SCALARS, &r->ctr2));
375                         break; }
376
377                         default:
378                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
379                 }
380         }
381         if (ndr_flags & NDR_BUFFERS) {
382                 switch (level) {
383                         case 1:
384                         break;
385
386                         case 2:
387                         break;
388
389                         default:
390                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
391                 }
392         }
393         return NDR_ERR_SUCCESS;
394 }
395
396 _PUBLIC_ void ndr_print_replUpToDateVectorCtr(struct ndr_print *ndr, const char *name, const union replUpToDateVectorCtr *r)
397 {
398         int level;
399         level = ndr_print_get_switch_value(ndr, r);
400         ndr_print_union(ndr, name, level, "replUpToDateVectorCtr");
401         switch (level) {
402                 case 1:
403                         ndr_print_replUpToDateVectorCtr1(ndr, "ctr1", &r->ctr1);
404                 break;
405
406                 case 2:
407                         ndr_print_replUpToDateVectorCtr2(ndr, "ctr2", &r->ctr2);
408                 break;
409
410                 default:
411                         ndr_print_bad_level(ndr, name, level);
412         }
413 }
414
415 _PUBLIC_ enum ndr_err_code ndr_push_replUpToDateVectorBlob(struct ndr_push *ndr, int ndr_flags, const struct replUpToDateVectorBlob *r)
416 {
417         if (ndr_flags & NDR_SCALARS) {
418                 NDR_CHECK(ndr_push_align(ndr, 8));
419                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
420                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
421                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
422                 NDR_CHECK(ndr_push_replUpToDateVectorCtr(ndr, NDR_SCALARS, &r->ctr));
423         }
424         if (ndr_flags & NDR_BUFFERS) {
425         }
426         return NDR_ERR_SUCCESS;
427 }
428
429 _PUBLIC_ enum ndr_err_code ndr_pull_replUpToDateVectorBlob(struct ndr_pull *ndr, int ndr_flags, struct replUpToDateVectorBlob *r)
430 {
431         if (ndr_flags & NDR_SCALARS) {
432                 NDR_CHECK(ndr_pull_align(ndr, 8));
433                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
434                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
435                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
436                 NDR_CHECK(ndr_pull_replUpToDateVectorCtr(ndr, NDR_SCALARS, &r->ctr));
437         }
438         if (ndr_flags & NDR_BUFFERS) {
439         }
440         return NDR_ERR_SUCCESS;
441 }
442
443 _PUBLIC_ void ndr_print_replUpToDateVectorBlob(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorBlob *r)
444 {
445         ndr_print_struct(ndr, name, "replUpToDateVectorBlob");
446         ndr->depth++;
447         ndr_print_uint32(ndr, "version", r->version);
448         ndr_print_uint32(ndr, "reserved", r->reserved);
449         ndr_print_set_switch_value(ndr, &r->ctr, r->version);
450         ndr_print_replUpToDateVectorCtr(ndr, "ctr", &r->ctr);
451         ndr->depth--;
452 }
453
454 _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo1OtherInfo(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo1OtherInfo *r)
455 {
456         if (ndr_flags & NDR_SCALARS) {
457                 NDR_CHECK(ndr_push_align(ndr, 4));
458                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen(r->dns_name) + 1));
459                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_name, strlen(r->dns_name) + 1, sizeof(uint8_t), CH_DOS));
460         }
461         if (ndr_flags & NDR_BUFFERS) {
462         }
463         return NDR_ERR_SUCCESS;
464 }
465
466 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo1OtherInfo(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo1OtherInfo *r)
467 {
468         if (ndr_flags & NDR_SCALARS) {
469                 NDR_CHECK(ndr_pull_align(ndr, 4));
470                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__dns_name_size));
471                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_name, r->__dns_name_size, sizeof(uint8_t), CH_DOS));
472         }
473         if (ndr_flags & NDR_BUFFERS) {
474         }
475         return NDR_ERR_SUCCESS;
476 }
477
478 _PUBLIC_ void ndr_print_repsFromTo1OtherInfo(struct ndr_print *ndr, const char *name, const struct repsFromTo1OtherInfo *r)
479 {
480         ndr_print_struct(ndr, name, "repsFromTo1OtherInfo");
481         ndr->depth++;
482         ndr_print_uint32(ndr, "__dns_name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->dns_name) + 1:r->__dns_name_size);
483         ndr_print_string(ndr, "dns_name", r->dns_name);
484         ndr->depth--;
485 }
486
487 _PUBLIC_ size_t ndr_size_repsFromTo1OtherInfo(const struct repsFromTo1OtherInfo *r, int flags)
488 {
489         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo1OtherInfo);
490 }
491
492 _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo1(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo1 *r)
493 {
494         {
495                 uint32_t _flags_save_STRUCT = ndr->flags;
496                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
497                 if (ndr_flags & NDR_SCALARS) {
498                         NDR_CHECK(ndr_push_align(ndr, 8));
499                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo1(r, ndr->flags) + 8));
500                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->consecutive_sync_failures));
501                         NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_success));
502                         NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_attempt));
503                         NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->result_last_attempt));
504                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->other_info));
505                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo1OtherInfo(r->other_info, ndr->flags)));
506                         NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourFlags(ndr, NDR_SCALARS, r->replica_flags));
507                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
508                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
509                         NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
510                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
511                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
512                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->transport_guid));
513                 }
514                 if (ndr_flags & NDR_BUFFERS) {
515                         if (r->other_info) {
516                                 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->other_info));
517                                 NDR_CHECK(ndr_push_repsFromTo1OtherInfo(ndr, NDR_SCALARS, r->other_info));
518                         }
519                 }
520                 ndr->flags = _flags_save_STRUCT;
521         }
522         return NDR_ERR_SUCCESS;
523 }
524
525 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo1(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo1 *r)
526 {
527         uint32_t _ptr_other_info;
528         TALLOC_CTX *_mem_save_other_info_0;
529         {
530                 uint32_t _flags_save_STRUCT = ndr->flags;
531                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
532                 if (ndr_flags & NDR_SCALARS) {
533                         NDR_CHECK(ndr_pull_align(ndr, 8));
534                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->blobsize));
535                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->consecutive_sync_failures));
536                         NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->last_success));
537                         NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->last_attempt));
538                         NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->result_last_attempt));
539                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_other_info));
540                         if (_ptr_other_info) {
541                                 NDR_PULL_ALLOC(ndr, r->other_info);
542                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->other_info, _ptr_other_info));
543                         } else {
544                                 r->other_info = NULL;
545                         }
546                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->other_info_length));
547                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourFlags(ndr, NDR_SCALARS, &r->replica_flags));
548                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
549                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
550                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
551                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
552                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
553                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->transport_guid));
554                 }
555                 if (ndr_flags & NDR_BUFFERS) {
556                         if (r->other_info) {
557                                 uint32_t _relative_save_offset;
558                                 _relative_save_offset = ndr->offset;
559                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->other_info));
560                                 _mem_save_other_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
561                                 NDR_PULL_SET_MEM_CTX(ndr, r->other_info, 0);
562                                 NDR_CHECK(ndr_pull_repsFromTo1OtherInfo(ndr, NDR_SCALARS, r->other_info));
563                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_other_info_0, 0);
564                                 ndr->offset = _relative_save_offset;
565                         }
566                 }
567                 ndr->flags = _flags_save_STRUCT;
568         }
569         return NDR_ERR_SUCCESS;
570 }
571
572 _PUBLIC_ void ndr_print_repsFromTo1(struct ndr_print *ndr, const char *name, const struct repsFromTo1 *r)
573 {
574         ndr_print_struct(ndr, name, "repsFromTo1");
575         {
576                 uint32_t _flags_save_STRUCT = ndr->flags;
577                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
578                 ndr->depth++;
579                 ndr_print_uint32(ndr, "blobsize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo1(r, ndr->flags) + 8:r->blobsize);
580                 ndr_print_uint32(ndr, "consecutive_sync_failures", r->consecutive_sync_failures);
581                 ndr_print_NTTIME_1sec(ndr, "last_success", r->last_success);
582                 ndr_print_NTTIME_1sec(ndr, "last_attempt", r->last_attempt);
583                 ndr_print_WERROR(ndr, "result_last_attempt", r->result_last_attempt);
584                 ndr_print_ptr(ndr, "other_info", r->other_info);
585                 ndr->depth++;
586                 if (r->other_info) {
587                         ndr_print_repsFromTo1OtherInfo(ndr, "other_info", r->other_info);
588                 }
589                 ndr->depth--;
590                 ndr_print_uint32(ndr, "other_info_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo1OtherInfo(r->other_info, ndr->flags):r->other_info_length);
591                 ndr_print_drsuapi_DsReplicaNeighbourFlags(ndr, "replica_flags", r->replica_flags);
592                 ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
593                 ndr_print_uint32(ndr, "reserved", r->reserved);
594                 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
595                 ndr_print_GUID(ndr, "source_dsa_obj_guid", &r->source_dsa_obj_guid);
596                 ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
597                 ndr_print_GUID(ndr, "transport_guid", &r->transport_guid);
598                 ndr->depth--;
599                 ndr->flags = _flags_save_STRUCT;
600         }
601 }
602
603 _PUBLIC_ size_t ndr_size_repsFromTo1(const struct repsFromTo1 *r, int flags)
604 {
605         flags |= LIBNDR_PRINT_ARRAY_HEX;
606         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo1);
607 }
608
609 static enum ndr_err_code ndr_push_repsFromTo(struct ndr_push *ndr, int ndr_flags, const union repsFromTo *r)
610 {
611         if (ndr_flags & NDR_SCALARS) {
612                 int level = ndr_push_get_switch_value(ndr, r);
613                 switch (level) {
614                         case 1: {
615                                 NDR_CHECK(ndr_push_repsFromTo1(ndr, NDR_SCALARS, &r->ctr1));
616                         break; }
617
618                         default:
619                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
620                 }
621         }
622         if (ndr_flags & NDR_BUFFERS) {
623                 int level = ndr_push_get_switch_value(ndr, r);
624                 switch (level) {
625                         case 1:
626                                 NDR_CHECK(ndr_push_repsFromTo1(ndr, NDR_BUFFERS, &r->ctr1));
627                         break;
628
629                         default:
630                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
631                 }
632         }
633         return NDR_ERR_SUCCESS;
634 }
635
636 static enum ndr_err_code ndr_pull_repsFromTo(struct ndr_pull *ndr, int ndr_flags, union repsFromTo *r)
637 {
638         int level;
639         level = ndr_pull_get_switch_value(ndr, r);
640         if (ndr_flags & NDR_SCALARS) {
641                 switch (level) {
642                         case 1: {
643                                 NDR_CHECK(ndr_pull_repsFromTo1(ndr, NDR_SCALARS, &r->ctr1));
644                         break; }
645
646                         default:
647                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
648                 }
649         }
650         if (ndr_flags & NDR_BUFFERS) {
651                 switch (level) {
652                         case 1:
653                                 NDR_CHECK(ndr_pull_repsFromTo1(ndr, NDR_BUFFERS, &r->ctr1));
654                         break;
655
656                         default:
657                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
658                 }
659         }
660         return NDR_ERR_SUCCESS;
661 }
662
663 _PUBLIC_ void ndr_print_repsFromTo(struct ndr_print *ndr, const char *name, const union repsFromTo *r)
664 {
665         int level;
666         level = ndr_print_get_switch_value(ndr, r);
667         ndr_print_union(ndr, name, level, "repsFromTo");
668         switch (level) {
669                 case 1:
670                         ndr_print_repsFromTo1(ndr, "ctr1", &r->ctr1);
671                 break;
672
673                 default:
674                         ndr_print_bad_level(ndr, name, level);
675         }
676 }
677
678 _PUBLIC_ enum ndr_err_code ndr_push_repsFromToBlob(struct ndr_push *ndr, int ndr_flags, const struct repsFromToBlob *r)
679 {
680         if (ndr_flags & NDR_SCALARS) {
681                 NDR_CHECK(ndr_push_align(ndr, 8));
682                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
683                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
684                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
685                 NDR_CHECK(ndr_push_repsFromTo(ndr, NDR_SCALARS, &r->ctr));
686         }
687         if (ndr_flags & NDR_BUFFERS) {
688                 NDR_CHECK(ndr_push_repsFromTo(ndr, NDR_BUFFERS, &r->ctr));
689         }
690         return NDR_ERR_SUCCESS;
691 }
692
693 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromToBlob(struct ndr_pull *ndr, int ndr_flags, struct repsFromToBlob *r)
694 {
695         if (ndr_flags & NDR_SCALARS) {
696                 NDR_CHECK(ndr_pull_align(ndr, 8));
697                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
698                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
699                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
700                 NDR_CHECK(ndr_pull_repsFromTo(ndr, NDR_SCALARS, &r->ctr));
701         }
702         if (ndr_flags & NDR_BUFFERS) {
703                 NDR_CHECK(ndr_pull_repsFromTo(ndr, NDR_BUFFERS, &r->ctr));
704         }
705         return NDR_ERR_SUCCESS;
706 }
707
708 _PUBLIC_ void ndr_print_repsFromToBlob(struct ndr_print *ndr, const char *name, const struct repsFromToBlob *r)
709 {
710         ndr_print_struct(ndr, name, "repsFromToBlob");
711         ndr->depth++;
712         ndr_print_uint32(ndr, "version", r->version);
713         ndr_print_uint32(ndr, "reserved", r->reserved);
714         ndr_print_set_switch_value(ndr, &r->ctr, r->version);
715         ndr_print_repsFromTo(ndr, "ctr", &r->ctr);
716         ndr->depth--;
717 }
718
719 static enum ndr_err_code ndr_push_partialAttributeSetCtr1(struct ndr_push *ndr, int ndr_flags, const struct partialAttributeSetCtr1 *r)
720 {
721         uint32_t cntr_array_0;
722         if (ndr_flags & NDR_SCALARS) {
723                 NDR_CHECK(ndr_push_align(ndr, 4));
724                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
725                 for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) {
726                         NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->array[cntr_array_0]));
727                 }
728         }
729         if (ndr_flags & NDR_BUFFERS) {
730         }
731         return NDR_ERR_SUCCESS;
732 }
733
734 static enum ndr_err_code ndr_pull_partialAttributeSetCtr1(struct ndr_pull *ndr, int ndr_flags, struct partialAttributeSetCtr1 *r)
735 {
736         uint32_t cntr_array_0;
737         TALLOC_CTX *_mem_save_array_0;
738         if (ndr_flags & NDR_SCALARS) {
739                 NDR_CHECK(ndr_pull_align(ndr, 4));
740                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
741                 NDR_PULL_ALLOC_N(ndr, r->array, r->count);
742                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
743                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
744                 for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) {
745                         NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
746                 }
747                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
748         }
749         if (ndr_flags & NDR_BUFFERS) {
750         }
751         return NDR_ERR_SUCCESS;
752 }
753
754 _PUBLIC_ void ndr_print_partialAttributeSetCtr1(struct ndr_print *ndr, const char *name, const struct partialAttributeSetCtr1 *r)
755 {
756         uint32_t cntr_array_0;
757         ndr_print_struct(ndr, name, "partialAttributeSetCtr1");
758         ndr->depth++;
759         ndr_print_uint32(ndr, "count", r->count);
760         ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
761         ndr->depth++;
762         for (cntr_array_0=0;cntr_array_0<r->count;cntr_array_0++) {
763                 char *idx_0=NULL;
764                 if (asprintf(&idx_0, "[%d]", cntr_array_0) != -1) {
765                         ndr_print_drsuapi_DsAttributeId(ndr, "array", r->array[cntr_array_0]);
766                         free(idx_0);
767                 }
768         }
769         ndr->depth--;
770         ndr->depth--;
771 }
772
773 static enum ndr_err_code ndr_push_partialAttributeSetCtr(struct ndr_push *ndr, int ndr_flags, const union partialAttributeSetCtr *r)
774 {
775         if (ndr_flags & NDR_SCALARS) {
776                 int level = ndr_push_get_switch_value(ndr, r);
777                 switch (level) {
778                         case 1: {
779                                 NDR_CHECK(ndr_push_partialAttributeSetCtr1(ndr, NDR_SCALARS, &r->ctr1));
780                         break; }
781
782                         default:
783                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
784                 }
785         }
786         if (ndr_flags & NDR_BUFFERS) {
787                 int level = ndr_push_get_switch_value(ndr, r);
788                 switch (level) {
789                         case 1:
790                         break;
791
792                         default:
793                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
794                 }
795         }
796         return NDR_ERR_SUCCESS;
797 }
798
799 static enum ndr_err_code ndr_pull_partialAttributeSetCtr(struct ndr_pull *ndr, int ndr_flags, union partialAttributeSetCtr *r)
800 {
801         int level;
802         level = ndr_pull_get_switch_value(ndr, r);
803         if (ndr_flags & NDR_SCALARS) {
804                 switch (level) {
805                         case 1: {
806                                 NDR_CHECK(ndr_pull_partialAttributeSetCtr1(ndr, NDR_SCALARS, &r->ctr1));
807                         break; }
808
809                         default:
810                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
811                 }
812         }
813         if (ndr_flags & NDR_BUFFERS) {
814                 switch (level) {
815                         case 1:
816                         break;
817
818                         default:
819                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
820                 }
821         }
822         return NDR_ERR_SUCCESS;
823 }
824
825 _PUBLIC_ void ndr_print_partialAttributeSetCtr(struct ndr_print *ndr, const char *name, const union partialAttributeSetCtr *r)
826 {
827         int level;
828         level = ndr_print_get_switch_value(ndr, r);
829         ndr_print_union(ndr, name, level, "partialAttributeSetCtr");
830         switch (level) {
831                 case 1:
832                         ndr_print_partialAttributeSetCtr1(ndr, "ctr1", &r->ctr1);
833                 break;
834
835                 default:
836                         ndr_print_bad_level(ndr, name, level);
837         }
838 }
839
840 _PUBLIC_ enum ndr_err_code ndr_push_partialAttributeSetBlob(struct ndr_push *ndr, int ndr_flags, const struct partialAttributeSetBlob *r)
841 {
842         if (ndr_flags & NDR_SCALARS) {
843                 NDR_CHECK(ndr_push_align(ndr, 4));
844                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
845                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
846                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
847                 NDR_CHECK(ndr_push_partialAttributeSetCtr(ndr, NDR_SCALARS, &r->ctr));
848         }
849         if (ndr_flags & NDR_BUFFERS) {
850         }
851         return NDR_ERR_SUCCESS;
852 }
853
854 _PUBLIC_ enum ndr_err_code ndr_pull_partialAttributeSetBlob(struct ndr_pull *ndr, int ndr_flags, struct partialAttributeSetBlob *r)
855 {
856         if (ndr_flags & NDR_SCALARS) {
857                 NDR_CHECK(ndr_pull_align(ndr, 4));
858                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
859                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
860                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
861                 NDR_CHECK(ndr_pull_partialAttributeSetCtr(ndr, NDR_SCALARS, &r->ctr));
862         }
863         if (ndr_flags & NDR_BUFFERS) {
864         }
865         return NDR_ERR_SUCCESS;
866 }
867
868 _PUBLIC_ void ndr_print_partialAttributeSetBlob(struct ndr_print *ndr, const char *name, const struct partialAttributeSetBlob *r)
869 {
870         ndr_print_struct(ndr, name, "partialAttributeSetBlob");
871         ndr->depth++;
872         ndr_print_uint32(ndr, "version", r->version);
873         ndr_print_uint32(ndr, "reserved", r->reserved);
874         ndr_print_set_switch_value(ndr, &r->ctr, r->version);
875         ndr_print_partialAttributeSetCtr(ndr, "ctr", &r->ctr);
876         ndr->depth--;
877 }
878
879 static enum ndr_err_code ndr_push_prefixMapVersion(struct ndr_push *ndr, int ndr_flags, enum prefixMapVersion r)
880 {
881         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
882         return NDR_ERR_SUCCESS;
883 }
884
885 static enum ndr_err_code ndr_pull_prefixMapVersion(struct ndr_pull *ndr, int ndr_flags, enum prefixMapVersion *r)
886 {
887         uint32_t v;
888         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
889         *r = v;
890         return NDR_ERR_SUCCESS;
891 }
892
893 _PUBLIC_ void ndr_print_prefixMapVersion(struct ndr_print *ndr, const char *name, enum prefixMapVersion r)
894 {
895         const char *val = NULL;
896
897         switch (r) {
898                 case PREFIX_MAP_VERSION_DSDB: val = "PREFIX_MAP_VERSION_DSDB"; break;
899         }
900         ndr_print_enum(ndr, name, "ENUM", val, r);
901 }
902
903 static enum ndr_err_code ndr_push_prefixMapCtr(struct ndr_push *ndr, int ndr_flags, const union prefixMapCtr *r)
904 {
905         if (ndr_flags & NDR_SCALARS) {
906                 int level = ndr_push_get_switch_value(ndr, r);
907                 switch (level) {
908                         case PREFIX_MAP_VERSION_DSDB: {
909                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->dsdb));
910                         break; }
911
912                         default:
913                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
914                 }
915         }
916         if (ndr_flags & NDR_BUFFERS) {
917                 int level = ndr_push_get_switch_value(ndr, r);
918                 switch (level) {
919                         case PREFIX_MAP_VERSION_DSDB:
920                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->dsdb));
921                         break;
922
923                         default:
924                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
925                 }
926         }
927         return NDR_ERR_SUCCESS;
928 }
929
930 static enum ndr_err_code ndr_pull_prefixMapCtr(struct ndr_pull *ndr, int ndr_flags, union prefixMapCtr *r)
931 {
932         int level;
933         level = ndr_pull_get_switch_value(ndr, r);
934         if (ndr_flags & NDR_SCALARS) {
935                 switch (level) {
936                         case PREFIX_MAP_VERSION_DSDB: {
937                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->dsdb));
938                         break; }
939
940                         default:
941                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
942                 }
943         }
944         if (ndr_flags & NDR_BUFFERS) {
945                 switch (level) {
946                         case PREFIX_MAP_VERSION_DSDB:
947                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->dsdb));
948                         break;
949
950                         default:
951                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
952                 }
953         }
954         return NDR_ERR_SUCCESS;
955 }
956
957 _PUBLIC_ void ndr_print_prefixMapCtr(struct ndr_print *ndr, const char *name, const union prefixMapCtr *r)
958 {
959         int level;
960         level = ndr_print_get_switch_value(ndr, r);
961         ndr_print_union(ndr, name, level, "prefixMapCtr");
962         switch (level) {
963                 case PREFIX_MAP_VERSION_DSDB:
964                         ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "dsdb", &r->dsdb);
965                 break;
966
967                 default:
968                         ndr_print_bad_level(ndr, name, level);
969         }
970 }
971
972 _PUBLIC_ enum ndr_err_code ndr_push_prefixMapBlob(struct ndr_push *ndr, int ndr_flags, const struct prefixMapBlob *r)
973 {
974         if (ndr_flags & NDR_SCALARS) {
975                 NDR_CHECK(ndr_push_align(ndr, 4));
976                 NDR_CHECK(ndr_push_prefixMapVersion(ndr, NDR_SCALARS, r->version));
977                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
978                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
979                 NDR_CHECK(ndr_push_prefixMapCtr(ndr, NDR_SCALARS, &r->ctr));
980         }
981         if (ndr_flags & NDR_BUFFERS) {
982                 NDR_CHECK(ndr_push_prefixMapCtr(ndr, NDR_BUFFERS, &r->ctr));
983         }
984         return NDR_ERR_SUCCESS;
985 }
986
987 _PUBLIC_ enum ndr_err_code ndr_pull_prefixMapBlob(struct ndr_pull *ndr, int ndr_flags, struct prefixMapBlob *r)
988 {
989         if (ndr_flags & NDR_SCALARS) {
990                 NDR_CHECK(ndr_pull_align(ndr, 4));
991                 NDR_CHECK(ndr_pull_prefixMapVersion(ndr, NDR_SCALARS, &r->version));
992                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
993                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
994                 NDR_CHECK(ndr_pull_prefixMapCtr(ndr, NDR_SCALARS, &r->ctr));
995         }
996         if (ndr_flags & NDR_BUFFERS) {
997                 NDR_CHECK(ndr_pull_prefixMapCtr(ndr, NDR_BUFFERS, &r->ctr));
998         }
999         return NDR_ERR_SUCCESS;
1000 }
1001
1002 _PUBLIC_ void ndr_print_prefixMapBlob(struct ndr_print *ndr, const char *name, const struct prefixMapBlob *r)
1003 {
1004         ndr_print_struct(ndr, name, "prefixMapBlob");
1005         ndr->depth++;
1006         ndr_print_prefixMapVersion(ndr, "version", r->version);
1007         ndr_print_uint32(ndr, "reserved", r->reserved);
1008         ndr_print_set_switch_value(ndr, &r->ctr, r->version);
1009         ndr_print_prefixMapCtr(ndr, "ctr", &r->ctr);
1010         ndr->depth--;
1011 }
1012
1013 static enum ndr_err_code ndr_push_ldapControlDirSyncExtra(struct ndr_push *ndr, int ndr_flags, const union ldapControlDirSyncExtra *r)
1014 {
1015         if (ndr_flags & NDR_SCALARS) {
1016                 int level = ndr_push_get_switch_value(ndr, r);
1017                 switch (level) {
1018                         case 0: {
1019                         break; }
1020
1021                         default: {
1022                                 NDR_CHECK(ndr_push_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->uptodateness_vector));
1023                         break; }
1024
1025                 }
1026         }
1027         if (ndr_flags & NDR_BUFFERS) {
1028                 int level = ndr_push_get_switch_value(ndr, r);
1029                 switch (level) {
1030                         case 0:
1031                         break;
1032
1033                         default:
1034                         break;
1035
1036                 }
1037         }
1038         return NDR_ERR_SUCCESS;
1039 }
1040
1041 static enum ndr_err_code ndr_pull_ldapControlDirSyncExtra(struct ndr_pull *ndr, int ndr_flags, union ldapControlDirSyncExtra *r)
1042 {
1043         int level;
1044         level = ndr_pull_get_switch_value(ndr, r);
1045         if (ndr_flags & NDR_SCALARS) {
1046                 switch (level) {
1047                         case 0: {
1048                         break; }
1049
1050                         default: {
1051                                 NDR_CHECK(ndr_pull_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->uptodateness_vector));
1052                         break; }
1053
1054                 }
1055         }
1056         if (ndr_flags & NDR_BUFFERS) {
1057                 switch (level) {
1058                         case 0:
1059                         break;
1060
1061                         default:
1062                         break;
1063
1064                 }
1065         }
1066         return NDR_ERR_SUCCESS;
1067 }
1068
1069 _PUBLIC_ void ndr_print_ldapControlDirSyncExtra(struct ndr_print *ndr, const char *name, const union ldapControlDirSyncExtra *r)
1070 {
1071         int level;
1072         level = ndr_print_get_switch_value(ndr, r);
1073         ndr_print_union(ndr, name, level, "ldapControlDirSyncExtra");
1074         switch (level) {
1075                 case 0:
1076                 break;
1077
1078                 default:
1079                         ndr_print_replUpToDateVectorBlob(ndr, "uptodateness_vector", &r->uptodateness_vector);
1080                 break;
1081
1082         }
1083 }
1084
1085 static size_t ndr_size_ldapControlDirSyncExtra(const union ldapControlDirSyncExtra *r, uint32_t level, int flags)
1086 {
1087         return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_ldapControlDirSyncExtra);
1088 }
1089
1090 static enum ndr_err_code ndr_push_ldapControlDirSyncBlob(struct ndr_push *ndr, int ndr_flags, const struct ldapControlDirSyncBlob *r)
1091 {
1092         if (ndr_flags & NDR_SCALARS) {
1093                 NDR_CHECK(ndr_push_align(ndr, 8));
1094                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 3));
1095                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time));
1096                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u2));
1097                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u3));
1098                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, 0)));
1099                 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
1100                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid1));
1101                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->extra, ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, 0)));
1102                 NDR_CHECK(ndr_push_ldapControlDirSyncExtra(ndr, NDR_SCALARS, &r->extra));
1103         }
1104         if (ndr_flags & NDR_BUFFERS) {
1105                 NDR_CHECK(ndr_push_ldapControlDirSyncExtra(ndr, NDR_BUFFERS, &r->extra));
1106         }
1107         return NDR_ERR_SUCCESS;
1108 }
1109
1110 static enum ndr_err_code ndr_pull_ldapControlDirSyncBlob(struct ndr_pull *ndr, int ndr_flags, struct ldapControlDirSyncBlob *r)
1111 {
1112         if (ndr_flags & NDR_SCALARS) {
1113                 NDR_CHECK(ndr_pull_align(ndr, 8));
1114                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u1));
1115                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time));
1116                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u2));
1117                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u3));
1118                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->extra_length));
1119                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
1120                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid1));
1121                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->extra, r->extra_length));
1122                 NDR_CHECK(ndr_pull_ldapControlDirSyncExtra(ndr, NDR_SCALARS, &r->extra));
1123         }
1124         if (ndr_flags & NDR_BUFFERS) {
1125                 NDR_CHECK(ndr_pull_ldapControlDirSyncExtra(ndr, NDR_BUFFERS, &r->extra));
1126         }
1127         return NDR_ERR_SUCCESS;
1128 }
1129
1130 _PUBLIC_ void ndr_print_ldapControlDirSyncBlob(struct ndr_print *ndr, const char *name, const struct ldapControlDirSyncBlob *r)
1131 {
1132         ndr_print_struct(ndr, name, "ldapControlDirSyncBlob");
1133         ndr->depth++;
1134         ndr_print_uint32(ndr, "u1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?3:r->u1);
1135         ndr_print_NTTIME(ndr, "time", r->time);
1136         ndr_print_uint32(ndr, "u2", r->u2);
1137         ndr_print_uint32(ndr, "u3", r->u3);
1138         ndr_print_uint32(ndr, "extra_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, 0):r->extra_length);
1139         ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
1140         ndr_print_GUID(ndr, "guid1", &r->guid1);
1141         ndr_print_set_switch_value(ndr, &r->extra, r->extra_length);
1142         ndr_print_ldapControlDirSyncExtra(ndr, "extra", &r->extra);
1143         ndr->depth--;
1144 }
1145
1146 _PUBLIC_ enum ndr_err_code ndr_push_ldapControlDirSyncCookie(struct ndr_push *ndr, int ndr_flags, const struct ldapControlDirSyncCookie *r)
1147 {
1148         uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
1149         if (ndr_flags & NDR_SCALARS) {
1150                 NDR_CHECK(ndr_push_align(ndr, 8));
1151                 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
1152                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "MSDS", 4, sizeof(uint8_t), CH_DOS));
1153                 {
1154                         struct ndr_push *_ndr_blob;
1155                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_blob, 0, -1));
1156                         NDR_CHECK(ndr_push_ldapControlDirSyncBlob(_ndr_blob, NDR_SCALARS|NDR_BUFFERS, &r->blob));
1157                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_blob, 0, -1));
1158                 }
1159         }
1160         if (ndr_flags & NDR_BUFFERS) {
1161                 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
1162         }
1163         ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
1164         return NDR_ERR_SUCCESS;
1165 }
1166
1167 _PUBLIC_ enum ndr_err_code ndr_pull_ldapControlDirSyncCookie(struct ndr_pull *ndr, int ndr_flags, struct ldapControlDirSyncCookie *r)
1168 {
1169         uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
1170         if (ndr_flags & NDR_SCALARS) {
1171                 NDR_CHECK(ndr_pull_align(ndr, 8));
1172                 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
1173                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->msds, 4, sizeof(uint8_t), CH_DOS));
1174                 {
1175                         struct ndr_pull *_ndr_blob;
1176                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_blob, 0, -1));
1177                         NDR_CHECK(ndr_pull_ldapControlDirSyncBlob(_ndr_blob, NDR_SCALARS|NDR_BUFFERS, &r->blob));
1178                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_blob, 0, -1));
1179                 }
1180         }
1181         if (ndr_flags & NDR_BUFFERS) {
1182                 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
1183         }
1184         ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
1185         return NDR_ERR_SUCCESS;
1186 }
1187
1188 _PUBLIC_ void ndr_print_ldapControlDirSyncCookie(struct ndr_print *ndr, const char *name, const struct ldapControlDirSyncCookie *r)
1189 {
1190         ndr_print_struct(ndr, name, "ldapControlDirSyncCookie");
1191         ndr->depth++;
1192         ndr_print_string(ndr, "msds", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"MSDS":r->msds);
1193         ndr_print_ldapControlDirSyncBlob(ndr, "blob", &r->blob);
1194         ndr->depth--;
1195 }
1196
1197 static enum ndr_err_code ndr_push_supplementalCredentialsPackage(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsPackage *r)
1198 {
1199         if (ndr_flags & NDR_SCALARS) {
1200                 NDR_CHECK(ndr_push_align(ndr, 2));
1201                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->name)));
1202                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen(r->data)));
1203                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown1));
1204                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, 2 * strlen_m(r->name), sizeof(uint8_t), CH_UTF16));
1205                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data, strlen(r->data), sizeof(uint8_t), CH_DOS));
1206         }
1207         if (ndr_flags & NDR_BUFFERS) {
1208         }
1209         return NDR_ERR_SUCCESS;
1210 }
1211
1212 static enum ndr_err_code ndr_pull_supplementalCredentialsPackage(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsPackage *r)
1213 {
1214         if (ndr_flags & NDR_SCALARS) {
1215                 NDR_CHECK(ndr_pull_align(ndr, 2));
1216                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->name_len));
1217                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->data_len));
1218                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown1));
1219                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, r->name_len, sizeof(uint8_t), CH_UTF16));
1220                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data, r->data_len, sizeof(uint8_t), CH_DOS));
1221         }
1222         if (ndr_flags & NDR_BUFFERS) {
1223         }
1224         return NDR_ERR_SUCCESS;
1225 }
1226
1227 _PUBLIC_ void ndr_print_supplementalCredentialsPackage(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsPackage *r)
1228 {
1229         ndr_print_struct(ndr, name, "supplementalCredentialsPackage");
1230         ndr->depth++;
1231         ndr_print_uint16(ndr, "name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->name):r->name_len);
1232         ndr_print_uint16(ndr, "data_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->data):r->data_len);
1233         ndr_print_uint16(ndr, "unknown1", r->unknown1);
1234         ndr_print_string(ndr, "name", r->name);
1235         ndr_print_string(ndr, "data", r->data);
1236         ndr->depth--;
1237 }
1238
1239 static enum ndr_err_code ndr_push_supplementalCredentialsSubBlob(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsSubBlob *r)
1240 {
1241         uint32_t cntr_packages_0;
1242         if (ndr_flags & NDR_SCALARS) {
1243                 NDR_CHECK(ndr_push_align(ndr, 2));
1244                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, SUPPLEMENTAL_CREDENTIALS_PREFIX, 0x31, sizeof(uint16_t), CH_UTF16));
1245                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_packages));
1246                 for (cntr_packages_0 = 0; cntr_packages_0 < r->num_packages; cntr_packages_0++) {
1247                         NDR_CHECK(ndr_push_supplementalCredentialsPackage(ndr, NDR_SCALARS, &r->packages[cntr_packages_0]));
1248                 }
1249         }
1250         if (ndr_flags & NDR_BUFFERS) {
1251         }
1252         return NDR_ERR_SUCCESS;
1253 }
1254
1255 static enum ndr_err_code ndr_pull_supplementalCredentialsSubBlob(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsSubBlob *r)
1256 {
1257         uint32_t cntr_packages_0;
1258         TALLOC_CTX *_mem_save_packages_0;
1259         if (ndr_flags & NDR_SCALARS) {
1260                 NDR_CHECK(ndr_pull_align(ndr, 2));
1261                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->prefix, 0x31, sizeof(uint16_t), CH_UTF16));
1262                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_packages));
1263                 NDR_PULL_ALLOC_N(ndr, r->packages, r->num_packages);
1264                 _mem_save_packages_0 = NDR_PULL_GET_MEM_CTX(ndr);
1265                 NDR_PULL_SET_MEM_CTX(ndr, r->packages, 0);
1266                 for (cntr_packages_0 = 0; cntr_packages_0 < r->num_packages; cntr_packages_0++) {
1267                         NDR_CHECK(ndr_pull_supplementalCredentialsPackage(ndr, NDR_SCALARS, &r->packages[cntr_packages_0]));
1268                 }
1269                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_packages_0, 0);
1270         }
1271         if (ndr_flags & NDR_BUFFERS) {
1272         }
1273         return NDR_ERR_SUCCESS;
1274 }
1275
1276 _PUBLIC_ void ndr_print_supplementalCredentialsSubBlob(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsSubBlob *r)
1277 {
1278         uint32_t cntr_packages_0;
1279         ndr_print_struct(ndr, name, "supplementalCredentialsSubBlob");
1280         ndr->depth++;
1281         ndr_print_string(ndr, "prefix", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?SUPPLEMENTAL_CREDENTIALS_PREFIX:r->prefix);
1282         ndr_print_uint16(ndr, "num_packages", r->num_packages);
1283         ndr->print(ndr, "%s: ARRAY(%d)", "packages", r->num_packages);
1284         ndr->depth++;
1285         for (cntr_packages_0=0;cntr_packages_0<r->num_packages;cntr_packages_0++) {
1286                 char *idx_0=NULL;
1287                 if (asprintf(&idx_0, "[%d]", cntr_packages_0) != -1) {
1288                         ndr_print_supplementalCredentialsPackage(ndr, "packages", &r->packages[cntr_packages_0]);
1289                         free(idx_0);
1290                 }
1291         }
1292         ndr->depth--;
1293         ndr->depth--;
1294 }
1295
1296 static size_t ndr_size_supplementalCredentialsSubBlob(const struct supplementalCredentialsSubBlob *r, int flags)
1297 {
1298         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_supplementalCredentialsSubBlob);
1299 }
1300
1301 _PUBLIC_ enum ndr_err_code ndr_push_supplementalCredentialsBlob(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsBlob *r)
1302 {
1303         if (ndr_flags & NDR_SCALARS) {
1304                 NDR_CHECK(ndr_push_align(ndr, 4));
1305                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1306                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->flags)));
1307                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1308                 {
1309                         struct ndr_push *_ndr_sub;
1310                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->flags)));
1311                         NDR_CHECK(ndr_push_supplementalCredentialsSubBlob(_ndr_sub, NDR_SCALARS, &r->sub));
1312                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->flags)));
1313                 }
1314                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0));
1315         }
1316         if (ndr_flags & NDR_BUFFERS) {
1317         }
1318         return NDR_ERR_SUCCESS;
1319 }
1320
1321 _PUBLIC_ enum ndr_err_code ndr_pull_supplementalCredentialsBlob(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsBlob *r)
1322 {
1323         if (ndr_flags & NDR_SCALARS) {
1324                 NDR_CHECK(ndr_pull_align(ndr, 4));
1325                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
1326                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
1327                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
1328                 {
1329                         struct ndr_pull *_ndr_sub;
1330                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sub, 0, r->__ndr_size));
1331                         NDR_CHECK(ndr_pull_supplementalCredentialsSubBlob(_ndr_sub, NDR_SCALARS, &r->sub));
1332                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sub, 0, r->__ndr_size));
1333                 }
1334                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown3));
1335         }
1336         if (ndr_flags & NDR_BUFFERS) {
1337         }
1338         return NDR_ERR_SUCCESS;
1339 }
1340
1341 _PUBLIC_ void ndr_print_supplementalCredentialsBlob(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsBlob *r)
1342 {
1343         ndr_print_struct(ndr, name, "supplementalCredentialsBlob");
1344         ndr->depth++;
1345         ndr_print_uint32(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown1);
1346         ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->flags):r->__ndr_size);
1347         ndr_print_uint32(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown2);
1348         ndr_print_supplementalCredentialsSubBlob(ndr, "sub", &r->sub);
1349         ndr_print_uint8(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown3);
1350         ndr->depth--;
1351 }
1352
1353 _PUBLIC_ enum ndr_err_code ndr_push_package_PackagesBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PackagesBlob *r)
1354 {
1355         if (ndr_flags & NDR_SCALARS) {
1356                 NDR_CHECK(ndr_push_align(ndr, 4));
1357                 {
1358                         uint32_t _flags_save_string_array = ndr->flags;
1359                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1360                         NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->names));
1361                         ndr->flags = _flags_save_string_array;
1362                 }
1363         }
1364         if (ndr_flags & NDR_BUFFERS) {
1365         }
1366         return NDR_ERR_SUCCESS;
1367 }
1368
1369 _PUBLIC_ enum ndr_err_code ndr_pull_package_PackagesBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PackagesBlob *r)
1370 {
1371         if (ndr_flags & NDR_SCALARS) {
1372                 NDR_CHECK(ndr_pull_align(ndr, 4));
1373                 {
1374                         uint32_t _flags_save_string_array = ndr->flags;
1375                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1376                         NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->names));
1377                         ndr->flags = _flags_save_string_array;
1378                 }
1379         }
1380         if (ndr_flags & NDR_BUFFERS) {
1381         }
1382         return NDR_ERR_SUCCESS;
1383 }
1384
1385 _PUBLIC_ void ndr_print_package_PackagesBlob(struct ndr_print *ndr, const char *name, const struct package_PackagesBlob *r)
1386 {
1387         ndr_print_struct(ndr, name, "package_PackagesBlob");
1388         ndr->depth++;
1389         ndr_print_string_array(ndr, "names", r->names);
1390         ndr->depth--;
1391 }
1392
1393 static enum ndr_err_code ndr_push_package_PrimaryKerberosString(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosString *r)
1394 {
1395         if (ndr_flags & NDR_SCALARS) {
1396                 NDR_CHECK(ndr_push_align(ndr, 4));
1397                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
1398                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
1399                 {
1400                         uint32_t _flags_save_string = ndr->flags;
1401                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1402                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->string));
1403                         ndr->flags = _flags_save_string;
1404                 }
1405         }
1406         if (ndr_flags & NDR_BUFFERS) {
1407                 {
1408                         uint32_t _flags_save_string = ndr->flags;
1409                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1410                         if (r->string) {
1411                                 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->string));
1412                                 {
1413                                         struct ndr_push *_ndr_string;
1414                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_string, 0, 2 * strlen_m(r->string)));
1415                                         NDR_CHECK(ndr_push_string(_ndr_string, NDR_SCALARS, r->string));
1416                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_string, 0, 2 * strlen_m(r->string)));
1417                                 }
1418                         }
1419                         ndr->flags = _flags_save_string;
1420                 }
1421         }
1422         return NDR_ERR_SUCCESS;
1423 }
1424
1425 static enum ndr_err_code ndr_pull_package_PrimaryKerberosString(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosString *r)
1426 {
1427         uint32_t _ptr_string;
1428         TALLOC_CTX *_mem_save_string_0;
1429         if (ndr_flags & NDR_SCALARS) {
1430                 NDR_CHECK(ndr_pull_align(ndr, 4));
1431                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
1432                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
1433                 {
1434                         uint32_t _flags_save_string = ndr->flags;
1435                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1436                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
1437                         if (_ptr_string) {
1438                                 NDR_PULL_ALLOC(ndr, r->string);
1439                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->string, _ptr_string));
1440                         } else {
1441                                 r->string = NULL;
1442                         }
1443                         ndr->flags = _flags_save_string;
1444                 }
1445         }
1446         if (ndr_flags & NDR_BUFFERS) {
1447                 {
1448                         uint32_t _flags_save_string = ndr->flags;
1449                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1450                         if (r->string) {
1451                                 uint32_t _relative_save_offset;
1452                                 _relative_save_offset = ndr->offset;
1453                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->string));
1454                                 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
1455                                 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
1456                                 {
1457                                         struct ndr_pull *_ndr_string;
1458                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_string, 0, r->size));
1459                                         NDR_CHECK(ndr_pull_string(_ndr_string, NDR_SCALARS, &r->string));
1460                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_string, 0, r->size));
1461                                 }
1462                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
1463                                 ndr->offset = _relative_save_offset;
1464                         }
1465                         ndr->flags = _flags_save_string;
1466                 }
1467         }
1468         return NDR_ERR_SUCCESS;
1469 }
1470
1471 _PUBLIC_ void ndr_print_package_PrimaryKerberosString(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosString *r)
1472 {
1473         ndr_print_struct(ndr, name, "package_PrimaryKerberosString");
1474         ndr->depth++;
1475         ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length);
1476         ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->size);
1477         ndr_print_ptr(ndr, "string", r->string);
1478         ndr->depth++;
1479         if (r->string) {
1480                 ndr_print_string(ndr, "string", r->string);
1481         }
1482         ndr->depth--;
1483         ndr->depth--;
1484 }
1485
1486 static enum ndr_err_code ndr_push_package_PrimaryKerberosKey(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosKey *r)
1487 {
1488         if (ndr_flags & NDR_SCALARS) {
1489                 NDR_CHECK(ndr_push_align(ndr, 4));
1490                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->keytype));
1491                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (r->value?r->value->length:0)));
1492                 {
1493                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
1494                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1495                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value));
1496                         ndr->flags = _flags_save_DATA_BLOB;
1497                 }
1498                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1499                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1500         }
1501         if (ndr_flags & NDR_BUFFERS) {
1502                 {
1503                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
1504                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1505                         if (r->value) {
1506                                 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value));
1507                                 {
1508                                         struct ndr_push *_ndr_value;
1509                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_value, 0, (r->value?r->value->length:0)));
1510                                         NDR_CHECK(ndr_push_DATA_BLOB(_ndr_value, NDR_SCALARS, *r->value));
1511                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_value, 0, (r->value?r->value->length:0)));
1512                                 }
1513                         }
1514                         ndr->flags = _flags_save_DATA_BLOB;
1515                 }
1516         }
1517         return NDR_ERR_SUCCESS;
1518 }
1519
1520 static enum ndr_err_code ndr_pull_package_PrimaryKerberosKey(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosKey *r)
1521 {
1522         uint32_t _ptr_value;
1523         TALLOC_CTX *_mem_save_value_0;
1524         if (ndr_flags & NDR_SCALARS) {
1525                 NDR_CHECK(ndr_pull_align(ndr, 4));
1526                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->keytype));
1527                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_len));
1528                 {
1529                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
1530                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1531                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
1532                         if (_ptr_value) {
1533                                 NDR_PULL_ALLOC(ndr, r->value);
1534                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value, _ptr_value));
1535                         } else {
1536                                 r->value = NULL;
1537                         }
1538                         ndr->flags = _flags_save_DATA_BLOB;
1539                 }
1540                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
1541                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
1542         }
1543         if (ndr_flags & NDR_BUFFERS) {
1544                 {
1545                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
1546                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1547                         if (r->value) {
1548                                 uint32_t _relative_save_offset;
1549                                 _relative_save_offset = ndr->offset;
1550                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value));
1551                                 _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
1552                                 NDR_PULL_SET_MEM_CTX(ndr, r->value, 0);
1553                                 {
1554                                         struct ndr_pull *_ndr_value;
1555                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_value, 0, r->value_len));
1556                                         NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_value, NDR_SCALARS, r->value));
1557                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_value, 0, r->value_len));
1558                                 }
1559                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
1560                                 ndr->offset = _relative_save_offset;
1561                         }
1562                         ndr->flags = _flags_save_DATA_BLOB;
1563                 }
1564         }
1565         return NDR_ERR_SUCCESS;
1566 }
1567
1568 _PUBLIC_ void ndr_print_package_PrimaryKerberosKey(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosKey *r)
1569 {
1570         ndr_print_struct(ndr, name, "package_PrimaryKerberosKey");
1571         ndr->depth++;
1572         ndr_print_uint32(ndr, "keytype", r->keytype);
1573         ndr_print_uint32(ndr, "value_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(r->value?r->value->length:0):r->value_len);
1574         ndr_print_ptr(ndr, "value", r->value);
1575         ndr->depth++;
1576         if (r->value) {
1577                 ndr_print_DATA_BLOB(ndr, "value", *r->value);
1578         }
1579         ndr->depth--;
1580         ndr_print_uint32(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown1);
1581         ndr_print_uint32(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown2);
1582         ndr->depth--;
1583 }
1584
1585 static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr3(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosCtr3 *r)
1586 {
1587         uint32_t cntr_keys_0;
1588         uint32_t cntr_old_keys_0;
1589         uint32_t cntr_unknown3_0;
1590         uint32_t cntr_unknown3_old_0;
1591         if (ndr_flags & NDR_SCALARS) {
1592                 NDR_CHECK(ndr_push_align(ndr, 4));
1593                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_keys));
1594                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_old_keys));
1595                 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
1596                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1597                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1598                 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1599                         NDR_CHECK(ndr_push_package_PrimaryKerberosKey(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
1600                 }
1601                 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1602                         NDR_CHECK(ndr_push_package_PrimaryKerberosKey(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
1603                 }
1604                 for (cntr_unknown3_0 = 0; cntr_unknown3_0 < r->num_keys; cntr_unknown3_0++) {
1605                         NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->unknown3[cntr_unknown3_0]));
1606                 }
1607                 for (cntr_unknown3_old_0 = 0; cntr_unknown3_old_0 < r->num_old_keys; cntr_unknown3_old_0++) {
1608                         NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->unknown3_old[cntr_unknown3_old_0]));
1609                 }
1610         }
1611         if (ndr_flags & NDR_BUFFERS) {
1612                 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
1613                 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1614                         NDR_CHECK(ndr_push_package_PrimaryKerberosKey(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
1615                 }
1616                 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1617                         NDR_CHECK(ndr_push_package_PrimaryKerberosKey(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
1618                 }
1619         }
1620         return NDR_ERR_SUCCESS;
1621 }
1622
1623 static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr3(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosCtr3 *r)
1624 {
1625         uint32_t cntr_keys_0;
1626         TALLOC_CTX *_mem_save_keys_0;
1627         uint32_t cntr_old_keys_0;
1628         TALLOC_CTX *_mem_save_old_keys_0;
1629         uint32_t cntr_unknown3_0;
1630         TALLOC_CTX *_mem_save_unknown3_0;
1631         uint32_t cntr_unknown3_old_0;
1632         TALLOC_CTX *_mem_save_unknown3_old_0;
1633         if (ndr_flags & NDR_SCALARS) {
1634                 NDR_CHECK(ndr_pull_align(ndr, 4));
1635                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_keys));
1636                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_old_keys));
1637                 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
1638                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
1639                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
1640                 NDR_PULL_ALLOC_N(ndr, r->keys, r->num_keys);
1641                 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1642                 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
1643                 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1644                         NDR_CHECK(ndr_pull_package_PrimaryKerberosKey(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
1645                 }
1646                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
1647                 NDR_PULL_ALLOC_N(ndr, r->old_keys, r->num_old_keys);
1648                 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1649                 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
1650                 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1651                         NDR_CHECK(ndr_pull_package_PrimaryKerberosKey(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
1652                 }
1653                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
1654                 NDR_PULL_ALLOC_N(ndr, r->unknown3, r->num_keys);
1655                 _mem_save_unknown3_0 = NDR_PULL_GET_MEM_CTX(ndr);
1656                 NDR_PULL_SET_MEM_CTX(ndr, r->unknown3, 0);
1657                 for (cntr_unknown3_0 = 0; cntr_unknown3_0 < r->num_keys; cntr_unknown3_0++) {
1658                         NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->unknown3[cntr_unknown3_0]));
1659                 }
1660                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown3_0, 0);
1661                 NDR_PULL_ALLOC_N(ndr, r->unknown3_old, r->num_old_keys);
1662                 _mem_save_unknown3_old_0 = NDR_PULL_GET_MEM_CTX(ndr);
1663                 NDR_PULL_SET_MEM_CTX(ndr, r->unknown3_old, 0);
1664                 for (cntr_unknown3_old_0 = 0; cntr_unknown3_old_0 < r->num_old_keys; cntr_unknown3_old_0++) {
1665                         NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->unknown3_old[cntr_unknown3_old_0]));
1666                 }
1667                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown3_old_0, 0);
1668         }
1669         if (ndr_flags & NDR_BUFFERS) {
1670                 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
1671                 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1672                 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
1673                 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1674                         NDR_CHECK(ndr_pull_package_PrimaryKerberosKey(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
1675                 }
1676                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
1677                 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1678                 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
1679                 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1680                         NDR_CHECK(ndr_pull_package_PrimaryKerberosKey(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
1681                 }
1682                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
1683         }
1684         return NDR_ERR_SUCCESS;
1685 }
1686
1687 _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr3(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosCtr3 *r)
1688 {
1689         uint32_t cntr_keys_0;
1690         uint32_t cntr_old_keys_0;
1691         uint32_t cntr_unknown3_0;
1692         uint32_t cntr_unknown3_old_0;
1693         ndr_print_struct(ndr, name, "package_PrimaryKerberosCtr3");
1694         ndr->depth++;
1695         ndr_print_uint16(ndr, "num_keys", r->num_keys);
1696         ndr_print_uint16(ndr, "num_old_keys", r->num_old_keys);
1697         ndr_print_package_PrimaryKerberosString(ndr, "salt", &r->salt);
1698         ndr_print_uint32(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown1);
1699         ndr_print_uint32(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown2);
1700         ndr->print(ndr, "%s: ARRAY(%d)", "keys", r->num_keys);
1701         ndr->depth++;
1702         for (cntr_keys_0=0;cntr_keys_0<r->num_keys;cntr_keys_0++) {
1703                 char *idx_0=NULL;
1704                 if (asprintf(&idx_0, "[%d]", cntr_keys_0) != -1) {
1705                         ndr_print_package_PrimaryKerberosKey(ndr, "keys", &r->keys[cntr_keys_0]);
1706                         free(idx_0);
1707                 }
1708         }
1709         ndr->depth--;
1710         ndr->print(ndr, "%s: ARRAY(%d)", "old_keys", r->num_old_keys);
1711         ndr->depth++;
1712         for (cntr_old_keys_0=0;cntr_old_keys_0<r->num_old_keys;cntr_old_keys_0++) {
1713                 char *idx_0=NULL;
1714                 if (asprintf(&idx_0, "[%d]", cntr_old_keys_0) != -1) {
1715                         ndr_print_package_PrimaryKerberosKey(ndr, "old_keys", &r->old_keys[cntr_old_keys_0]);
1716                         free(idx_0);
1717                 }
1718         }
1719         ndr->depth--;
1720         ndr->print(ndr, "%s: ARRAY(%d)", "unknown3", r->num_keys);
1721         ndr->depth++;
1722         for (cntr_unknown3_0=0;cntr_unknown3_0<r->num_keys;cntr_unknown3_0++) {
1723                 char *idx_0=NULL;
1724                 if (asprintf(&idx_0, "[%d]", cntr_unknown3_0) != -1) {
1725                         ndr_print_udlong(ndr, "unknown3", r->unknown3[cntr_unknown3_0]);
1726                         free(idx_0);
1727                 }
1728         }
1729         ndr->depth--;
1730         ndr->print(ndr, "%s: ARRAY(%d)", "unknown3_old", r->num_old_keys);
1731         ndr->depth++;
1732         for (cntr_unknown3_old_0=0;cntr_unknown3_old_0<r->num_old_keys;cntr_unknown3_old_0++) {
1733                 char *idx_0=NULL;
1734                 if (asprintf(&idx_0, "[%d]", cntr_unknown3_old_0) != -1) {
1735                         ndr_print_udlong(ndr, "unknown3_old", r->unknown3_old[cntr_unknown3_old_0]);
1736                         free(idx_0);
1737                 }
1738         }
1739         ndr->depth--;
1740         ndr->depth--;
1741 }
1742
1743 static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr(struct ndr_push *ndr, int ndr_flags, const union package_PrimaryKerberosCtr *r)
1744 {
1745         if (ndr_flags & NDR_SCALARS) {
1746                 int level = ndr_push_get_switch_value(ndr, r);
1747                 switch (level) {
1748                         case 3: {
1749                                 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr, NDR_SCALARS, &r->ctr3));
1750                         break; }
1751
1752                         default:
1753                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1754                 }
1755         }
1756         if (ndr_flags & NDR_BUFFERS) {
1757                 int level = ndr_push_get_switch_value(ndr, r);
1758                 switch (level) {
1759                         case 3:
1760                                 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr, NDR_BUFFERS, &r->ctr3));
1761                         break;
1762
1763                         default:
1764                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1765                 }
1766         }
1767         return NDR_ERR_SUCCESS;
1768 }
1769
1770 static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr(struct ndr_pull *ndr, int ndr_flags, union package_PrimaryKerberosCtr *r)
1771 {
1772         int level;
1773         level = ndr_pull_get_switch_value(ndr, r);
1774         if (ndr_flags & NDR_SCALARS) {
1775                 switch (level) {
1776                         case 3: {
1777                                 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr, NDR_SCALARS, &r->ctr3));
1778                         break; }
1779
1780                         default:
1781                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1782                 }
1783         }
1784         if (ndr_flags & NDR_BUFFERS) {
1785                 switch (level) {
1786                         case 3:
1787                                 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr, NDR_BUFFERS, &r->ctr3));
1788                         break;
1789
1790                         default:
1791                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1792                 }
1793         }
1794         return NDR_ERR_SUCCESS;
1795 }
1796
1797 _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr(struct ndr_print *ndr, const char *name, const union package_PrimaryKerberosCtr *r)
1798 {
1799         int level;
1800         level = ndr_print_get_switch_value(ndr, r);
1801         ndr_print_union(ndr, name, level, "package_PrimaryKerberosCtr");
1802         switch (level) {
1803                 case 3:
1804                         ndr_print_package_PrimaryKerberosCtr3(ndr, "ctr3", &r->ctr3);
1805                 break;
1806
1807                 default:
1808                         ndr_print_bad_level(ndr, name, level);
1809         }
1810 }
1811
1812 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryKerberosBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosBlob *r)
1813 {
1814         if (ndr_flags & NDR_SCALARS) {
1815                 NDR_CHECK(ndr_push_align(ndr, 4));
1816                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 3));
1817                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, 3));
1818                 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr, NDR_SCALARS, &r->ctr));
1819         }
1820         if (ndr_flags & NDR_BUFFERS) {
1821                 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr, NDR_BUFFERS, &r->ctr));
1822         }
1823         return NDR_ERR_SUCCESS;
1824 }
1825
1826 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryKerberosBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosBlob *r)
1827 {
1828         if (ndr_flags & NDR_SCALARS) {
1829                 NDR_CHECK(ndr_pull_align(ndr, 4));
1830                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
1831                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
1832                 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr, NDR_SCALARS, &r->ctr));
1833         }
1834         if (ndr_flags & NDR_BUFFERS) {
1835                 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr, NDR_BUFFERS, &r->ctr));
1836         }
1837         return NDR_ERR_SUCCESS;
1838 }
1839
1840 _PUBLIC_ void ndr_print_package_PrimaryKerberosBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosBlob *r)
1841 {
1842         ndr_print_struct(ndr, name, "package_PrimaryKerberosBlob");
1843         ndr->depth++;
1844         ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?3:r->version);
1845         ndr_print_set_switch_value(ndr, &r->ctr, r->version);
1846         ndr_print_package_PrimaryKerberosCtr(ndr, "ctr", &r->ctr);
1847         ndr->depth--;
1848 }
1849
1850 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryCLEARTEXTBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryCLEARTEXTBlob *r)
1851 {
1852         if (ndr_flags & NDR_SCALARS) {
1853                 NDR_CHECK(ndr_push_align(ndr, 4));
1854                 {
1855                         uint32_t _flags_save_string = ndr->flags;
1856                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1857                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->cleartext));
1858                         ndr->flags = _flags_save_string;
1859                 }
1860         }
1861         if (ndr_flags & NDR_BUFFERS) {
1862         }
1863         return NDR_ERR_SUCCESS;
1864 }
1865
1866 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryCLEARTEXTBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryCLEARTEXTBlob *r)
1867 {
1868         if (ndr_flags & NDR_SCALARS) {
1869                 NDR_CHECK(ndr_pull_align(ndr, 4));
1870                 {
1871                         uint32_t _flags_save_string = ndr->flags;
1872                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1873                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->cleartext));
1874                         ndr->flags = _flags_save_string;
1875                 }
1876         }
1877         if (ndr_flags & NDR_BUFFERS) {
1878         }
1879         return NDR_ERR_SUCCESS;
1880 }
1881
1882 _PUBLIC_ void ndr_print_package_PrimaryCLEARTEXTBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryCLEARTEXTBlob *r)
1883 {
1884         ndr_print_struct(ndr, name, "package_PrimaryCLEARTEXTBlob");
1885         ndr->depth++;
1886         ndr_print_string(ndr, "cleartext", r->cleartext);
1887         ndr->depth--;
1888 }
1889
1890 static enum ndr_err_code ndr_push_package_PrimaryWDigestHash(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestHash *r)
1891 {
1892         {
1893                 uint32_t _flags_save_STRUCT = ndr->flags;
1894                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1895                 if (ndr_flags & NDR_SCALARS) {
1896                         NDR_CHECK(ndr_push_align(ndr, 1));
1897                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
1898                 }
1899                 if (ndr_flags & NDR_BUFFERS) {
1900                 }
1901                 ndr->flags = _flags_save_STRUCT;
1902         }
1903         return NDR_ERR_SUCCESS;
1904 }
1905
1906 static enum ndr_err_code ndr_pull_package_PrimaryWDigestHash(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestHash *r)
1907 {
1908         {
1909                 uint32_t _flags_save_STRUCT = ndr->flags;
1910                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1911                 if (ndr_flags & NDR_SCALARS) {
1912                         NDR_CHECK(ndr_pull_align(ndr, 1));
1913                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
1914                 }
1915                 if (ndr_flags & NDR_BUFFERS) {
1916                 }
1917                 ndr->flags = _flags_save_STRUCT;
1918         }
1919         return NDR_ERR_SUCCESS;
1920 }
1921
1922 _PUBLIC_ void ndr_print_package_PrimaryWDigestHash(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestHash *r)
1923 {
1924         ndr_print_struct(ndr, name, "package_PrimaryWDigestHash");
1925         {
1926                 uint32_t _flags_save_STRUCT = ndr->flags;
1927                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1928                 ndr->depth++;
1929                 ndr_print_array_uint8(ndr, "hash", r->hash, 16);
1930                 ndr->depth--;
1931                 ndr->flags = _flags_save_STRUCT;
1932         }
1933 }
1934
1935 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryWDigestBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestBlob *r)
1936 {
1937         uint32_t cntr_hashes_0;
1938         if (ndr_flags & NDR_SCALARS) {
1939                 NDR_CHECK(ndr_push_align(ndr, 4));
1940                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0x31));
1941                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0x01));
1942                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->num_hashes));
1943                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1944                 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, 0));
1945                 for (cntr_hashes_0 = 0; cntr_hashes_0 < r->num_hashes; cntr_hashes_0++) {
1946                         NDR_CHECK(ndr_push_package_PrimaryWDigestHash(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0]));
1947                 }
1948         }
1949         if (ndr_flags & NDR_BUFFERS) {
1950         }
1951         return NDR_ERR_SUCCESS;
1952 }
1953
1954 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryWDigestBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestBlob *r)
1955 {
1956         uint32_t cntr_hashes_0;
1957         TALLOC_CTX *_mem_save_hashes_0;
1958         if (ndr_flags & NDR_SCALARS) {
1959                 NDR_CHECK(ndr_pull_align(ndr, 4));
1960                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown1));
1961                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown2));
1962                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->num_hashes));
1963                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
1964                 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->uuknown4));
1965                 NDR_PULL_ALLOC_N(ndr, r->hashes, r->num_hashes);
1966                 _mem_save_hashes_0 = NDR_PULL_GET_MEM_CTX(ndr);
1967                 NDR_PULL_SET_MEM_CTX(ndr, r->hashes, 0);
1968                 for (cntr_hashes_0 = 0; cntr_hashes_0 < r->num_hashes; cntr_hashes_0++) {
1969                         NDR_CHECK(ndr_pull_package_PrimaryWDigestHash(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0]));
1970                 }
1971                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hashes_0, 0);
1972         }
1973         if (ndr_flags & NDR_BUFFERS) {
1974         }
1975         return NDR_ERR_SUCCESS;
1976 }
1977
1978 _PUBLIC_ void ndr_print_package_PrimaryWDigestBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestBlob *r)
1979 {
1980         uint32_t cntr_hashes_0;
1981         ndr_print_struct(ndr, name, "package_PrimaryWDigestBlob");
1982         ndr->depth++;
1983         ndr_print_uint16(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x31:r->unknown1);
1984         ndr_print_uint8(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x01:r->unknown2);
1985         ndr_print_uint8(ndr, "num_hashes", r->num_hashes);
1986         ndr_print_uint32(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown3);
1987         ndr_print_udlong(ndr, "uuknown4", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->uuknown4);
1988         ndr->print(ndr, "%s: ARRAY(%d)", "hashes", r->num_hashes);
1989         ndr->depth++;
1990         for (cntr_hashes_0=0;cntr_hashes_0<r->num_hashes;cntr_hashes_0++) {
1991                 char *idx_0=NULL;
1992                 if (asprintf(&idx_0, "[%d]", cntr_hashes_0) != -1) {
1993                         ndr_print_package_PrimaryWDigestHash(ndr, "hashes", &r->hashes[cntr_hashes_0]);
1994                         free(idx_0);
1995                 }
1996         }
1997         ndr->depth--;
1998         ndr->depth--;
1999 }
2000
2001 static enum ndr_err_code ndr_push_trustAuthInOutSecret1(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutSecret1 *r)
2002 {
2003         if (ndr_flags & NDR_SCALARS) {
2004                 NDR_CHECK(ndr_push_align(ndr, 4));
2005                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time1));
2006                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
2007                 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value));
2008                 {
2009                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
2010                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2011                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
2012                         ndr->flags = _flags_save_DATA_BLOB;
2013                 }
2014         }
2015         if (ndr_flags & NDR_BUFFERS) {
2016         }
2017         return NDR_ERR_SUCCESS;
2018 }
2019
2020 static enum ndr_err_code ndr_pull_trustAuthInOutSecret1(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutSecret1 *r)
2021 {
2022         if (ndr_flags & NDR_SCALARS) {
2023                 NDR_CHECK(ndr_pull_align(ndr, 4));
2024                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time1));
2025                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
2026                 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value));
2027                 {
2028                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
2029                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2030                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
2031                         ndr->flags = _flags_save_DATA_BLOB;
2032                 }
2033         }
2034         if (ndr_flags & NDR_BUFFERS) {
2035         }
2036         return NDR_ERR_SUCCESS;
2037 }
2038
2039 _PUBLIC_ void ndr_print_trustAuthInOutSecret1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret1 *r)
2040 {
2041         ndr_print_struct(ndr, name, "trustAuthInOutSecret1");
2042         ndr->depth++;
2043         ndr_print_NTTIME(ndr, "time1", r->time1);
2044         ndr_print_uint32(ndr, "unknown1", r->unknown1);
2045         ndr_print_DATA_BLOB(ndr, "value", r->value);
2046         ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
2047         ndr->depth--;
2048 }
2049
2050 static enum ndr_err_code ndr_push_trustAuthInOutCtr1(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutCtr1 *r)
2051 {
2052         if (ndr_flags & NDR_SCALARS) {
2053                 NDR_CHECK(ndr_push_align(ndr, 4));
2054                 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value1));
2055                 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value2));
2056         }
2057         if (ndr_flags & NDR_BUFFERS) {
2058                 if (r->value1) {
2059                         NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value1));
2060                         NDR_CHECK(ndr_push_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value1));
2061                 }
2062                 if (r->value2) {
2063                         NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value2));
2064                         NDR_CHECK(ndr_push_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value2));
2065                 }
2066         }
2067         return NDR_ERR_SUCCESS;
2068 }
2069
2070 static enum ndr_err_code ndr_pull_trustAuthInOutCtr1(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutCtr1 *r)
2071 {
2072         uint32_t _ptr_value1;
2073         TALLOC_CTX *_mem_save_value1_0;
2074         uint32_t _ptr_value2;
2075         TALLOC_CTX *_mem_save_value2_0;
2076         if (ndr_flags & NDR_SCALARS) {
2077                 NDR_CHECK(ndr_pull_align(ndr, 4));
2078                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value1));
2079                 if (_ptr_value1) {
2080                         NDR_PULL_ALLOC(ndr, r->value1);
2081                         NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value1, _ptr_value1));
2082                 } else {
2083                         r->value1 = NULL;
2084                 }
2085                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value2));
2086                 if (_ptr_value2) {
2087                         NDR_PULL_ALLOC(ndr, r->value2);
2088                         NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value2, _ptr_value2));
2089                 } else {
2090                         r->value2 = NULL;
2091                 }
2092         }
2093         if (ndr_flags & NDR_BUFFERS) {
2094                 if (r->value1) {
2095                         uint32_t _relative_save_offset;
2096                         _relative_save_offset = ndr->offset;
2097                         NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value1));
2098                         _mem_save_value1_0 = NDR_PULL_GET_MEM_CTX(ndr);
2099                         NDR_PULL_SET_MEM_CTX(ndr, r->value1, 0);
2100                         NDR_CHECK(ndr_pull_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value1));
2101                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value1_0, 0);
2102                         ndr->offset = _relative_save_offset;
2103                 }
2104                 if (r->value2) {
2105                         uint32_t _relative_save_offset;
2106                         _relative_save_offset = ndr->offset;
2107                         NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value2));
2108                         _mem_save_value2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2109                         NDR_PULL_SET_MEM_CTX(ndr, r->value2, 0);
2110                         NDR_CHECK(ndr_pull_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value2));
2111                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value2_0, 0);
2112                         ndr->offset = _relative_save_offset;
2113                 }
2114         }
2115         return NDR_ERR_SUCCESS;
2116 }
2117
2118 _PUBLIC_ void ndr_print_trustAuthInOutCtr1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr1 *r)
2119 {
2120         ndr_print_struct(ndr, name, "trustAuthInOutCtr1");
2121         ndr->depth++;
2122         ndr_print_ptr(ndr, "value1", r->value1);
2123         ndr->depth++;
2124         if (r->value1) {
2125                 ndr_print_trustAuthInOutSecret1(ndr, "value1", r->value1);
2126         }
2127         ndr->depth--;
2128         ndr_print_ptr(ndr, "value2", r->value2);
2129         ndr->depth++;
2130         if (r->value2) {
2131                 ndr_print_trustAuthInOutSecret1(ndr, "value2", r->value2);
2132         }
2133         ndr->depth--;
2134         ndr->depth--;
2135 }
2136
2137 static enum ndr_err_code ndr_push_trustAuthInOutSecret2V1(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutSecret2V1 *r)
2138 {
2139         if (ndr_flags & NDR_SCALARS) {
2140                 NDR_CHECK(ndr_push_align(ndr, 4));
2141                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time1));
2142                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
2143                 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value));
2144                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time2));
2145                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
2146                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
2147                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
2148                 {
2149                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
2150                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2151                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
2152                         ndr->flags = _flags_save_DATA_BLOB;
2153                 }
2154         }
2155         if (ndr_flags & NDR_BUFFERS) {
2156         }
2157         return NDR_ERR_SUCCESS;
2158 }
2159
2160 static enum ndr_err_code ndr_pull_trustAuthInOutSecret2V1(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutSecret2V1 *r)
2161 {
2162         if (ndr_flags & NDR_SCALARS) {
2163                 NDR_CHECK(ndr_pull_align(ndr, 4));
2164                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time1));
2165                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
2166                 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value));
2167                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time2));
2168                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
2169                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
2170                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
2171                 {
2172                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
2173                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2174                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
2175                         ndr->flags = _flags_save_DATA_BLOB;
2176                 }
2177         }
2178         if (ndr_flags & NDR_BUFFERS) {
2179         }
2180         return NDR_ERR_SUCCESS;
2181 }
2182
2183 _PUBLIC_ void ndr_print_trustAuthInOutSecret2V1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V1 *r)
2184 {
2185         ndr_print_struct(ndr, name, "trustAuthInOutSecret2V1");
2186         ndr->depth++;
2187         ndr_print_NTTIME(ndr, "time1", r->time1);
2188         ndr_print_uint32(ndr, "unknown1", r->unknown1);
2189         ndr_print_DATA_BLOB(ndr, "value", r->value);
2190         ndr_print_NTTIME(ndr, "time2", r->time2);
2191         ndr_print_uint32(ndr, "unknown2", r->unknown2);
2192         ndr_print_uint32(ndr, "unknown3", r->unknown3);
2193         ndr_print_uint32(ndr, "unknown4", r->unknown4);
2194         ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
2195         ndr->depth--;
2196 }
2197
2198 static enum ndr_err_code ndr_push_trustAuthInOutSecret2V2(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutSecret2V2 *r)
2199 {
2200         if (ndr_flags & NDR_SCALARS) {
2201                 NDR_CHECK(ndr_push_align(ndr, 4));
2202                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time1));
2203                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
2204                 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value));
2205                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time2));
2206                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
2207                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
2208                 {
2209                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
2210                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2211                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
2212                         ndr->flags = _flags_save_DATA_BLOB;
2213                 }
2214         }
2215         if (ndr_flags & NDR_BUFFERS) {
2216         }
2217         return NDR_ERR_SUCCESS;
2218 }
2219
2220 static enum ndr_err_code ndr_pull_trustAuthInOutSecret2V2(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutSecret2V2 *r)
2221 {
2222         if (ndr_flags & NDR_SCALARS) {
2223                 NDR_CHECK(ndr_pull_align(ndr, 4));
2224                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time1));
2225                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
2226                 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value));
2227                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time2));
2228                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
2229                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
2230                 {
2231                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
2232                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2233                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
2234                         ndr->flags = _flags_save_DATA_BLOB;
2235                 }
2236         }
2237         if (ndr_flags & NDR_BUFFERS) {
2238         }
2239         return NDR_ERR_SUCCESS;
2240 }
2241
2242 _PUBLIC_ void ndr_print_trustAuthInOutSecret2V2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V2 *r)
2243 {
2244         ndr_print_struct(ndr, name, "trustAuthInOutSecret2V2");
2245         ndr->depth++;
2246         ndr_print_NTTIME(ndr, "time1", r->time1);
2247         ndr_print_uint32(ndr, "unknown1", r->unknown1);
2248         ndr_print_DATA_BLOB(ndr, "value", r->value);
2249         ndr_print_NTTIME(ndr, "time2", r->time2);
2250         ndr_print_uint32(ndr, "unknown2", r->unknown2);
2251         ndr_print_uint32(ndr, "unknown3", r->unknown3);
2252         ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
2253         ndr->depth--;
2254 }
2255
2256 static enum ndr_err_code ndr_push_trustAuthInOutCtr2(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutCtr2 *r)
2257 {
2258         if (ndr_flags & NDR_SCALARS) {
2259                 NDR_CHECK(ndr_push_align(ndr, 4));
2260                 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value1));
2261                 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value2));
2262         }
2263         if (ndr_flags & NDR_BUFFERS) {
2264                 if (r->value1) {
2265                         NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value1));
2266                         NDR_CHECK(ndr_push_trustAuthInOutSecret2V1(ndr, NDR_SCALARS, r->value1));
2267                 }
2268                 if (r->value2) {
2269                         NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value2));
2270                         NDR_CHECK(ndr_push_trustAuthInOutSecret2V2(ndr, NDR_SCALARS, r->value2));
2271                 }
2272         }
2273         return NDR_ERR_SUCCESS;
2274 }
2275
2276 static enum ndr_err_code ndr_pull_trustAuthInOutCtr2(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutCtr2 *r)
2277 {
2278         uint32_t _ptr_value1;
2279         TALLOC_CTX *_mem_save_value1_0;
2280         uint32_t _ptr_value2;
2281         TALLOC_CTX *_mem_save_value2_0;
2282         if (ndr_flags & NDR_SCALARS) {
2283                 NDR_CHECK(ndr_pull_align(ndr, 4));
2284                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value1));
2285                 if (_ptr_value1) {
2286                         NDR_PULL_ALLOC(ndr, r->value1);
2287                         NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value1, _ptr_value1));
2288                 } else {
2289                         r->value1 = NULL;
2290                 }
2291                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value2));
2292                 if (_ptr_value2) {
2293                         NDR_PULL_ALLOC(ndr, r->value2);
2294                         NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value2, _ptr_value2));
2295                 } else {
2296                         r->value2 = NULL;
2297                 }
2298         }
2299         if (ndr_flags & NDR_BUFFERS) {
2300                 if (r->value1) {
2301                         uint32_t _relative_save_offset;
2302                         _relative_save_offset = ndr->offset;
2303                         NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value1));
2304                         _mem_save_value1_0 = NDR_PULL_GET_MEM_CTX(ndr);
2305                         NDR_PULL_SET_MEM_CTX(ndr, r->value1, 0);
2306                         NDR_CHECK(ndr_pull_trustAuthInOutSecret2V1(ndr, NDR_SCALARS, r->value1));
2307                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value1_0, 0);
2308                         ndr->offset = _relative_save_offset;
2309                 }
2310                 if (r->value2) {
2311                         uint32_t _relative_save_offset;
2312                         _relative_save_offset = ndr->offset;
2313                         NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value2));
2314                         _mem_save_value2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2315                         NDR_PULL_SET_MEM_CTX(ndr, r->value2, 0);
2316                         NDR_CHECK(ndr_pull_trustAuthInOutSecret2V2(ndr, NDR_SCALARS, r->value2));
2317                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value2_0, 0);
2318                         ndr->offset = _relative_save_offset;
2319                 }
2320         }
2321         return NDR_ERR_SUCCESS;
2322 }
2323
2324 _PUBLIC_ void ndr_print_trustAuthInOutCtr2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr2 *r)
2325 {
2326         ndr_print_struct(ndr, name, "trustAuthInOutCtr2");
2327         ndr->depth++;
2328         ndr_print_ptr(ndr, "value1", r->value1);
2329         ndr->depth++;
2330         if (r->value1) {
2331                 ndr_print_trustAuthInOutSecret2V1(ndr, "value1", r->value1);
2332         }
2333         ndr->depth--;
2334         ndr_print_ptr(ndr, "value2", r->value2);
2335         ndr->depth++;
2336         if (r->value2) {
2337                 ndr_print_trustAuthInOutSecret2V2(ndr, "value2", r->value2);
2338         }
2339         ndr->depth--;
2340         ndr->depth--;
2341 }
2342
2343 static enum ndr_err_code ndr_push_trustAuthInOutCtr(struct ndr_push *ndr, int ndr_flags, const union trustAuthInOutCtr *r)
2344 {
2345         if (ndr_flags & NDR_SCALARS) {
2346                 int level = ndr_push_get_switch_value(ndr, r);
2347                 switch (level) {
2348                         case 1: {
2349                                 NDR_CHECK(ndr_push_trustAuthInOutCtr1(ndr, NDR_SCALARS, &r->ctr1));
2350                         break; }
2351
2352                         case 2: {
2353                                 NDR_CHECK(ndr_push_trustAuthInOutCtr2(ndr, NDR_SCALARS, &r->ctr2));
2354                         break; }
2355
2356                         default:
2357                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2358                 }
2359         }
2360         if (ndr_flags & NDR_BUFFERS) {
2361                 int level = ndr_push_get_switch_value(ndr, r);
2362                 switch (level) {
2363                         case 1:
2364                                 NDR_CHECK(ndr_push_trustAuthInOutCtr1(ndr, NDR_BUFFERS, &r->ctr1));
2365                         break;
2366
2367                         case 2:
2368                                 NDR_CHECK(ndr_push_trustAuthInOutCtr2(ndr, NDR_BUFFERS, &r->ctr2));
2369                         break;
2370
2371                         default:
2372                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2373                 }
2374         }
2375         return NDR_ERR_SUCCESS;
2376 }
2377
2378 static enum ndr_err_code ndr_pull_trustAuthInOutCtr(struct ndr_pull *ndr, int ndr_flags, union trustAuthInOutCtr *r)
2379 {
2380         int level;
2381         level = ndr_pull_get_switch_value(ndr, r);
2382         if (ndr_flags & NDR_SCALARS) {
2383                 switch (level) {
2384                         case 1: {
2385                                 NDR_CHECK(ndr_pull_trustAuthInOutCtr1(ndr, NDR_SCALARS, &r->ctr1));
2386                         break; }
2387
2388                         case 2: {
2389                                 NDR_CHECK(ndr_pull_trustAuthInOutCtr2(ndr, NDR_SCALARS, &r->ctr2));
2390                         break; }
2391
2392                         default:
2393                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2394                 }
2395         }
2396         if (ndr_flags & NDR_BUFFERS) {
2397                 switch (level) {
2398                         case 1:
2399                                 NDR_CHECK(ndr_pull_trustAuthInOutCtr1(ndr, NDR_BUFFERS, &r->ctr1));
2400                         break;
2401
2402                         case 2:
2403                                 NDR_CHECK(ndr_pull_trustAuthInOutCtr2(ndr, NDR_BUFFERS, &r->ctr2));
2404                         break;
2405
2406                         default:
2407                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2408                 }
2409         }
2410         return NDR_ERR_SUCCESS;
2411 }
2412
2413 _PUBLIC_ void ndr_print_trustAuthInOutCtr(struct ndr_print *ndr, const char *name, const union trustAuthInOutCtr *r)
2414 {
2415         int level;
2416         level = ndr_print_get_switch_value(ndr, r);
2417         ndr_print_union(ndr, name, level, "trustAuthInOutCtr");
2418         switch (level) {
2419                 case 1:
2420                         ndr_print_trustAuthInOutCtr1(ndr, "ctr1", &r->ctr1);
2421                 break;
2422
2423                 case 2:
2424                         ndr_print_trustAuthInOutCtr2(ndr, "ctr2", &r->ctr2);
2425                 break;
2426
2427                 default:
2428                         ndr_print_bad_level(ndr, name, level);
2429         }
2430 }
2431
2432 _PUBLIC_ enum ndr_err_code ndr_push_trustAuthInOutBlob(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutBlob *r)
2433 {
2434         if (ndr_flags & NDR_SCALARS) {
2435                 NDR_CHECK(ndr_push_align(ndr, 4));
2436                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
2437                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
2438                 NDR_CHECK(ndr_push_trustAuthInOutCtr(ndr, NDR_SCALARS, &r->ctr));
2439         }
2440         if (ndr_flags & NDR_BUFFERS) {
2441                 NDR_CHECK(ndr_push_trustAuthInOutCtr(ndr, NDR_BUFFERS, &r->ctr));
2442         }
2443         return NDR_ERR_SUCCESS;
2444 }
2445
2446 _PUBLIC_ enum ndr_err_code ndr_pull_trustAuthInOutBlob(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutBlob *r)
2447 {
2448         if (ndr_flags & NDR_SCALARS) {
2449                 NDR_CHECK(ndr_pull_align(ndr, 4));
2450                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
2451                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
2452                 NDR_CHECK(ndr_pull_trustAuthInOutCtr(ndr, NDR_SCALARS, &r->ctr));
2453         }
2454         if (ndr_flags & NDR_BUFFERS) {
2455                 NDR_CHECK(ndr_pull_trustAuthInOutCtr(ndr, NDR_BUFFERS, &r->ctr));
2456         }
2457         return NDR_ERR_SUCCESS;
2458 }
2459
2460 _PUBLIC_ void ndr_print_trustAuthInOutBlob(struct ndr_print *ndr, const char *name, const struct trustAuthInOutBlob *r)
2461 {
2462         ndr_print_struct(ndr, name, "trustAuthInOutBlob");
2463         ndr->depth++;
2464         ndr_print_uint32(ndr, "version", r->version);
2465         ndr_print_set_switch_value(ndr, &r->ctr, r->version);
2466         ndr_print_trustAuthInOutCtr(ndr, "ctr", &r->ctr);
2467         ndr->depth--;
2468 }
2469
2470 _PUBLIC_ enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r)
2471 {
2472         if (ndr_flags & NDR_SCALARS) {
2473                 NDR_CHECK(ndr_push_align(ndr, 4));
2474                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->marker));
2475                 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
2476         }
2477         if (ndr_flags & NDR_BUFFERS) {
2478         }
2479         return NDR_ERR_SUCCESS;
2480 }
2481
2482 _PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r)
2483 {
2484         if (ndr_flags & NDR_SCALARS) {
2485                 NDR_CHECK(ndr_pull_align(ndr, 4));
2486                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->marker));
2487                 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
2488         }
2489         if (ndr_flags & NDR_BUFFERS) {
2490         }
2491         return NDR_ERR_SUCCESS;
2492 }
2493
2494 _PUBLIC_ void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r)
2495 {
2496         ndr_print_struct(ndr, name, "DsCompressedChunk");
2497         ndr->depth++;
2498         ndr_print_uint32(ndr, "marker", r->marker);
2499         ndr_print_DATA_BLOB(ndr, "data", r->data);
2500         ndr->depth--;
2501 }
2502
2503 _PUBLIC_ enum ndr_err_code ndr_push_DsCompressedBlob(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedBlob *r)
2504 {
2505         uint32_t cntr_chunks_0;
2506         if (ndr_flags & NDR_SCALARS) {
2507                 NDR_CHECK(ndr_push_align(ndr, 4));
2508                 for (cntr_chunks_0 = 0; cntr_chunks_0 < 5; cntr_chunks_0++) {
2509                         NDR_CHECK(ndr_push_DsCompressedChunk(ndr, NDR_SCALARS, &r->chunks[cntr_chunks_0]));
2510                 }
2511         }
2512         if (ndr_flags & NDR_BUFFERS) {
2513         }
2514         return NDR_ERR_SUCCESS;
2515 }
2516
2517 _PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedBlob(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedBlob *r)
2518 {
2519         uint32_t cntr_chunks_0;
2520         if (ndr_flags & NDR_SCALARS) {
2521                 NDR_CHECK(ndr_pull_align(ndr, 4));
2522                 for (cntr_chunks_0 = 0; cntr_chunks_0 < 5; cntr_chunks_0++) {
2523                         NDR_CHECK(ndr_pull_DsCompressedChunk(ndr, NDR_SCALARS, &r->chunks[cntr_chunks_0]));
2524                 }
2525         }
2526         if (ndr_flags & NDR_BUFFERS) {
2527         }
2528         return NDR_ERR_SUCCESS;
2529 }
2530
2531 _PUBLIC_ void ndr_print_DsCompressedBlob(struct ndr_print *ndr, const char *name, const struct DsCompressedBlob *r)
2532 {
2533         uint32_t cntr_chunks_0;
2534         ndr_print_struct(ndr, name, "DsCompressedBlob");
2535         ndr->depth++;
2536         ndr->print(ndr, "%s: ARRAY(%d)", "chunks", 5);
2537         ndr->depth++;
2538         for (cntr_chunks_0=0;cntr_chunks_0<5;cntr_chunks_0++) {
2539                 char *idx_0=NULL;
2540                 if (asprintf(&idx_0, "[%d]", cntr_chunks_0) != -1) {
2541                         ndr_print_DsCompressedChunk(ndr, "chunks", &r->chunks[cntr_chunks_0]);
2542                         free(idx_0);
2543                 }
2544         }
2545         ndr->depth--;
2546         ndr->depth--;
2547 }
2548
2549 static enum ndr_err_code ndr_push_decode_replPropertyMetaData(struct ndr_push *ndr, int flags, const struct decode_replPropertyMetaData *r)
2550 {
2551         if (flags & NDR_IN) {
2552                 NDR_CHECK(ndr_push_replPropertyMetaDataBlob(ndr, NDR_SCALARS, &r->in.blob));
2553         }
2554         if (flags & NDR_OUT) {
2555         }
2556         return NDR_ERR_SUCCESS;
2557 }
2558
2559 static enum ndr_err_code ndr_pull_decode_replPropertyMetaData(struct ndr_pull *ndr, int flags, struct decode_replPropertyMetaData *r)
2560 {
2561         if (flags & NDR_IN) {
2562                 NDR_CHECK(ndr_pull_replPropertyMetaDataBlob(ndr, NDR_SCALARS, &r->in.blob));
2563         }
2564         if (flags & NDR_OUT) {
2565         }
2566         return NDR_ERR_SUCCESS;
2567 }
2568
2569 _PUBLIC_ void ndr_print_decode_replPropertyMetaData(struct ndr_print *ndr, const char *name, int flags, const struct decode_replPropertyMetaData *r)
2570 {
2571         ndr_print_struct(ndr, name, "decode_replPropertyMetaData");
2572         ndr->depth++;
2573         if (flags & NDR_SET_VALUES) {
2574                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2575         }
2576         if (flags & NDR_IN) {
2577                 ndr_print_struct(ndr, "in", "decode_replPropertyMetaData");
2578                 ndr->depth++;
2579                 ndr_print_replPropertyMetaDataBlob(ndr, "blob", &r->in.blob);
2580                 ndr->depth--;
2581         }
2582         if (flags & NDR_OUT) {
2583                 ndr_print_struct(ndr, "out", "decode_replPropertyMetaData");
2584                 ndr->depth++;
2585                 ndr->depth--;
2586         }
2587         ndr->depth--;
2588 }
2589
2590 static enum ndr_err_code ndr_push_decode_replUpToDateVector(struct ndr_push *ndr, int flags, const struct decode_replUpToDateVector *r)
2591 {
2592         if (flags & NDR_IN) {
2593                 NDR_CHECK(ndr_push_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->in.blob));
2594         }
2595         if (flags & NDR_OUT) {
2596         }
2597         return NDR_ERR_SUCCESS;
2598 }
2599
2600 static enum ndr_err_code ndr_pull_decode_replUpToDateVector(struct ndr_pull *ndr, int flags, struct decode_replUpToDateVector *r)
2601 {
2602         if (flags & NDR_IN) {
2603                 NDR_CHECK(ndr_pull_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->in.blob));
2604         }
2605         if (flags & NDR_OUT) {
2606         }
2607         return NDR_ERR_SUCCESS;
2608 }
2609
2610 _PUBLIC_ void ndr_print_decode_replUpToDateVector(struct ndr_print *ndr, const char *name, int flags, const struct decode_replUpToDateVector *r)
2611 {
2612         ndr_print_struct(ndr, name, "decode_replUpToDateVector");
2613         ndr->depth++;
2614         if (flags & NDR_SET_VALUES) {
2615                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2616         }
2617         if (flags & NDR_IN) {
2618                 ndr_print_struct(ndr, "in", "decode_replUpToDateVector");
2619                 ndr->depth++;
2620                 ndr_print_replUpToDateVectorBlob(ndr, "blob", &r->in.blob);
2621                 ndr->depth--;
2622         }
2623         if (flags & NDR_OUT) {
2624                 ndr_print_struct(ndr, "out", "decode_replUpToDateVector");
2625                 ndr->depth++;
2626                 ndr->depth--;
2627         }
2628         ndr->depth--;
2629 }
2630
2631 static enum ndr_err_code ndr_push_decode_repsFromTo(struct ndr_push *ndr, int flags, const struct decode_repsFromTo *r)
2632 {
2633         if (flags & NDR_IN) {
2634                 NDR_CHECK(ndr_push_repsFromToBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
2635         }
2636         if (flags & NDR_OUT) {
2637         }
2638         return NDR_ERR_SUCCESS;
2639 }
2640
2641 static enum ndr_err_code ndr_pull_decode_repsFromTo(struct ndr_pull *ndr, int flags, struct decode_repsFromTo *r)
2642 {
2643         if (flags & NDR_IN) {
2644                 NDR_CHECK(ndr_pull_repsFromToBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
2645         }
2646         if (flags & NDR_OUT) {
2647         }
2648         return NDR_ERR_SUCCESS;
2649 }
2650
2651 _PUBLIC_ void ndr_print_decode_repsFromTo(struct ndr_print *ndr, const char *name, int flags, const struct decode_repsFromTo *r)
2652 {
2653         ndr_print_struct(ndr, name, "decode_repsFromTo");
2654         ndr->depth++;
2655         if (flags & NDR_SET_VALUES) {
2656                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2657         }
2658         if (flags & NDR_IN) {
2659                 ndr_print_struct(ndr, "in", "decode_repsFromTo");
2660                 ndr->depth++;
2661                 ndr_print_repsFromToBlob(ndr, "blob", &r->in.blob);
2662                 ndr->depth--;
2663         }
2664         if (flags & NDR_OUT) {
2665                 ndr_print_struct(ndr, "out", "decode_repsFromTo");
2666                 ndr->depth++;
2667                 ndr->depth--;
2668         }
2669         ndr->depth--;
2670 }
2671
2672 static enum ndr_err_code ndr_push_decode_partialAttributeSet(struct ndr_push *ndr, int flags, const struct decode_partialAttributeSet *r)
2673 {
2674         if (flags & NDR_IN) {
2675                 NDR_CHECK(ndr_push_partialAttributeSetBlob(ndr, NDR_SCALARS, &r->in.blob));
2676         }
2677         if (flags & NDR_OUT) {
2678         }
2679         return NDR_ERR_SUCCESS;
2680 }
2681
2682 static enum ndr_err_code ndr_pull_decode_partialAttributeSet(struct ndr_pull *ndr, int flags, struct decode_partialAttributeSet *r)
2683 {
2684         if (flags & NDR_IN) {
2685                 NDR_CHECK(ndr_pull_partialAttributeSetBlob(ndr, NDR_SCALARS, &r->in.blob));
2686         }
2687         if (flags & NDR_OUT) {
2688         }
2689         return NDR_ERR_SUCCESS;
2690 }
2691
2692 _PUBLIC_ void ndr_print_decode_partialAttributeSet(struct ndr_print *ndr, const char *name, int flags, const struct decode_partialAttributeSet *r)
2693 {
2694         ndr_print_struct(ndr, name, "decode_partialAttributeSet");
2695         ndr->depth++;
2696         if (flags & NDR_SET_VALUES) {
2697                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2698         }
2699         if (flags & NDR_IN) {
2700                 ndr_print_struct(ndr, "in", "decode_partialAttributeSet");
2701                 ndr->depth++;
2702                 ndr_print_partialAttributeSetBlob(ndr, "blob", &r->in.blob);
2703                 ndr->depth--;
2704         }
2705         if (flags & NDR_OUT) {
2706                 ndr_print_struct(ndr, "out", "decode_partialAttributeSet");
2707                 ndr->depth++;
2708                 ndr->depth--;
2709         }
2710         ndr->depth--;
2711 }
2712
2713 static enum ndr_err_code ndr_push_decode_prefixMap(struct ndr_push *ndr, int flags, const struct decode_prefixMap *r)
2714 {
2715         if (flags & NDR_IN) {
2716                 NDR_CHECK(ndr_push_prefixMapBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
2717         }
2718         if (flags & NDR_OUT) {
2719         }
2720         return NDR_ERR_SUCCESS;
2721 }
2722
2723 static enum ndr_err_code ndr_pull_decode_prefixMap(struct ndr_pull *ndr, int flags, struct decode_prefixMap *r)
2724 {
2725         if (flags & NDR_IN) {
2726                 NDR_CHECK(ndr_pull_prefixMapBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
2727         }
2728         if (flags & NDR_OUT) {
2729         }
2730         return NDR_ERR_SUCCESS;
2731 }
2732
2733 _PUBLIC_ void ndr_print_decode_prefixMap(struct ndr_print *ndr, const char *name, int flags, const struct decode_prefixMap *r)
2734 {
2735         ndr_print_struct(ndr, name, "decode_prefixMap");
2736         ndr->depth++;
2737         if (flags & NDR_SET_VALUES) {
2738                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2739         }
2740         if (flags & NDR_IN) {
2741                 ndr_print_struct(ndr, "in", "decode_prefixMap");
2742                 ndr->depth++;
2743                 ndr_print_prefixMapBlob(ndr, "blob", &r->in.blob);
2744                 ndr->depth--;
2745         }
2746         if (flags & NDR_OUT) {
2747                 ndr_print_struct(ndr, "out", "decode_prefixMap");
2748                 ndr->depth++;
2749                 ndr->depth--;
2750         }
2751         ndr->depth--;
2752 }
2753
2754 static enum ndr_err_code ndr_push_decode_ldapControlDirSync(struct ndr_push *ndr, int flags, const struct decode_ldapControlDirSync *r)
2755 {
2756         if (flags & NDR_IN) {
2757                 NDR_CHECK(ndr_push_ldapControlDirSyncCookie(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.cookie));
2758         }
2759         if (flags & NDR_OUT) {
2760         }
2761         return NDR_ERR_SUCCESS;
2762 }
2763
2764 static enum ndr_err_code ndr_pull_decode_ldapControlDirSync(struct ndr_pull *ndr, int flags, struct decode_ldapControlDirSync *r)
2765 {
2766         if (flags & NDR_IN) {
2767                 NDR_CHECK(ndr_pull_ldapControlDirSyncCookie(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.cookie));
2768         }
2769         if (flags & NDR_OUT) {
2770         }
2771         return NDR_ERR_SUCCESS;
2772 }
2773
2774 _PUBLIC_ void ndr_print_decode_ldapControlDirSync(struct ndr_print *ndr, const char *name, int flags, const struct decode_ldapControlDirSync *r)
2775 {
2776         ndr_print_struct(ndr, name, "decode_ldapControlDirSync");
2777         ndr->depth++;
2778         if (flags & NDR_SET_VALUES) {
2779                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2780         }
2781         if (flags & NDR_IN) {
2782                 ndr_print_struct(ndr, "in", "decode_ldapControlDirSync");
2783                 ndr->depth++;
2784                 ndr_print_ldapControlDirSyncCookie(ndr, "cookie", &r->in.cookie);
2785                 ndr->depth--;
2786         }
2787         if (flags & NDR_OUT) {
2788                 ndr_print_struct(ndr, "out", "decode_ldapControlDirSync");
2789                 ndr->depth++;
2790                 ndr->depth--;
2791         }
2792         ndr->depth--;
2793 }
2794
2795 static enum ndr_err_code ndr_push_decode_supplementalCredentials(struct ndr_push *ndr, int flags, const struct decode_supplementalCredentials *r)
2796 {
2797         if (flags & NDR_IN) {
2798                 NDR_CHECK(ndr_push_supplementalCredentialsBlob(ndr, NDR_SCALARS, &r->in.blob));
2799         }
2800         if (flags & NDR_OUT) {
2801         }
2802         return NDR_ERR_SUCCESS;
2803 }
2804
2805 static enum ndr_err_code ndr_pull_decode_supplementalCredentials(struct ndr_pull *ndr, int flags, struct decode_supplementalCredentials *r)
2806 {
2807         if (flags & NDR_IN) {
2808                 NDR_CHECK(ndr_pull_supplementalCredentialsBlob(ndr, NDR_SCALARS, &r->in.blob));
2809         }
2810         if (flags & NDR_OUT) {
2811         }
2812         return NDR_ERR_SUCCESS;
2813 }
2814
2815 _PUBLIC_ void ndr_print_decode_supplementalCredentials(struct ndr_print *ndr, const char *name, int flags, const struct decode_supplementalCredentials *r)
2816 {
2817         ndr_print_struct(ndr, name, "decode_supplementalCredentials");
2818         ndr->depth++;
2819         if (flags & NDR_SET_VALUES) {
2820                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2821         }
2822         if (flags & NDR_IN) {
2823                 ndr_print_struct(ndr, "in", "decode_supplementalCredentials");
2824                 ndr->depth++;
2825                 ndr_print_supplementalCredentialsBlob(ndr, "blob", &r->in.blob);
2826                 ndr->depth--;
2827         }
2828         if (flags & NDR_OUT) {
2829                 ndr_print_struct(ndr, "out", "decode_supplementalCredentials");
2830                 ndr->depth++;
2831                 ndr->depth--;
2832         }
2833         ndr->depth--;
2834 }
2835
2836 static enum ndr_err_code ndr_push_decode_Packages(struct ndr_push *ndr, int flags, const struct decode_Packages *r)
2837 {
2838         if (flags & NDR_IN) {
2839                 NDR_CHECK(ndr_push_package_PackagesBlob(ndr, NDR_SCALARS, &r->in.blob));
2840         }
2841         if (flags & NDR_OUT) {
2842         }
2843         return NDR_ERR_SUCCESS;
2844 }
2845
2846 static enum ndr_err_code ndr_pull_decode_Packages(struct ndr_pull *ndr, int flags, struct decode_Packages *r)
2847 {
2848         if (flags & NDR_IN) {
2849                 NDR_CHECK(ndr_pull_package_PackagesBlob(ndr, NDR_SCALARS, &r->in.blob));
2850         }
2851         if (flags & NDR_OUT) {
2852         }
2853         return NDR_ERR_SUCCESS;
2854 }
2855
2856 _PUBLIC_ void ndr_print_decode_Packages(struct ndr_print *ndr, const char *name, int flags, const struct decode_Packages *r)
2857 {
2858         ndr_print_struct(ndr, name, "decode_Packages");
2859         ndr->depth++;
2860         if (flags & NDR_SET_VALUES) {
2861                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2862         }
2863         if (flags & NDR_IN) {
2864                 ndr_print_struct(ndr, "in", "decode_Packages");
2865                 ndr->depth++;
2866                 ndr_print_package_PackagesBlob(ndr, "blob", &r->in.blob);
2867                 ndr->depth--;
2868         }
2869         if (flags & NDR_OUT) {
2870                 ndr_print_struct(ndr, "out", "decode_Packages");
2871                 ndr->depth++;
2872                 ndr->depth--;
2873         }
2874         ndr->depth--;
2875 }
2876
2877 static enum ndr_err_code ndr_push_decode_PrimaryKerberos(struct ndr_push *ndr, int flags, const struct decode_PrimaryKerberos *r)
2878 {
2879         if (flags & NDR_IN) {
2880                 NDR_CHECK(ndr_push_package_PrimaryKerberosBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
2881         }
2882         if (flags & NDR_OUT) {
2883         }
2884         return NDR_ERR_SUCCESS;
2885 }
2886
2887 static enum ndr_err_code ndr_pull_decode_PrimaryKerberos(struct ndr_pull *ndr, int flags, struct decode_PrimaryKerberos *r)
2888 {
2889         if (flags & NDR_IN) {
2890                 NDR_CHECK(ndr_pull_package_PrimaryKerberosBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
2891         }
2892         if (flags & NDR_OUT) {
2893         }
2894         return NDR_ERR_SUCCESS;
2895 }
2896
2897 _PUBLIC_ void ndr_print_decode_PrimaryKerberos(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryKerberos *r)
2898 {
2899         ndr_print_struct(ndr, name, "decode_PrimaryKerberos");
2900         ndr->depth++;
2901         if (flags & NDR_SET_VALUES) {
2902                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2903         }
2904         if (flags & NDR_IN) {
2905                 ndr_print_struct(ndr, "in", "decode_PrimaryKerberos");
2906                 ndr->depth++;
2907                 ndr_print_package_PrimaryKerberosBlob(ndr, "blob", &r->in.blob);
2908                 ndr->depth--;
2909         }
2910         if (flags & NDR_OUT) {
2911                 ndr_print_struct(ndr, "out", "decode_PrimaryKerberos");