s3:smbd: make sure we always have a valid talloc stackframe
[Samba.git] / librpc / gen_ndr / cli_dssetup.c
blob22b39cb3ee56b1c3c535610184cc7a0a9072de77
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_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);
30 if (req == NULL) {
31 return NULL;
33 state->out_mem_ctx = NULL;
34 state->dispatch_recv = cli->dispatch_recv;
36 /* In parameters */
37 state->orig.in.level = _level;
39 /* Out parameters */
40 state->orig.out.info = _info;
42 /* Result */
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,
55 &ndr_table_dssetup,
56 NDR_DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION,
57 &state->tmp);
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);
62 return 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);
71 NTSTATUS status;
72 TALLOC_CTX *mem_ctx;
74 if (state->out_mem_ctx) {
75 mem_ctx = state->out_mem_ctx;
76 } else {
77 mem_ctx = state;
80 status = state->dispatch_recv(subreq, mem_ctx);
81 TALLOC_FREE(subreq);
82 if (!NT_STATUS_IS_OK(status)) {
83 tevent_req_nterror(req, status);
84 return;
87 /* Copy out parameters */
88 if (state->orig.out.info && state->tmp.out.info) {
89 *state->orig.out.info = *state->tmp.out.info;
92 /* Copy result */
93 state->orig.out.result = state->tmp.out.result;
95 /* Reset temporary structure */
96 ZERO_STRUCT(state->tmp);
98 tevent_req_done(req);
101 NTSTATUS rpccli_dssetup_DsRoleGetPrimaryDomainInformation_recv(struct tevent_req *req,
102 TALLOC_CTX *mem_ctx,
103 WERROR *result)
105 struct rpccli_dssetup_DsRoleGetPrimaryDomainInformation_state *state = tevent_req_data(
106 req, struct rpccli_dssetup_DsRoleGetPrimaryDomainInformation_state);
107 NTSTATUS status;
109 if (tevent_req_is_nterror(req, &status)) {
110 tevent_req_received(req);
111 return status;
114 /* Steal possbile out parameters to the callers context */
115 talloc_steal(mem_ctx, state->out_mem_ctx);
117 /* Return result */
118 *result = state->orig.out.result;
120 tevent_req_received(req);
121 return NT_STATUS_OK;
124 NTSTATUS rpccli_dssetup_DsRoleGetPrimaryDomainInformation(struct rpc_pipe_client *cli,
125 TALLOC_CTX *mem_ctx,
126 enum dssetup_DsRoleInfoLevel level /* [in] */,
127 union dssetup_DsRoleInfo *info /* [out] [unique,switch_is(level)] */,
128 WERROR *werror)
130 struct dssetup_DsRoleGetPrimaryDomainInformation r;
131 NTSTATUS status;
133 /* In parameters */
134 r.in.level = level;
136 status = cli->dispatch(cli,
137 mem_ctx,
138 &ndr_table_dssetup,
139 NDR_DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION,
140 &r);
142 if (!NT_STATUS_IS_OK(status)) {
143 return status;
146 if (NT_STATUS_IS_ERR(status)) {
147 return status;
150 /* Return variables */
151 if (info && r.out.info) {
152 *info = *r.out.info;
155 /* Return result */
156 if (werror) {
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);
182 if (req == NULL) {
183 return NULL;
185 state->out_mem_ctx = NULL;
186 state->dispatch_recv = cli->dispatch_recv;
188 /* In parameters */
190 /* Out parameters */
192 /* Result */
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,
199 &ndr_table_dssetup,
200 NDR_DSSETUP_DSROLEDNSNAMETOFLATNAME,
201 &state->tmp);
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);
206 return 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);
215 NTSTATUS status;
216 TALLOC_CTX *mem_ctx;
218 if (state->out_mem_ctx) {
219 mem_ctx = state->out_mem_ctx;
220 } else {
221 mem_ctx = state;
224 status = state->dispatch_recv(subreq, mem_ctx);
225 TALLOC_FREE(subreq);
226 if (!NT_STATUS_IS_OK(status)) {
227 tevent_req_nterror(req, status);
228 return;
231 /* Copy out parameters */
233 /* Copy result */
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,
243 TALLOC_CTX *mem_ctx,
244 WERROR *result)
246 struct rpccli_dssetup_DsRoleDnsNameToFlatName_state *state = tevent_req_data(
247 req, struct rpccli_dssetup_DsRoleDnsNameToFlatName_state);
248 NTSTATUS status;
250 if (tevent_req_is_nterror(req, &status)) {
251 tevent_req_received(req);
252 return status;
255 /* Steal possbile out parameters to the callers context */
256 talloc_steal(mem_ctx, state->out_mem_ctx);
258 /* Return result */
259 *result = state->orig.out.result;
261 tevent_req_received(req);
262 return NT_STATUS_OK;
265 NTSTATUS rpccli_dssetup_DsRoleDnsNameToFlatName(struct rpc_pipe_client *cli,
266 TALLOC_CTX *mem_ctx,
267 WERROR *werror)
269 struct dssetup_DsRoleDnsNameToFlatName r;
270 NTSTATUS status;
272 /* In parameters */
274 status = cli->dispatch(cli,
275 mem_ctx,
276 &ndr_table_dssetup,
277 NDR_DSSETUP_DSROLEDNSNAMETOFLATNAME,
278 &r);
280 if (!NT_STATUS_IS_OK(status)) {
281 return status;
284 if (NT_STATUS_IS_ERR(status)) {
285 return status;
288 /* Return variables */
290 /* Return result */
291 if (werror) {
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);
317 if (req == NULL) {
318 return NULL;
320 state->out_mem_ctx = NULL;
321 state->dispatch_recv = cli->dispatch_recv;
323 /* In parameters */
325 /* Out parameters */
327 /* Result */
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,
334 &ndr_table_dssetup,
335 NDR_DSSETUP_DSROLEDCASDC,
336 &state->tmp);
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);
341 return 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);
350 NTSTATUS status;
351 TALLOC_CTX *mem_ctx;
353 if (state->out_mem_ctx) {
354 mem_ctx = state->out_mem_ctx;
355 } else {
356 mem_ctx = state;
359 status = state->dispatch_recv(subreq, mem_ctx);
360 TALLOC_FREE(subreq);
361 if (!NT_STATUS_IS_OK(status)) {
362 tevent_req_nterror(req, status);
363 return;
366 /* Copy out parameters */
368 /* Copy result */
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,
378 TALLOC_CTX *mem_ctx,
379 WERROR *result)
381 struct rpccli_dssetup_DsRoleDcAsDc_state *state = tevent_req_data(
382 req, struct rpccli_dssetup_DsRoleDcAsDc_state);
383 NTSTATUS status;
385 if (tevent_req_is_nterror(req, &status)) {
386 tevent_req_received(req);
387 return status;
390 /* Steal possbile out parameters to the callers context */
391 talloc_steal(mem_ctx, state->out_mem_ctx);
393 /* Return result */
394 *result = state->orig.out.result;
396 tevent_req_received(req);
397 return NT_STATUS_OK;
400 NTSTATUS rpccli_dssetup_DsRoleDcAsDc(struct rpc_pipe_client *cli,
401 TALLOC_CTX *mem_ctx,
402 WERROR *werror)
404 struct dssetup_DsRoleDcAsDc r;
405 NTSTATUS status;
407 /* In parameters */
409 status = cli->dispatch(cli,
410 mem_ctx,
411 &ndr_table_dssetup,
412 NDR_DSSETUP_DSROLEDCASDC,
413 &r);
415 if (!NT_STATUS_IS_OK(status)) {
416 return status;
419 if (NT_STATUS_IS_ERR(status)) {
420 return status;
423 /* Return variables */
425 /* Return result */
426 if (werror) {
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);
452 if (req == NULL) {
453 return NULL;
455 state->out_mem_ctx = NULL;
456 state->dispatch_recv = cli->dispatch_recv;
458 /* In parameters */
460 /* Out parameters */
462 /* Result */
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,
469 &ndr_table_dssetup,
470 NDR_DSSETUP_DSROLEDCASREPLICA,
471 &state->tmp);
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);
476 return 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);
485 NTSTATUS status;
486 TALLOC_CTX *mem_ctx;
488 if (state->out_mem_ctx) {
489 mem_ctx = state->out_mem_ctx;
490 } else {
491 mem_ctx = state;
494 status = state->dispatch_recv(subreq, mem_ctx);
495 TALLOC_FREE(subreq);
496 if (!NT_STATUS_IS_OK(status)) {
497 tevent_req_nterror(req, status);
498 return;
501 /* Copy out parameters */
503 /* Copy result */
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,
513 TALLOC_CTX *mem_ctx,
514 WERROR *result)
516 struct rpccli_dssetup_DsRoleDcAsReplica_state *state = tevent_req_data(
517 req, struct rpccli_dssetup_DsRoleDcAsReplica_state);
518 NTSTATUS status;
520 if (tevent_req_is_nterror(req, &status)) {
521 tevent_req_received(req);
522 return status;
525 /* Steal possbile out parameters to the callers context */
526 talloc_steal(mem_ctx, state->out_mem_ctx);
528 /* Return result */
529 *result = state->orig.out.result;
531 tevent_req_received(req);
532 return NT_STATUS_OK;
535 NTSTATUS rpccli_dssetup_DsRoleDcAsReplica(struct rpc_pipe_client *cli,
536 TALLOC_CTX *mem_ctx,
537 WERROR *werror)
539 struct dssetup_DsRoleDcAsReplica r;
540 NTSTATUS status;
542 /* In parameters */
544 status = cli->dispatch(cli,
545 mem_ctx,
546 &ndr_table_dssetup,
547 NDR_DSSETUP_DSROLEDCASREPLICA,
548 &r);
550 if (!NT_STATUS_IS_OK(status)) {
551 return status;
554 if (NT_STATUS_IS_ERR(status)) {
555 return status;
558 /* Return variables */
560 /* Return result */
561 if (werror) {
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);
587 if (req == NULL) {
588 return NULL;
590 state->out_mem_ctx = NULL;
591 state->dispatch_recv = cli->dispatch_recv;
593 /* In parameters */
595 /* Out parameters */
597 /* Result */
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,
604 &ndr_table_dssetup,
605 NDR_DSSETUP_DSROLEDEMOTEDC,
606 &state->tmp);
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);
611 return 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);
620 NTSTATUS status;
621 TALLOC_CTX *mem_ctx;
623 if (state->out_mem_ctx) {
624 mem_ctx = state->out_mem_ctx;
625 } else {
626 mem_ctx = state;
629 status = state->dispatch_recv(subreq, mem_ctx);
630 TALLOC_FREE(subreq);
631 if (!NT_STATUS_IS_OK(status)) {
632 tevent_req_nterror(req, status);
633 return;
636 /* Copy out parameters */
638 /* Copy result */
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,
648 TALLOC_CTX *mem_ctx,
649 WERROR *result)
651 struct rpccli_dssetup_DsRoleDemoteDc_state *state = tevent_req_data(
652 req, struct rpccli_dssetup_DsRoleDemoteDc_state);
653 NTSTATUS status;
655 if (tevent_req_is_nterror(req, &status)) {
656 tevent_req_received(req);
657 return status;
660 /* Steal possbile out parameters to the callers context */
661 talloc_steal(mem_ctx, state->out_mem_ctx);
663 /* Return result */
664 *result = state->orig.out.result;
666 tevent_req_received(req);
667 return NT_STATUS_OK;
670 NTSTATUS rpccli_dssetup_DsRoleDemoteDc(struct rpc_pipe_client *cli,
671 TALLOC_CTX *mem_ctx,
672 WERROR *werror)
674 struct dssetup_DsRoleDemoteDc r;
675 NTSTATUS status;
677 /* In parameters */
679 status = cli->dispatch(cli,
680 mem_ctx,
681 &ndr_table_dssetup,
682 NDR_DSSETUP_DSROLEDEMOTEDC,
683 &r);
685 if (!NT_STATUS_IS_OK(status)) {
686 return status;
689 if (NT_STATUS_IS_ERR(status)) {
690 return status;
693 /* Return variables */
695 /* Return result */
696 if (werror) {
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);
722 if (req == NULL) {
723 return NULL;
725 state->out_mem_ctx = NULL;
726 state->dispatch_recv = cli->dispatch_recv;
728 /* In parameters */
730 /* Out parameters */
732 /* Result */
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,
739 &ndr_table_dssetup,
740 NDR_DSSETUP_DSROLEGETDCOPERATIONPROGRESS,
741 &state->tmp);
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);
746 return 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);
755 NTSTATUS status;
756 TALLOC_CTX *mem_ctx;
758 if (state->out_mem_ctx) {
759 mem_ctx = state->out_mem_ctx;
760 } else {
761 mem_ctx = state;
764 status = state->dispatch_recv(subreq, mem_ctx);
765 TALLOC_FREE(subreq);
766 if (!NT_STATUS_IS_OK(status)) {
767 tevent_req_nterror(req, status);
768 return;
771 /* Copy out parameters */
773 /* Copy result */
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,
783 TALLOC_CTX *mem_ctx,
784 WERROR *result)
786 struct rpccli_dssetup_DsRoleGetDcOperationProgress_state *state = tevent_req_data(
787 req, struct rpccli_dssetup_DsRoleGetDcOperationProgress_state);
788 NTSTATUS status;
790 if (tevent_req_is_nterror(req, &status)) {
791 tevent_req_received(req);
792 return status;
795 /* Steal possbile out parameters to the callers context */
796 talloc_steal(mem_ctx, state->out_mem_ctx);
798 /* Return result */
799 *result = state->orig.out.result;
801 tevent_req_received(req);
802 return NT_STATUS_OK;
805 NTSTATUS rpccli_dssetup_DsRoleGetDcOperationProgress(struct rpc_pipe_client *cli,
806 TALLOC_CTX *mem_ctx,
807 WERROR *werror)
809 struct dssetup_DsRoleGetDcOperationProgress r;
810 NTSTATUS status;
812 /* In parameters */
814 status = cli->dispatch(cli,
815 mem_ctx,
816 &ndr_table_dssetup,
817 NDR_DSSETUP_DSROLEGETDCOPERATIONPROGRESS,
818 &r);
820 if (!NT_STATUS_IS_OK(status)) {
821 return status;
824 if (NT_STATUS_IS_ERR(status)) {
825 return status;
828 /* Return variables */
830 /* Return result */
831 if (werror) {
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);
857 if (req == NULL) {
858 return NULL;
860 state->out_mem_ctx = NULL;
861 state->dispatch_recv = cli->dispatch_recv;
863 /* In parameters */
865 /* Out parameters */
867 /* Result */
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,
874 &ndr_table_dssetup,
875 NDR_DSSETUP_DSROLEGETDCOPERATIONRESULTS,
876 &state->tmp);
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);
881 return 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);
890 NTSTATUS status;
891 TALLOC_CTX *mem_ctx;
893 if (state->out_mem_ctx) {
894 mem_ctx = state->out_mem_ctx;
895 } else {
896 mem_ctx = state;
899 status = state->dispatch_recv(subreq, mem_ctx);
900 TALLOC_FREE(subreq);
901 if (!NT_STATUS_IS_OK(status)) {
902 tevent_req_nterror(req, status);
903 return;
906 /* Copy out parameters */
908 /* Copy result */
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,
918 TALLOC_CTX *mem_ctx,
919 WERROR *result)
921 struct rpccli_dssetup_DsRoleGetDcOperationResults_state *state = tevent_req_data(
922 req, struct rpccli_dssetup_DsRoleGetDcOperationResults_state);
923 NTSTATUS status;
925 if (tevent_req_is_nterror(req, &status)) {
926 tevent_req_received(req);
927 return status;
930 /* Steal possbile out parameters to the callers context */
931 talloc_steal(mem_ctx, state->out_mem_ctx);
933 /* Return result */
934 *result = state->orig.out.result;
936 tevent_req_received(req);
937 return NT_STATUS_OK;
940 NTSTATUS rpccli_dssetup_DsRoleGetDcOperationResults(struct rpc_pipe_client *cli,
941 TALLOC_CTX *mem_ctx,
942 WERROR *werror)
944 struct dssetup_DsRoleGetDcOperationResults r;
945 NTSTATUS status;
947 /* In parameters */
949 status = cli->dispatch(cli,
950 mem_ctx,
951 &ndr_table_dssetup,
952 NDR_DSSETUP_DSROLEGETDCOPERATIONRESULTS,
953 &r);
955 if (!NT_STATUS_IS_OK(status)) {
956 return status;
959 if (NT_STATUS_IS_ERR(status)) {
960 return status;
963 /* Return variables */
965 /* Return result */
966 if (werror) {
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);
992 if (req == NULL) {
993 return NULL;
995 state->out_mem_ctx = NULL;
996 state->dispatch_recv = cli->dispatch_recv;
998 /* In parameters */
1000 /* Out parameters */
1002 /* Result */
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,
1009 &ndr_table_dssetup,
1010 NDR_DSSETUP_DSROLECANCEL,
1011 &state->tmp);
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);
1016 return 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);
1025 NTSTATUS status;
1026 TALLOC_CTX *mem_ctx;
1028 if (state->out_mem_ctx) {
1029 mem_ctx = state->out_mem_ctx;
1030 } else {
1031 mem_ctx = state;
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);
1038 return;
1041 /* Copy out parameters */
1043 /* Copy result */
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,
1054 WERROR *result)
1056 struct rpccli_dssetup_DsRoleCancel_state *state = tevent_req_data(
1057 req, struct rpccli_dssetup_DsRoleCancel_state);
1058 NTSTATUS status;
1060 if (tevent_req_is_nterror(req, &status)) {
1061 tevent_req_received(req);
1062 return status;
1065 /* Steal possbile out parameters to the callers context */
1066 talloc_steal(mem_ctx, state->out_mem_ctx);
1068 /* Return result */
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,
1077 WERROR *werror)
1079 struct dssetup_DsRoleCancel r;
1080 NTSTATUS status;
1082 /* In parameters */
1084 status = cli->dispatch(cli,
1085 mem_ctx,
1086 &ndr_table_dssetup,
1087 NDR_DSSETUP_DSROLECANCEL,
1088 &r);
1090 if (!NT_STATUS_IS_OK(status)) {
1091 return status;
1094 if (NT_STATUS_IS_ERR(status)) {
1095 return status;
1098 /* Return variables */
1100 /* Return result */
1101 if (werror) {
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);
1127 if (req == NULL) {
1128 return NULL;
1130 state->out_mem_ctx = NULL;
1131 state->dispatch_recv = cli->dispatch_recv;
1133 /* In parameters */
1135 /* Out parameters */
1137 /* Result */
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,
1144 &ndr_table_dssetup,
1145 NDR_DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE,
1146 &state->tmp);
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);
1151 return 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);
1160 NTSTATUS status;
1161 TALLOC_CTX *mem_ctx;
1163 if (state->out_mem_ctx) {
1164 mem_ctx = state->out_mem_ctx;
1165 } else {
1166 mem_ctx = state;
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);
1173 return;
1176 /* Copy out parameters */
1178 /* Copy result */
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,
1189 WERROR *result)
1191 struct rpccli_dssetup_DsRoleServerSaveStateForUpgrade_state *state = tevent_req_data(
1192 req, struct rpccli_dssetup_DsRoleServerSaveStateForUpgrade_state);
1193 NTSTATUS status;
1195 if (tevent_req_is_nterror(req, &status)) {
1196 tevent_req_received(req);
1197 return status;
1200 /* Steal possbile out parameters to the callers context */
1201 talloc_steal(mem_ctx, state->out_mem_ctx);
1203 /* Return result */
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,
1212 WERROR *werror)
1214 struct dssetup_DsRoleServerSaveStateForUpgrade r;
1215 NTSTATUS status;
1217 /* In parameters */
1219 status = cli->dispatch(cli,
1220 mem_ctx,
1221 &ndr_table_dssetup,
1222 NDR_DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE,
1223 &r);
1225 if (!NT_STATUS_IS_OK(status)) {
1226 return status;
1229 if (NT_STATUS_IS_ERR(status)) {
1230 return status;
1233 /* Return variables */
1235 /* Return result */
1236 if (werror) {
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);
1262 if (req == NULL) {
1263 return NULL;
1265 state->out_mem_ctx = NULL;
1266 state->dispatch_recv = cli->dispatch_recv;
1268 /* In parameters */
1270 /* Out parameters */
1272 /* Result */
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,
1279 &ndr_table_dssetup,
1280 NDR_DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER,
1281 &state->tmp);
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);
1286 return 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);
1295 NTSTATUS status;
1296 TALLOC_CTX *mem_ctx;
1298 if (state->out_mem_ctx) {
1299 mem_ctx = state->out_mem_ctx;
1300 } else {
1301 mem_ctx = state;
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);
1308 return;
1311 /* Copy out parameters */
1313 /* Copy result */
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,
1324 WERROR *result)
1326 struct rpccli_dssetup_DsRoleUpgradeDownlevelServer_state *state = tevent_req_data(
1327 req, struct rpccli_dssetup_DsRoleUpgradeDownlevelServer_state);
1328 NTSTATUS status;
1330 if (tevent_req_is_nterror(req, &status)) {
1331 tevent_req_received(req);
1332 return status;
1335 /* Steal possbile out parameters to the callers context */
1336 talloc_steal(mem_ctx, state->out_mem_ctx);
1338 /* Return result */
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,
1347 WERROR *werror)
1349 struct dssetup_DsRoleUpgradeDownlevelServer r;
1350 NTSTATUS status;
1352 /* In parameters */
1354 status = cli->dispatch(cli,
1355 mem_ctx,
1356 &ndr_table_dssetup,
1357 NDR_DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER,
1358 &r);
1360 if (!NT_STATUS_IS_OK(status)) {
1361 return status;
1364 if (NT_STATUS_IS_ERR(status)) {
1365 return status;
1368 /* Return variables */
1370 /* Return result */
1371 if (werror) {
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);
1397 if (req == NULL) {
1398 return NULL;
1400 state->out_mem_ctx = NULL;
1401 state->dispatch_recv = cli->dispatch_recv;
1403 /* In parameters */
1405 /* Out parameters */
1407 /* Result */
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,
1414 &ndr_table_dssetup,
1415 NDR_DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE,
1416 &state->tmp);
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);
1421 return 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);
1430 NTSTATUS status;
1431 TALLOC_CTX *mem_ctx;
1433 if (state->out_mem_ctx) {
1434 mem_ctx = state->out_mem_ctx;
1435 } else {
1436 mem_ctx = state;
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);
1443 return;
1446 /* Copy out parameters */
1448 /* Copy result */
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,
1459 WERROR *result)
1461 struct rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_state *state = tevent_req_data(
1462 req, struct rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_state);
1463 NTSTATUS status;
1465 if (tevent_req_is_nterror(req, &status)) {
1466 tevent_req_received(req);
1467 return status;
1470 /* Steal possbile out parameters to the callers context */
1471 talloc_steal(mem_ctx, state->out_mem_ctx);
1473 /* Return result */
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,
1482 WERROR *werror)
1484 struct dssetup_DsRoleAbortDownlevelServerUpgrade r;
1485 NTSTATUS status;
1487 /* In parameters */
1489 status = cli->dispatch(cli,
1490 mem_ctx,
1491 &ndr_table_dssetup,
1492 NDR_DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE,
1493 &r);
1495 if (!NT_STATUS_IS_OK(status)) {
1496 return status;
1499 if (NT_STATUS_IS_ERR(status)) {
1500 return status;
1503 /* Return variables */
1505 /* Return result */
1506 if (werror) {
1507 *werror = r.out.result;
1510 return werror_to_ntstatus(r.out.result);