s3: map NetBSD's errno on posix open calls for symlinks
[Samba/gebeck_regimport.git] / librpc / gen_ndr / cli_drsuapi.c
blobbe83eebe1f772ca16fd4a8f72757cc48ba0288d6
1 /*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "../librpc/gen_ndr/cli_drsuapi.h"
9 NTSTATUS rpccli_drsuapi_DsBind(struct rpc_pipe_client *cli,
10 TALLOC_CTX *mem_ctx,
11 struct GUID *bind_guid /* [in] [unique] */,
12 struct drsuapi_DsBindInfoCtr *bind_info /* [in,out] [unique] */,
13 struct policy_handle *bind_handle /* [out] [ref] */,
14 WERROR *werror)
16 struct drsuapi_DsBind r;
17 NTSTATUS status;
19 /* In parameters */
20 r.in.bind_guid = bind_guid;
21 r.in.bind_info = bind_info;
23 if (DEBUGLEVEL >= 10) {
24 NDR_PRINT_IN_DEBUG(drsuapi_DsBind, &r);
27 status = cli->dispatch(cli,
28 mem_ctx,
29 &ndr_table_drsuapi,
30 NDR_DRSUAPI_DSBIND,
31 &r);
33 if (!NT_STATUS_IS_OK(status)) {
34 return status;
37 if (DEBUGLEVEL >= 10) {
38 NDR_PRINT_OUT_DEBUG(drsuapi_DsBind, &r);
41 if (NT_STATUS_IS_ERR(status)) {
42 return status;
45 /* Return variables */
46 if (bind_info && r.out.bind_info) {
47 *bind_info = *r.out.bind_info;
49 *bind_handle = *r.out.bind_handle;
51 /* Return result */
52 if (werror) {
53 *werror = r.out.result;
56 return werror_to_ntstatus(r.out.result);
59 NTSTATUS rpccli_drsuapi_DsUnbind(struct rpc_pipe_client *cli,
60 TALLOC_CTX *mem_ctx,
61 struct policy_handle *bind_handle /* [in,out] [ref] */,
62 WERROR *werror)
64 struct drsuapi_DsUnbind r;
65 NTSTATUS status;
67 /* In parameters */
68 r.in.bind_handle = bind_handle;
70 if (DEBUGLEVEL >= 10) {
71 NDR_PRINT_IN_DEBUG(drsuapi_DsUnbind, &r);
74 status = cli->dispatch(cli,
75 mem_ctx,
76 &ndr_table_drsuapi,
77 NDR_DRSUAPI_DSUNBIND,
78 &r);
80 if (!NT_STATUS_IS_OK(status)) {
81 return status;
84 if (DEBUGLEVEL >= 10) {
85 NDR_PRINT_OUT_DEBUG(drsuapi_DsUnbind, &r);
88 if (NT_STATUS_IS_ERR(status)) {
89 return status;
92 /* Return variables */
93 *bind_handle = *r.out.bind_handle;
95 /* Return result */
96 if (werror) {
97 *werror = r.out.result;
100 return werror_to_ntstatus(r.out.result);
103 NTSTATUS rpccli_drsuapi_DsReplicaSync(struct rpc_pipe_client *cli,
104 TALLOC_CTX *mem_ctx,
105 struct policy_handle *bind_handle /* [in] [ref] */,
106 int32_t level /* [in] */,
107 union drsuapi_DsReplicaSyncRequest req /* [in] [switch_is(level)] */,
108 WERROR *werror)
110 struct drsuapi_DsReplicaSync r;
111 NTSTATUS status;
113 /* In parameters */
114 r.in.bind_handle = bind_handle;
115 r.in.level = level;
116 r.in.req = req;
118 if (DEBUGLEVEL >= 10) {
119 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaSync, &r);
122 status = cli->dispatch(cli,
123 mem_ctx,
124 &ndr_table_drsuapi,
125 NDR_DRSUAPI_DSREPLICASYNC,
126 &r);
128 if (!NT_STATUS_IS_OK(status)) {
129 return status;
132 if (DEBUGLEVEL >= 10) {
133 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaSync, &r);
136 if (NT_STATUS_IS_ERR(status)) {
137 return status;
140 /* Return variables */
142 /* Return result */
143 if (werror) {
144 *werror = r.out.result;
147 return werror_to_ntstatus(r.out.result);
150 NTSTATUS rpccli_drsuapi_DsGetNCChanges(struct rpc_pipe_client *cli,
151 TALLOC_CTX *mem_ctx,
152 struct policy_handle *bind_handle /* [in] [ref] */,
153 int32_t level /* [in] */,
154 union drsuapi_DsGetNCChangesRequest *req /* [in] [ref,switch_is(level)] */,
155 int32_t *level_out /* [out] [ref] */,
156 union drsuapi_DsGetNCChangesCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
157 WERROR *werror)
159 struct drsuapi_DsGetNCChanges r;
160 NTSTATUS status;
162 /* In parameters */
163 r.in.bind_handle = bind_handle;
164 r.in.level = level;
165 r.in.req = req;
167 if (DEBUGLEVEL >= 10) {
168 NDR_PRINT_IN_DEBUG(drsuapi_DsGetNCChanges, &r);
171 status = cli->dispatch(cli,
172 mem_ctx,
173 &ndr_table_drsuapi,
174 NDR_DRSUAPI_DSGETNCCHANGES,
175 &r);
177 if (!NT_STATUS_IS_OK(status)) {
178 return status;
181 if (DEBUGLEVEL >= 10) {
182 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNCChanges, &r);
185 if (NT_STATUS_IS_ERR(status)) {
186 return status;
189 /* Return variables */
190 *level_out = *r.out.level_out;
191 *ctr = *r.out.ctr;
193 /* Return result */
194 if (werror) {
195 *werror = r.out.result;
198 return werror_to_ntstatus(r.out.result);
201 NTSTATUS rpccli_drsuapi_DsReplicaUpdateRefs(struct rpc_pipe_client *cli,
202 TALLOC_CTX *mem_ctx,
203 struct policy_handle *bind_handle /* [in] [ref] */,
204 int32_t level /* [in] */,
205 union drsuapi_DsReplicaUpdateRefsRequest req /* [in] [switch_is(level)] */,
206 WERROR *werror)
208 struct drsuapi_DsReplicaUpdateRefs r;
209 NTSTATUS status;
211 /* In parameters */
212 r.in.bind_handle = bind_handle;
213 r.in.level = level;
214 r.in.req = req;
216 if (DEBUGLEVEL >= 10) {
217 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaUpdateRefs, &r);
220 status = cli->dispatch(cli,
221 mem_ctx,
222 &ndr_table_drsuapi,
223 NDR_DRSUAPI_DSREPLICAUPDATEREFS,
224 &r);
226 if (!NT_STATUS_IS_OK(status)) {
227 return status;
230 if (DEBUGLEVEL >= 10) {
231 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaUpdateRefs, &r);
234 if (NT_STATUS_IS_ERR(status)) {
235 return status;
238 /* Return variables */
240 /* Return result */
241 if (werror) {
242 *werror = r.out.result;
245 return werror_to_ntstatus(r.out.result);
248 NTSTATUS rpccli_DRSUAPI_REPLICA_ADD(struct rpc_pipe_client *cli,
249 TALLOC_CTX *mem_ctx,
250 WERROR *werror)
252 struct DRSUAPI_REPLICA_ADD r;
253 NTSTATUS status;
255 /* In parameters */
257 if (DEBUGLEVEL >= 10) {
258 NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_ADD, &r);
261 status = cli->dispatch(cli,
262 mem_ctx,
263 &ndr_table_drsuapi,
264 NDR_DRSUAPI_REPLICA_ADD,
265 &r);
267 if (!NT_STATUS_IS_OK(status)) {
268 return status;
271 if (DEBUGLEVEL >= 10) {
272 NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_ADD, &r);
275 if (NT_STATUS_IS_ERR(status)) {
276 return status;
279 /* Return variables */
281 /* Return result */
282 if (werror) {
283 *werror = r.out.result;
286 return werror_to_ntstatus(r.out.result);
289 NTSTATUS rpccli_DRSUAPI_REPLICA_DEL(struct rpc_pipe_client *cli,
290 TALLOC_CTX *mem_ctx,
291 WERROR *werror)
293 struct DRSUAPI_REPLICA_DEL r;
294 NTSTATUS status;
296 /* In parameters */
298 if (DEBUGLEVEL >= 10) {
299 NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_DEL, &r);
302 status = cli->dispatch(cli,
303 mem_ctx,
304 &ndr_table_drsuapi,
305 NDR_DRSUAPI_REPLICA_DEL,
306 &r);
308 if (!NT_STATUS_IS_OK(status)) {
309 return status;
312 if (DEBUGLEVEL >= 10) {
313 NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_DEL, &r);
316 if (NT_STATUS_IS_ERR(status)) {
317 return status;
320 /* Return variables */
322 /* Return result */
323 if (werror) {
324 *werror = r.out.result;
327 return werror_to_ntstatus(r.out.result);
330 NTSTATUS rpccli_DRSUAPI_REPLICA_MODIFY(struct rpc_pipe_client *cli,
331 TALLOC_CTX *mem_ctx,
332 WERROR *werror)
334 struct DRSUAPI_REPLICA_MODIFY r;
335 NTSTATUS status;
337 /* In parameters */
339 if (DEBUGLEVEL >= 10) {
340 NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_MODIFY, &r);
343 status = cli->dispatch(cli,
344 mem_ctx,
345 &ndr_table_drsuapi,
346 NDR_DRSUAPI_REPLICA_MODIFY,
347 &r);
349 if (!NT_STATUS_IS_OK(status)) {
350 return status;
353 if (DEBUGLEVEL >= 10) {
354 NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_MODIFY, &r);
357 if (NT_STATUS_IS_ERR(status)) {
358 return status;
361 /* Return variables */
363 /* Return result */
364 if (werror) {
365 *werror = r.out.result;
368 return werror_to_ntstatus(r.out.result);
371 NTSTATUS rpccli_DRSUAPI_VERIFY_NAMES(struct rpc_pipe_client *cli,
372 TALLOC_CTX *mem_ctx,
373 WERROR *werror)
375 struct DRSUAPI_VERIFY_NAMES r;
376 NTSTATUS status;
378 /* In parameters */
380 if (DEBUGLEVEL >= 10) {
381 NDR_PRINT_IN_DEBUG(DRSUAPI_VERIFY_NAMES, &r);
384 status = cli->dispatch(cli,
385 mem_ctx,
386 &ndr_table_drsuapi,
387 NDR_DRSUAPI_VERIFY_NAMES,
388 &r);
390 if (!NT_STATUS_IS_OK(status)) {
391 return status;
394 if (DEBUGLEVEL >= 10) {
395 NDR_PRINT_OUT_DEBUG(DRSUAPI_VERIFY_NAMES, &r);
398 if (NT_STATUS_IS_ERR(status)) {
399 return status;
402 /* Return variables */
404 /* Return result */
405 if (werror) {
406 *werror = r.out.result;
409 return werror_to_ntstatus(r.out.result);
412 NTSTATUS rpccli_drsuapi_DsGetMemberships(struct rpc_pipe_client *cli,
413 TALLOC_CTX *mem_ctx,
414 struct policy_handle *bind_handle /* [in] [ref] */,
415 int32_t level /* [in] */,
416 union drsuapi_DsGetMembershipsRequest *req /* [in] [ref,switch_is(level)] */,
417 int32_t *level_out /* [out] [ref] */,
418 union drsuapi_DsGetMembershipsCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
419 WERROR *werror)
421 struct drsuapi_DsGetMemberships r;
422 NTSTATUS status;
424 /* In parameters */
425 r.in.bind_handle = bind_handle;
426 r.in.level = level;
427 r.in.req = req;
429 if (DEBUGLEVEL >= 10) {
430 NDR_PRINT_IN_DEBUG(drsuapi_DsGetMemberships, &r);
433 status = cli->dispatch(cli,
434 mem_ctx,
435 &ndr_table_drsuapi,
436 NDR_DRSUAPI_DSGETMEMBERSHIPS,
437 &r);
439 if (!NT_STATUS_IS_OK(status)) {
440 return status;
443 if (DEBUGLEVEL >= 10) {
444 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetMemberships, &r);
447 if (NT_STATUS_IS_ERR(status)) {
448 return status;
451 /* Return variables */
452 *level_out = *r.out.level_out;
453 *ctr = *r.out.ctr;
455 /* Return result */
456 if (werror) {
457 *werror = r.out.result;
460 return werror_to_ntstatus(r.out.result);
463 NTSTATUS rpccli_DRSUAPI_INTER_DOMAIN_MOVE(struct rpc_pipe_client *cli,
464 TALLOC_CTX *mem_ctx,
465 WERROR *werror)
467 struct DRSUAPI_INTER_DOMAIN_MOVE r;
468 NTSTATUS status;
470 /* In parameters */
472 if (DEBUGLEVEL >= 10) {
473 NDR_PRINT_IN_DEBUG(DRSUAPI_INTER_DOMAIN_MOVE, &r);
476 status = cli->dispatch(cli,
477 mem_ctx,
478 &ndr_table_drsuapi,
479 NDR_DRSUAPI_INTER_DOMAIN_MOVE,
480 &r);
482 if (!NT_STATUS_IS_OK(status)) {
483 return status;
486 if (DEBUGLEVEL >= 10) {
487 NDR_PRINT_OUT_DEBUG(DRSUAPI_INTER_DOMAIN_MOVE, &r);
490 if (NT_STATUS_IS_ERR(status)) {
491 return status;
494 /* Return variables */
496 /* Return result */
497 if (werror) {
498 *werror = r.out.result;
501 return werror_to_ntstatus(r.out.result);
504 NTSTATUS rpccli_drsuapi_DsGetNT4ChangeLog(struct rpc_pipe_client *cli,
505 TALLOC_CTX *mem_ctx,
506 struct policy_handle *bind_handle /* [in] [ref] */,
507 uint32_t level /* [in] */,
508 union drsuapi_DsGetNT4ChangeLogRequest *req /* [in] [ref,switch_is(level)] */,
509 uint32_t *level_out /* [out] [ref] */,
510 union drsuapi_DsGetNT4ChangeLogInfo *info /* [out] [ref,switch_is(*level_out)] */,
511 WERROR *werror)
513 struct drsuapi_DsGetNT4ChangeLog r;
514 NTSTATUS status;
516 /* In parameters */
517 r.in.bind_handle = bind_handle;
518 r.in.level = level;
519 r.in.req = req;
521 if (DEBUGLEVEL >= 10) {
522 NDR_PRINT_IN_DEBUG(drsuapi_DsGetNT4ChangeLog, &r);
525 status = cli->dispatch(cli,
526 mem_ctx,
527 &ndr_table_drsuapi,
528 NDR_DRSUAPI_DSGETNT4CHANGELOG,
529 &r);
531 if (!NT_STATUS_IS_OK(status)) {
532 return status;
535 if (DEBUGLEVEL >= 10) {
536 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNT4ChangeLog, &r);
539 if (NT_STATUS_IS_ERR(status)) {
540 return status;
543 /* Return variables */
544 *level_out = *r.out.level_out;
545 *info = *r.out.info;
547 /* Return result */
548 if (werror) {
549 *werror = r.out.result;
552 return werror_to_ntstatus(r.out.result);
555 NTSTATUS rpccli_drsuapi_DsCrackNames(struct rpc_pipe_client *cli,
556 TALLOC_CTX *mem_ctx,
557 struct policy_handle *bind_handle /* [in] [ref] */,
558 int32_t level /* [in] */,
559 union drsuapi_DsNameRequest *req /* [in] [ref,switch_is(level)] */,
560 int32_t *level_out /* [out] [ref] */,
561 union drsuapi_DsNameCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
562 WERROR *werror)
564 struct drsuapi_DsCrackNames r;
565 NTSTATUS status;
567 /* In parameters */
568 r.in.bind_handle = bind_handle;
569 r.in.level = level;
570 r.in.req = req;
572 if (DEBUGLEVEL >= 10) {
573 NDR_PRINT_IN_DEBUG(drsuapi_DsCrackNames, &r);
576 status = cli->dispatch(cli,
577 mem_ctx,
578 &ndr_table_drsuapi,
579 NDR_DRSUAPI_DSCRACKNAMES,
580 &r);
582 if (!NT_STATUS_IS_OK(status)) {
583 return status;
586 if (DEBUGLEVEL >= 10) {
587 NDR_PRINT_OUT_DEBUG(drsuapi_DsCrackNames, &r);
590 if (NT_STATUS_IS_ERR(status)) {
591 return status;
594 /* Return variables */
595 *level_out = *r.out.level_out;
596 *ctr = *r.out.ctr;
598 /* Return result */
599 if (werror) {
600 *werror = r.out.result;
603 return werror_to_ntstatus(r.out.result);
606 NTSTATUS rpccli_drsuapi_DsWriteAccountSpn(struct rpc_pipe_client *cli,
607 TALLOC_CTX *mem_ctx,
608 struct policy_handle *bind_handle /* [in] [ref] */,
609 int32_t level /* [in] */,
610 union drsuapi_DsWriteAccountSpnRequest *req /* [in] [ref,switch_is(level)] */,
611 int32_t *level_out /* [out] [ref] */,
612 union drsuapi_DsWriteAccountSpnResult *res /* [out] [ref,switch_is(*level_out)] */,
613 WERROR *werror)
615 struct drsuapi_DsWriteAccountSpn r;
616 NTSTATUS status;
618 /* In parameters */
619 r.in.bind_handle = bind_handle;
620 r.in.level = level;
621 r.in.req = req;
623 if (DEBUGLEVEL >= 10) {
624 NDR_PRINT_IN_DEBUG(drsuapi_DsWriteAccountSpn, &r);
627 status = cli->dispatch(cli,
628 mem_ctx,
629 &ndr_table_drsuapi,
630 NDR_DRSUAPI_DSWRITEACCOUNTSPN,
631 &r);
633 if (!NT_STATUS_IS_OK(status)) {
634 return status;
637 if (DEBUGLEVEL >= 10) {
638 NDR_PRINT_OUT_DEBUG(drsuapi_DsWriteAccountSpn, &r);
641 if (NT_STATUS_IS_ERR(status)) {
642 return status;
645 /* Return variables */
646 *level_out = *r.out.level_out;
647 *res = *r.out.res;
649 /* Return result */
650 if (werror) {
651 *werror = r.out.result;
654 return werror_to_ntstatus(r.out.result);
657 NTSTATUS rpccli_drsuapi_DsRemoveDSServer(struct rpc_pipe_client *cli,
658 TALLOC_CTX *mem_ctx,
659 struct policy_handle *bind_handle /* [in] [ref] */,
660 int32_t level /* [in] */,
661 union drsuapi_DsRemoveDSServerRequest *req /* [in] [ref,switch_is(level)] */,
662 int32_t *level_out /* [out] [ref] */,
663 union drsuapi_DsRemoveDSServerResult *res /* [out] [ref,switch_is(*level_out)] */,
664 WERROR *werror)
666 struct drsuapi_DsRemoveDSServer r;
667 NTSTATUS status;
669 /* In parameters */
670 r.in.bind_handle = bind_handle;
671 r.in.level = level;
672 r.in.req = req;
674 if (DEBUGLEVEL >= 10) {
675 NDR_PRINT_IN_DEBUG(drsuapi_DsRemoveDSServer, &r);
678 status = cli->dispatch(cli,
679 mem_ctx,
680 &ndr_table_drsuapi,
681 NDR_DRSUAPI_DSREMOVEDSSERVER,
682 &r);
684 if (!NT_STATUS_IS_OK(status)) {
685 return status;
688 if (DEBUGLEVEL >= 10) {
689 NDR_PRINT_OUT_DEBUG(drsuapi_DsRemoveDSServer, &r);
692 if (NT_STATUS_IS_ERR(status)) {
693 return status;
696 /* Return variables */
697 *level_out = *r.out.level_out;
698 *res = *r.out.res;
700 /* Return result */
701 if (werror) {
702 *werror = r.out.result;
705 return werror_to_ntstatus(r.out.result);
708 NTSTATUS rpccli_DRSUAPI_REMOVE_DS_DOMAIN(struct rpc_pipe_client *cli,
709 TALLOC_CTX *mem_ctx,
710 WERROR *werror)
712 struct DRSUAPI_REMOVE_DS_DOMAIN r;
713 NTSTATUS status;
715 /* In parameters */
717 if (DEBUGLEVEL >= 10) {
718 NDR_PRINT_IN_DEBUG(DRSUAPI_REMOVE_DS_DOMAIN, &r);
721 status = cli->dispatch(cli,
722 mem_ctx,
723 &ndr_table_drsuapi,
724 NDR_DRSUAPI_REMOVE_DS_DOMAIN,
725 &r);
727 if (!NT_STATUS_IS_OK(status)) {
728 return status;
731 if (DEBUGLEVEL >= 10) {
732 NDR_PRINT_OUT_DEBUG(DRSUAPI_REMOVE_DS_DOMAIN, &r);
735 if (NT_STATUS_IS_ERR(status)) {
736 return status;
739 /* Return variables */
741 /* Return result */
742 if (werror) {
743 *werror = r.out.result;
746 return werror_to_ntstatus(r.out.result);
749 NTSTATUS rpccli_drsuapi_DsGetDomainControllerInfo(struct rpc_pipe_client *cli,
750 TALLOC_CTX *mem_ctx,
751 struct policy_handle *bind_handle /* [in] [ref] */,
752 int32_t level /* [in] */,
753 union drsuapi_DsGetDCInfoRequest *req /* [in] [ref,switch_is(level)] */,
754 int32_t *level_out /* [out] [ref] */,
755 union drsuapi_DsGetDCInfoCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
756 WERROR *werror)
758 struct drsuapi_DsGetDomainControllerInfo r;
759 NTSTATUS status;
761 /* In parameters */
762 r.in.bind_handle = bind_handle;
763 r.in.level = level;
764 r.in.req = req;
766 if (DEBUGLEVEL >= 10) {
767 NDR_PRINT_IN_DEBUG(drsuapi_DsGetDomainControllerInfo, &r);
770 status = cli->dispatch(cli,
771 mem_ctx,
772 &ndr_table_drsuapi,
773 NDR_DRSUAPI_DSGETDOMAINCONTROLLERINFO,
774 &r);
776 if (!NT_STATUS_IS_OK(status)) {
777 return status;
780 if (DEBUGLEVEL >= 10) {
781 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetDomainControllerInfo, &r);
784 if (NT_STATUS_IS_ERR(status)) {
785 return status;
788 /* Return variables */
789 *level_out = *r.out.level_out;
790 *ctr = *r.out.ctr;
792 /* Return result */
793 if (werror) {
794 *werror = r.out.result;
797 return werror_to_ntstatus(r.out.result);
800 NTSTATUS rpccli_drsuapi_DsAddEntry(struct rpc_pipe_client *cli,
801 TALLOC_CTX *mem_ctx,
802 struct policy_handle *bind_handle /* [in] [ref] */,
803 int32_t level /* [in] */,
804 union drsuapi_DsAddEntryRequest *req /* [in] [ref,switch_is(level)] */,
805 int32_t *level_out /* [out] [ref] */,
806 union drsuapi_DsAddEntryCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
807 WERROR *werror)
809 struct drsuapi_DsAddEntry r;
810 NTSTATUS status;
812 /* In parameters */
813 r.in.bind_handle = bind_handle;
814 r.in.level = level;
815 r.in.req = req;
817 if (DEBUGLEVEL >= 10) {
818 NDR_PRINT_IN_DEBUG(drsuapi_DsAddEntry, &r);
821 status = cli->dispatch(cli,
822 mem_ctx,
823 &ndr_table_drsuapi,
824 NDR_DRSUAPI_DSADDENTRY,
825 &r);
827 if (!NT_STATUS_IS_OK(status)) {
828 return status;
831 if (DEBUGLEVEL >= 10) {
832 NDR_PRINT_OUT_DEBUG(drsuapi_DsAddEntry, &r);
835 if (NT_STATUS_IS_ERR(status)) {
836 return status;
839 /* Return variables */
840 *level_out = *r.out.level_out;
841 *ctr = *r.out.ctr;
843 /* Return result */
844 if (werror) {
845 *werror = r.out.result;
848 return werror_to_ntstatus(r.out.result);
851 NTSTATUS rpccli_DRSUAPI_EXECUTE_KCC(struct rpc_pipe_client *cli,
852 TALLOC_CTX *mem_ctx,
853 WERROR *werror)
855 struct DRSUAPI_EXECUTE_KCC r;
856 NTSTATUS status;
858 /* In parameters */
860 if (DEBUGLEVEL >= 10) {
861 NDR_PRINT_IN_DEBUG(DRSUAPI_EXECUTE_KCC, &r);
864 status = cli->dispatch(cli,
865 mem_ctx,
866 &ndr_table_drsuapi,
867 NDR_DRSUAPI_EXECUTE_KCC,
868 &r);
870 if (!NT_STATUS_IS_OK(status)) {
871 return status;
874 if (DEBUGLEVEL >= 10) {
875 NDR_PRINT_OUT_DEBUG(DRSUAPI_EXECUTE_KCC, &r);
878 if (NT_STATUS_IS_ERR(status)) {
879 return status;
882 /* Return variables */
884 /* Return result */
885 if (werror) {
886 *werror = r.out.result;
889 return werror_to_ntstatus(r.out.result);
892 NTSTATUS rpccli_drsuapi_DsReplicaGetInfo(struct rpc_pipe_client *cli,
893 TALLOC_CTX *mem_ctx,
894 struct policy_handle *bind_handle /* [in] [ref] */,
895 enum drsuapi_DsReplicaGetInfoLevel level /* [in] */,
896 union drsuapi_DsReplicaGetInfoRequest *req /* [in] [ref,switch_is(level)] */,
897 enum drsuapi_DsReplicaInfoType *info_type /* [out] [ref] */,
898 union drsuapi_DsReplicaInfo *info /* [out] [ref,switch_is(*info_type)] */,
899 WERROR *werror)
901 struct drsuapi_DsReplicaGetInfo r;
902 NTSTATUS status;
904 /* In parameters */
905 r.in.bind_handle = bind_handle;
906 r.in.level = level;
907 r.in.req = req;
909 if (DEBUGLEVEL >= 10) {
910 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaGetInfo, &r);
913 status = cli->dispatch(cli,
914 mem_ctx,
915 &ndr_table_drsuapi,
916 NDR_DRSUAPI_DSREPLICAGETINFO,
917 &r);
919 if (!NT_STATUS_IS_OK(status)) {
920 return status;
923 if (DEBUGLEVEL >= 10) {
924 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaGetInfo, &r);
927 if (NT_STATUS_IS_ERR(status)) {
928 return status;
931 /* Return variables */
932 *info_type = *r.out.info_type;
933 *info = *r.out.info;
935 /* Return result */
936 if (werror) {
937 *werror = r.out.result;
940 return werror_to_ntstatus(r.out.result);
943 NTSTATUS rpccli_DRSUAPI_ADD_SID_HISTORY(struct rpc_pipe_client *cli,
944 TALLOC_CTX *mem_ctx,
945 WERROR *werror)
947 struct DRSUAPI_ADD_SID_HISTORY r;
948 NTSTATUS status;
950 /* In parameters */
952 if (DEBUGLEVEL >= 10) {
953 NDR_PRINT_IN_DEBUG(DRSUAPI_ADD_SID_HISTORY, &r);
956 status = cli->dispatch(cli,
957 mem_ctx,
958 &ndr_table_drsuapi,
959 NDR_DRSUAPI_ADD_SID_HISTORY,
960 &r);
962 if (!NT_STATUS_IS_OK(status)) {
963 return status;
966 if (DEBUGLEVEL >= 10) {
967 NDR_PRINT_OUT_DEBUG(DRSUAPI_ADD_SID_HISTORY, &r);
970 if (NT_STATUS_IS_ERR(status)) {
971 return status;
974 /* Return variables */
976 /* Return result */
977 if (werror) {
978 *werror = r.out.result;
981 return werror_to_ntstatus(r.out.result);
984 NTSTATUS rpccli_drsuapi_DsGetMemberships2(struct rpc_pipe_client *cli,
985 TALLOC_CTX *mem_ctx,
986 struct policy_handle *bind_handle /* [in] [ref] */,
987 int32_t level /* [in] */,
988 union drsuapi_DsGetMemberships2Request *req /* [in] [ref,switch_is(level)] */,
989 int32_t *level_out /* [out] [ref] */,
990 union drsuapi_DsGetMemberships2Ctr *ctr /* [out] [ref,switch_is(*level_out)] */,
991 WERROR *werror)
993 struct drsuapi_DsGetMemberships2 r;
994 NTSTATUS status;
996 /* In parameters */
997 r.in.bind_handle = bind_handle;
998 r.in.level = level;
999 r.in.req = req;
1001 if (DEBUGLEVEL >= 10) {
1002 NDR_PRINT_IN_DEBUG(drsuapi_DsGetMemberships2, &r);
1005 status = cli->dispatch(cli,
1006 mem_ctx,
1007 &ndr_table_drsuapi,
1008 NDR_DRSUAPI_DSGETMEMBERSHIPS2,
1009 &r);
1011 if (!NT_STATUS_IS_OK(status)) {
1012 return status;
1015 if (DEBUGLEVEL >= 10) {
1016 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetMemberships2, &r);
1019 if (NT_STATUS_IS_ERR(status)) {
1020 return status;
1023 /* Return variables */
1024 *level_out = *r.out.level_out;
1025 *ctr = *r.out.ctr;
1027 /* Return result */
1028 if (werror) {
1029 *werror = r.out.result;
1032 return werror_to_ntstatus(r.out.result);
1035 NTSTATUS rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct rpc_pipe_client *cli,
1036 TALLOC_CTX *mem_ctx,
1037 WERROR *werror)
1039 struct DRSUAPI_REPLICA_VERIFY_OBJECTS r;
1040 NTSTATUS status;
1042 /* In parameters */
1044 if (DEBUGLEVEL >= 10) {
1045 NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_VERIFY_OBJECTS, &r);
1048 status = cli->dispatch(cli,
1049 mem_ctx,
1050 &ndr_table_drsuapi,
1051 NDR_DRSUAPI_REPLICA_VERIFY_OBJECTS,
1052 &r);
1054 if (!NT_STATUS_IS_OK(status)) {
1055 return status;
1058 if (DEBUGLEVEL >= 10) {
1059 NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_VERIFY_OBJECTS, &r);
1062 if (NT_STATUS_IS_ERR(status)) {
1063 return status;
1066 /* Return variables */
1068 /* Return result */
1069 if (werror) {
1070 *werror = r.out.result;
1073 return werror_to_ntstatus(r.out.result);
1076 NTSTATUS rpccli_DRSUAPI_GET_OBJECT_EXISTENCE(struct rpc_pipe_client *cli,
1077 TALLOC_CTX *mem_ctx,
1078 WERROR *werror)
1080 struct DRSUAPI_GET_OBJECT_EXISTENCE r;
1081 NTSTATUS status;
1083 /* In parameters */
1085 if (DEBUGLEVEL >= 10) {
1086 NDR_PRINT_IN_DEBUG(DRSUAPI_GET_OBJECT_EXISTENCE, &r);
1089 status = cli->dispatch(cli,
1090 mem_ctx,
1091 &ndr_table_drsuapi,
1092 NDR_DRSUAPI_GET_OBJECT_EXISTENCE,
1093 &r);
1095 if (!NT_STATUS_IS_OK(status)) {
1096 return status;
1099 if (DEBUGLEVEL >= 10) {
1100 NDR_PRINT_OUT_DEBUG(DRSUAPI_GET_OBJECT_EXISTENCE, &r);
1103 if (NT_STATUS_IS_ERR(status)) {
1104 return status;
1107 /* Return variables */
1109 /* Return result */
1110 if (werror) {
1111 *werror = r.out.result;
1114 return werror_to_ntstatus(r.out.result);
1117 NTSTATUS rpccli_drsuapi_QuerySitesByCost(struct rpc_pipe_client *cli,
1118 TALLOC_CTX *mem_ctx,
1119 struct policy_handle *bind_handle /* [in] [ref] */,
1120 int32_t level /* [in] */,
1121 union drsuapi_QuerySitesByCostRequest *req /* [in] [ref,switch_is(level)] */,
1122 int32_t *level_out /* [out] [ref] */,
1123 union drsuapi_QuerySitesByCostCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
1124 WERROR *werror)
1126 struct drsuapi_QuerySitesByCost r;
1127 NTSTATUS status;
1129 /* In parameters */
1130 r.in.bind_handle = bind_handle;
1131 r.in.level = level;
1132 r.in.req = req;
1134 if (DEBUGLEVEL >= 10) {
1135 NDR_PRINT_IN_DEBUG(drsuapi_QuerySitesByCost, &r);
1138 status = cli->dispatch(cli,
1139 mem_ctx,
1140 &ndr_table_drsuapi,
1141 NDR_DRSUAPI_QUERYSITESBYCOST,
1142 &r);
1144 if (!NT_STATUS_IS_OK(status)) {
1145 return status;
1148 if (DEBUGLEVEL >= 10) {
1149 NDR_PRINT_OUT_DEBUG(drsuapi_QuerySitesByCost, &r);
1152 if (NT_STATUS_IS_ERR(status)) {
1153 return status;
1156 /* Return variables */
1157 *level_out = *r.out.level_out;
1158 *ctr = *r.out.ctr;
1160 /* Return result */
1161 if (werror) {
1162 *werror = r.out.result;
1165 return werror_to_ntstatus(r.out.result);