2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/cli_drsuapi.h"
9 struct rpccli_drsuapi_DsBind_state
{
10 struct drsuapi_DsBind orig
;
11 struct drsuapi_DsBind tmp
;
12 TALLOC_CTX
*out_mem_ctx
;
13 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
16 static void rpccli_drsuapi_DsBind_done(struct tevent_req
*subreq
);
18 struct tevent_req
*rpccli_drsuapi_DsBind_send(TALLOC_CTX
*mem_ctx
,
19 struct tevent_context
*ev
,
20 struct rpc_pipe_client
*cli
,
21 struct GUID
*_bind_guid
/* [in] [unique] */,
22 struct drsuapi_DsBindInfoCtr
*_bind_info
/* [in,out] [unique] */,
23 struct policy_handle
*_bind_handle
/* [out] [ref] */)
25 struct tevent_req
*req
;
26 struct rpccli_drsuapi_DsBind_state
*state
;
27 struct tevent_req
*subreq
;
29 req
= tevent_req_create(mem_ctx
, &state
,
30 struct rpccli_drsuapi_DsBind_state
);
34 state
->out_mem_ctx
= NULL
;
35 state
->dispatch_recv
= cli
->dispatch_recv
;
38 state
->orig
.in
.bind_guid
= _bind_guid
;
39 state
->orig
.in
.bind_info
= _bind_info
;
42 state
->orig
.out
.bind_info
= _bind_info
;
43 state
->orig
.out
.bind_handle
= _bind_handle
;
46 ZERO_STRUCT(state
->orig
.out
.result
);
48 state
->out_mem_ctx
= talloc_named_const(state
, 0,
49 "rpccli_drsuapi_DsBind_out_memory");
50 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
51 return tevent_req_post(req
, ev
);
54 /* make a temporary copy, that we pass to the dispatch function */
55 state
->tmp
= state
->orig
;
57 subreq
= cli
->dispatch_send(state
, ev
, cli
,
61 if (tevent_req_nomem(subreq
, req
)) {
62 return tevent_req_post(req
, ev
);
64 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsBind_done
, req
);
68 static void rpccli_drsuapi_DsBind_done(struct tevent_req
*subreq
)
70 struct tevent_req
*req
= tevent_req_callback_data(
71 subreq
, struct tevent_req
);
72 struct rpccli_drsuapi_DsBind_state
*state
= tevent_req_data(
73 req
, struct rpccli_drsuapi_DsBind_state
);
77 if (state
->out_mem_ctx
) {
78 mem_ctx
= state
->out_mem_ctx
;
83 status
= state
->dispatch_recv(subreq
, mem_ctx
);
85 if (!NT_STATUS_IS_OK(status
)) {
86 tevent_req_nterror(req
, status
);
90 /* Copy out parameters */
91 if (state
->orig
.out
.bind_info
&& state
->tmp
.out
.bind_info
) {
92 *state
->orig
.out
.bind_info
= *state
->tmp
.out
.bind_info
;
94 *state
->orig
.out
.bind_handle
= *state
->tmp
.out
.bind_handle
;
97 state
->orig
.out
.result
= state
->tmp
.out
.result
;
99 /* Reset temporary structure */
100 ZERO_STRUCT(state
->tmp
);
102 tevent_req_done(req
);
105 NTSTATUS
rpccli_drsuapi_DsBind_recv(struct tevent_req
*req
,
109 struct rpccli_drsuapi_DsBind_state
*state
= tevent_req_data(
110 req
, struct rpccli_drsuapi_DsBind_state
);
113 if (tevent_req_is_nterror(req
, &status
)) {
114 tevent_req_received(req
);
118 /* Steal possbile out parameters to the callers context */
119 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
122 *result
= state
->orig
.out
.result
;
124 tevent_req_received(req
);
128 NTSTATUS
rpccli_drsuapi_DsBind(struct rpc_pipe_client
*cli
,
130 struct GUID
*bind_guid
/* [in] [unique] */,
131 struct drsuapi_DsBindInfoCtr
*bind_info
/* [in,out] [unique] */,
132 struct policy_handle
*bind_handle
/* [out] [ref] */,
135 struct drsuapi_DsBind r
;
139 r
.in
.bind_guid
= bind_guid
;
140 r
.in
.bind_info
= bind_info
;
142 status
= cli
->dispatch(cli
,
148 if (!NT_STATUS_IS_OK(status
)) {
152 if (NT_STATUS_IS_ERR(status
)) {
156 /* Return variables */
157 if (bind_info
&& r
.out
.bind_info
) {
158 *bind_info
= *r
.out
.bind_info
;
160 *bind_handle
= *r
.out
.bind_handle
;
164 *werror
= r
.out
.result
;
167 return werror_to_ntstatus(r
.out
.result
);
170 struct rpccli_drsuapi_DsUnbind_state
{
171 struct drsuapi_DsUnbind orig
;
172 struct drsuapi_DsUnbind tmp
;
173 TALLOC_CTX
*out_mem_ctx
;
174 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
177 static void rpccli_drsuapi_DsUnbind_done(struct tevent_req
*subreq
);
179 struct tevent_req
*rpccli_drsuapi_DsUnbind_send(TALLOC_CTX
*mem_ctx
,
180 struct tevent_context
*ev
,
181 struct rpc_pipe_client
*cli
,
182 struct policy_handle
*_bind_handle
/* [in,out] [ref] */)
184 struct tevent_req
*req
;
185 struct rpccli_drsuapi_DsUnbind_state
*state
;
186 struct tevent_req
*subreq
;
188 req
= tevent_req_create(mem_ctx
, &state
,
189 struct rpccli_drsuapi_DsUnbind_state
);
193 state
->out_mem_ctx
= NULL
;
194 state
->dispatch_recv
= cli
->dispatch_recv
;
197 state
->orig
.in
.bind_handle
= _bind_handle
;
200 state
->orig
.out
.bind_handle
= _bind_handle
;
203 ZERO_STRUCT(state
->orig
.out
.result
);
205 state
->out_mem_ctx
= talloc_named_const(state
, 0,
206 "rpccli_drsuapi_DsUnbind_out_memory");
207 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
208 return tevent_req_post(req
, ev
);
211 /* make a temporary copy, that we pass to the dispatch function */
212 state
->tmp
= state
->orig
;
214 subreq
= cli
->dispatch_send(state
, ev
, cli
,
216 NDR_DRSUAPI_DSUNBIND
,
218 if (tevent_req_nomem(subreq
, req
)) {
219 return tevent_req_post(req
, ev
);
221 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsUnbind_done
, req
);
225 static void rpccli_drsuapi_DsUnbind_done(struct tevent_req
*subreq
)
227 struct tevent_req
*req
= tevent_req_callback_data(
228 subreq
, struct tevent_req
);
229 struct rpccli_drsuapi_DsUnbind_state
*state
= tevent_req_data(
230 req
, struct rpccli_drsuapi_DsUnbind_state
);
234 if (state
->out_mem_ctx
) {
235 mem_ctx
= state
->out_mem_ctx
;
240 status
= state
->dispatch_recv(subreq
, mem_ctx
);
242 if (!NT_STATUS_IS_OK(status
)) {
243 tevent_req_nterror(req
, status
);
247 /* Copy out parameters */
248 *state
->orig
.out
.bind_handle
= *state
->tmp
.out
.bind_handle
;
251 state
->orig
.out
.result
= state
->tmp
.out
.result
;
253 /* Reset temporary structure */
254 ZERO_STRUCT(state
->tmp
);
256 tevent_req_done(req
);
259 NTSTATUS
rpccli_drsuapi_DsUnbind_recv(struct tevent_req
*req
,
263 struct rpccli_drsuapi_DsUnbind_state
*state
= tevent_req_data(
264 req
, struct rpccli_drsuapi_DsUnbind_state
);
267 if (tevent_req_is_nterror(req
, &status
)) {
268 tevent_req_received(req
);
272 /* Steal possbile out parameters to the callers context */
273 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
276 *result
= state
->orig
.out
.result
;
278 tevent_req_received(req
);
282 NTSTATUS
rpccli_drsuapi_DsUnbind(struct rpc_pipe_client
*cli
,
284 struct policy_handle
*bind_handle
/* [in,out] [ref] */,
287 struct drsuapi_DsUnbind r
;
291 r
.in
.bind_handle
= bind_handle
;
293 status
= cli
->dispatch(cli
,
296 NDR_DRSUAPI_DSUNBIND
,
299 if (!NT_STATUS_IS_OK(status
)) {
303 if (NT_STATUS_IS_ERR(status
)) {
307 /* Return variables */
308 *bind_handle
= *r
.out
.bind_handle
;
312 *werror
= r
.out
.result
;
315 return werror_to_ntstatus(r
.out
.result
);
318 struct rpccli_drsuapi_DsReplicaSync_state
{
319 struct drsuapi_DsReplicaSync orig
;
320 struct drsuapi_DsReplicaSync tmp
;
321 TALLOC_CTX
*out_mem_ctx
;
322 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
325 static void rpccli_drsuapi_DsReplicaSync_done(struct tevent_req
*subreq
);
327 struct tevent_req
*rpccli_drsuapi_DsReplicaSync_send(TALLOC_CTX
*mem_ctx
,
328 struct tevent_context
*ev
,
329 struct rpc_pipe_client
*cli
,
330 struct policy_handle
*_bind_handle
/* [in] [ref] */,
331 int32_t _level
/* [in] */,
332 union drsuapi_DsReplicaSyncRequest _req
/* [in] [switch_is(level)] */)
334 struct tevent_req
*req
;
335 struct rpccli_drsuapi_DsReplicaSync_state
*state
;
336 struct tevent_req
*subreq
;
338 req
= tevent_req_create(mem_ctx
, &state
,
339 struct rpccli_drsuapi_DsReplicaSync_state
);
343 state
->out_mem_ctx
= NULL
;
344 state
->dispatch_recv
= cli
->dispatch_recv
;
347 state
->orig
.in
.bind_handle
= _bind_handle
;
348 state
->orig
.in
.level
= _level
;
349 state
->orig
.in
.req
= _req
;
354 ZERO_STRUCT(state
->orig
.out
.result
);
356 /* make a temporary copy, that we pass to the dispatch function */
357 state
->tmp
= state
->orig
;
359 subreq
= cli
->dispatch_send(state
, ev
, cli
,
361 NDR_DRSUAPI_DSREPLICASYNC
,
363 if (tevent_req_nomem(subreq
, req
)) {
364 return tevent_req_post(req
, ev
);
366 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsReplicaSync_done
, req
);
370 static void rpccli_drsuapi_DsReplicaSync_done(struct tevent_req
*subreq
)
372 struct tevent_req
*req
= tevent_req_callback_data(
373 subreq
, struct tevent_req
);
374 struct rpccli_drsuapi_DsReplicaSync_state
*state
= tevent_req_data(
375 req
, struct rpccli_drsuapi_DsReplicaSync_state
);
379 if (state
->out_mem_ctx
) {
380 mem_ctx
= state
->out_mem_ctx
;
385 status
= state
->dispatch_recv(subreq
, mem_ctx
);
387 if (!NT_STATUS_IS_OK(status
)) {
388 tevent_req_nterror(req
, status
);
392 /* Copy out parameters */
395 state
->orig
.out
.result
= state
->tmp
.out
.result
;
397 /* Reset temporary structure */
398 ZERO_STRUCT(state
->tmp
);
400 tevent_req_done(req
);
403 NTSTATUS
rpccli_drsuapi_DsReplicaSync_recv(struct tevent_req
*req
,
407 struct rpccli_drsuapi_DsReplicaSync_state
*state
= tevent_req_data(
408 req
, struct rpccli_drsuapi_DsReplicaSync_state
);
411 if (tevent_req_is_nterror(req
, &status
)) {
412 tevent_req_received(req
);
416 /* Steal possbile out parameters to the callers context */
417 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
420 *result
= state
->orig
.out
.result
;
422 tevent_req_received(req
);
426 NTSTATUS
rpccli_drsuapi_DsReplicaSync(struct rpc_pipe_client
*cli
,
428 struct policy_handle
*bind_handle
/* [in] [ref] */,
429 int32_t level
/* [in] */,
430 union drsuapi_DsReplicaSyncRequest req
/* [in] [switch_is(level)] */,
433 struct drsuapi_DsReplicaSync r
;
437 r
.in
.bind_handle
= bind_handle
;
441 status
= cli
->dispatch(cli
,
444 NDR_DRSUAPI_DSREPLICASYNC
,
447 if (!NT_STATUS_IS_OK(status
)) {
451 if (NT_STATUS_IS_ERR(status
)) {
455 /* Return variables */
459 *werror
= r
.out
.result
;
462 return werror_to_ntstatus(r
.out
.result
);
465 struct rpccli_drsuapi_DsGetNCChanges_state
{
466 struct drsuapi_DsGetNCChanges orig
;
467 struct drsuapi_DsGetNCChanges tmp
;
468 TALLOC_CTX
*out_mem_ctx
;
469 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
472 static void rpccli_drsuapi_DsGetNCChanges_done(struct tevent_req
*subreq
);
474 struct tevent_req
*rpccli_drsuapi_DsGetNCChanges_send(TALLOC_CTX
*mem_ctx
,
475 struct tevent_context
*ev
,
476 struct rpc_pipe_client
*cli
,
477 struct policy_handle
*_bind_handle
/* [in] [ref] */,
478 int32_t _level
/* [in] */,
479 union drsuapi_DsGetNCChangesRequest
*_req
/* [in] [ref,switch_is(level)] */,
480 int32_t *_level_out
/* [out] [ref] */,
481 union drsuapi_DsGetNCChangesCtr
*_ctr
/* [out] [ref,switch_is(*level_out)] */)
483 struct tevent_req
*req
;
484 struct rpccli_drsuapi_DsGetNCChanges_state
*state
;
485 struct tevent_req
*subreq
;
487 req
= tevent_req_create(mem_ctx
, &state
,
488 struct rpccli_drsuapi_DsGetNCChanges_state
);
492 state
->out_mem_ctx
= NULL
;
493 state
->dispatch_recv
= cli
->dispatch_recv
;
496 state
->orig
.in
.bind_handle
= _bind_handle
;
497 state
->orig
.in
.level
= _level
;
498 state
->orig
.in
.req
= _req
;
501 state
->orig
.out
.level_out
= _level_out
;
502 state
->orig
.out
.ctr
= _ctr
;
505 ZERO_STRUCT(state
->orig
.out
.result
);
507 state
->out_mem_ctx
= talloc_named_const(state
, 0,
508 "rpccli_drsuapi_DsGetNCChanges_out_memory");
509 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
510 return tevent_req_post(req
, ev
);
513 /* make a temporary copy, that we pass to the dispatch function */
514 state
->tmp
= state
->orig
;
516 subreq
= cli
->dispatch_send(state
, ev
, cli
,
518 NDR_DRSUAPI_DSGETNCCHANGES
,
520 if (tevent_req_nomem(subreq
, req
)) {
521 return tevent_req_post(req
, ev
);
523 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsGetNCChanges_done
, req
);
527 static void rpccli_drsuapi_DsGetNCChanges_done(struct tevent_req
*subreq
)
529 struct tevent_req
*req
= tevent_req_callback_data(
530 subreq
, struct tevent_req
);
531 struct rpccli_drsuapi_DsGetNCChanges_state
*state
= tevent_req_data(
532 req
, struct rpccli_drsuapi_DsGetNCChanges_state
);
536 if (state
->out_mem_ctx
) {
537 mem_ctx
= state
->out_mem_ctx
;
542 status
= state
->dispatch_recv(subreq
, mem_ctx
);
544 if (!NT_STATUS_IS_OK(status
)) {
545 tevent_req_nterror(req
, status
);
549 /* Copy out parameters */
550 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
551 *state
->orig
.out
.ctr
= *state
->tmp
.out
.ctr
;
554 state
->orig
.out
.result
= state
->tmp
.out
.result
;
556 /* Reset temporary structure */
557 ZERO_STRUCT(state
->tmp
);
559 tevent_req_done(req
);
562 NTSTATUS
rpccli_drsuapi_DsGetNCChanges_recv(struct tevent_req
*req
,
566 struct rpccli_drsuapi_DsGetNCChanges_state
*state
= tevent_req_data(
567 req
, struct rpccli_drsuapi_DsGetNCChanges_state
);
570 if (tevent_req_is_nterror(req
, &status
)) {
571 tevent_req_received(req
);
575 /* Steal possbile out parameters to the callers context */
576 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
579 *result
= state
->orig
.out
.result
;
581 tevent_req_received(req
);
585 NTSTATUS
rpccli_drsuapi_DsGetNCChanges(struct rpc_pipe_client
*cli
,
587 struct policy_handle
*bind_handle
/* [in] [ref] */,
588 int32_t level
/* [in] */,
589 union drsuapi_DsGetNCChangesRequest
*req
/* [in] [ref,switch_is(level)] */,
590 int32_t *level_out
/* [out] [ref] */,
591 union drsuapi_DsGetNCChangesCtr
*ctr
/* [out] [ref,switch_is(*level_out)] */,
594 struct drsuapi_DsGetNCChanges r
;
598 r
.in
.bind_handle
= bind_handle
;
602 status
= cli
->dispatch(cli
,
605 NDR_DRSUAPI_DSGETNCCHANGES
,
608 if (!NT_STATUS_IS_OK(status
)) {
612 if (NT_STATUS_IS_ERR(status
)) {
616 /* Return variables */
617 *level_out
= *r
.out
.level_out
;
622 *werror
= r
.out
.result
;
625 return werror_to_ntstatus(r
.out
.result
);
628 struct rpccli_drsuapi_DsReplicaUpdateRefs_state
{
629 struct drsuapi_DsReplicaUpdateRefs orig
;
630 struct drsuapi_DsReplicaUpdateRefs tmp
;
631 TALLOC_CTX
*out_mem_ctx
;
632 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
635 static void rpccli_drsuapi_DsReplicaUpdateRefs_done(struct tevent_req
*subreq
);
637 struct tevent_req
*rpccli_drsuapi_DsReplicaUpdateRefs_send(TALLOC_CTX
*mem_ctx
,
638 struct tevent_context
*ev
,
639 struct rpc_pipe_client
*cli
,
640 struct policy_handle
*_bind_handle
/* [in] [ref] */,
641 int32_t _level
/* [in] */,
642 union drsuapi_DsReplicaUpdateRefsRequest _req
/* [in] [switch_is(level)] */)
644 struct tevent_req
*req
;
645 struct rpccli_drsuapi_DsReplicaUpdateRefs_state
*state
;
646 struct tevent_req
*subreq
;
648 req
= tevent_req_create(mem_ctx
, &state
,
649 struct rpccli_drsuapi_DsReplicaUpdateRefs_state
);
653 state
->out_mem_ctx
= NULL
;
654 state
->dispatch_recv
= cli
->dispatch_recv
;
657 state
->orig
.in
.bind_handle
= _bind_handle
;
658 state
->orig
.in
.level
= _level
;
659 state
->orig
.in
.req
= _req
;
664 ZERO_STRUCT(state
->orig
.out
.result
);
666 /* make a temporary copy, that we pass to the dispatch function */
667 state
->tmp
= state
->orig
;
669 subreq
= cli
->dispatch_send(state
, ev
, cli
,
671 NDR_DRSUAPI_DSREPLICAUPDATEREFS
,
673 if (tevent_req_nomem(subreq
, req
)) {
674 return tevent_req_post(req
, ev
);
676 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsReplicaUpdateRefs_done
, req
);
680 static void rpccli_drsuapi_DsReplicaUpdateRefs_done(struct tevent_req
*subreq
)
682 struct tevent_req
*req
= tevent_req_callback_data(
683 subreq
, struct tevent_req
);
684 struct rpccli_drsuapi_DsReplicaUpdateRefs_state
*state
= tevent_req_data(
685 req
, struct rpccli_drsuapi_DsReplicaUpdateRefs_state
);
689 if (state
->out_mem_ctx
) {
690 mem_ctx
= state
->out_mem_ctx
;
695 status
= state
->dispatch_recv(subreq
, mem_ctx
);
697 if (!NT_STATUS_IS_OK(status
)) {
698 tevent_req_nterror(req
, status
);
702 /* Copy out parameters */
705 state
->orig
.out
.result
= state
->tmp
.out
.result
;
707 /* Reset temporary structure */
708 ZERO_STRUCT(state
->tmp
);
710 tevent_req_done(req
);
713 NTSTATUS
rpccli_drsuapi_DsReplicaUpdateRefs_recv(struct tevent_req
*req
,
717 struct rpccli_drsuapi_DsReplicaUpdateRefs_state
*state
= tevent_req_data(
718 req
, struct rpccli_drsuapi_DsReplicaUpdateRefs_state
);
721 if (tevent_req_is_nterror(req
, &status
)) {
722 tevent_req_received(req
);
726 /* Steal possbile out parameters to the callers context */
727 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
730 *result
= state
->orig
.out
.result
;
732 tevent_req_received(req
);
736 NTSTATUS
rpccli_drsuapi_DsReplicaUpdateRefs(struct rpc_pipe_client
*cli
,
738 struct policy_handle
*bind_handle
/* [in] [ref] */,
739 int32_t level
/* [in] */,
740 union drsuapi_DsReplicaUpdateRefsRequest req
/* [in] [switch_is(level)] */,
743 struct drsuapi_DsReplicaUpdateRefs r
;
747 r
.in
.bind_handle
= bind_handle
;
751 status
= cli
->dispatch(cli
,
754 NDR_DRSUAPI_DSREPLICAUPDATEREFS
,
757 if (!NT_STATUS_IS_OK(status
)) {
761 if (NT_STATUS_IS_ERR(status
)) {
765 /* Return variables */
769 *werror
= r
.out
.result
;
772 return werror_to_ntstatus(r
.out
.result
);
775 struct rpccli_drsuapi_DsReplicaAdd_state
{
776 struct drsuapi_DsReplicaAdd orig
;
777 struct drsuapi_DsReplicaAdd tmp
;
778 TALLOC_CTX
*out_mem_ctx
;
779 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
782 static void rpccli_drsuapi_DsReplicaAdd_done(struct tevent_req
*subreq
);
784 struct tevent_req
*rpccli_drsuapi_DsReplicaAdd_send(TALLOC_CTX
*mem_ctx
,
785 struct tevent_context
*ev
,
786 struct rpc_pipe_client
*cli
,
787 struct policy_handle
*_bind_handle
/* [in] [ref] */,
788 int32_t _level
/* [in] */,
789 union drsuapi_DsReplicaAddRequest _req
/* [in] [switch_is(level)] */)
791 struct tevent_req
*req
;
792 struct rpccli_drsuapi_DsReplicaAdd_state
*state
;
793 struct tevent_req
*subreq
;
795 req
= tevent_req_create(mem_ctx
, &state
,
796 struct rpccli_drsuapi_DsReplicaAdd_state
);
800 state
->out_mem_ctx
= NULL
;
801 state
->dispatch_recv
= cli
->dispatch_recv
;
804 state
->orig
.in
.bind_handle
= _bind_handle
;
805 state
->orig
.in
.level
= _level
;
806 state
->orig
.in
.req
= _req
;
811 ZERO_STRUCT(state
->orig
.out
.result
);
813 /* make a temporary copy, that we pass to the dispatch function */
814 state
->tmp
= state
->orig
;
816 subreq
= cli
->dispatch_send(state
, ev
, cli
,
818 NDR_DRSUAPI_DSREPLICAADD
,
820 if (tevent_req_nomem(subreq
, req
)) {
821 return tevent_req_post(req
, ev
);
823 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsReplicaAdd_done
, req
);
827 static void rpccli_drsuapi_DsReplicaAdd_done(struct tevent_req
*subreq
)
829 struct tevent_req
*req
= tevent_req_callback_data(
830 subreq
, struct tevent_req
);
831 struct rpccli_drsuapi_DsReplicaAdd_state
*state
= tevent_req_data(
832 req
, struct rpccli_drsuapi_DsReplicaAdd_state
);
836 if (state
->out_mem_ctx
) {
837 mem_ctx
= state
->out_mem_ctx
;
842 status
= state
->dispatch_recv(subreq
, mem_ctx
);
844 if (!NT_STATUS_IS_OK(status
)) {
845 tevent_req_nterror(req
, status
);
849 /* Copy out parameters */
852 state
->orig
.out
.result
= state
->tmp
.out
.result
;
854 /* Reset temporary structure */
855 ZERO_STRUCT(state
->tmp
);
857 tevent_req_done(req
);
860 NTSTATUS
rpccli_drsuapi_DsReplicaAdd_recv(struct tevent_req
*req
,
864 struct rpccli_drsuapi_DsReplicaAdd_state
*state
= tevent_req_data(
865 req
, struct rpccli_drsuapi_DsReplicaAdd_state
);
868 if (tevent_req_is_nterror(req
, &status
)) {
869 tevent_req_received(req
);
873 /* Steal possbile out parameters to the callers context */
874 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
877 *result
= state
->orig
.out
.result
;
879 tevent_req_received(req
);
883 NTSTATUS
rpccli_drsuapi_DsReplicaAdd(struct rpc_pipe_client
*cli
,
885 struct policy_handle
*bind_handle
/* [in] [ref] */,
886 int32_t level
/* [in] */,
887 union drsuapi_DsReplicaAddRequest req
/* [in] [switch_is(level)] */,
890 struct drsuapi_DsReplicaAdd r
;
894 r
.in
.bind_handle
= bind_handle
;
898 status
= cli
->dispatch(cli
,
901 NDR_DRSUAPI_DSREPLICAADD
,
904 if (!NT_STATUS_IS_OK(status
)) {
908 if (NT_STATUS_IS_ERR(status
)) {
912 /* Return variables */
916 *werror
= r
.out
.result
;
919 return werror_to_ntstatus(r
.out
.result
);
922 struct rpccli_drsuapi_DsReplicaDel_state
{
923 struct drsuapi_DsReplicaDel orig
;
924 struct drsuapi_DsReplicaDel tmp
;
925 TALLOC_CTX
*out_mem_ctx
;
926 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
929 static void rpccli_drsuapi_DsReplicaDel_done(struct tevent_req
*subreq
);
931 struct tevent_req
*rpccli_drsuapi_DsReplicaDel_send(TALLOC_CTX
*mem_ctx
,
932 struct tevent_context
*ev
,
933 struct rpc_pipe_client
*cli
,
934 struct policy_handle
*_bind_handle
/* [in] [ref] */,
935 int32_t _level
/* [in] */,
936 union drsuapi_DsReplicaDelRequest _req
/* [in] [switch_is(level)] */)
938 struct tevent_req
*req
;
939 struct rpccli_drsuapi_DsReplicaDel_state
*state
;
940 struct tevent_req
*subreq
;
942 req
= tevent_req_create(mem_ctx
, &state
,
943 struct rpccli_drsuapi_DsReplicaDel_state
);
947 state
->out_mem_ctx
= NULL
;
948 state
->dispatch_recv
= cli
->dispatch_recv
;
951 state
->orig
.in
.bind_handle
= _bind_handle
;
952 state
->orig
.in
.level
= _level
;
953 state
->orig
.in
.req
= _req
;
958 ZERO_STRUCT(state
->orig
.out
.result
);
960 /* make a temporary copy, that we pass to the dispatch function */
961 state
->tmp
= state
->orig
;
963 subreq
= cli
->dispatch_send(state
, ev
, cli
,
965 NDR_DRSUAPI_DSREPLICADEL
,
967 if (tevent_req_nomem(subreq
, req
)) {
968 return tevent_req_post(req
, ev
);
970 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsReplicaDel_done
, req
);
974 static void rpccli_drsuapi_DsReplicaDel_done(struct tevent_req
*subreq
)
976 struct tevent_req
*req
= tevent_req_callback_data(
977 subreq
, struct tevent_req
);
978 struct rpccli_drsuapi_DsReplicaDel_state
*state
= tevent_req_data(
979 req
, struct rpccli_drsuapi_DsReplicaDel_state
);
983 if (state
->out_mem_ctx
) {
984 mem_ctx
= state
->out_mem_ctx
;
989 status
= state
->dispatch_recv(subreq
, mem_ctx
);
991 if (!NT_STATUS_IS_OK(status
)) {
992 tevent_req_nterror(req
, status
);
996 /* Copy out parameters */
999 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1001 /* Reset temporary structure */
1002 ZERO_STRUCT(state
->tmp
);
1004 tevent_req_done(req
);
1007 NTSTATUS
rpccli_drsuapi_DsReplicaDel_recv(struct tevent_req
*req
,
1008 TALLOC_CTX
*mem_ctx
,
1011 struct rpccli_drsuapi_DsReplicaDel_state
*state
= tevent_req_data(
1012 req
, struct rpccli_drsuapi_DsReplicaDel_state
);
1015 if (tevent_req_is_nterror(req
, &status
)) {
1016 tevent_req_received(req
);
1020 /* Steal possbile out parameters to the callers context */
1021 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1024 *result
= state
->orig
.out
.result
;
1026 tevent_req_received(req
);
1027 return NT_STATUS_OK
;
1030 NTSTATUS
rpccli_drsuapi_DsReplicaDel(struct rpc_pipe_client
*cli
,
1031 TALLOC_CTX
*mem_ctx
,
1032 struct policy_handle
*bind_handle
/* [in] [ref] */,
1033 int32_t level
/* [in] */,
1034 union drsuapi_DsReplicaDelRequest req
/* [in] [switch_is(level)] */,
1037 struct drsuapi_DsReplicaDel r
;
1041 r
.in
.bind_handle
= bind_handle
;
1045 status
= cli
->dispatch(cli
,
1048 NDR_DRSUAPI_DSREPLICADEL
,
1051 if (!NT_STATUS_IS_OK(status
)) {
1055 if (NT_STATUS_IS_ERR(status
)) {
1059 /* Return variables */
1063 *werror
= r
.out
.result
;
1066 return werror_to_ntstatus(r
.out
.result
);
1069 struct rpccli_drsuapi_DsReplicaMod_state
{
1070 struct drsuapi_DsReplicaMod orig
;
1071 struct drsuapi_DsReplicaMod tmp
;
1072 TALLOC_CTX
*out_mem_ctx
;
1073 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1076 static void rpccli_drsuapi_DsReplicaMod_done(struct tevent_req
*subreq
);
1078 struct tevent_req
*rpccli_drsuapi_DsReplicaMod_send(TALLOC_CTX
*mem_ctx
,
1079 struct tevent_context
*ev
,
1080 struct rpc_pipe_client
*cli
,
1081 struct policy_handle
*_bind_handle
/* [in] [ref] */,
1082 int32_t _level
/* [in] */,
1083 union drsuapi_DsReplicaModRequest _req
/* [in] [switch_is(level)] */)
1085 struct tevent_req
*req
;
1086 struct rpccli_drsuapi_DsReplicaMod_state
*state
;
1087 struct tevent_req
*subreq
;
1089 req
= tevent_req_create(mem_ctx
, &state
,
1090 struct rpccli_drsuapi_DsReplicaMod_state
);
1094 state
->out_mem_ctx
= NULL
;
1095 state
->dispatch_recv
= cli
->dispatch_recv
;
1098 state
->orig
.in
.bind_handle
= _bind_handle
;
1099 state
->orig
.in
.level
= _level
;
1100 state
->orig
.in
.req
= _req
;
1102 /* Out parameters */
1105 ZERO_STRUCT(state
->orig
.out
.result
);
1107 /* make a temporary copy, that we pass to the dispatch function */
1108 state
->tmp
= state
->orig
;
1110 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1112 NDR_DRSUAPI_DSREPLICAMOD
,
1114 if (tevent_req_nomem(subreq
, req
)) {
1115 return tevent_req_post(req
, ev
);
1117 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsReplicaMod_done
, req
);
1121 static void rpccli_drsuapi_DsReplicaMod_done(struct tevent_req
*subreq
)
1123 struct tevent_req
*req
= tevent_req_callback_data(
1124 subreq
, struct tevent_req
);
1125 struct rpccli_drsuapi_DsReplicaMod_state
*state
= tevent_req_data(
1126 req
, struct rpccli_drsuapi_DsReplicaMod_state
);
1128 TALLOC_CTX
*mem_ctx
;
1130 if (state
->out_mem_ctx
) {
1131 mem_ctx
= state
->out_mem_ctx
;
1136 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1137 TALLOC_FREE(subreq
);
1138 if (!NT_STATUS_IS_OK(status
)) {
1139 tevent_req_nterror(req
, status
);
1143 /* Copy out parameters */
1146 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1148 /* Reset temporary structure */
1149 ZERO_STRUCT(state
->tmp
);
1151 tevent_req_done(req
);
1154 NTSTATUS
rpccli_drsuapi_DsReplicaMod_recv(struct tevent_req
*req
,
1155 TALLOC_CTX
*mem_ctx
,
1158 struct rpccli_drsuapi_DsReplicaMod_state
*state
= tevent_req_data(
1159 req
, struct rpccli_drsuapi_DsReplicaMod_state
);
1162 if (tevent_req_is_nterror(req
, &status
)) {
1163 tevent_req_received(req
);
1167 /* Steal possbile out parameters to the callers context */
1168 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1171 *result
= state
->orig
.out
.result
;
1173 tevent_req_received(req
);
1174 return NT_STATUS_OK
;
1177 NTSTATUS
rpccli_drsuapi_DsReplicaMod(struct rpc_pipe_client
*cli
,
1178 TALLOC_CTX
*mem_ctx
,
1179 struct policy_handle
*bind_handle
/* [in] [ref] */,
1180 int32_t level
/* [in] */,
1181 union drsuapi_DsReplicaModRequest req
/* [in] [switch_is(level)] */,
1184 struct drsuapi_DsReplicaMod r
;
1188 r
.in
.bind_handle
= bind_handle
;
1192 status
= cli
->dispatch(cli
,
1195 NDR_DRSUAPI_DSREPLICAMOD
,
1198 if (!NT_STATUS_IS_OK(status
)) {
1202 if (NT_STATUS_IS_ERR(status
)) {
1206 /* Return variables */
1210 *werror
= r
.out
.result
;
1213 return werror_to_ntstatus(r
.out
.result
);
1216 struct rpccli_DRSUAPI_VERIFY_NAMES_state
{
1217 struct DRSUAPI_VERIFY_NAMES orig
;
1218 struct DRSUAPI_VERIFY_NAMES tmp
;
1219 TALLOC_CTX
*out_mem_ctx
;
1220 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1223 static void rpccli_DRSUAPI_VERIFY_NAMES_done(struct tevent_req
*subreq
);
1225 struct tevent_req
*rpccli_DRSUAPI_VERIFY_NAMES_send(TALLOC_CTX
*mem_ctx
,
1226 struct tevent_context
*ev
,
1227 struct rpc_pipe_client
*cli
)
1229 struct tevent_req
*req
;
1230 struct rpccli_DRSUAPI_VERIFY_NAMES_state
*state
;
1231 struct tevent_req
*subreq
;
1233 req
= tevent_req_create(mem_ctx
, &state
,
1234 struct rpccli_DRSUAPI_VERIFY_NAMES_state
);
1238 state
->out_mem_ctx
= NULL
;
1239 state
->dispatch_recv
= cli
->dispatch_recv
;
1243 /* Out parameters */
1246 ZERO_STRUCT(state
->orig
.out
.result
);
1248 /* make a temporary copy, that we pass to the dispatch function */
1249 state
->tmp
= state
->orig
;
1251 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1253 NDR_DRSUAPI_VERIFY_NAMES
,
1255 if (tevent_req_nomem(subreq
, req
)) {
1256 return tevent_req_post(req
, ev
);
1258 tevent_req_set_callback(subreq
, rpccli_DRSUAPI_VERIFY_NAMES_done
, req
);
1262 static void rpccli_DRSUAPI_VERIFY_NAMES_done(struct tevent_req
*subreq
)
1264 struct tevent_req
*req
= tevent_req_callback_data(
1265 subreq
, struct tevent_req
);
1266 struct rpccli_DRSUAPI_VERIFY_NAMES_state
*state
= tevent_req_data(
1267 req
, struct rpccli_DRSUAPI_VERIFY_NAMES_state
);
1269 TALLOC_CTX
*mem_ctx
;
1271 if (state
->out_mem_ctx
) {
1272 mem_ctx
= state
->out_mem_ctx
;
1277 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1278 TALLOC_FREE(subreq
);
1279 if (!NT_STATUS_IS_OK(status
)) {
1280 tevent_req_nterror(req
, status
);
1284 /* Copy out parameters */
1287 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1289 /* Reset temporary structure */
1290 ZERO_STRUCT(state
->tmp
);
1292 tevent_req_done(req
);
1295 NTSTATUS
rpccli_DRSUAPI_VERIFY_NAMES_recv(struct tevent_req
*req
,
1296 TALLOC_CTX
*mem_ctx
,
1299 struct rpccli_DRSUAPI_VERIFY_NAMES_state
*state
= tevent_req_data(
1300 req
, struct rpccli_DRSUAPI_VERIFY_NAMES_state
);
1303 if (tevent_req_is_nterror(req
, &status
)) {
1304 tevent_req_received(req
);
1308 /* Steal possbile out parameters to the callers context */
1309 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1312 *result
= state
->orig
.out
.result
;
1314 tevent_req_received(req
);
1315 return NT_STATUS_OK
;
1318 NTSTATUS
rpccli_DRSUAPI_VERIFY_NAMES(struct rpc_pipe_client
*cli
,
1319 TALLOC_CTX
*mem_ctx
,
1322 struct DRSUAPI_VERIFY_NAMES r
;
1327 status
= cli
->dispatch(cli
,
1330 NDR_DRSUAPI_VERIFY_NAMES
,
1333 if (!NT_STATUS_IS_OK(status
)) {
1337 if (NT_STATUS_IS_ERR(status
)) {
1341 /* Return variables */
1345 *werror
= r
.out
.result
;
1348 return werror_to_ntstatus(r
.out
.result
);
1351 struct rpccli_drsuapi_DsGetMemberships_state
{
1352 struct drsuapi_DsGetMemberships orig
;
1353 struct drsuapi_DsGetMemberships tmp
;
1354 TALLOC_CTX
*out_mem_ctx
;
1355 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1358 static void rpccli_drsuapi_DsGetMemberships_done(struct tevent_req
*subreq
);
1360 struct tevent_req
*rpccli_drsuapi_DsGetMemberships_send(TALLOC_CTX
*mem_ctx
,
1361 struct tevent_context
*ev
,
1362 struct rpc_pipe_client
*cli
,
1363 struct policy_handle
*_bind_handle
/* [in] [ref] */,
1364 int32_t _level
/* [in] */,
1365 union drsuapi_DsGetMembershipsRequest
*_req
/* [in] [ref,switch_is(level)] */,
1366 int32_t *_level_out
/* [out] [ref] */,
1367 union drsuapi_DsGetMembershipsCtr
*_ctr
/* [out] [ref,switch_is(*level_out)] */)
1369 struct tevent_req
*req
;
1370 struct rpccli_drsuapi_DsGetMemberships_state
*state
;
1371 struct tevent_req
*subreq
;
1373 req
= tevent_req_create(mem_ctx
, &state
,
1374 struct rpccli_drsuapi_DsGetMemberships_state
);
1378 state
->out_mem_ctx
= NULL
;
1379 state
->dispatch_recv
= cli
->dispatch_recv
;
1382 state
->orig
.in
.bind_handle
= _bind_handle
;
1383 state
->orig
.in
.level
= _level
;
1384 state
->orig
.in
.req
= _req
;
1386 /* Out parameters */
1387 state
->orig
.out
.level_out
= _level_out
;
1388 state
->orig
.out
.ctr
= _ctr
;
1391 ZERO_STRUCT(state
->orig
.out
.result
);
1393 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1394 "rpccli_drsuapi_DsGetMemberships_out_memory");
1395 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1396 return tevent_req_post(req
, ev
);
1399 /* make a temporary copy, that we pass to the dispatch function */
1400 state
->tmp
= state
->orig
;
1402 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1404 NDR_DRSUAPI_DSGETMEMBERSHIPS
,
1406 if (tevent_req_nomem(subreq
, req
)) {
1407 return tevent_req_post(req
, ev
);
1409 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsGetMemberships_done
, req
);
1413 static void rpccli_drsuapi_DsGetMemberships_done(struct tevent_req
*subreq
)
1415 struct tevent_req
*req
= tevent_req_callback_data(
1416 subreq
, struct tevent_req
);
1417 struct rpccli_drsuapi_DsGetMemberships_state
*state
= tevent_req_data(
1418 req
, struct rpccli_drsuapi_DsGetMemberships_state
);
1420 TALLOC_CTX
*mem_ctx
;
1422 if (state
->out_mem_ctx
) {
1423 mem_ctx
= state
->out_mem_ctx
;
1428 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1429 TALLOC_FREE(subreq
);
1430 if (!NT_STATUS_IS_OK(status
)) {
1431 tevent_req_nterror(req
, status
);
1435 /* Copy out parameters */
1436 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
1437 *state
->orig
.out
.ctr
= *state
->tmp
.out
.ctr
;
1440 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1442 /* Reset temporary structure */
1443 ZERO_STRUCT(state
->tmp
);
1445 tevent_req_done(req
);
1448 NTSTATUS
rpccli_drsuapi_DsGetMemberships_recv(struct tevent_req
*req
,
1449 TALLOC_CTX
*mem_ctx
,
1452 struct rpccli_drsuapi_DsGetMemberships_state
*state
= tevent_req_data(
1453 req
, struct rpccli_drsuapi_DsGetMemberships_state
);
1456 if (tevent_req_is_nterror(req
, &status
)) {
1457 tevent_req_received(req
);
1461 /* Steal possbile out parameters to the callers context */
1462 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1465 *result
= state
->orig
.out
.result
;
1467 tevent_req_received(req
);
1468 return NT_STATUS_OK
;
1471 NTSTATUS
rpccli_drsuapi_DsGetMemberships(struct rpc_pipe_client
*cli
,
1472 TALLOC_CTX
*mem_ctx
,
1473 struct policy_handle
*bind_handle
/* [in] [ref] */,
1474 int32_t level
/* [in] */,
1475 union drsuapi_DsGetMembershipsRequest
*req
/* [in] [ref,switch_is(level)] */,
1476 int32_t *level_out
/* [out] [ref] */,
1477 union drsuapi_DsGetMembershipsCtr
*ctr
/* [out] [ref,switch_is(*level_out)] */,
1480 struct drsuapi_DsGetMemberships r
;
1484 r
.in
.bind_handle
= bind_handle
;
1488 status
= cli
->dispatch(cli
,
1491 NDR_DRSUAPI_DSGETMEMBERSHIPS
,
1494 if (!NT_STATUS_IS_OK(status
)) {
1498 if (NT_STATUS_IS_ERR(status
)) {
1502 /* Return variables */
1503 *level_out
= *r
.out
.level_out
;
1508 *werror
= r
.out
.result
;
1511 return werror_to_ntstatus(r
.out
.result
);
1514 struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state
{
1515 struct DRSUAPI_INTER_DOMAIN_MOVE orig
;
1516 struct DRSUAPI_INTER_DOMAIN_MOVE tmp
;
1517 TALLOC_CTX
*out_mem_ctx
;
1518 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1521 static void rpccli_DRSUAPI_INTER_DOMAIN_MOVE_done(struct tevent_req
*subreq
);
1523 struct tevent_req
*rpccli_DRSUAPI_INTER_DOMAIN_MOVE_send(TALLOC_CTX
*mem_ctx
,
1524 struct tevent_context
*ev
,
1525 struct rpc_pipe_client
*cli
)
1527 struct tevent_req
*req
;
1528 struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state
*state
;
1529 struct tevent_req
*subreq
;
1531 req
= tevent_req_create(mem_ctx
, &state
,
1532 struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state
);
1536 state
->out_mem_ctx
= NULL
;
1537 state
->dispatch_recv
= cli
->dispatch_recv
;
1541 /* Out parameters */
1544 ZERO_STRUCT(state
->orig
.out
.result
);
1546 /* make a temporary copy, that we pass to the dispatch function */
1547 state
->tmp
= state
->orig
;
1549 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1551 NDR_DRSUAPI_INTER_DOMAIN_MOVE
,
1553 if (tevent_req_nomem(subreq
, req
)) {
1554 return tevent_req_post(req
, ev
);
1556 tevent_req_set_callback(subreq
, rpccli_DRSUAPI_INTER_DOMAIN_MOVE_done
, req
);
1560 static void rpccli_DRSUAPI_INTER_DOMAIN_MOVE_done(struct tevent_req
*subreq
)
1562 struct tevent_req
*req
= tevent_req_callback_data(
1563 subreq
, struct tevent_req
);
1564 struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state
*state
= tevent_req_data(
1565 req
, struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state
);
1567 TALLOC_CTX
*mem_ctx
;
1569 if (state
->out_mem_ctx
) {
1570 mem_ctx
= state
->out_mem_ctx
;
1575 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1576 TALLOC_FREE(subreq
);
1577 if (!NT_STATUS_IS_OK(status
)) {
1578 tevent_req_nterror(req
, status
);
1582 /* Copy out parameters */
1585 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1587 /* Reset temporary structure */
1588 ZERO_STRUCT(state
->tmp
);
1590 tevent_req_done(req
);
1593 NTSTATUS
rpccli_DRSUAPI_INTER_DOMAIN_MOVE_recv(struct tevent_req
*req
,
1594 TALLOC_CTX
*mem_ctx
,
1597 struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state
*state
= tevent_req_data(
1598 req
, struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state
);
1601 if (tevent_req_is_nterror(req
, &status
)) {
1602 tevent_req_received(req
);
1606 /* Steal possbile out parameters to the callers context */
1607 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1610 *result
= state
->orig
.out
.result
;
1612 tevent_req_received(req
);
1613 return NT_STATUS_OK
;
1616 NTSTATUS
rpccli_DRSUAPI_INTER_DOMAIN_MOVE(struct rpc_pipe_client
*cli
,
1617 TALLOC_CTX
*mem_ctx
,
1620 struct DRSUAPI_INTER_DOMAIN_MOVE r
;
1625 status
= cli
->dispatch(cli
,
1628 NDR_DRSUAPI_INTER_DOMAIN_MOVE
,
1631 if (!NT_STATUS_IS_OK(status
)) {
1635 if (NT_STATUS_IS_ERR(status
)) {
1639 /* Return variables */
1643 *werror
= r
.out
.result
;
1646 return werror_to_ntstatus(r
.out
.result
);
1649 struct rpccli_drsuapi_DsGetNT4ChangeLog_state
{
1650 struct drsuapi_DsGetNT4ChangeLog orig
;
1651 struct drsuapi_DsGetNT4ChangeLog tmp
;
1652 TALLOC_CTX
*out_mem_ctx
;
1653 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1656 static void rpccli_drsuapi_DsGetNT4ChangeLog_done(struct tevent_req
*subreq
);
1658 struct tevent_req
*rpccli_drsuapi_DsGetNT4ChangeLog_send(TALLOC_CTX
*mem_ctx
,
1659 struct tevent_context
*ev
,
1660 struct rpc_pipe_client
*cli
,
1661 struct policy_handle
*_bind_handle
/* [in] [ref] */,
1662 uint32_t _level
/* [in] */,
1663 union drsuapi_DsGetNT4ChangeLogRequest
*_req
/* [in] [ref,switch_is(level)] */,
1664 uint32_t *_level_out
/* [out] [ref] */,
1665 union drsuapi_DsGetNT4ChangeLogInfo
*_info
/* [out] [ref,switch_is(*level_out)] */)
1667 struct tevent_req
*req
;
1668 struct rpccli_drsuapi_DsGetNT4ChangeLog_state
*state
;
1669 struct tevent_req
*subreq
;
1671 req
= tevent_req_create(mem_ctx
, &state
,
1672 struct rpccli_drsuapi_DsGetNT4ChangeLog_state
);
1676 state
->out_mem_ctx
= NULL
;
1677 state
->dispatch_recv
= cli
->dispatch_recv
;
1680 state
->orig
.in
.bind_handle
= _bind_handle
;
1681 state
->orig
.in
.level
= _level
;
1682 state
->orig
.in
.req
= _req
;
1684 /* Out parameters */
1685 state
->orig
.out
.level_out
= _level_out
;
1686 state
->orig
.out
.info
= _info
;
1689 ZERO_STRUCT(state
->orig
.out
.result
);
1691 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1692 "rpccli_drsuapi_DsGetNT4ChangeLog_out_memory");
1693 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1694 return tevent_req_post(req
, ev
);
1697 /* make a temporary copy, that we pass to the dispatch function */
1698 state
->tmp
= state
->orig
;
1700 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1702 NDR_DRSUAPI_DSGETNT4CHANGELOG
,
1704 if (tevent_req_nomem(subreq
, req
)) {
1705 return tevent_req_post(req
, ev
);
1707 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsGetNT4ChangeLog_done
, req
);
1711 static void rpccli_drsuapi_DsGetNT4ChangeLog_done(struct tevent_req
*subreq
)
1713 struct tevent_req
*req
= tevent_req_callback_data(
1714 subreq
, struct tevent_req
);
1715 struct rpccli_drsuapi_DsGetNT4ChangeLog_state
*state
= tevent_req_data(
1716 req
, struct rpccli_drsuapi_DsGetNT4ChangeLog_state
);
1718 TALLOC_CTX
*mem_ctx
;
1720 if (state
->out_mem_ctx
) {
1721 mem_ctx
= state
->out_mem_ctx
;
1726 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1727 TALLOC_FREE(subreq
);
1728 if (!NT_STATUS_IS_OK(status
)) {
1729 tevent_req_nterror(req
, status
);
1733 /* Copy out parameters */
1734 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
1735 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
1738 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1740 /* Reset temporary structure */
1741 ZERO_STRUCT(state
->tmp
);
1743 tevent_req_done(req
);
1746 NTSTATUS
rpccli_drsuapi_DsGetNT4ChangeLog_recv(struct tevent_req
*req
,
1747 TALLOC_CTX
*mem_ctx
,
1750 struct rpccli_drsuapi_DsGetNT4ChangeLog_state
*state
= tevent_req_data(
1751 req
, struct rpccli_drsuapi_DsGetNT4ChangeLog_state
);
1754 if (tevent_req_is_nterror(req
, &status
)) {
1755 tevent_req_received(req
);
1759 /* Steal possbile out parameters to the callers context */
1760 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1763 *result
= state
->orig
.out
.result
;
1765 tevent_req_received(req
);
1766 return NT_STATUS_OK
;
1769 NTSTATUS
rpccli_drsuapi_DsGetNT4ChangeLog(struct rpc_pipe_client
*cli
,
1770 TALLOC_CTX
*mem_ctx
,
1771 struct policy_handle
*bind_handle
/* [in] [ref] */,
1772 uint32_t level
/* [in] */,
1773 union drsuapi_DsGetNT4ChangeLogRequest
*req
/* [in] [ref,switch_is(level)] */,
1774 uint32_t *level_out
/* [out] [ref] */,
1775 union drsuapi_DsGetNT4ChangeLogInfo
*info
/* [out] [ref,switch_is(*level_out)] */,
1778 struct drsuapi_DsGetNT4ChangeLog r
;
1782 r
.in
.bind_handle
= bind_handle
;
1786 status
= cli
->dispatch(cli
,
1789 NDR_DRSUAPI_DSGETNT4CHANGELOG
,
1792 if (!NT_STATUS_IS_OK(status
)) {
1796 if (NT_STATUS_IS_ERR(status
)) {
1800 /* Return variables */
1801 *level_out
= *r
.out
.level_out
;
1802 *info
= *r
.out
.info
;
1806 *werror
= r
.out
.result
;
1809 return werror_to_ntstatus(r
.out
.result
);
1812 struct rpccli_drsuapi_DsCrackNames_state
{
1813 struct drsuapi_DsCrackNames orig
;
1814 struct drsuapi_DsCrackNames tmp
;
1815 TALLOC_CTX
*out_mem_ctx
;
1816 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1819 static void rpccli_drsuapi_DsCrackNames_done(struct tevent_req
*subreq
);
1821 struct tevent_req
*rpccli_drsuapi_DsCrackNames_send(TALLOC_CTX
*mem_ctx
,
1822 struct tevent_context
*ev
,
1823 struct rpc_pipe_client
*cli
,
1824 struct policy_handle
*_bind_handle
/* [in] [ref] */,
1825 int32_t _level
/* [in] */,
1826 union drsuapi_DsNameRequest
*_req
/* [in] [ref,switch_is(level)] */,
1827 int32_t *_level_out
/* [out] [ref] */,
1828 union drsuapi_DsNameCtr
*_ctr
/* [out] [ref,switch_is(*level_out)] */)
1830 struct tevent_req
*req
;
1831 struct rpccli_drsuapi_DsCrackNames_state
*state
;
1832 struct tevent_req
*subreq
;
1834 req
= tevent_req_create(mem_ctx
, &state
,
1835 struct rpccli_drsuapi_DsCrackNames_state
);
1839 state
->out_mem_ctx
= NULL
;
1840 state
->dispatch_recv
= cli
->dispatch_recv
;
1843 state
->orig
.in
.bind_handle
= _bind_handle
;
1844 state
->orig
.in
.level
= _level
;
1845 state
->orig
.in
.req
= _req
;
1847 /* Out parameters */
1848 state
->orig
.out
.level_out
= _level_out
;
1849 state
->orig
.out
.ctr
= _ctr
;
1852 ZERO_STRUCT(state
->orig
.out
.result
);
1854 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1855 "rpccli_drsuapi_DsCrackNames_out_memory");
1856 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1857 return tevent_req_post(req
, ev
);
1860 /* make a temporary copy, that we pass to the dispatch function */
1861 state
->tmp
= state
->orig
;
1863 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1865 NDR_DRSUAPI_DSCRACKNAMES
,
1867 if (tevent_req_nomem(subreq
, req
)) {
1868 return tevent_req_post(req
, ev
);
1870 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsCrackNames_done
, req
);
1874 static void rpccli_drsuapi_DsCrackNames_done(struct tevent_req
*subreq
)
1876 struct tevent_req
*req
= tevent_req_callback_data(
1877 subreq
, struct tevent_req
);
1878 struct rpccli_drsuapi_DsCrackNames_state
*state
= tevent_req_data(
1879 req
, struct rpccli_drsuapi_DsCrackNames_state
);
1881 TALLOC_CTX
*mem_ctx
;
1883 if (state
->out_mem_ctx
) {
1884 mem_ctx
= state
->out_mem_ctx
;
1889 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1890 TALLOC_FREE(subreq
);
1891 if (!NT_STATUS_IS_OK(status
)) {
1892 tevent_req_nterror(req
, status
);
1896 /* Copy out parameters */
1897 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
1898 *state
->orig
.out
.ctr
= *state
->tmp
.out
.ctr
;
1901 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1903 /* Reset temporary structure */
1904 ZERO_STRUCT(state
->tmp
);
1906 tevent_req_done(req
);
1909 NTSTATUS
rpccli_drsuapi_DsCrackNames_recv(struct tevent_req
*req
,
1910 TALLOC_CTX
*mem_ctx
,
1913 struct rpccli_drsuapi_DsCrackNames_state
*state
= tevent_req_data(
1914 req
, struct rpccli_drsuapi_DsCrackNames_state
);
1917 if (tevent_req_is_nterror(req
, &status
)) {
1918 tevent_req_received(req
);
1922 /* Steal possbile out parameters to the callers context */
1923 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1926 *result
= state
->orig
.out
.result
;
1928 tevent_req_received(req
);
1929 return NT_STATUS_OK
;
1932 NTSTATUS
rpccli_drsuapi_DsCrackNames(struct rpc_pipe_client
*cli
,
1933 TALLOC_CTX
*mem_ctx
,
1934 struct policy_handle
*bind_handle
/* [in] [ref] */,
1935 int32_t level
/* [in] */,
1936 union drsuapi_DsNameRequest
*req
/* [in] [ref,switch_is(level)] */,
1937 int32_t *level_out
/* [out] [ref] */,
1938 union drsuapi_DsNameCtr
*ctr
/* [out] [ref,switch_is(*level_out)] */,
1941 struct drsuapi_DsCrackNames r
;
1945 r
.in
.bind_handle
= bind_handle
;
1949 status
= cli
->dispatch(cli
,
1952 NDR_DRSUAPI_DSCRACKNAMES
,
1955 if (!NT_STATUS_IS_OK(status
)) {
1959 if (NT_STATUS_IS_ERR(status
)) {
1963 /* Return variables */
1964 *level_out
= *r
.out
.level_out
;
1969 *werror
= r
.out
.result
;
1972 return werror_to_ntstatus(r
.out
.result
);
1975 struct rpccli_drsuapi_DsWriteAccountSpn_state
{
1976 struct drsuapi_DsWriteAccountSpn orig
;
1977 struct drsuapi_DsWriteAccountSpn tmp
;
1978 TALLOC_CTX
*out_mem_ctx
;
1979 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1982 static void rpccli_drsuapi_DsWriteAccountSpn_done(struct tevent_req
*subreq
);
1984 struct tevent_req
*rpccli_drsuapi_DsWriteAccountSpn_send(TALLOC_CTX
*mem_ctx
,
1985 struct tevent_context
*ev
,
1986 struct rpc_pipe_client
*cli
,
1987 struct policy_handle
*_bind_handle
/* [in] [ref] */,
1988 int32_t _level
/* [in] */,
1989 union drsuapi_DsWriteAccountSpnRequest
*_req
/* [in] [ref,switch_is(level)] */,
1990 int32_t *_level_out
/* [out] [ref] */,
1991 union drsuapi_DsWriteAccountSpnResult
*_res
/* [out] [ref,switch_is(*level_out)] */)
1993 struct tevent_req
*req
;
1994 struct rpccli_drsuapi_DsWriteAccountSpn_state
*state
;
1995 struct tevent_req
*subreq
;
1997 req
= tevent_req_create(mem_ctx
, &state
,
1998 struct rpccli_drsuapi_DsWriteAccountSpn_state
);
2002 state
->out_mem_ctx
= NULL
;
2003 state
->dispatch_recv
= cli
->dispatch_recv
;
2006 state
->orig
.in
.bind_handle
= _bind_handle
;
2007 state
->orig
.in
.level
= _level
;
2008 state
->orig
.in
.req
= _req
;
2010 /* Out parameters */
2011 state
->orig
.out
.level_out
= _level_out
;
2012 state
->orig
.out
.res
= _res
;
2015 ZERO_STRUCT(state
->orig
.out
.result
);
2017 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2018 "rpccli_drsuapi_DsWriteAccountSpn_out_memory");
2019 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2020 return tevent_req_post(req
, ev
);
2023 /* make a temporary copy, that we pass to the dispatch function */
2024 state
->tmp
= state
->orig
;
2026 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2028 NDR_DRSUAPI_DSWRITEACCOUNTSPN
,
2030 if (tevent_req_nomem(subreq
, req
)) {
2031 return tevent_req_post(req
, ev
);
2033 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsWriteAccountSpn_done
, req
);
2037 static void rpccli_drsuapi_DsWriteAccountSpn_done(struct tevent_req
*subreq
)
2039 struct tevent_req
*req
= tevent_req_callback_data(
2040 subreq
, struct tevent_req
);
2041 struct rpccli_drsuapi_DsWriteAccountSpn_state
*state
= tevent_req_data(
2042 req
, struct rpccli_drsuapi_DsWriteAccountSpn_state
);
2044 TALLOC_CTX
*mem_ctx
;
2046 if (state
->out_mem_ctx
) {
2047 mem_ctx
= state
->out_mem_ctx
;
2052 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2053 TALLOC_FREE(subreq
);
2054 if (!NT_STATUS_IS_OK(status
)) {
2055 tevent_req_nterror(req
, status
);
2059 /* Copy out parameters */
2060 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
2061 *state
->orig
.out
.res
= *state
->tmp
.out
.res
;
2064 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2066 /* Reset temporary structure */
2067 ZERO_STRUCT(state
->tmp
);
2069 tevent_req_done(req
);
2072 NTSTATUS
rpccli_drsuapi_DsWriteAccountSpn_recv(struct tevent_req
*req
,
2073 TALLOC_CTX
*mem_ctx
,
2076 struct rpccli_drsuapi_DsWriteAccountSpn_state
*state
= tevent_req_data(
2077 req
, struct rpccli_drsuapi_DsWriteAccountSpn_state
);
2080 if (tevent_req_is_nterror(req
, &status
)) {
2081 tevent_req_received(req
);
2085 /* Steal possbile out parameters to the callers context */
2086 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2089 *result
= state
->orig
.out
.result
;
2091 tevent_req_received(req
);
2092 return NT_STATUS_OK
;
2095 NTSTATUS
rpccli_drsuapi_DsWriteAccountSpn(struct rpc_pipe_client
*cli
,
2096 TALLOC_CTX
*mem_ctx
,
2097 struct policy_handle
*bind_handle
/* [in] [ref] */,
2098 int32_t level
/* [in] */,
2099 union drsuapi_DsWriteAccountSpnRequest
*req
/* [in] [ref,switch_is(level)] */,
2100 int32_t *level_out
/* [out] [ref] */,
2101 union drsuapi_DsWriteAccountSpnResult
*res
/* [out] [ref,switch_is(*level_out)] */,
2104 struct drsuapi_DsWriteAccountSpn r
;
2108 r
.in
.bind_handle
= bind_handle
;
2112 status
= cli
->dispatch(cli
,
2115 NDR_DRSUAPI_DSWRITEACCOUNTSPN
,
2118 if (!NT_STATUS_IS_OK(status
)) {
2122 if (NT_STATUS_IS_ERR(status
)) {
2126 /* Return variables */
2127 *level_out
= *r
.out
.level_out
;
2132 *werror
= r
.out
.result
;
2135 return werror_to_ntstatus(r
.out
.result
);
2138 struct rpccli_drsuapi_DsRemoveDSServer_state
{
2139 struct drsuapi_DsRemoveDSServer orig
;
2140 struct drsuapi_DsRemoveDSServer tmp
;
2141 TALLOC_CTX
*out_mem_ctx
;
2142 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2145 static void rpccli_drsuapi_DsRemoveDSServer_done(struct tevent_req
*subreq
);
2147 struct tevent_req
*rpccli_drsuapi_DsRemoveDSServer_send(TALLOC_CTX
*mem_ctx
,
2148 struct tevent_context
*ev
,
2149 struct rpc_pipe_client
*cli
,
2150 struct policy_handle
*_bind_handle
/* [in] [ref] */,
2151 int32_t _level
/* [in] */,
2152 union drsuapi_DsRemoveDSServerRequest
*_req
/* [in] [ref,switch_is(level)] */,
2153 int32_t *_level_out
/* [out] [ref] */,
2154 union drsuapi_DsRemoveDSServerResult
*_res
/* [out] [ref,switch_is(*level_out)] */)
2156 struct tevent_req
*req
;
2157 struct rpccli_drsuapi_DsRemoveDSServer_state
*state
;
2158 struct tevent_req
*subreq
;
2160 req
= tevent_req_create(mem_ctx
, &state
,
2161 struct rpccli_drsuapi_DsRemoveDSServer_state
);
2165 state
->out_mem_ctx
= NULL
;
2166 state
->dispatch_recv
= cli
->dispatch_recv
;
2169 state
->orig
.in
.bind_handle
= _bind_handle
;
2170 state
->orig
.in
.level
= _level
;
2171 state
->orig
.in
.req
= _req
;
2173 /* Out parameters */
2174 state
->orig
.out
.level_out
= _level_out
;
2175 state
->orig
.out
.res
= _res
;
2178 ZERO_STRUCT(state
->orig
.out
.result
);
2180 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2181 "rpccli_drsuapi_DsRemoveDSServer_out_memory");
2182 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2183 return tevent_req_post(req
, ev
);
2186 /* make a temporary copy, that we pass to the dispatch function */
2187 state
->tmp
= state
->orig
;
2189 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2191 NDR_DRSUAPI_DSREMOVEDSSERVER
,
2193 if (tevent_req_nomem(subreq
, req
)) {
2194 return tevent_req_post(req
, ev
);
2196 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsRemoveDSServer_done
, req
);
2200 static void rpccli_drsuapi_DsRemoveDSServer_done(struct tevent_req
*subreq
)
2202 struct tevent_req
*req
= tevent_req_callback_data(
2203 subreq
, struct tevent_req
);
2204 struct rpccli_drsuapi_DsRemoveDSServer_state
*state
= tevent_req_data(
2205 req
, struct rpccli_drsuapi_DsRemoveDSServer_state
);
2207 TALLOC_CTX
*mem_ctx
;
2209 if (state
->out_mem_ctx
) {
2210 mem_ctx
= state
->out_mem_ctx
;
2215 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2216 TALLOC_FREE(subreq
);
2217 if (!NT_STATUS_IS_OK(status
)) {
2218 tevent_req_nterror(req
, status
);
2222 /* Copy out parameters */
2223 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
2224 *state
->orig
.out
.res
= *state
->tmp
.out
.res
;
2227 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2229 /* Reset temporary structure */
2230 ZERO_STRUCT(state
->tmp
);
2232 tevent_req_done(req
);
2235 NTSTATUS
rpccli_drsuapi_DsRemoveDSServer_recv(struct tevent_req
*req
,
2236 TALLOC_CTX
*mem_ctx
,
2239 struct rpccli_drsuapi_DsRemoveDSServer_state
*state
= tevent_req_data(
2240 req
, struct rpccli_drsuapi_DsRemoveDSServer_state
);
2243 if (tevent_req_is_nterror(req
, &status
)) {
2244 tevent_req_received(req
);
2248 /* Steal possbile out parameters to the callers context */
2249 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2252 *result
= state
->orig
.out
.result
;
2254 tevent_req_received(req
);
2255 return NT_STATUS_OK
;
2258 NTSTATUS
rpccli_drsuapi_DsRemoveDSServer(struct rpc_pipe_client
*cli
,
2259 TALLOC_CTX
*mem_ctx
,
2260 struct policy_handle
*bind_handle
/* [in] [ref] */,
2261 int32_t level
/* [in] */,
2262 union drsuapi_DsRemoveDSServerRequest
*req
/* [in] [ref,switch_is(level)] */,
2263 int32_t *level_out
/* [out] [ref] */,
2264 union drsuapi_DsRemoveDSServerResult
*res
/* [out] [ref,switch_is(*level_out)] */,
2267 struct drsuapi_DsRemoveDSServer r
;
2271 r
.in
.bind_handle
= bind_handle
;
2275 status
= cli
->dispatch(cli
,
2278 NDR_DRSUAPI_DSREMOVEDSSERVER
,
2281 if (!NT_STATUS_IS_OK(status
)) {
2285 if (NT_STATUS_IS_ERR(status
)) {
2289 /* Return variables */
2290 *level_out
= *r
.out
.level_out
;
2295 *werror
= r
.out
.result
;
2298 return werror_to_ntstatus(r
.out
.result
);
2301 struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state
{
2302 struct DRSUAPI_REMOVE_DS_DOMAIN orig
;
2303 struct DRSUAPI_REMOVE_DS_DOMAIN tmp
;
2304 TALLOC_CTX
*out_mem_ctx
;
2305 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2308 static void rpccli_DRSUAPI_REMOVE_DS_DOMAIN_done(struct tevent_req
*subreq
);
2310 struct tevent_req
*rpccli_DRSUAPI_REMOVE_DS_DOMAIN_send(TALLOC_CTX
*mem_ctx
,
2311 struct tevent_context
*ev
,
2312 struct rpc_pipe_client
*cli
)
2314 struct tevent_req
*req
;
2315 struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state
*state
;
2316 struct tevent_req
*subreq
;
2318 req
= tevent_req_create(mem_ctx
, &state
,
2319 struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state
);
2323 state
->out_mem_ctx
= NULL
;
2324 state
->dispatch_recv
= cli
->dispatch_recv
;
2328 /* Out parameters */
2331 ZERO_STRUCT(state
->orig
.out
.result
);
2333 /* make a temporary copy, that we pass to the dispatch function */
2334 state
->tmp
= state
->orig
;
2336 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2338 NDR_DRSUAPI_REMOVE_DS_DOMAIN
,
2340 if (tevent_req_nomem(subreq
, req
)) {
2341 return tevent_req_post(req
, ev
);
2343 tevent_req_set_callback(subreq
, rpccli_DRSUAPI_REMOVE_DS_DOMAIN_done
, req
);
2347 static void rpccli_DRSUAPI_REMOVE_DS_DOMAIN_done(struct tevent_req
*subreq
)
2349 struct tevent_req
*req
= tevent_req_callback_data(
2350 subreq
, struct tevent_req
);
2351 struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state
*state
= tevent_req_data(
2352 req
, struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state
);
2354 TALLOC_CTX
*mem_ctx
;
2356 if (state
->out_mem_ctx
) {
2357 mem_ctx
= state
->out_mem_ctx
;
2362 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2363 TALLOC_FREE(subreq
);
2364 if (!NT_STATUS_IS_OK(status
)) {
2365 tevent_req_nterror(req
, status
);
2369 /* Copy out parameters */
2372 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2374 /* Reset temporary structure */
2375 ZERO_STRUCT(state
->tmp
);
2377 tevent_req_done(req
);
2380 NTSTATUS
rpccli_DRSUAPI_REMOVE_DS_DOMAIN_recv(struct tevent_req
*req
,
2381 TALLOC_CTX
*mem_ctx
,
2384 struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state
*state
= tevent_req_data(
2385 req
, struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state
);
2388 if (tevent_req_is_nterror(req
, &status
)) {
2389 tevent_req_received(req
);
2393 /* Steal possbile out parameters to the callers context */
2394 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2397 *result
= state
->orig
.out
.result
;
2399 tevent_req_received(req
);
2400 return NT_STATUS_OK
;
2403 NTSTATUS
rpccli_DRSUAPI_REMOVE_DS_DOMAIN(struct rpc_pipe_client
*cli
,
2404 TALLOC_CTX
*mem_ctx
,
2407 struct DRSUAPI_REMOVE_DS_DOMAIN r
;
2412 status
= cli
->dispatch(cli
,
2415 NDR_DRSUAPI_REMOVE_DS_DOMAIN
,
2418 if (!NT_STATUS_IS_OK(status
)) {
2422 if (NT_STATUS_IS_ERR(status
)) {
2426 /* Return variables */
2430 *werror
= r
.out
.result
;
2433 return werror_to_ntstatus(r
.out
.result
);
2436 struct rpccli_drsuapi_DsGetDomainControllerInfo_state
{
2437 struct drsuapi_DsGetDomainControllerInfo orig
;
2438 struct drsuapi_DsGetDomainControllerInfo tmp
;
2439 TALLOC_CTX
*out_mem_ctx
;
2440 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2443 static void rpccli_drsuapi_DsGetDomainControllerInfo_done(struct tevent_req
*subreq
);
2445 struct tevent_req
*rpccli_drsuapi_DsGetDomainControllerInfo_send(TALLOC_CTX
*mem_ctx
,
2446 struct tevent_context
*ev
,
2447 struct rpc_pipe_client
*cli
,
2448 struct policy_handle
*_bind_handle
/* [in] [ref] */,
2449 int32_t _level
/* [in] */,
2450 union drsuapi_DsGetDCInfoRequest
*_req
/* [in] [ref,switch_is(level)] */,
2451 int32_t *_level_out
/* [out] [ref] */,
2452 union drsuapi_DsGetDCInfoCtr
*_ctr
/* [out] [ref,switch_is(*level_out)] */)
2454 struct tevent_req
*req
;
2455 struct rpccli_drsuapi_DsGetDomainControllerInfo_state
*state
;
2456 struct tevent_req
*subreq
;
2458 req
= tevent_req_create(mem_ctx
, &state
,
2459 struct rpccli_drsuapi_DsGetDomainControllerInfo_state
);
2463 state
->out_mem_ctx
= NULL
;
2464 state
->dispatch_recv
= cli
->dispatch_recv
;
2467 state
->orig
.in
.bind_handle
= _bind_handle
;
2468 state
->orig
.in
.level
= _level
;
2469 state
->orig
.in
.req
= _req
;
2471 /* Out parameters */
2472 state
->orig
.out
.level_out
= _level_out
;
2473 state
->orig
.out
.ctr
= _ctr
;
2476 ZERO_STRUCT(state
->orig
.out
.result
);
2478 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2479 "rpccli_drsuapi_DsGetDomainControllerInfo_out_memory");
2480 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2481 return tevent_req_post(req
, ev
);
2484 /* make a temporary copy, that we pass to the dispatch function */
2485 state
->tmp
= state
->orig
;
2487 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2489 NDR_DRSUAPI_DSGETDOMAINCONTROLLERINFO
,
2491 if (tevent_req_nomem(subreq
, req
)) {
2492 return tevent_req_post(req
, ev
);
2494 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsGetDomainControllerInfo_done
, req
);
2498 static void rpccli_drsuapi_DsGetDomainControllerInfo_done(struct tevent_req
*subreq
)
2500 struct tevent_req
*req
= tevent_req_callback_data(
2501 subreq
, struct tevent_req
);
2502 struct rpccli_drsuapi_DsGetDomainControllerInfo_state
*state
= tevent_req_data(
2503 req
, struct rpccli_drsuapi_DsGetDomainControllerInfo_state
);
2505 TALLOC_CTX
*mem_ctx
;
2507 if (state
->out_mem_ctx
) {
2508 mem_ctx
= state
->out_mem_ctx
;
2513 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2514 TALLOC_FREE(subreq
);
2515 if (!NT_STATUS_IS_OK(status
)) {
2516 tevent_req_nterror(req
, status
);
2520 /* Copy out parameters */
2521 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
2522 *state
->orig
.out
.ctr
= *state
->tmp
.out
.ctr
;
2525 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2527 /* Reset temporary structure */
2528 ZERO_STRUCT(state
->tmp
);
2530 tevent_req_done(req
);
2533 NTSTATUS
rpccli_drsuapi_DsGetDomainControllerInfo_recv(struct tevent_req
*req
,
2534 TALLOC_CTX
*mem_ctx
,
2537 struct rpccli_drsuapi_DsGetDomainControllerInfo_state
*state
= tevent_req_data(
2538 req
, struct rpccli_drsuapi_DsGetDomainControllerInfo_state
);
2541 if (tevent_req_is_nterror(req
, &status
)) {
2542 tevent_req_received(req
);
2546 /* Steal possbile out parameters to the callers context */
2547 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2550 *result
= state
->orig
.out
.result
;
2552 tevent_req_received(req
);
2553 return NT_STATUS_OK
;
2556 NTSTATUS
rpccli_drsuapi_DsGetDomainControllerInfo(struct rpc_pipe_client
*cli
,
2557 TALLOC_CTX
*mem_ctx
,
2558 struct policy_handle
*bind_handle
/* [in] [ref] */,
2559 int32_t level
/* [in] */,
2560 union drsuapi_DsGetDCInfoRequest
*req
/* [in] [ref,switch_is(level)] */,
2561 int32_t *level_out
/* [out] [ref] */,
2562 union drsuapi_DsGetDCInfoCtr
*ctr
/* [out] [ref,switch_is(*level_out)] */,
2565 struct drsuapi_DsGetDomainControllerInfo r
;
2569 r
.in
.bind_handle
= bind_handle
;
2573 status
= cli
->dispatch(cli
,
2576 NDR_DRSUAPI_DSGETDOMAINCONTROLLERINFO
,
2579 if (!NT_STATUS_IS_OK(status
)) {
2583 if (NT_STATUS_IS_ERR(status
)) {
2587 /* Return variables */
2588 *level_out
= *r
.out
.level_out
;
2593 *werror
= r
.out
.result
;
2596 return werror_to_ntstatus(r
.out
.result
);
2599 struct rpccli_drsuapi_DsAddEntry_state
{
2600 struct drsuapi_DsAddEntry orig
;
2601 struct drsuapi_DsAddEntry tmp
;
2602 TALLOC_CTX
*out_mem_ctx
;
2603 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2606 static void rpccli_drsuapi_DsAddEntry_done(struct tevent_req
*subreq
);
2608 struct tevent_req
*rpccli_drsuapi_DsAddEntry_send(TALLOC_CTX
*mem_ctx
,
2609 struct tevent_context
*ev
,
2610 struct rpc_pipe_client
*cli
,
2611 struct policy_handle
*_bind_handle
/* [in] [ref] */,
2612 int32_t _level
/* [in] */,
2613 union drsuapi_DsAddEntryRequest
*_req
/* [in] [ref,switch_is(level)] */,
2614 int32_t *_level_out
/* [out] [ref] */,
2615 union drsuapi_DsAddEntryCtr
*_ctr
/* [out] [ref,switch_is(*level_out)] */)
2617 struct tevent_req
*req
;
2618 struct rpccli_drsuapi_DsAddEntry_state
*state
;
2619 struct tevent_req
*subreq
;
2621 req
= tevent_req_create(mem_ctx
, &state
,
2622 struct rpccli_drsuapi_DsAddEntry_state
);
2626 state
->out_mem_ctx
= NULL
;
2627 state
->dispatch_recv
= cli
->dispatch_recv
;
2630 state
->orig
.in
.bind_handle
= _bind_handle
;
2631 state
->orig
.in
.level
= _level
;
2632 state
->orig
.in
.req
= _req
;
2634 /* Out parameters */
2635 state
->orig
.out
.level_out
= _level_out
;
2636 state
->orig
.out
.ctr
= _ctr
;
2639 ZERO_STRUCT(state
->orig
.out
.result
);
2641 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2642 "rpccli_drsuapi_DsAddEntry_out_memory");
2643 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2644 return tevent_req_post(req
, ev
);
2647 /* make a temporary copy, that we pass to the dispatch function */
2648 state
->tmp
= state
->orig
;
2650 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2652 NDR_DRSUAPI_DSADDENTRY
,
2654 if (tevent_req_nomem(subreq
, req
)) {
2655 return tevent_req_post(req
, ev
);
2657 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsAddEntry_done
, req
);
2661 static void rpccli_drsuapi_DsAddEntry_done(struct tevent_req
*subreq
)
2663 struct tevent_req
*req
= tevent_req_callback_data(
2664 subreq
, struct tevent_req
);
2665 struct rpccli_drsuapi_DsAddEntry_state
*state
= tevent_req_data(
2666 req
, struct rpccli_drsuapi_DsAddEntry_state
);
2668 TALLOC_CTX
*mem_ctx
;
2670 if (state
->out_mem_ctx
) {
2671 mem_ctx
= state
->out_mem_ctx
;
2676 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2677 TALLOC_FREE(subreq
);
2678 if (!NT_STATUS_IS_OK(status
)) {
2679 tevent_req_nterror(req
, status
);
2683 /* Copy out parameters */
2684 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
2685 *state
->orig
.out
.ctr
= *state
->tmp
.out
.ctr
;
2688 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2690 /* Reset temporary structure */
2691 ZERO_STRUCT(state
->tmp
);
2693 tevent_req_done(req
);
2696 NTSTATUS
rpccli_drsuapi_DsAddEntry_recv(struct tevent_req
*req
,
2697 TALLOC_CTX
*mem_ctx
,
2700 struct rpccli_drsuapi_DsAddEntry_state
*state
= tevent_req_data(
2701 req
, struct rpccli_drsuapi_DsAddEntry_state
);
2704 if (tevent_req_is_nterror(req
, &status
)) {
2705 tevent_req_received(req
);
2709 /* Steal possbile out parameters to the callers context */
2710 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2713 *result
= state
->orig
.out
.result
;
2715 tevent_req_received(req
);
2716 return NT_STATUS_OK
;
2719 NTSTATUS
rpccli_drsuapi_DsAddEntry(struct rpc_pipe_client
*cli
,
2720 TALLOC_CTX
*mem_ctx
,
2721 struct policy_handle
*bind_handle
/* [in] [ref] */,
2722 int32_t level
/* [in] */,
2723 union drsuapi_DsAddEntryRequest
*req
/* [in] [ref,switch_is(level)] */,
2724 int32_t *level_out
/* [out] [ref] */,
2725 union drsuapi_DsAddEntryCtr
*ctr
/* [out] [ref,switch_is(*level_out)] */,
2728 struct drsuapi_DsAddEntry r
;
2732 r
.in
.bind_handle
= bind_handle
;
2736 status
= cli
->dispatch(cli
,
2739 NDR_DRSUAPI_DSADDENTRY
,
2742 if (!NT_STATUS_IS_OK(status
)) {
2746 if (NT_STATUS_IS_ERR(status
)) {
2750 /* Return variables */
2751 *level_out
= *r
.out
.level_out
;
2756 *werror
= r
.out
.result
;
2759 return werror_to_ntstatus(r
.out
.result
);
2762 struct rpccli_drsuapi_DsExecuteKCC_state
{
2763 struct drsuapi_DsExecuteKCC orig
;
2764 struct drsuapi_DsExecuteKCC tmp
;
2765 TALLOC_CTX
*out_mem_ctx
;
2766 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2769 static void rpccli_drsuapi_DsExecuteKCC_done(struct tevent_req
*subreq
);
2771 struct tevent_req
*rpccli_drsuapi_DsExecuteKCC_send(TALLOC_CTX
*mem_ctx
,
2772 struct tevent_context
*ev
,
2773 struct rpc_pipe_client
*cli
,
2774 struct policy_handle
*_bind_handle
/* [in] [ref] */,
2775 uint32_t _level
/* [in] */,
2776 union drsuapi_DsExecuteKCCRequest
*_req
/* [in] [ref,switch_is(level)] */)
2778 struct tevent_req
*req
;
2779 struct rpccli_drsuapi_DsExecuteKCC_state
*state
;
2780 struct tevent_req
*subreq
;
2782 req
= tevent_req_create(mem_ctx
, &state
,
2783 struct rpccli_drsuapi_DsExecuteKCC_state
);
2787 state
->out_mem_ctx
= NULL
;
2788 state
->dispatch_recv
= cli
->dispatch_recv
;
2791 state
->orig
.in
.bind_handle
= _bind_handle
;
2792 state
->orig
.in
.level
= _level
;
2793 state
->orig
.in
.req
= _req
;
2795 /* Out parameters */
2798 ZERO_STRUCT(state
->orig
.out
.result
);
2800 /* make a temporary copy, that we pass to the dispatch function */
2801 state
->tmp
= state
->orig
;
2803 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2805 NDR_DRSUAPI_DSEXECUTEKCC
,
2807 if (tevent_req_nomem(subreq
, req
)) {
2808 return tevent_req_post(req
, ev
);
2810 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsExecuteKCC_done
, req
);
2814 static void rpccli_drsuapi_DsExecuteKCC_done(struct tevent_req
*subreq
)
2816 struct tevent_req
*req
= tevent_req_callback_data(
2817 subreq
, struct tevent_req
);
2818 struct rpccli_drsuapi_DsExecuteKCC_state
*state
= tevent_req_data(
2819 req
, struct rpccli_drsuapi_DsExecuteKCC_state
);
2821 TALLOC_CTX
*mem_ctx
;
2823 if (state
->out_mem_ctx
) {
2824 mem_ctx
= state
->out_mem_ctx
;
2829 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2830 TALLOC_FREE(subreq
);
2831 if (!NT_STATUS_IS_OK(status
)) {
2832 tevent_req_nterror(req
, status
);
2836 /* Copy out parameters */
2839 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2841 /* Reset temporary structure */
2842 ZERO_STRUCT(state
->tmp
);
2844 tevent_req_done(req
);
2847 NTSTATUS
rpccli_drsuapi_DsExecuteKCC_recv(struct tevent_req
*req
,
2848 TALLOC_CTX
*mem_ctx
,
2851 struct rpccli_drsuapi_DsExecuteKCC_state
*state
= tevent_req_data(
2852 req
, struct rpccli_drsuapi_DsExecuteKCC_state
);
2855 if (tevent_req_is_nterror(req
, &status
)) {
2856 tevent_req_received(req
);
2860 /* Steal possbile out parameters to the callers context */
2861 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2864 *result
= state
->orig
.out
.result
;
2866 tevent_req_received(req
);
2867 return NT_STATUS_OK
;
2870 NTSTATUS
rpccli_drsuapi_DsExecuteKCC(struct rpc_pipe_client
*cli
,
2871 TALLOC_CTX
*mem_ctx
,
2872 struct policy_handle
*bind_handle
/* [in] [ref] */,
2873 uint32_t level
/* [in] */,
2874 union drsuapi_DsExecuteKCCRequest
*req
/* [in] [ref,switch_is(level)] */,
2877 struct drsuapi_DsExecuteKCC r
;
2881 r
.in
.bind_handle
= bind_handle
;
2885 status
= cli
->dispatch(cli
,
2888 NDR_DRSUAPI_DSEXECUTEKCC
,
2891 if (!NT_STATUS_IS_OK(status
)) {
2895 if (NT_STATUS_IS_ERR(status
)) {
2899 /* Return variables */
2903 *werror
= r
.out
.result
;
2906 return werror_to_ntstatus(r
.out
.result
);
2909 struct rpccli_drsuapi_DsReplicaGetInfo_state
{
2910 struct drsuapi_DsReplicaGetInfo orig
;
2911 struct drsuapi_DsReplicaGetInfo tmp
;
2912 TALLOC_CTX
*out_mem_ctx
;
2913 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2916 static void rpccli_drsuapi_DsReplicaGetInfo_done(struct tevent_req
*subreq
);
2918 struct tevent_req
*rpccli_drsuapi_DsReplicaGetInfo_send(TALLOC_CTX
*mem_ctx
,
2919 struct tevent_context
*ev
,
2920 struct rpc_pipe_client
*cli
,
2921 struct policy_handle
*_bind_handle
/* [in] [ref] */,
2922 enum drsuapi_DsReplicaGetInfoLevel _level
/* [in] */,
2923 union drsuapi_DsReplicaGetInfoRequest
*_req
/* [in] [ref,switch_is(level)] */,
2924 enum drsuapi_DsReplicaInfoType
*_info_type
/* [out] [ref] */,
2925 union drsuapi_DsReplicaInfo
*_info
/* [out] [ref,switch_is(*info_type)] */)
2927 struct tevent_req
*req
;
2928 struct rpccli_drsuapi_DsReplicaGetInfo_state
*state
;
2929 struct tevent_req
*subreq
;
2931 req
= tevent_req_create(mem_ctx
, &state
,
2932 struct rpccli_drsuapi_DsReplicaGetInfo_state
);
2936 state
->out_mem_ctx
= NULL
;
2937 state
->dispatch_recv
= cli
->dispatch_recv
;
2940 state
->orig
.in
.bind_handle
= _bind_handle
;
2941 state
->orig
.in
.level
= _level
;
2942 state
->orig
.in
.req
= _req
;
2944 /* Out parameters */
2945 state
->orig
.out
.info_type
= _info_type
;
2946 state
->orig
.out
.info
= _info
;
2949 ZERO_STRUCT(state
->orig
.out
.result
);
2951 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2952 "rpccli_drsuapi_DsReplicaGetInfo_out_memory");
2953 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2954 return tevent_req_post(req
, ev
);
2957 /* make a temporary copy, that we pass to the dispatch function */
2958 state
->tmp
= state
->orig
;
2960 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2962 NDR_DRSUAPI_DSREPLICAGETINFO
,
2964 if (tevent_req_nomem(subreq
, req
)) {
2965 return tevent_req_post(req
, ev
);
2967 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsReplicaGetInfo_done
, req
);
2971 static void rpccli_drsuapi_DsReplicaGetInfo_done(struct tevent_req
*subreq
)
2973 struct tevent_req
*req
= tevent_req_callback_data(
2974 subreq
, struct tevent_req
);
2975 struct rpccli_drsuapi_DsReplicaGetInfo_state
*state
= tevent_req_data(
2976 req
, struct rpccli_drsuapi_DsReplicaGetInfo_state
);
2978 TALLOC_CTX
*mem_ctx
;
2980 if (state
->out_mem_ctx
) {
2981 mem_ctx
= state
->out_mem_ctx
;
2986 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2987 TALLOC_FREE(subreq
);
2988 if (!NT_STATUS_IS_OK(status
)) {
2989 tevent_req_nterror(req
, status
);
2993 /* Copy out parameters */
2994 *state
->orig
.out
.info_type
= *state
->tmp
.out
.info_type
;
2995 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
2998 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3000 /* Reset temporary structure */
3001 ZERO_STRUCT(state
->tmp
);
3003 tevent_req_done(req
);
3006 NTSTATUS
rpccli_drsuapi_DsReplicaGetInfo_recv(struct tevent_req
*req
,
3007 TALLOC_CTX
*mem_ctx
,
3010 struct rpccli_drsuapi_DsReplicaGetInfo_state
*state
= tevent_req_data(
3011 req
, struct rpccli_drsuapi_DsReplicaGetInfo_state
);
3014 if (tevent_req_is_nterror(req
, &status
)) {
3015 tevent_req_received(req
);
3019 /* Steal possbile out parameters to the callers context */
3020 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3023 *result
= state
->orig
.out
.result
;
3025 tevent_req_received(req
);
3026 return NT_STATUS_OK
;
3029 NTSTATUS
rpccli_drsuapi_DsReplicaGetInfo(struct rpc_pipe_client
*cli
,
3030 TALLOC_CTX
*mem_ctx
,
3031 struct policy_handle
*bind_handle
/* [in] [ref] */,
3032 enum drsuapi_DsReplicaGetInfoLevel level
/* [in] */,
3033 union drsuapi_DsReplicaGetInfoRequest
*req
/* [in] [ref,switch_is(level)] */,
3034 enum drsuapi_DsReplicaInfoType
*info_type
/* [out] [ref] */,
3035 union drsuapi_DsReplicaInfo
*info
/* [out] [ref,switch_is(*info_type)] */,
3038 struct drsuapi_DsReplicaGetInfo r
;
3042 r
.in
.bind_handle
= bind_handle
;
3046 status
= cli
->dispatch(cli
,
3049 NDR_DRSUAPI_DSREPLICAGETINFO
,
3052 if (!NT_STATUS_IS_OK(status
)) {
3056 if (NT_STATUS_IS_ERR(status
)) {
3060 /* Return variables */
3061 *info_type
= *r
.out
.info_type
;
3062 *info
= *r
.out
.info
;
3066 *werror
= r
.out
.result
;
3069 return werror_to_ntstatus(r
.out
.result
);
3072 struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
{
3073 struct DRSUAPI_ADD_SID_HISTORY orig
;
3074 struct DRSUAPI_ADD_SID_HISTORY tmp
;
3075 TALLOC_CTX
*out_mem_ctx
;
3076 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3079 static void rpccli_DRSUAPI_ADD_SID_HISTORY_done(struct tevent_req
*subreq
);
3081 struct tevent_req
*rpccli_DRSUAPI_ADD_SID_HISTORY_send(TALLOC_CTX
*mem_ctx
,
3082 struct tevent_context
*ev
,
3083 struct rpc_pipe_client
*cli
)
3085 struct tevent_req
*req
;
3086 struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
*state
;
3087 struct tevent_req
*subreq
;
3089 req
= tevent_req_create(mem_ctx
, &state
,
3090 struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
);
3094 state
->out_mem_ctx
= NULL
;
3095 state
->dispatch_recv
= cli
->dispatch_recv
;
3099 /* Out parameters */
3102 ZERO_STRUCT(state
->orig
.out
.result
);
3104 /* make a temporary copy, that we pass to the dispatch function */
3105 state
->tmp
= state
->orig
;
3107 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3109 NDR_DRSUAPI_ADD_SID_HISTORY
,
3111 if (tevent_req_nomem(subreq
, req
)) {
3112 return tevent_req_post(req
, ev
);
3114 tevent_req_set_callback(subreq
, rpccli_DRSUAPI_ADD_SID_HISTORY_done
, req
);
3118 static void rpccli_DRSUAPI_ADD_SID_HISTORY_done(struct tevent_req
*subreq
)
3120 struct tevent_req
*req
= tevent_req_callback_data(
3121 subreq
, struct tevent_req
);
3122 struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
*state
= tevent_req_data(
3123 req
, struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
);
3125 TALLOC_CTX
*mem_ctx
;
3127 if (state
->out_mem_ctx
) {
3128 mem_ctx
= state
->out_mem_ctx
;
3133 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3134 TALLOC_FREE(subreq
);
3135 if (!NT_STATUS_IS_OK(status
)) {
3136 tevent_req_nterror(req
, status
);
3140 /* Copy out parameters */
3143 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3145 /* Reset temporary structure */
3146 ZERO_STRUCT(state
->tmp
);
3148 tevent_req_done(req
);
3151 NTSTATUS
rpccli_DRSUAPI_ADD_SID_HISTORY_recv(struct tevent_req
*req
,
3152 TALLOC_CTX
*mem_ctx
,
3155 struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
*state
= tevent_req_data(
3156 req
, struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
);
3159 if (tevent_req_is_nterror(req
, &status
)) {
3160 tevent_req_received(req
);
3164 /* Steal possbile out parameters to the callers context */
3165 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3168 *result
= state
->orig
.out
.result
;
3170 tevent_req_received(req
);
3171 return NT_STATUS_OK
;
3174 NTSTATUS
rpccli_DRSUAPI_ADD_SID_HISTORY(struct rpc_pipe_client
*cli
,
3175 TALLOC_CTX
*mem_ctx
,
3178 struct DRSUAPI_ADD_SID_HISTORY r
;
3183 status
= cli
->dispatch(cli
,
3186 NDR_DRSUAPI_ADD_SID_HISTORY
,
3189 if (!NT_STATUS_IS_OK(status
)) {
3193 if (NT_STATUS_IS_ERR(status
)) {
3197 /* Return variables */
3201 *werror
= r
.out
.result
;
3204 return werror_to_ntstatus(r
.out
.result
);
3207 struct rpccli_drsuapi_DsGetMemberships2_state
{
3208 struct drsuapi_DsGetMemberships2 orig
;
3209 struct drsuapi_DsGetMemberships2 tmp
;
3210 TALLOC_CTX
*out_mem_ctx
;
3211 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3214 static void rpccli_drsuapi_DsGetMemberships2_done(struct tevent_req
*subreq
);
3216 struct tevent_req
*rpccli_drsuapi_DsGetMemberships2_send(TALLOC_CTX
*mem_ctx
,
3217 struct tevent_context
*ev
,
3218 struct rpc_pipe_client
*cli
,
3219 struct policy_handle
*_bind_handle
/* [in] [ref] */,
3220 int32_t _level
/* [in] */,
3221 union drsuapi_DsGetMemberships2Request
*_req
/* [in] [ref,switch_is(level)] */,
3222 int32_t *_level_out
/* [out] [ref] */,
3223 union drsuapi_DsGetMemberships2Ctr
*_ctr
/* [out] [ref,switch_is(*level_out)] */)
3225 struct tevent_req
*req
;
3226 struct rpccli_drsuapi_DsGetMemberships2_state
*state
;
3227 struct tevent_req
*subreq
;
3229 req
= tevent_req_create(mem_ctx
, &state
,
3230 struct rpccli_drsuapi_DsGetMemberships2_state
);
3234 state
->out_mem_ctx
= NULL
;
3235 state
->dispatch_recv
= cli
->dispatch_recv
;
3238 state
->orig
.in
.bind_handle
= _bind_handle
;
3239 state
->orig
.in
.level
= _level
;
3240 state
->orig
.in
.req
= _req
;
3242 /* Out parameters */
3243 state
->orig
.out
.level_out
= _level_out
;
3244 state
->orig
.out
.ctr
= _ctr
;
3247 ZERO_STRUCT(state
->orig
.out
.result
);
3249 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3250 "rpccli_drsuapi_DsGetMemberships2_out_memory");
3251 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3252 return tevent_req_post(req
, ev
);
3255 /* make a temporary copy, that we pass to the dispatch function */
3256 state
->tmp
= state
->orig
;
3258 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3260 NDR_DRSUAPI_DSGETMEMBERSHIPS2
,
3262 if (tevent_req_nomem(subreq
, req
)) {
3263 return tevent_req_post(req
, ev
);
3265 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsGetMemberships2_done
, req
);
3269 static void rpccli_drsuapi_DsGetMemberships2_done(struct tevent_req
*subreq
)
3271 struct tevent_req
*req
= tevent_req_callback_data(
3272 subreq
, struct tevent_req
);
3273 struct rpccli_drsuapi_DsGetMemberships2_state
*state
= tevent_req_data(
3274 req
, struct rpccli_drsuapi_DsGetMemberships2_state
);
3276 TALLOC_CTX
*mem_ctx
;
3278 if (state
->out_mem_ctx
) {
3279 mem_ctx
= state
->out_mem_ctx
;
3284 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3285 TALLOC_FREE(subreq
);
3286 if (!NT_STATUS_IS_OK(status
)) {
3287 tevent_req_nterror(req
, status
);
3291 /* Copy out parameters */
3292 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
3293 *state
->orig
.out
.ctr
= *state
->tmp
.out
.ctr
;
3296 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3298 /* Reset temporary structure */
3299 ZERO_STRUCT(state
->tmp
);
3301 tevent_req_done(req
);
3304 NTSTATUS
rpccli_drsuapi_DsGetMemberships2_recv(struct tevent_req
*req
,
3305 TALLOC_CTX
*mem_ctx
,
3308 struct rpccli_drsuapi_DsGetMemberships2_state
*state
= tevent_req_data(
3309 req
, struct rpccli_drsuapi_DsGetMemberships2_state
);
3312 if (tevent_req_is_nterror(req
, &status
)) {
3313 tevent_req_received(req
);
3317 /* Steal possbile out parameters to the callers context */
3318 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3321 *result
= state
->orig
.out
.result
;
3323 tevent_req_received(req
);
3324 return NT_STATUS_OK
;
3327 NTSTATUS
rpccli_drsuapi_DsGetMemberships2(struct rpc_pipe_client
*cli
,
3328 TALLOC_CTX
*mem_ctx
,
3329 struct policy_handle
*bind_handle
/* [in] [ref] */,
3330 int32_t level
/* [in] */,
3331 union drsuapi_DsGetMemberships2Request
*req
/* [in] [ref,switch_is(level)] */,
3332 int32_t *level_out
/* [out] [ref] */,
3333 union drsuapi_DsGetMemberships2Ctr
*ctr
/* [out] [ref,switch_is(*level_out)] */,
3336 struct drsuapi_DsGetMemberships2 r
;
3340 r
.in
.bind_handle
= bind_handle
;
3344 status
= cli
->dispatch(cli
,
3347 NDR_DRSUAPI_DSGETMEMBERSHIPS2
,
3350 if (!NT_STATUS_IS_OK(status
)) {
3354 if (NT_STATUS_IS_ERR(status
)) {
3358 /* Return variables */
3359 *level_out
= *r
.out
.level_out
;
3364 *werror
= r
.out
.result
;
3367 return werror_to_ntstatus(r
.out
.result
);
3370 struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
{
3371 struct DRSUAPI_REPLICA_VERIFY_OBJECTS orig
;
3372 struct DRSUAPI_REPLICA_VERIFY_OBJECTS tmp
;
3373 TALLOC_CTX
*out_mem_ctx
;
3374 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3377 static void rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_done(struct tevent_req
*subreq
);
3379 struct tevent_req
*rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_send(TALLOC_CTX
*mem_ctx
,
3380 struct tevent_context
*ev
,
3381 struct rpc_pipe_client
*cli
)
3383 struct tevent_req
*req
;
3384 struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
*state
;
3385 struct tevent_req
*subreq
;
3387 req
= tevent_req_create(mem_ctx
, &state
,
3388 struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
);
3392 state
->out_mem_ctx
= NULL
;
3393 state
->dispatch_recv
= cli
->dispatch_recv
;
3397 /* Out parameters */
3400 ZERO_STRUCT(state
->orig
.out
.result
);
3402 /* make a temporary copy, that we pass to the dispatch function */
3403 state
->tmp
= state
->orig
;
3405 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3407 NDR_DRSUAPI_REPLICA_VERIFY_OBJECTS
,
3409 if (tevent_req_nomem(subreq
, req
)) {
3410 return tevent_req_post(req
, ev
);
3412 tevent_req_set_callback(subreq
, rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_done
, req
);
3416 static void rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_done(struct tevent_req
*subreq
)
3418 struct tevent_req
*req
= tevent_req_callback_data(
3419 subreq
, struct tevent_req
);
3420 struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
*state
= tevent_req_data(
3421 req
, struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
);
3423 TALLOC_CTX
*mem_ctx
;
3425 if (state
->out_mem_ctx
) {
3426 mem_ctx
= state
->out_mem_ctx
;
3431 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3432 TALLOC_FREE(subreq
);
3433 if (!NT_STATUS_IS_OK(status
)) {
3434 tevent_req_nterror(req
, status
);
3438 /* Copy out parameters */
3441 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3443 /* Reset temporary structure */
3444 ZERO_STRUCT(state
->tmp
);
3446 tevent_req_done(req
);
3449 NTSTATUS
rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_recv(struct tevent_req
*req
,
3450 TALLOC_CTX
*mem_ctx
,
3453 struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
*state
= tevent_req_data(
3454 req
, struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
);
3457 if (tevent_req_is_nterror(req
, &status
)) {
3458 tevent_req_received(req
);
3462 /* Steal possbile out parameters to the callers context */
3463 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3466 *result
= state
->orig
.out
.result
;
3468 tevent_req_received(req
);
3469 return NT_STATUS_OK
;
3472 NTSTATUS
rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct rpc_pipe_client
*cli
,
3473 TALLOC_CTX
*mem_ctx
,
3476 struct DRSUAPI_REPLICA_VERIFY_OBJECTS r
;
3481 status
= cli
->dispatch(cli
,
3484 NDR_DRSUAPI_REPLICA_VERIFY_OBJECTS
,
3487 if (!NT_STATUS_IS_OK(status
)) {
3491 if (NT_STATUS_IS_ERR(status
)) {
3495 /* Return variables */
3499 *werror
= r
.out
.result
;
3502 return werror_to_ntstatus(r
.out
.result
);
3505 struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
{
3506 struct DRSUAPI_GET_OBJECT_EXISTENCE orig
;
3507 struct DRSUAPI_GET_OBJECT_EXISTENCE tmp
;
3508 TALLOC_CTX
*out_mem_ctx
;
3509 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3512 static void rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_done(struct tevent_req
*subreq
);
3514 struct tevent_req
*rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_send(TALLOC_CTX
*mem_ctx
,
3515 struct tevent_context
*ev
,
3516 struct rpc_pipe_client
*cli
)
3518 struct tevent_req
*req
;
3519 struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
*state
;
3520 struct tevent_req
*subreq
;
3522 req
= tevent_req_create(mem_ctx
, &state
,
3523 struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
);
3527 state
->out_mem_ctx
= NULL
;
3528 state
->dispatch_recv
= cli
->dispatch_recv
;
3532 /* Out parameters */
3535 ZERO_STRUCT(state
->orig
.out
.result
);
3537 /* make a temporary copy, that we pass to the dispatch function */
3538 state
->tmp
= state
->orig
;
3540 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3542 NDR_DRSUAPI_GET_OBJECT_EXISTENCE
,
3544 if (tevent_req_nomem(subreq
, req
)) {
3545 return tevent_req_post(req
, ev
);
3547 tevent_req_set_callback(subreq
, rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_done
, req
);
3551 static void rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_done(struct tevent_req
*subreq
)
3553 struct tevent_req
*req
= tevent_req_callback_data(
3554 subreq
, struct tevent_req
);
3555 struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
*state
= tevent_req_data(
3556 req
, struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
);
3558 TALLOC_CTX
*mem_ctx
;
3560 if (state
->out_mem_ctx
) {
3561 mem_ctx
= state
->out_mem_ctx
;
3566 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3567 TALLOC_FREE(subreq
);
3568 if (!NT_STATUS_IS_OK(status
)) {
3569 tevent_req_nterror(req
, status
);
3573 /* Copy out parameters */
3576 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3578 /* Reset temporary structure */
3579 ZERO_STRUCT(state
->tmp
);
3581 tevent_req_done(req
);
3584 NTSTATUS
rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_recv(struct tevent_req
*req
,
3585 TALLOC_CTX
*mem_ctx
,
3588 struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
*state
= tevent_req_data(
3589 req
, struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
);
3592 if (tevent_req_is_nterror(req
, &status
)) {
3593 tevent_req_received(req
);
3597 /* Steal possbile out parameters to the callers context */
3598 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3601 *result
= state
->orig
.out
.result
;
3603 tevent_req_received(req
);
3604 return NT_STATUS_OK
;
3607 NTSTATUS
rpccli_DRSUAPI_GET_OBJECT_EXISTENCE(struct rpc_pipe_client
*cli
,
3608 TALLOC_CTX
*mem_ctx
,
3611 struct DRSUAPI_GET_OBJECT_EXISTENCE r
;
3616 status
= cli
->dispatch(cli
,
3619 NDR_DRSUAPI_GET_OBJECT_EXISTENCE
,
3622 if (!NT_STATUS_IS_OK(status
)) {
3626 if (NT_STATUS_IS_ERR(status
)) {
3630 /* Return variables */
3634 *werror
= r
.out
.result
;
3637 return werror_to_ntstatus(r
.out
.result
);
3640 struct rpccli_drsuapi_QuerySitesByCost_state
{
3641 struct drsuapi_QuerySitesByCost orig
;
3642 struct drsuapi_QuerySitesByCost tmp
;
3643 TALLOC_CTX
*out_mem_ctx
;
3644 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3647 static void rpccli_drsuapi_QuerySitesByCost_done(struct tevent_req
*subreq
);
3649 struct tevent_req
*rpccli_drsuapi_QuerySitesByCost_send(TALLOC_CTX
*mem_ctx
,
3650 struct tevent_context
*ev
,
3651 struct rpc_pipe_client
*cli
,
3652 struct policy_handle
*_bind_handle
/* [in] [ref] */,
3653 int32_t _level
/* [in] */,
3654 union drsuapi_QuerySitesByCostRequest
*_req
/* [in] [ref,switch_is(level)] */,
3655 int32_t *_level_out
/* [out] [ref] */,
3656 union drsuapi_QuerySitesByCostCtr
*_ctr
/* [out] [ref,switch_is(*level_out)] */)
3658 struct tevent_req
*req
;
3659 struct rpccli_drsuapi_QuerySitesByCost_state
*state
;
3660 struct tevent_req
*subreq
;
3662 req
= tevent_req_create(mem_ctx
, &state
,
3663 struct rpccli_drsuapi_QuerySitesByCost_state
);
3667 state
->out_mem_ctx
= NULL
;
3668 state
->dispatch_recv
= cli
->dispatch_recv
;
3671 state
->orig
.in
.bind_handle
= _bind_handle
;
3672 state
->orig
.in
.level
= _level
;
3673 state
->orig
.in
.req
= _req
;
3675 /* Out parameters */
3676 state
->orig
.out
.level_out
= _level_out
;
3677 state
->orig
.out
.ctr
= _ctr
;
3680 ZERO_STRUCT(state
->orig
.out
.result
);
3682 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3683 "rpccli_drsuapi_QuerySitesByCost_out_memory");
3684 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3685 return tevent_req_post(req
, ev
);
3688 /* make a temporary copy, that we pass to the dispatch function */
3689 state
->tmp
= state
->orig
;
3691 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3693 NDR_DRSUAPI_QUERYSITESBYCOST
,
3695 if (tevent_req_nomem(subreq
, req
)) {
3696 return tevent_req_post(req
, ev
);
3698 tevent_req_set_callback(subreq
, rpccli_drsuapi_QuerySitesByCost_done
, req
);
3702 static void rpccli_drsuapi_QuerySitesByCost_done(struct tevent_req
*subreq
)
3704 struct tevent_req
*req
= tevent_req_callback_data(
3705 subreq
, struct tevent_req
);
3706 struct rpccli_drsuapi_QuerySitesByCost_state
*state
= tevent_req_data(
3707 req
, struct rpccli_drsuapi_QuerySitesByCost_state
);
3709 TALLOC_CTX
*mem_ctx
;
3711 if (state
->out_mem_ctx
) {
3712 mem_ctx
= state
->out_mem_ctx
;
3717 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3718 TALLOC_FREE(subreq
);
3719 if (!NT_STATUS_IS_OK(status
)) {
3720 tevent_req_nterror(req
, status
);
3724 /* Copy out parameters */
3725 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
3726 *state
->orig
.out
.ctr
= *state
->tmp
.out
.ctr
;
3729 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3731 /* Reset temporary structure */
3732 ZERO_STRUCT(state
->tmp
);
3734 tevent_req_done(req
);
3737 NTSTATUS
rpccli_drsuapi_QuerySitesByCost_recv(struct tevent_req
*req
,
3738 TALLOC_CTX
*mem_ctx
,
3741 struct rpccli_drsuapi_QuerySitesByCost_state
*state
= tevent_req_data(
3742 req
, struct rpccli_drsuapi_QuerySitesByCost_state
);
3745 if (tevent_req_is_nterror(req
, &status
)) {
3746 tevent_req_received(req
);
3750 /* Steal possbile out parameters to the callers context */
3751 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3754 *result
= state
->orig
.out
.result
;
3756 tevent_req_received(req
);
3757 return NT_STATUS_OK
;
3760 NTSTATUS
rpccli_drsuapi_QuerySitesByCost(struct rpc_pipe_client
*cli
,
3761 TALLOC_CTX
*mem_ctx
,
3762 struct policy_handle
*bind_handle
/* [in] [ref] */,
3763 int32_t level
/* [in] */,
3764 union drsuapi_QuerySitesByCostRequest
*req
/* [in] [ref,switch_is(level)] */,
3765 int32_t *level_out
/* [out] [ref] */,
3766 union drsuapi_QuerySitesByCostCtr
*ctr
/* [out] [ref,switch_is(*level_out)] */,
3769 struct drsuapi_QuerySitesByCost r
;
3773 r
.in
.bind_handle
= bind_handle
;
3777 status
= cli
->dispatch(cli
,
3780 NDR_DRSUAPI_QUERYSITESBYCOST
,
3783 if (!NT_STATUS_IS_OK(status
)) {
3787 if (NT_STATUS_IS_ERR(status
)) {
3791 /* Return variables */
3792 *level_out
= *r
.out
.level_out
;
3797 *werror
= r
.out
.result
;
3800 return werror_to_ntstatus(r
.out
.result
);