source: branches/samba-3.5.x/librpc/gen_ndr/ndr_echo.c

Last change on this file was 734, checked in by Silvan Scherrer, 13 years ago

Samba Server 3.5: update branche to 3.5.14

File size: 47.1 KB
Line 
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 size_surrounding_0 = 0;
620 uint32_t cntr_surrounding_0;
621 TALLOC_CTX *_mem_save_surrounding_0;
622 if (ndr_flags & NDR_SCALARS) {
623 NDR_CHECK(ndr_pull_array_size(ndr, &r->surrounding));
624 NDR_CHECK(ndr_pull_align(ndr, 4));
625 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->x));
626 size_surrounding_0 = ndr_get_array_size(ndr, &r->surrounding);
627 NDR_PULL_ALLOC_N(ndr, r->surrounding, size_surrounding_0);
628 _mem_save_surrounding_0 = NDR_PULL_GET_MEM_CTX(ndr);
629 NDR_PULL_SET_MEM_CTX(ndr, r->surrounding, 0);
630 for (cntr_surrounding_0 = 0; cntr_surrounding_0 < size_surrounding_0; cntr_surrounding_0++) {
631 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->surrounding[cntr_surrounding_0]));
632 }
633 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_surrounding_0, 0);
634 if (r->surrounding) {
635 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->surrounding, r->x));
636 }
637 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
638 }
639 if (ndr_flags & NDR_BUFFERS) {
640 }
641 return NDR_ERR_SUCCESS;
642}
643
644_PUBLIC_ void ndr_print_echo_Surrounding(struct ndr_print *ndr, const char *name, const struct echo_Surrounding *r)
645{
646 uint32_t cntr_surrounding_0;
647 ndr_print_struct(ndr, name, "echo_Surrounding");
648 ndr->depth++;
649 ndr_print_uint32(ndr, "x", r->x);
650 ndr->print(ndr, "%s: ARRAY(%d)", "surrounding", (int)r->x);
651 ndr->depth++;
652 for (cntr_surrounding_0=0;cntr_surrounding_0<r->x;cntr_surrounding_0++) {
653 char *idx_0=NULL;
654 if (asprintf(&idx_0, "[%d]", cntr_surrounding_0) != -1) {
655 ndr_print_uint16(ndr, "surrounding", r->surrounding[cntr_surrounding_0]);
656 free(idx_0);
657 }
658 }
659 ndr->depth--;
660 ndr->depth--;
661}
662
663static enum ndr_err_code ndr_push_echo_AddOne(struct ndr_push *ndr, int flags, const struct echo_AddOne *r)
664{
665 if (flags & NDR_IN) {
666 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.in_data));
667 }
668 if (flags & NDR_OUT) {
669 if (r->out.out_data == NULL) {
670 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
671 }
672 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.out_data));
673 }
674 return NDR_ERR_SUCCESS;
675}
676
677static enum ndr_err_code ndr_pull_echo_AddOne(struct ndr_pull *ndr, int flags, struct echo_AddOne *r)
678{
679 TALLOC_CTX *_mem_save_out_data_0;
680 if (flags & NDR_IN) {
681 ZERO_STRUCT(r->out);
682
683 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.in_data));
684 NDR_PULL_ALLOC(ndr, r->out.out_data);
685 ZERO_STRUCTP(r->out.out_data);
686 }
687 if (flags & NDR_OUT) {
688 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
689 NDR_PULL_ALLOC(ndr, r->out.out_data);
690 }
691 _mem_save_out_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
692 NDR_PULL_SET_MEM_CTX(ndr, r->out.out_data, LIBNDR_FLAG_REF_ALLOC);
693 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.out_data));
694 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_out_data_0, LIBNDR_FLAG_REF_ALLOC);
695 }
696 return NDR_ERR_SUCCESS;
697}
698
699_PUBLIC_ void ndr_print_echo_AddOne(struct ndr_print *ndr, const char *name, int flags, const struct echo_AddOne *r)
700{
701 ndr_print_struct(ndr, name, "echo_AddOne");
702 ndr->depth++;
703 if (flags & NDR_SET_VALUES) {
704 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
705 }
706 if (flags & NDR_IN) {
707 ndr_print_struct(ndr, "in", "echo_AddOne");
708 ndr->depth++;
709 ndr_print_uint32(ndr, "in_data", r->in.in_data);
710 ndr->depth--;
711 }
712 if (flags & NDR_OUT) {
713 ndr_print_struct(ndr, "out", "echo_AddOne");
714 ndr->depth++;
715 ndr_print_ptr(ndr, "out_data", r->out.out_data);
716 ndr->depth++;
717 ndr_print_uint32(ndr, "out_data", *r->out.out_data);
718 ndr->depth--;
719 ndr->depth--;
720 }
721 ndr->depth--;
722}
723
724static enum ndr_err_code ndr_push_echo_EchoData(struct ndr_push *ndr, int flags, const struct echo_EchoData *r)
725{
726 if (flags & NDR_IN) {
727 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.len));
728 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.len));
729 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.in_data, r->in.len));
730 }
731 if (flags & NDR_OUT) {
732 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.len));
733 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.out_data, r->in.len));
734 }
735 return NDR_ERR_SUCCESS;
736}
737
738static enum ndr_err_code ndr_pull_echo_EchoData(struct ndr_pull *ndr, int flags, struct echo_EchoData *r)
739{
740 uint32_t size_in_data_0 = 0;
741 uint32_t size_out_data_0 = 0;
742 if (flags & NDR_IN) {
743 ZERO_STRUCT(r->out);
744
745 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.len));
746 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.in_data));
747 size_in_data_0 = ndr_get_array_size(ndr, &r->in.in_data);
748 NDR_PULL_ALLOC_N(ndr, r->in.in_data, size_in_data_0);
749 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.in_data, size_in_data_0));
750 if (r->in.in_data) {
751 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.in_data, r->in.len));
752 }
753 }
754 if (flags & NDR_OUT) {
755 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.out_data));
756 size_out_data_0 = ndr_get_array_size(ndr, &r->out.out_data);
757 NDR_PULL_ALLOC_N(ndr, r->out.out_data, size_out_data_0);
758 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.out_data, size_out_data_0));
759 if (r->out.out_data) {
760 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.out_data, r->in.len));
761 }
762 }
763 return NDR_ERR_SUCCESS;
764}
765
766_PUBLIC_ void ndr_print_echo_EchoData(struct ndr_print *ndr, const char *name, int flags, const struct echo_EchoData *r)
767{
768 ndr_print_struct(ndr, name, "echo_EchoData");
769 ndr->depth++;
770 if (flags & NDR_SET_VALUES) {
771 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
772 }
773 if (flags & NDR_IN) {
774 ndr_print_struct(ndr, "in", "echo_EchoData");
775 ndr->depth++;
776 ndr_print_uint32(ndr, "len", r->in.len);
777 ndr_print_array_uint8(ndr, "in_data", r->in.in_data, r->in.len);
778 ndr->depth--;
779 }
780 if (flags & NDR_OUT) {
781 ndr_print_struct(ndr, "out", "echo_EchoData");
782 ndr->depth++;
783 ndr_print_array_uint8(ndr, "out_data", r->out.out_data, r->in.len);
784 ndr->depth--;
785 }
786 ndr->depth--;
787}
788
789static enum ndr_err_code ndr_push_echo_SinkData(struct ndr_push *ndr, int flags, const struct echo_SinkData *r)
790{
791 if (flags & NDR_IN) {
792 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.len));
793 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.len));
794 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.len));
795 }
796 if (flags & NDR_OUT) {
797 }
798 return NDR_ERR_SUCCESS;
799}
800
801static enum ndr_err_code ndr_pull_echo_SinkData(struct ndr_pull *ndr, int flags, struct echo_SinkData *r)
802{
803 uint32_t size_data_0 = 0;
804 if (flags & NDR_IN) {
805 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.len));
806 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
807 size_data_0 = ndr_get_array_size(ndr, &r->in.data);
808 NDR_PULL_ALLOC_N(ndr, r->in.data, size_data_0);
809 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, size_data_0));
810 if (r->in.data) {
811 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, r->in.len));
812 }
813 }
814 if (flags & NDR_OUT) {
815 }
816 return NDR_ERR_SUCCESS;
817}
818
819_PUBLIC_ void ndr_print_echo_SinkData(struct ndr_print *ndr, const char *name, int flags, const struct echo_SinkData *r)
820{
821 ndr_print_struct(ndr, name, "echo_SinkData");
822 ndr->depth++;
823 if (flags & NDR_SET_VALUES) {
824 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
825 }
826 if (flags & NDR_IN) {
827 ndr_print_struct(ndr, "in", "echo_SinkData");
828 ndr->depth++;
829 ndr_print_uint32(ndr, "len", r->in.len);
830 ndr_print_array_uint8(ndr, "data", r->in.data, r->in.len);
831 ndr->depth--;
832 }
833 if (flags & NDR_OUT) {
834 ndr_print_struct(ndr, "out", "echo_SinkData");
835 ndr->depth++;
836 ndr->depth--;
837 }
838 ndr->depth--;
839}
840
841static enum ndr_err_code ndr_push_echo_SourceData(struct ndr_push *ndr, int flags, const struct echo_SourceData *r)
842{
843 if (flags & NDR_IN) {
844 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.len));
845 }
846 if (flags & NDR_OUT) {
847 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.len));
848 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, r->in.len));
849 }
850 return NDR_ERR_SUCCESS;
851}
852
853static enum ndr_err_code ndr_pull_echo_SourceData(struct ndr_pull *ndr, int flags, struct echo_SourceData *r)
854{
855 uint32_t size_data_0 = 0;
856 if (flags & NDR_IN) {
857 ZERO_STRUCT(r->out);
858
859 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.len));
860 }
861 if (flags & NDR_OUT) {
862 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.data));
863 size_data_0 = ndr_get_array_size(ndr, &r->out.data);
864 NDR_PULL_ALLOC_N(ndr, r->out.data, size_data_0);
865 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, size_data_0));
866 if (r->out.data) {
867 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.data, r->in.len));
868 }
869 }
870 return NDR_ERR_SUCCESS;
871}
872
873_PUBLIC_ void ndr_print_echo_SourceData(struct ndr_print *ndr, const char *name, int flags, const struct echo_SourceData *r)
874{
875 ndr_print_struct(ndr, name, "echo_SourceData");
876 ndr->depth++;
877 if (flags & NDR_SET_VALUES) {
878 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
879 }
880 if (flags & NDR_IN) {
881 ndr_print_struct(ndr, "in", "echo_SourceData");
882 ndr->depth++;
883 ndr_print_uint32(ndr, "len", r->in.len);
884 ndr->depth--;
885 }
886 if (flags & NDR_OUT) {
887 ndr_print_struct(ndr, "out", "echo_SourceData");
888 ndr->depth++;
889 ndr_print_array_uint8(ndr, "data", r->out.data, r->in.len);
890 ndr->depth--;
891 }
892 ndr->depth--;
893}
894
895static enum ndr_err_code ndr_push_echo_TestCall(struct ndr_push *ndr, int flags, const struct echo_TestCall *r)
896{
897 if (flags & NDR_IN) {
898 if (r->in.s1 == NULL) {
899 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
900 }
901 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.s1, CH_UTF16)));
902 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
903 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.s1, CH_UTF16)));
904 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.s1, ndr_charset_length(r->in.s1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
905 }
906 if (flags & NDR_OUT) {
907 if (r->out.s2 == NULL) {
908 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
909 }
910 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.s2));
911 if (*r->out.s2) {
912 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.s2, CH_UTF16)));
913 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
914 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.s2, CH_UTF16)));
915 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.s2, ndr_charset_length(*r->out.s2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
916 }
917 }
918 return NDR_ERR_SUCCESS;
919}
920
921static enum ndr_err_code ndr_pull_echo_TestCall(struct ndr_pull *ndr, int flags, struct echo_TestCall *r)
922{
923 uint32_t size_s1_1 = 0;
924 uint32_t length_s1_1 = 0;
925 uint32_t _ptr_s2;
926 uint32_t size_s2_2 = 0;
927 uint32_t length_s2_2 = 0;
928 TALLOC_CTX *_mem_save_s2_0;
929 TALLOC_CTX *_mem_save_s2_1;
930 if (flags & NDR_IN) {
931 ZERO_STRUCT(r->out);
932
933 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.s1));
934 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.s1));
935 size_s1_1 = ndr_get_array_size(ndr, &r->in.s1);
936 length_s1_1 = ndr_get_array_length(ndr, &r->in.s1);
937 if (length_s1_1 > size_s1_1) {
938 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_s1_1, length_s1_1);
939 }
940 NDR_CHECK(ndr_check_string_terminator(ndr, length_s1_1, sizeof(uint16_t)));
941 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.s1, length_s1_1, sizeof(uint16_t), CH_UTF16));
942 NDR_PULL_ALLOC(ndr, r->out.s2);
943 ZERO_STRUCTP(r->out.s2);
944 }
945 if (flags & NDR_OUT) {
946 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
947 NDR_PULL_ALLOC(ndr, r->out.s2);
948 }
949 _mem_save_s2_0 = NDR_PULL_GET_MEM_CTX(ndr);
950 NDR_PULL_SET_MEM_CTX(ndr, r->out.s2, LIBNDR_FLAG_REF_ALLOC);
951 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s2));
952 if (_ptr_s2) {
953 NDR_PULL_ALLOC(ndr, *r->out.s2);
954 } else {
955 *r->out.s2 = NULL;
956 }
957 if (*r->out.s2) {
958 _mem_save_s2_1 = NDR_PULL_GET_MEM_CTX(ndr);
959 NDR_PULL_SET_MEM_CTX(ndr, *r->out.s2, 0);
960 NDR_CHECK(ndr_pull_array_size(ndr, r->out.s2));
961 NDR_CHECK(ndr_pull_array_length(ndr, r->out.s2));
962 size_s2_2 = ndr_get_array_size(ndr, r->out.s2);
963 length_s2_2 = ndr_get_array_length(ndr, r->out.s2);
964 if (length_s2_2 > size_s2_2) {
965 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_s2_2, length_s2_2);
966 }
967 NDR_CHECK(ndr_check_string_terminator(ndr, length_s2_2, sizeof(uint16_t)));
968 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.s2, length_s2_2, sizeof(uint16_t), CH_UTF16));
969 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s2_1, 0);
970 }
971 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s2_0, LIBNDR_FLAG_REF_ALLOC);
972 }
973 return NDR_ERR_SUCCESS;
974}
975
976_PUBLIC_ void ndr_print_echo_TestCall(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestCall *r)
977{
978 ndr_print_struct(ndr, name, "echo_TestCall");
979 ndr->depth++;
980 if (flags & NDR_SET_VALUES) {
981 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
982 }
983 if (flags & NDR_IN) {
984 ndr_print_struct(ndr, "in", "echo_TestCall");
985 ndr->depth++;
986 ndr_print_ptr(ndr, "s1", r->in.s1);
987 ndr->depth++;
988 ndr_print_string(ndr, "s1", r->in.s1);
989 ndr->depth--;
990 ndr->depth--;
991 }
992 if (flags & NDR_OUT) {
993 ndr_print_struct(ndr, "out", "echo_TestCall");
994 ndr->depth++;
995 ndr_print_ptr(ndr, "s2", r->out.s2);
996 ndr->depth++;
997 ndr_print_ptr(ndr, "s2", *r->out.s2);
998 ndr->depth++;
999 if (*r->out.s2) {
1000 ndr_print_string(ndr, "s2", *r->out.s2);
1001 }
1002 ndr->depth--;
1003 ndr->depth--;
1004 ndr->depth--;
1005 }
1006 ndr->depth--;
1007}
1008
1009static enum ndr_err_code ndr_push_echo_TestCall2(struct ndr_push *ndr, int flags, const struct echo_TestCall2 *r)
1010{
1011 if (flags & NDR_IN) {
1012 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
1013 }
1014 if (flags & NDR_OUT) {
1015 if (r->out.info == NULL) {
1016 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1017 }
1018 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
1019 NDR_CHECK(ndr_push_echo_Info(ndr, NDR_SCALARS, r->out.info));
1020 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1021 }
1022 return NDR_ERR_SUCCESS;
1023}
1024
1025static enum ndr_err_code ndr_pull_echo_TestCall2(struct ndr_pull *ndr, int flags, struct echo_TestCall2 *r)
1026{
1027 TALLOC_CTX *_mem_save_info_0;
1028 if (flags & NDR_IN) {
1029 ZERO_STRUCT(r->out);
1030
1031 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
1032 NDR_PULL_ALLOC(ndr, r->out.info);
1033 ZERO_STRUCTP(r->out.info);
1034 }
1035 if (flags & NDR_OUT) {
1036 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1037 NDR_PULL_ALLOC(ndr, r->out.info);
1038 }
1039 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
1040 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
1041 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
1042 NDR_CHECK(ndr_pull_echo_Info(ndr, NDR_SCALARS, r->out.info));
1043 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
1044 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1045 }
1046 return NDR_ERR_SUCCESS;
1047}
1048
1049_PUBLIC_ void ndr_print_echo_TestCall2(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestCall2 *r)
1050{
1051 ndr_print_struct(ndr, name, "echo_TestCall2");
1052 ndr->depth++;
1053 if (flags & NDR_SET_VALUES) {
1054 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1055 }
1056 if (flags & NDR_IN) {
1057 ndr_print_struct(ndr, "in", "echo_TestCall2");
1058 ndr->depth++;
1059 ndr_print_uint16(ndr, "level", r->in.level);
1060 ndr->depth--;
1061 }
1062 if (flags & NDR_OUT) {
1063 ndr_print_struct(ndr, "out", "echo_TestCall2");
1064 ndr->depth++;
1065 ndr_print_ptr(ndr, "info", r->out.info);
1066 ndr->depth++;
1067 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
1068 ndr_print_echo_Info(ndr, "info", r->out.info);
1069 ndr->depth--;
1070 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1071 ndr->depth--;
1072 }
1073 ndr->depth--;
1074}
1075
1076static enum ndr_err_code ndr_push_echo_TestSleep(struct ndr_push *ndr, int flags, const struct echo_TestSleep *r)
1077{
1078 if (flags & NDR_IN) {
1079 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.seconds));
1080 }
1081 if (flags & NDR_OUT) {
1082 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
1083 }
1084 return NDR_ERR_SUCCESS;
1085}
1086
1087static enum ndr_err_code ndr_pull_echo_TestSleep(struct ndr_pull *ndr, int flags, struct echo_TestSleep *r)
1088{
1089 if (flags & NDR_IN) {
1090 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.seconds));
1091 }
1092 if (flags & NDR_OUT) {
1093 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
1094 }
1095 return NDR_ERR_SUCCESS;
1096}
1097
1098_PUBLIC_ void ndr_print_echo_TestSleep(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestSleep *r)
1099{
1100 ndr_print_struct(ndr, name, "echo_TestSleep");
1101 ndr->depth++;
1102 if (flags & NDR_SET_VALUES) {
1103 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1104 }
1105 if (flags & NDR_IN) {
1106 ndr_print_struct(ndr, "in", "echo_TestSleep");
1107 ndr->depth++;
1108 ndr_print_uint32(ndr, "seconds", r->in.seconds);
1109 ndr->depth--;
1110 }
1111 if (flags & NDR_OUT) {
1112 ndr_print_struct(ndr, "out", "echo_TestSleep");
1113 ndr->depth++;
1114 ndr_print_uint32(ndr, "result", r->out.result);
1115 ndr->depth--;
1116 }
1117 ndr->depth--;
1118}
1119
1120static enum ndr_err_code ndr_push_echo_TestEnum(struct ndr_push *ndr, int flags, const struct echo_TestEnum *r)
1121{
1122 if (flags & NDR_IN) {
1123 if (r->in.foo1 == NULL) {
1124 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1125 }
1126 NDR_CHECK(ndr_push_echo_Enum1(ndr, NDR_SCALARS, *r->in.foo1));
1127 if (r->in.foo2 == NULL) {
1128 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1129 }
1130 NDR_CHECK(ndr_push_echo_Enum2(ndr, NDR_SCALARS, r->in.foo2));
1131 if (r->in.foo3 == NULL) {
1132 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1133 }
1134 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.foo3, *r->in.foo1));
1135 NDR_CHECK(ndr_push_echo_Enum3(ndr, NDR_SCALARS, r->in.foo3));
1136 }
1137 if (flags & NDR_OUT) {
1138 if (r->out.foo1 == NULL) {
1139 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1140 }
1141 NDR_CHECK(ndr_push_echo_Enum1(ndr, NDR_SCALARS, *r->out.foo1));
1142 if (r->out.foo2 == NULL) {
1143 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1144 }
1145 NDR_CHECK(ndr_push_echo_Enum2(ndr, NDR_SCALARS, r->out.foo2));
1146 if (r->out.foo3 == NULL) {
1147 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1148 }
1149 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.foo3, *r->out.foo1));
1150 NDR_CHECK(ndr_push_echo_Enum3(ndr, NDR_SCALARS, r->out.foo3));
1151 }
1152 return NDR_ERR_SUCCESS;
1153}
1154
1155static enum ndr_err_code ndr_pull_echo_TestEnum(struct ndr_pull *ndr, int flags, struct echo_TestEnum *r)
1156{
1157 TALLOC_CTX *_mem_save_foo1_0;
1158 TALLOC_CTX *_mem_save_foo2_0;
1159 TALLOC_CTX *_mem_save_foo3_0;
1160 if (flags & NDR_IN) {
1161 ZERO_STRUCT(r->out);
1162
1163 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1164 NDR_PULL_ALLOC(ndr, r->in.foo1);
1165 }
1166 _mem_save_foo1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1167 NDR_PULL_SET_MEM_CTX(ndr, r->in.foo1, LIBNDR_FLAG_REF_ALLOC);
1168 NDR_CHECK(ndr_pull_echo_Enum1(ndr, NDR_SCALARS, r->in.foo1));
1169 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo1_0, LIBNDR_FLAG_REF_ALLOC);
1170 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1171 NDR_PULL_ALLOC(ndr, r->in.foo2);
1172 }
1173 _mem_save_foo2_0 = NDR_PULL_GET_MEM_CTX(ndr);
1174 NDR_PULL_SET_MEM_CTX(ndr, r->in.foo2, LIBNDR_FLAG_REF_ALLOC);
1175 NDR_CHECK(ndr_pull_echo_Enum2(ndr, NDR_SCALARS, r->in.foo2));
1176 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo2_0, LIBNDR_FLAG_REF_ALLOC);
1177 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1178 NDR_PULL_ALLOC(ndr, r->in.foo3);
1179 }
1180 _mem_save_foo3_0 = NDR_PULL_GET_MEM_CTX(ndr);
1181 NDR_PULL_SET_MEM_CTX(ndr, r->in.foo3, LIBNDR_FLAG_REF_ALLOC);
1182 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.foo3, *r->in.foo1));
1183 NDR_CHECK(ndr_pull_echo_Enum3(ndr, NDR_SCALARS, r->in.foo3));
1184 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo3_0, LIBNDR_FLAG_REF_ALLOC);
1185 NDR_PULL_ALLOC(ndr, r->out.foo1);
1186 *r->out.foo1 = *r->in.foo1;
1187 NDR_PULL_ALLOC(ndr, r->out.foo2);
1188 *r->out.foo2 = *r->in.foo2;
1189 NDR_PULL_ALLOC(ndr, r->out.foo3);
1190 *r->out.foo3 = *r->in.foo3;
1191 }
1192 if (flags & NDR_OUT) {
1193 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1194 NDR_PULL_ALLOC(ndr, r->out.foo1);
1195 }
1196 _mem_save_foo1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1197 NDR_PULL_SET_MEM_CTX(ndr, r->out.foo1, LIBNDR_FLAG_REF_ALLOC);
1198 NDR_CHECK(ndr_pull_echo_Enum1(ndr, NDR_SCALARS, r->out.foo1));
1199 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo1_0, LIBNDR_FLAG_REF_ALLOC);
1200 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1201 NDR_PULL_ALLOC(ndr, r->out.foo2);
1202 }
1203 _mem_save_foo2_0 = NDR_PULL_GET_MEM_CTX(ndr);
1204 NDR_PULL_SET_MEM_CTX(ndr, r->out.foo2, LIBNDR_FLAG_REF_ALLOC);
1205 NDR_CHECK(ndr_pull_echo_Enum2(ndr, NDR_SCALARS, r->out.foo2));
1206 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo2_0, LIBNDR_FLAG_REF_ALLOC);
1207 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1208 NDR_PULL_ALLOC(ndr, r->out.foo3);
1209 }
1210 _mem_save_foo3_0 = NDR_PULL_GET_MEM_CTX(ndr);
1211 NDR_PULL_SET_MEM_CTX(ndr, r->out.foo3, LIBNDR_FLAG_REF_ALLOC);
1212 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.foo3, *r->out.foo1));
1213 NDR_CHECK(ndr_pull_echo_Enum3(ndr, NDR_SCALARS, r->out.foo3));
1214 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo3_0, LIBNDR_FLAG_REF_ALLOC);
1215 }
1216 return NDR_ERR_SUCCESS;
1217}
1218
1219_PUBLIC_ void ndr_print_echo_TestEnum(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestEnum *r)
1220{
1221 ndr_print_struct(ndr, name, "echo_TestEnum");
1222 ndr->depth++;
1223 if (flags & NDR_SET_VALUES) {
1224 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1225 }
1226 if (flags & NDR_IN) {
1227 ndr_print_struct(ndr, "in", "echo_TestEnum");
1228 ndr->depth++;
1229 ndr_print_ptr(ndr, "foo1", r->in.foo1);
1230 ndr->depth++;
1231 ndr_print_echo_Enum1(ndr, "foo1", *r->in.foo1);
1232 ndr->depth--;
1233 ndr_print_ptr(ndr, "foo2", r->in.foo2);
1234 ndr->depth++;
1235 ndr_print_echo_Enum2(ndr, "foo2", r->in.foo2);
1236 ndr->depth--;
1237 ndr_print_ptr(ndr, "foo3", r->in.foo3);
1238 ndr->depth++;
1239 ndr_print_set_switch_value(ndr, r->in.foo3, *r->in.foo1);
1240 ndr_print_echo_Enum3(ndr, "foo3", r->in.foo3);
1241 ndr->depth--;
1242 ndr->depth--;
1243 }
1244 if (flags & NDR_OUT) {
1245 ndr_print_struct(ndr, "out", "echo_TestEnum");
1246 ndr->depth++;
1247 ndr_print_ptr(ndr, "foo1", r->out.foo1);
1248 ndr->depth++;
1249 ndr_print_echo_Enum1(ndr, "foo1", *r->out.foo1);
1250 ndr->depth--;
1251 ndr_print_ptr(ndr, "foo2", r->out.foo2);
1252 ndr->depth++;
1253 ndr_print_echo_Enum2(ndr, "foo2", r->out.foo2);
1254 ndr->depth--;
1255 ndr_print_ptr(ndr, "foo3", r->out.foo3);
1256 ndr->depth++;
1257 ndr_print_set_switch_value(ndr, r->out.foo3, *r->out.foo1);
1258 ndr_print_echo_Enum3(ndr, "foo3", r->out.foo3);
1259 ndr->depth--;
1260 ndr->depth--;
1261 }
1262 ndr->depth--;
1263}
1264
1265static enum ndr_err_code ndr_push_echo_TestSurrounding(struct ndr_push *ndr, int flags, const struct echo_TestSurrounding *r)
1266{
1267 if (flags & NDR_IN) {
1268 if (r->in.data == NULL) {
1269 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1270 }
1271 NDR_CHECK(ndr_push_echo_Surrounding(ndr, NDR_SCALARS, r->in.data));
1272 }
1273 if (flags & NDR_OUT) {
1274 if (r->out.data == NULL) {
1275 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1276 }
1277 NDR_CHECK(ndr_push_echo_Surrounding(ndr, NDR_SCALARS, r->out.data));
1278 }
1279 return NDR_ERR_SUCCESS;
1280}
1281
1282static enum ndr_err_code ndr_pull_echo_TestSurrounding(struct ndr_pull *ndr, int flags, struct echo_TestSurrounding *r)
1283{
1284 TALLOC_CTX *_mem_save_data_0;
1285 if (flags & NDR_IN) {
1286 ZERO_STRUCT(r->out);
1287
1288 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1289 NDR_PULL_ALLOC(ndr, r->in.data);
1290 }
1291 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
1292 NDR_PULL_SET_MEM_CTX(ndr, r->in.data, LIBNDR_FLAG_REF_ALLOC);
1293 NDR_CHECK(ndr_pull_echo_Surrounding(ndr, NDR_SCALARS, r->in.data));
1294 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
1295 NDR_PULL_ALLOC(ndr, r->out.data);
1296 *r->out.data = *r->in.data;
1297 }
1298 if (flags & NDR_OUT) {
1299 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1300 NDR_PULL_ALLOC(ndr, r->out.data);
1301 }
1302 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
1303 NDR_PULL_SET_MEM_CTX(ndr, r->out.data, LIBNDR_FLAG_REF_ALLOC);
1304 NDR_CHECK(ndr_pull_echo_Surrounding(ndr, NDR_SCALARS, r->out.data));
1305 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
1306 }
1307 return NDR_ERR_SUCCESS;
1308}
1309
1310_PUBLIC_ void ndr_print_echo_TestSurrounding(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestSurrounding *r)
1311{
1312 ndr_print_struct(ndr, name, "echo_TestSurrounding");
1313 ndr->depth++;
1314 if (flags & NDR_SET_VALUES) {
1315 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1316 }
1317 if (flags & NDR_IN) {
1318 ndr_print_struct(ndr, "in", "echo_TestSurrounding");
1319 ndr->depth++;
1320 ndr_print_ptr(ndr, "data", r->in.data);
1321 ndr->depth++;
1322 ndr_print_echo_Surrounding(ndr, "data", r->in.data);
1323 ndr->depth--;
1324 ndr->depth--;
1325 }
1326 if (flags & NDR_OUT) {
1327 ndr_print_struct(ndr, "out", "echo_TestSurrounding");
1328 ndr->depth++;
1329 ndr_print_ptr(ndr, "data", r->out.data);
1330 ndr->depth++;
1331 ndr_print_echo_Surrounding(ndr, "data", r->out.data);
1332 ndr->depth--;
1333 ndr->depth--;
1334 }
1335 ndr->depth--;
1336}
1337
1338static enum ndr_err_code ndr_push_echo_TestDoublePointer(struct ndr_push *ndr, int flags, const struct echo_TestDoublePointer *r)
1339{
1340 if (flags & NDR_IN) {
1341 if (r->in.data == NULL) {
1342 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1343 }
1344 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.data));
1345 if (*r->in.data) {
1346 NDR_CHECK(ndr_push_unique_ptr(ndr, **r->in.data));
1347 if (**r->in.data) {
1348 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ***r->in.data));
1349 }
1350 }
1351 }
1352 if (flags & NDR_OUT) {
1353 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.result));
1354 }
1355 return NDR_ERR_SUCCESS;
1356}
1357
1358static enum ndr_err_code ndr_pull_echo_TestDoublePointer(struct ndr_pull *ndr, int flags, struct echo_TestDoublePointer *r)
1359{
1360 uint32_t _ptr_data;
1361 TALLOC_CTX *_mem_save_data_0;
1362 TALLOC_CTX *_mem_save_data_1;
1363 TALLOC_CTX *_mem_save_data_2;
1364 if (flags & NDR_IN) {
1365 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1366 NDR_PULL_ALLOC(ndr, r->in.data);
1367 }
1368 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
1369 NDR_PULL_SET_MEM_CTX(ndr, r->in.data, LIBNDR_FLAG_REF_ALLOC);
1370 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
1371 if (_ptr_data) {
1372 NDR_PULL_ALLOC(ndr, *r->in.data);
1373 } else {
1374 *r->in.data = NULL;
1375 }
1376 if (*r->in.data) {
1377 _mem_save_data_1 = NDR_PULL_GET_MEM_CTX(ndr);
1378 NDR_PULL_SET_MEM_CTX(ndr, *r->in.data, 0);
1379 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
1380 if (_ptr_data) {
1381 NDR_PULL_ALLOC(ndr, **r->in.data);
1382 } else {
1383 **r->in.data = NULL;
1384 }
1385 if (**r->in.data) {
1386 _mem_save_data_2 = NDR_PULL_GET_MEM_CTX(ndr);
1387 NDR_PULL_SET_MEM_CTX(ndr, **r->in.data, 0);
1388 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, **r->in.data));
1389 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_2, 0);
1390 }
1391 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_1, 0);
1392 }
1393 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
1394 }
1395 if (flags & NDR_OUT) {
1396 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.result));
1397 }
1398 return NDR_ERR_SUCCESS;
1399}
1400
1401_PUBLIC_ void ndr_print_echo_TestDoublePointer(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestDoublePointer *r)
1402{
1403 ndr_print_struct(ndr, name, "echo_TestDoublePointer");
1404 ndr->depth++;
1405 if (flags & NDR_SET_VALUES) {
1406 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1407 }
1408 if (flags & NDR_IN) {
1409 ndr_print_struct(ndr, "in", "echo_TestDoublePointer");
1410 ndr->depth++;
1411 ndr_print_ptr(ndr, "data", r->in.data);
1412 ndr->depth++;
1413 ndr_print_ptr(ndr, "data", *r->in.data);
1414 ndr->depth++;
1415 if (*r->in.data) {
1416 ndr_print_ptr(ndr, "data", **r->in.data);
1417 ndr->depth++;
1418 if (**r->in.data) {
1419 ndr_print_uint16(ndr, "data", ***r->in.data);
1420 }
1421 ndr->depth--;
1422 }
1423 ndr->depth--;
1424 ndr->depth--;
1425 ndr->depth--;
1426 }
1427 if (flags & NDR_OUT) {
1428 ndr_print_struct(ndr, "out", "echo_TestDoublePointer");
1429 ndr->depth++;
1430 ndr_print_uint16(ndr, "result", r->out.result);
1431 ndr->depth--;
1432 }
1433 ndr->depth--;
1434}
1435
1436static const struct ndr_interface_call rpcecho_calls[] = {
1437 {
1438 "echo_AddOne",
1439 sizeof(struct echo_AddOne),
1440 (ndr_push_flags_fn_t) ndr_push_echo_AddOne,
1441 (ndr_pull_flags_fn_t) ndr_pull_echo_AddOne,
1442 (ndr_print_function_t) ndr_print_echo_AddOne,
1443 false,
1444 },
1445 {
1446 "echo_EchoData",
1447 sizeof(struct echo_EchoData),
1448 (ndr_push_flags_fn_t) ndr_push_echo_EchoData,
1449 (ndr_pull_flags_fn_t) ndr_pull_echo_EchoData,
1450 (ndr_print_function_t) ndr_print_echo_EchoData,
1451 false,
1452 },
1453 {
1454 "echo_SinkData",
1455 sizeof(struct echo_SinkData),
1456 (ndr_push_flags_fn_t) ndr_push_echo_SinkData,
1457 (ndr_pull_flags_fn_t) ndr_pull_echo_SinkData,
1458 (ndr_print_function_t) ndr_print_echo_SinkData,
1459 false,
1460 },
1461 {
1462 "echo_SourceData",
1463 sizeof(struct echo_SourceData),
1464 (ndr_push_flags_fn_t) ndr_push_echo_SourceData,
1465 (ndr_pull_flags_fn_t) ndr_pull_echo_SourceData,
1466 (ndr_print_function_t) ndr_print_echo_SourceData,
1467 false,
1468 },
1469 {
1470 "echo_TestCall",
1471 sizeof(struct echo_TestCall),
1472 (ndr_push_flags_fn_t) ndr_push_echo_TestCall,
1473 (ndr_pull_flags_fn_t) ndr_pull_echo_TestCall,
1474 (ndr_print_function_t) ndr_print_echo_TestCall,
1475 false,
1476 },
1477 {
1478 "echo_TestCall2",
1479 sizeof(struct echo_TestCall2),
1480 (ndr_push_flags_fn_t) ndr_push_echo_TestCall2,
1481 (ndr_pull_flags_fn_t) ndr_pull_echo_TestCall2,
1482 (ndr_print_function_t) ndr_print_echo_TestCall2,
1483 false,
1484 },
1485 {
1486 "echo_TestSleep",
1487 sizeof(struct echo_TestSleep),
1488 (ndr_push_flags_fn_t) ndr_push_echo_TestSleep,
1489 (ndr_pull_flags_fn_t) ndr_pull_echo_TestSleep,
1490 (ndr_print_function_t) ndr_print_echo_TestSleep,
1491 false,
1492 },
1493 {
1494 "echo_TestEnum",
1495 sizeof(struct echo_TestEnum),
1496 (ndr_push_flags_fn_t) ndr_push_echo_TestEnum,
1497 (ndr_pull_flags_fn_t) ndr_pull_echo_TestEnum,
1498 (ndr_print_function_t) ndr_print_echo_TestEnum,
1499 false,
1500 },
1501 {
1502 "echo_TestSurrounding",
1503 sizeof(struct echo_TestSurrounding),
1504 (ndr_push_flags_fn_t) ndr_push_echo_TestSurrounding,
1505 (ndr_pull_flags_fn_t) ndr_pull_echo_TestSurrounding,
1506 (ndr_print_function_t) ndr_print_echo_TestSurrounding,
1507 false,
1508 },
1509 {
1510 "echo_TestDoublePointer",
1511 sizeof(struct echo_TestDoublePointer),
1512 (ndr_push_flags_fn_t) ndr_push_echo_TestDoublePointer,
1513 (ndr_pull_flags_fn_t) ndr_pull_echo_TestDoublePointer,
1514 (ndr_print_function_t) ndr_print_echo_TestDoublePointer,
1515 false,
1516 },
1517 { NULL, 0, NULL, NULL, NULL, false }
1518};
1519
1520static const char * const rpcecho_endpoint_strings[] = {
1521 "ncacn_np:[\\pipe\\rpcecho]",
1522 "ncacn_ip_tcp:",
1523 "ncalrpc:",
1524};
1525
1526static const struct ndr_interface_string_array rpcecho_endpoints = {
1527 .count = 3,
1528 .names = rpcecho_endpoint_strings
1529};
1530
1531static const char * const rpcecho_authservice_strings[] = {
1532 "host",
1533};
1534
1535static const struct ndr_interface_string_array rpcecho_authservices = {
1536 .count = 1,
1537 .names = rpcecho_authservice_strings
1538};
1539
1540
1541const struct ndr_interface_table ndr_table_rpcecho = {
1542 .name = "rpcecho",
1543 .syntax_id = {
1544 {0x60a15ec5,0x4de8,0x11d7,{0xa6,0x37},{0x00,0x50,0x56,0xa2,0x01,0x82}},
1545 NDR_RPCECHO_VERSION
1546 },
1547 .helpstring = NDR_RPCECHO_HELPSTRING,
1548 .num_calls = 10,
1549 .calls = rpcecho_calls,
1550 .endpoints = &rpcecho_endpoints,
1551 .authservices = &rpcecho_authservices
1552};
1553
Note: See TracBrowser for help on using the repository browser.