2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
8 #include "bin/default/librpc/gen_ndr/srv_frstrans.h"
10 static bool api_frstrans_CheckConnectivity(struct pipes_struct *p)
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;
18 call = &ndr_table_frstrans.calls[NDR_FRSTRANS_CHECKCONNECTIVITY];
20 r = talloc(talloc_tos(), struct frstrans_CheckConnectivity);
25 pull = ndr_pull_init_blob(&p->in_data.data, r);
31 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
33 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
35 ndr_err = call->ndr_pull(pull, NDR_IN, r);
36 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
41 if (DEBUGLEVEL >= 10) {
42 NDR_PRINT_FUNCTION_DEBUG(frstrans_CheckConnectivity, NDR_IN, r);
45 r->out.result = _frstrans_CheckConnectivity(p, r);
49 /* Return true here, srv_pipe_hnd.c will take care */
53 if (DEBUGLEVEL >= 10) {
54 NDR_PRINT_FUNCTION_DEBUG(frstrans_CheckConnectivity, NDR_OUT | NDR_SET_VALUES, r);
57 push = ndr_push_init_ctx(r);
64 * carry over the pointer count to the reply in case we are
65 * using full pointer. See NDR specification for full pointers
67 push->ptr_count = pull->ptr_count;
69 ndr_err = call->ndr_push(push, NDR_OUT, r);
70 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
75 p->out_data.rdata = ndr_push_blob(push);
76 talloc_steal(p->mem_ctx, p->out_data.rdata.data);
83 static bool api_frstrans_EstablishConnection(struct pipes_struct *p)
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;
91 call = &ndr_table_frstrans.calls[NDR_FRSTRANS_ESTABLISHCONNECTION];
93 r = talloc(talloc_tos(), struct frstrans_EstablishConnection);
98 pull = ndr_pull_init_blob(&p->in_data.data, r);
104 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
106 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
108 ndr_err = call->ndr_pull(pull, NDR_IN, r);
109 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
114 if (DEBUGLEVEL >= 10) {
115 NDR_PRINT_FUNCTION_DEBUG(frstrans_EstablishConnection, NDR_IN, r);
119 r->out.upstream_protocol_version = talloc_zero(r, enum frstrans_ProtocolVersion);
120 if (r->out.upstream_protocol_version == NULL) {
125 r->out.upstream_flags = talloc_zero(r, uint32_t);
126 if (r->out.upstream_flags == NULL) {
131 r->out.result = _frstrans_EstablishConnection(p, r);
133 if (p->fault_state) {
135 /* Return true here, srv_pipe_hnd.c will take care */
139 if (DEBUGLEVEL >= 10) {
140 NDR_PRINT_FUNCTION_DEBUG(frstrans_EstablishConnection, NDR_OUT | NDR_SET_VALUES, r);
143 push = ndr_push_init_ctx(r);
150 * carry over the pointer count to the reply in case we are
151 * using full pointer. See NDR specification for full pointers
153 push->ptr_count = pull->ptr_count;
155 ndr_err = call->ndr_push(push, NDR_OUT, r);
156 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
161 p->out_data.rdata = ndr_push_blob(push);
162 talloc_steal(p->mem_ctx, p->out_data.rdata.data);
169 static bool api_frstrans_EstablishSession(struct pipes_struct *p)
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;
177 call = &ndr_table_frstrans.calls[NDR_FRSTRANS_ESTABLISHSESSION];
179 r = talloc(talloc_tos(), struct frstrans_EstablishSession);
184 pull = ndr_pull_init_blob(&p->in_data.data, r);
190 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
192 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
194 ndr_err = call->ndr_pull(pull, NDR_IN, r);
195 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
200 if (DEBUGLEVEL >= 10) {
201 NDR_PRINT_FUNCTION_DEBUG(frstrans_EstablishSession, NDR_IN, r);
204 r->out.result = _frstrans_EstablishSession(p, r);
206 if (p->fault_state) {
208 /* Return true here, srv_pipe_hnd.c will take care */
212 if (DEBUGLEVEL >= 10) {
213 NDR_PRINT_FUNCTION_DEBUG(frstrans_EstablishSession, NDR_OUT | NDR_SET_VALUES, r);
216 push = ndr_push_init_ctx(r);
223 * carry over the pointer count to the reply in case we are
224 * using full pointer. See NDR specification for full pointers
226 push->ptr_count = pull->ptr_count;
228 ndr_err = call->ndr_push(push, NDR_OUT, r);
229 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
234 p->out_data.rdata = ndr_push_blob(push);
235 talloc_steal(p->mem_ctx, p->out_data.rdata.data);
242 static bool api_frstrans_RequestUpdates(struct pipes_struct *p)
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;
250 call = &ndr_table_frstrans.calls[NDR_FRSTRANS_REQUESTUPDATES];
252 r = talloc(talloc_tos(), struct frstrans_RequestUpdates);
257 pull = ndr_pull_init_blob(&p->in_data.data, r);
263 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
265 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
267 ndr_err = call->ndr_pull(pull, NDR_IN, r);
268 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
273 if (DEBUGLEVEL >= 10) {
274 NDR_PRINT_FUNCTION_DEBUG(frstrans_RequestUpdates, NDR_IN, r);
278 r->out.frs_update = talloc_zero_array(r, struct frstrans_Update, r->in.credits_available);
279 if (r->out.frs_update == NULL) {
284 r->out.update_count = talloc_zero(r, uint32_t);
285 if (r->out.update_count == NULL) {
290 r->out.update_status = talloc_zero(r, enum frstrans_UpdateStatus);
291 if (r->out.update_status == NULL) {
296 r->out.gvsn_db_guid = talloc_zero(r, struct GUID);
297 if (r->out.gvsn_db_guid == NULL) {
302 r->out.gvsn_version = talloc_zero(r, uint64_t);
303 if (r->out.gvsn_version == NULL) {
308 r->out.result = _frstrans_RequestUpdates(p, r);
310 if (p->fault_state) {
312 /* Return true here, srv_pipe_hnd.c will take care */
316 if (DEBUGLEVEL >= 10) {
317 NDR_PRINT_FUNCTION_DEBUG(frstrans_RequestUpdates, NDR_OUT | NDR_SET_VALUES, r);
320 push = ndr_push_init_ctx(r);
327 * carry over the pointer count to the reply in case we are
328 * using full pointer. See NDR specification for full pointers
330 push->ptr_count = pull->ptr_count;
332 ndr_err = call->ndr_push(push, NDR_OUT, r);
333 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
338 p->out_data.rdata = ndr_push_blob(push);
339 talloc_steal(p->mem_ctx, p->out_data.rdata.data);
346 static bool api_frstrans_RequestVersionVector(struct pipes_struct *p)
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;
354 call = &ndr_table_frstrans.calls[NDR_FRSTRANS_REQUESTVERSIONVECTOR];
356 r = talloc(talloc_tos(), struct frstrans_RequestVersionVector);
361 pull = ndr_pull_init_blob(&p->in_data.data, r);
367 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
369 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
371 ndr_err = call->ndr_pull(pull, NDR_IN, r);
372 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
377 if (DEBUGLEVEL >= 10) {
378 NDR_PRINT_FUNCTION_DEBUG(frstrans_RequestVersionVector, NDR_IN, r);
381 r->out.result = _frstrans_RequestVersionVector(p, r);
383 if (p->fault_state) {
385 /* Return true here, srv_pipe_hnd.c will take care */
389 if (DEBUGLEVEL >= 10) {
390 NDR_PRINT_FUNCTION_DEBUG(frstrans_RequestVersionVector, NDR_OUT | NDR_SET_VALUES, r);
393 push = ndr_push_init_ctx(r);
400 * carry over the pointer count to the reply in case we are
401 * using full pointer. See NDR specification for full pointers
403 push->ptr_count = pull->ptr_count;
405 ndr_err = call->ndr_push(push, NDR_OUT, r);
406 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
411 p->out_data.rdata = ndr_push_blob(push);
412 talloc_steal(p->mem_ctx, p->out_data.rdata.data);
419 static bool api_frstrans_AsyncPoll(struct pipes_struct *p)
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;
427 call = &ndr_table_frstrans.calls[NDR_FRSTRANS_ASYNCPOLL];
429 r = talloc(talloc_tos(), struct frstrans_AsyncPoll);
434 pull = ndr_pull_init_blob(&p->in_data.data, r);
440 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
442 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
444 ndr_err = call->ndr_pull(pull, NDR_IN, r);
445 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
450 if (DEBUGLEVEL >= 10) {
451 NDR_PRINT_FUNCTION_DEBUG(frstrans_AsyncPoll, NDR_IN, r);
455 r->out.response = talloc_zero(r, struct frstrans_AsyncResponseContext);
456 if (r->out.response == NULL) {
461 r->out.result = _frstrans_AsyncPoll(p, r);
463 if (p->fault_state) {
465 /* Return true here, srv_pipe_hnd.c will take care */
469 if (DEBUGLEVEL >= 10) {
470 NDR_PRINT_FUNCTION_DEBUG(frstrans_AsyncPoll, NDR_OUT | NDR_SET_VALUES, r);
473 push = ndr_push_init_ctx(r);
480 * carry over the pointer count to the reply in case we are
481 * using full pointer. See NDR specification for full pointers
483 push->ptr_count = pull->ptr_count;
485 ndr_err = call->ndr_push(push, NDR_OUT, r);
486 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
491 p->out_data.rdata = ndr_push_blob(push);
492 talloc_steal(p->mem_ctx, p->out_data.rdata.data);
499 static bool api_FRSTRANS_REQUEST_RECORDS(struct pipes_struct *p)
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;
507 call = &ndr_table_frstrans.calls[NDR_FRSTRANS_REQUEST_RECORDS];
509 r = talloc(talloc_tos(), struct FRSTRANS_REQUEST_RECORDS);
514 pull = ndr_pull_init_blob(&p->in_data.data, r);
520 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
522 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
524 ndr_err = call->ndr_pull(pull, NDR_IN, r);
525 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
530 if (DEBUGLEVEL >= 10) {
531 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_REQUEST_RECORDS, NDR_IN, r);
534 _FRSTRANS_REQUEST_RECORDS(p, r);
536 if (p->fault_state) {
538 /* Return true here, srv_pipe_hnd.c will take care */
542 if (DEBUGLEVEL >= 10) {
543 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_REQUEST_RECORDS, NDR_OUT | NDR_SET_VALUES, r);
546 push = ndr_push_init_ctx(r);
553 * carry over the pointer count to the reply in case we are
554 * using full pointer. See NDR specification for full pointers
556 push->ptr_count = pull->ptr_count;
558 ndr_err = call->ndr_push(push, NDR_OUT, r);
559 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
564 p->out_data.rdata = ndr_push_blob(push);
565 talloc_steal(p->mem_ctx, p->out_data.rdata.data);
572 static bool api_FRSTRANS_UPDATE_CANCEL(struct pipes_struct *p)
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;
580 call = &ndr_table_frstrans.calls[NDR_FRSTRANS_UPDATE_CANCEL];
582 r = talloc(talloc_tos(), struct FRSTRANS_UPDATE_CANCEL);
587 pull = ndr_pull_init_blob(&p->in_data.data, r);
593 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
595 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
597 ndr_err = call->ndr_pull(pull, NDR_IN, r);
598 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
603 if (DEBUGLEVEL >= 10) {
604 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_UPDATE_CANCEL, NDR_IN, r);
607 _FRSTRANS_UPDATE_CANCEL(p, r);
609 if (p->fault_state) {
611 /* Return true here, srv_pipe_hnd.c will take care */
615 if (DEBUGLEVEL >= 10) {
616 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_UPDATE_CANCEL, NDR_OUT | NDR_SET_VALUES, r);
619 push = ndr_push_init_ctx(r);
626 * carry over the pointer count to the reply in case we are
627 * using full pointer. See NDR specification for full pointers
629 push->ptr_count = pull->ptr_count;
631 ndr_err = call->ndr_push(push, NDR_OUT, r);
632 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
637 p->out_data.rdata = ndr_push_blob(push);
638 talloc_steal(p->mem_ctx, p->out_data.rdata.data);
645 static bool api_FRSTRANS_RAW_GET_FILE_DATA(struct pipes_struct *p)
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;
653 call = &ndr_table_frstrans.calls[NDR_FRSTRANS_RAW_GET_FILE_DATA];
655 r = talloc(talloc_tos(), struct FRSTRANS_RAW_GET_FILE_DATA);
660 pull = ndr_pull_init_blob(&p->in_data.data, r);
666 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
668 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
670 ndr_err = call->ndr_pull(pull, NDR_IN, r);
671 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
676 if (DEBUGLEVEL >= 10) {
677 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RAW_GET_FILE_DATA, NDR_IN, r);
680 _FRSTRANS_RAW_GET_FILE_DATA(p, r);
682 if (p->fault_state) {
684 /* Return true here, srv_pipe_hnd.c will take care */
688 if (DEBUGLEVEL >= 10) {
689 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RAW_GET_FILE_DATA, NDR_OUT | NDR_SET_VALUES, r);
692 push = ndr_push_init_ctx(r);
699 * carry over the pointer count to the reply in case we are
700 * using full pointer. See NDR specification for full pointers
702 push->ptr_count = pull->ptr_count;
704 ndr_err = call->ndr_push(push, NDR_OUT, r);
705 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
710 p->out_data.rdata = ndr_push_blob(push);
711 talloc_steal(p->mem_ctx, p->out_data.rdata.data);
718 static bool api_FRSTRANS_RDC_GET_SIGNATURES(struct pipes_struct *p)
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;
726 call = &ndr_table_frstrans.calls[NDR_FRSTRANS_RDC_GET_SIGNATURES];
728 r = talloc(talloc_tos(), struct FRSTRANS_RDC_GET_SIGNATURES);
733 pull = ndr_pull_init_blob(&p->in_data.data, r);
739 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
741 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
743 ndr_err = call->ndr_pull(pull, NDR_IN, r);
744 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
749 if (DEBUGLEVEL >= 10) {
750 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RDC_GET_SIGNATURES, NDR_IN, r);
753 _FRSTRANS_RDC_GET_SIGNATURES(p, r);
755 if (p->fault_state) {
757 /* Return true here, srv_pipe_hnd.c will take care */
761 if (DEBUGLEVEL >= 10) {
762 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RDC_GET_SIGNATURES, NDR_OUT | NDR_SET_VALUES, r);
765 push = ndr_push_init_ctx(r);
772 * carry over the pointer count to the reply in case we are
773 * using full pointer. See NDR specification for full pointers
775 push->ptr_count = pull->ptr_count;
777 ndr_err = call->ndr_push(push, NDR_OUT, r);
778 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
783 p->out_data.rdata = ndr_push_blob(push);
784 talloc_steal(p->mem_ctx, p->out_data.rdata.data);
791 static bool api_FRSTRANS_RDC_PUSH_SOURCE_NEEDS(struct pipes_struct *p)
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;
799 call = &ndr_table_frstrans.calls[NDR_FRSTRANS_RDC_PUSH_SOURCE_NEEDS];
801 r = talloc(talloc_tos(), struct FRSTRANS_RDC_PUSH_SOURCE_NEEDS);
806 pull = ndr_pull_init_blob(&p->in_data.data, r);
812 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
814 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
816 ndr_err = call->ndr_pull(pull, NDR_IN, r);
817 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
822 if (DEBUGLEVEL >= 10) {
823 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RDC_PUSH_SOURCE_NEEDS, NDR_IN, r);
826 _FRSTRANS_RDC_PUSH_SOURCE_NEEDS(p, r);
828 if (p->fault_state) {
830 /* Return true here, srv_pipe_hnd.c will take care */
834 if (DEBUGLEVEL >= 10) {
835 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RDC_PUSH_SOURCE_NEEDS, NDR_OUT | NDR_SET_VALUES, r);
838 push = ndr_push_init_ctx(r);
845 * carry over the pointer count to the reply in case we are
846 * using full pointer. See NDR specification for full pointers
848 push->ptr_count = pull->ptr_count;
850 ndr_err = call->ndr_push(push, NDR_OUT, r);
851 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
856 p->out_data.rdata = ndr_push_blob(push);
857 talloc_steal(p->mem_ctx, p->out_data.rdata.data);
864 static bool api_FRSTRANS_RDC_GET_FILE_DATA(struct pipes_struct *p)
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;
872 call = &ndr_table_frstrans.calls[NDR_FRSTRANS_RDC_GET_FILE_DATA];
874 r = talloc(talloc_tos(), struct FRSTRANS_RDC_GET_FILE_DATA);
879 pull = ndr_pull_init_blob(&p->in_data.data, r);
885 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
887 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
889 ndr_err = call->ndr_pull(pull, NDR_IN, r);
890 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
895 if (DEBUGLEVEL >= 10) {
896 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RDC_GET_FILE_DATA, NDR_IN, r);
899 _FRSTRANS_RDC_GET_FILE_DATA(p, r);
901 if (p->fault_state) {
903 /* Return true here, srv_pipe_hnd.c will take care */
907 if (DEBUGLEVEL >= 10) {
908 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RDC_GET_FILE_DATA, NDR_OUT | NDR_SET_VALUES, r);
911 push = ndr_push_init_ctx(r);
918 * carry over the pointer count to the reply in case we are
919 * using full pointer. See NDR specification for full pointers
921 push->ptr_count = pull->ptr_count;
923 ndr_err = call->ndr_push(push, NDR_OUT, r);
924 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
929 p->out_data.rdata = ndr_push_blob(push);
930 talloc_steal(p->mem_ctx, p->out_data.rdata.data);
937 static bool api_FRSTRANS_RDC_CLOSE(struct pipes_struct *p)
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;
945 call = &ndr_table_frstrans.calls[NDR_FRSTRANS_RDC_CLOSE];
947 r = talloc(talloc_tos(), struct FRSTRANS_RDC_CLOSE);
952 pull = ndr_pull_init_blob(&p->in_data.data, r);
958 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
960 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
962 ndr_err = call->ndr_pull(pull, NDR_IN, r);
963 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
968 if (DEBUGLEVEL >= 10) {
969 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RDC_CLOSE, NDR_IN, r);
972 _FRSTRANS_RDC_CLOSE(p, r);
974 if (p->fault_state) {
976 /* Return true here, srv_pipe_hnd.c will take care */
980 if (DEBUGLEVEL >= 10) {
981 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_RDC_CLOSE, NDR_OUT | NDR_SET_VALUES, r);
984 push = ndr_push_init_ctx(r);
991 * carry over the pointer count to the reply in case we are
992 * using full pointer. See NDR specification for full pointers
994 push->ptr_count = pull->ptr_count;
996 ndr_err = call->ndr_push(push, NDR_OUT, r);
997 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1002 p->out_data.rdata = ndr_push_blob(push);
1003 talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1010 static bool api_frstrans_InitializeFileTransferAsync(struct pipes_struct *p)
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;
1018 call = &ndr_table_frstrans.calls[NDR_FRSTRANS_INITIALIZEFILETRANSFERASYNC];
1020 r = talloc(talloc_tos(), struct frstrans_InitializeFileTransferAsync);
1025 pull = ndr_pull_init_blob(&p->in_data.data, r);
1031 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1033 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
1035 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1036 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1041 if (DEBUGLEVEL >= 10) {
1042 NDR_PRINT_FUNCTION_DEBUG(frstrans_InitializeFileTransferAsync, NDR_IN, r);
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) {
1054 r->out.rdc_file_info = talloc_zero(r, struct frstrans_RdcFileInfo *);
1055 if (r->out.rdc_file_info == NULL) {
1060 r->out.data_buffer = talloc_zero_array(r, uint8_t, r->in.buffer_size);
1061 if (r->out.data_buffer == NULL) {
1066 r->out.size_read = talloc_zero(r, uint32_t);
1067 if (r->out.size_read == NULL) {
1072 r->out.is_end_of_file = talloc_zero(r, uint32_t);
1073 if (r->out.is_end_of_file == NULL) {
1078 r->out.result = _frstrans_InitializeFileTransferAsync(p, r);
1080 if (p->fault_state) {
1082 /* Return true here, srv_pipe_hnd.c will take care */
1086 if (DEBUGLEVEL >= 10) {
1087 NDR_PRINT_FUNCTION_DEBUG(frstrans_InitializeFileTransferAsync, NDR_OUT | NDR_SET_VALUES, r);
1090 push = ndr_push_init_ctx(r);
1097 * carry over the pointer count to the reply in case we are
1098 * using full pointer. See NDR specification for full pointers
1100 push->ptr_count = pull->ptr_count;
1102 ndr_err = call->ndr_push(push, NDR_OUT, r);
1103 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1108 p->out_data.rdata = ndr_push_blob(push);
1109 talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1116 static bool api_FRSTRANS_OPNUM_0E_NOT_USED_ON_THE_WIRE(struct pipes_struct *p)
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;
1124 call = &ndr_table_frstrans.calls[NDR_FRSTRANS_OPNUM_0E_NOT_USED_ON_THE_WIRE];
1126 r = talloc(talloc_tos(), struct FRSTRANS_OPNUM_0E_NOT_USED_ON_THE_WIRE);
1131 pull = ndr_pull_init_blob(&p->in_data.data, r);
1137 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1139 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
1141 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1142 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1147 if (DEBUGLEVEL >= 10) {
1148 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_OPNUM_0E_NOT_USED_ON_THE_WIRE, NDR_IN, r);
1151 _FRSTRANS_OPNUM_0E_NOT_USED_ON_THE_WIRE(p, r);
1153 if (p->fault_state) {
1155 /* Return true here, srv_pipe_hnd.c will take care */
1159 if (DEBUGLEVEL >= 10) {
1160 NDR_PRINT_FUNCTION_DEBUG(FRSTRANS_OPNUM_0E_NOT_USED_ON_THE_WIRE, NDR_OUT | NDR_SET_VALUES, r);
1163 push = ndr_push_init_ctx(r);
1170 * carry over the pointer count to the reply in case we are
1171 * using full pointer. See NDR specification for full pointers
1173 push->ptr_count = pull->ptr_count;
1175 ndr_err = call->ndr_push(push, NDR_OUT, r);
1176 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1181 p->out_data.rdata = ndr_push_blob(push);
1182 talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1189 static bool api_frstrans_RawGetFileDataAsync(struct pipes_struct *p)
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;
1197 call = &ndr_table_frstrans.calls[NDR_FRSTRANS_RAWGETFILEDATAASYNC];
1199 r = talloc(talloc_tos(), struct frstrans_RawGetFileDataAsync);
1204 pull = ndr_pull_init_blob(&p->in_data.data, r);
1210 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1212 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
1214 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1215 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1220 if (DEBUGLEVEL >= 10) {
1221 NDR_PRINT_FUNCTION_DEBUG(frstrans_RawGetFileDataAsync, NDR_IN, r);
1224 ZERO_STRUCT(r->out);
1225 r->out.result = _frstrans_RawGetFileDataAsync(p, r);
1227 if (p->fault_state) {
1229 /* Return true here, srv_pipe_hnd.c will take care */
1233 if (DEBUGLEVEL >= 10) {
1234 NDR_PRINT_FUNCTION_DEBUG(frstrans_RawGetFileDataAsync, NDR_OUT | NDR_SET_VALUES, r);
1237 push = ndr_push_init_ctx(r);
1244 * carry over the pointer count to the reply in case we are
1245 * using full pointer. See NDR specification for full pointers
1247 push->ptr_count = pull->ptr_count;
1249 ndr_err = call->ndr_push(push, NDR_OUT, r);
1250 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1255 p->out_data.rdata = ndr_push_blob(push);
1256 talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1263 static bool api_frstrans_RdcGetFileDataAsync(struct pipes_struct *p)
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;
1271 call = &ndr_table_frstrans.calls[NDR_FRSTRANS_RDCGETFILEDATAASYNC];
1273 r = talloc(talloc_tos(), struct frstrans_RdcGetFileDataAsync);
1278 pull = ndr_pull_init_blob(&p->in_data.data, r);
1284 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1286 pull->flags |= LIBNDR_FLAG_BIGENDIAN;
1288 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1289 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1294 if (DEBUGLEVEL >= 10) {
1295 NDR_PRINT_FUNCTION_DEBUG(frstrans_RdcGetFileDataAsync, NDR_IN, r);
1298 ZERO_STRUCT(r->out);
1299 r->out.result = _frstrans_RdcGetFileDataAsync(p, r);
1301 if (p->fault_state) {
1303 /* Return true here, srv_pipe_hnd.c will take care */
1307 if (DEBUGLEVEL >= 10) {
1308 NDR_PRINT_FUNCTION_DEBUG(frstrans_RdcGetFileDataAsync, NDR_OUT | NDR_SET_VALUES, r);
1311 push = ndr_push_init_ctx(r);
1318 * carry over the pointer count to the reply in case we are
1319 * using full pointer. See NDR specification for full pointers
1321 push->ptr_count = pull->ptr_count;
1323 ndr_err = call->ndr_push(push, NDR_OUT, r);
1324 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1329 p->out_data.rdata = ndr_push_blob(push);
1330 talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1339 static struct api_struct api_frstrans_cmds[] =
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},
1360 void frstrans_get_pipe_fns(struct api_struct **fns, int *n_fns)
1362 *fns = api_frstrans_cmds;
1363 *n_fns = sizeof(api_frstrans_cmds) / sizeof(struct api_struct);
1366 NTSTATUS rpc_frstrans_init(const struct rpc_srv_callbacks *rpc_srv_cb)
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);
1371 NTSTATUS rpc_frstrans_shutdown(void)
1373 return rpc_srv_unregister(&ndr_table_frstrans);