rerun 'make samba3-idl'
[samba.git] / librpc / gen_ndr / ndr_echo.c
1 /* parser auto-generated by pidl */
2
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_echo.h"
5
6 _PUBLIC_ enum ndr_err_code ndr_push_echo_info1(struct ndr_push *ndr, int ndr_flags, const struct echo_info1 *r)
7 {
8         if (ndr_flags & NDR_SCALARS) {
9                 NDR_CHECK(ndr_push_align(ndr, 1));
10                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->v));
11         }
12         if (ndr_flags & NDR_BUFFERS) {
13         }
14         return NDR_ERR_SUCCESS;
15 }
16
17 _PUBLIC_ enum ndr_err_code ndr_pull_echo_info1(struct ndr_pull *ndr, int ndr_flags, struct echo_info1 *r)
18 {
19         if (ndr_flags & NDR_SCALARS) {
20                 NDR_CHECK(ndr_pull_align(ndr, 1));
21                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->v));
22         }
23         if (ndr_flags & NDR_BUFFERS) {
24         }
25         return NDR_ERR_SUCCESS;
26 }
27
28 _PUBLIC_ void ndr_print_echo_info1(struct ndr_print *ndr, const char *name, const struct echo_info1 *r)
29 {
30         ndr_print_struct(ndr, name, "echo_info1");
31         ndr->depth++;
32         ndr_print_uint8(ndr, "v", r->v);
33         ndr->depth--;
34 }
35
36 static enum ndr_err_code ndr_push_echo_info2(struct ndr_push *ndr, int ndr_flags, const struct echo_info2 *r)
37 {
38         if (ndr_flags & NDR_SCALARS) {
39                 NDR_CHECK(ndr_push_align(ndr, 2));
40                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->v));
41         }
42         if (ndr_flags & NDR_BUFFERS) {
43         }
44         return NDR_ERR_SUCCESS;
45 }
46
47 static enum ndr_err_code ndr_pull_echo_info2(struct ndr_pull *ndr, int ndr_flags, struct echo_info2 *r)
48 {
49         if (ndr_flags & NDR_SCALARS) {
50                 NDR_CHECK(ndr_pull_align(ndr, 2));
51                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->v));
52         }
53         if (ndr_flags & NDR_BUFFERS) {
54         }
55         return NDR_ERR_SUCCESS;
56 }
57
58 _PUBLIC_ void ndr_print_echo_info2(struct ndr_print *ndr, const char *name, const struct echo_info2 *r)
59 {
60         ndr_print_struct(ndr, name, "echo_info2");
61         ndr->depth++;
62         ndr_print_uint16(ndr, "v", r->v);
63         ndr->depth--;
64 }
65
66 static enum ndr_err_code ndr_push_echo_info3(struct ndr_push *ndr, int ndr_flags, const struct echo_info3 *r)
67 {
68         if (ndr_flags & NDR_SCALARS) {
69                 NDR_CHECK(ndr_push_align(ndr, 4));
70                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->v));
71         }
72         if (ndr_flags & NDR_BUFFERS) {
73         }
74         return NDR_ERR_SUCCESS;
75 }
76
77 static enum ndr_err_code ndr_pull_echo_info3(struct ndr_pull *ndr, int ndr_flags, struct echo_info3 *r)
78 {
79         if (ndr_flags & NDR_SCALARS) {
80                 NDR_CHECK(ndr_pull_align(ndr, 4));
81                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->v));
82         }
83         if (ndr_flags & NDR_BUFFERS) {
84         }
85         return NDR_ERR_SUCCESS;
86 }
87
88 _PUBLIC_ void ndr_print_echo_info3(struct ndr_print *ndr, const char *name, const struct echo_info3 *r)
89 {
90         ndr_print_struct(ndr, name, "echo_info3");
91         ndr->depth++;
92         ndr_print_uint32(ndr, "v", r->v);
93         ndr->depth--;
94 }
95
96 static enum ndr_err_code ndr_push_STRUCT_echo_info4(struct ndr_push *ndr, int ndr_flags, const struct echo_info4 *r)
97 {
98         if (ndr_flags & NDR_SCALARS) {
99                 NDR_CHECK(ndr_push_align(ndr, 8));
100                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->v));
101         }
102         if (ndr_flags & NDR_BUFFERS) {
103         }
104         return NDR_ERR_SUCCESS;
105 }
106
107 static enum ndr_err_code ndr_pull_STRUCT_echo_info4(struct ndr_pull *ndr, int ndr_flags, struct echo_info4 *r)
108 {
109         if (ndr_flags & NDR_SCALARS) {
110                 NDR_CHECK(ndr_pull_align(ndr, 8));
111                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->v));
112         }
113         if (ndr_flags & NDR_BUFFERS) {
114         }
115         return NDR_ERR_SUCCESS;
116 }
117
118 _PUBLIC_ void ndr_print_STRUCT_echo_info4(struct ndr_print *ndr, const char *name, const struct echo_info4 *r)
119 {
120         ndr_print_struct(ndr, name, "echo_info4");
121         ndr->depth++;
122         ndr_print_hyper(ndr, "v", r->v);
123         ndr->depth--;
124 }
125
126 static enum ndr_err_code ndr_push_echo_info5(struct ndr_push *ndr, int ndr_flags, const struct echo_info5 *r)
127 {
128         if (ndr_flags & NDR_SCALARS) {
129                 NDR_CHECK(ndr_push_align(ndr, 8));
130                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->v1));
131                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->v2));
132         }
133         if (ndr_flags & NDR_BUFFERS) {
134         }
135         return NDR_ERR_SUCCESS;
136 }
137
138 static enum ndr_err_code ndr_pull_echo_info5(struct ndr_pull *ndr, int ndr_flags, struct echo_info5 *r)
139 {
140         if (ndr_flags & NDR_SCALARS) {
141                 NDR_CHECK(ndr_pull_align(ndr, 8));
142                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->v1));
143                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->v2));
144         }
145         if (ndr_flags & NDR_BUFFERS) {
146         }
147         return NDR_ERR_SUCCESS;
148 }
149
150 _PUBLIC_ void ndr_print_echo_info5(struct ndr_print *ndr, const char *name, const struct echo_info5 *r)
151 {
152         ndr_print_struct(ndr, name, "echo_info5");
153         ndr->depth++;
154         ndr_print_uint8(ndr, "v1", r->v1);
155         ndr_print_hyper(ndr, "v2", r->v2);
156         ndr->depth--;
157 }
158
159 static enum ndr_err_code ndr_push_echo_info6(struct ndr_push *ndr, int ndr_flags, const struct echo_info6 *r)
160 {
161         if (ndr_flags & NDR_SCALARS) {
162                 NDR_CHECK(ndr_push_align(ndr, 1));
163                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->v1));
164                 NDR_CHECK(ndr_push_echo_info1(ndr, NDR_SCALARS, &r->info1));
165         }
166         if (ndr_flags & NDR_BUFFERS) {
167         }
168         return NDR_ERR_SUCCESS;
169 }
170
171 static enum ndr_err_code ndr_pull_echo_info6(struct ndr_pull *ndr, int ndr_flags, struct echo_info6 *r)
172 {
173         if (ndr_flags & NDR_SCALARS) {
174                 NDR_CHECK(ndr_pull_align(ndr, 1));
175                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->v1));
176                 NDR_CHECK(ndr_pull_echo_info1(ndr, NDR_SCALARS, &r->info1));
177         }
178         if (ndr_flags & NDR_BUFFERS) {
179         }
180         return NDR_ERR_SUCCESS;
181 }
182
183 _PUBLIC_ void ndr_print_echo_info6(struct ndr_print *ndr, const char *name, const struct echo_info6 *r)
184 {
185         ndr_print_struct(ndr, name, "echo_info6");
186         ndr->depth++;
187         ndr_print_uint8(ndr, "v1", r->v1);
188         ndr_print_echo_info1(ndr, "info1", &r->info1);
189         ndr->depth--;
190 }
191
192 static enum ndr_err_code ndr_push_echo_info7(struct ndr_push *ndr, int ndr_flags, const struct echo_info7 *r)
193 {
194         if (ndr_flags & NDR_SCALARS) {
195                 NDR_CHECK(ndr_push_align(ndr, 8));
196                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->v1));
197                 NDR_CHECK(ndr_push_STRUCT_echo_info4(ndr, NDR_SCALARS, &r->info4));
198         }
199         if (ndr_flags & NDR_BUFFERS) {
200         }
201         return NDR_ERR_SUCCESS;
202 }
203
204 static enum ndr_err_code ndr_pull_echo_info7(struct ndr_pull *ndr, int ndr_flags, struct echo_info7 *r)
205 {
206         if (ndr_flags & NDR_SCALARS) {
207                 NDR_CHECK(ndr_pull_align(ndr, 8));
208                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->v1));
209                 NDR_CHECK(ndr_pull_STRUCT_echo_info4(ndr, NDR_SCALARS, &r->info4));
210         }
211         if (ndr_flags & NDR_BUFFERS) {
212         }
213         return NDR_ERR_SUCCESS;
214 }
215
216 _PUBLIC_ void ndr_print_echo_info7(struct ndr_print *ndr, const char *name, const struct echo_info7 *r)
217 {
218         ndr_print_struct(ndr, name, "echo_info7");
219         ndr->depth++;
220         ndr_print_uint8(ndr, "v1", r->v1);
221         ndr_print_STRUCT_echo_info4(ndr, "info4", &r->info4);
222         ndr->depth--;
223 }
224
225 static enum ndr_err_code ndr_push_echo_Info(struct ndr_push *ndr, int ndr_flags, const union echo_Info *r)
226 {
227         if (ndr_flags & NDR_SCALARS) {
228                 int level = ndr_push_get_switch_value(ndr, r);
229                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
230                 switch (level) {
231                         case 1: {
232                                 NDR_CHECK(ndr_push_echo_info1(ndr, NDR_SCALARS, &r->info1));
233                         break; }
234
235                         case 2: {
236                                 NDR_CHECK(ndr_push_echo_info2(ndr, NDR_SCALARS, &r->info2));
237                         break; }
238
239                         case 3: {
240                                 NDR_CHECK(ndr_push_echo_info3(ndr, NDR_SCALARS, &r->info3));
241                         break; }
242
243                         case 4: {
244                                 NDR_CHECK(ndr_push_STRUCT_echo_info4(ndr, NDR_SCALARS, &r->info4));
245                         break; }
246
247                         case 5: {
248                                 NDR_CHECK(ndr_push_echo_info5(ndr, NDR_SCALARS, &r->info5));
249                         break; }
250
251                         case 6: {
252                                 NDR_CHECK(ndr_push_echo_info6(ndr, NDR_SCALARS, &r->info6));
253                         break; }
254
255                         case 7: {
256                                 NDR_CHECK(ndr_push_echo_info7(ndr, NDR_SCALARS, &r->info7));
257                         break; }
258
259                         default:
260                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
261                 }
262         }
263         if (ndr_flags & NDR_BUFFERS) {
264                 int level = ndr_push_get_switch_value(ndr, r);
265                 switch (level) {
266                         case 1:
267                         break;
268
269                         case 2:
270                         break;
271
272                         case 3:
273                         break;
274
275                         case 4:
276                         break;
277
278                         case 5:
279                         break;
280
281                         case 6:
282                         break;
283
284                         case 7:
285                         break;
286
287                         default:
288                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
289                 }
290         }
291         return NDR_ERR_SUCCESS;
292 }
293
294 static enum ndr_err_code ndr_pull_echo_Info(struct ndr_pull *ndr, int ndr_flags, union echo_Info *r)
295 {
296         int level;
297         uint16_t _level;
298         level = ndr_pull_get_switch_value(ndr, r);
299         if (ndr_flags & NDR_SCALARS) {
300                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
301                 if (_level != level) {
302                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
303                 }
304                 switch (level) {
305                         case 1: {
306                                 NDR_CHECK(ndr_pull_echo_info1(ndr, NDR_SCALARS, &r->info1));
307                         break; }
308
309                         case 2: {
310                                 NDR_CHECK(ndr_pull_echo_info2(ndr, NDR_SCALARS, &r->info2));
311                         break; }
312
313                         case 3: {
314                                 NDR_CHECK(ndr_pull_echo_info3(ndr, NDR_SCALARS, &r->info3));
315                         break; }
316
317                         case 4: {
318                                 NDR_CHECK(ndr_pull_STRUCT_echo_info4(ndr, NDR_SCALARS, &r->info4));
319                         break; }
320
321                         case 5: {
322                                 NDR_CHECK(ndr_pull_echo_info5(ndr, NDR_SCALARS, &r->info5));
323                         break; }
324
325                         case 6: {
326                                 NDR_CHECK(ndr_pull_echo_info6(ndr, NDR_SCALARS, &r->info6));
327                         break; }
328
329                         case 7: {
330                                 NDR_CHECK(ndr_pull_echo_info7(ndr, NDR_SCALARS, &r->info7));
331                         break; }
332
333                         default:
334                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
335                 }
336         }
337         if (ndr_flags & NDR_BUFFERS) {
338                 switch (level) {
339                         case 1:
340                         break;
341
342                         case 2:
343                         break;
344
345                         case 3:
346                         break;
347
348                         case 4:
349                         break;
350
351                         case 5:
352                         break;
353
354                         case 6:
355                         break;
356
357                         case 7:
358                         break;
359
360                         default:
361                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
362                 }
363         }
364         return NDR_ERR_SUCCESS;
365 }
366
367 _PUBLIC_ void ndr_print_echo_Info(struct ndr_print *ndr, const char *name, const union echo_Info *r)
368 {
369         int level;
370         level = ndr_print_get_switch_value(ndr, r);
371         ndr_print_union(ndr, name, level, "echo_Info");
372         switch (level) {
373                 case 1:
374                         ndr_print_echo_info1(ndr, "info1", &r->info1);
375                 break;
376
377                 case 2:
378                         ndr_print_echo_info2(ndr, "info2", &r->info2);
379                 break;
380
381                 case 3:
382                         ndr_print_echo_info3(ndr, "info3", &r->info3);
383                 break;
384
385                 case 4:
386                         ndr_print_STRUCT_echo_info4(ndr, "info4", &r->info4);
387                 break;
388
389                 case 5:
390                         ndr_print_echo_info5(ndr, "info5", &r->info5);
391                 break;
392
393                 case 6:
394                         ndr_print_echo_info6(ndr, "info6", &r->info6);
395                 break;
396
397                 case 7:
398                         ndr_print_echo_info7(ndr, "info7", &r->info7);
399                 break;
400
401                 default:
402                         ndr_print_bad_level(ndr, name, level);
403         }
404 }
405
406 static enum ndr_err_code ndr_push_echo_Enum1(struct ndr_push *ndr, int ndr_flags, enum echo_Enum1 r)
407 {
408         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
409         return NDR_ERR_SUCCESS;
410 }
411
412 static enum ndr_err_code ndr_pull_echo_Enum1(struct ndr_pull *ndr, int ndr_flags, enum echo_Enum1 *r)
413 {
414         uint16_t v;
415         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
416         *r = v;
417         return NDR_ERR_SUCCESS;
418 }
419
420 _PUBLIC_ void ndr_print_echo_Enum1(struct ndr_print *ndr, const char *name, enum echo_Enum1 r)
421 {
422         const char *val = NULL;
423
424         switch (r) {
425                 case ECHO_ENUM1: val = "ECHO_ENUM1"; break;
426                 case ECHO_ENUM2: val = "ECHO_ENUM2"; break;
427         }
428         ndr_print_enum(ndr, name, "ENUM", val, r);
429 }
430
431 static enum ndr_err_code ndr_push_echo_Enum1_32(struct ndr_push *ndr, int ndr_flags, enum echo_Enum1_32 r)
432 {
433         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
434         return NDR_ERR_SUCCESS;
435 }
436
437 static enum ndr_err_code ndr_pull_echo_Enum1_32(struct ndr_pull *ndr, int ndr_flags, enum echo_Enum1_32 *r)
438 {
439         uint32_t v;
440         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
441         *r = v;
442         return NDR_ERR_SUCCESS;
443 }
444
445 _PUBLIC_ void ndr_print_echo_Enum1_32(struct ndr_print *ndr, const char *name, enum echo_Enum1_32 r)
446 {
447         const char *val = NULL;
448
449         switch (r) {
450                 case ECHO_ENUM1_32: val = "ECHO_ENUM1_32"; break;
451                 case ECHO_ENUM2_32: val = "ECHO_ENUM2_32"; break;
452         }
453         ndr_print_enum(ndr, name, "ENUM", val, r);
454 }
455
456 static enum ndr_err_code ndr_push_echo_Enum2(struct ndr_push *ndr, int ndr_flags, const struct echo_Enum2 *r)
457 {
458         if (ndr_flags & NDR_SCALARS) {
459                 NDR_CHECK(ndr_push_align(ndr, 4));
460                 NDR_CHECK(ndr_push_echo_Enum1(ndr, NDR_SCALARS, r->e1));
461                 NDR_CHECK(ndr_push_echo_Enum1_32(ndr, NDR_SCALARS, r->e2));
462         }
463         if (ndr_flags & NDR_BUFFERS) {
464         }
465         return NDR_ERR_SUCCESS;
466 }
467
468 static enum ndr_err_code ndr_pull_echo_Enum2(struct ndr_pull *ndr, int ndr_flags, struct echo_Enum2 *r)
469 {
470         if (ndr_flags & NDR_SCALARS) {
471                 NDR_CHECK(ndr_pull_align(ndr, 4));
472                 NDR_CHECK(ndr_pull_echo_Enum1(ndr, NDR_SCALARS, &r->e1));
473                 NDR_CHECK(ndr_pull_echo_Enum1_32(ndr, NDR_SCALARS, &r->e2));
474         }
475         if (ndr_flags & NDR_BUFFERS) {
476         }
477         return NDR_ERR_SUCCESS;
478 }
479
480 _PUBLIC_ void ndr_print_echo_Enum2(struct ndr_print *ndr, const char *name, const struct echo_Enum2 *r)
481 {
482         ndr_print_struct(ndr, name, "echo_Enum2");
483         ndr->depth++;
484         ndr_print_echo_Enum1(ndr, "e1", r->e1);
485         ndr_print_echo_Enum1_32(ndr, "e2", r->e2);
486         ndr->depth--;
487 }
488
489 static enum ndr_err_code ndr_push_echo_Enum3(struct ndr_push *ndr, int ndr_flags, const union echo_Enum3 *r)
490 {
491         if (ndr_flags & NDR_SCALARS) {
492                 int level = ndr_push_get_switch_value(ndr, r);
493                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
494                 switch (level) {
495                         case ECHO_ENUM1: {
496                                 NDR_CHECK(ndr_push_echo_Enum1(ndr, NDR_SCALARS, r->e1));
497                         break; }
498
499                         case ECHO_ENUM2: {
500                                 NDR_CHECK(ndr_push_echo_Enum2(ndr, NDR_SCALARS, &r->e2));
501                         break; }
502
503                         default:
504                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
505                 }
506         }
507         if (ndr_flags & NDR_BUFFERS) {
508                 int level = ndr_push_get_switch_value(ndr, r);
509                 switch (level) {
510                         case ECHO_ENUM1:
511                         break;
512
513                         case ECHO_ENUM2:
514                         break;
515
516                         default:
517                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
518                 }
519         }
520         return NDR_ERR_SUCCESS;
521 }
522
523 static enum ndr_err_code ndr_pull_echo_Enum3(struct ndr_pull *ndr, int ndr_flags, union echo_Enum3 *r)
524 {
525         int level;
526         uint16_t _level;
527         level = ndr_pull_get_switch_value(ndr, r);
528         if (ndr_flags & NDR_SCALARS) {
529                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
530                 if (_level != level) {
531                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
532                 }
533                 switch (level) {
534                         case ECHO_ENUM1: {
535                                 NDR_CHECK(ndr_pull_echo_Enum1(ndr, NDR_SCALARS, &r->e1));
536                         break; }
537
538                         case ECHO_ENUM2: {
539                                 NDR_CHECK(ndr_pull_echo_Enum2(ndr, NDR_SCALARS, &r->e2));
540                         break; }
541
542                         default:
543                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
544                 }
545         }
546         if (ndr_flags & NDR_BUFFERS) {
547                 switch (level) {
548                         case ECHO_ENUM1:
549                         break;
550
551                         case ECHO_ENUM2:
552                         break;
553
554                         default:
555                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
556                 }
557         }
558         return NDR_ERR_SUCCESS;
559 }
560
561 _PUBLIC_ void ndr_print_echo_Enum3(struct ndr_print *ndr, const char *name, const union echo_Enum3 *r)
562 {
563         int level;
564         level = ndr_print_get_switch_value(ndr, r);
565         ndr_print_union(ndr, name, level, "echo_Enum3");
566         switch (level) {
567                 case ECHO_ENUM1:
568                         ndr_print_echo_Enum1(ndr, "e1", r->e1);
569                 break;
570
571                 case ECHO_ENUM2:
572                         ndr_print_echo_Enum2(ndr, "e2", &r->e2);
573                 break;
574
575                 default:
576                         ndr_print_bad_level(ndr, name, level);
577         }
578 }
579
580 static enum ndr_err_code ndr_push_echo_Surrounding(struct ndr_push *ndr, int ndr_flags, const struct echo_Surrounding *r)
581 {
582         uint32_t cntr_surrounding_0;
583         if (ndr_flags & NDR_SCALARS) {
584                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->x));
585                 NDR_CHECK(ndr_push_align(ndr, 4));
586                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->x));
587                 for (cntr_surrounding_0 = 0; cntr_surrounding_0 < r->x; cntr_surrounding_0++) {
588                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->surrounding[cntr_surrounding_0]));
589                 }
590         }
591         if (ndr_flags & NDR_BUFFERS) {
592         }
593         return NDR_ERR_SUCCESS;
594 }
595
596 static enum ndr_err_code ndr_pull_echo_Surrounding(struct ndr_pull *ndr, int ndr_flags, struct echo_Surrounding *r)
597 {
598         uint32_t size_surrounding_0 = 0;
599         uint32_t cntr_surrounding_0;
600         TALLOC_CTX *_mem_save_surrounding_0;
601         if (ndr_flags & NDR_SCALARS) {
602                 NDR_CHECK(ndr_pull_array_size(ndr, &r->surrounding));
603                 NDR_CHECK(ndr_pull_align(ndr, 4));
604                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->x));
605                 size_surrounding_0 = ndr_get_array_size(ndr, &r->surrounding);
606                 NDR_PULL_ALLOC_N(ndr, r->surrounding, size_surrounding_0);
607                 _mem_save_surrounding_0 = NDR_PULL_GET_MEM_CTX(ndr);
608                 NDR_PULL_SET_MEM_CTX(ndr, r->surrounding, 0);
609                 for (cntr_surrounding_0 = 0; cntr_surrounding_0 < size_surrounding_0; cntr_surrounding_0++) {
610                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->surrounding[cntr_surrounding_0]));
611                 }
612                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_surrounding_0, 0);
613                 if (r->surrounding) {
614                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->surrounding, r->x));
615                 }
616         }
617         if (ndr_flags & NDR_BUFFERS) {
618         }
619         return NDR_ERR_SUCCESS;
620 }
621
622 _PUBLIC_ void ndr_print_echo_Surrounding(struct ndr_print *ndr, const char *name, const struct echo_Surrounding *r)
623 {
624         uint32_t cntr_surrounding_0;
625         ndr_print_struct(ndr, name, "echo_Surrounding");
626         ndr->depth++;
627         ndr_print_uint32(ndr, "x", r->x);
628         ndr->print(ndr, "%s: ARRAY(%d)", "surrounding", (int)r->x);
629         ndr->depth++;
630         for (cntr_surrounding_0=0;cntr_surrounding_0<r->x;cntr_surrounding_0++) {
631                 char *idx_0=NULL;
632                 if (asprintf(&idx_0, "[%d]", cntr_surrounding_0) != -1) {
633                         ndr_print_uint16(ndr, "surrounding", r->surrounding[cntr_surrounding_0]);
634                         free(idx_0);
635                 }
636         }
637         ndr->depth--;
638         ndr->depth--;
639 }
640
641 static enum ndr_err_code ndr_push_echo_AddOne(struct ndr_push *ndr, int flags, const struct echo_AddOne *r)
642 {
643         if (flags & NDR_IN) {
644                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.in_data));
645         }
646         if (flags & NDR_OUT) {
647                 if (r->out.out_data == NULL) {
648                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
649                 }
650                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.out_data));
651         }
652         return NDR_ERR_SUCCESS;
653 }
654
655 static enum ndr_err_code ndr_pull_echo_AddOne(struct ndr_pull *ndr, int flags, struct echo_AddOne *r)
656 {
657         TALLOC_CTX *_mem_save_out_data_0;
658         if (flags & NDR_IN) {
659                 ZERO_STRUCT(r->out);
660
661                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.in_data));
662                 NDR_PULL_ALLOC(ndr, r->out.out_data);
663                 ZERO_STRUCTP(r->out.out_data);
664         }
665         if (flags & NDR_OUT) {
666                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
667                         NDR_PULL_ALLOC(ndr, r->out.out_data);
668                 }
669                 _mem_save_out_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
670                 NDR_PULL_SET_MEM_CTX(ndr, r->out.out_data, LIBNDR_FLAG_REF_ALLOC);
671                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.out_data));
672                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_out_data_0, LIBNDR_FLAG_REF_ALLOC);
673         }
674         return NDR_ERR_SUCCESS;
675 }
676
677 _PUBLIC_ void ndr_print_echo_AddOne(struct ndr_print *ndr, const char *name, int flags, const struct echo_AddOne *r)
678 {
679         ndr_print_struct(ndr, name, "echo_AddOne");
680         ndr->depth++;
681         if (flags & NDR_SET_VALUES) {
682                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
683         }
684         if (flags & NDR_IN) {
685                 ndr_print_struct(ndr, "in", "echo_AddOne");
686                 ndr->depth++;
687                 ndr_print_uint32(ndr, "in_data", r->in.in_data);
688                 ndr->depth--;
689         }
690         if (flags & NDR_OUT) {
691                 ndr_print_struct(ndr, "out", "echo_AddOne");
692                 ndr->depth++;
693                 ndr_print_ptr(ndr, "out_data", r->out.out_data);
694                 ndr->depth++;
695                 ndr_print_uint32(ndr, "out_data", *r->out.out_data);
696                 ndr->depth--;
697                 ndr->depth--;
698         }
699         ndr->depth--;
700 }
701
702 static enum ndr_err_code ndr_push_echo_EchoData(struct ndr_push *ndr, int flags, const struct echo_EchoData *r)
703 {
704         if (flags & NDR_IN) {
705                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.len));
706                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.len));
707                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.in_data, r->in.len));
708         }
709         if (flags & NDR_OUT) {
710                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.len));
711                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.out_data, r->in.len));
712         }
713         return NDR_ERR_SUCCESS;
714 }
715
716 static enum ndr_err_code ndr_pull_echo_EchoData(struct ndr_pull *ndr, int flags, struct echo_EchoData *r)
717 {
718         uint32_t size_in_data_0 = 0;
719         uint32_t size_out_data_0 = 0;
720         if (flags & NDR_IN) {
721                 ZERO_STRUCT(r->out);
722
723                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.len));
724                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.in_data));
725                 size_in_data_0 = ndr_get_array_size(ndr, &r->in.in_data);
726                 NDR_PULL_ALLOC_N(ndr, r->in.in_data, size_in_data_0);
727                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.in_data, size_in_data_0));
728                 if (r->in.in_data) {
729                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.in_data, r->in.len));
730                 }
731         }
732         if (flags & NDR_OUT) {
733                 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.out_data));
734                 size_out_data_0 = ndr_get_array_size(ndr, &r->out.out_data);
735                 NDR_PULL_ALLOC_N(ndr, r->out.out_data, size_out_data_0);
736                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.out_data, size_out_data_0));
737                 if (r->out.out_data) {
738                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.out_data, r->in.len));
739                 }
740         }
741         return NDR_ERR_SUCCESS;
742 }
743
744 _PUBLIC_ void ndr_print_echo_EchoData(struct ndr_print *ndr, const char *name, int flags, const struct echo_EchoData *r)
745 {
746         ndr_print_struct(ndr, name, "echo_EchoData");
747         ndr->depth++;
748         if (flags & NDR_SET_VALUES) {
749                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
750         }
751         if (flags & NDR_IN) {
752                 ndr_print_struct(ndr, "in", "echo_EchoData");
753                 ndr->depth++;
754                 ndr_print_uint32(ndr, "len", r->in.len);
755                 ndr_print_array_uint8(ndr, "in_data", r->in.in_data, r->in.len);
756                 ndr->depth--;
757         }
758         if (flags & NDR_OUT) {
759                 ndr_print_struct(ndr, "out", "echo_EchoData");
760                 ndr->depth++;
761                 ndr_print_array_uint8(ndr, "out_data", r->out.out_data, r->in.len);
762                 ndr->depth--;
763         }
764         ndr->depth--;
765 }
766
767 static enum ndr_err_code ndr_push_echo_SinkData(struct ndr_push *ndr, int flags, const struct echo_SinkData *r)
768 {
769         if (flags & NDR_IN) {
770                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.len));
771                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.len));
772                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.len));
773         }
774         if (flags & NDR_OUT) {
775         }
776         return NDR_ERR_SUCCESS;
777 }
778
779 static enum ndr_err_code ndr_pull_echo_SinkData(struct ndr_pull *ndr, int flags, struct echo_SinkData *r)
780 {
781         uint32_t size_data_0 = 0;
782         if (flags & NDR_IN) {
783                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.len));
784                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
785                 size_data_0 = ndr_get_array_size(ndr, &r->in.data);
786                 NDR_PULL_ALLOC_N(ndr, r->in.data, size_data_0);
787                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, size_data_0));
788                 if (r->in.data) {
789                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, r->in.len));
790                 }
791         }
792         if (flags & NDR_OUT) {
793         }
794         return NDR_ERR_SUCCESS;
795 }
796
797 _PUBLIC_ void ndr_print_echo_SinkData(struct ndr_print *ndr, const char *name, int flags, const struct echo_SinkData *r)
798 {
799         ndr_print_struct(ndr, name, "echo_SinkData");
800         ndr->depth++;
801         if (flags & NDR_SET_VALUES) {
802                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
803         }
804         if (flags & NDR_IN) {
805                 ndr_print_struct(ndr, "in", "echo_SinkData");
806                 ndr->depth++;
807                 ndr_print_uint32(ndr, "len", r->in.len);
808                 ndr_print_array_uint8(ndr, "data", r->in.data, r->in.len);
809                 ndr->depth--;
810         }
811         if (flags & NDR_OUT) {
812                 ndr_print_struct(ndr, "out", "echo_SinkData");
813                 ndr->depth++;
814                 ndr->depth--;
815         }
816         ndr->depth--;
817 }
818
819 static enum ndr_err_code ndr_push_echo_SourceData(struct ndr_push *ndr, int flags, const struct echo_SourceData *r)
820 {
821         if (flags & NDR_IN) {
822                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.len));
823         }
824         if (flags & NDR_OUT) {
825                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.len));
826                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, r->in.len));
827         }
828         return NDR_ERR_SUCCESS;
829 }
830
831 static enum ndr_err_code ndr_pull_echo_SourceData(struct ndr_pull *ndr, int flags, struct echo_SourceData *r)
832 {
833         uint32_t size_data_0 = 0;
834         if (flags & NDR_IN) {
835                 ZERO_STRUCT(r->out);
836
837                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.len));
838         }
839         if (flags & NDR_OUT) {
840                 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.data));
841                 size_data_0 = ndr_get_array_size(ndr, &r->out.data);
842                 NDR_PULL_ALLOC_N(ndr, r->out.data, size_data_0);
843                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, size_data_0));
844                 if (r->out.data) {
845                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.data, r->in.len));
846                 }
847         }
848         return NDR_ERR_SUCCESS;
849 }
850
851 _PUBLIC_ void ndr_print_echo_SourceData(struct ndr_print *ndr, const char *name, int flags, const struct echo_SourceData *r)
852 {
853         ndr_print_struct(ndr, name, "echo_SourceData");
854         ndr->depth++;
855         if (flags & NDR_SET_VALUES) {
856                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
857         }
858         if (flags & NDR_IN) {
859                 ndr_print_struct(ndr, "in", "echo_SourceData");
860                 ndr->depth++;
861                 ndr_print_uint32(ndr, "len", r->in.len);
862                 ndr->depth--;
863         }
864         if (flags & NDR_OUT) {
865                 ndr_print_struct(ndr, "out", "echo_SourceData");
866                 ndr->depth++;
867                 ndr_print_array_uint8(ndr, "data", r->out.data, r->in.len);
868                 ndr->depth--;
869         }
870         ndr->depth--;
871 }
872
873 static enum ndr_err_code ndr_push_echo_TestCall(struct ndr_push *ndr, int flags, const struct echo_TestCall *r)
874 {
875         if (flags & NDR_IN) {
876                 if (r->in.s1 == NULL) {
877                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
878                 }
879                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.s1, CH_UTF16)));
880                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
881                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.s1, CH_UTF16)));
882                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.s1, ndr_charset_length(r->in.s1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
883         }
884         if (flags & NDR_OUT) {
885                 if (r->out.s2 == NULL) {
886                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
887                 }
888                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.s2));
889                 if (*r->out.s2) {
890                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.s2, CH_UTF16)));
891                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
892                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.s2, CH_UTF16)));
893                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.s2, ndr_charset_length(*r->out.s2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
894                 }
895         }
896         return NDR_ERR_SUCCESS;
897 }
898
899 static enum ndr_err_code ndr_pull_echo_TestCall(struct ndr_pull *ndr, int flags, struct echo_TestCall *r)
900 {
901         uint32_t size_s1_1 = 0;
902         uint32_t length_s1_1 = 0;
903         uint32_t _ptr_s2;
904         uint32_t size_s2_2 = 0;
905         uint32_t length_s2_2 = 0;
906         TALLOC_CTX *_mem_save_s2_0;
907         TALLOC_CTX *_mem_save_s2_1;
908         if (flags & NDR_IN) {
909                 ZERO_STRUCT(r->out);
910
911                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.s1));
912                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.s1));
913                 size_s1_1 = ndr_get_array_size(ndr, &r->in.s1);
914                 length_s1_1 = ndr_get_array_length(ndr, &r->in.s1);
915                 if (length_s1_1 > size_s1_1) {
916                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_s1_1, length_s1_1);
917                 }
918                 NDR_CHECK(ndr_check_string_terminator(ndr, length_s1_1, sizeof(uint16_t)));
919                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.s1, length_s1_1, sizeof(uint16_t), CH_UTF16));
920                 NDR_PULL_ALLOC(ndr, r->out.s2);
921                 ZERO_STRUCTP(r->out.s2);
922         }
923         if (flags & NDR_OUT) {
924                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
925                         NDR_PULL_ALLOC(ndr, r->out.s2);
926                 }
927                 _mem_save_s2_0 = NDR_PULL_GET_MEM_CTX(ndr);
928                 NDR_PULL_SET_MEM_CTX(ndr, r->out.s2, LIBNDR_FLAG_REF_ALLOC);
929                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s2));
930                 if (_ptr_s2) {
931                         NDR_PULL_ALLOC(ndr, *r->out.s2);
932                 } else {
933                         *r->out.s2 = NULL;
934                 }
935                 if (*r->out.s2) {
936                         _mem_save_s2_1 = NDR_PULL_GET_MEM_CTX(ndr);
937                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.s2, 0);
938                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.s2));
939                         NDR_CHECK(ndr_pull_array_length(ndr, r->out.s2));
940                         size_s2_2 = ndr_get_array_size(ndr, r->out.s2);
941                         length_s2_2 = ndr_get_array_length(ndr, r->out.s2);
942                         if (length_s2_2 > size_s2_2) {
943                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_s2_2, length_s2_2);
944                         }
945                         NDR_CHECK(ndr_check_string_terminator(ndr, length_s2_2, sizeof(uint16_t)));
946                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.s2, length_s2_2, sizeof(uint16_t), CH_UTF16));
947                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s2_1, 0);
948                 }
949                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s2_0, LIBNDR_FLAG_REF_ALLOC);
950         }
951         return NDR_ERR_SUCCESS;
952 }
953
954 _PUBLIC_ void ndr_print_echo_TestCall(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestCall *r)
955 {
956         ndr_print_struct(ndr, name, "echo_TestCall");
957         ndr->depth++;
958         if (flags & NDR_SET_VALUES) {
959                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
960         }
961         if (flags & NDR_IN) {
962                 ndr_print_struct(ndr, "in", "echo_TestCall");
963                 ndr->depth++;
964                 ndr_print_ptr(ndr, "s1", r->in.s1);
965                 ndr->depth++;
966                 ndr_print_string(ndr, "s1", r->in.s1);
967                 ndr->depth--;
968                 ndr->depth--;
969         }
970         if (flags & NDR_OUT) {
971                 ndr_print_struct(ndr, "out", "echo_TestCall");
972                 ndr->depth++;
973                 ndr_print_ptr(ndr, "s2", r->out.s2);
974                 ndr->depth++;
975                 ndr_print_ptr(ndr, "s2", *r->out.s2);
976                 ndr->depth++;
977                 if (*r->out.s2) {
978                         ndr_print_string(ndr, "s2", *r->out.s2);
979                 }
980                 ndr->depth--;
981                 ndr->depth--;
982                 ndr->depth--;
983         }
984         ndr->depth--;
985 }
986
987 static enum ndr_err_code ndr_push_echo_TestCall2(struct ndr_push *ndr, int flags, const struct echo_TestCall2 *r)
988 {
989         if (flags & NDR_IN) {
990                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
991         }
992         if (flags & NDR_OUT) {
993                 if (r->out.info == NULL) {
994                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
995                 }
996                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
997                 NDR_CHECK(ndr_push_echo_Info(ndr, NDR_SCALARS, r->out.info));
998                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
999         }
1000         return NDR_ERR_SUCCESS;
1001 }
1002
1003 static enum ndr_err_code ndr_pull_echo_TestCall2(struct ndr_pull *ndr, int flags, struct echo_TestCall2 *r)
1004 {
1005         TALLOC_CTX *_mem_save_info_0;
1006         if (flags & NDR_IN) {
1007                 ZERO_STRUCT(r->out);
1008
1009                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
1010                 NDR_PULL_ALLOC(ndr, r->out.info);
1011                 ZERO_STRUCTP(r->out.info);
1012         }
1013         if (flags & NDR_OUT) {
1014                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1015                         NDR_PULL_ALLOC(ndr, r->out.info);
1016                 }
1017                 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
1018                 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
1019                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
1020                 NDR_CHECK(ndr_pull_echo_Info(ndr, NDR_SCALARS, r->out.info));
1021                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
1022                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1023         }
1024         return NDR_ERR_SUCCESS;
1025 }
1026
1027 _PUBLIC_ void ndr_print_echo_TestCall2(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestCall2 *r)
1028 {
1029         ndr_print_struct(ndr, name, "echo_TestCall2");
1030         ndr->depth++;
1031         if (flags & NDR_SET_VALUES) {
1032                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1033         }
1034         if (flags & NDR_IN) {
1035                 ndr_print_struct(ndr, "in", "echo_TestCall2");
1036                 ndr->depth++;
1037                 ndr_print_uint16(ndr, "level", r->in.level);
1038                 ndr->depth--;
1039         }
1040         if (flags & NDR_OUT) {
1041                 ndr_print_struct(ndr, "out", "echo_TestCall2");
1042                 ndr->depth++;
1043                 ndr_print_ptr(ndr, "info", r->out.info);
1044                 ndr->depth++;
1045                 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
1046                 ndr_print_echo_Info(ndr, "info", r->out.info);
1047                 ndr->depth--;
1048                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1049                 ndr->depth--;
1050         }
1051         ndr->depth--;
1052 }
1053
1054 static enum ndr_err_code ndr_push_echo_TestSleep(struct ndr_push *ndr, int flags, const struct echo_TestSleep *r)
1055 {
1056         if (flags & NDR_IN) {
1057                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.seconds));
1058         }
1059         if (flags & NDR_OUT) {
1060                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
1061         }
1062         return NDR_ERR_SUCCESS;
1063 }
1064
1065 static enum ndr_err_code ndr_pull_echo_TestSleep(struct ndr_pull *ndr, int flags, struct echo_TestSleep *r)
1066 {
1067         if (flags & NDR_IN) {
1068                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.seconds));
1069         }
1070         if (flags & NDR_OUT) {
1071                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
1072         }
1073         return NDR_ERR_SUCCESS;
1074 }
1075
1076 _PUBLIC_ void ndr_print_echo_TestSleep(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestSleep *r)
1077 {
1078         ndr_print_struct(ndr, name, "echo_TestSleep");
1079         ndr->depth++;
1080         if (flags & NDR_SET_VALUES) {
1081                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1082         }
1083         if (flags & NDR_IN) {
1084                 ndr_print_struct(ndr, "in", "echo_TestSleep");
1085                 ndr->depth++;
1086                 ndr_print_uint32(ndr, "seconds", r->in.seconds);
1087                 ndr->depth--;
1088         }
1089         if (flags & NDR_OUT) {
1090                 ndr_print_struct(ndr, "out", "echo_TestSleep");
1091                 ndr->depth++;
1092                 ndr_print_uint32(ndr, "result", r->out.result);
1093                 ndr->depth--;
1094         }
1095         ndr->depth--;
1096 }
1097
1098 static enum ndr_err_code ndr_push_echo_TestEnum(struct ndr_push *ndr, int flags, const struct echo_TestEnum *r)
1099 {
1100         if (flags & NDR_IN) {
1101                 if (r->in.foo1 == NULL) {
1102                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1103                 }
1104                 NDR_CHECK(ndr_push_echo_Enum1(ndr, NDR_SCALARS, *r->in.foo1));
1105                 if (r->in.foo2 == NULL) {
1106                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1107                 }
1108                 NDR_CHECK(ndr_push_echo_Enum2(ndr, NDR_SCALARS, r->in.foo2));
1109                 if (r->in.foo3 == NULL) {
1110                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1111                 }
1112                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.foo3, *r->in.foo1));
1113                 NDR_CHECK(ndr_push_echo_Enum3(ndr, NDR_SCALARS, r->in.foo3));
1114         }
1115         if (flags & NDR_OUT) {
1116                 if (r->out.foo1 == NULL) {
1117                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1118                 }
1119                 NDR_CHECK(ndr_push_echo_Enum1(ndr, NDR_SCALARS, *r->out.foo1));
1120                 if (r->out.foo2 == NULL) {
1121                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1122                 }
1123                 NDR_CHECK(ndr_push_echo_Enum2(ndr, NDR_SCALARS, r->out.foo2));
1124                 if (r->out.foo3 == NULL) {
1125                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1126                 }
1127                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.foo3, *r->out.foo1));
1128                 NDR_CHECK(ndr_push_echo_Enum3(ndr, NDR_SCALARS, r->out.foo3));
1129         }
1130         return NDR_ERR_SUCCESS;
1131 }
1132
1133 static enum ndr_err_code ndr_pull_echo_TestEnum(struct ndr_pull *ndr, int flags, struct echo_TestEnum *r)
1134 {
1135         TALLOC_CTX *_mem_save_foo1_0;
1136         TALLOC_CTX *_mem_save_foo2_0;
1137         TALLOC_CTX *_mem_save_foo3_0;
1138         if (flags & NDR_IN) {
1139                 ZERO_STRUCT(r->out);
1140
1141                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1142                         NDR_PULL_ALLOC(ndr, r->in.foo1);
1143                 }
1144                 _mem_save_foo1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1145                 NDR_PULL_SET_MEM_CTX(ndr, r->in.foo1, LIBNDR_FLAG_REF_ALLOC);
1146                 NDR_CHECK(ndr_pull_echo_Enum1(ndr, NDR_SCALARS, r->in.foo1));
1147                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo1_0, LIBNDR_FLAG_REF_ALLOC);
1148                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1149                         NDR_PULL_ALLOC(ndr, r->in.foo2);
1150                 }
1151                 _mem_save_foo2_0 = NDR_PULL_GET_MEM_CTX(ndr);
1152                 NDR_PULL_SET_MEM_CTX(ndr, r->in.foo2, LIBNDR_FLAG_REF_ALLOC);
1153                 NDR_CHECK(ndr_pull_echo_Enum2(ndr, NDR_SCALARS, r->in.foo2));
1154                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo2_0, LIBNDR_FLAG_REF_ALLOC);
1155                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1156                         NDR_PULL_ALLOC(ndr, r->in.foo3);
1157                 }
1158                 _mem_save_foo3_0 = NDR_PULL_GET_MEM_CTX(ndr);
1159                 NDR_PULL_SET_MEM_CTX(ndr, r->in.foo3, LIBNDR_FLAG_REF_ALLOC);
1160                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.foo3, *r->in.foo1));
1161                 NDR_CHECK(ndr_pull_echo_Enum3(ndr, NDR_SCALARS, r->in.foo3));
1162                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo3_0, LIBNDR_FLAG_REF_ALLOC);
1163                 NDR_PULL_ALLOC(ndr, r->out.foo1);
1164                 *r->out.foo1 = *r->in.foo1;
1165                 NDR_PULL_ALLOC(ndr, r->out.foo2);
1166                 *r->out.foo2 = *r->in.foo2;
1167                 NDR_PULL_ALLOC(ndr, r->out.foo3);
1168                 *r->out.foo3 = *r->in.foo3;
1169         }
1170         if (flags & NDR_OUT) {
1171                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1172                         NDR_PULL_ALLOC(ndr, r->out.foo1);
1173                 }
1174                 _mem_save_foo1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1175                 NDR_PULL_SET_MEM_CTX(ndr, r->out.foo1, LIBNDR_FLAG_REF_ALLOC);
1176                 NDR_CHECK(ndr_pull_echo_Enum1(ndr, NDR_SCALARS, r->out.foo1));
1177                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo1_0, LIBNDR_FLAG_REF_ALLOC);
1178                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1179                         NDR_PULL_ALLOC(ndr, r->out.foo2);
1180                 }
1181                 _mem_save_foo2_0 = NDR_PULL_GET_MEM_CTX(ndr);
1182                 NDR_PULL_SET_MEM_CTX(ndr, r->out.foo2, LIBNDR_FLAG_REF_ALLOC);
1183                 NDR_CHECK(ndr_pull_echo_Enum2(ndr, NDR_SCALARS, r->out.foo2));
1184                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo2_0, LIBNDR_FLAG_REF_ALLOC);
1185                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1186                         NDR_PULL_ALLOC(ndr, r->out.foo3);
1187                 }
1188                 _mem_save_foo3_0 = NDR_PULL_GET_MEM_CTX(ndr);
1189                 NDR_PULL_SET_MEM_CTX(ndr, r->out.foo3, LIBNDR_FLAG_REF_ALLOC);
1190                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.foo3, *r->out.foo1));
1191                 NDR_CHECK(ndr_pull_echo_Enum3(ndr, NDR_SCALARS, r->out.foo3));
1192                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo3_0, LIBNDR_FLAG_REF_ALLOC);
1193         }
1194         return NDR_ERR_SUCCESS;
1195 }
1196
1197 _PUBLIC_ void ndr_print_echo_TestEnum(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestEnum *r)
1198 {
1199         ndr_print_struct(ndr, name, "echo_TestEnum");
1200         ndr->depth++;
1201         if (flags & NDR_SET_VALUES) {
1202                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1203         }
1204         if (flags & NDR_IN) {
1205                 ndr_print_struct(ndr, "in", "echo_TestEnum");
1206                 ndr->depth++;
1207                 ndr_print_ptr(ndr, "foo1", r->in.foo1);
1208                 ndr->depth++;
1209                 ndr_print_echo_Enum1(ndr, "foo1", *r->in.foo1);
1210                 ndr->depth--;
1211                 ndr_print_ptr(ndr, "foo2", r->in.foo2);
1212                 ndr->depth++;
1213                 ndr_print_echo_Enum2(ndr, "foo2", r->in.foo2);
1214                 ndr->depth--;
1215                 ndr_print_ptr(ndr, "foo3", r->in.foo3);
1216                 ndr->depth++;
1217                 ndr_print_set_switch_value(ndr, r->in.foo3, *r->in.foo1);
1218                 ndr_print_echo_Enum3(ndr, "foo3", r->in.foo3);
1219                 ndr->depth--;
1220                 ndr->depth--;
1221         }
1222         if (flags & NDR_OUT) {
1223                 ndr_print_struct(ndr, "out", "echo_TestEnum");
1224                 ndr->depth++;
1225                 ndr_print_ptr(ndr, "foo1", r->out.foo1);
1226                 ndr->depth++;
1227                 ndr_print_echo_Enum1(ndr, "foo1", *r->out.foo1);
1228                 ndr->depth--;
1229                 ndr_print_ptr(ndr, "foo2", r->out.foo2);
1230                 ndr->depth++;
1231                 ndr_print_echo_Enum2(ndr, "foo2", r->out.foo2);
1232                 ndr->depth--;
1233                 ndr_print_ptr(ndr, "foo3", r->out.foo3);
1234                 ndr->depth++;
1235                 ndr_print_set_switch_value(ndr, r->out.foo3, *r->out.foo1);
1236                 ndr_print_echo_Enum3(ndr, "foo3", r->out.foo3);
1237                 ndr->depth--;
1238                 ndr->depth--;
1239         }
1240         ndr->depth--;
1241 }
1242
1243 static enum ndr_err_code ndr_push_echo_TestSurrounding(struct ndr_push *ndr, int flags, const struct echo_TestSurrounding *r)
1244 {
1245         if (flags & NDR_IN) {
1246                 if (r->in.data == NULL) {
1247                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1248                 }
1249                 NDR_CHECK(ndr_push_echo_Surrounding(ndr, NDR_SCALARS, r->in.data));
1250         }
1251         if (flags & NDR_OUT) {
1252                 if (r->out.data == NULL) {
1253                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1254                 }
1255                 NDR_CHECK(ndr_push_echo_Surrounding(ndr, NDR_SCALARS, r->out.data));
1256         }
1257         return NDR_ERR_SUCCESS;
1258 }
1259
1260 static enum ndr_err_code ndr_pull_echo_TestSurrounding(struct ndr_pull *ndr, int flags, struct echo_TestSurrounding *r)
1261 {
1262         TALLOC_CTX *_mem_save_data_0;
1263         if (flags & NDR_IN) {
1264                 ZERO_STRUCT(r->out);
1265
1266                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1267                         NDR_PULL_ALLOC(ndr, r->in.data);
1268                 }
1269                 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
1270                 NDR_PULL_SET_MEM_CTX(ndr, r->in.data, LIBNDR_FLAG_REF_ALLOC);
1271                 NDR_CHECK(ndr_pull_echo_Surrounding(ndr, NDR_SCALARS, r->in.data));
1272                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
1273                 NDR_PULL_ALLOC(ndr, r->out.data);
1274                 *r->out.data = *r->in.data;
1275         }
1276         if (flags & NDR_OUT) {
1277                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1278                         NDR_PULL_ALLOC(ndr, r->out.data);
1279                 }
1280                 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
1281                 NDR_PULL_SET_MEM_CTX(ndr, r->out.data, LIBNDR_FLAG_REF_ALLOC);
1282                 NDR_CHECK(ndr_pull_echo_Surrounding(ndr, NDR_SCALARS, r->out.data));
1283                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
1284         }
1285         return NDR_ERR_SUCCESS;
1286 }
1287
1288 _PUBLIC_ void ndr_print_echo_TestSurrounding(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestSurrounding *r)
1289 {
1290         ndr_print_struct(ndr, name, "echo_TestSurrounding");
1291         ndr->depth++;
1292         if (flags & NDR_SET_VALUES) {
1293                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1294         }
1295         if (flags & NDR_IN) {
1296                 ndr_print_struct(ndr, "in", "echo_TestSurrounding");
1297                 ndr->depth++;
1298                 ndr_print_ptr(ndr, "data", r->in.data);
1299                 ndr->depth++;
1300                 ndr_print_echo_Surrounding(ndr, "data", r->in.data);
1301                 ndr->depth--;
1302                 ndr->depth--;
1303         }
1304         if (flags & NDR_OUT) {
1305                 ndr_print_struct(ndr, "out", "echo_TestSurrounding");
1306                 ndr->depth++;
1307                 ndr_print_ptr(ndr, "data", r->out.data);
1308                 ndr->depth++;
1309                 ndr_print_echo_Surrounding(ndr, "data", r->out.data);
1310                 ndr->depth--;
1311                 ndr->depth--;
1312         }
1313         ndr->depth--;
1314 }
1315
1316 static enum ndr_err_code ndr_push_echo_TestDoublePointer(struct ndr_push *ndr, int flags, const struct echo_TestDoublePointer *r)
1317 {
1318         if (flags & NDR_IN) {
1319                 if (r->in.data == NULL) {
1320                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1321                 }
1322                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.data));
1323                 if (*r->in.data) {
1324                         NDR_CHECK(ndr_push_unique_ptr(ndr, **r->in.data));
1325                         if (**r->in.data) {
1326                                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ***r->in.data));
1327                         }
1328                 }
1329         }
1330         if (flags & NDR_OUT) {
1331                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.result));
1332         }
1333         return NDR_ERR_SUCCESS;
1334 }
1335
1336 static enum ndr_err_code ndr_pull_echo_TestDoublePointer(struct ndr_pull *ndr, int flags, struct echo_TestDoublePointer *r)
1337 {
1338         uint32_t _ptr_data;
1339         TALLOC_CTX *_mem_save_data_0;
1340         TALLOC_CTX *_mem_save_data_1;
1341         TALLOC_CTX *_mem_save_data_2;
1342         if (flags & NDR_IN) {
1343                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1344                         NDR_PULL_ALLOC(ndr, r->in.data);
1345                 }
1346                 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
1347                 NDR_PULL_SET_MEM_CTX(ndr, r->in.data, LIBNDR_FLAG_REF_ALLOC);
1348                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
1349                 if (_ptr_data) {
1350                         NDR_PULL_ALLOC(ndr, *r->in.data);
1351                 } else {
1352                         *r->in.data = NULL;
1353                 }
1354                 if (*r->in.data) {
1355                         _mem_save_data_1 = NDR_PULL_GET_MEM_CTX(ndr);
1356                         NDR_PULL_SET_MEM_CTX(ndr, *r->in.data, 0);
1357                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
1358                         if (_ptr_data) {
1359                                 NDR_PULL_ALLOC(ndr, **r->in.data);
1360                         } else {
1361                                 **r->in.data = NULL;
1362                         }
1363                         if (**r->in.data) {
1364                                 _mem_save_data_2 = NDR_PULL_GET_MEM_CTX(ndr);
1365                                 NDR_PULL_SET_MEM_CTX(ndr, **r->in.data, 0);
1366                                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, **r->in.data));
1367                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_2, 0);
1368                         }
1369                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_1, 0);
1370                 }
1371                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
1372         }
1373         if (flags & NDR_OUT) {
1374                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.result));
1375         }
1376         return NDR_ERR_SUCCESS;
1377 }
1378
1379 _PUBLIC_ void ndr_print_echo_TestDoublePointer(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestDoublePointer *r)
1380 {
1381         ndr_print_struct(ndr, name, "echo_TestDoublePointer");
1382         ndr->depth++;
1383         if (flags & NDR_SET_VALUES) {
1384                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1385         }
1386         if (flags & NDR_IN) {
1387                 ndr_print_struct(ndr, "in", "echo_TestDoublePointer");
1388                 ndr->depth++;
1389                 ndr_print_ptr(ndr, "data", r->in.data);
1390                 ndr->depth++;
1391                 ndr_print_ptr(ndr, "data", *r->in.data);
1392                 ndr->depth++;
1393                 if (*r->in.data) {
1394                         ndr_print_ptr(ndr, "data", **r->in.data);
1395                         ndr->depth++;
1396                         if (**r->in.data) {
1397                                 ndr_print_uint16(ndr, "data", ***r->in.data);
1398                         }
1399                         ndr->depth--;
1400                 }
1401                 ndr->depth--;
1402                 ndr->depth--;
1403                 ndr->depth--;
1404         }
1405         if (flags & NDR_OUT) {
1406                 ndr_print_struct(ndr, "out", "echo_TestDoublePointer");
1407                 ndr->depth++;
1408                 ndr_print_uint16(ndr, "result", r->out.result);
1409                 ndr->depth--;
1410         }
1411         ndr->depth--;
1412 }
1413
1414 static const struct ndr_interface_call rpcecho_calls[] = {
1415         {
1416                 "echo_AddOne",
1417                 sizeof(struct echo_AddOne),
1418                 (ndr_push_flags_fn_t) ndr_push_echo_AddOne,
1419                 (ndr_pull_flags_fn_t) ndr_pull_echo_AddOne,
1420                 (ndr_print_function_t) ndr_print_echo_AddOne,
1421                 false,
1422         },
1423         {
1424                 "echo_EchoData",
1425                 sizeof(struct echo_EchoData),
1426                 (ndr_push_flags_fn_t) ndr_push_echo_EchoData,
1427                 (ndr_pull_flags_fn_t) ndr_pull_echo_EchoData,
1428                 (ndr_print_function_t) ndr_print_echo_EchoData,
1429                 false,
1430         },
1431         {
1432                 "echo_SinkData",
1433                 sizeof(struct echo_SinkData),
1434                 (ndr_push_flags_fn_t) ndr_push_echo_SinkData,
1435                 (ndr_pull_flags_fn_t) ndr_pull_echo_SinkData,
1436                 (ndr_print_function_t) ndr_print_echo_SinkData,
1437                 false,
1438         },
1439         {
1440                 "echo_SourceData",
1441                 sizeof(struct echo_SourceData),
1442                 (ndr_push_flags_fn_t) ndr_push_echo_SourceData,
1443                 (ndr_pull_flags_fn_t) ndr_pull_echo_SourceData,
1444                 (ndr_print_function_t) ndr_print_echo_SourceData,
1445                 false,
1446         },
1447         {
1448                 "echo_TestCall",
1449                 sizeof(struct echo_TestCall),
1450                 (ndr_push_flags_fn_t) ndr_push_echo_TestCall,
1451                 (ndr_pull_flags_fn_t) ndr_pull_echo_TestCall,
1452                 (ndr_print_function_t) ndr_print_echo_TestCall,
1453                 false,
1454         },
1455         {
1456                 "echo_TestCall2",
1457                 sizeof(struct echo_TestCall2),
1458                 (ndr_push_flags_fn_t) ndr_push_echo_TestCall2,
1459                 (ndr_pull_flags_fn_t) ndr_pull_echo_TestCall2,
1460                 (ndr_print_function_t) ndr_print_echo_TestCall2,
1461                 false,
1462         },
1463         {
1464                 "echo_TestSleep",
1465                 sizeof(struct echo_TestSleep),
1466                 (ndr_push_flags_fn_t) ndr_push_echo_TestSleep,
1467                 (ndr_pull_flags_fn_t) ndr_pull_echo_TestSleep,
1468                 (ndr_print_function_t) ndr_print_echo_TestSleep,
1469                 false,
1470         },
1471         {
1472                 "echo_TestEnum",
1473                 sizeof(struct echo_TestEnum),
1474                 (ndr_push_flags_fn_t) ndr_push_echo_TestEnum,
1475                 (ndr_pull_flags_fn_t) ndr_pull_echo_TestEnum,
1476                 (ndr_print_function_t) ndr_print_echo_TestEnum,
1477                 false,
1478         },
1479         {
1480                 "echo_TestSurrounding",
1481                 sizeof(struct echo_TestSurrounding),
1482                 (ndr_push_flags_fn_t) ndr_push_echo_TestSurrounding,
1483                 (ndr_pull_flags_fn_t) ndr_pull_echo_TestSurrounding,
1484                 (ndr_print_function_t) ndr_print_echo_TestSurrounding,
1485                 false,
1486         },
1487         {
1488                 "echo_TestDoublePointer",
1489                 sizeof(struct echo_TestDoublePointer),
1490                 (ndr_push_flags_fn_t) ndr_push_echo_TestDoublePointer,
1491                 (ndr_pull_flags_fn_t) ndr_pull_echo_TestDoublePointer,
1492                 (ndr_print_function_t) ndr_print_echo_TestDoublePointer,
1493                 false,
1494         },
1495         { NULL, 0, NULL, NULL, NULL, false }
1496 };
1497
1498 static const char * const rpcecho_endpoint_strings[] = {
1499         "ncacn_np:[\\pipe\\rpcecho]", 
1500         "ncacn_ip_tcp:", 
1501         "ncalrpc:", 
1502 };
1503
1504 static const struct ndr_interface_string_array rpcecho_endpoints = {
1505         .count  = 3,
1506         .names  = rpcecho_endpoint_strings
1507 };
1508
1509 static const char * const rpcecho_authservice_strings[] = {
1510         "host", 
1511 };
1512
1513 static const struct ndr_interface_string_array rpcecho_authservices = {
1514         .count  = 1,
1515         .names  = rpcecho_authservice_strings
1516 };
1517
1518
1519 const struct ndr_interface_table ndr_table_rpcecho = {
1520         .name           = "rpcecho",
1521         .syntax_id      = {
1522                 {0x60a15ec5,0x4de8,0x11d7,{0xa6,0x37},{0x00,0x50,0x56,0xa2,0x01,0x82}},
1523                 NDR_RPCECHO_VERSION
1524         },
1525         .helpstring     = NDR_RPCECHO_HELPSTRING,
1526         .num_calls      = 10,
1527         .calls          = rpcecho_calls,
1528         .endpoints      = &rpcecho_endpoints,
1529         .authservices   = &rpcecho_authservices
1530 };
1531