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