libreplace: also use AC_LIBREPLACE_NETWORK_CHECKS for the standalone build
[Samba.git] / source / librpc / gen_ndr / cli_drsuapi.c
blob3e2605ae618f404ccd807371ab571506b8e912c8
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_do_rpc_ndr(cli,
28 mem_ctx,
29 PI_DRSUAPI,
30 &ndr_table_drsuapi,
31 NDR_DRSUAPI_DSBIND,
32 &r);
34 if (!NT_STATUS_IS_OK(status)) {
35 return status;
38 if (DEBUGLEVEL >= 10) {
39 NDR_PRINT_OUT_DEBUG(drsuapi_DsBind, &r);
42 if (NT_STATUS_IS_ERR(status)) {
43 return status;
46 /* Return variables */
47 if (bind_info && r.out.bind_info) {
48 *bind_info = *r.out.bind_info;
50 *bind_handle = *r.out.bind_handle;
52 /* Return result */
53 if (werror) {
54 *werror = r.out.result;
57 return werror_to_ntstatus(r.out.result);
60 NTSTATUS rpccli_drsuapi_DsUnbind(struct rpc_pipe_client *cli,
61 TALLOC_CTX *mem_ctx,
62 struct policy_handle *bind_handle /* [in,out] [ref] */,
63 WERROR *werror)
65 struct drsuapi_DsUnbind r;
66 NTSTATUS status;
68 /* In parameters */
69 r.in.bind_handle = bind_handle;
71 if (DEBUGLEVEL >= 10) {
72 NDR_PRINT_IN_DEBUG(drsuapi_DsUnbind, &r);
75 status = cli_do_rpc_ndr(cli,
76 mem_ctx,
77 PI_DRSUAPI,
78 &ndr_table_drsuapi,
79 NDR_DRSUAPI_DSUNBIND,
80 &r);
82 if (!NT_STATUS_IS_OK(status)) {
83 return status;
86 if (DEBUGLEVEL >= 10) {
87 NDR_PRINT_OUT_DEBUG(drsuapi_DsUnbind, &r);
90 if (NT_STATUS_IS_ERR(status)) {
91 return status;
94 /* Return variables */
95 *bind_handle = *r.out.bind_handle;
97 /* Return result */
98 if (werror) {
99 *werror = r.out.result;
102 return werror_to_ntstatus(r.out.result);
105 NTSTATUS rpccli_drsuapi_DsReplicaSync(struct rpc_pipe_client *cli,
106 TALLOC_CTX *mem_ctx,
107 struct policy_handle *bind_handle /* [in] [ref] */,
108 int32_t level /* [in] */,
109 union drsuapi_DsReplicaSyncRequest req /* [in] [switch_is(level)] */,
110 WERROR *werror)
112 struct drsuapi_DsReplicaSync r;
113 NTSTATUS status;
115 /* In parameters */
116 r.in.bind_handle = bind_handle;
117 r.in.level = level;
118 r.in.req = req;
120 if (DEBUGLEVEL >= 10) {
121 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaSync, &r);
124 status = cli_do_rpc_ndr(cli,
125 mem_ctx,
126 PI_DRSUAPI,
127 &ndr_table_drsuapi,
128 NDR_DRSUAPI_DSREPLICASYNC,
129 &r);
131 if (!NT_STATUS_IS_OK(status)) {
132 return status;
135 if (DEBUGLEVEL >= 10) {
136 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaSync, &r);
139 if (NT_STATUS_IS_ERR(status)) {
140 return status;
143 /* Return variables */
145 /* Return result */
146 if (werror) {
147 *werror = r.out.result;
150 return werror_to_ntstatus(r.out.result);
153 NTSTATUS rpccli_drsuapi_DsGetNCChanges(struct rpc_pipe_client *cli,
154 TALLOC_CTX *mem_ctx,
155 struct policy_handle *bind_handle /* [in] [ref] */,
156 int32_t *level /* [in,out] [ref] */,
157 union drsuapi_DsGetNCChangesRequest *req /* [in] [ref,switch_is(*level)] */,
158 union drsuapi_DsGetNCChangesCtr *ctr /* [out] [ref,switch_is(*level)] */,
159 WERROR *werror)
161 struct drsuapi_DsGetNCChanges r;
162 NTSTATUS status;
164 /* In parameters */
165 r.in.bind_handle = bind_handle;
166 r.in.level = level;
167 r.in.req = req;
169 if (DEBUGLEVEL >= 10) {
170 NDR_PRINT_IN_DEBUG(drsuapi_DsGetNCChanges, &r);
173 status = cli_do_rpc_ndr(cli,
174 mem_ctx,
175 PI_DRSUAPI,
176 &ndr_table_drsuapi,
177 NDR_DRSUAPI_DSGETNCCHANGES,
178 &r);
180 if (!NT_STATUS_IS_OK(status)) {
181 return status;
184 if (DEBUGLEVEL >= 10) {
185 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNCChanges, &r);
188 if (NT_STATUS_IS_ERR(status)) {
189 return status;
192 /* Return variables */
193 *level = *r.out.level;
194 *ctr = *r.out.ctr;
196 /* Return result */
197 if (werror) {
198 *werror = r.out.result;
201 return werror_to_ntstatus(r.out.result);
204 NTSTATUS rpccli_drsuapi_DsReplicaUpdateRefs(struct rpc_pipe_client *cli,
205 TALLOC_CTX *mem_ctx,
206 struct policy_handle *bind_handle /* [in] [ref] */,
207 int32_t level /* [in] */,
208 union drsuapi_DsReplicaUpdateRefsRequest req /* [in] [switch_is(level)] */,
209 WERROR *werror)
211 struct drsuapi_DsReplicaUpdateRefs r;
212 NTSTATUS status;
214 /* In parameters */
215 r.in.bind_handle = bind_handle;
216 r.in.level = level;
217 r.in.req = req;
219 if (DEBUGLEVEL >= 10) {
220 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaUpdateRefs, &r);
223 status = cli_do_rpc_ndr(cli,
224 mem_ctx,
225 PI_DRSUAPI,
226 &ndr_table_drsuapi,
227 NDR_DRSUAPI_DSREPLICAUPDATEREFS,
228 &r);
230 if (!NT_STATUS_IS_OK(status)) {
231 return status;
234 if (DEBUGLEVEL >= 10) {
235 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaUpdateRefs, &r);
238 if (NT_STATUS_IS_ERR(status)) {
239 return status;
242 /* Return variables */
244 /* Return result */
245 if (werror) {
246 *werror = r.out.result;
249 return werror_to_ntstatus(r.out.result);
252 NTSTATUS rpccli_DRSUAPI_REPLICA_ADD(struct rpc_pipe_client *cli,
253 TALLOC_CTX *mem_ctx,
254 WERROR *werror)
256 struct DRSUAPI_REPLICA_ADD r;
257 NTSTATUS status;
259 /* In parameters */
261 if (DEBUGLEVEL >= 10) {
262 NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_ADD, &r);
265 status = cli_do_rpc_ndr(cli,
266 mem_ctx,
267 PI_DRSUAPI,
268 &ndr_table_drsuapi,
269 NDR_DRSUAPI_REPLICA_ADD,
270 &r);
272 if (!NT_STATUS_IS_OK(status)) {
273 return status;
276 if (DEBUGLEVEL >= 10) {
277 NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_ADD, &r);
280 if (NT_STATUS_IS_ERR(status)) {
281 return status;
284 /* Return variables */
286 /* Return result */
287 if (werror) {
288 *werror = r.out.result;
291 return werror_to_ntstatus(r.out.result);
294 NTSTATUS rpccli_DRSUAPI_REPLICA_DEL(struct rpc_pipe_client *cli,
295 TALLOC_CTX *mem_ctx,
296 WERROR *werror)
298 struct DRSUAPI_REPLICA_DEL r;
299 NTSTATUS status;
301 /* In parameters */
303 if (DEBUGLEVEL >= 10) {
304 NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_DEL, &r);
307 status = cli_do_rpc_ndr(cli,
308 mem_ctx,
309 PI_DRSUAPI,
310 &ndr_table_drsuapi,
311 NDR_DRSUAPI_REPLICA_DEL,
312 &r);
314 if (!NT_STATUS_IS_OK(status)) {
315 return status;
318 if (DEBUGLEVEL >= 10) {
319 NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_DEL, &r);
322 if (NT_STATUS_IS_ERR(status)) {
323 return status;
326 /* Return variables */
328 /* Return result */
329 if (werror) {
330 *werror = r.out.result;
333 return werror_to_ntstatus(r.out.result);
336 NTSTATUS rpccli_DRSUAPI_REPLICA_MODIFY(struct rpc_pipe_client *cli,
337 TALLOC_CTX *mem_ctx,
338 WERROR *werror)
340 struct DRSUAPI_REPLICA_MODIFY r;
341 NTSTATUS status;
343 /* In parameters */
345 if (DEBUGLEVEL >= 10) {
346 NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_MODIFY, &r);
349 status = cli_do_rpc_ndr(cli,
350 mem_ctx,
351 PI_DRSUAPI,
352 &ndr_table_drsuapi,
353 NDR_DRSUAPI_REPLICA_MODIFY,
354 &r);
356 if (!NT_STATUS_IS_OK(status)) {
357 return status;
360 if (DEBUGLEVEL >= 10) {
361 NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_MODIFY, &r);
364 if (NT_STATUS_IS_ERR(status)) {
365 return status;
368 /* Return variables */
370 /* Return result */
371 if (werror) {
372 *werror = r.out.result;
375 return werror_to_ntstatus(r.out.result);
378 NTSTATUS rpccli_DRSUAPI_VERIFY_NAMES(struct rpc_pipe_client *cli,
379 TALLOC_CTX *mem_ctx,
380 WERROR *werror)
382 struct DRSUAPI_VERIFY_NAMES r;
383 NTSTATUS status;
385 /* In parameters */
387 if (DEBUGLEVEL >= 10) {
388 NDR_PRINT_IN_DEBUG(DRSUAPI_VERIFY_NAMES, &r);
391 status = cli_do_rpc_ndr(cli,
392 mem_ctx,
393 PI_DRSUAPI,
394 &ndr_table_drsuapi,
395 NDR_DRSUAPI_VERIFY_NAMES,
396 &r);
398 if (!NT_STATUS_IS_OK(status)) {
399 return status;
402 if (DEBUGLEVEL >= 10) {
403 NDR_PRINT_OUT_DEBUG(DRSUAPI_VERIFY_NAMES, &r);
406 if (NT_STATUS_IS_ERR(status)) {
407 return status;
410 /* Return variables */
412 /* Return result */
413 if (werror) {
414 *werror = r.out.result;
417 return werror_to_ntstatus(r.out.result);
420 NTSTATUS rpccli_drsuapi_DsGetMemberships(struct rpc_pipe_client *cli,
421 TALLOC_CTX *mem_ctx,
422 struct policy_handle *bind_handle /* [in] [ref] */,
423 int32_t level /* [in] */,
424 union drsuapi_DsGetMembershipsRequest *req /* [in] [ref,switch_is(level)] */,
425 int32_t *level_out /* [out] [ref] */,
426 union drsuapi_DsGetMembershipsCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
427 WERROR *werror)
429 struct drsuapi_DsGetMemberships r;
430 NTSTATUS status;
432 /* In parameters */
433 r.in.bind_handle = bind_handle;
434 r.in.level = level;
435 r.in.req = req;
437 if (DEBUGLEVEL >= 10) {
438 NDR_PRINT_IN_DEBUG(drsuapi_DsGetMemberships, &r);
441 status = cli_do_rpc_ndr(cli,
442 mem_ctx,
443 PI_DRSUAPI,
444 &ndr_table_drsuapi,
445 NDR_DRSUAPI_DSGETMEMBERSHIPS,
446 &r);
448 if (!NT_STATUS_IS_OK(status)) {
449 return status;
452 if (DEBUGLEVEL >= 10) {
453 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetMemberships, &r);
456 if (NT_STATUS_IS_ERR(status)) {
457 return status;
460 /* Return variables */
461 *level_out = *r.out.level_out;
462 *ctr = *r.out.ctr;
464 /* Return result */
465 if (werror) {
466 *werror = r.out.result;
469 return werror_to_ntstatus(r.out.result);
472 NTSTATUS rpccli_DRSUAPI_INTER_DOMAIN_MOVE(struct rpc_pipe_client *cli,
473 TALLOC_CTX *mem_ctx,
474 WERROR *werror)
476 struct DRSUAPI_INTER_DOMAIN_MOVE r;
477 NTSTATUS status;
479 /* In parameters */
481 if (DEBUGLEVEL >= 10) {
482 NDR_PRINT_IN_DEBUG(DRSUAPI_INTER_DOMAIN_MOVE, &r);
485 status = cli_do_rpc_ndr(cli,
486 mem_ctx,
487 PI_DRSUAPI,
488 &ndr_table_drsuapi,
489 NDR_DRSUAPI_INTER_DOMAIN_MOVE,
490 &r);
492 if (!NT_STATUS_IS_OK(status)) {
493 return status;
496 if (DEBUGLEVEL >= 10) {
497 NDR_PRINT_OUT_DEBUG(DRSUAPI_INTER_DOMAIN_MOVE, &r);
500 if (NT_STATUS_IS_ERR(status)) {
501 return status;
504 /* Return variables */
506 /* Return result */
507 if (werror) {
508 *werror = r.out.result;
511 return werror_to_ntstatus(r.out.result);
514 NTSTATUS rpccli_drsuapi_DsGetNT4ChangeLog(struct rpc_pipe_client *cli,
515 TALLOC_CTX *mem_ctx,
516 struct policy_handle *bind_handle /* [in] [ref] */,
517 uint32_t level /* [in] */,
518 union drsuapi_DsGetNT4ChangeLogRequest *req /* [in] [ref,switch_is(level)] */,
519 uint32_t *level_out /* [out] [ref] */,
520 union drsuapi_DsGetNT4ChangeLogInfo *info /* [out] [ref,switch_is(*level_out)] */,
521 WERROR *werror)
523 struct drsuapi_DsGetNT4ChangeLog r;
524 NTSTATUS status;
526 /* In parameters */
527 r.in.bind_handle = bind_handle;
528 r.in.level = level;
529 r.in.req = req;
531 if (DEBUGLEVEL >= 10) {
532 NDR_PRINT_IN_DEBUG(drsuapi_DsGetNT4ChangeLog, &r);
535 status = cli_do_rpc_ndr(cli,
536 mem_ctx,
537 PI_DRSUAPI,
538 &ndr_table_drsuapi,
539 NDR_DRSUAPI_DSGETNT4CHANGELOG,
540 &r);
542 if (!NT_STATUS_IS_OK(status)) {
543 return status;
546 if (DEBUGLEVEL >= 10) {
547 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNT4ChangeLog, &r);
550 if (NT_STATUS_IS_ERR(status)) {
551 return status;
554 /* Return variables */
555 *level_out = *r.out.level_out;
556 *info = *r.out.info;
558 /* Return result */
559 if (werror) {
560 *werror = r.out.result;
563 return werror_to_ntstatus(r.out.result);
566 NTSTATUS rpccli_drsuapi_DsCrackNames(struct rpc_pipe_client *cli,
567 TALLOC_CTX *mem_ctx,
568 struct policy_handle *bind_handle /* [in] [ref] */,
569 int32_t level /* [in] */,
570 union drsuapi_DsNameRequest *req /* [in] [ref,switch_is(level)] */,
571 int32_t *level_out /* [out] [ref] */,
572 union drsuapi_DsNameCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
573 WERROR *werror)
575 struct drsuapi_DsCrackNames r;
576 NTSTATUS status;
578 /* In parameters */
579 r.in.bind_handle = bind_handle;
580 r.in.level = level;
581 r.in.req = req;
583 if (DEBUGLEVEL >= 10) {
584 NDR_PRINT_IN_DEBUG(drsuapi_DsCrackNames, &r);
587 status = cli_do_rpc_ndr(cli,
588 mem_ctx,
589 PI_DRSUAPI,
590 &ndr_table_drsuapi,
591 NDR_DRSUAPI_DSCRACKNAMES,
592 &r);
594 if (!NT_STATUS_IS_OK(status)) {
595 return status;
598 if (DEBUGLEVEL >= 10) {
599 NDR_PRINT_OUT_DEBUG(drsuapi_DsCrackNames, &r);
602 if (NT_STATUS_IS_ERR(status)) {
603 return status;
606 /* Return variables */
607 *level_out = *r.out.level_out;
608 *ctr = *r.out.ctr;
610 /* Return result */
611 if (werror) {
612 *werror = r.out.result;
615 return werror_to_ntstatus(r.out.result);
618 NTSTATUS rpccli_drsuapi_DsWriteAccountSpn(struct rpc_pipe_client *cli,
619 TALLOC_CTX *mem_ctx,
620 struct policy_handle *bind_handle /* [in] [ref] */,
621 int32_t level /* [in] */,
622 union drsuapi_DsWriteAccountSpnRequest *req /* [in] [ref,switch_is(level)] */,
623 int32_t *level_out /* [out] [ref] */,
624 union drsuapi_DsWriteAccountSpnResult *res /* [out] [ref,switch_is(*level_out)] */,
625 WERROR *werror)
627 struct drsuapi_DsWriteAccountSpn r;
628 NTSTATUS status;
630 /* In parameters */
631 r.in.bind_handle = bind_handle;
632 r.in.level = level;
633 r.in.req = req;
635 if (DEBUGLEVEL >= 10) {
636 NDR_PRINT_IN_DEBUG(drsuapi_DsWriteAccountSpn, &r);
639 status = cli_do_rpc_ndr(cli,
640 mem_ctx,
641 PI_DRSUAPI,
642 &ndr_table_drsuapi,
643 NDR_DRSUAPI_DSWRITEACCOUNTSPN,
644 &r);
646 if (!NT_STATUS_IS_OK(status)) {
647 return status;
650 if (DEBUGLEVEL >= 10) {
651 NDR_PRINT_OUT_DEBUG(drsuapi_DsWriteAccountSpn, &r);
654 if (NT_STATUS_IS_ERR(status)) {
655 return status;
658 /* Return variables */
659 *level_out = *r.out.level_out;
660 *res = *r.out.res;
662 /* Return result */
663 if (werror) {
664 *werror = r.out.result;
667 return werror_to_ntstatus(r.out.result);
670 NTSTATUS rpccli_drsuapi_DsRemoveDSServer(struct rpc_pipe_client *cli,
671 TALLOC_CTX *mem_ctx,
672 struct policy_handle *bind_handle /* [in] [ref] */,
673 int32_t level /* [in] */,
674 union drsuapi_DsRemoveDSServerRequest *req /* [in] [ref,switch_is(level)] */,
675 int32_t *level_out /* [out] [ref] */,
676 union drsuapi_DsRemoveDSServerResult *res /* [out] [ref,switch_is(*level_out)] */,
677 WERROR *werror)
679 struct drsuapi_DsRemoveDSServer r;
680 NTSTATUS status;
682 /* In parameters */
683 r.in.bind_handle = bind_handle;
684 r.in.level = level;
685 r.in.req = req;
687 if (DEBUGLEVEL >= 10) {
688 NDR_PRINT_IN_DEBUG(drsuapi_DsRemoveDSServer, &r);
691 status = cli_do_rpc_ndr(cli,
692 mem_ctx,
693 PI_DRSUAPI,
694 &ndr_table_drsuapi,
695 NDR_DRSUAPI_DSREMOVEDSSERVER,
696 &r);
698 if (!NT_STATUS_IS_OK(status)) {
699 return status;
702 if (DEBUGLEVEL >= 10) {
703 NDR_PRINT_OUT_DEBUG(drsuapi_DsRemoveDSServer, &r);
706 if (NT_STATUS_IS_ERR(status)) {
707 return status;
710 /* Return variables */
711 *level_out = *r.out.level_out;
712 *res = *r.out.res;
714 /* Return result */
715 if (werror) {
716 *werror = r.out.result;
719 return werror_to_ntstatus(r.out.result);
722 NTSTATUS rpccli_DRSUAPI_REMOVE_DS_DOMAIN(struct rpc_pipe_client *cli,
723 TALLOC_CTX *mem_ctx,
724 WERROR *werror)
726 struct DRSUAPI_REMOVE_DS_DOMAIN r;
727 NTSTATUS status;
729 /* In parameters */
731 if (DEBUGLEVEL >= 10) {
732 NDR_PRINT_IN_DEBUG(DRSUAPI_REMOVE_DS_DOMAIN, &r);
735 status = cli_do_rpc_ndr(cli,
736 mem_ctx,
737 PI_DRSUAPI,
738 &ndr_table_drsuapi,
739 NDR_DRSUAPI_REMOVE_DS_DOMAIN,
740 &r);
742 if (!NT_STATUS_IS_OK(status)) {
743 return status;
746 if (DEBUGLEVEL >= 10) {
747 NDR_PRINT_OUT_DEBUG(DRSUAPI_REMOVE_DS_DOMAIN, &r);
750 if (NT_STATUS_IS_ERR(status)) {
751 return status;
754 /* Return variables */
756 /* Return result */
757 if (werror) {
758 *werror = r.out.result;
761 return werror_to_ntstatus(r.out.result);
764 NTSTATUS rpccli_drsuapi_DsGetDomainControllerInfo(struct rpc_pipe_client *cli,
765 TALLOC_CTX *mem_ctx,
766 struct policy_handle *bind_handle /* [in] [ref] */,
767 int32_t level /* [in] */,
768 union drsuapi_DsGetDCInfoRequest *req /* [in] [ref,switch_is(level)] */,
769 int32_t *level_out /* [out] [ref] */,
770 union drsuapi_DsGetDCInfoCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
771 WERROR *werror)
773 struct drsuapi_DsGetDomainControllerInfo r;
774 NTSTATUS status;
776 /* In parameters */
777 r.in.bind_handle = bind_handle;
778 r.in.level = level;
779 r.in.req = req;
781 if (DEBUGLEVEL >= 10) {
782 NDR_PRINT_IN_DEBUG(drsuapi_DsGetDomainControllerInfo, &r);
785 status = cli_do_rpc_ndr(cli,
786 mem_ctx,
787 PI_DRSUAPI,
788 &ndr_table_drsuapi,
789 NDR_DRSUAPI_DSGETDOMAINCONTROLLERINFO,
790 &r);
792 if (!NT_STATUS_IS_OK(status)) {
793 return status;
796 if (DEBUGLEVEL >= 10) {
797 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetDomainControllerInfo, &r);
800 if (NT_STATUS_IS_ERR(status)) {
801 return status;
804 /* Return variables */
805 *level_out = *r.out.level_out;
806 *ctr = *r.out.ctr;
808 /* Return result */
809 if (werror) {
810 *werror = r.out.result;
813 return werror_to_ntstatus(r.out.result);
816 NTSTATUS rpccli_drsuapi_DsAddEntry(struct rpc_pipe_client *cli,
817 TALLOC_CTX *mem_ctx,
818 struct policy_handle *bind_handle /* [in] [ref] */,
819 int32_t level /* [in] */,
820 union drsuapi_DsAddEntryRequest *req /* [in] [ref,switch_is(level)] */,
821 int32_t *level_out /* [out] [ref] */,
822 union drsuapi_DsAddEntryCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
823 WERROR *werror)
825 struct drsuapi_DsAddEntry r;
826 NTSTATUS status;
828 /* In parameters */
829 r.in.bind_handle = bind_handle;
830 r.in.level = level;
831 r.in.req = req;
833 if (DEBUGLEVEL >= 10) {
834 NDR_PRINT_IN_DEBUG(drsuapi_DsAddEntry, &r);
837 status = cli_do_rpc_ndr(cli,
838 mem_ctx,
839 PI_DRSUAPI,
840 &ndr_table_drsuapi,
841 NDR_DRSUAPI_DSADDENTRY,
842 &r);
844 if (!NT_STATUS_IS_OK(status)) {
845 return status;
848 if (DEBUGLEVEL >= 10) {
849 NDR_PRINT_OUT_DEBUG(drsuapi_DsAddEntry, &r);
852 if (NT_STATUS_IS_ERR(status)) {
853 return status;
856 /* Return variables */
857 *level_out = *r.out.level_out;
858 *ctr = *r.out.ctr;
860 /* Return result */
861 if (werror) {
862 *werror = r.out.result;
865 return werror_to_ntstatus(r.out.result);
868 NTSTATUS rpccli_DRSUAPI_EXECUTE_KCC(struct rpc_pipe_client *cli,
869 TALLOC_CTX *mem_ctx,
870 WERROR *werror)
872 struct DRSUAPI_EXECUTE_KCC r;
873 NTSTATUS status;
875 /* In parameters */
877 if (DEBUGLEVEL >= 10) {
878 NDR_PRINT_IN_DEBUG(DRSUAPI_EXECUTE_KCC, &r);
881 status = cli_do_rpc_ndr(cli,
882 mem_ctx,
883 PI_DRSUAPI,
884 &ndr_table_drsuapi,
885 NDR_DRSUAPI_EXECUTE_KCC,
886 &r);
888 if (!NT_STATUS_IS_OK(status)) {
889 return status;
892 if (DEBUGLEVEL >= 10) {
893 NDR_PRINT_OUT_DEBUG(DRSUAPI_EXECUTE_KCC, &r);
896 if (NT_STATUS_IS_ERR(status)) {
897 return status;
900 /* Return variables */
902 /* Return result */
903 if (werror) {
904 *werror = r.out.result;
907 return werror_to_ntstatus(r.out.result);
910 NTSTATUS rpccli_drsuapi_DsReplicaGetInfo(struct rpc_pipe_client *cli,
911 TALLOC_CTX *mem_ctx,
912 struct policy_handle *bind_handle /* [in] [ref] */,
913 enum drsuapi_DsReplicaGetInfoLevel level /* [in] */,
914 union drsuapi_DsReplicaGetInfoRequest *req /* [in] [ref,switch_is(level)] */,
915 enum drsuapi_DsReplicaInfoType *info_type /* [out] [ref] */,
916 union drsuapi_DsReplicaInfo *info /* [out] [ref,switch_is(*info_type)] */,
917 WERROR *werror)
919 struct drsuapi_DsReplicaGetInfo r;
920 NTSTATUS status;
922 /* In parameters */
923 r.in.bind_handle = bind_handle;
924 r.in.level = level;
925 r.in.req = req;
927 if (DEBUGLEVEL >= 10) {
928 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaGetInfo, &r);
931 status = cli_do_rpc_ndr(cli,
932 mem_ctx,
933 PI_DRSUAPI,
934 &ndr_table_drsuapi,
935 NDR_DRSUAPI_DSREPLICAGETINFO,
936 &r);
938 if (!NT_STATUS_IS_OK(status)) {
939 return status;
942 if (DEBUGLEVEL >= 10) {
943 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaGetInfo, &r);
946 if (NT_STATUS_IS_ERR(status)) {
947 return status;
950 /* Return variables */
951 *info_type = *r.out.info_type;
952 *info = *r.out.info;
954 /* Return result */
955 if (werror) {
956 *werror = r.out.result;
959 return werror_to_ntstatus(r.out.result);
962 NTSTATUS rpccli_DRSUAPI_ADD_SID_HISTORY(struct rpc_pipe_client *cli,
963 TALLOC_CTX *mem_ctx,
964 WERROR *werror)
966 struct DRSUAPI_ADD_SID_HISTORY r;
967 NTSTATUS status;
969 /* In parameters */
971 if (DEBUGLEVEL >= 10) {
972 NDR_PRINT_IN_DEBUG(DRSUAPI_ADD_SID_HISTORY, &r);
975 status = cli_do_rpc_ndr(cli,
976 mem_ctx,
977 PI_DRSUAPI,
978 &ndr_table_drsuapi,
979 NDR_DRSUAPI_ADD_SID_HISTORY,
980 &r);
982 if (!NT_STATUS_IS_OK(status)) {
983 return status;
986 if (DEBUGLEVEL >= 10) {
987 NDR_PRINT_OUT_DEBUG(DRSUAPI_ADD_SID_HISTORY, &r);
990 if (NT_STATUS_IS_ERR(status)) {
991 return status;
994 /* Return variables */
996 /* Return result */
997 if (werror) {
998 *werror = r.out.result;
1001 return werror_to_ntstatus(r.out.result);
1004 NTSTATUS rpccli_drsuapi_DsGetMemberships2(struct rpc_pipe_client *cli,
1005 TALLOC_CTX *mem_ctx,
1006 struct policy_handle *bind_handle /* [in] [ref] */,
1007 int32_t level /* [in] */,
1008 union drsuapi_DsGetMemberships2Request *req /* [in] [ref,switch_is(level)] */,
1009 int32_t *level_out /* [out] [ref] */,
1010 union drsuapi_DsGetMemberships2Ctr *ctr /* [out] [ref,switch_is(*level_out)] */,
1011 WERROR *werror)
1013 struct drsuapi_DsGetMemberships2 r;
1014 NTSTATUS status;
1016 /* In parameters */
1017 r.in.bind_handle = bind_handle;
1018 r.in.level = level;
1019 r.in.req = req;
1021 if (DEBUGLEVEL >= 10) {
1022 NDR_PRINT_IN_DEBUG(drsuapi_DsGetMemberships2, &r);
1025 status = cli_do_rpc_ndr(cli,
1026 mem_ctx,
1027 PI_DRSUAPI,
1028 &ndr_table_drsuapi,
1029 NDR_DRSUAPI_DSGETMEMBERSHIPS2,
1030 &r);
1032 if (!NT_STATUS_IS_OK(status)) {
1033 return status;
1036 if (DEBUGLEVEL >= 10) {
1037 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetMemberships2, &r);
1040 if (NT_STATUS_IS_ERR(status)) {
1041 return status;
1044 /* Return variables */
1045 *level_out = *r.out.level_out;
1046 *ctr = *r.out.ctr;
1048 /* Return result */
1049 if (werror) {
1050 *werror = r.out.result;
1053 return werror_to_ntstatus(r.out.result);
1056 NTSTATUS rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct rpc_pipe_client *cli,
1057 TALLOC_CTX *mem_ctx,
1058 WERROR *werror)
1060 struct DRSUAPI_REPLICA_VERIFY_OBJECTS r;
1061 NTSTATUS status;
1063 /* In parameters */
1065 if (DEBUGLEVEL >= 10) {
1066 NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_VERIFY_OBJECTS, &r);
1069 status = cli_do_rpc_ndr(cli,
1070 mem_ctx,
1071 PI_DRSUAPI,
1072 &ndr_table_drsuapi,
1073 NDR_DRSUAPI_REPLICA_VERIFY_OBJECTS,
1074 &r);
1076 if (!NT_STATUS_IS_OK(status)) {
1077 return status;
1080 if (DEBUGLEVEL >= 10) {
1081 NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_VERIFY_OBJECTS, &r);
1084 if (NT_STATUS_IS_ERR(status)) {
1085 return status;
1088 /* Return variables */
1090 /* Return result */
1091 if (werror) {
1092 *werror = r.out.result;
1095 return werror_to_ntstatus(r.out.result);
1098 NTSTATUS rpccli_DRSUAPI_GET_OBJECT_EXISTENCE(struct rpc_pipe_client *cli,
1099 TALLOC_CTX *mem_ctx,
1100 WERROR *werror)
1102 struct DRSUAPI_GET_OBJECT_EXISTENCE r;
1103 NTSTATUS status;
1105 /* In parameters */
1107 if (DEBUGLEVEL >= 10) {
1108 NDR_PRINT_IN_DEBUG(DRSUAPI_GET_OBJECT_EXISTENCE, &r);
1111 status = cli_do_rpc_ndr(cli,
1112 mem_ctx,
1113 PI_DRSUAPI,
1114 &ndr_table_drsuapi,
1115 NDR_DRSUAPI_GET_OBJECT_EXISTENCE,
1116 &r);
1118 if (!NT_STATUS_IS_OK(status)) {
1119 return status;
1122 if (DEBUGLEVEL >= 10) {
1123 NDR_PRINT_OUT_DEBUG(DRSUAPI_GET_OBJECT_EXISTENCE, &r);
1126 if (NT_STATUS_IS_ERR(status)) {
1127 return status;
1130 /* Return variables */
1132 /* Return result */
1133 if (werror) {
1134 *werror = r.out.result;
1137 return werror_to_ntstatus(r.out.result);
1140 NTSTATUS rpccli_drsuapi_QuerySitesByCost(struct rpc_pipe_client *cli,
1141 TALLOC_CTX *mem_ctx,
1142 struct policy_handle *bind_handle /* [in] [ref] */,
1143 int32_t level /* [in] */,
1144 union drsuapi_QuerySitesByCostRequest *req /* [in] [ref,switch_is(level)] */,
1145 int32_t *level_out /* [out] [ref] */,
1146 union drsuapi_QuerySitesByCostCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
1147 WERROR *werror)
1149 struct drsuapi_QuerySitesByCost r;
1150 NTSTATUS status;
1152 /* In parameters */
1153 r.in.bind_handle = bind_handle;
1154 r.in.level = level;
1155 r.in.req = req;
1157 if (DEBUGLEVEL >= 10) {
1158 NDR_PRINT_IN_DEBUG(drsuapi_QuerySitesByCost, &r);
1161 status = cli_do_rpc_ndr(cli,
1162 mem_ctx,
1163 PI_DRSUAPI,
1164 &ndr_table_drsuapi,
1165 NDR_DRSUAPI_QUERYSITESBYCOST,
1166 &r);
1168 if (!NT_STATUS_IS_OK(status)) {
1169 return status;
1172 if (DEBUGLEVEL >= 10) {
1173 NDR_PRINT_OUT_DEBUG(drsuapi_QuerySitesByCost, &r);
1176 if (NT_STATUS_IS_ERR(status)) {
1177 return status;
1180 /* Return variables */
1181 *level_out = *r.out.level_out;
1182 *ctr = *r.out.ctr;
1184 /* Return result */
1185 if (werror) {
1186 *werror = r.out.result;
1189 return werror_to_ntstatus(r.out.result);