2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/cli_dssetup.h"
9 struct rpccli_dssetup_DsRoleGetPrimaryDomainInformation_state
{
10 struct dssetup_DsRoleGetPrimaryDomainInformation orig
;
11 struct dssetup_DsRoleGetPrimaryDomainInformation tmp
;
12 TALLOC_CTX
*out_mem_ctx
;
13 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
16 static void rpccli_dssetup_DsRoleGetPrimaryDomainInformation_done(struct tevent_req
*subreq
);
18 struct tevent_req
*rpccli_dssetup_DsRoleGetPrimaryDomainInformation_send(TALLOC_CTX
*mem_ctx
,
19 struct tevent_context
*ev
,
20 struct rpc_pipe_client
*cli
,
21 enum dssetup_DsRoleInfoLevel _level
/* [in] */,
22 union dssetup_DsRoleInfo
*_info
/* [out] [unique,switch_is(level)] */)
24 struct tevent_req
*req
;
25 struct rpccli_dssetup_DsRoleGetPrimaryDomainInformation_state
*state
;
26 struct tevent_req
*subreq
;
28 req
= tevent_req_create(mem_ctx
, &state
,
29 struct rpccli_dssetup_DsRoleGetPrimaryDomainInformation_state
);
33 state
->out_mem_ctx
= NULL
;
34 state
->dispatch_recv
= cli
->dispatch_recv
;
37 state
->orig
.in
.level
= _level
;
40 state
->orig
.out
.info
= _info
;
43 ZERO_STRUCT(state
->orig
.out
.result
);
45 state
->out_mem_ctx
= talloc_named_const(state
, 0,
46 "rpccli_dssetup_DsRoleGetPrimaryDomainInformation_out_memory");
47 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
48 return tevent_req_post(req
, ev
);
51 /* make a temporary copy, that we pass to the dispatch function */
52 state
->tmp
= state
->orig
;
54 subreq
= cli
->dispatch_send(state
, ev
, cli
,
56 NDR_DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION
,
58 if (tevent_req_nomem(subreq
, req
)) {
59 return tevent_req_post(req
, ev
);
61 tevent_req_set_callback(subreq
, rpccli_dssetup_DsRoleGetPrimaryDomainInformation_done
, req
);
65 static void rpccli_dssetup_DsRoleGetPrimaryDomainInformation_done(struct tevent_req
*subreq
)
67 struct tevent_req
*req
= tevent_req_callback_data(
68 subreq
, struct tevent_req
);
69 struct rpccli_dssetup_DsRoleGetPrimaryDomainInformation_state
*state
= tevent_req_data(
70 req
, struct rpccli_dssetup_DsRoleGetPrimaryDomainInformation_state
);
74 if (state
->out_mem_ctx
) {
75 mem_ctx
= state
->out_mem_ctx
;
80 status
= state
->dispatch_recv(subreq
, mem_ctx
);
82 if (!NT_STATUS_IS_OK(status
)) {
83 tevent_req_nterror(req
, status
);
87 /* Copy out parameters */
88 if (state
->orig
.out
.info
&& state
->tmp
.out
.info
) {
89 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
93 state
->orig
.out
.result
= state
->tmp
.out
.result
;
95 /* Reset temporary structure */
96 ZERO_STRUCT(state
->tmp
);
101 NTSTATUS
rpccli_dssetup_DsRoleGetPrimaryDomainInformation_recv(struct tevent_req
*req
,
105 struct rpccli_dssetup_DsRoleGetPrimaryDomainInformation_state
*state
= tevent_req_data(
106 req
, struct rpccli_dssetup_DsRoleGetPrimaryDomainInformation_state
);
109 if (tevent_req_is_nterror(req
, &status
)) {
110 tevent_req_received(req
);
114 /* Steal possbile out parameters to the callers context */
115 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
118 *result
= state
->orig
.out
.result
;
120 tevent_req_received(req
);
124 NTSTATUS
rpccli_dssetup_DsRoleGetPrimaryDomainInformation(struct rpc_pipe_client
*cli
,
126 enum dssetup_DsRoleInfoLevel level
/* [in] */,
127 union dssetup_DsRoleInfo
*info
/* [out] [unique,switch_is(level)] */,
130 struct dssetup_DsRoleGetPrimaryDomainInformation r
;
136 status
= cli
->dispatch(cli
,
139 NDR_DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION
,
142 if (!NT_STATUS_IS_OK(status
)) {
146 if (NT_STATUS_IS_ERR(status
)) {
150 /* Return variables */
151 if (info
&& r
.out
.info
) {
157 *werror
= r
.out
.result
;
160 return werror_to_ntstatus(r
.out
.result
);
163 struct rpccli_dssetup_DsRoleDnsNameToFlatName_state
{
164 struct dssetup_DsRoleDnsNameToFlatName orig
;
165 struct dssetup_DsRoleDnsNameToFlatName tmp
;
166 TALLOC_CTX
*out_mem_ctx
;
167 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
170 static void rpccli_dssetup_DsRoleDnsNameToFlatName_done(struct tevent_req
*subreq
);
172 struct tevent_req
*rpccli_dssetup_DsRoleDnsNameToFlatName_send(TALLOC_CTX
*mem_ctx
,
173 struct tevent_context
*ev
,
174 struct rpc_pipe_client
*cli
)
176 struct tevent_req
*req
;
177 struct rpccli_dssetup_DsRoleDnsNameToFlatName_state
*state
;
178 struct tevent_req
*subreq
;
180 req
= tevent_req_create(mem_ctx
, &state
,
181 struct rpccli_dssetup_DsRoleDnsNameToFlatName_state
);
185 state
->out_mem_ctx
= NULL
;
186 state
->dispatch_recv
= cli
->dispatch_recv
;
193 ZERO_STRUCT(state
->orig
.out
.result
);
195 /* make a temporary copy, that we pass to the dispatch function */
196 state
->tmp
= state
->orig
;
198 subreq
= cli
->dispatch_send(state
, ev
, cli
,
200 NDR_DSSETUP_DSROLEDNSNAMETOFLATNAME
,
202 if (tevent_req_nomem(subreq
, req
)) {
203 return tevent_req_post(req
, ev
);
205 tevent_req_set_callback(subreq
, rpccli_dssetup_DsRoleDnsNameToFlatName_done
, req
);
209 static void rpccli_dssetup_DsRoleDnsNameToFlatName_done(struct tevent_req
*subreq
)
211 struct tevent_req
*req
= tevent_req_callback_data(
212 subreq
, struct tevent_req
);
213 struct rpccli_dssetup_DsRoleDnsNameToFlatName_state
*state
= tevent_req_data(
214 req
, struct rpccli_dssetup_DsRoleDnsNameToFlatName_state
);
218 if (state
->out_mem_ctx
) {
219 mem_ctx
= state
->out_mem_ctx
;
224 status
= state
->dispatch_recv(subreq
, mem_ctx
);
226 if (!NT_STATUS_IS_OK(status
)) {
227 tevent_req_nterror(req
, status
);
231 /* Copy out parameters */
234 state
->orig
.out
.result
= state
->tmp
.out
.result
;
236 /* Reset temporary structure */
237 ZERO_STRUCT(state
->tmp
);
239 tevent_req_done(req
);
242 NTSTATUS
rpccli_dssetup_DsRoleDnsNameToFlatName_recv(struct tevent_req
*req
,
246 struct rpccli_dssetup_DsRoleDnsNameToFlatName_state
*state
= tevent_req_data(
247 req
, struct rpccli_dssetup_DsRoleDnsNameToFlatName_state
);
250 if (tevent_req_is_nterror(req
, &status
)) {
251 tevent_req_received(req
);
255 /* Steal possbile out parameters to the callers context */
256 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
259 *result
= state
->orig
.out
.result
;
261 tevent_req_received(req
);
265 NTSTATUS
rpccli_dssetup_DsRoleDnsNameToFlatName(struct rpc_pipe_client
*cli
,
269 struct dssetup_DsRoleDnsNameToFlatName r
;
274 status
= cli
->dispatch(cli
,
277 NDR_DSSETUP_DSROLEDNSNAMETOFLATNAME
,
280 if (!NT_STATUS_IS_OK(status
)) {
284 if (NT_STATUS_IS_ERR(status
)) {
288 /* Return variables */
292 *werror
= r
.out
.result
;
295 return werror_to_ntstatus(r
.out
.result
);
298 struct rpccli_dssetup_DsRoleDcAsDc_state
{
299 struct dssetup_DsRoleDcAsDc orig
;
300 struct dssetup_DsRoleDcAsDc tmp
;
301 TALLOC_CTX
*out_mem_ctx
;
302 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
305 static void rpccli_dssetup_DsRoleDcAsDc_done(struct tevent_req
*subreq
);
307 struct tevent_req
*rpccli_dssetup_DsRoleDcAsDc_send(TALLOC_CTX
*mem_ctx
,
308 struct tevent_context
*ev
,
309 struct rpc_pipe_client
*cli
)
311 struct tevent_req
*req
;
312 struct rpccli_dssetup_DsRoleDcAsDc_state
*state
;
313 struct tevent_req
*subreq
;
315 req
= tevent_req_create(mem_ctx
, &state
,
316 struct rpccli_dssetup_DsRoleDcAsDc_state
);
320 state
->out_mem_ctx
= NULL
;
321 state
->dispatch_recv
= cli
->dispatch_recv
;
328 ZERO_STRUCT(state
->orig
.out
.result
);
330 /* make a temporary copy, that we pass to the dispatch function */
331 state
->tmp
= state
->orig
;
333 subreq
= cli
->dispatch_send(state
, ev
, cli
,
335 NDR_DSSETUP_DSROLEDCASDC
,
337 if (tevent_req_nomem(subreq
, req
)) {
338 return tevent_req_post(req
, ev
);
340 tevent_req_set_callback(subreq
, rpccli_dssetup_DsRoleDcAsDc_done
, req
);
344 static void rpccli_dssetup_DsRoleDcAsDc_done(struct tevent_req
*subreq
)
346 struct tevent_req
*req
= tevent_req_callback_data(
347 subreq
, struct tevent_req
);
348 struct rpccli_dssetup_DsRoleDcAsDc_state
*state
= tevent_req_data(
349 req
, struct rpccli_dssetup_DsRoleDcAsDc_state
);
353 if (state
->out_mem_ctx
) {
354 mem_ctx
= state
->out_mem_ctx
;
359 status
= state
->dispatch_recv(subreq
, mem_ctx
);
361 if (!NT_STATUS_IS_OK(status
)) {
362 tevent_req_nterror(req
, status
);
366 /* Copy out parameters */
369 state
->orig
.out
.result
= state
->tmp
.out
.result
;
371 /* Reset temporary structure */
372 ZERO_STRUCT(state
->tmp
);
374 tevent_req_done(req
);
377 NTSTATUS
rpccli_dssetup_DsRoleDcAsDc_recv(struct tevent_req
*req
,
381 struct rpccli_dssetup_DsRoleDcAsDc_state
*state
= tevent_req_data(
382 req
, struct rpccli_dssetup_DsRoleDcAsDc_state
);
385 if (tevent_req_is_nterror(req
, &status
)) {
386 tevent_req_received(req
);
390 /* Steal possbile out parameters to the callers context */
391 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
394 *result
= state
->orig
.out
.result
;
396 tevent_req_received(req
);
400 NTSTATUS
rpccli_dssetup_DsRoleDcAsDc(struct rpc_pipe_client
*cli
,
404 struct dssetup_DsRoleDcAsDc r
;
409 status
= cli
->dispatch(cli
,
412 NDR_DSSETUP_DSROLEDCASDC
,
415 if (!NT_STATUS_IS_OK(status
)) {
419 if (NT_STATUS_IS_ERR(status
)) {
423 /* Return variables */
427 *werror
= r
.out
.result
;
430 return werror_to_ntstatus(r
.out
.result
);
433 struct rpccli_dssetup_DsRoleDcAsReplica_state
{
434 struct dssetup_DsRoleDcAsReplica orig
;
435 struct dssetup_DsRoleDcAsReplica tmp
;
436 TALLOC_CTX
*out_mem_ctx
;
437 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
440 static void rpccli_dssetup_DsRoleDcAsReplica_done(struct tevent_req
*subreq
);
442 struct tevent_req
*rpccli_dssetup_DsRoleDcAsReplica_send(TALLOC_CTX
*mem_ctx
,
443 struct tevent_context
*ev
,
444 struct rpc_pipe_client
*cli
)
446 struct tevent_req
*req
;
447 struct rpccli_dssetup_DsRoleDcAsReplica_state
*state
;
448 struct tevent_req
*subreq
;
450 req
= tevent_req_create(mem_ctx
, &state
,
451 struct rpccli_dssetup_DsRoleDcAsReplica_state
);
455 state
->out_mem_ctx
= NULL
;
456 state
->dispatch_recv
= cli
->dispatch_recv
;
463 ZERO_STRUCT(state
->orig
.out
.result
);
465 /* make a temporary copy, that we pass to the dispatch function */
466 state
->tmp
= state
->orig
;
468 subreq
= cli
->dispatch_send(state
, ev
, cli
,
470 NDR_DSSETUP_DSROLEDCASREPLICA
,
472 if (tevent_req_nomem(subreq
, req
)) {
473 return tevent_req_post(req
, ev
);
475 tevent_req_set_callback(subreq
, rpccli_dssetup_DsRoleDcAsReplica_done
, req
);
479 static void rpccli_dssetup_DsRoleDcAsReplica_done(struct tevent_req
*subreq
)
481 struct tevent_req
*req
= tevent_req_callback_data(
482 subreq
, struct tevent_req
);
483 struct rpccli_dssetup_DsRoleDcAsReplica_state
*state
= tevent_req_data(
484 req
, struct rpccli_dssetup_DsRoleDcAsReplica_state
);
488 if (state
->out_mem_ctx
) {
489 mem_ctx
= state
->out_mem_ctx
;
494 status
= state
->dispatch_recv(subreq
, mem_ctx
);
496 if (!NT_STATUS_IS_OK(status
)) {
497 tevent_req_nterror(req
, status
);
501 /* Copy out parameters */
504 state
->orig
.out
.result
= state
->tmp
.out
.result
;
506 /* Reset temporary structure */
507 ZERO_STRUCT(state
->tmp
);
509 tevent_req_done(req
);
512 NTSTATUS
rpccli_dssetup_DsRoleDcAsReplica_recv(struct tevent_req
*req
,
516 struct rpccli_dssetup_DsRoleDcAsReplica_state
*state
= tevent_req_data(
517 req
, struct rpccli_dssetup_DsRoleDcAsReplica_state
);
520 if (tevent_req_is_nterror(req
, &status
)) {
521 tevent_req_received(req
);
525 /* Steal possbile out parameters to the callers context */
526 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
529 *result
= state
->orig
.out
.result
;
531 tevent_req_received(req
);
535 NTSTATUS
rpccli_dssetup_DsRoleDcAsReplica(struct rpc_pipe_client
*cli
,
539 struct dssetup_DsRoleDcAsReplica r
;
544 status
= cli
->dispatch(cli
,
547 NDR_DSSETUP_DSROLEDCASREPLICA
,
550 if (!NT_STATUS_IS_OK(status
)) {
554 if (NT_STATUS_IS_ERR(status
)) {
558 /* Return variables */
562 *werror
= r
.out
.result
;
565 return werror_to_ntstatus(r
.out
.result
);
568 struct rpccli_dssetup_DsRoleDemoteDc_state
{
569 struct dssetup_DsRoleDemoteDc orig
;
570 struct dssetup_DsRoleDemoteDc tmp
;
571 TALLOC_CTX
*out_mem_ctx
;
572 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
575 static void rpccli_dssetup_DsRoleDemoteDc_done(struct tevent_req
*subreq
);
577 struct tevent_req
*rpccli_dssetup_DsRoleDemoteDc_send(TALLOC_CTX
*mem_ctx
,
578 struct tevent_context
*ev
,
579 struct rpc_pipe_client
*cli
)
581 struct tevent_req
*req
;
582 struct rpccli_dssetup_DsRoleDemoteDc_state
*state
;
583 struct tevent_req
*subreq
;
585 req
= tevent_req_create(mem_ctx
, &state
,
586 struct rpccli_dssetup_DsRoleDemoteDc_state
);
590 state
->out_mem_ctx
= NULL
;
591 state
->dispatch_recv
= cli
->dispatch_recv
;
598 ZERO_STRUCT(state
->orig
.out
.result
);
600 /* make a temporary copy, that we pass to the dispatch function */
601 state
->tmp
= state
->orig
;
603 subreq
= cli
->dispatch_send(state
, ev
, cli
,
605 NDR_DSSETUP_DSROLEDEMOTEDC
,
607 if (tevent_req_nomem(subreq
, req
)) {
608 return tevent_req_post(req
, ev
);
610 tevent_req_set_callback(subreq
, rpccli_dssetup_DsRoleDemoteDc_done
, req
);
614 static void rpccli_dssetup_DsRoleDemoteDc_done(struct tevent_req
*subreq
)
616 struct tevent_req
*req
= tevent_req_callback_data(
617 subreq
, struct tevent_req
);
618 struct rpccli_dssetup_DsRoleDemoteDc_state
*state
= tevent_req_data(
619 req
, struct rpccli_dssetup_DsRoleDemoteDc_state
);
623 if (state
->out_mem_ctx
) {
624 mem_ctx
= state
->out_mem_ctx
;
629 status
= state
->dispatch_recv(subreq
, mem_ctx
);
631 if (!NT_STATUS_IS_OK(status
)) {
632 tevent_req_nterror(req
, status
);
636 /* Copy out parameters */
639 state
->orig
.out
.result
= state
->tmp
.out
.result
;
641 /* Reset temporary structure */
642 ZERO_STRUCT(state
->tmp
);
644 tevent_req_done(req
);
647 NTSTATUS
rpccli_dssetup_DsRoleDemoteDc_recv(struct tevent_req
*req
,
651 struct rpccli_dssetup_DsRoleDemoteDc_state
*state
= tevent_req_data(
652 req
, struct rpccli_dssetup_DsRoleDemoteDc_state
);
655 if (tevent_req_is_nterror(req
, &status
)) {
656 tevent_req_received(req
);
660 /* Steal possbile out parameters to the callers context */
661 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
664 *result
= state
->orig
.out
.result
;
666 tevent_req_received(req
);
670 NTSTATUS
rpccli_dssetup_DsRoleDemoteDc(struct rpc_pipe_client
*cli
,
674 struct dssetup_DsRoleDemoteDc r
;
679 status
= cli
->dispatch(cli
,
682 NDR_DSSETUP_DSROLEDEMOTEDC
,
685 if (!NT_STATUS_IS_OK(status
)) {
689 if (NT_STATUS_IS_ERR(status
)) {
693 /* Return variables */
697 *werror
= r
.out
.result
;
700 return werror_to_ntstatus(r
.out
.result
);
703 struct rpccli_dssetup_DsRoleGetDcOperationProgress_state
{
704 struct dssetup_DsRoleGetDcOperationProgress orig
;
705 struct dssetup_DsRoleGetDcOperationProgress tmp
;
706 TALLOC_CTX
*out_mem_ctx
;
707 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
710 static void rpccli_dssetup_DsRoleGetDcOperationProgress_done(struct tevent_req
*subreq
);
712 struct tevent_req
*rpccli_dssetup_DsRoleGetDcOperationProgress_send(TALLOC_CTX
*mem_ctx
,
713 struct tevent_context
*ev
,
714 struct rpc_pipe_client
*cli
)
716 struct tevent_req
*req
;
717 struct rpccli_dssetup_DsRoleGetDcOperationProgress_state
*state
;
718 struct tevent_req
*subreq
;
720 req
= tevent_req_create(mem_ctx
, &state
,
721 struct rpccli_dssetup_DsRoleGetDcOperationProgress_state
);
725 state
->out_mem_ctx
= NULL
;
726 state
->dispatch_recv
= cli
->dispatch_recv
;
733 ZERO_STRUCT(state
->orig
.out
.result
);
735 /* make a temporary copy, that we pass to the dispatch function */
736 state
->tmp
= state
->orig
;
738 subreq
= cli
->dispatch_send(state
, ev
, cli
,
740 NDR_DSSETUP_DSROLEGETDCOPERATIONPROGRESS
,
742 if (tevent_req_nomem(subreq
, req
)) {
743 return tevent_req_post(req
, ev
);
745 tevent_req_set_callback(subreq
, rpccli_dssetup_DsRoleGetDcOperationProgress_done
, req
);
749 static void rpccli_dssetup_DsRoleGetDcOperationProgress_done(struct tevent_req
*subreq
)
751 struct tevent_req
*req
= tevent_req_callback_data(
752 subreq
, struct tevent_req
);
753 struct rpccli_dssetup_DsRoleGetDcOperationProgress_state
*state
= tevent_req_data(
754 req
, struct rpccli_dssetup_DsRoleGetDcOperationProgress_state
);
758 if (state
->out_mem_ctx
) {
759 mem_ctx
= state
->out_mem_ctx
;
764 status
= state
->dispatch_recv(subreq
, mem_ctx
);
766 if (!NT_STATUS_IS_OK(status
)) {
767 tevent_req_nterror(req
, status
);
771 /* Copy out parameters */
774 state
->orig
.out
.result
= state
->tmp
.out
.result
;
776 /* Reset temporary structure */
777 ZERO_STRUCT(state
->tmp
);
779 tevent_req_done(req
);
782 NTSTATUS
rpccli_dssetup_DsRoleGetDcOperationProgress_recv(struct tevent_req
*req
,
786 struct rpccli_dssetup_DsRoleGetDcOperationProgress_state
*state
= tevent_req_data(
787 req
, struct rpccli_dssetup_DsRoleGetDcOperationProgress_state
);
790 if (tevent_req_is_nterror(req
, &status
)) {
791 tevent_req_received(req
);
795 /* Steal possbile out parameters to the callers context */
796 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
799 *result
= state
->orig
.out
.result
;
801 tevent_req_received(req
);
805 NTSTATUS
rpccli_dssetup_DsRoleGetDcOperationProgress(struct rpc_pipe_client
*cli
,
809 struct dssetup_DsRoleGetDcOperationProgress r
;
814 status
= cli
->dispatch(cli
,
817 NDR_DSSETUP_DSROLEGETDCOPERATIONPROGRESS
,
820 if (!NT_STATUS_IS_OK(status
)) {
824 if (NT_STATUS_IS_ERR(status
)) {
828 /* Return variables */
832 *werror
= r
.out
.result
;
835 return werror_to_ntstatus(r
.out
.result
);
838 struct rpccli_dssetup_DsRoleGetDcOperationResults_state
{
839 struct dssetup_DsRoleGetDcOperationResults orig
;
840 struct dssetup_DsRoleGetDcOperationResults tmp
;
841 TALLOC_CTX
*out_mem_ctx
;
842 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
845 static void rpccli_dssetup_DsRoleGetDcOperationResults_done(struct tevent_req
*subreq
);
847 struct tevent_req
*rpccli_dssetup_DsRoleGetDcOperationResults_send(TALLOC_CTX
*mem_ctx
,
848 struct tevent_context
*ev
,
849 struct rpc_pipe_client
*cli
)
851 struct tevent_req
*req
;
852 struct rpccli_dssetup_DsRoleGetDcOperationResults_state
*state
;
853 struct tevent_req
*subreq
;
855 req
= tevent_req_create(mem_ctx
, &state
,
856 struct rpccli_dssetup_DsRoleGetDcOperationResults_state
);
860 state
->out_mem_ctx
= NULL
;
861 state
->dispatch_recv
= cli
->dispatch_recv
;
868 ZERO_STRUCT(state
->orig
.out
.result
);
870 /* make a temporary copy, that we pass to the dispatch function */
871 state
->tmp
= state
->orig
;
873 subreq
= cli
->dispatch_send(state
, ev
, cli
,
875 NDR_DSSETUP_DSROLEGETDCOPERATIONRESULTS
,
877 if (tevent_req_nomem(subreq
, req
)) {
878 return tevent_req_post(req
, ev
);
880 tevent_req_set_callback(subreq
, rpccli_dssetup_DsRoleGetDcOperationResults_done
, req
);
884 static void rpccli_dssetup_DsRoleGetDcOperationResults_done(struct tevent_req
*subreq
)
886 struct tevent_req
*req
= tevent_req_callback_data(
887 subreq
, struct tevent_req
);
888 struct rpccli_dssetup_DsRoleGetDcOperationResults_state
*state
= tevent_req_data(
889 req
, struct rpccli_dssetup_DsRoleGetDcOperationResults_state
);
893 if (state
->out_mem_ctx
) {
894 mem_ctx
= state
->out_mem_ctx
;
899 status
= state
->dispatch_recv(subreq
, mem_ctx
);
901 if (!NT_STATUS_IS_OK(status
)) {
902 tevent_req_nterror(req
, status
);
906 /* Copy out parameters */
909 state
->orig
.out
.result
= state
->tmp
.out
.result
;
911 /* Reset temporary structure */
912 ZERO_STRUCT(state
->tmp
);
914 tevent_req_done(req
);
917 NTSTATUS
rpccli_dssetup_DsRoleGetDcOperationResults_recv(struct tevent_req
*req
,
921 struct rpccli_dssetup_DsRoleGetDcOperationResults_state
*state
= tevent_req_data(
922 req
, struct rpccli_dssetup_DsRoleGetDcOperationResults_state
);
925 if (tevent_req_is_nterror(req
, &status
)) {
926 tevent_req_received(req
);
930 /* Steal possbile out parameters to the callers context */
931 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
934 *result
= state
->orig
.out
.result
;
936 tevent_req_received(req
);
940 NTSTATUS
rpccli_dssetup_DsRoleGetDcOperationResults(struct rpc_pipe_client
*cli
,
944 struct dssetup_DsRoleGetDcOperationResults r
;
949 status
= cli
->dispatch(cli
,
952 NDR_DSSETUP_DSROLEGETDCOPERATIONRESULTS
,
955 if (!NT_STATUS_IS_OK(status
)) {
959 if (NT_STATUS_IS_ERR(status
)) {
963 /* Return variables */
967 *werror
= r
.out
.result
;
970 return werror_to_ntstatus(r
.out
.result
);
973 struct rpccli_dssetup_DsRoleCancel_state
{
974 struct dssetup_DsRoleCancel orig
;
975 struct dssetup_DsRoleCancel tmp
;
976 TALLOC_CTX
*out_mem_ctx
;
977 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
980 static void rpccli_dssetup_DsRoleCancel_done(struct tevent_req
*subreq
);
982 struct tevent_req
*rpccli_dssetup_DsRoleCancel_send(TALLOC_CTX
*mem_ctx
,
983 struct tevent_context
*ev
,
984 struct rpc_pipe_client
*cli
)
986 struct tevent_req
*req
;
987 struct rpccli_dssetup_DsRoleCancel_state
*state
;
988 struct tevent_req
*subreq
;
990 req
= tevent_req_create(mem_ctx
, &state
,
991 struct rpccli_dssetup_DsRoleCancel_state
);
995 state
->out_mem_ctx
= NULL
;
996 state
->dispatch_recv
= cli
->dispatch_recv
;
1000 /* Out parameters */
1003 ZERO_STRUCT(state
->orig
.out
.result
);
1005 /* make a temporary copy, that we pass to the dispatch function */
1006 state
->tmp
= state
->orig
;
1008 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1010 NDR_DSSETUP_DSROLECANCEL
,
1012 if (tevent_req_nomem(subreq
, req
)) {
1013 return tevent_req_post(req
, ev
);
1015 tevent_req_set_callback(subreq
, rpccli_dssetup_DsRoleCancel_done
, req
);
1019 static void rpccli_dssetup_DsRoleCancel_done(struct tevent_req
*subreq
)
1021 struct tevent_req
*req
= tevent_req_callback_data(
1022 subreq
, struct tevent_req
);
1023 struct rpccli_dssetup_DsRoleCancel_state
*state
= tevent_req_data(
1024 req
, struct rpccli_dssetup_DsRoleCancel_state
);
1026 TALLOC_CTX
*mem_ctx
;
1028 if (state
->out_mem_ctx
) {
1029 mem_ctx
= state
->out_mem_ctx
;
1034 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1035 TALLOC_FREE(subreq
);
1036 if (!NT_STATUS_IS_OK(status
)) {
1037 tevent_req_nterror(req
, status
);
1041 /* Copy out parameters */
1044 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1046 /* Reset temporary structure */
1047 ZERO_STRUCT(state
->tmp
);
1049 tevent_req_done(req
);
1052 NTSTATUS
rpccli_dssetup_DsRoleCancel_recv(struct tevent_req
*req
,
1053 TALLOC_CTX
*mem_ctx
,
1056 struct rpccli_dssetup_DsRoleCancel_state
*state
= tevent_req_data(
1057 req
, struct rpccli_dssetup_DsRoleCancel_state
);
1060 if (tevent_req_is_nterror(req
, &status
)) {
1061 tevent_req_received(req
);
1065 /* Steal possbile out parameters to the callers context */
1066 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1069 *result
= state
->orig
.out
.result
;
1071 tevent_req_received(req
);
1072 return NT_STATUS_OK
;
1075 NTSTATUS
rpccli_dssetup_DsRoleCancel(struct rpc_pipe_client
*cli
,
1076 TALLOC_CTX
*mem_ctx
,
1079 struct dssetup_DsRoleCancel r
;
1084 status
= cli
->dispatch(cli
,
1087 NDR_DSSETUP_DSROLECANCEL
,
1090 if (!NT_STATUS_IS_OK(status
)) {
1094 if (NT_STATUS_IS_ERR(status
)) {
1098 /* Return variables */
1102 *werror
= r
.out
.result
;
1105 return werror_to_ntstatus(r
.out
.result
);
1108 struct rpccli_dssetup_DsRoleServerSaveStateForUpgrade_state
{
1109 struct dssetup_DsRoleServerSaveStateForUpgrade orig
;
1110 struct dssetup_DsRoleServerSaveStateForUpgrade tmp
;
1111 TALLOC_CTX
*out_mem_ctx
;
1112 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1115 static void rpccli_dssetup_DsRoleServerSaveStateForUpgrade_done(struct tevent_req
*subreq
);
1117 struct tevent_req
*rpccli_dssetup_DsRoleServerSaveStateForUpgrade_send(TALLOC_CTX
*mem_ctx
,
1118 struct tevent_context
*ev
,
1119 struct rpc_pipe_client
*cli
)
1121 struct tevent_req
*req
;
1122 struct rpccli_dssetup_DsRoleServerSaveStateForUpgrade_state
*state
;
1123 struct tevent_req
*subreq
;
1125 req
= tevent_req_create(mem_ctx
, &state
,
1126 struct rpccli_dssetup_DsRoleServerSaveStateForUpgrade_state
);
1130 state
->out_mem_ctx
= NULL
;
1131 state
->dispatch_recv
= cli
->dispatch_recv
;
1135 /* Out parameters */
1138 ZERO_STRUCT(state
->orig
.out
.result
);
1140 /* make a temporary copy, that we pass to the dispatch function */
1141 state
->tmp
= state
->orig
;
1143 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1145 NDR_DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE
,
1147 if (tevent_req_nomem(subreq
, req
)) {
1148 return tevent_req_post(req
, ev
);
1150 tevent_req_set_callback(subreq
, rpccli_dssetup_DsRoleServerSaveStateForUpgrade_done
, req
);
1154 static void rpccli_dssetup_DsRoleServerSaveStateForUpgrade_done(struct tevent_req
*subreq
)
1156 struct tevent_req
*req
= tevent_req_callback_data(
1157 subreq
, struct tevent_req
);
1158 struct rpccli_dssetup_DsRoleServerSaveStateForUpgrade_state
*state
= tevent_req_data(
1159 req
, struct rpccli_dssetup_DsRoleServerSaveStateForUpgrade_state
);
1161 TALLOC_CTX
*mem_ctx
;
1163 if (state
->out_mem_ctx
) {
1164 mem_ctx
= state
->out_mem_ctx
;
1169 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1170 TALLOC_FREE(subreq
);
1171 if (!NT_STATUS_IS_OK(status
)) {
1172 tevent_req_nterror(req
, status
);
1176 /* Copy out parameters */
1179 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1181 /* Reset temporary structure */
1182 ZERO_STRUCT(state
->tmp
);
1184 tevent_req_done(req
);
1187 NTSTATUS
rpccli_dssetup_DsRoleServerSaveStateForUpgrade_recv(struct tevent_req
*req
,
1188 TALLOC_CTX
*mem_ctx
,
1191 struct rpccli_dssetup_DsRoleServerSaveStateForUpgrade_state
*state
= tevent_req_data(
1192 req
, struct rpccli_dssetup_DsRoleServerSaveStateForUpgrade_state
);
1195 if (tevent_req_is_nterror(req
, &status
)) {
1196 tevent_req_received(req
);
1200 /* Steal possbile out parameters to the callers context */
1201 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1204 *result
= state
->orig
.out
.result
;
1206 tevent_req_received(req
);
1207 return NT_STATUS_OK
;
1210 NTSTATUS
rpccli_dssetup_DsRoleServerSaveStateForUpgrade(struct rpc_pipe_client
*cli
,
1211 TALLOC_CTX
*mem_ctx
,
1214 struct dssetup_DsRoleServerSaveStateForUpgrade r
;
1219 status
= cli
->dispatch(cli
,
1222 NDR_DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE
,
1225 if (!NT_STATUS_IS_OK(status
)) {
1229 if (NT_STATUS_IS_ERR(status
)) {
1233 /* Return variables */
1237 *werror
= r
.out
.result
;
1240 return werror_to_ntstatus(r
.out
.result
);
1243 struct rpccli_dssetup_DsRoleUpgradeDownlevelServer_state
{
1244 struct dssetup_DsRoleUpgradeDownlevelServer orig
;
1245 struct dssetup_DsRoleUpgradeDownlevelServer tmp
;
1246 TALLOC_CTX
*out_mem_ctx
;
1247 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1250 static void rpccli_dssetup_DsRoleUpgradeDownlevelServer_done(struct tevent_req
*subreq
);
1252 struct tevent_req
*rpccli_dssetup_DsRoleUpgradeDownlevelServer_send(TALLOC_CTX
*mem_ctx
,
1253 struct tevent_context
*ev
,
1254 struct rpc_pipe_client
*cli
)
1256 struct tevent_req
*req
;
1257 struct rpccli_dssetup_DsRoleUpgradeDownlevelServer_state
*state
;
1258 struct tevent_req
*subreq
;
1260 req
= tevent_req_create(mem_ctx
, &state
,
1261 struct rpccli_dssetup_DsRoleUpgradeDownlevelServer_state
);
1265 state
->out_mem_ctx
= NULL
;
1266 state
->dispatch_recv
= cli
->dispatch_recv
;
1270 /* Out parameters */
1273 ZERO_STRUCT(state
->orig
.out
.result
);
1275 /* make a temporary copy, that we pass to the dispatch function */
1276 state
->tmp
= state
->orig
;
1278 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1280 NDR_DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER
,
1282 if (tevent_req_nomem(subreq
, req
)) {
1283 return tevent_req_post(req
, ev
);
1285 tevent_req_set_callback(subreq
, rpccli_dssetup_DsRoleUpgradeDownlevelServer_done
, req
);
1289 static void rpccli_dssetup_DsRoleUpgradeDownlevelServer_done(struct tevent_req
*subreq
)
1291 struct tevent_req
*req
= tevent_req_callback_data(
1292 subreq
, struct tevent_req
);
1293 struct rpccli_dssetup_DsRoleUpgradeDownlevelServer_state
*state
= tevent_req_data(
1294 req
, struct rpccli_dssetup_DsRoleUpgradeDownlevelServer_state
);
1296 TALLOC_CTX
*mem_ctx
;
1298 if (state
->out_mem_ctx
) {
1299 mem_ctx
= state
->out_mem_ctx
;
1304 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1305 TALLOC_FREE(subreq
);
1306 if (!NT_STATUS_IS_OK(status
)) {
1307 tevent_req_nterror(req
, status
);
1311 /* Copy out parameters */
1314 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1316 /* Reset temporary structure */
1317 ZERO_STRUCT(state
->tmp
);
1319 tevent_req_done(req
);
1322 NTSTATUS
rpccli_dssetup_DsRoleUpgradeDownlevelServer_recv(struct tevent_req
*req
,
1323 TALLOC_CTX
*mem_ctx
,
1326 struct rpccli_dssetup_DsRoleUpgradeDownlevelServer_state
*state
= tevent_req_data(
1327 req
, struct rpccli_dssetup_DsRoleUpgradeDownlevelServer_state
);
1330 if (tevent_req_is_nterror(req
, &status
)) {
1331 tevent_req_received(req
);
1335 /* Steal possbile out parameters to the callers context */
1336 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1339 *result
= state
->orig
.out
.result
;
1341 tevent_req_received(req
);
1342 return NT_STATUS_OK
;
1345 NTSTATUS
rpccli_dssetup_DsRoleUpgradeDownlevelServer(struct rpc_pipe_client
*cli
,
1346 TALLOC_CTX
*mem_ctx
,
1349 struct dssetup_DsRoleUpgradeDownlevelServer r
;
1354 status
= cli
->dispatch(cli
,
1357 NDR_DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER
,
1360 if (!NT_STATUS_IS_OK(status
)) {
1364 if (NT_STATUS_IS_ERR(status
)) {
1368 /* Return variables */
1372 *werror
= r
.out
.result
;
1375 return werror_to_ntstatus(r
.out
.result
);
1378 struct rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_state
{
1379 struct dssetup_DsRoleAbortDownlevelServerUpgrade orig
;
1380 struct dssetup_DsRoleAbortDownlevelServerUpgrade tmp
;
1381 TALLOC_CTX
*out_mem_ctx
;
1382 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1385 static void rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_done(struct tevent_req
*subreq
);
1387 struct tevent_req
*rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_send(TALLOC_CTX
*mem_ctx
,
1388 struct tevent_context
*ev
,
1389 struct rpc_pipe_client
*cli
)
1391 struct tevent_req
*req
;
1392 struct rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_state
*state
;
1393 struct tevent_req
*subreq
;
1395 req
= tevent_req_create(mem_ctx
, &state
,
1396 struct rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_state
);
1400 state
->out_mem_ctx
= NULL
;
1401 state
->dispatch_recv
= cli
->dispatch_recv
;
1405 /* Out parameters */
1408 ZERO_STRUCT(state
->orig
.out
.result
);
1410 /* make a temporary copy, that we pass to the dispatch function */
1411 state
->tmp
= state
->orig
;
1413 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1415 NDR_DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE
,
1417 if (tevent_req_nomem(subreq
, req
)) {
1418 return tevent_req_post(req
, ev
);
1420 tevent_req_set_callback(subreq
, rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_done
, req
);
1424 static void rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_done(struct tevent_req
*subreq
)
1426 struct tevent_req
*req
= tevent_req_callback_data(
1427 subreq
, struct tevent_req
);
1428 struct rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_state
*state
= tevent_req_data(
1429 req
, struct rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_state
);
1431 TALLOC_CTX
*mem_ctx
;
1433 if (state
->out_mem_ctx
) {
1434 mem_ctx
= state
->out_mem_ctx
;
1439 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1440 TALLOC_FREE(subreq
);
1441 if (!NT_STATUS_IS_OK(status
)) {
1442 tevent_req_nterror(req
, status
);
1446 /* Copy out parameters */
1449 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1451 /* Reset temporary structure */
1452 ZERO_STRUCT(state
->tmp
);
1454 tevent_req_done(req
);
1457 NTSTATUS
rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_recv(struct tevent_req
*req
,
1458 TALLOC_CTX
*mem_ctx
,
1461 struct rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_state
*state
= tevent_req_data(
1462 req
, struct rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_state
);
1465 if (tevent_req_is_nterror(req
, &status
)) {
1466 tevent_req_received(req
);
1470 /* Steal possbile out parameters to the callers context */
1471 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1474 *result
= state
->orig
.out
.result
;
1476 tevent_req_received(req
);
1477 return NT_STATUS_OK
;
1480 NTSTATUS
rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade(struct rpc_pipe_client
*cli
,
1481 TALLOC_CTX
*mem_ctx
,
1484 struct dssetup_DsRoleAbortDownlevelServerUpgrade r
;
1489 status
= cli
->dispatch(cli
,
1492 NDR_DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE
,
1495 if (!NT_STATUS_IS_OK(status
)) {
1499 if (NT_STATUS_IS_ERR(status
)) {
1503 /* Return variables */
1507 *werror
= r
.out
.result
;
1510 return werror_to_ntstatus(r
.out
.result
);