re-run "make idl" after adding idl for idl for Primary:Kerberos-Newer-Keys
[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", (int)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", (int)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", (int)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", (int)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->reserved));
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->reserved));
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, "reserved", r->reserved);
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_supplementalCredentialsSignature(struct ndr_push *ndr, int ndr_flags, enum supplementalCredentialsSignature r)
1240 {
1241         {
1242                 uint32_t _flags_save_ENUM = ndr->flags;
1243                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1244                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
1245                 ndr->flags = _flags_save_ENUM;
1246         }
1247         return NDR_ERR_SUCCESS;
1248 }
1249
1250 static enum ndr_err_code ndr_pull_supplementalCredentialsSignature(struct ndr_pull *ndr, int ndr_flags, enum supplementalCredentialsSignature *r)
1251 {
1252         uint16_t v;
1253         {
1254                 uint32_t _flags_save_ENUM = ndr->flags;
1255                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1256                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
1257                 *r = v;
1258                 ndr->flags = _flags_save_ENUM;
1259         }
1260         return NDR_ERR_SUCCESS;
1261 }
1262
1263 _PUBLIC_ void ndr_print_supplementalCredentialsSignature(struct ndr_print *ndr, const char *name, enum supplementalCredentialsSignature r)
1264 {
1265         const char *val = NULL;
1266
1267         {
1268                 uint32_t _flags_save_ENUM = ndr->flags;
1269                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1270                 switch (r) {
1271                         case SUPPLEMENTAL_CREDENTIALS_SIGNATURE: val = "SUPPLEMENTAL_CREDENTIALS_SIGNATURE"; break;
1272                 }
1273                 ndr_print_enum(ndr, name, "ENUM", val, r);
1274                 ndr->flags = _flags_save_ENUM;
1275         }
1276 }
1277
1278 static enum ndr_err_code ndr_push_supplementalCredentialsSubBlob(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsSubBlob *r)
1279 {
1280         uint32_t cntr_packages_0;
1281         if (ndr_flags & NDR_SCALARS) {
1282                 NDR_CHECK(ndr_push_align(ndr, 2));
1283                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, SUPPLEMENTAL_CREDENTIALS_PREFIX, 0x30, sizeof(uint16_t), CH_UTF16));
1284                 NDR_CHECK(ndr_push_supplementalCredentialsSignature(ndr, NDR_SCALARS, SUPPLEMENTAL_CREDENTIALS_SIGNATURE));
1285                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_packages));
1286                 for (cntr_packages_0 = 0; cntr_packages_0 < r->num_packages; cntr_packages_0++) {
1287                         NDR_CHECK(ndr_push_supplementalCredentialsPackage(ndr, NDR_SCALARS, &r->packages[cntr_packages_0]));
1288                 }
1289         }
1290         if (ndr_flags & NDR_BUFFERS) {
1291         }
1292         return NDR_ERR_SUCCESS;
1293 }
1294
1295 static enum ndr_err_code ndr_pull_supplementalCredentialsSubBlob(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsSubBlob *r)
1296 {
1297         uint32_t cntr_packages_0;
1298         TALLOC_CTX *_mem_save_packages_0;
1299         if (ndr_flags & NDR_SCALARS) {
1300                 NDR_CHECK(ndr_pull_align(ndr, 2));
1301                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->prefix, 0x30, sizeof(uint16_t), CH_UTF16));
1302                 NDR_CHECK(ndr_pull_supplementalCredentialsSignature(ndr, NDR_SCALARS, &r->signature));
1303                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_packages));
1304                 NDR_PULL_ALLOC_N(ndr, r->packages, r->num_packages);
1305                 _mem_save_packages_0 = NDR_PULL_GET_MEM_CTX(ndr);
1306                 NDR_PULL_SET_MEM_CTX(ndr, r->packages, 0);
1307                 for (cntr_packages_0 = 0; cntr_packages_0 < r->num_packages; cntr_packages_0++) {
1308                         NDR_CHECK(ndr_pull_supplementalCredentialsPackage(ndr, NDR_SCALARS, &r->packages[cntr_packages_0]));
1309                 }
1310                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_packages_0, 0);
1311         }
1312         if (ndr_flags & NDR_BUFFERS) {
1313         }
1314         return NDR_ERR_SUCCESS;
1315 }
1316
1317 _PUBLIC_ void ndr_print_supplementalCredentialsSubBlob(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsSubBlob *r)
1318 {
1319         uint32_t cntr_packages_0;
1320         ndr_print_struct(ndr, name, "supplementalCredentialsSubBlob");
1321         ndr->depth++;
1322         ndr_print_string(ndr, "prefix", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?SUPPLEMENTAL_CREDENTIALS_PREFIX:r->prefix);
1323         ndr_print_supplementalCredentialsSignature(ndr, "signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?SUPPLEMENTAL_CREDENTIALS_SIGNATURE:r->signature);
1324         ndr_print_uint16(ndr, "num_packages", r->num_packages);
1325         ndr->print(ndr, "%s: ARRAY(%d)", "packages", (int)r->num_packages);
1326         ndr->depth++;
1327         for (cntr_packages_0=0;cntr_packages_0<r->num_packages;cntr_packages_0++) {
1328                 char *idx_0=NULL;
1329                 if (asprintf(&idx_0, "[%d]", cntr_packages_0) != -1) {
1330                         ndr_print_supplementalCredentialsPackage(ndr, "packages", &r->packages[cntr_packages_0]);
1331                         free(idx_0);
1332                 }
1333         }
1334         ndr->depth--;
1335         ndr->depth--;
1336 }
1337
1338 static size_t ndr_size_supplementalCredentialsSubBlob(const struct supplementalCredentialsSubBlob *r, int flags)
1339 {
1340         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_supplementalCredentialsSubBlob);
1341 }
1342
1343 _PUBLIC_ enum ndr_err_code ndr_push_supplementalCredentialsBlob(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsBlob *r)
1344 {
1345         if (ndr_flags & NDR_SCALARS) {
1346                 NDR_CHECK(ndr_push_align(ndr, 4));
1347                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1348                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->flags)));
1349                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1350                 {
1351                         struct ndr_push *_ndr_sub;
1352                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->flags)));
1353                         NDR_CHECK(ndr_push_supplementalCredentialsSubBlob(_ndr_sub, NDR_SCALARS, &r->sub));
1354                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->flags)));
1355                 }
1356                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0));
1357         }
1358         if (ndr_flags & NDR_BUFFERS) {
1359         }
1360         return NDR_ERR_SUCCESS;
1361 }
1362
1363 _PUBLIC_ enum ndr_err_code ndr_pull_supplementalCredentialsBlob(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsBlob *r)
1364 {
1365         if (ndr_flags & NDR_SCALARS) {
1366                 NDR_CHECK(ndr_pull_align(ndr, 4));
1367                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
1368                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
1369                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
1370                 {
1371                         struct ndr_pull *_ndr_sub;
1372                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sub, 0, r->__ndr_size));
1373                         NDR_CHECK(ndr_pull_supplementalCredentialsSubBlob(_ndr_sub, NDR_SCALARS, &r->sub));
1374                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sub, 0, r->__ndr_size));
1375                 }
1376                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown3));
1377         }
1378         if (ndr_flags & NDR_BUFFERS) {
1379         }
1380         return NDR_ERR_SUCCESS;
1381 }
1382
1383 _PUBLIC_ void ndr_print_supplementalCredentialsBlob(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsBlob *r)
1384 {
1385         ndr_print_struct(ndr, name, "supplementalCredentialsBlob");
1386         ndr->depth++;
1387         ndr_print_uint32(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown1);
1388         ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->flags):r->__ndr_size);
1389         ndr_print_uint32(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown2);
1390         ndr_print_supplementalCredentialsSubBlob(ndr, "sub", &r->sub);
1391         ndr_print_uint8(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown3);
1392         ndr->depth--;
1393 }
1394
1395 _PUBLIC_ enum ndr_err_code ndr_push_package_PackagesBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PackagesBlob *r)
1396 {
1397         if (ndr_flags & NDR_SCALARS) {
1398                 NDR_CHECK(ndr_push_align(ndr, 4));
1399                 {
1400                         uint32_t _flags_save_string_array = ndr->flags;
1401                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1402                         NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->names));
1403                         ndr->flags = _flags_save_string_array;
1404                 }
1405         }
1406         if (ndr_flags & NDR_BUFFERS) {
1407         }
1408         return NDR_ERR_SUCCESS;
1409 }
1410
1411 _PUBLIC_ enum ndr_err_code ndr_pull_package_PackagesBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PackagesBlob *r)
1412 {
1413         if (ndr_flags & NDR_SCALARS) {
1414                 NDR_CHECK(ndr_pull_align(ndr, 4));
1415                 {
1416                         uint32_t _flags_save_string_array = ndr->flags;
1417                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1418                         NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->names));
1419                         ndr->flags = _flags_save_string_array;
1420                 }
1421         }
1422         if (ndr_flags & NDR_BUFFERS) {
1423         }
1424         return NDR_ERR_SUCCESS;
1425 }
1426
1427 _PUBLIC_ void ndr_print_package_PackagesBlob(struct ndr_print *ndr, const char *name, const struct package_PackagesBlob *r)
1428 {
1429         ndr_print_struct(ndr, name, "package_PackagesBlob");
1430         ndr->depth++;
1431         ndr_print_string_array(ndr, "names", r->names);
1432         ndr->depth--;
1433 }
1434
1435 static enum ndr_err_code ndr_push_package_PrimaryKerberosString(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosString *r)
1436 {
1437         if (ndr_flags & NDR_SCALARS) {
1438                 NDR_CHECK(ndr_push_align(ndr, 4));
1439                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
1440                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
1441                 {
1442                         uint32_t _flags_save_string = ndr->flags;
1443                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1444                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->string));
1445                         ndr->flags = _flags_save_string;
1446                 }
1447         }
1448         if (ndr_flags & NDR_BUFFERS) {
1449                 {
1450                         uint32_t _flags_save_string = ndr->flags;
1451                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1452                         if (r->string) {
1453                                 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->string));
1454                                 {
1455                                         struct ndr_push *_ndr_string;
1456                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_string, 0, 2 * strlen_m(r->string)));
1457                                         NDR_CHECK(ndr_push_string(_ndr_string, NDR_SCALARS, r->string));
1458                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_string, 0, 2 * strlen_m(r->string)));
1459                                 }
1460                         }
1461                         ndr->flags = _flags_save_string;
1462                 }
1463         }
1464         return NDR_ERR_SUCCESS;
1465 }
1466
1467 static enum ndr_err_code ndr_pull_package_PrimaryKerberosString(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosString *r)
1468 {
1469         uint32_t _ptr_string;
1470         TALLOC_CTX *_mem_save_string_0;
1471         if (ndr_flags & NDR_SCALARS) {
1472                 NDR_CHECK(ndr_pull_align(ndr, 4));
1473                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
1474                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
1475                 {
1476                         uint32_t _flags_save_string = ndr->flags;
1477                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1478                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
1479                         if (_ptr_string) {
1480                                 NDR_PULL_ALLOC(ndr, r->string);
1481                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->string, _ptr_string));
1482                         } else {
1483                                 r->string = NULL;
1484                         }
1485                         ndr->flags = _flags_save_string;
1486                 }
1487         }
1488         if (ndr_flags & NDR_BUFFERS) {
1489                 {
1490                         uint32_t _flags_save_string = ndr->flags;
1491                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1492                         if (r->string) {
1493                                 uint32_t _relative_save_offset;
1494                                 _relative_save_offset = ndr->offset;
1495                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->string));
1496                                 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
1497                                 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
1498                                 {
1499                                         struct ndr_pull *_ndr_string;
1500                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_string, 0, r->size));
1501                                         NDR_CHECK(ndr_pull_string(_ndr_string, NDR_SCALARS, &r->string));
1502                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_string, 0, r->size));
1503                                 }
1504                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
1505                                 ndr->offset = _relative_save_offset;
1506                         }
1507                         ndr->flags = _flags_save_string;
1508                 }
1509         }
1510         return NDR_ERR_SUCCESS;
1511 }
1512
1513 _PUBLIC_ void ndr_print_package_PrimaryKerberosString(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosString *r)
1514 {
1515         ndr_print_struct(ndr, name, "package_PrimaryKerberosString");
1516         ndr->depth++;
1517         ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length);
1518         ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->size);
1519         ndr_print_ptr(ndr, "string", r->string);
1520         ndr->depth++;
1521         if (r->string) {
1522                 ndr_print_string(ndr, "string", r->string);
1523         }
1524         ndr->depth--;
1525         ndr->depth--;
1526 }
1527
1528 static enum ndr_err_code ndr_push_package_PrimaryKerberosKey(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosKey *r)
1529 {
1530         if (ndr_flags & NDR_SCALARS) {
1531                 NDR_CHECK(ndr_push_align(ndr, 4));
1532                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
1533                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
1534                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1535                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->keytype));
1536                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (r->value?r->value->length:0)));
1537                 {
1538                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
1539                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1540                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value));
1541                         ndr->flags = _flags_save_DATA_BLOB;
1542                 }
1543         }
1544         if (ndr_flags & NDR_BUFFERS) {
1545                 {
1546                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
1547                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1548                         if (r->value) {
1549                                 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value));
1550                                 {
1551                                         struct ndr_push *_ndr_value;
1552                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_value, 0, (r->value?r->value->length:0)));
1553                                         NDR_CHECK(ndr_push_DATA_BLOB(_ndr_value, NDR_SCALARS, *r->value));
1554                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_value, 0, (r->value?r->value->length:0)));
1555                                 }
1556                         }
1557                         ndr->flags = _flags_save_DATA_BLOB;
1558                 }
1559         }
1560         return NDR_ERR_SUCCESS;
1561 }
1562
1563 static enum ndr_err_code ndr_pull_package_PrimaryKerberosKey(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosKey *r)
1564 {
1565         uint32_t _ptr_value;
1566         TALLOC_CTX *_mem_save_value_0;
1567         if (ndr_flags & NDR_SCALARS) {
1568                 NDR_CHECK(ndr_pull_align(ndr, 4));
1569                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved1));
1570                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved2));
1571                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3));
1572                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->keytype));
1573                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_len));
1574                 {
1575                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
1576                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1577                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
1578                         if (_ptr_value) {
1579                                 NDR_PULL_ALLOC(ndr, r->value);
1580                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value, _ptr_value));
1581                         } else {
1582                                 r->value = NULL;
1583                         }
1584                         ndr->flags = _flags_save_DATA_BLOB;
1585                 }
1586         }
1587         if (ndr_flags & NDR_BUFFERS) {
1588                 {
1589                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
1590                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1591                         if (r->value) {
1592                                 uint32_t _relative_save_offset;
1593                                 _relative_save_offset = ndr->offset;
1594                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value));
1595                                 _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
1596                                 NDR_PULL_SET_MEM_CTX(ndr, r->value, 0);
1597                                 {
1598                                         struct ndr_pull *_ndr_value;
1599                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_value, 0, r->value_len));
1600                                         NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_value, NDR_SCALARS, r->value));
1601                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_value, 0, r->value_len));
1602                                 }
1603                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
1604                                 ndr->offset = _relative_save_offset;
1605                         }
1606                         ndr->flags = _flags_save_DATA_BLOB;
1607                 }
1608         }
1609         return NDR_ERR_SUCCESS;
1610 }
1611
1612 _PUBLIC_ void ndr_print_package_PrimaryKerberosKey(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosKey *r)
1613 {
1614         ndr_print_struct(ndr, name, "package_PrimaryKerberosKey");
1615         ndr->depth++;
1616         ndr_print_uint16(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
1617         ndr_print_uint16(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2);
1618         ndr_print_uint32(ndr, "reserved3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved3);
1619         ndr_print_uint32(ndr, "keytype", r->keytype);
1620         ndr_print_uint32(ndr, "value_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(r->value?r->value->length:0):r->value_len);
1621         ndr_print_ptr(ndr, "value", r->value);
1622         ndr->depth++;
1623         if (r->value) {
1624                 ndr_print_DATA_BLOB(ndr, "value", *r->value);
1625         }
1626         ndr->depth--;
1627         ndr->depth--;
1628 }
1629
1630 static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr3(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosCtr3 *r)
1631 {
1632         uint32_t cntr_keys_0;
1633         uint32_t cntr_old_keys_0;
1634         if (ndr_flags & NDR_SCALARS) {
1635                 NDR_CHECK(ndr_push_align(ndr, 4));
1636                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_keys));
1637                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_old_keys));
1638                 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
1639                 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1640                         NDR_CHECK(ndr_push_package_PrimaryKerberosKey(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
1641                 }
1642                 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1643                         NDR_CHECK(ndr_push_package_PrimaryKerberosKey(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
1644                 }
1645                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1646                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1647                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1648                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1649                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1650         }
1651         if (ndr_flags & NDR_BUFFERS) {
1652                 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
1653                 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1654                         NDR_CHECK(ndr_push_package_PrimaryKerberosKey(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
1655                 }
1656                 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1657                         NDR_CHECK(ndr_push_package_PrimaryKerberosKey(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
1658                 }
1659         }
1660         return NDR_ERR_SUCCESS;
1661 }
1662
1663 static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr3(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosCtr3 *r)
1664 {
1665         uint32_t cntr_keys_0;
1666         TALLOC_CTX *_mem_save_keys_0;
1667         uint32_t cntr_old_keys_0;
1668         TALLOC_CTX *_mem_save_old_keys_0;
1669         if (ndr_flags & NDR_SCALARS) {
1670                 NDR_CHECK(ndr_pull_align(ndr, 4));
1671                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_keys));
1672                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_old_keys));
1673                 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
1674                 NDR_PULL_ALLOC_N(ndr, r->keys, r->num_keys);
1675                 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1676                 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
1677                 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1678                         NDR_CHECK(ndr_pull_package_PrimaryKerberosKey(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
1679                 }
1680                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
1681                 NDR_PULL_ALLOC_N(ndr, r->old_keys, r->num_old_keys);
1682                 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1683                 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
1684                 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1685                         NDR_CHECK(ndr_pull_package_PrimaryKerberosKey(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
1686                 }
1687                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
1688                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding1));
1689                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding2));
1690                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding3));
1691                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding4));
1692                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding5));
1693         }
1694         if (ndr_flags & NDR_BUFFERS) {
1695                 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
1696                 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1697                 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
1698                 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1699                         NDR_CHECK(ndr_pull_package_PrimaryKerberosKey(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
1700                 }
1701                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
1702                 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1703                 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
1704                 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1705                         NDR_CHECK(ndr_pull_package_PrimaryKerberosKey(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
1706                 }
1707                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
1708         }
1709         return NDR_ERR_SUCCESS;
1710 }
1711
1712 _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr3(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosCtr3 *r)
1713 {
1714         uint32_t cntr_keys_0;
1715         uint32_t cntr_old_keys_0;
1716         ndr_print_struct(ndr, name, "package_PrimaryKerberosCtr3");
1717         ndr->depth++;
1718         ndr_print_uint16(ndr, "num_keys", r->num_keys);
1719         ndr_print_uint16(ndr, "num_old_keys", r->num_old_keys);
1720         ndr_print_package_PrimaryKerberosString(ndr, "salt", &r->salt);
1721         ndr->print(ndr, "%s: ARRAY(%d)", "keys", (int)r->num_keys);
1722         ndr->depth++;
1723         for (cntr_keys_0=0;cntr_keys_0<r->num_keys;cntr_keys_0++) {
1724                 char *idx_0=NULL;
1725                 if (asprintf(&idx_0, "[%d]", cntr_keys_0) != -1) {
1726                         ndr_print_package_PrimaryKerberosKey(ndr, "keys", &r->keys[cntr_keys_0]);
1727                         free(idx_0);
1728                 }
1729         }
1730         ndr->depth--;
1731         ndr->print(ndr, "%s: ARRAY(%d)", "old_keys", (int)r->num_old_keys);
1732         ndr->depth++;
1733         for (cntr_old_keys_0=0;cntr_old_keys_0<r->num_old_keys;cntr_old_keys_0++) {
1734                 char *idx_0=NULL;
1735                 if (asprintf(&idx_0, "[%d]", cntr_old_keys_0) != -1) {
1736                         ndr_print_package_PrimaryKerberosKey(ndr, "old_keys", &r->old_keys[cntr_old_keys_0]);
1737                         free(idx_0);
1738                 }
1739         }
1740         ndr->depth--;
1741         ndr_print_uint32(ndr, "padding1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding1);
1742         ndr_print_uint32(ndr, "padding2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding2);
1743         ndr_print_uint32(ndr, "padding3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding3);
1744         ndr_print_uint32(ndr, "padding4", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding4);
1745         ndr_print_uint32(ndr, "padding5", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding5);
1746         ndr->depth--;
1747 }
1748
1749 static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr(struct ndr_push *ndr, int ndr_flags, const union package_PrimaryKerberosCtr *r)
1750 {
1751         if (ndr_flags & NDR_SCALARS) {
1752                 int level = ndr_push_get_switch_value(ndr, r);
1753                 switch (level) {
1754                         case 3: {
1755                                 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr, NDR_SCALARS, &r->ctr3));
1756                         break; }
1757
1758                         default:
1759                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1760                 }
1761         }
1762         if (ndr_flags & NDR_BUFFERS) {
1763                 int level = ndr_push_get_switch_value(ndr, r);
1764                 switch (level) {
1765                         case 3:
1766                                 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr, NDR_BUFFERS, &r->ctr3));
1767                         break;
1768
1769                         default:
1770                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1771                 }
1772         }
1773         return NDR_ERR_SUCCESS;
1774 }
1775
1776 static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr(struct ndr_pull *ndr, int ndr_flags, union package_PrimaryKerberosCtr *r)
1777 {
1778         int level;
1779         level = ndr_pull_get_switch_value(ndr, r);
1780         if (ndr_flags & NDR_SCALARS) {
1781                 switch (level) {
1782                         case 3: {
1783                                 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr, NDR_SCALARS, &r->ctr3));
1784                         break; }
1785
1786                         default:
1787                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1788                 }
1789         }
1790         if (ndr_flags & NDR_BUFFERS) {
1791                 switch (level) {
1792                         case 3:
1793                                 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr, NDR_BUFFERS, &r->ctr3));
1794                         break;
1795
1796                         default:
1797                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1798                 }
1799         }
1800         return NDR_ERR_SUCCESS;
1801 }
1802
1803 _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr(struct ndr_print *ndr, const char *name, const union package_PrimaryKerberosCtr *r)
1804 {
1805         int level;
1806         level = ndr_print_get_switch_value(ndr, r);
1807         ndr_print_union(ndr, name, level, "package_PrimaryKerberosCtr");
1808         switch (level) {
1809                 case 3:
1810                         ndr_print_package_PrimaryKerberosCtr3(ndr, "ctr3", &r->ctr3);
1811                 break;
1812
1813                 default:
1814                         ndr_print_bad_level(ndr, name, level);
1815         }
1816 }
1817
1818 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryKerberosBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosBlob *r)
1819 {
1820         if (ndr_flags & NDR_SCALARS) {
1821                 NDR_CHECK(ndr_push_align(ndr, 4));
1822                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 3));
1823                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, 3));
1824                 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr, NDR_SCALARS, &r->ctr));
1825         }
1826         if (ndr_flags & NDR_BUFFERS) {
1827                 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr, NDR_BUFFERS, &r->ctr));
1828         }
1829         return NDR_ERR_SUCCESS;
1830 }
1831
1832 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryKerberosBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosBlob *r)
1833 {
1834         if (ndr_flags & NDR_SCALARS) {
1835                 NDR_CHECK(ndr_pull_align(ndr, 4));
1836                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
1837                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
1838                 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr, NDR_SCALARS, &r->ctr));
1839         }
1840         if (ndr_flags & NDR_BUFFERS) {
1841                 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr, NDR_BUFFERS, &r->ctr));
1842         }
1843         return NDR_ERR_SUCCESS;
1844 }
1845
1846 _PUBLIC_ void ndr_print_package_PrimaryKerberosBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosBlob *r)
1847 {
1848         ndr_print_struct(ndr, name, "package_PrimaryKerberosBlob");
1849         ndr->depth++;
1850         ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?3:r->version);
1851         ndr_print_set_switch_value(ndr, &r->ctr, r->version);
1852         ndr_print_package_PrimaryKerberosCtr(ndr, "ctr", &r->ctr);
1853         ndr->depth--;
1854 }
1855
1856 static enum ndr_err_code ndr_push_package_PrimaryKerberosNewerKey(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosNewerKey *r)
1857 {
1858         if (ndr_flags & NDR_SCALARS) {
1859                 NDR_CHECK(ndr_push_align(ndr, 4));
1860                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1861                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1862                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00001000));
1863                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->keytype));
1864                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (r->value?r->value->length:0)));
1865                 {
1866                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
1867                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1868                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value));
1869                         ndr->flags = _flags_save_DATA_BLOB;
1870                 }
1871         }
1872         if (ndr_flags & NDR_BUFFERS) {
1873                 {
1874                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
1875                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1876                         if (r->value) {
1877                                 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value));
1878                                 {
1879                                         struct ndr_push *_ndr_value;
1880                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_value, 0, (r->value?r->value->length:0)));
1881                                         NDR_CHECK(ndr_push_DATA_BLOB(_ndr_value, NDR_SCALARS, *r->value));
1882                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_value, 0, (r->value?r->value->length:0)));
1883                                 }
1884                         }
1885                         ndr->flags = _flags_save_DATA_BLOB;
1886                 }
1887         }
1888         return NDR_ERR_SUCCESS;
1889 }
1890
1891 static enum ndr_err_code ndr_pull_package_PrimaryKerberosNewerKey(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosNewerKey *r)
1892 {
1893         uint32_t _ptr_value;
1894         TALLOC_CTX *_mem_save_value_0;
1895         if (ndr_flags & NDR_SCALARS) {
1896                 NDR_CHECK(ndr_pull_align(ndr, 4));
1897                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
1898                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
1899                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
1900                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->keytype));
1901                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_len));
1902                 {
1903                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
1904                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1905                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
1906                         if (_ptr_value) {
1907                                 NDR_PULL_ALLOC(ndr, r->value);
1908                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value, _ptr_value));
1909                         } else {
1910                                 r->value = NULL;
1911                         }
1912                         ndr->flags = _flags_save_DATA_BLOB;
1913                 }
1914         }
1915         if (ndr_flags & NDR_BUFFERS) {
1916                 {
1917                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
1918                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1919                         if (r->value) {
1920                                 uint32_t _relative_save_offset;
1921                                 _relative_save_offset = ndr->offset;
1922                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value));
1923                                 _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
1924                                 NDR_PULL_SET_MEM_CTX(ndr, r->value, 0);
1925                                 {
1926                                         struct ndr_pull *_ndr_value;
1927                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_value, 0, r->value_len));
1928                                         NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_value, NDR_SCALARS, r->value));
1929                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_value, 0, r->value_len));
1930                                 }
1931                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
1932                                 ndr->offset = _relative_save_offset;
1933                         }
1934                         ndr->flags = _flags_save_DATA_BLOB;
1935                 }
1936         }
1937         return NDR_ERR_SUCCESS;
1938 }
1939
1940 _PUBLIC_ void ndr_print_package_PrimaryKerberosNewerKey(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosNewerKey *r)
1941 {
1942         ndr_print_struct(ndr, name, "package_PrimaryKerberosNewerKey");
1943         ndr->depth++;
1944         ndr_print_uint32(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown1);
1945         ndr_print_uint32(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown2);
1946         ndr_print_uint32(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00001000:r->unknown3);
1947         ndr_print_uint32(ndr, "keytype", r->keytype);
1948         ndr_print_uint32(ndr, "value_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(r->value?r->value->length:0):r->value_len);
1949         ndr_print_ptr(ndr, "value", r->value);
1950         ndr->depth++;
1951         if (r->value) {
1952                 ndr_print_DATA_BLOB(ndr, "value", *r->value);
1953         }
1954         ndr->depth--;
1955         ndr->depth--;
1956 }
1957
1958 static enum ndr_err_code ndr_push_package_PrimaryKerberosNewerCtr4(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosNewerCtr4 *r)
1959 {
1960         uint32_t cntr_keys_0;
1961         uint32_t cntr_old_keys1_0;
1962         uint32_t cntr_old_keys2_0;
1963         if (ndr_flags & NDR_SCALARS) {
1964                 NDR_CHECK(ndr_push_align(ndr, 4));
1965                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_keys));
1966                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
1967                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_old_keys1));
1968                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_old_keys2));
1969                 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
1970                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00001000));
1971                 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1972                         NDR_CHECK(ndr_push_package_PrimaryKerberosNewerKey(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
1973                 }
1974                 for (cntr_old_keys1_0 = 0; cntr_old_keys1_0 < r->num_old_keys1; cntr_old_keys1_0++) {
1975                         NDR_CHECK(ndr_push_package_PrimaryKerberosNewerKey(ndr, NDR_SCALARS, &r->old_keys1[cntr_old_keys1_0]));
1976                 }
1977                 for (cntr_old_keys2_0 = 0; cntr_old_keys2_0 < r->num_old_keys2; cntr_old_keys2_0++) {
1978                         NDR_CHECK(ndr_push_package_PrimaryKerberosNewerKey(ndr, NDR_SCALARS, &r->old_keys2[cntr_old_keys2_0]));
1979                 }
1980         }
1981         if (ndr_flags & NDR_BUFFERS) {
1982                 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
1983                 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1984                         NDR_CHECK(ndr_push_package_PrimaryKerberosNewerKey(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
1985                 }
1986                 for (cntr_old_keys1_0 = 0; cntr_old_keys1_0 < r->num_old_keys1; cntr_old_keys1_0++) {
1987                         NDR_CHECK(ndr_push_package_PrimaryKerberosNewerKey(ndr, NDR_BUFFERS, &r->old_keys1[cntr_old_keys1_0]));
1988                 }
1989                 for (cntr_old_keys2_0 = 0; cntr_old_keys2_0 < r->num_old_keys2; cntr_old_keys2_0++) {
1990                         NDR_CHECK(ndr_push_package_PrimaryKerberosNewerKey(ndr, NDR_BUFFERS, &r->old_keys2[cntr_old_keys2_0]));
1991                 }
1992         }
1993         return NDR_ERR_SUCCESS;
1994 }
1995
1996 static enum ndr_err_code ndr_pull_package_PrimaryKerberosNewerCtr4(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosNewerCtr4 *r)
1997 {
1998         uint32_t cntr_keys_0;
1999         TALLOC_CTX *_mem_save_keys_0;
2000         uint32_t cntr_old_keys1_0;
2001         TALLOC_CTX *_mem_save_old_keys1_0;
2002         uint32_t cntr_old_keys2_0;
2003         TALLOC_CTX *_mem_save_old_keys2_0;
2004         if (ndr_flags & NDR_SCALARS) {
2005                 NDR_CHECK(ndr_pull_align(ndr, 4));
2006                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_keys));
2007                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown1));
2008                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_old_keys1));
2009                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_old_keys2));
2010                 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
2011                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
2012                 NDR_PULL_ALLOC_N(ndr, r->keys, r->num_keys);
2013                 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2014                 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
2015                 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
2016                         NDR_CHECK(ndr_pull_package_PrimaryKerberosNewerKey(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
2017                 }
2018                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
2019                 NDR_PULL_ALLOC_N(ndr, r->old_keys1, r->num_old_keys1);
2020                 _mem_save_old_keys1_0 = NDR_PULL_GET_MEM_CTX(ndr);
2021                 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys1, 0);
2022                 for (cntr_old_keys1_0 = 0; cntr_old_keys1_0 < r->num_old_keys1; cntr_old_keys1_0++) {
2023                         NDR_CHECK(ndr_pull_package_PrimaryKerberosNewerKey(ndr, NDR_SCALARS, &r->old_keys1[cntr_old_keys1_0]));
2024                 }
2025                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys1_0, 0);
2026                 NDR_PULL_ALLOC_N(ndr, r->old_keys2, r->num_old_keys2);
2027                 _mem_save_old_keys2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2028                 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys2, 0);
2029                 for (cntr_old_keys2_0 = 0; cntr_old_keys2_0 < r->num_old_keys2; cntr_old_keys2_0++) {
2030                         NDR_CHECK(ndr_pull_package_PrimaryKerberosNewerKey(ndr, NDR_SCALARS, &r->old_keys2[cntr_old_keys2_0]));
2031                 }
2032                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys2_0, 0);
2033         }
2034         if (ndr_flags & NDR_BUFFERS) {
2035                 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
2036                 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2037                 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
2038                 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
2039                         NDR_CHECK(ndr_pull_package_PrimaryKerberosNewerKey(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
2040                 }
2041                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
2042                 _mem_save_old_keys1_0 = NDR_PULL_GET_MEM_CTX(ndr);
2043                 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys1, 0);
2044                 for (cntr_old_keys1_0 = 0; cntr_old_keys1_0 < r->num_old_keys1; cntr_old_keys1_0++) {
2045                         NDR_CHECK(ndr_pull_package_PrimaryKerberosNewerKey(ndr, NDR_BUFFERS, &r->old_keys1[cntr_old_keys1_0]));
2046                 }
2047                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys1_0, 0);
2048                 _mem_save_old_keys2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2049                 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys2, 0);
2050                 for (cntr_old_keys2_0 = 0; cntr_old_keys2_0 < r->num_old_keys2; cntr_old_keys2_0++) {
2051                         NDR_CHECK(ndr_pull_package_PrimaryKerberosNewerKey(ndr, NDR_BUFFERS, &r->old_keys2[cntr_old_keys2_0]));
2052                 }
2053                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys2_0, 0);
2054         }
2055         return NDR_ERR_SUCCESS;
2056 }
2057
2058 _PUBLIC_ void ndr_print_package_PrimaryKerberosNewerCtr4(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosNewerCtr4 *r)
2059 {
2060         uint32_t cntr_keys_0;
2061         uint32_t cntr_old_keys1_0;
2062         uint32_t cntr_old_keys2_0;
2063         ndr_print_struct(ndr, name, "package_PrimaryKerberosNewerCtr4");
2064         ndr->depth++;
2065         ndr_print_uint16(ndr, "num_keys", r->num_keys);
2066         ndr_print_uint16(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown1);
2067         ndr_print_uint16(ndr, "num_old_keys1", r->num_old_keys1);
2068         ndr_print_uint16(ndr, "num_old_keys2", r->num_old_keys2);
2069         ndr_print_package_PrimaryKerberosString(ndr, "salt", &r->salt);
2070         ndr_print_uint32(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00001000:r->unknown2);
2071         ndr->print(ndr, "%s: ARRAY(%d)", "keys", (int)r->num_keys);
2072         ndr->depth++;
2073         for (cntr_keys_0=0;cntr_keys_0<r->num_keys;cntr_keys_0++) {
2074                 char *idx_0=NULL;
2075                 if (asprintf(&idx_0, "[%d]", cntr_keys_0) != -1) {
2076                         ndr_print_package_PrimaryKerberosNewerKey(ndr, "keys", &r->keys[cntr_keys_0]);
2077                         free(idx_0);
2078                 }
2079         }
2080         ndr->depth--;
2081         ndr->print(ndr, "%s: ARRAY(%d)", "old_keys1", (int)r->num_old_keys1);
2082         ndr->depth++;
2083         for (cntr_old_keys1_0=0;cntr_old_keys1_0<r->num_old_keys1;cntr_old_keys1_0++) {
2084                 char *idx_0=NULL;
2085                 if (asprintf(&idx_0, "[%d]", cntr_old_keys1_0) != -1) {
2086                         ndr_print_package_PrimaryKerberosNewerKey(ndr, "old_keys1", &r->old_keys1[cntr_old_keys1_0]);
2087                         free(idx_0);
2088                 }
2089         }
2090         ndr->depth--;
2091         ndr->print(ndr, "%s: ARRAY(%d)", "old_keys2", (int)r->num_old_keys2);
2092         ndr->depth++;
2093         for (cntr_old_keys2_0=0;cntr_old_keys2_0<r->num_old_keys2;cntr_old_keys2_0++) {
2094                 char *idx_0=NULL;
2095                 if (asprintf(&idx_0, "[%d]", cntr_old_keys2_0) != -1) {
2096                         ndr_print_package_PrimaryKerberosNewerKey(ndr, "old_keys2", &r->old_keys2[cntr_old_keys2_0]);
2097                         free(idx_0);
2098                 }
2099         }
2100         ndr->depth--;
2101         ndr->depth--;
2102 }
2103
2104 static enum ndr_err_code ndr_push_package_PrimaryKerberosNewerCtr(struct ndr_push *ndr, int ndr_flags, const union package_PrimaryKerberosNewerCtr *r)
2105 {
2106         if (ndr_flags & NDR_SCALARS) {
2107                 int level = ndr_push_get_switch_value(ndr, r);
2108                 switch (level) {
2109                         case 4: {
2110                                 NDR_CHECK(ndr_push_package_PrimaryKerberosNewerCtr4(ndr, NDR_SCALARS, &r->ctr4));
2111                         break; }
2112
2113                         default:
2114                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2115                 }
2116         }
2117         if (ndr_flags & NDR_BUFFERS) {
2118                 int level = ndr_push_get_switch_value(ndr, r);
2119                 switch (level) {
2120                         case 4:
2121                                 NDR_CHECK(ndr_push_package_PrimaryKerberosNewerCtr4(ndr, NDR_BUFFERS, &r->ctr4));
2122                         break;
2123
2124                         default:
2125                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2126                 }
2127         }
2128         return NDR_ERR_SUCCESS;
2129 }
2130
2131 static enum ndr_err_code ndr_pull_package_PrimaryKerberosNewerCtr(struct ndr_pull *ndr, int ndr_flags, union package_PrimaryKerberosNewerCtr *r)
2132 {
2133         int level;
2134         level = ndr_pull_get_switch_value(ndr, r);
2135         if (ndr_flags & NDR_SCALARS) {
2136                 switch (level) {
2137                         case 4: {
2138                                 NDR_CHECK(ndr_pull_package_PrimaryKerberosNewerCtr4(ndr, NDR_SCALARS, &r->ctr4));
2139                         break; }
2140
2141                         default:
2142                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2143                 }
2144         }
2145         if (ndr_flags & NDR_BUFFERS) {
2146                 switch (level) {
2147                         case 4:
2148                                 NDR_CHECK(ndr_pull_package_PrimaryKerberosNewerCtr4(ndr, NDR_BUFFERS, &r->ctr4));
2149                         break;
2150
2151                         default:
2152                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2153                 }
2154         }
2155         return NDR_ERR_SUCCESS;
2156 }
2157
2158 _PUBLIC_ void ndr_print_package_PrimaryKerberosNewerCtr(struct ndr_print *ndr, const char *name, const union package_PrimaryKerberosNewerCtr *r)
2159 {
2160         int level;
2161         level = ndr_print_get_switch_value(ndr, r);
2162         ndr_print_union(ndr, name, level, "package_PrimaryKerberosNewerCtr");
2163         switch (level) {
2164                 case 4:
2165                         ndr_print_package_PrimaryKerberosNewerCtr4(ndr, "ctr4", &r->ctr4);
2166                 break;
2167
2168                 default:
2169                         ndr_print_bad_level(ndr, name, level);
2170         }
2171 }
2172
2173 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryKerberosNewerBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosNewerBlob *r)
2174 {
2175         if (ndr_flags & NDR_SCALARS) {
2176                 NDR_CHECK(ndr_push_align(ndr, 4));
2177                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 4));
2178                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, 4));
2179                 NDR_CHECK(ndr_push_package_PrimaryKerberosNewerCtr(ndr, NDR_SCALARS, &r->ctr));
2180         }
2181         if (ndr_flags & NDR_BUFFERS) {
2182                 NDR_CHECK(ndr_push_package_PrimaryKerberosNewerCtr(ndr, NDR_BUFFERS, &r->ctr));
2183         }
2184         return NDR_ERR_SUCCESS;
2185 }
2186
2187 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryKerberosNewerBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosNewerBlob *r)
2188 {
2189         if (ndr_flags & NDR_SCALARS) {
2190                 NDR_CHECK(ndr_pull_align(ndr, 4));
2191                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
2192                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
2193                 NDR_CHECK(ndr_pull_package_PrimaryKerberosNewerCtr(ndr, NDR_SCALARS, &r->ctr));
2194         }
2195         if (ndr_flags & NDR_BUFFERS) {
2196                 NDR_CHECK(ndr_pull_package_PrimaryKerberosNewerCtr(ndr, NDR_BUFFERS, &r->ctr));
2197         }
2198         return NDR_ERR_SUCCESS;
2199 }
2200
2201 _PUBLIC_ void ndr_print_package_PrimaryKerberosNewerBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosNewerBlob *r)
2202 {
2203         ndr_print_struct(ndr, name, "package_PrimaryKerberosNewerBlob");
2204         ndr->depth++;
2205         ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?4:r->version);
2206         ndr_print_set_switch_value(ndr, &r->ctr, r->version);
2207         ndr_print_package_PrimaryKerberosNewerCtr(ndr, "ctr", &r->ctr);
2208         ndr->depth--;
2209 }
2210
2211 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryCLEARTEXTBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryCLEARTEXTBlob *r)
2212 {
2213         if (ndr_flags & NDR_SCALARS) {
2214                 NDR_CHECK(ndr_push_align(ndr, 4));
2215                 {
2216                         uint32_t _flags_save_string = ndr->flags;
2217                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
2218                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->cleartext));
2219                         ndr->flags = _flags_save_string;
2220                 }
2221         }
2222         if (ndr_flags & NDR_BUFFERS) {
2223         }
2224         return NDR_ERR_SUCCESS;
2225 }
2226
2227 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryCLEARTEXTBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryCLEARTEXTBlob *r)
2228 {
2229         if (ndr_flags & NDR_SCALARS) {
2230                 NDR_CHECK(ndr_pull_align(ndr, 4));
2231                 {
2232                         uint32_t _flags_save_string = ndr->flags;
2233                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
2234                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->cleartext));
2235                         ndr->flags = _flags_save_string;
2236                 }
2237         }
2238         if (ndr_flags & NDR_BUFFERS) {
2239         }
2240         return NDR_ERR_SUCCESS;
2241 }
2242
2243 _PUBLIC_ void ndr_print_package_PrimaryCLEARTEXTBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryCLEARTEXTBlob *r)
2244 {
2245         ndr_print_struct(ndr, name, "package_PrimaryCLEARTEXTBlob");
2246         ndr->depth++;
2247         ndr_print_string(ndr, "cleartext", r->cleartext);
2248         ndr->depth--;
2249 }
2250
2251 static enum ndr_err_code ndr_push_package_PrimaryWDigestHash(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestHash *r)
2252 {
2253         {
2254                 uint32_t _flags_save_STRUCT = ndr->flags;
2255                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2256                 if (ndr_flags & NDR_SCALARS) {
2257                         NDR_CHECK(ndr_push_align(ndr, 1));
2258                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
2259                 }
2260                 if (ndr_flags & NDR_BUFFERS) {
2261                 }
2262                 ndr->flags = _flags_save_STRUCT;
2263         }
2264         return NDR_ERR_SUCCESS;
2265 }
2266
2267 static enum ndr_err_code ndr_pull_package_PrimaryWDigestHash(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestHash *r)
2268 {
2269         {
2270                 uint32_t _flags_save_STRUCT = ndr->flags;
2271                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2272                 if (ndr_flags & NDR_SCALARS) {
2273                         NDR_CHECK(ndr_pull_align(ndr, 1));
2274                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
2275                 }
2276                 if (ndr_flags & NDR_BUFFERS) {
2277                 }
2278                 ndr->flags = _flags_save_STRUCT;
2279         }
2280         return NDR_ERR_SUCCESS;
2281 }
2282
2283 _PUBLIC_ void ndr_print_package_PrimaryWDigestHash(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestHash *r)
2284 {
2285         ndr_print_struct(ndr, name, "package_PrimaryWDigestHash");
2286         {
2287                 uint32_t _flags_save_STRUCT = ndr->flags;
2288                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2289                 ndr->depth++;
2290                 ndr_print_array_uint8(ndr, "hash", r->hash, 16);
2291                 ndr->depth--;
2292                 ndr->flags = _flags_save_STRUCT;
2293         }
2294 }
2295
2296 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryWDigestBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestBlob *r)
2297 {
2298         uint32_t cntr_hashes_0;
2299         if (ndr_flags & NDR_SCALARS) {
2300                 NDR_CHECK(ndr_push_align(ndr, 4));
2301                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0x31));
2302                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0x01));
2303                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->num_hashes));
2304                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2305                 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, 0));
2306                 for (cntr_hashes_0 = 0; cntr_hashes_0 < r->num_hashes; cntr_hashes_0++) {
2307                         NDR_CHECK(ndr_push_package_PrimaryWDigestHash(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0]));
2308                 }
2309         }
2310         if (ndr_flags & NDR_BUFFERS) {
2311         }
2312         return NDR_ERR_SUCCESS;
2313 }
2314
2315 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryWDigestBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestBlob *r)
2316 {
2317         uint32_t cntr_hashes_0;
2318         TALLOC_CTX *_mem_save_hashes_0;
2319         if (ndr_flags & NDR_SCALARS) {
2320                 NDR_CHECK(ndr_pull_align(ndr, 4));
2321                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown1));
2322                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown2));
2323                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->num_hashes));
2324                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
2325                 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->uuknown4));
2326                 NDR_PULL_ALLOC_N(ndr, r->hashes, r->num_hashes);
2327                 _mem_save_hashes_0 = NDR_PULL_GET_MEM_CTX(ndr);
2328                 NDR_PULL_SET_MEM_CTX(ndr, r->hashes, 0);
2329                 for (cntr_hashes_0 = 0; cntr_hashes_0 < r->num_hashes; cntr_hashes_0++) {
2330                         NDR_CHECK(ndr_pull_package_PrimaryWDigestHash(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0]));
2331                 }
2332                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hashes_0, 0);
2333         }
2334         if (ndr_flags & NDR_BUFFERS) {
2335         }
2336         return NDR_ERR_SUCCESS;
2337 }
2338
2339 _PUBLIC_ void ndr_print_package_PrimaryWDigestBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestBlob *r)
2340 {
2341         uint32_t cntr_hashes_0;
2342         ndr_print_struct(ndr, name, "package_PrimaryWDigestBlob");
2343         ndr->depth++;
2344         ndr_print_uint16(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x31:r->unknown1);
2345         ndr_print_uint8(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x01:r->unknown2);
2346         ndr_print_uint8(ndr, "num_hashes", r->num_hashes);
2347         ndr_print_uint32(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown3);
2348         ndr_print_udlong(ndr, "uuknown4", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->uuknown4);
2349         ndr->print(ndr, "%s: ARRAY(%d)", "hashes", (int)r->num_hashes);
2350         ndr->depth++;
2351         for (cntr_hashes_0=0;cntr_hashes_0<r->num_hashes;cntr_hashes_0++) {
2352                 char *idx_0=NULL;
2353                 if (asprintf(&idx_0, "[%d]", cntr_hashes_0) != -1) {
2354                         ndr_print_package_PrimaryWDigestHash(ndr, "hashes", &r->hashes[cntr_hashes_0]);
2355                         free(idx_0);
2356                 }
2357         }
2358         ndr->depth--;
2359         ndr->depth--;
2360 }
2361
2362 static enum ndr_err_code ndr_push_trustAuthInOutSecret1(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutSecret1 *r)
2363 {
2364         if (ndr_flags & NDR_SCALARS) {
2365                 NDR_CHECK(ndr_push_align(ndr, 4));
2366                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time1));
2367                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
2368                 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value));
2369                 {
2370                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
2371                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2372                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
2373                         ndr->flags = _flags_save_DATA_BLOB;
2374                 }
2375         }
2376         if (ndr_flags & NDR_BUFFERS) {
2377         }
2378         return NDR_ERR_SUCCESS;
2379 }
2380
2381 static enum ndr_err_code ndr_pull_trustAuthInOutSecret1(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutSecret1 *r)
2382 {
2383         if (ndr_flags & NDR_SCALARS) {
2384                 NDR_CHECK(ndr_pull_align(ndr, 4));
2385                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time1));
2386                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
2387                 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value));
2388                 {
2389                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
2390                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2391                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
2392                         ndr->flags = _flags_save_DATA_BLOB;
2393                 }
2394         }
2395         if (ndr_flags & NDR_BUFFERS) {
2396         }
2397         return NDR_ERR_SUCCESS;
2398 }
2399
2400 _PUBLIC_ void ndr_print_trustAuthInOutSecret1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret1 *r)
2401 {
2402         ndr_print_struct(ndr, name, "trustAuthInOutSecret1");
2403         ndr->depth++;
2404         ndr_print_NTTIME(ndr, "time1", r->time1);
2405         ndr_print_uint32(ndr, "unknown1", r->unknown1);
2406         ndr_print_DATA_BLOB(ndr, "value", r->value);
2407         ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
2408         ndr->depth--;
2409 }
2410
2411 static enum ndr_err_code ndr_push_trustAuthInOutCtr1(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutCtr1 *r)
2412 {
2413         if (ndr_flags & NDR_SCALARS) {
2414                 NDR_CHECK(ndr_push_align(ndr, 4));
2415                 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value1));
2416                 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value2));
2417         }
2418         if (ndr_flags & NDR_BUFFERS) {
2419                 if (r->value1) {
2420                         NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value1));
2421                         NDR_CHECK(ndr_push_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value1));
2422                 }
2423                 if (r->value2) {
2424                         NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value2));
2425                         NDR_CHECK(ndr_push_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value2));
2426                 }
2427         }
2428         return NDR_ERR_SUCCESS;
2429 }
2430
2431 static enum ndr_err_code ndr_pull_trustAuthInOutCtr1(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutCtr1 *r)
2432 {
2433         uint32_t _ptr_value1;
2434         TALLOC_CTX *_mem_save_value1_0;
2435         uint32_t _ptr_value2;
2436         TALLOC_CTX *_mem_save_value2_0;
2437         if (ndr_flags & NDR_SCALARS) {
2438                 NDR_CHECK(ndr_pull_align(ndr, 4));
2439                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value1));
2440                 if (_ptr_value1) {
2441                         NDR_PULL_ALLOC(ndr, r->value1);
2442                         NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value1, _ptr_value1));
2443                 } else {
2444                         r->value1 = NULL;
2445                 }
2446                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value2));
2447                 if (_ptr_value2) {
2448                         NDR_PULL_ALLOC(ndr, r->value2);
2449                         NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value2, _ptr_value2));
2450                 } else {
2451                         r->value2 = NULL;
2452                 }
2453         }
2454         if (ndr_flags & NDR_BUFFERS) {
2455                 if (r->value1) {
2456                         uint32_t _relative_save_offset;
2457                         _relative_save_offset = ndr->offset;
2458                         NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value1));
2459                         _mem_save_value1_0 = NDR_PULL_GET_MEM_CTX(ndr);
2460                         NDR_PULL_SET_MEM_CTX(ndr, r->value1, 0);
2461                         NDR_CHECK(ndr_pull_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value1));
2462                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value1_0, 0);
2463                         ndr->offset = _relative_save_offset;
2464                 }
2465                 if (r->value2) {
2466                         uint32_t _relative_save_offset;
2467                         _relative_save_offset = ndr->offset;
2468                         NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value2));
2469                         _mem_save_value2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2470                         NDR_PULL_SET_MEM_CTX(ndr, r->value2, 0);
2471                         NDR_CHECK(ndr_pull_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value2));
2472                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value2_0, 0);
2473                         ndr->offset = _relative_save_offset;
2474                 }
2475         }
2476         return NDR_ERR_SUCCESS;
2477 }
2478
2479 _PUBLIC_ void ndr_print_trustAuthInOutCtr1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr1 *r)
2480 {
2481         ndr_print_struct(ndr, name, "trustAuthInOutCtr1");
2482         ndr->depth++;
2483         ndr_print_ptr(ndr, "value1", r->value1);
2484         ndr->depth++;
2485         if (r->value1) {
2486                 ndr_print_trustAuthInOutSecret1(ndr, "value1", r->value1);
2487         }
2488         ndr->depth--;
2489         ndr_print_ptr(ndr, "value2", r->value2);
2490         ndr->depth++;
2491         if (r->value2) {
2492                 ndr_print_trustAuthInOutSecret1(ndr, "value2", r->value2);
2493         }
2494         ndr->depth--;
2495         ndr->depth--;
2496 }
2497
2498 static enum ndr_err_code ndr_push_trustAuthInOutSecret2V1(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutSecret2V1 *r)
2499 {
2500         if (ndr_flags & NDR_SCALARS) {
2501                 NDR_CHECK(ndr_push_align(ndr, 4));
2502                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time1));
2503                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
2504                 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value));
2505                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time2));
2506                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
2507                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
2508                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
2509                 {
2510                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
2511                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2512                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
2513                         ndr->flags = _flags_save_DATA_BLOB;
2514                 }
2515         }
2516         if (ndr_flags & NDR_BUFFERS) {
2517         }
2518         return NDR_ERR_SUCCESS;
2519 }
2520
2521 static enum ndr_err_code ndr_pull_trustAuthInOutSecret2V1(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutSecret2V1 *r)
2522 {
2523         if (ndr_flags & NDR_SCALARS) {
2524                 NDR_CHECK(ndr_pull_align(ndr, 4));
2525                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time1));
2526                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
2527                 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value));
2528                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time2));
2529                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
2530                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
2531                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
2532                 {
2533                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
2534                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2535                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
2536                         ndr->flags = _flags_save_DATA_BLOB;
2537                 }
2538         }
2539         if (ndr_flags & NDR_BUFFERS) {
2540         }
2541         return NDR_ERR_SUCCESS;
2542 }
2543
2544 _PUBLIC_ void ndr_print_trustAuthInOutSecret2V1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V1 *r)
2545 {
2546         ndr_print_struct(ndr, name, "trustAuthInOutSecret2V1");
2547         ndr->depth++;
2548         ndr_print_NTTIME(ndr, "time1", r->time1);
2549         ndr_print_uint32(ndr, "unknown1", r->unknown1);
2550         ndr_print_DATA_BLOB(ndr, "value", r->value);
2551         ndr_print_NTTIME(ndr, "time2", r->time2);
2552         ndr_print_uint32(ndr, "unknown2", r->unknown2);
2553         ndr_print_uint32(ndr, "unknown3", r->unknown3);
2554         ndr_print_uint32(ndr, "unknown4", r->unknown4);
2555         ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
2556         ndr->depth--;
2557 }
2558
2559 static enum ndr_err_code ndr_push_trustAuthInOutSecret2V2(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutSecret2V2 *r)
2560 {
2561         if (ndr_flags & NDR_SCALARS) {
2562                 NDR_CHECK(ndr_push_align(ndr, 4));
2563                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time1));
2564                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
2565                 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value));
2566                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time2));
2567                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
2568                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
2569                 {
2570                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
2571                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2572                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
2573                         ndr->flags = _flags_save_DATA_BLOB;
2574                 }
2575         }
2576         if (ndr_flags & NDR_BUFFERS) {
2577         }
2578         return NDR_ERR_SUCCESS;
2579 }
2580
2581 static enum ndr_err_code ndr_pull_trustAuthInOutSecret2V2(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutSecret2V2 *r)
2582 {
2583         if (ndr_flags & NDR_SCALARS) {
2584                 NDR_CHECK(ndr_pull_align(ndr, 4));
2585                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time1));
2586                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
2587                 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value));
2588                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time2));
2589                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
2590                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
2591                 {
2592                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
2593                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2594                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
2595                         ndr->flags = _flags_save_DATA_BLOB;
2596                 }
2597         }
2598         if (ndr_flags & NDR_BUFFERS) {
2599         }
2600         return NDR_ERR_SUCCESS;
2601 }
2602
2603 _PUBLIC_ void ndr_print_trustAuthInOutSecret2V2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V2 *r)
2604 {
2605         ndr_print_struct(ndr, name, "trustAuthInOutSecret2V2");
2606         ndr->depth++;
2607         ndr_print_NTTIME(ndr, "time1", r->time1);
2608         ndr_print_uint32(ndr, "unknown1", r->unknown1);
2609         ndr_print_DATA_BLOB(ndr, "value", r->value);
2610         ndr_print_NTTIME(ndr, "time2", r->time2);
2611         ndr_print_uint32(ndr, "unknown2", r->unknown2);
2612         ndr_print_uint32(ndr, "unknown3", r->unknown3);
2613         ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
2614         ndr->depth--;
2615 }
2616
2617 static enum ndr_err_code ndr_push_trustAuthInOutCtr2(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutCtr2 *r)
2618 {
2619         if (ndr_flags & NDR_SCALARS) {
2620                 NDR_CHECK(ndr_push_align(ndr, 4));
2621                 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value1));
2622                 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value2));
2623         }
2624         if (ndr_flags & NDR_BUFFERS) {
2625                 if (r->value1) {
2626                         NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value1));
2627                         NDR_CHECK(ndr_push_trustAuthInOutSecret2V1(ndr, NDR_SCALARS, r->value1));
2628                 }
2629                 if (r->value2) {
2630                         NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value2));
2631                         NDR_CHECK(ndr_push_trustAuthInOutSecret2V2(ndr, NDR_SCALARS, r->value2));
2632                 }
2633         }
2634         return NDR_ERR_SUCCESS;
2635 }
2636
2637 static enum ndr_err_code ndr_pull_trustAuthInOutCtr2(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutCtr2 *r)
2638 {
2639         uint32_t _ptr_value1;
2640         TALLOC_CTX *_mem_save_value1_0;
2641         uint32_t _ptr_value2;
2642         TALLOC_CTX *_mem_save_value2_0;
2643         if (ndr_flags & NDR_SCALARS) {
2644                 NDR_CHECK(ndr_pull_align(ndr, 4));
2645                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value1));
2646                 if (_ptr_value1) {
2647                         NDR_PULL_ALLOC(ndr, r->value1);
2648                         NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value1, _ptr_value1));
2649                 } else {
2650                         r->value1 = NULL;
2651                 }
2652                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value2));
2653                 if (_ptr_value2) {
2654                         NDR_PULL_ALLOC(ndr, r->value2);
2655                         NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value2, _ptr_value2));
2656                 } else {
2657                         r->value2 = NULL;
2658                 }
2659         }
2660         if (ndr_flags & NDR_BUFFERS) {
2661                 if (r->value1) {
2662                         uint32_t _relative_save_offset;
2663                         _relative_save_offset = ndr->offset;
2664                         NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value1));
2665                         _mem_save_value1_0 = NDR_PULL_GET_MEM_CTX(ndr);
2666                         NDR_PULL_SET_MEM_CTX(ndr, r->value1, 0);
2667                         NDR_CHECK(ndr_pull_trustAuthInOutSecret2V1(ndr, NDR_SCALARS, r->value1));
2668                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value1_0, 0);
2669                         ndr->offset = _relative_save_offset;
2670                 }
2671                 if (r->value2) {
2672                         uint32_t _relative_save_offset;
2673                         _relative_save_offset = ndr->offset;
2674                         NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value2));
2675                         _mem_save_value2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2676                         NDR_PULL_SET_MEM_CTX(ndr, r->value2, 0);
2677                         NDR_CHECK(ndr_pull_trustAuthInOutSecret2V2(ndr, NDR_SCALARS, r->value2));
2678                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value2_0, 0);
2679                         ndr->offset = _relative_save_offset;
2680                 }
2681         }
2682         return NDR_ERR_SUCCESS;
2683 }
2684
2685 _PUBLIC_ void ndr_print_trustAuthInOutCtr2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr2 *r)
2686 {
2687         ndr_print_struct(ndr, name, "trustAuthInOutCtr2");
2688         ndr->depth++;
2689         ndr_print_ptr(ndr, "value1", r->value1);
2690         ndr->depth++;
2691         if (r->value1) {
2692                 ndr_print_trustAuthInOutSecret2V1(ndr, "value1", r->value1);
2693         }
2694         ndr->depth--;
2695         ndr_print_ptr(ndr, "value2", r->value2);
2696         ndr->depth++;
2697         if (r->value2) {
2698                 ndr_print_trustAuthInOutSecret2V2(ndr, "value2", r->value2);
2699         }
2700         ndr->depth--;
2701         ndr->depth--;
2702 }
2703
2704 static enum ndr_err_code ndr_push_trustAuthInOutCtr(struct ndr_push *ndr, int ndr_flags, const union trustAuthInOutCtr *r)
2705 {
2706         if (ndr_flags & NDR_SCALARS) {
2707                 int level = ndr_push_get_switch_value(ndr, r);
2708                 switch (level) {
2709                         case 1: {
2710                                 NDR_CHECK(ndr_push_trustAuthInOutCtr1(ndr, NDR_SCALARS, &r->ctr1));
2711                         break; }
2712
2713                         case 2: {
2714                                 NDR_CHECK(ndr_push_trustAuthInOutCtr2(ndr, NDR_SCALARS, &r->ctr2));
2715                         break; }
2716
2717                         default:
2718                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2719                 }
2720         }
2721         if (ndr_flags & NDR_BUFFERS) {
2722                 int level = ndr_push_get_switch_value(ndr, r);
2723                 switch (level) {
2724                         case 1:
2725                                 NDR_CHECK(ndr_push_trustAuthInOutCtr1(ndr, NDR_BUFFERS, &r->ctr1));
2726                         break;
2727
2728                         case 2:
2729                                 NDR_CHECK(ndr_push_trustAuthInOutCtr2(ndr, NDR_BUFFERS, &r->ctr2));
2730                         break;
2731
2732                         default:
2733                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2734                 }
2735         }
2736         return NDR_ERR_SUCCESS;
2737 }
2738
2739 static enum ndr_err_code ndr_pull_trustAuthInOutCtr(struct ndr_pull *ndr, int ndr_flags, union trustAuthInOutCtr *r)
2740 {
2741         int level;
2742         level = ndr_pull_get_switch_value(ndr, r);
2743         if (ndr_flags & NDR_SCALARS) {
2744                 switch (level) {
2745                         case 1: {
2746                                 NDR_CHECK(ndr_pull_trustAuthInOutCtr1(ndr, NDR_SCALARS, &r->ctr1));
2747                         break; }
2748
2749                         case 2: {
2750                                 NDR_CHECK(ndr_pull_trustAuthInOutCtr2(ndr, NDR_SCALARS, &r->ctr2));
2751                         break; }
2752
2753                         default:
2754                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2755                 }
2756         }
2757         if (ndr_flags & NDR_BUFFERS) {
2758                 switch (level) {
2759                         case 1:
2760                                 NDR_CHECK(ndr_pull_trustAuthInOutCtr1(ndr, NDR_BUFFERS, &r->ctr1));
2761                         break;
2762
2763                         case 2:
2764                                 NDR_CHECK(ndr_pull_trustAuthInOutCtr2(ndr, NDR_BUFFERS, &r->ctr2));
2765                         break;
2766
2767                         default:
2768                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2769                 }
2770         }
2771         return NDR_ERR_SUCCESS;
2772 }
2773
2774 _PUBLIC_ void ndr_print_trustAuthInOutCtr(struct ndr_print *ndr, const char *name, const union trustAuthInOutCtr *r)
2775 {
2776         int level;
2777         level = ndr_print_get_switch_value(ndr, r);
2778         ndr_print_union(ndr, name, level, "trustAuthInOutCtr");
2779         switch (level) {
2780                 case 1:
2781                         ndr_print_trustAuthInOutCtr1(ndr, "ctr1", &r->ctr1);
2782                 break;
2783
2784                 case 2:
2785                         ndr_print_trustAuthInOutCtr2(ndr, "ctr2", &r->ctr2);
2786                 break;
2787
2788                 default:
2789                         ndr_print_bad_level(ndr, name, level);
2790         }
2791 }
2792
2793 _PUBLIC_ enum ndr_err_code ndr_push_trustAuthInOutBlob(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutBlob *r)
2794 {
2795         if (ndr_flags & NDR_SCALARS) {
2796                 NDR_CHECK(ndr_push_align(ndr, 4));
2797                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
2798                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
2799                 NDR_CHECK(ndr_push_trustAuthInOutCtr(ndr, NDR_SCALARS, &r->ctr));
2800         }
2801         if (ndr_flags & NDR_BUFFERS) {
2802                 NDR_CHECK(ndr_push_trustAuthInOutCtr(ndr, NDR_BUFFERS, &r->ctr));
2803         }
2804         return NDR_ERR_SUCCESS;
2805 }
2806
2807 _PUBLIC_ enum ndr_err_code ndr_pull_trustAuthInOutBlob(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutBlob *r)
2808 {
2809         if (ndr_flags & NDR_SCALARS) {
2810                 NDR_CHECK(ndr_pull_align(ndr, 4));
2811                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
2812                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
2813                 NDR_CHECK(ndr_pull_trustAuthInOutCtr(ndr, NDR_SCALARS, &r->ctr));
2814         }
2815         if (ndr_flags & NDR_BUFFERS) {
2816                 NDR_CHECK(ndr_pull_trustAuthInOutCtr(ndr, NDR_BUFFERS, &r->ctr));
2817         }
2818         return NDR_ERR_SUCCESS;
2819 }
2820
2821 _PUBLIC_ void ndr_print_trustAuthInOutBlob(struct ndr_print *ndr, const char *name, const struct trustAuthInOutBlob *r)
2822 {
2823         ndr_print_struct(ndr, name, "trustAuthInOutBlob");
2824         ndr->depth++;
2825         ndr_print_uint32(ndr, "version", r->version);
2826         ndr_print_set_switch_value(ndr, &r->ctr, r->version);
2827         ndr_print_trustAuthInOutCtr(ndr, "ctr", &r->ctr);
2828         ndr->depth--;
2829 }
2830
2831 _PUBLIC_ enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r)
2832 {
2833         if (ndr_flags & NDR_SCALARS) {
2834                 NDR_CHECK(ndr_push_align(ndr, 4));
2835                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->marker));
2836                 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
2837         }
2838         if (ndr_flags & NDR_BUFFERS) {
2839         }
2840         return NDR_ERR_SUCCESS;
2841 }
2842
2843 _PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r)
2844 {
2845         if (ndr_flags & NDR_SCALARS) {
2846                 NDR_CHECK(ndr_pull_align(ndr, 4));
2847                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->marker));
2848                 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
2849         }
2850         if (ndr_flags & NDR_BUFFERS) {
2851         }
2852         return NDR_ERR_SUCCESS;
2853 }
2854
2855 _PUBLIC_ void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r)
2856 {
2857         ndr_print_struct(ndr, name, "DsCompressedChunk");
2858         ndr->depth++;
2859         ndr_print_uint32(ndr, "marker", r->marker);
2860         ndr_print_DATA_BLOB(ndr, "data", r->data);
2861         ndr->depth--;
2862 }