Fix "ndr_size_PAC_LOGON_INFO defined but not used" build warning
[kai/samba.git] / source3 / librpc / gen_ndr / ndr_krb5pac.c
1 /* parser auto-generated by pidl */
2
3 #include "includes.h"
4 #include "librpc/gen_ndr/ndr_krb5pac.h"
5
6 #include "librpc/gen_ndr/ndr_security.h"
7 #include "librpc/gen_ndr/ndr_netlogon.h"
8 #include "librpc/gen_ndr/ndr_samr.h"
9 static enum ndr_err_code ndr_push_PAC_LOGON_NAME(struct ndr_push *ndr, int ndr_flags, const struct PAC_LOGON_NAME *r)
10 {
11         if (ndr_flags & NDR_SCALARS) {
12                 NDR_CHECK(ndr_push_align(ndr, 4));
13                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->logon_time));
14                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->account_name)));
15                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->account_name, 2 * strlen_m(r->account_name), sizeof(uint8_t), CH_UTF16));
16         }
17         if (ndr_flags & NDR_BUFFERS) {
18         }
19         return NDR_ERR_SUCCESS;
20 }
21
22 static enum ndr_err_code ndr_pull_PAC_LOGON_NAME(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_NAME *r)
23 {
24         if (ndr_flags & NDR_SCALARS) {
25                 NDR_CHECK(ndr_pull_align(ndr, 4));
26                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->logon_time));
27                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
28                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, r->size, sizeof(uint8_t), CH_UTF16));
29         }
30         if (ndr_flags & NDR_BUFFERS) {
31         }
32         return NDR_ERR_SUCCESS;
33 }
34
35 _PUBLIC_ void ndr_print_PAC_LOGON_NAME(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_NAME *r)
36 {
37         ndr_print_struct(ndr, name, "PAC_LOGON_NAME");
38         ndr->depth++;
39         ndr_print_NTTIME(ndr, "logon_time", r->logon_time);
40         ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->account_name):r->size);
41         ndr_print_string(ndr, "account_name", r->account_name);
42         ndr->depth--;
43 }
44
45 _PUBLIC_ enum ndr_err_code ndr_push_PAC_SIGNATURE_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_SIGNATURE_DATA *r)
46 {
47         {
48                 uint32_t _flags_save_STRUCT = ndr->flags;
49                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
50                 if (ndr_flags & NDR_SCALARS) {
51                         NDR_CHECK(ndr_push_align(ndr, 4));
52                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->type));
53                         {
54                                 uint32_t _flags_save_DATA_BLOB = ndr->flags;
55                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
56                                 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->signature));
57                                 ndr->flags = _flags_save_DATA_BLOB;
58                         }
59                 }
60                 if (ndr_flags & NDR_BUFFERS) {
61                 }
62                 ndr->flags = _flags_save_STRUCT;
63         }
64         return NDR_ERR_SUCCESS;
65 }
66
67 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_SIGNATURE_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_SIGNATURE_DATA *r)
68 {
69         {
70                 uint32_t _flags_save_STRUCT = ndr->flags;
71                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
72                 if (ndr_flags & NDR_SCALARS) {
73                         NDR_CHECK(ndr_pull_align(ndr, 4));
74                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->type));
75                         {
76                                 uint32_t _flags_save_DATA_BLOB = ndr->flags;
77                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
78                                 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->signature));
79                                 ndr->flags = _flags_save_DATA_BLOB;
80                         }
81                 }
82                 if (ndr_flags & NDR_BUFFERS) {
83                 }
84                 ndr->flags = _flags_save_STRUCT;
85         }
86         return NDR_ERR_SUCCESS;
87 }
88
89 _PUBLIC_ void ndr_print_PAC_SIGNATURE_DATA(struct ndr_print *ndr, const char *name, const struct PAC_SIGNATURE_DATA *r)
90 {
91         ndr_print_struct(ndr, name, "PAC_SIGNATURE_DATA");
92         {
93                 uint32_t _flags_save_STRUCT = ndr->flags;
94                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
95                 ndr->depth++;
96                 ndr_print_uint32(ndr, "type", r->type);
97                 ndr_print_DATA_BLOB(ndr, "signature", r->signature);
98                 ndr->depth--;
99                 ndr->flags = _flags_save_STRUCT;
100         }
101 }
102
103 static enum ndr_err_code ndr_push_PAC_LOGON_INFO(struct ndr_push *ndr, int ndr_flags, const struct PAC_LOGON_INFO *r)
104 {
105         if (ndr_flags & NDR_SCALARS) {
106                 NDR_CHECK(ndr_push_align(ndr, 4));
107                 NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3));
108                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->res_group_dom_sid));
109                 NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->res_groups));
110         }
111         if (ndr_flags & NDR_BUFFERS) {
112                 NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3));
113                 if (r->res_group_dom_sid) {
114                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->res_group_dom_sid));
115                 }
116                 NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->res_groups));
117         }
118         return NDR_ERR_SUCCESS;
119 }
120
121 static enum ndr_err_code ndr_pull_PAC_LOGON_INFO(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO *r)
122 {
123         uint32_t _ptr_res_group_dom_sid;
124         TALLOC_CTX *_mem_save_res_group_dom_sid_0;
125         if (ndr_flags & NDR_SCALARS) {
126                 NDR_CHECK(ndr_pull_align(ndr, 4));
127                 NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3));
128                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_res_group_dom_sid));
129                 if (_ptr_res_group_dom_sid) {
130                         NDR_PULL_ALLOC(ndr, r->res_group_dom_sid);
131                 } else {
132                         r->res_group_dom_sid = NULL;
133                 }
134                 NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->res_groups));
135         }
136         if (ndr_flags & NDR_BUFFERS) {
137                 NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3));
138                 if (r->res_group_dom_sid) {
139                         _mem_save_res_group_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
140                         NDR_PULL_SET_MEM_CTX(ndr, r->res_group_dom_sid, 0);
141                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->res_group_dom_sid));
142                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_res_group_dom_sid_0, 0);
143                 }
144                 NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->res_groups));
145         }
146         return NDR_ERR_SUCCESS;
147 }
148
149 _PUBLIC_ void ndr_print_PAC_LOGON_INFO(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO *r)
150 {
151         ndr_print_struct(ndr, name, "PAC_LOGON_INFO");
152         ndr->depth++;
153         ndr_print_netr_SamInfo3(ndr, "info3", &r->info3);
154         ndr_print_ptr(ndr, "res_group_dom_sid", r->res_group_dom_sid);
155         ndr->depth++;
156         if (r->res_group_dom_sid) {
157                 ndr_print_dom_sid2(ndr, "res_group_dom_sid", r->res_group_dom_sid);
158         }
159         ndr->depth--;
160         ndr_print_samr_RidWithAttributeArray(ndr, "res_groups", &r->res_groups);
161         ndr->depth--;
162 }
163
164 _PUBLIC_ enum ndr_err_code ndr_push_PAC_LOGON_INFO_CTR(struct ndr_push *ndr, int ndr_flags, const struct PAC_LOGON_INFO_CTR *r)
165 {
166         if (ndr_flags & NDR_SCALARS) {
167                 NDR_CHECK(ndr_push_align(ndr, 4));
168                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
169         }
170         if (ndr_flags & NDR_BUFFERS) {
171                 if (r->info) {
172                         NDR_CHECK(ndr_push_PAC_LOGON_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
173                 }
174         }
175         return NDR_ERR_SUCCESS;
176 }
177
178 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_LOGON_INFO_CTR(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO_CTR *r)
179 {
180         uint32_t _ptr_info;
181         TALLOC_CTX *_mem_save_info_0;
182         if (ndr_flags & NDR_SCALARS) {
183                 NDR_CHECK(ndr_pull_align(ndr, 4));
184                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
185                 if (_ptr_info) {
186                         NDR_PULL_ALLOC(ndr, r->info);
187                 } else {
188                         r->info = NULL;
189                 }
190         }
191         if (ndr_flags & NDR_BUFFERS) {
192                 if (r->info) {
193                         _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
194                         NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
195                         NDR_CHECK(ndr_pull_PAC_LOGON_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
196                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
197                 }
198         }
199         return NDR_ERR_SUCCESS;
200 }
201
202 _PUBLIC_ void ndr_print_PAC_LOGON_INFO_CTR(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO_CTR *r)
203 {
204         ndr_print_struct(ndr, name, "PAC_LOGON_INFO_CTR");
205         ndr->depth++;
206         ndr_print_ptr(ndr, "info", r->info);
207         ndr->depth++;
208         if (r->info) {
209                 ndr_print_PAC_LOGON_INFO(ndr, "info", r->info);
210         }
211         ndr->depth--;
212         ndr->depth--;
213 }
214
215 _PUBLIC_ enum ndr_err_code ndr_push_PAC_TYPE(struct ndr_push *ndr, int ndr_flags, enum PAC_TYPE r)
216 {
217         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
218         return NDR_ERR_SUCCESS;
219 }
220
221 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_TYPE(struct ndr_pull *ndr, int ndr_flags, enum PAC_TYPE *r)
222 {
223         uint32_t v;
224         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
225         *r = v;
226         return NDR_ERR_SUCCESS;
227 }
228
229 _PUBLIC_ void ndr_print_PAC_TYPE(struct ndr_print *ndr, const char *name, enum PAC_TYPE r)
230 {
231         const char *val = NULL;
232
233         switch (r) {
234                 case PAC_TYPE_LOGON_INFO: val = "PAC_TYPE_LOGON_INFO"; break;
235                 case PAC_TYPE_SRV_CHECKSUM: val = "PAC_TYPE_SRV_CHECKSUM"; break;
236                 case PAC_TYPE_KDC_CHECKSUM: val = "PAC_TYPE_KDC_CHECKSUM"; break;
237                 case PAC_TYPE_LOGON_NAME: val = "PAC_TYPE_LOGON_NAME"; break;
238                 case PAC_TYPE_CONSTRAINED_DELEGATION: val = "PAC_TYPE_CONSTRAINED_DELEGATION"; break;
239                 case PAC_TYPE_UNKNOWN_12: val = "PAC_TYPE_UNKNOWN_12"; break;
240         }
241         ndr_print_enum(ndr, name, "ENUM", val, r);
242 }
243
244 static enum ndr_err_code ndr_push_DATA_BLOB_REM(struct ndr_push *ndr, int ndr_flags, const struct DATA_BLOB_REM *r)
245 {
246         if (ndr_flags & NDR_SCALARS) {
247                 NDR_CHECK(ndr_push_align(ndr, 4));
248                 {
249                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
250                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
251                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->remaining));
252                         ndr->flags = _flags_save_DATA_BLOB;
253                 }
254         }
255         if (ndr_flags & NDR_BUFFERS) {
256         }
257         return NDR_ERR_SUCCESS;
258 }
259
260 static enum ndr_err_code ndr_pull_DATA_BLOB_REM(struct ndr_pull *ndr, int ndr_flags, struct DATA_BLOB_REM *r)
261 {
262         if (ndr_flags & NDR_SCALARS) {
263                 NDR_CHECK(ndr_pull_align(ndr, 4));
264                 {
265                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
266                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
267                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->remaining));
268                         ndr->flags = _flags_save_DATA_BLOB;
269                 }
270         }
271         if (ndr_flags & NDR_BUFFERS) {
272         }
273         return NDR_ERR_SUCCESS;
274 }
275
276 _PUBLIC_ void ndr_print_DATA_BLOB_REM(struct ndr_print *ndr, const char *name, const struct DATA_BLOB_REM *r)
277 {
278         ndr_print_struct(ndr, name, "DATA_BLOB_REM");
279         ndr->depth++;
280         ndr_print_DATA_BLOB(ndr, "remaining", r->remaining);
281         ndr->depth--;
282 }
283
284 _PUBLIC_ enum ndr_err_code ndr_push_PAC_INFO(struct ndr_push *ndr, int ndr_flags, const union PAC_INFO *r)
285 {
286         if (ndr_flags & NDR_SCALARS) {
287                 int level = ndr_push_get_switch_value(ndr, r);
288                 switch (level) {
289                         case PAC_TYPE_LOGON_INFO: {
290                                 {
291                                         struct ndr_push *_ndr_logon_info;
292                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_logon_info, 0xFFFFFC01, -1));
293                                         NDR_CHECK(ndr_push_PAC_LOGON_INFO_CTR(_ndr_logon_info, NDR_SCALARS|NDR_BUFFERS, &r->logon_info));
294                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_logon_info, 0xFFFFFC01, -1));
295                                 }
296                         break; }
297
298                         case PAC_TYPE_SRV_CHECKSUM: {
299                                 NDR_CHECK(ndr_push_PAC_SIGNATURE_DATA(ndr, NDR_SCALARS, &r->srv_cksum));
300                         break; }
301
302                         case PAC_TYPE_KDC_CHECKSUM: {
303                                 NDR_CHECK(ndr_push_PAC_SIGNATURE_DATA(ndr, NDR_SCALARS, &r->kdc_cksum));
304                         break; }
305
306                         case PAC_TYPE_LOGON_NAME: {
307                                 NDR_CHECK(ndr_push_PAC_LOGON_NAME(ndr, NDR_SCALARS, &r->logon_name));
308                         break; }
309
310                         default: {
311                                 {
312                                         struct ndr_push *_ndr_unknown;
313                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_unknown, 0, -1));
314                                         NDR_CHECK(ndr_push_DATA_BLOB_REM(_ndr_unknown, NDR_SCALARS, &r->unknown));
315                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_unknown, 0, -1));
316                                 }
317                         break; }
318
319                 }
320         }
321         if (ndr_flags & NDR_BUFFERS) {
322                 int level = ndr_push_get_switch_value(ndr, r);
323                 switch (level) {
324                         case PAC_TYPE_LOGON_INFO:
325                         break;
326
327                         case PAC_TYPE_SRV_CHECKSUM:
328                         break;
329
330                         case PAC_TYPE_KDC_CHECKSUM:
331                         break;
332
333                         case PAC_TYPE_LOGON_NAME:
334                         break;
335
336                         default:
337                         break;
338
339                 }
340         }
341         return NDR_ERR_SUCCESS;
342 }
343
344 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_INFO(struct ndr_pull *ndr, int ndr_flags, union PAC_INFO *r)
345 {
346         int level;
347         level = ndr_pull_get_switch_value(ndr, r);
348         if (ndr_flags & NDR_SCALARS) {
349                 switch (level) {
350                         case PAC_TYPE_LOGON_INFO: {
351                                 {
352                                         struct ndr_pull *_ndr_logon_info;
353                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_logon_info, 0xFFFFFC01, -1));
354                                         NDR_CHECK(ndr_pull_PAC_LOGON_INFO_CTR(_ndr_logon_info, NDR_SCALARS|NDR_BUFFERS, &r->logon_info));
355                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_logon_info, 0xFFFFFC01, -1));
356                                 }
357                         break; }
358
359                         case PAC_TYPE_SRV_CHECKSUM: {
360                                 NDR_CHECK(ndr_pull_PAC_SIGNATURE_DATA(ndr, NDR_SCALARS, &r->srv_cksum));
361                         break; }
362
363                         case PAC_TYPE_KDC_CHECKSUM: {
364                                 NDR_CHECK(ndr_pull_PAC_SIGNATURE_DATA(ndr, NDR_SCALARS, &r->kdc_cksum));
365                         break; }
366
367                         case PAC_TYPE_LOGON_NAME: {
368                                 NDR_CHECK(ndr_pull_PAC_LOGON_NAME(ndr, NDR_SCALARS, &r->logon_name));
369                         break; }
370
371                         default: {
372                                 {
373                                         struct ndr_pull *_ndr_unknown;
374                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_unknown, 0, -1));
375                                         NDR_CHECK(ndr_pull_DATA_BLOB_REM(_ndr_unknown, NDR_SCALARS, &r->unknown));
376                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_unknown, 0, -1));
377                                 }
378                         break; }
379
380                 }
381         }
382         if (ndr_flags & NDR_BUFFERS) {
383                 switch (level) {
384                         case PAC_TYPE_LOGON_INFO:
385                         break;
386
387                         case PAC_TYPE_SRV_CHECKSUM:
388                         break;
389
390                         case PAC_TYPE_KDC_CHECKSUM:
391                         break;
392
393                         case PAC_TYPE_LOGON_NAME:
394                         break;
395
396                         default:
397                         break;
398
399                 }
400         }
401         return NDR_ERR_SUCCESS;
402 }
403
404 _PUBLIC_ void ndr_print_PAC_INFO(struct ndr_print *ndr, const char *name, const union PAC_INFO *r)
405 {
406         int level;
407         level = ndr_print_get_switch_value(ndr, r);
408         ndr_print_union(ndr, name, level, "PAC_INFO");
409         switch (level) {
410                 case PAC_TYPE_LOGON_INFO:
411                         ndr_print_PAC_LOGON_INFO_CTR(ndr, "logon_info", &r->logon_info);
412                 break;
413
414                 case PAC_TYPE_SRV_CHECKSUM:
415                         ndr_print_PAC_SIGNATURE_DATA(ndr, "srv_cksum", &r->srv_cksum);
416                 break;
417
418                 case PAC_TYPE_KDC_CHECKSUM:
419                         ndr_print_PAC_SIGNATURE_DATA(ndr, "kdc_cksum", &r->kdc_cksum);
420                 break;
421
422                 case PAC_TYPE_LOGON_NAME:
423                         ndr_print_PAC_LOGON_NAME(ndr, "logon_name", &r->logon_name);
424                 break;
425
426                 default:
427                         ndr_print_DATA_BLOB_REM(ndr, "unknown", &r->unknown);
428                 break;
429
430         }
431 }
432
433 _PUBLIC_ size_t ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags)
434 {
435         return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_PAC_INFO);
436 }
437
438 _PUBLIC_ enum ndr_err_code ndr_push_PAC_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA *r)
439 {
440         uint32_t cntr_buffers_0;
441         if (ndr_flags & NDR_SCALARS) {
442                 NDR_CHECK(ndr_push_align(ndr, 4));
443                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_buffers));
444                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
445                 for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
446                         NDR_CHECK(ndr_push_PAC_BUFFER(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0]));
447                 }
448         }
449         if (ndr_flags & NDR_BUFFERS) {
450                 for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
451                         NDR_CHECK(ndr_push_PAC_BUFFER(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_0]));
452                 }
453         }
454         return NDR_ERR_SUCCESS;
455 }
456
457 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA *r)
458 {
459         uint32_t cntr_buffers_0;
460         TALLOC_CTX *_mem_save_buffers_0;
461         if (ndr_flags & NDR_SCALARS) {
462                 NDR_CHECK(ndr_pull_align(ndr, 4));
463                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_buffers));
464                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
465                 NDR_PULL_ALLOC_N(ndr, r->buffers, r->num_buffers);
466                 _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr);
467                 NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0);
468                 for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
469                         NDR_CHECK(ndr_pull_PAC_BUFFER(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0]));
470                 }
471                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0);
472         }
473         if (ndr_flags & NDR_BUFFERS) {
474                 _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr);
475                 NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0);
476                 for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
477                         NDR_CHECK(ndr_pull_PAC_BUFFER(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_0]));
478                 }
479                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0);
480         }
481         return NDR_ERR_SUCCESS;
482 }
483
484 _PUBLIC_ void ndr_print_PAC_DATA(struct ndr_print *ndr, const char *name, const struct PAC_DATA *r)
485 {
486         uint32_t cntr_buffers_0;
487         ndr_print_struct(ndr, name, "PAC_DATA");
488         ndr->depth++;
489         ndr_print_uint32(ndr, "num_buffers", r->num_buffers);
490         ndr_print_uint32(ndr, "version", r->version);
491         ndr->print(ndr, "%s: ARRAY(%d)", "buffers", (int)r->num_buffers);
492         ndr->depth++;
493         for (cntr_buffers_0=0;cntr_buffers_0<r->num_buffers;cntr_buffers_0++) {
494                 char *idx_0=NULL;
495                 if (asprintf(&idx_0, "[%d]", cntr_buffers_0) != -1) {
496                         ndr_print_PAC_BUFFER(ndr, "buffers", &r->buffers[cntr_buffers_0]);
497                         free(idx_0);
498                 }
499         }
500         ndr->depth--;
501         ndr->depth--;
502 }
503
504 _PUBLIC_ enum ndr_err_code ndr_push_PAC_BUFFER_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER_RAW *r)
505 {
506         if (ndr_flags & NDR_SCALARS) {
507                 NDR_CHECK(ndr_push_align(ndr, 4));
508                 NDR_CHECK(ndr_push_PAC_TYPE(ndr, NDR_SCALARS, r->type));
509                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ndr_size));
510                 {
511                         uint32_t _flags_save_DATA_BLOB_REM = ndr->flags;
512                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
513                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->info));
514                         ndr->flags = _flags_save_DATA_BLOB_REM;
515                 }
516                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
517         }
518         if (ndr_flags & NDR_BUFFERS) {
519                 {
520                         uint32_t _flags_save_DATA_BLOB_REM = ndr->flags;
521                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
522                         if (r->info) {
523                                 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->info));
524                                 {
525                                         struct ndr_push *_ndr_info;
526                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 0, NDR_ROUND(r->ndr_size, 8)));
527                                         NDR_CHECK(ndr_push_DATA_BLOB_REM(_ndr_info, NDR_SCALARS, r->info));
528                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 0, NDR_ROUND(r->ndr_size, 8)));
529                                 }
530                         }
531                         ndr->flags = _flags_save_DATA_BLOB_REM;
532                 }
533         }
534         return NDR_ERR_SUCCESS;
535 }
536
537 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_BUFFER_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER_RAW *r)
538 {
539         uint32_t _ptr_info;
540         TALLOC_CTX *_mem_save_info_0;
541         if (ndr_flags & NDR_SCALARS) {
542                 NDR_CHECK(ndr_pull_align(ndr, 4));
543                 NDR_CHECK(ndr_pull_PAC_TYPE(ndr, NDR_SCALARS, &r->type));
544                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ndr_size));
545                 {
546                         uint32_t _flags_save_DATA_BLOB_REM = ndr->flags;
547                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
548                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
549                         if (_ptr_info) {
550                                 NDR_PULL_ALLOC(ndr, r->info);
551                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->info, _ptr_info));
552                         } else {
553                                 r->info = NULL;
554                         }
555                         ndr->flags = _flags_save_DATA_BLOB_REM;
556                 }
557                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_pad));
558         }
559         if (ndr_flags & NDR_BUFFERS) {
560                 {
561                         uint32_t _flags_save_DATA_BLOB_REM = ndr->flags;
562                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
563                         if (r->info) {
564                                 uint32_t _relative_save_offset;
565                                 _relative_save_offset = ndr->offset;
566                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->info));
567                                 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
568                                 NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
569                                 {
570                                         struct ndr_pull *_ndr_info;
571                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 0, NDR_ROUND(r->ndr_size, 8)));
572                                         NDR_CHECK(ndr_pull_DATA_BLOB_REM(_ndr_info, NDR_SCALARS, r->info));
573                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 0, NDR_ROUND(r->ndr_size, 8)));
574                                 }
575                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
576                                 ndr->offset = _relative_save_offset;
577                         }
578                         ndr->flags = _flags_save_DATA_BLOB_REM;
579                 }
580         }
581         return NDR_ERR_SUCCESS;
582 }
583
584 _PUBLIC_ void ndr_print_PAC_BUFFER_RAW(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER_RAW *r)
585 {
586         ndr_print_struct(ndr, name, "PAC_BUFFER_RAW");
587         ndr->depth++;
588         ndr_print_PAC_TYPE(ndr, "type", r->type);
589         ndr_print_uint32(ndr, "ndr_size", r->ndr_size);
590         ndr_print_ptr(ndr, "info", r->info);
591         ndr->depth++;
592         if (r->info) {
593                 ndr_print_DATA_BLOB_REM(ndr, "info", r->info);
594         }
595         ndr->depth--;
596         ndr_print_uint32(ndr, "_pad", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->_pad);
597         ndr->depth--;
598 }
599
600 _PUBLIC_ enum ndr_err_code ndr_push_PAC_DATA_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA_RAW *r)
601 {
602         uint32_t cntr_buffers_0;
603         if (ndr_flags & NDR_SCALARS) {
604                 NDR_CHECK(ndr_push_align(ndr, 4));
605                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_buffers));
606                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
607                 for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
608                         NDR_CHECK(ndr_push_PAC_BUFFER_RAW(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0]));
609                 }
610         }
611         if (ndr_flags & NDR_BUFFERS) {
612                 for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
613                         NDR_CHECK(ndr_push_PAC_BUFFER_RAW(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_0]));
614                 }
615         }
616         return NDR_ERR_SUCCESS;
617 }
618
619 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_DATA_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA_RAW *r)
620 {
621         uint32_t cntr_buffers_0;
622         TALLOC_CTX *_mem_save_buffers_0;
623         if (ndr_flags & NDR_SCALARS) {
624                 NDR_CHECK(ndr_pull_align(ndr, 4));
625                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_buffers));
626                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
627                 NDR_PULL_ALLOC_N(ndr, r->buffers, r->num_buffers);
628                 _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr);
629                 NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0);
630                 for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
631                         NDR_CHECK(ndr_pull_PAC_BUFFER_RAW(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0]));
632                 }
633                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0);
634         }
635         if (ndr_flags & NDR_BUFFERS) {
636                 _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr);
637                 NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0);
638                 for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
639                         NDR_CHECK(ndr_pull_PAC_BUFFER_RAW(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_0]));
640                 }
641                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0);
642         }
643         return NDR_ERR_SUCCESS;
644 }
645
646 _PUBLIC_ void ndr_print_PAC_DATA_RAW(struct ndr_print *ndr, const char *name, const struct PAC_DATA_RAW *r)
647 {
648         uint32_t cntr_buffers_0;
649         ndr_print_struct(ndr, name, "PAC_DATA_RAW");
650         ndr->depth++;
651         ndr_print_uint32(ndr, "num_buffers", r->num_buffers);
652         ndr_print_uint32(ndr, "version", r->version);
653         ndr->print(ndr, "%s: ARRAY(%d)", "buffers", (int)r->num_buffers);
654         ndr->depth++;
655         for (cntr_buffers_0=0;cntr_buffers_0<r->num_buffers;cntr_buffers_0++) {
656                 char *idx_0=NULL;
657                 if (asprintf(&idx_0, "[%d]", cntr_buffers_0) != -1) {
658                         ndr_print_PAC_BUFFER_RAW(ndr, "buffers", &r->buffers[cntr_buffers_0]);
659                         free(idx_0);
660                 }
661         }
662         ndr->depth--;
663         ndr->depth--;
664 }
665
666 _PUBLIC_ enum ndr_err_code ndr_push_PAC_Validate(struct ndr_push *ndr, int ndr_flags, const struct PAC_Validate *r)
667 {
668         if (ndr_flags & NDR_SCALARS) {
669                 NDR_CHECK(ndr_push_align(ndr, 4));
670                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, NETLOGON_GENERIC_KRB5_PAC_VALIDATE));
671                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ChecksumLength));
672                 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->SignatureType));
673                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SignatureLength));
674                 {
675                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
676                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
677                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->ChecksumAndSignature));
678                         ndr->flags = _flags_save_DATA_BLOB;
679                 }
680         }
681         if (ndr_flags & NDR_BUFFERS) {
682         }
683         return NDR_ERR_SUCCESS;
684 }
685
686 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_Validate(struct ndr_pull *ndr, int ndr_flags, struct PAC_Validate *r)
687 {
688         if (ndr_flags & NDR_SCALARS) {
689                 NDR_CHECK(ndr_pull_align(ndr, 4));
690                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MessageType));
691                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ChecksumLength));
692                 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->SignatureType));
693                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SignatureLength));
694                 {
695                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
696                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
697                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->ChecksumAndSignature));
698                         ndr->flags = _flags_save_DATA_BLOB;
699                 }
700         }
701         if (ndr_flags & NDR_BUFFERS) {
702         }
703         return NDR_ERR_SUCCESS;
704 }
705
706 _PUBLIC_ void ndr_print_PAC_Validate(struct ndr_print *ndr, const char *name, const struct PAC_Validate *r)
707 {
708         ndr_print_struct(ndr, name, "PAC_Validate");
709         ndr->depth++;
710         ndr_print_uint32(ndr, "MessageType", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NETLOGON_GENERIC_KRB5_PAC_VALIDATE:r->MessageType);
711         ndr_print_uint32(ndr, "ChecksumLength", r->ChecksumLength);
712         ndr_print_int32(ndr, "SignatureType", r->SignatureType);
713         ndr_print_uint32(ndr, "SignatureLength", r->SignatureLength);
714         ndr_print_DATA_BLOB(ndr, "ChecksumAndSignature", r->ChecksumAndSignature);
715         ndr->depth--;
716 }
717
718 _PUBLIC_ enum ndr_err_code ndr_push_netsamlogoncache_entry(struct ndr_push *ndr, int ndr_flags, const struct netsamlogoncache_entry *r)
719 {
720         if (ndr_flags & NDR_SCALARS) {
721                 NDR_CHECK(ndr_push_align(ndr, 4));
722                 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->timestamp));
723                 NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3));
724         }
725         if (ndr_flags & NDR_BUFFERS) {
726                 NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3));
727         }
728         return NDR_ERR_SUCCESS;
729 }
730
731 _PUBLIC_ enum ndr_err_code ndr_pull_netsamlogoncache_entry(struct ndr_pull *ndr, int ndr_flags, struct netsamlogoncache_entry *r)
732 {
733         if (ndr_flags & NDR_SCALARS) {
734                 NDR_CHECK(ndr_pull_align(ndr, 4));
735                 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->timestamp));
736                 NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3));
737         }
738         if (ndr_flags & NDR_BUFFERS) {
739                 NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3));
740         }
741         return NDR_ERR_SUCCESS;
742 }
743
744 _PUBLIC_ void ndr_print_netsamlogoncache_entry(struct ndr_print *ndr, const char *name, const struct netsamlogoncache_entry *r)
745 {
746         ndr_print_struct(ndr, name, "netsamlogoncache_entry");
747         ndr->depth++;
748         ndr_print_time_t(ndr, "timestamp", r->timestamp);
749         ndr_print_netr_SamInfo3(ndr, "info3", &r->info3);
750         ndr->depth--;
751 }
752
753 static enum ndr_err_code ndr_push_decode_pac(struct ndr_push *ndr, int flags, const struct decode_pac *r)
754 {
755         if (flags & NDR_IN) {
756                 NDR_CHECK(ndr_push_PAC_DATA(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pac));
757         }
758         if (flags & NDR_OUT) {
759         }
760         return NDR_ERR_SUCCESS;
761 }
762
763 static enum ndr_err_code ndr_pull_decode_pac(struct ndr_pull *ndr, int flags, struct decode_pac *r)
764 {
765         if (flags & NDR_IN) {
766                 NDR_CHECK(ndr_pull_PAC_DATA(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pac));
767         }
768         if (flags & NDR_OUT) {
769         }
770         return NDR_ERR_SUCCESS;
771 }
772
773 _PUBLIC_ void ndr_print_decode_pac(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac *r)
774 {
775         ndr_print_struct(ndr, name, "decode_pac");
776         ndr->depth++;
777         if (flags & NDR_SET_VALUES) {
778                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
779         }
780         if (flags & NDR_IN) {
781                 ndr_print_struct(ndr, "in", "decode_pac");
782                 ndr->depth++;
783                 ndr_print_PAC_DATA(ndr, "pac", &r->in.pac);
784                 ndr->depth--;
785         }
786         if (flags & NDR_OUT) {
787                 ndr_print_struct(ndr, "out", "decode_pac");
788                 ndr->depth++;
789                 ndr->depth--;
790         }
791         ndr->depth--;
792 }
793
794 static enum ndr_err_code ndr_push_decode_pac_raw(struct ndr_push *ndr, int flags, const struct decode_pac_raw *r)
795 {
796         if (flags & NDR_IN) {
797                 NDR_CHECK(ndr_push_PAC_DATA_RAW(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pac));
798         }
799         if (flags & NDR_OUT) {
800         }
801         return NDR_ERR_SUCCESS;
802 }
803
804 static enum ndr_err_code ndr_pull_decode_pac_raw(struct ndr_pull *ndr, int flags, struct decode_pac_raw *r)
805 {
806         if (flags & NDR_IN) {
807                 NDR_CHECK(ndr_pull_PAC_DATA_RAW(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pac));
808         }
809         if (flags & NDR_OUT) {
810         }
811         return NDR_ERR_SUCCESS;
812 }
813
814 _PUBLIC_ void ndr_print_decode_pac_raw(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac_raw *r)
815 {
816         ndr_print_struct(ndr, name, "decode_pac_raw");
817         ndr->depth++;
818         if (flags & NDR_SET_VALUES) {
819                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
820         }
821         if (flags & NDR_IN) {
822                 ndr_print_struct(ndr, "in", "decode_pac_raw");
823                 ndr->depth++;
824                 ndr_print_PAC_DATA_RAW(ndr, "pac", &r->in.pac);
825                 ndr->depth--;
826         }
827         if (flags & NDR_OUT) {
828                 ndr_print_struct(ndr, "out", "decode_pac_raw");
829                 ndr->depth++;
830                 ndr->depth--;
831         }
832         ndr->depth--;
833 }
834
835 static enum ndr_err_code ndr_push_decode_login_info(struct ndr_push *ndr, int flags, const struct decode_login_info *r)
836 {
837         if (flags & NDR_IN) {
838                 NDR_CHECK(ndr_push_PAC_LOGON_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon_info));
839         }
840         if (flags & NDR_OUT) {
841         }
842         return NDR_ERR_SUCCESS;
843 }
844
845 static enum ndr_err_code ndr_pull_decode_login_info(struct ndr_pull *ndr, int flags, struct decode_login_info *r)
846 {
847         if (flags & NDR_IN) {
848                 NDR_CHECK(ndr_pull_PAC_LOGON_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon_info));
849         }
850         if (flags & NDR_OUT) {
851         }
852         return NDR_ERR_SUCCESS;
853 }
854
855 _PUBLIC_ void ndr_print_decode_login_info(struct ndr_print *ndr, const char *name, int flags, const struct decode_login_info *r)
856 {
857         ndr_print_struct(ndr, name, "decode_login_info");
858         ndr->depth++;
859         if (flags & NDR_SET_VALUES) {
860                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
861         }
862         if (flags & NDR_IN) {
863                 ndr_print_struct(ndr, "in", "decode_login_info");
864                 ndr->depth++;
865                 ndr_print_PAC_LOGON_INFO(ndr, "logon_info", &r->in.logon_info);
866                 ndr->depth--;
867         }
868         if (flags & NDR_OUT) {
869                 ndr_print_struct(ndr, "out", "decode_login_info");
870                 ndr->depth++;
871                 ndr->depth--;
872         }
873         ndr->depth--;
874 }
875
876 static enum ndr_err_code ndr_push_decode_pac_validate(struct ndr_push *ndr, int flags, const struct decode_pac_validate *r)
877 {
878         if (flags & NDR_IN) {
879                 NDR_CHECK(ndr_push_PAC_Validate(ndr, NDR_SCALARS, &r->in.pac_validate));
880         }
881         if (flags & NDR_OUT) {
882         }
883         return NDR_ERR_SUCCESS;
884 }
885
886 static enum ndr_err_code ndr_pull_decode_pac_validate(struct ndr_pull *ndr, int flags, struct decode_pac_validate *r)
887 {
888         if (flags & NDR_IN) {
889                 NDR_CHECK(ndr_pull_PAC_Validate(ndr, NDR_SCALARS, &r->in.pac_validate));
890         }
891         if (flags & NDR_OUT) {
892         }
893         return NDR_ERR_SUCCESS;
894 }
895
896 _PUBLIC_ void ndr_print_decode_pac_validate(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac_validate *r)
897 {
898         ndr_print_struct(ndr, name, "decode_pac_validate");
899         ndr->depth++;
900         if (flags & NDR_SET_VALUES) {
901                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
902         }
903         if (flags & NDR_IN) {
904                 ndr_print_struct(ndr, "in", "decode_pac_validate");
905                 ndr->depth++;
906                 ndr_print_PAC_Validate(ndr, "pac_validate", &r->in.pac_validate);
907                 ndr->depth--;
908         }
909         if (flags & NDR_OUT) {
910                 ndr_print_struct(ndr, "out", "decode_pac_validate");
911                 ndr->depth++;
912                 ndr->depth--;
913         }
914         ndr->depth--;
915 }
916
917 static const struct ndr_interface_call krb5pac_calls[] = {
918         {
919                 "decode_pac",
920                 sizeof(struct decode_pac),
921                 (ndr_push_flags_fn_t) ndr_push_decode_pac,
922                 (ndr_pull_flags_fn_t) ndr_pull_decode_pac,
923                 (ndr_print_function_t) ndr_print_decode_pac,
924                 false,
925         },
926         {
927                 "decode_pac_raw",
928                 sizeof(struct decode_pac_raw),
929                 (ndr_push_flags_fn_t) ndr_push_decode_pac_raw,
930                 (ndr_pull_flags_fn_t) ndr_pull_decode_pac_raw,
931                 (ndr_print_function_t) ndr_print_decode_pac_raw,
932                 false,
933         },
934         {
935                 "decode_login_info",
936                 sizeof(struct decode_login_info),
937                 (ndr_push_flags_fn_t) ndr_push_decode_login_info,
938                 (ndr_pull_flags_fn_t) ndr_pull_decode_login_info,
939                 (ndr_print_function_t) ndr_print_decode_login_info,
940                 false,
941         },
942         {
943                 "decode_pac_validate",
944                 sizeof(struct decode_pac_validate),
945                 (ndr_push_flags_fn_t) ndr_push_decode_pac_validate,
946                 (ndr_pull_flags_fn_t) ndr_pull_decode_pac_validate,
947                 (ndr_print_function_t) ndr_print_decode_pac_validate,
948                 false,
949         },
950         { NULL, 0, NULL, NULL, NULL, false }
951 };
952
953 static const char * const krb5pac_endpoint_strings[] = {
954         "ncacn_np:[\\pipe\\krb5pac]", 
955 };
956
957 static const struct ndr_interface_string_array krb5pac_endpoints = {
958         .count  = 1,
959         .names  = krb5pac_endpoint_strings
960 };
961
962 static const char * const krb5pac_authservice_strings[] = {
963         "host", 
964 };
965
966 static const struct ndr_interface_string_array krb5pac_authservices = {
967         .count  = 1,
968         .names  = krb5pac_authservice_strings
969 };
970
971
972 const struct ndr_interface_table ndr_table_krb5pac = {
973         .name           = "krb5pac",
974         .syntax_id      = {
975                 {0x12345778,0x1234,0xabcd,{0x00,0x00},{0x00,0x00,0x00,0x00}},
976                 NDR_KRB5PAC_VERSION
977         },
978         .helpstring     = NDR_KRB5PAC_HELPSTRING,
979         .num_calls      = 4,
980         .calls          = krb5pac_calls,
981         .endpoints      = &krb5pac_endpoints,
982         .authservices   = &krb5pac_authservices
983 };
984