gen_ndr
[metze/samba/wip.git] / bin.gen_ndr / default / librpc / gen_ndr / srv_frstrans.c
1 /*
2  * Unix SMB/CIFS implementation.
3  * server auto-generated by pidl. DO NOT MODIFY!
4  */
5
6 #include "includes.h"
7 #include "ntdomain.h"
8 #include "bin/default/librpc/gen_ndr/srv_frstrans.h"
9
10 static bool api_frstrans_CheckConnectivity(struct pipes_struct *p)
11 {
12         const struct ndr_interface_call *call;
13         struct ndr_pull *pull;
14         struct ndr_push *push;
15         enum ndr_err_code ndr_err;
16         struct frstrans_CheckConnectivity *r;
17
18         call = &ndr_table_frstrans.calls[NDR_FRSTRANS_CHECKCONNECTIVITY];
19
20         r = talloc(talloc_tos(), struct frstrans_CheckConnectivity);
21         if (r == NULL) {
22                 return false;
23         }
24
25         pull = ndr_pull_init_blob(&p->in_data.data, r);
26         if (pull == NULL) {
27                 talloc_free(r);
28                 return false;
29         }
30
31         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
32         if (p->endian) {
33                 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
34         }
35         ndr_err = call->ndr_pull(pull, NDR_IN, r);
36         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
37                 talloc_free(r);
38                 return false;
39         }
40
41         if (DEBUGLEVEL >= 10) {
42                 NDR_PRINT_FUNCTION_DEBUG(frstrans_CheckConnectivity, NDR_IN, r);
43         }
44
45         r->out.result = _frstrans_CheckConnectivity(p, r);
46
47         if (p->fault_state) {
48                 talloc_free(r);
49                 /* Return true here, srv_pipe_hnd.c will take care */
50                 return true;
51         }
52
53         if (DEBUGLEVEL >= 10) {
54                 NDR_PRINT_FUNCTION_DEBUG(frstrans_CheckConnectivity, NDR_OUT | NDR_SET_VALUES, r);
55         }
56
57         push = ndr_push_init_ctx(r);
58         if (push == NULL) {
59                 talloc_free(r);
60                 return false;
61         }
62
63         /*
64          * carry over the pointer count to the reply in case we are
65          * using full pointer. See NDR specification for full pointers
66          */
67         push->ptr_count = pull->ptr_count;
68
69         ndr_err = call->ndr_push(push, NDR_OUT, r);
70         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
71                 talloc_free(r);
72                 return false;
73         }
74
75         p->out_data.rdata = ndr_push_blob(push);
76         talloc_steal(p->mem_ctx, p->out_data.rdata.data);
77
78         talloc_free(r);
79
80         return true;
81 }
82
83 static bool api_frstrans_EstablishConnection(struct pipes_struct *p)
84 {
85         const struct ndr_interface_call *call;
86         struct ndr_pull *pull;
87         struct ndr_push *push;
88         enum ndr_err_code ndr_err;
89         struct frstrans_EstablishConnection *r;
90
91         call = &ndr_table_frstrans.calls[NDR_FRSTRANS_ESTABLISHCONNECTION];
92
93         r = talloc(talloc_tos(), struct frstrans_EstablishConnection);
94         if (r == NULL) {
95                 return false;
96         }
97
98         pull = ndr_pull_init_blob(&p->in_data.data, r);
99         if (pull == NULL) {
100                 talloc_free(r);
101                 return false;
102         }
103
104         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
105         if (p->endian) {
106                 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
107         }
108         ndr_err = call->ndr_pull(pull, NDR_IN, r);
109         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
110                 talloc_free(r);
111                 return false;
112         }
113
114         if (DEBUGLEVEL >= 10) {
115                 NDR_PRINT_FUNCTION_DEBUG(frstrans_EstablishConnection, NDR_IN, r);
116         }
117
118         ZERO_STRUCT(r->out);
119         r->out.upstream_protocol_version = talloc_zero(r, enum frstrans_ProtocolVersion);
120         if (r->out.upstream_protocol_version == NULL) {
121                 talloc_free(r);
122                 return false;
123         }
124
125         r->out.upstream_flags = talloc_zero(r, uint32_t);
126         if (r->out.upstream_flags == NULL) {
127                 talloc_free(r);
128                 return false;
129         }
130
131         r->out.result = _frstrans_EstablishConnection(p, r);
132
133         if (p->fault_state) {
134                 talloc_free(r);
135                 /* Return true here, srv_pipe_hnd.c will take care */
136                 return true;
137         }
138
139         if (DEBUGLEVEL >= 10) {
140                 NDR_PRINT_FUNCTION_DEBUG(frstrans_EstablishConnection, NDR_OUT | NDR_SET_VALUES, r);
141         }
142
143         push = ndr_push_init_ctx(r);
144         if (push == NULL) {
145                 talloc_free(r);
146                 return false;
147         }
148
149         /*
150          * carry over the pointer count to the reply in case we are
151          * using full pointer. See NDR specification for full pointers
152          */
153         push->ptr_count = pull->ptr_count;
154
155         ndr_err = call->ndr_push(push, NDR_OUT, r);
156         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
157                 talloc_free(r);
158                 return false;
159         }
160
161         p->out_data.rdata = ndr_push_blob(push);
162         talloc_steal(p->mem_ctx, p->out_data.rdata.data);
163
164         talloc_free(r);
165
166         return true;
167 }
168
169 static bool api_frstrans_EstablishSession(struct pipes_struct *p)
170 {
171         const struct ndr_interface_call *call;
172         struct ndr_pull *pull;
173         struct ndr_push *push;
174         enum ndr_err_code ndr_err;
175         struct frstrans_EstablishSession *r;
176
177         call = &ndr_table_frstrans.calls[NDR_FRSTRANS_ESTABLISHSESSION];
178
179         r = talloc(talloc_tos(), struct frstrans_EstablishSession);
180         if (r == NULL) {
181                 return false;
182         }
183
184         pull = ndr_pull_init_blob(&p->in_data.data, r);
185         if (pull == NULL) {
186                 talloc_free(r);
187                 return false;
188         }
189
190         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
191         if (p->endian) {
192                 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
193         }
194         ndr_err = call->ndr_pull(pull, NDR_IN, r);
195         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
196                 talloc_free(r);
197                 return false;
198         }
199
200         if (DEBUGLEVEL >= 10) {
201                 NDR_PRINT_FUNCTION_DEBUG(frstrans_EstablishSession, NDR_IN, r);
202         }
203
204         r->out.result = _frstrans_EstablishSession(p, r);
205
206         if (p->fault_state) {
207                 talloc_free(r);
208                 /* Return true here, srv_pipe_hnd.c will take care */
209                 return true;
210         }
211
212         if (DEBUGLEVEL >= 10) {
213                 NDR_PRINT_FUNCTION_DEBUG(frstrans_EstablishSession, NDR_OUT | NDR_SET_VALUES, r);
214         }
215
216         push = ndr_push_init_ctx(r);
217         if (push == NULL) {
218                 talloc_free(r);
219                 return false;
220         }
221
222         /*
223          * carry over the pointer count to the reply in case we are
224          * using full pointer. See NDR specification for full pointers
225          */
226         push->ptr_count = pull->ptr_count;
227
228         ndr_err = call->ndr_push(push, NDR_OUT, r);
229         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
230                 talloc_free(r);
231                 return false;
232         }
233
234         p->out_data.rdata = ndr_push_blob(push);
235         talloc_steal(p->mem_ctx, p->out_data.rdata.data);
236
237         talloc_free(r);
238
239         return true;
240 }
241
242 static bool api_frstrans_RequestUpdates(struct pipes_struct *p)
243 {
244         const struct ndr_interface_call *call;
245         struct ndr_pull *pull;
246         struct ndr_push *push;
247         enum ndr_err_code ndr_err;
248         struct frstrans_RequestUpdates *r;
249
250         call = &ndr_table_frstrans.calls[NDR_FRSTRANS_REQUESTUPDATES];
251
252         r = talloc(talloc_tos(), struct frstrans_RequestUpdates);
253         if (r == NULL) {
254                 return false;
255         }
256
257         pull = ndr_pull_init_blob(&p->in_data.data, r);
258         if (pull == NULL) {
259                 talloc_free(r);
260                 return false;
261         }
262
263         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
264         if (p->endian) {
265                 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
266         }
267         ndr_err = call->ndr_pull(pull, NDR_IN, r);
268         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
269                 talloc_free(r);
270                 return false;
271         }
272
273         if (DEBUGLEVEL >= 10) {
274                 NDR_PRINT_FUNCTION_DEBUG(frstrans_RequestUpdates, NDR_IN, r);
275         }
276
277         ZERO_STRUCT(r->out);
278         r->out.frs_update = talloc_zero_array(r, struct frstrans_Update, r->in.credits_available);
279         if (r->out.frs_update == NULL) {
280                 talloc_free(r);
281                 return false;
282         }
283
284         r->out.update_count = talloc_zero(r, uint32_t);
285         if (r->out.update_count == NULL) {
286                 talloc_free(r);
287                 return false;
288         }
289
290         r->out.update_status = talloc_zero(r, enum frstrans_UpdateStatus);
291         if (r->out.update_status == NULL) {
292                 talloc_free(r);
293                 return false;
294         }
295
296         r->out.gvsn_db_guid = talloc_zero(r, struct GUID);
297         if (r->out.gvsn_db_guid == NULL) {
298                 talloc_free(r);
299                 return false;
300         }
301
302         r->out.gvsn_version = talloc_zero(r, uint64_t);
303         if (r->out.gvsn_version == NULL) {
304                 talloc_free(r);
305                 return false;
306         }
307
308         r->out.result = _frstrans_RequestUpdates(p, r);
309
310         if (p->fault_state) {
311                 talloc_free(r);
312                 /* Return true here, srv_pipe_hnd.c will take care */
313                 return true;
314         }
315
316         if (DEBUGLEVEL >= 10) {
317                 NDR_PRINT_FUNCTION_DEBUG(frstrans_RequestUpdates, NDR_OUT | NDR_SET_VALUES, r);
318         }
319
320         push = ndr_push_init_ctx(r);
321         if (push == NULL) {
322                 talloc_free(r);
323                 return false;
324         }
325
326         /*
327          * carry over the pointer count to the reply in case we are
328          * using full pointer. See NDR specification for full pointers
329          */
330         push->ptr_count = pull->ptr_count;
331
332         ndr_err = call->ndr_push(push, NDR_OUT, r);
333         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
334                 talloc_free(r);
335                 return false;
336         }
337
338         p->out_data.rdata = ndr_push_blob(push);
339         talloc_steal(p->mem_ctx, p->out_data.rdata.data);
340
341         talloc_free(r);
342
343         return true;
344 }
345
346 static bool api_frstrans_RequestVersionVector(struct pipes_struct *p)
347 {
348         const struct ndr_interface_call *call;
349         struct ndr_pull *pull;
350         struct ndr_push *push;
351         enum ndr_err_code ndr_err;
352         struct frstrans_RequestVersionVector *r;
353
354         call = &ndr_table_frstrans.calls[NDR_FRSTRANS_REQUESTVERSIONVECTOR];
355
356         r = talloc(talloc_tos(), struct frstrans_RequestVersionVector);
357         if (r == NULL) {
358                 return false;
359         }
360
361         pull = ndr_pull_init_blob(&p->in_data.data, r);
362         if (pull == NULL) {
363                 talloc_free(r);
364                 return false;
365         }
366
367         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
368         if (p->endian) {
369                 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
370         }
371         ndr_err = call->ndr_pull(pull, NDR_IN, r);
372         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
373                 talloc_free(r);
374                 return false;
375         }
376
377         if (DEBUGLEVEL >= 10) {
378                 NDR_PRINT_FUNCTION_DEBUG(frstrans_RequestVersionVector, NDR_IN, r);
379         }
380
381         r->out.result = _frstrans_RequestVersionVector(p, r);
382
383         if (p->fault_state) {
384                 talloc_free(r);
385                 /* Return true here, srv_pipe_hnd.c will take care */
386                 return true;
387         }
388
389         if (DEBUGLEVEL >= 10) {
390                 NDR_PRINT_FUNCTION_DEBUG(frstrans_RequestVersionVector, NDR_OUT | NDR_SET_VALUES, r);
391         }
392
393         push = ndr_push_init_ctx(r);
394         if (push == NULL) {
395                 talloc_free(r);
396                 return false;
397         }
398
399         /*
400          * carry over the pointer count to the reply in case we are
401          * using full pointer. See NDR specification for full pointers
402          */
403         push->ptr_count = pull->ptr_count;
404
405         ndr_err = call->ndr_push(push, NDR_OUT, r);
406         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
407                 talloc_free(r);
408                 return false;
409         }
410
411         p->out_data.rdata = ndr_push_blob(push);
412         talloc_steal(p->mem_ctx, p->out_data.rdata.data);
413
414         talloc_free(r);
415
416         return true;
417 }
418
419 static bool api_frstrans_AsyncPoll(struct pipes_struct *p)
420 {
421         const struct ndr_interface_call *call;
422         struct ndr_pull *pull;
423         struct ndr_push *push;
424         enum ndr_err_code ndr_err;
425         struct frstrans_AsyncPoll *r;
426
427         call = &ndr_table_frstrans.calls[NDR_FRSTRANS_ASYNCPOLL];
428
429         r = talloc(talloc_tos(), struct frstrans_AsyncPoll);
430         if (r == NULL) {
431                 return false;
432         }
433
434         pull = ndr_pull_init_blob(&p->in_data.data, r);
435         if (pull == NULL) {
436                 talloc_free(r);
437                 return false;
438         }
439
440         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
441         if (p->endian) {
442                 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
443         }
444         ndr_err = call->ndr_pull(pull, NDR_IN, r);
445         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
446                 talloc_free(r);
447                 return false;
448         }
449
450         if (DEBUGLEVEL >= 10) {
451                 NDR_PRINT_FUNCTION_DEBUG(frstrans_AsyncPoll, NDR_IN, r);
452         }
453
454         ZERO_STRUCT(r->out);
455         r->out.response = talloc_zero(r, struct frstrans_AsyncResponseContext);
456         if (r->out.response == NULL) {
457                 talloc_free(r);
458                 return false;
459         }
460
461         r->out.result = _frstrans_AsyncPoll(p, r);
462
463         if (p->fault_state) {
464                 talloc_free(r);
465                 /* Return true here, srv_pipe_hnd.c will take care */
466                 return true;
467         }
468
469         if (DEBUGLEVEL >= 10) {
470                 NDR_PRINT_FUNCTION_DEBUG(frstrans_AsyncPoll, NDR_OUT | NDR_SET_VALUES, r);
471         }
472
473         push = ndr_push_init_ctx(r);
474         if (push == NULL) {
475                 talloc_free(r);
476                 return false;
477         }
478
479         /*
480          * carry over the pointer count to the reply in case we are
481          * using full pointer. See NDR specification for full pointers
482          */
483         push->ptr_count = pull->ptr_count;
484
485         ndr_err = call->ndr_push(push, NDR_OUT, r);
486         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
487                 talloc_free(r);
488                 return false;
489         }
490
491         p->out_data.rdata = ndr_push_blob(push);
492         talloc_steal(p->mem_ctx, p->out_data.rdata.data);
493
494         talloc_free(r);
495
496         return true;
497 }
498
499 static bool api_FRSTRANS_REQUEST_RECORDS(struct pipes_struct *p)
500 {
501         const struct ndr_interface_call *call;
502         struct ndr_pull *pull;
503         struct ndr_push *push;
504         enum ndr_err_code ndr_err;
505         struct FRSTRANS_REQUEST_RECORDS *r;
506
507         call = &ndr_table_frstrans.calls[NDR_FRSTRANS_REQUEST_RECORDS];
508
509         r = talloc(talloc_tos(), struct FRSTRANS_REQUEST_RECORDS);
510         if (r == NULL) {
511                 return false;
512         }
513
514         pull = ndr_pull_init_blob(&p->in_data.data, r);
515         if (pull == NULL) {
516                 talloc_free(r);
517                 return false;
518         }
519
520         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
521         if (p->endian) {
522                 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
523         }
524         ndr_err = call->ndr_pull(pull, NDR_IN, r);
525         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
526                 talloc_free(r);
527                 return false;
528         }
529
530         if (DEBUGLEVEL >= 10) {
531                 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_REQUEST_RECORDS, NDR_IN, r);
532         }
533
534         _FRSTRANS_REQUEST_RECORDS(p, r);
535
536         if (p->fault_state) {
537                 talloc_free(r);
538                 /* Return true here, srv_pipe_hnd.c will take care */
539                 return true;
540         }
541
542         if (DEBUGLEVEL >= 10) {
543                 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_REQUEST_RECORDS, NDR_OUT | NDR_SET_VALUES, r);
544         }
545
546         push = ndr_push_init_ctx(r);
547         if (push == NULL) {
548                 talloc_free(r);
549                 return false;
550         }
551
552         /*
553          * carry over the pointer count to the reply in case we are
554          * using full pointer. See NDR specification for full pointers
555          */
556         push->ptr_count = pull->ptr_count;
557
558         ndr_err = call->ndr_push(push, NDR_OUT, r);
559         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
560                 talloc_free(r);
561                 return false;
562         }
563
564         p->out_data.rdata = ndr_push_blob(push);
565         talloc_steal(p->mem_ctx, p->out_data.rdata.data);
566
567         talloc_free(r);
568
569         return true;
570 }
571
572 static bool api_FRSTRANS_UPDATE_CANCEL(struct pipes_struct *p)
573 {
574         const struct ndr_interface_call *call;
575         struct ndr_pull *pull;
576         struct ndr_push *push;
577         enum ndr_err_code ndr_err;
578         struct FRSTRANS_UPDATE_CANCEL *r;
579
580         call = &ndr_table_frstrans.calls[NDR_FRSTRANS_UPDATE_CANCEL];
581
582         r = talloc(talloc_tos(), struct FRSTRANS_UPDATE_CANCEL);
583         if (r == NULL) {
584                 return false;
585         }
586
587         pull = ndr_pull_init_blob(&p->in_data.data, r);
588         if (pull == NULL) {
589                 talloc_free(r);
590                 return false;
591         }
592
593         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
594         if (p->endian) {
595                 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
596         }
597         ndr_err = call->ndr_pull(pull, NDR_IN, r);
598         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
599                 talloc_free(r);
600                 return false;
601         }
602
603         if (DEBUGLEVEL >= 10) {
604                 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_UPDATE_CANCEL, NDR_IN, r);
605         }
606
607         _FRSTRANS_UPDATE_CANCEL(p, r);
608
609         if (p->fault_state) {
610                 talloc_free(r);
611                 /* Return true here, srv_pipe_hnd.c will take care */
612                 return true;
613         }
614
615         if (DEBUGLEVEL >= 10) {
616                 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_UPDATE_CANCEL, NDR_OUT | NDR_SET_VALUES, r);
617         }
618
619         push = ndr_push_init_ctx(r);
620         if (push == NULL) {
621                 talloc_free(r);
622                 return false;
623         }
624
625         /*
626          * carry over the pointer count to the reply in case we are
627          * using full pointer. See NDR specification for full pointers
628          */
629         push->ptr_count = pull->ptr_count;
630
631         ndr_err = call->ndr_push(push, NDR_OUT, r);
632         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
633                 talloc_free(r);
634                 return false;
635         }
636
637         p->out_data.rdata = ndr_push_blob(push);
638         talloc_steal(p->mem_ctx, p->out_data.rdata.data);
639
640         talloc_free(r);
641
642         return true;
643 }
644
645 static bool api_FRSTRANS_RAW_GET_FILE_DATA(struct pipes_struct *p)
646 {
647         const struct ndr_interface_call *call;
648         struct ndr_pull *pull;
649         struct ndr_push *push;
650         enum ndr_err_code ndr_err;
651         struct FRSTRANS_RAW_GET_FILE_DATA *r;
652
653         call = &ndr_table_frstrans.calls[NDR_FRSTRANS_RAW_GET_FILE_DATA];
654
655         r = talloc(talloc_tos(), struct FRSTRANS_RAW_GET_FILE_DATA);
656         if (r == NULL) {
657                 return false;
658         }
659
660         pull = ndr_pull_init_blob(&p->in_data.data, r);
661         if (pull == NULL) {
662                 talloc_free(r);
663                 return false;
664         }
665
666         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
667         if (p->endian) {
668                 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
669         }
670         ndr_err = call->ndr_pull(pull, NDR_IN, r);
671         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
672                 talloc_free(r);
673                 return false;
674         }
675
676         if (DEBUGLEVEL >= 10) {
677                 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RAW_GET_FILE_DATA, NDR_IN, r);
678         }
679
680         _FRSTRANS_RAW_GET_FILE_DATA(p, r);
681
682         if (p->fault_state) {
683                 talloc_free(r);
684                 /* Return true here, srv_pipe_hnd.c will take care */
685                 return true;
686         }
687
688         if (DEBUGLEVEL >= 10) {
689                 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RAW_GET_FILE_DATA, NDR_OUT | NDR_SET_VALUES, r);
690         }
691
692         push = ndr_push_init_ctx(r);
693         if (push == NULL) {
694                 talloc_free(r);
695                 return false;
696         }
697
698         /*
699          * carry over the pointer count to the reply in case we are
700          * using full pointer. See NDR specification for full pointers
701          */
702         push->ptr_count = pull->ptr_count;
703
704         ndr_err = call->ndr_push(push, NDR_OUT, r);
705         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
706                 talloc_free(r);
707                 return false;
708         }
709
710         p->out_data.rdata = ndr_push_blob(push);
711         talloc_steal(p->mem_ctx, p->out_data.rdata.data);
712
713         talloc_free(r);
714
715         return true;
716 }
717
718 static bool api_FRSTRANS_RDC_GET_SIGNATURES(struct pipes_struct *p)
719 {
720         const struct ndr_interface_call *call;
721         struct ndr_pull *pull;
722         struct ndr_push *push;
723         enum ndr_err_code ndr_err;
724         struct FRSTRANS_RDC_GET_SIGNATURES *r;
725
726         call = &ndr_table_frstrans.calls[NDR_FRSTRANS_RDC_GET_SIGNATURES];
727
728         r = talloc(talloc_tos(), struct FRSTRANS_RDC_GET_SIGNATURES);
729         if (r == NULL) {
730                 return false;
731         }
732
733         pull = ndr_pull_init_blob(&p->in_data.data, r);
734         if (pull == NULL) {
735                 talloc_free(r);
736                 return false;
737         }
738
739         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
740         if (p->endian) {
741                 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
742         }
743         ndr_err = call->ndr_pull(pull, NDR_IN, r);
744         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
745                 talloc_free(r);
746                 return false;
747         }
748
749         if (DEBUGLEVEL >= 10) {
750                 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RDC_GET_SIGNATURES, NDR_IN, r);
751         }
752
753         _FRSTRANS_RDC_GET_SIGNATURES(p, r);
754
755         if (p->fault_state) {
756                 talloc_free(r);
757                 /* Return true here, srv_pipe_hnd.c will take care */
758                 return true;
759         }
760
761         if (DEBUGLEVEL >= 10) {
762                 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RDC_GET_SIGNATURES, NDR_OUT | NDR_SET_VALUES, r);
763         }
764
765         push = ndr_push_init_ctx(r);
766         if (push == NULL) {
767                 talloc_free(r);
768                 return false;
769         }
770
771         /*
772          * carry over the pointer count to the reply in case we are
773          * using full pointer. See NDR specification for full pointers
774          */
775         push->ptr_count = pull->ptr_count;
776
777         ndr_err = call->ndr_push(push, NDR_OUT, r);
778         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
779                 talloc_free(r);
780                 return false;
781         }
782
783         p->out_data.rdata = ndr_push_blob(push);
784         talloc_steal(p->mem_ctx, p->out_data.rdata.data);
785
786         talloc_free(r);
787
788         return true;
789 }
790
791 static bool api_FRSTRANS_RDC_PUSH_SOURCE_NEEDS(struct pipes_struct *p)
792 {
793         const struct ndr_interface_call *call;
794         struct ndr_pull *pull;
795         struct ndr_push *push;
796         enum ndr_err_code ndr_err;
797         struct FRSTRANS_RDC_PUSH_SOURCE_NEEDS *r;
798
799         call = &ndr_table_frstrans.calls[NDR_FRSTRANS_RDC_PUSH_SOURCE_NEEDS];
800
801         r = talloc(talloc_tos(), struct FRSTRANS_RDC_PUSH_SOURCE_NEEDS);
802         if (r == NULL) {
803                 return false;
804         }
805
806         pull = ndr_pull_init_blob(&p->in_data.data, r);
807         if (pull == NULL) {
808                 talloc_free(r);
809                 return false;
810         }
811
812         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
813         if (p->endian) {
814                 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
815         }
816         ndr_err = call->ndr_pull(pull, NDR_IN, r);
817         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
818                 talloc_free(r);
819                 return false;
820         }
821
822         if (DEBUGLEVEL >= 10) {
823                 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RDC_PUSH_SOURCE_NEEDS, NDR_IN, r);
824         }
825
826         _FRSTRANS_RDC_PUSH_SOURCE_NEEDS(p, r);
827
828         if (p->fault_state) {
829                 talloc_free(r);
830                 /* Return true here, srv_pipe_hnd.c will take care */
831                 return true;
832         }
833
834         if (DEBUGLEVEL >= 10) {
835                 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RDC_PUSH_SOURCE_NEEDS, NDR_OUT | NDR_SET_VALUES, r);
836         }
837
838         push = ndr_push_init_ctx(r);
839         if (push == NULL) {
840                 talloc_free(r);
841                 return false;
842         }
843
844         /*
845          * carry over the pointer count to the reply in case we are
846          * using full pointer. See NDR specification for full pointers
847          */
848         push->ptr_count = pull->ptr_count;
849
850         ndr_err = call->ndr_push(push, NDR_OUT, r);
851         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
852                 talloc_free(r);
853                 return false;
854         }
855
856         p->out_data.rdata = ndr_push_blob(push);
857         talloc_steal(p->mem_ctx, p->out_data.rdata.data);
858
859         talloc_free(r);
860
861         return true;
862 }
863
864 static bool api_FRSTRANS_RDC_GET_FILE_DATA(struct pipes_struct *p)
865 {
866         const struct ndr_interface_call *call;
867         struct ndr_pull *pull;
868         struct ndr_push *push;
869         enum ndr_err_code ndr_err;
870         struct FRSTRANS_RDC_GET_FILE_DATA *r;
871
872         call = &ndr_table_frstrans.calls[NDR_FRSTRANS_RDC_GET_FILE_DATA];
873
874         r = talloc(talloc_tos(), struct FRSTRANS_RDC_GET_FILE_DATA);
875         if (r == NULL) {
876                 return false;
877         }
878
879         pull = ndr_pull_init_blob(&p->in_data.data, r);
880         if (pull == NULL) {
881                 talloc_free(r);
882                 return false;
883         }
884
885         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
886         if (p->endian) {
887                 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
888         }
889         ndr_err = call->ndr_pull(pull, NDR_IN, r);
890         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
891                 talloc_free(r);
892                 return false;
893         }
894
895         if (DEBUGLEVEL >= 10) {
896                 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RDC_GET_FILE_DATA, NDR_IN, r);
897         }
898
899         _FRSTRANS_RDC_GET_FILE_DATA(p, r);
900
901         if (p->fault_state) {
902                 talloc_free(r);
903                 /* Return true here, srv_pipe_hnd.c will take care */
904                 return true;
905         }
906
907         if (DEBUGLEVEL >= 10) {
908                 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RDC_GET_FILE_DATA, NDR_OUT | NDR_SET_VALUES, r);
909         }
910
911         push = ndr_push_init_ctx(r);
912         if (push == NULL) {
913                 talloc_free(r);
914                 return false;
915         }
916
917         /*
918          * carry over the pointer count to the reply in case we are
919          * using full pointer. See NDR specification for full pointers
920          */
921         push->ptr_count = pull->ptr_count;
922
923         ndr_err = call->ndr_push(push, NDR_OUT, r);
924         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
925                 talloc_free(r);
926                 return false;
927         }
928
929         p->out_data.rdata = ndr_push_blob(push);
930         talloc_steal(p->mem_ctx, p->out_data.rdata.data);
931
932         talloc_free(r);
933
934         return true;
935 }
936
937 static bool api_FRSTRANS_RDC_CLOSE(struct pipes_struct *p)
938 {
939         const struct ndr_interface_call *call;
940         struct ndr_pull *pull;
941         struct ndr_push *push;
942         enum ndr_err_code ndr_err;
943         struct FRSTRANS_RDC_CLOSE *r;
944
945         call = &ndr_table_frstrans.calls[NDR_FRSTRANS_RDC_CLOSE];
946
947         r = talloc(talloc_tos(), struct FRSTRANS_RDC_CLOSE);
948         if (r == NULL) {
949                 return false;
950         }
951
952         pull = ndr_pull_init_blob(&p->in_data.data, r);
953         if (pull == NULL) {
954                 talloc_free(r);
955                 return false;
956         }
957
958         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
959         if (p->endian) {
960                 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
961         }
962         ndr_err = call->ndr_pull(pull, NDR_IN, r);
963         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
964                 talloc_free(r);
965                 return false;
966         }
967
968         if (DEBUGLEVEL >= 10) {
969                 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RDC_CLOSE, NDR_IN, r);
970         }
971
972         _FRSTRANS_RDC_CLOSE(p, r);
973
974         if (p->fault_state) {
975                 talloc_free(r);
976                 /* Return true here, srv_pipe_hnd.c will take care */
977                 return true;
978         }
979
980         if (DEBUGLEVEL >= 10) {
981                 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RDC_CLOSE, NDR_OUT | NDR_SET_VALUES, r);
982         }
983
984         push = ndr_push_init_ctx(r);
985         if (push == NULL) {
986                 talloc_free(r);
987                 return false;
988         }
989
990         /*
991          * carry over the pointer count to the reply in case we are
992          * using full pointer. See NDR specification for full pointers
993          */
994         push->ptr_count = pull->ptr_count;
995
996         ndr_err = call->ndr_push(push, NDR_OUT, r);
997         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
998                 talloc_free(r);
999                 return false;
1000         }
1001
1002         p->out_data.rdata = ndr_push_blob(push);
1003         talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1004
1005         talloc_free(r);
1006
1007         return true;
1008 }
1009
1010 static bool api_frstrans_InitializeFileTransferAsync(struct pipes_struct *p)
1011 {
1012         const struct ndr_interface_call *call;
1013         struct ndr_pull *pull;
1014         struct ndr_push *push;
1015         enum ndr_err_code ndr_err;
1016         struct frstrans_InitializeFileTransferAsync *r;
1017
1018         call = &ndr_table_frstrans.calls[NDR_FRSTRANS_INITIALIZEFILETRANSFERASYNC];
1019
1020         r = talloc(talloc_tos(), struct frstrans_InitializeFileTransferAsync);
1021         if (r == NULL) {
1022                 return false;
1023         }
1024
1025         pull = ndr_pull_init_blob(&p->in_data.data, r);
1026         if (pull == NULL) {
1027                 talloc_free(r);
1028                 return false;
1029         }
1030
1031         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1032         if (p->endian) {
1033                 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
1034         }
1035         ndr_err = call->ndr_pull(pull, NDR_IN, r);
1036         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1037                 talloc_free(r);
1038                 return false;
1039         }
1040
1041         if (DEBUGLEVEL >= 10) {
1042                 NDR_PRINT_FUNCTION_DEBUG(frstrans_InitializeFileTransferAsync, NDR_IN, r);
1043         }
1044
1045         ZERO_STRUCT(r->out);
1046         r->out.frs_update = r->in.frs_update;
1047         r->out.staging_policy = r->in.staging_policy;
1048         r->out.server_context = talloc_zero(r, struct policy_handle);
1049         if (r->out.server_context == NULL) {
1050                 talloc_free(r);
1051                 return false;
1052         }
1053
1054         r->out.rdc_file_info = talloc_zero(r, struct frstrans_RdcFileInfo *);
1055         if (r->out.rdc_file_info == NULL) {
1056                 talloc_free(r);
1057                 return false;
1058         }
1059
1060         r->out.data_buffer = talloc_zero_array(r, uint8_t, r->in.buffer_size);
1061         if (r->out.data_buffer == NULL) {
1062                 talloc_free(r);
1063                 return false;
1064         }
1065
1066         r->out.size_read = talloc_zero(r, uint32_t);
1067         if (r->out.size_read == NULL) {
1068                 talloc_free(r);
1069                 return false;
1070         }
1071
1072         r->out.is_end_of_file = talloc_zero(r, uint32_t);
1073         if (r->out.is_end_of_file == NULL) {
1074                 talloc_free(r);
1075                 return false;
1076         }
1077
1078         r->out.result = _frstrans_InitializeFileTransferAsync(p, r);
1079
1080         if (p->fault_state) {
1081                 talloc_free(r);
1082                 /* Return true here, srv_pipe_hnd.c will take care */
1083                 return true;
1084         }
1085
1086         if (DEBUGLEVEL >= 10) {
1087                 NDR_PRINT_FUNCTION_DEBUG(frstrans_InitializeFileTransferAsync, NDR_OUT | NDR_SET_VALUES, r);
1088         }
1089
1090         push = ndr_push_init_ctx(r);
1091         if (push == NULL) {
1092                 talloc_free(r);
1093                 return false;
1094         }
1095
1096         /*
1097          * carry over the pointer count to the reply in case we are
1098          * using full pointer. See NDR specification for full pointers
1099          */
1100         push->ptr_count = pull->ptr_count;
1101
1102         ndr_err = call->ndr_push(push, NDR_OUT, r);
1103         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1104                 talloc_free(r);
1105                 return false;
1106         }
1107
1108         p->out_data.rdata = ndr_push_blob(push);
1109         talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1110
1111         talloc_free(r);
1112
1113         return true;
1114 }
1115
1116 static bool api_FRSTRANS_OPNUM_0E_NOT_USED_ON_THE_WIRE(struct pipes_struct *p)
1117 {
1118         const struct ndr_interface_call *call;
1119         struct ndr_pull *pull;
1120         struct ndr_push *push;
1121         enum ndr_err_code ndr_err;
1122         struct FRSTRANS_OPNUM_0E_NOT_USED_ON_THE_WIRE *r;
1123
1124         call = &ndr_table_frstrans.calls[NDR_FRSTRANS_OPNUM_0E_NOT_USED_ON_THE_WIRE];
1125
1126         r = talloc(talloc_tos(), struct FRSTRANS_OPNUM_0E_NOT_USED_ON_THE_WIRE);
1127         if (r == NULL) {
1128                 return false;
1129         }
1130
1131         pull = ndr_pull_init_blob(&p->in_data.data, r);
1132         if (pull == NULL) {
1133                 talloc_free(r);
1134                 return false;
1135         }
1136
1137         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1138         if (p->endian) {
1139                 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
1140         }
1141         ndr_err = call->ndr_pull(pull, NDR_IN, r);
1142         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1143                 talloc_free(r);
1144                 return false;
1145         }
1146
1147         if (DEBUGLEVEL >= 10) {
1148                 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_OPNUM_0E_NOT_USED_ON_THE_WIRE, NDR_IN, r);
1149         }
1150
1151         _FRSTRANS_OPNUM_0E_NOT_USED_ON_THE_WIRE(p, r);
1152
1153         if (p->fault_state) {
1154                 talloc_free(r);
1155                 /* Return true here, srv_pipe_hnd.c will take care */
1156                 return true;
1157         }
1158
1159         if (DEBUGLEVEL >= 10) {
1160                 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_OPNUM_0E_NOT_USED_ON_THE_WIRE, NDR_OUT | NDR_SET_VALUES, r);
1161         }
1162
1163         push = ndr_push_init_ctx(r);
1164         if (push == NULL) {
1165                 talloc_free(r);
1166                 return false;
1167         }
1168
1169         /*
1170          * carry over the pointer count to the reply in case we are
1171          * using full pointer. See NDR specification for full pointers
1172          */
1173         push->ptr_count = pull->ptr_count;
1174
1175         ndr_err = call->ndr_push(push, NDR_OUT, r);
1176         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1177                 talloc_free(r);
1178                 return false;
1179         }
1180
1181         p->out_data.rdata = ndr_push_blob(push);
1182         talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1183
1184         talloc_free(r);
1185
1186         return true;
1187 }
1188
1189 static bool api_frstrans_RawGetFileDataAsync(struct pipes_struct *p)
1190 {
1191         const struct ndr_interface_call *call;
1192         struct ndr_pull *pull;
1193         struct ndr_push *push;
1194         enum ndr_err_code ndr_err;
1195         struct frstrans_RawGetFileDataAsync *r;
1196
1197         call = &ndr_table_frstrans.calls[NDR_FRSTRANS_RAWGETFILEDATAASYNC];
1198
1199         r = talloc(talloc_tos(), struct frstrans_RawGetFileDataAsync);
1200         if (r == NULL) {
1201                 return false;
1202         }
1203
1204         pull = ndr_pull_init_blob(&p->in_data.data, r);
1205         if (pull == NULL) {
1206                 talloc_free(r);
1207                 return false;
1208         }
1209
1210         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1211         if (p->endian) {
1212                 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
1213         }
1214         ndr_err = call->ndr_pull(pull, NDR_IN, r);
1215         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1216                 talloc_free(r);
1217                 return false;
1218         }
1219
1220         if (DEBUGLEVEL >= 10) {
1221                 NDR_PRINT_FUNCTION_DEBUG(frstrans_RawGetFileDataAsync, NDR_IN, r);
1222         }
1223
1224         ZERO_STRUCT(r->out);
1225         r->out.result = _frstrans_RawGetFileDataAsync(p, r);
1226
1227         if (p->fault_state) {
1228                 talloc_free(r);
1229                 /* Return true here, srv_pipe_hnd.c will take care */
1230                 return true;
1231         }
1232
1233         if (DEBUGLEVEL >= 10) {
1234                 NDR_PRINT_FUNCTION_DEBUG(frstrans_RawGetFileDataAsync, NDR_OUT | NDR_SET_VALUES, r);
1235         }
1236
1237         push = ndr_push_init_ctx(r);
1238         if (push == NULL) {
1239                 talloc_free(r);
1240                 return false;
1241         }
1242
1243         /*
1244          * carry over the pointer count to the reply in case we are
1245          * using full pointer. See NDR specification for full pointers
1246          */
1247         push->ptr_count = pull->ptr_count;
1248
1249         ndr_err = call->ndr_push(push, NDR_OUT, r);
1250         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1251                 talloc_free(r);
1252                 return false;
1253         }
1254
1255         p->out_data.rdata = ndr_push_blob(push);
1256         talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1257
1258         talloc_free(r);
1259
1260         return true;
1261 }
1262
1263 static bool api_frstrans_RdcGetFileDataAsync(struct pipes_struct *p)
1264 {
1265         const struct ndr_interface_call *call;
1266         struct ndr_pull *pull;
1267         struct ndr_push *push;
1268         enum ndr_err_code ndr_err;
1269         struct frstrans_RdcGetFileDataAsync *r;
1270
1271         call = &ndr_table_frstrans.calls[NDR_FRSTRANS_RDCGETFILEDATAASYNC];
1272
1273         r = talloc(talloc_tos(), struct frstrans_RdcGetFileDataAsync);
1274         if (r == NULL) {
1275                 return false;
1276         }
1277
1278         pull = ndr_pull_init_blob(&p->in_data.data, r);
1279         if (pull == NULL) {
1280                 talloc_free(r);
1281                 return false;
1282         }
1283
1284         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1285         if (p->endian) {
1286                 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
1287         }
1288         ndr_err = call->ndr_pull(pull, NDR_IN, r);
1289         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1290                 talloc_free(r);
1291                 return false;
1292         }
1293
1294         if (DEBUGLEVEL >= 10) {
1295                 NDR_PRINT_FUNCTION_DEBUG(frstrans_RdcGetFileDataAsync, NDR_IN, r);
1296         }
1297
1298         ZERO_STRUCT(r->out);
1299         r->out.result = _frstrans_RdcGetFileDataAsync(p, r);
1300
1301         if (p->fault_state) {
1302                 talloc_free(r);
1303                 /* Return true here, srv_pipe_hnd.c will take care */
1304                 return true;
1305         }
1306
1307         if (DEBUGLEVEL >= 10) {
1308                 NDR_PRINT_FUNCTION_DEBUG(frstrans_RdcGetFileDataAsync, NDR_OUT | NDR_SET_VALUES, r);
1309         }
1310
1311         push = ndr_push_init_ctx(r);
1312         if (push == NULL) {
1313                 talloc_free(r);
1314                 return false;
1315         }
1316
1317         /*
1318          * carry over the pointer count to the reply in case we are
1319          * using full pointer. See NDR specification for full pointers
1320          */
1321         push->ptr_count = pull->ptr_count;
1322
1323         ndr_err = call->ndr_push(push, NDR_OUT, r);
1324         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1325                 talloc_free(r);
1326                 return false;
1327         }
1328
1329         p->out_data.rdata = ndr_push_blob(push);
1330         talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1331
1332         talloc_free(r);
1333
1334         return true;
1335 }
1336
1337
1338 /* Tables */
1339 static struct api_struct api_frstrans_cmds[] = 
1340 {
1341         {"FRSTRANS_CHECKCONNECTIVITY", NDR_FRSTRANS_CHECKCONNECTIVITY, api_frstrans_CheckConnectivity},
1342         {"FRSTRANS_ESTABLISHCONNECTION", NDR_FRSTRANS_ESTABLISHCONNECTION, api_frstrans_EstablishConnection},
1343         {"FRSTRANS_ESTABLISHSESSION", NDR_FRSTRANS_ESTABLISHSESSION, api_frstrans_EstablishSession},
1344         {"FRSTRANS_REQUESTUPDATES", NDR_FRSTRANS_REQUESTUPDATES, api_frstrans_RequestUpdates},
1345         {"FRSTRANS_REQUESTVERSIONVECTOR", NDR_FRSTRANS_REQUESTVERSIONVECTOR, api_frstrans_RequestVersionVector},
1346         {"FRSTRANS_ASYNCPOLL", NDR_FRSTRANS_ASYNCPOLL, api_frstrans_AsyncPoll},
1347         {"FRSTRANS_REQUEST_RECORDS", NDR_FRSTRANS_REQUEST_RECORDS, api_FRSTRANS_REQUEST_RECORDS},
1348         {"FRSTRANS_UPDATE_CANCEL", NDR_FRSTRANS_UPDATE_CANCEL, api_FRSTRANS_UPDATE_CANCEL},
1349         {"FRSTRANS_RAW_GET_FILE_DATA", NDR_FRSTRANS_RAW_GET_FILE_DATA, api_FRSTRANS_RAW_GET_FILE_DATA},
1350         {"FRSTRANS_RDC_GET_SIGNATURES", NDR_FRSTRANS_RDC_GET_SIGNATURES, api_FRSTRANS_RDC_GET_SIGNATURES},
1351         {"FRSTRANS_RDC_PUSH_SOURCE_NEEDS", NDR_FRSTRANS_RDC_PUSH_SOURCE_NEEDS, api_FRSTRANS_RDC_PUSH_SOURCE_NEEDS},
1352         {"FRSTRANS_RDC_GET_FILE_DATA", NDR_FRSTRANS_RDC_GET_FILE_DATA, api_FRSTRANS_RDC_GET_FILE_DATA},
1353         {"FRSTRANS_RDC_CLOSE", NDR_FRSTRANS_RDC_CLOSE, api_FRSTRANS_RDC_CLOSE},
1354         {"FRSTRANS_INITIALIZEFILETRANSFERASYNC", NDR_FRSTRANS_INITIALIZEFILETRANSFERASYNC, api_frstrans_InitializeFileTransferAsync},
1355         {"FRSTRANS_OPNUM_0E_NOT_USED_ON_THE_WIRE", NDR_FRSTRANS_OPNUM_0E_NOT_USED_ON_THE_WIRE, api_FRSTRANS_OPNUM_0E_NOT_USED_ON_THE_WIRE},
1356         {"FRSTRANS_RAWGETFILEDATAASYNC", NDR_FRSTRANS_RAWGETFILEDATAASYNC, api_frstrans_RawGetFileDataAsync},
1357         {"FRSTRANS_RDCGETFILEDATAASYNC", NDR_FRSTRANS_RDCGETFILEDATAASYNC, api_frstrans_RdcGetFileDataAsync},
1358 };
1359
1360 void frstrans_get_pipe_fns(struct api_struct **fns, int *n_fns)
1361 {
1362         *fns = api_frstrans_cmds;
1363         *n_fns = sizeof(api_frstrans_cmds) / sizeof(struct api_struct);
1364 }
1365
1366 NTSTATUS rpc_frstrans_init(const struct rpc_srv_callbacks *rpc_srv_cb)
1367 {
1368         return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "frstrans", "frstrans", &ndr_table_frstrans, api_frstrans_cmds, sizeof(api_frstrans_cmds) / sizeof(struct api_struct), rpc_srv_cb);
1369 }
1370
1371 NTSTATUS rpc_frstrans_shutdown(void)
1372 {
1373         return rpc_srv_unregister(&ndr_table_frstrans);
1374 }