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 if (DEBUGLEVEL
>= 10) {
49 NDR_PRINT_IN_DEBUG(drsuapi_DsBind
, &state
->orig
);
52 state
->out_mem_ctx
= talloc_named_const(state
, 0,
53 "rpccli_drsuapi_DsBind_out_memory");
54 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
55 return tevent_req_post(req
, ev
);
58 /* make a temporary copy, that we pass to the dispatch function */
59 state
->tmp
= state
->orig
;
61 subreq
= cli
->dispatch_send(state
, ev
, cli
,
65 if (tevent_req_nomem(subreq
, req
)) {
66 return tevent_req_post(req
, ev
);
68 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsBind_done
, req
);
72 static void rpccli_drsuapi_DsBind_done(struct tevent_req
*subreq
)
74 struct tevent_req
*req
= tevent_req_callback_data(
75 subreq
, struct tevent_req
);
76 struct rpccli_drsuapi_DsBind_state
*state
= tevent_req_data(
77 req
, struct rpccli_drsuapi_DsBind_state
);
81 if (state
->out_mem_ctx
) {
82 mem_ctx
= state
->out_mem_ctx
;
87 status
= state
->dispatch_recv(subreq
, mem_ctx
);
89 if (!NT_STATUS_IS_OK(status
)) {
90 tevent_req_nterror(req
, status
);
94 /* Copy out parameters */
95 if (state
->orig
.out
.bind_info
&& state
->tmp
.out
.bind_info
) {
96 *state
->orig
.out
.bind_info
= *state
->tmp
.out
.bind_info
;
98 *state
->orig
.out
.bind_handle
= *state
->tmp
.out
.bind_handle
;
101 state
->orig
.out
.result
= state
->tmp
.out
.result
;
103 /* Reset temporary structure */
104 ZERO_STRUCT(state
->tmp
);
106 if (DEBUGLEVEL
>= 10) {
107 NDR_PRINT_OUT_DEBUG(drsuapi_DsBind
, &state
->orig
);
110 tevent_req_done(req
);
113 NTSTATUS
rpccli_drsuapi_DsBind_recv(struct tevent_req
*req
,
117 struct rpccli_drsuapi_DsBind_state
*state
= tevent_req_data(
118 req
, struct rpccli_drsuapi_DsBind_state
);
121 if (tevent_req_is_nterror(req
, &status
)) {
122 tevent_req_received(req
);
126 /* Steal possbile out parameters to the callers context */
127 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
130 *result
= state
->orig
.out
.result
;
132 tevent_req_received(req
);
136 NTSTATUS
rpccli_drsuapi_DsBind(struct rpc_pipe_client
*cli
,
138 struct GUID
*bind_guid
/* [in] [unique] */,
139 struct drsuapi_DsBindInfoCtr
*bind_info
/* [in,out] [unique] */,
140 struct policy_handle
*bind_handle
/* [out] [ref] */,
143 struct drsuapi_DsBind r
;
147 r
.in
.bind_guid
= bind_guid
;
148 r
.in
.bind_info
= bind_info
;
150 if (DEBUGLEVEL
>= 10) {
151 NDR_PRINT_IN_DEBUG(drsuapi_DsBind
, &r
);
154 status
= cli
->dispatch(cli
,
160 if (!NT_STATUS_IS_OK(status
)) {
164 if (DEBUGLEVEL
>= 10) {
165 NDR_PRINT_OUT_DEBUG(drsuapi_DsBind
, &r
);
168 if (NT_STATUS_IS_ERR(status
)) {
172 /* Return variables */
173 if (bind_info
&& r
.out
.bind_info
) {
174 *bind_info
= *r
.out
.bind_info
;
176 *bind_handle
= *r
.out
.bind_handle
;
180 *werror
= r
.out
.result
;
183 return werror_to_ntstatus(r
.out
.result
);
186 struct rpccli_drsuapi_DsUnbind_state
{
187 struct drsuapi_DsUnbind orig
;
188 struct drsuapi_DsUnbind tmp
;
189 TALLOC_CTX
*out_mem_ctx
;
190 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
193 static void rpccli_drsuapi_DsUnbind_done(struct tevent_req
*subreq
);
195 struct tevent_req
*rpccli_drsuapi_DsUnbind_send(TALLOC_CTX
*mem_ctx
,
196 struct tevent_context
*ev
,
197 struct rpc_pipe_client
*cli
,
198 struct policy_handle
*_bind_handle
/* [in,out] [ref] */)
200 struct tevent_req
*req
;
201 struct rpccli_drsuapi_DsUnbind_state
*state
;
202 struct tevent_req
*subreq
;
204 req
= tevent_req_create(mem_ctx
, &state
,
205 struct rpccli_drsuapi_DsUnbind_state
);
209 state
->out_mem_ctx
= NULL
;
210 state
->dispatch_recv
= cli
->dispatch_recv
;
213 state
->orig
.in
.bind_handle
= _bind_handle
;
216 state
->orig
.out
.bind_handle
= _bind_handle
;
219 ZERO_STRUCT(state
->orig
.out
.result
);
221 if (DEBUGLEVEL
>= 10) {
222 NDR_PRINT_IN_DEBUG(drsuapi_DsUnbind
, &state
->orig
);
225 state
->out_mem_ctx
= talloc_named_const(state
, 0,
226 "rpccli_drsuapi_DsUnbind_out_memory");
227 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
228 return tevent_req_post(req
, ev
);
231 /* make a temporary copy, that we pass to the dispatch function */
232 state
->tmp
= state
->orig
;
234 subreq
= cli
->dispatch_send(state
, ev
, cli
,
236 NDR_DRSUAPI_DSUNBIND
,
238 if (tevent_req_nomem(subreq
, req
)) {
239 return tevent_req_post(req
, ev
);
241 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsUnbind_done
, req
);
245 static void rpccli_drsuapi_DsUnbind_done(struct tevent_req
*subreq
)
247 struct tevent_req
*req
= tevent_req_callback_data(
248 subreq
, struct tevent_req
);
249 struct rpccli_drsuapi_DsUnbind_state
*state
= tevent_req_data(
250 req
, struct rpccli_drsuapi_DsUnbind_state
);
254 if (state
->out_mem_ctx
) {
255 mem_ctx
= state
->out_mem_ctx
;
260 status
= state
->dispatch_recv(subreq
, mem_ctx
);
262 if (!NT_STATUS_IS_OK(status
)) {
263 tevent_req_nterror(req
, status
);
267 /* Copy out parameters */
268 *state
->orig
.out
.bind_handle
= *state
->tmp
.out
.bind_handle
;
271 state
->orig
.out
.result
= state
->tmp
.out
.result
;
273 /* Reset temporary structure */
274 ZERO_STRUCT(state
->tmp
);
276 if (DEBUGLEVEL
>= 10) {
277 NDR_PRINT_OUT_DEBUG(drsuapi_DsUnbind
, &state
->orig
);
280 tevent_req_done(req
);
283 NTSTATUS
rpccli_drsuapi_DsUnbind_recv(struct tevent_req
*req
,
287 struct rpccli_drsuapi_DsUnbind_state
*state
= tevent_req_data(
288 req
, struct rpccli_drsuapi_DsUnbind_state
);
291 if (tevent_req_is_nterror(req
, &status
)) {
292 tevent_req_received(req
);
296 /* Steal possbile out parameters to the callers context */
297 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
300 *result
= state
->orig
.out
.result
;
302 tevent_req_received(req
);
306 NTSTATUS
rpccli_drsuapi_DsUnbind(struct rpc_pipe_client
*cli
,
308 struct policy_handle
*bind_handle
/* [in,out] [ref] */,
311 struct drsuapi_DsUnbind r
;
315 r
.in
.bind_handle
= bind_handle
;
317 if (DEBUGLEVEL
>= 10) {
318 NDR_PRINT_IN_DEBUG(drsuapi_DsUnbind
, &r
);
321 status
= cli
->dispatch(cli
,
324 NDR_DRSUAPI_DSUNBIND
,
327 if (!NT_STATUS_IS_OK(status
)) {
331 if (DEBUGLEVEL
>= 10) {
332 NDR_PRINT_OUT_DEBUG(drsuapi_DsUnbind
, &r
);
335 if (NT_STATUS_IS_ERR(status
)) {
339 /* Return variables */
340 *bind_handle
= *r
.out
.bind_handle
;
344 *werror
= r
.out
.result
;
347 return werror_to_ntstatus(r
.out
.result
);
350 struct rpccli_drsuapi_DsReplicaSync_state
{
351 struct drsuapi_DsReplicaSync orig
;
352 struct drsuapi_DsReplicaSync tmp
;
353 TALLOC_CTX
*out_mem_ctx
;
354 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
357 static void rpccli_drsuapi_DsReplicaSync_done(struct tevent_req
*subreq
);
359 struct tevent_req
*rpccli_drsuapi_DsReplicaSync_send(TALLOC_CTX
*mem_ctx
,
360 struct tevent_context
*ev
,
361 struct rpc_pipe_client
*cli
,
362 struct policy_handle
*_bind_handle
/* [in] [ref] */,
363 int32_t _level
/* [in] */,
364 union drsuapi_DsReplicaSyncRequest _req
/* [in] [switch_is(level)] */)
366 struct tevent_req
*req
;
367 struct rpccli_drsuapi_DsReplicaSync_state
*state
;
368 struct tevent_req
*subreq
;
370 req
= tevent_req_create(mem_ctx
, &state
,
371 struct rpccli_drsuapi_DsReplicaSync_state
);
375 state
->out_mem_ctx
= NULL
;
376 state
->dispatch_recv
= cli
->dispatch_recv
;
379 state
->orig
.in
.bind_handle
= _bind_handle
;
380 state
->orig
.in
.level
= _level
;
381 state
->orig
.in
.req
= _req
;
386 ZERO_STRUCT(state
->orig
.out
.result
);
388 if (DEBUGLEVEL
>= 10) {
389 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaSync
, &state
->orig
);
392 /* make a temporary copy, that we pass to the dispatch function */
393 state
->tmp
= state
->orig
;
395 subreq
= cli
->dispatch_send(state
, ev
, cli
,
397 NDR_DRSUAPI_DSREPLICASYNC
,
399 if (tevent_req_nomem(subreq
, req
)) {
400 return tevent_req_post(req
, ev
);
402 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsReplicaSync_done
, req
);
406 static void rpccli_drsuapi_DsReplicaSync_done(struct tevent_req
*subreq
)
408 struct tevent_req
*req
= tevent_req_callback_data(
409 subreq
, struct tevent_req
);
410 struct rpccli_drsuapi_DsReplicaSync_state
*state
= tevent_req_data(
411 req
, struct rpccli_drsuapi_DsReplicaSync_state
);
415 if (state
->out_mem_ctx
) {
416 mem_ctx
= state
->out_mem_ctx
;
421 status
= state
->dispatch_recv(subreq
, mem_ctx
);
423 if (!NT_STATUS_IS_OK(status
)) {
424 tevent_req_nterror(req
, status
);
428 /* Copy out parameters */
431 state
->orig
.out
.result
= state
->tmp
.out
.result
;
433 /* Reset temporary structure */
434 ZERO_STRUCT(state
->tmp
);
436 if (DEBUGLEVEL
>= 10) {
437 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaSync
, &state
->orig
);
440 tevent_req_done(req
);
443 NTSTATUS
rpccli_drsuapi_DsReplicaSync_recv(struct tevent_req
*req
,
447 struct rpccli_drsuapi_DsReplicaSync_state
*state
= tevent_req_data(
448 req
, struct rpccli_drsuapi_DsReplicaSync_state
);
451 if (tevent_req_is_nterror(req
, &status
)) {
452 tevent_req_received(req
);
456 /* Steal possbile out parameters to the callers context */
457 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
460 *result
= state
->orig
.out
.result
;
462 tevent_req_received(req
);
466 NTSTATUS
rpccli_drsuapi_DsReplicaSync(struct rpc_pipe_client
*cli
,
468 struct policy_handle
*bind_handle
/* [in] [ref] */,
469 int32_t level
/* [in] */,
470 union drsuapi_DsReplicaSyncRequest req
/* [in] [switch_is(level)] */,
473 struct drsuapi_DsReplicaSync r
;
477 r
.in
.bind_handle
= bind_handle
;
481 if (DEBUGLEVEL
>= 10) {
482 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaSync
, &r
);
485 status
= cli
->dispatch(cli
,
488 NDR_DRSUAPI_DSREPLICASYNC
,
491 if (!NT_STATUS_IS_OK(status
)) {
495 if (DEBUGLEVEL
>= 10) {
496 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaSync
, &r
);
499 if (NT_STATUS_IS_ERR(status
)) {
503 /* Return variables */
507 *werror
= r
.out
.result
;
510 return werror_to_ntstatus(r
.out
.result
);
513 struct rpccli_drsuapi_DsGetNCChanges_state
{
514 struct drsuapi_DsGetNCChanges orig
;
515 struct drsuapi_DsGetNCChanges tmp
;
516 TALLOC_CTX
*out_mem_ctx
;
517 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
520 static void rpccli_drsuapi_DsGetNCChanges_done(struct tevent_req
*subreq
);
522 struct tevent_req
*rpccli_drsuapi_DsGetNCChanges_send(TALLOC_CTX
*mem_ctx
,
523 struct tevent_context
*ev
,
524 struct rpc_pipe_client
*cli
,
525 struct policy_handle
*_bind_handle
/* [in] [ref] */,
526 int32_t _level
/* [in] */,
527 union drsuapi_DsGetNCChangesRequest
*_req
/* [in] [ref,switch_is(level)] */,
528 int32_t *_level_out
/* [out] [ref] */,
529 union drsuapi_DsGetNCChangesCtr
*_ctr
/* [out] [ref,switch_is(*level_out)] */)
531 struct tevent_req
*req
;
532 struct rpccli_drsuapi_DsGetNCChanges_state
*state
;
533 struct tevent_req
*subreq
;
535 req
= tevent_req_create(mem_ctx
, &state
,
536 struct rpccli_drsuapi_DsGetNCChanges_state
);
540 state
->out_mem_ctx
= NULL
;
541 state
->dispatch_recv
= cli
->dispatch_recv
;
544 state
->orig
.in
.bind_handle
= _bind_handle
;
545 state
->orig
.in
.level
= _level
;
546 state
->orig
.in
.req
= _req
;
549 state
->orig
.out
.level_out
= _level_out
;
550 state
->orig
.out
.ctr
= _ctr
;
553 ZERO_STRUCT(state
->orig
.out
.result
);
555 if (DEBUGLEVEL
>= 10) {
556 NDR_PRINT_IN_DEBUG(drsuapi_DsGetNCChanges
, &state
->orig
);
559 state
->out_mem_ctx
= talloc_named_const(state
, 0,
560 "rpccli_drsuapi_DsGetNCChanges_out_memory");
561 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
562 return tevent_req_post(req
, ev
);
565 /* make a temporary copy, that we pass to the dispatch function */
566 state
->tmp
= state
->orig
;
568 subreq
= cli
->dispatch_send(state
, ev
, cli
,
570 NDR_DRSUAPI_DSGETNCCHANGES
,
572 if (tevent_req_nomem(subreq
, req
)) {
573 return tevent_req_post(req
, ev
);
575 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsGetNCChanges_done
, req
);
579 static void rpccli_drsuapi_DsGetNCChanges_done(struct tevent_req
*subreq
)
581 struct tevent_req
*req
= tevent_req_callback_data(
582 subreq
, struct tevent_req
);
583 struct rpccli_drsuapi_DsGetNCChanges_state
*state
= tevent_req_data(
584 req
, struct rpccli_drsuapi_DsGetNCChanges_state
);
588 if (state
->out_mem_ctx
) {
589 mem_ctx
= state
->out_mem_ctx
;
594 status
= state
->dispatch_recv(subreq
, mem_ctx
);
596 if (!NT_STATUS_IS_OK(status
)) {
597 tevent_req_nterror(req
, status
);
601 /* Copy out parameters */
602 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
603 *state
->orig
.out
.ctr
= *state
->tmp
.out
.ctr
;
606 state
->orig
.out
.result
= state
->tmp
.out
.result
;
608 /* Reset temporary structure */
609 ZERO_STRUCT(state
->tmp
);
611 if (DEBUGLEVEL
>= 10) {
612 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNCChanges
, &state
->orig
);
615 tevent_req_done(req
);
618 NTSTATUS
rpccli_drsuapi_DsGetNCChanges_recv(struct tevent_req
*req
,
622 struct rpccli_drsuapi_DsGetNCChanges_state
*state
= tevent_req_data(
623 req
, struct rpccli_drsuapi_DsGetNCChanges_state
);
626 if (tevent_req_is_nterror(req
, &status
)) {
627 tevent_req_received(req
);
631 /* Steal possbile out parameters to the callers context */
632 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
635 *result
= state
->orig
.out
.result
;
637 tevent_req_received(req
);
641 NTSTATUS
rpccli_drsuapi_DsGetNCChanges(struct rpc_pipe_client
*cli
,
643 struct policy_handle
*bind_handle
/* [in] [ref] */,
644 int32_t level
/* [in] */,
645 union drsuapi_DsGetNCChangesRequest
*req
/* [in] [ref,switch_is(level)] */,
646 int32_t *level_out
/* [out] [ref] */,
647 union drsuapi_DsGetNCChangesCtr
*ctr
/* [out] [ref,switch_is(*level_out)] */,
650 struct drsuapi_DsGetNCChanges r
;
654 r
.in
.bind_handle
= bind_handle
;
658 if (DEBUGLEVEL
>= 10) {
659 NDR_PRINT_IN_DEBUG(drsuapi_DsGetNCChanges
, &r
);
662 status
= cli
->dispatch(cli
,
665 NDR_DRSUAPI_DSGETNCCHANGES
,
668 if (!NT_STATUS_IS_OK(status
)) {
672 if (DEBUGLEVEL
>= 10) {
673 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNCChanges
, &r
);
676 if (NT_STATUS_IS_ERR(status
)) {
680 /* Return variables */
681 *level_out
= *r
.out
.level_out
;
686 *werror
= r
.out
.result
;
689 return werror_to_ntstatus(r
.out
.result
);
692 struct rpccli_drsuapi_DsReplicaUpdateRefs_state
{
693 struct drsuapi_DsReplicaUpdateRefs orig
;
694 struct drsuapi_DsReplicaUpdateRefs tmp
;
695 TALLOC_CTX
*out_mem_ctx
;
696 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
699 static void rpccli_drsuapi_DsReplicaUpdateRefs_done(struct tevent_req
*subreq
);
701 struct tevent_req
*rpccli_drsuapi_DsReplicaUpdateRefs_send(TALLOC_CTX
*mem_ctx
,
702 struct tevent_context
*ev
,
703 struct rpc_pipe_client
*cli
,
704 struct policy_handle
*_bind_handle
/* [in] [ref] */,
705 int32_t _level
/* [in] */,
706 union drsuapi_DsReplicaUpdateRefsRequest _req
/* [in] [switch_is(level)] */)
708 struct tevent_req
*req
;
709 struct rpccli_drsuapi_DsReplicaUpdateRefs_state
*state
;
710 struct tevent_req
*subreq
;
712 req
= tevent_req_create(mem_ctx
, &state
,
713 struct rpccli_drsuapi_DsReplicaUpdateRefs_state
);
717 state
->out_mem_ctx
= NULL
;
718 state
->dispatch_recv
= cli
->dispatch_recv
;
721 state
->orig
.in
.bind_handle
= _bind_handle
;
722 state
->orig
.in
.level
= _level
;
723 state
->orig
.in
.req
= _req
;
728 ZERO_STRUCT(state
->orig
.out
.result
);
730 if (DEBUGLEVEL
>= 10) {
731 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaUpdateRefs
, &state
->orig
);
734 /* make a temporary copy, that we pass to the dispatch function */
735 state
->tmp
= state
->orig
;
737 subreq
= cli
->dispatch_send(state
, ev
, cli
,
739 NDR_DRSUAPI_DSREPLICAUPDATEREFS
,
741 if (tevent_req_nomem(subreq
, req
)) {
742 return tevent_req_post(req
, ev
);
744 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsReplicaUpdateRefs_done
, req
);
748 static void rpccli_drsuapi_DsReplicaUpdateRefs_done(struct tevent_req
*subreq
)
750 struct tevent_req
*req
= tevent_req_callback_data(
751 subreq
, struct tevent_req
);
752 struct rpccli_drsuapi_DsReplicaUpdateRefs_state
*state
= tevent_req_data(
753 req
, struct rpccli_drsuapi_DsReplicaUpdateRefs_state
);
757 if (state
->out_mem_ctx
) {
758 mem_ctx
= state
->out_mem_ctx
;
763 status
= state
->dispatch_recv(subreq
, mem_ctx
);
765 if (!NT_STATUS_IS_OK(status
)) {
766 tevent_req_nterror(req
, status
);
770 /* Copy out parameters */
773 state
->orig
.out
.result
= state
->tmp
.out
.result
;
775 /* Reset temporary structure */
776 ZERO_STRUCT(state
->tmp
);
778 if (DEBUGLEVEL
>= 10) {
779 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaUpdateRefs
, &state
->orig
);
782 tevent_req_done(req
);
785 NTSTATUS
rpccli_drsuapi_DsReplicaUpdateRefs_recv(struct tevent_req
*req
,
789 struct rpccli_drsuapi_DsReplicaUpdateRefs_state
*state
= tevent_req_data(
790 req
, struct rpccli_drsuapi_DsReplicaUpdateRefs_state
);
793 if (tevent_req_is_nterror(req
, &status
)) {
794 tevent_req_received(req
);
798 /* Steal possbile out parameters to the callers context */
799 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
802 *result
= state
->orig
.out
.result
;
804 tevent_req_received(req
);
808 NTSTATUS
rpccli_drsuapi_DsReplicaUpdateRefs(struct rpc_pipe_client
*cli
,
810 struct policy_handle
*bind_handle
/* [in] [ref] */,
811 int32_t level
/* [in] */,
812 union drsuapi_DsReplicaUpdateRefsRequest req
/* [in] [switch_is(level)] */,
815 struct drsuapi_DsReplicaUpdateRefs r
;
819 r
.in
.bind_handle
= bind_handle
;
823 if (DEBUGLEVEL
>= 10) {
824 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaUpdateRefs
, &r
);
827 status
= cli
->dispatch(cli
,
830 NDR_DRSUAPI_DSREPLICAUPDATEREFS
,
833 if (!NT_STATUS_IS_OK(status
)) {
837 if (DEBUGLEVEL
>= 10) {
838 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaUpdateRefs
, &r
);
841 if (NT_STATUS_IS_ERR(status
)) {
845 /* Return variables */
849 *werror
= r
.out
.result
;
852 return werror_to_ntstatus(r
.out
.result
);
855 struct rpccli_drsuapi_DsReplicaAdd_state
{
856 struct drsuapi_DsReplicaAdd orig
;
857 struct drsuapi_DsReplicaAdd tmp
;
858 TALLOC_CTX
*out_mem_ctx
;
859 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
862 static void rpccli_drsuapi_DsReplicaAdd_done(struct tevent_req
*subreq
);
864 struct tevent_req
*rpccli_drsuapi_DsReplicaAdd_send(TALLOC_CTX
*mem_ctx
,
865 struct tevent_context
*ev
,
866 struct rpc_pipe_client
*cli
,
867 struct policy_handle
*_bind_handle
/* [in] [ref] */,
868 int32_t _level
/* [in] */,
869 union drsuapi_DsReplicaAddRequest _req
/* [in] [switch_is(level)] */)
871 struct tevent_req
*req
;
872 struct rpccli_drsuapi_DsReplicaAdd_state
*state
;
873 struct tevent_req
*subreq
;
875 req
= tevent_req_create(mem_ctx
, &state
,
876 struct rpccli_drsuapi_DsReplicaAdd_state
);
880 state
->out_mem_ctx
= NULL
;
881 state
->dispatch_recv
= cli
->dispatch_recv
;
884 state
->orig
.in
.bind_handle
= _bind_handle
;
885 state
->orig
.in
.level
= _level
;
886 state
->orig
.in
.req
= _req
;
891 ZERO_STRUCT(state
->orig
.out
.result
);
893 if (DEBUGLEVEL
>= 10) {
894 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaAdd
, &state
->orig
);
897 /* make a temporary copy, that we pass to the dispatch function */
898 state
->tmp
= state
->orig
;
900 subreq
= cli
->dispatch_send(state
, ev
, cli
,
902 NDR_DRSUAPI_DSREPLICAADD
,
904 if (tevent_req_nomem(subreq
, req
)) {
905 return tevent_req_post(req
, ev
);
907 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsReplicaAdd_done
, req
);
911 static void rpccli_drsuapi_DsReplicaAdd_done(struct tevent_req
*subreq
)
913 struct tevent_req
*req
= tevent_req_callback_data(
914 subreq
, struct tevent_req
);
915 struct rpccli_drsuapi_DsReplicaAdd_state
*state
= tevent_req_data(
916 req
, struct rpccli_drsuapi_DsReplicaAdd_state
);
920 if (state
->out_mem_ctx
) {
921 mem_ctx
= state
->out_mem_ctx
;
926 status
= state
->dispatch_recv(subreq
, mem_ctx
);
928 if (!NT_STATUS_IS_OK(status
)) {
929 tevent_req_nterror(req
, status
);
933 /* Copy out parameters */
936 state
->orig
.out
.result
= state
->tmp
.out
.result
;
938 /* Reset temporary structure */
939 ZERO_STRUCT(state
->tmp
);
941 if (DEBUGLEVEL
>= 10) {
942 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaAdd
, &state
->orig
);
945 tevent_req_done(req
);
948 NTSTATUS
rpccli_drsuapi_DsReplicaAdd_recv(struct tevent_req
*req
,
952 struct rpccli_drsuapi_DsReplicaAdd_state
*state
= tevent_req_data(
953 req
, struct rpccli_drsuapi_DsReplicaAdd_state
);
956 if (tevent_req_is_nterror(req
, &status
)) {
957 tevent_req_received(req
);
961 /* Steal possbile out parameters to the callers context */
962 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
965 *result
= state
->orig
.out
.result
;
967 tevent_req_received(req
);
971 NTSTATUS
rpccli_drsuapi_DsReplicaAdd(struct rpc_pipe_client
*cli
,
973 struct policy_handle
*bind_handle
/* [in] [ref] */,
974 int32_t level
/* [in] */,
975 union drsuapi_DsReplicaAddRequest req
/* [in] [switch_is(level)] */,
978 struct drsuapi_DsReplicaAdd r
;
982 r
.in
.bind_handle
= bind_handle
;
986 if (DEBUGLEVEL
>= 10) {
987 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaAdd
, &r
);
990 status
= cli
->dispatch(cli
,
993 NDR_DRSUAPI_DSREPLICAADD
,
996 if (!NT_STATUS_IS_OK(status
)) {
1000 if (DEBUGLEVEL
>= 10) {
1001 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaAdd
, &r
);
1004 if (NT_STATUS_IS_ERR(status
)) {
1008 /* Return variables */
1012 *werror
= r
.out
.result
;
1015 return werror_to_ntstatus(r
.out
.result
);
1018 struct rpccli_drsuapi_DsReplicaDel_state
{
1019 struct drsuapi_DsReplicaDel orig
;
1020 struct drsuapi_DsReplicaDel tmp
;
1021 TALLOC_CTX
*out_mem_ctx
;
1022 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1025 static void rpccli_drsuapi_DsReplicaDel_done(struct tevent_req
*subreq
);
1027 struct tevent_req
*rpccli_drsuapi_DsReplicaDel_send(TALLOC_CTX
*mem_ctx
,
1028 struct tevent_context
*ev
,
1029 struct rpc_pipe_client
*cli
,
1030 struct policy_handle
*_bind_handle
/* [in] [ref] */,
1031 int32_t _level
/* [in] */,
1032 union drsuapi_DsReplicaDelRequest _req
/* [in] [switch_is(level)] */)
1034 struct tevent_req
*req
;
1035 struct rpccli_drsuapi_DsReplicaDel_state
*state
;
1036 struct tevent_req
*subreq
;
1038 req
= tevent_req_create(mem_ctx
, &state
,
1039 struct rpccli_drsuapi_DsReplicaDel_state
);
1043 state
->out_mem_ctx
= NULL
;
1044 state
->dispatch_recv
= cli
->dispatch_recv
;
1047 state
->orig
.in
.bind_handle
= _bind_handle
;
1048 state
->orig
.in
.level
= _level
;
1049 state
->orig
.in
.req
= _req
;
1051 /* Out parameters */
1054 ZERO_STRUCT(state
->orig
.out
.result
);
1056 if (DEBUGLEVEL
>= 10) {
1057 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaDel
, &state
->orig
);
1060 /* make a temporary copy, that we pass to the dispatch function */
1061 state
->tmp
= state
->orig
;
1063 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1065 NDR_DRSUAPI_DSREPLICADEL
,
1067 if (tevent_req_nomem(subreq
, req
)) {
1068 return tevent_req_post(req
, ev
);
1070 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsReplicaDel_done
, req
);
1074 static void rpccli_drsuapi_DsReplicaDel_done(struct tevent_req
*subreq
)
1076 struct tevent_req
*req
= tevent_req_callback_data(
1077 subreq
, struct tevent_req
);
1078 struct rpccli_drsuapi_DsReplicaDel_state
*state
= tevent_req_data(
1079 req
, struct rpccli_drsuapi_DsReplicaDel_state
);
1081 TALLOC_CTX
*mem_ctx
;
1083 if (state
->out_mem_ctx
) {
1084 mem_ctx
= state
->out_mem_ctx
;
1089 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1090 TALLOC_FREE(subreq
);
1091 if (!NT_STATUS_IS_OK(status
)) {
1092 tevent_req_nterror(req
, status
);
1096 /* Copy out parameters */
1099 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1101 /* Reset temporary structure */
1102 ZERO_STRUCT(state
->tmp
);
1104 if (DEBUGLEVEL
>= 10) {
1105 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaDel
, &state
->orig
);
1108 tevent_req_done(req
);
1111 NTSTATUS
rpccli_drsuapi_DsReplicaDel_recv(struct tevent_req
*req
,
1112 TALLOC_CTX
*mem_ctx
,
1115 struct rpccli_drsuapi_DsReplicaDel_state
*state
= tevent_req_data(
1116 req
, struct rpccli_drsuapi_DsReplicaDel_state
);
1119 if (tevent_req_is_nterror(req
, &status
)) {
1120 tevent_req_received(req
);
1124 /* Steal possbile out parameters to the callers context */
1125 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1128 *result
= state
->orig
.out
.result
;
1130 tevent_req_received(req
);
1131 return NT_STATUS_OK
;
1134 NTSTATUS
rpccli_drsuapi_DsReplicaDel(struct rpc_pipe_client
*cli
,
1135 TALLOC_CTX
*mem_ctx
,
1136 struct policy_handle
*bind_handle
/* [in] [ref] */,
1137 int32_t level
/* [in] */,
1138 union drsuapi_DsReplicaDelRequest req
/* [in] [switch_is(level)] */,
1141 struct drsuapi_DsReplicaDel r
;
1145 r
.in
.bind_handle
= bind_handle
;
1149 if (DEBUGLEVEL
>= 10) {
1150 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaDel
, &r
);
1153 status
= cli
->dispatch(cli
,
1156 NDR_DRSUAPI_DSREPLICADEL
,
1159 if (!NT_STATUS_IS_OK(status
)) {
1163 if (DEBUGLEVEL
>= 10) {
1164 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaDel
, &r
);
1167 if (NT_STATUS_IS_ERR(status
)) {
1171 /* Return variables */
1175 *werror
= r
.out
.result
;
1178 return werror_to_ntstatus(r
.out
.result
);
1181 struct rpccli_drsuapi_DsReplicaMod_state
{
1182 struct drsuapi_DsReplicaMod orig
;
1183 struct drsuapi_DsReplicaMod tmp
;
1184 TALLOC_CTX
*out_mem_ctx
;
1185 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1188 static void rpccli_drsuapi_DsReplicaMod_done(struct tevent_req
*subreq
);
1190 struct tevent_req
*rpccli_drsuapi_DsReplicaMod_send(TALLOC_CTX
*mem_ctx
,
1191 struct tevent_context
*ev
,
1192 struct rpc_pipe_client
*cli
,
1193 struct policy_handle
*_bind_handle
/* [in] [ref] */,
1194 int32_t _level
/* [in] */,
1195 union drsuapi_DsReplicaModRequest _req
/* [in] [switch_is(level)] */)
1197 struct tevent_req
*req
;
1198 struct rpccli_drsuapi_DsReplicaMod_state
*state
;
1199 struct tevent_req
*subreq
;
1201 req
= tevent_req_create(mem_ctx
, &state
,
1202 struct rpccli_drsuapi_DsReplicaMod_state
);
1206 state
->out_mem_ctx
= NULL
;
1207 state
->dispatch_recv
= cli
->dispatch_recv
;
1210 state
->orig
.in
.bind_handle
= _bind_handle
;
1211 state
->orig
.in
.level
= _level
;
1212 state
->orig
.in
.req
= _req
;
1214 /* Out parameters */
1217 ZERO_STRUCT(state
->orig
.out
.result
);
1219 if (DEBUGLEVEL
>= 10) {
1220 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaMod
, &state
->orig
);
1223 /* make a temporary copy, that we pass to the dispatch function */
1224 state
->tmp
= state
->orig
;
1226 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1228 NDR_DRSUAPI_DSREPLICAMOD
,
1230 if (tevent_req_nomem(subreq
, req
)) {
1231 return tevent_req_post(req
, ev
);
1233 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsReplicaMod_done
, req
);
1237 static void rpccli_drsuapi_DsReplicaMod_done(struct tevent_req
*subreq
)
1239 struct tevent_req
*req
= tevent_req_callback_data(
1240 subreq
, struct tevent_req
);
1241 struct rpccli_drsuapi_DsReplicaMod_state
*state
= tevent_req_data(
1242 req
, struct rpccli_drsuapi_DsReplicaMod_state
);
1244 TALLOC_CTX
*mem_ctx
;
1246 if (state
->out_mem_ctx
) {
1247 mem_ctx
= state
->out_mem_ctx
;
1252 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1253 TALLOC_FREE(subreq
);
1254 if (!NT_STATUS_IS_OK(status
)) {
1255 tevent_req_nterror(req
, status
);
1259 /* Copy out parameters */
1262 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1264 /* Reset temporary structure */
1265 ZERO_STRUCT(state
->tmp
);
1267 if (DEBUGLEVEL
>= 10) {
1268 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaMod
, &state
->orig
);
1271 tevent_req_done(req
);
1274 NTSTATUS
rpccli_drsuapi_DsReplicaMod_recv(struct tevent_req
*req
,
1275 TALLOC_CTX
*mem_ctx
,
1278 struct rpccli_drsuapi_DsReplicaMod_state
*state
= tevent_req_data(
1279 req
, struct rpccli_drsuapi_DsReplicaMod_state
);
1282 if (tevent_req_is_nterror(req
, &status
)) {
1283 tevent_req_received(req
);
1287 /* Steal possbile out parameters to the callers context */
1288 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1291 *result
= state
->orig
.out
.result
;
1293 tevent_req_received(req
);
1294 return NT_STATUS_OK
;
1297 NTSTATUS
rpccli_drsuapi_DsReplicaMod(struct rpc_pipe_client
*cli
,
1298 TALLOC_CTX
*mem_ctx
,
1299 struct policy_handle
*bind_handle
/* [in] [ref] */,
1300 int32_t level
/* [in] */,
1301 union drsuapi_DsReplicaModRequest req
/* [in] [switch_is(level)] */,
1304 struct drsuapi_DsReplicaMod r
;
1308 r
.in
.bind_handle
= bind_handle
;
1312 if (DEBUGLEVEL
>= 10) {
1313 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaMod
, &r
);
1316 status
= cli
->dispatch(cli
,
1319 NDR_DRSUAPI_DSREPLICAMOD
,
1322 if (!NT_STATUS_IS_OK(status
)) {
1326 if (DEBUGLEVEL
>= 10) {
1327 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaMod
, &r
);
1330 if (NT_STATUS_IS_ERR(status
)) {
1334 /* Return variables */
1338 *werror
= r
.out
.result
;
1341 return werror_to_ntstatus(r
.out
.result
);
1344 struct rpccli_DRSUAPI_VERIFY_NAMES_state
{
1345 struct DRSUAPI_VERIFY_NAMES orig
;
1346 struct DRSUAPI_VERIFY_NAMES tmp
;
1347 TALLOC_CTX
*out_mem_ctx
;
1348 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1351 static void rpccli_DRSUAPI_VERIFY_NAMES_done(struct tevent_req
*subreq
);
1353 struct tevent_req
*rpccli_DRSUAPI_VERIFY_NAMES_send(TALLOC_CTX
*mem_ctx
,
1354 struct tevent_context
*ev
,
1355 struct rpc_pipe_client
*cli
)
1357 struct tevent_req
*req
;
1358 struct rpccli_DRSUAPI_VERIFY_NAMES_state
*state
;
1359 struct tevent_req
*subreq
;
1361 req
= tevent_req_create(mem_ctx
, &state
,
1362 struct rpccli_DRSUAPI_VERIFY_NAMES_state
);
1366 state
->out_mem_ctx
= NULL
;
1367 state
->dispatch_recv
= cli
->dispatch_recv
;
1371 /* Out parameters */
1374 ZERO_STRUCT(state
->orig
.out
.result
);
1376 if (DEBUGLEVEL
>= 10) {
1377 NDR_PRINT_IN_DEBUG(DRSUAPI_VERIFY_NAMES
, &state
->orig
);
1380 /* make a temporary copy, that we pass to the dispatch function */
1381 state
->tmp
= state
->orig
;
1383 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1385 NDR_DRSUAPI_VERIFY_NAMES
,
1387 if (tevent_req_nomem(subreq
, req
)) {
1388 return tevent_req_post(req
, ev
);
1390 tevent_req_set_callback(subreq
, rpccli_DRSUAPI_VERIFY_NAMES_done
, req
);
1394 static void rpccli_DRSUAPI_VERIFY_NAMES_done(struct tevent_req
*subreq
)
1396 struct tevent_req
*req
= tevent_req_callback_data(
1397 subreq
, struct tevent_req
);
1398 struct rpccli_DRSUAPI_VERIFY_NAMES_state
*state
= tevent_req_data(
1399 req
, struct rpccli_DRSUAPI_VERIFY_NAMES_state
);
1401 TALLOC_CTX
*mem_ctx
;
1403 if (state
->out_mem_ctx
) {
1404 mem_ctx
= state
->out_mem_ctx
;
1409 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1410 TALLOC_FREE(subreq
);
1411 if (!NT_STATUS_IS_OK(status
)) {
1412 tevent_req_nterror(req
, status
);
1416 /* Copy out parameters */
1419 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1421 /* Reset temporary structure */
1422 ZERO_STRUCT(state
->tmp
);
1424 if (DEBUGLEVEL
>= 10) {
1425 NDR_PRINT_OUT_DEBUG(DRSUAPI_VERIFY_NAMES
, &state
->orig
);
1428 tevent_req_done(req
);
1431 NTSTATUS
rpccli_DRSUAPI_VERIFY_NAMES_recv(struct tevent_req
*req
,
1432 TALLOC_CTX
*mem_ctx
,
1435 struct rpccli_DRSUAPI_VERIFY_NAMES_state
*state
= tevent_req_data(
1436 req
, struct rpccli_DRSUAPI_VERIFY_NAMES_state
);
1439 if (tevent_req_is_nterror(req
, &status
)) {
1440 tevent_req_received(req
);
1444 /* Steal possbile out parameters to the callers context */
1445 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1448 *result
= state
->orig
.out
.result
;
1450 tevent_req_received(req
);
1451 return NT_STATUS_OK
;
1454 NTSTATUS
rpccli_DRSUAPI_VERIFY_NAMES(struct rpc_pipe_client
*cli
,
1455 TALLOC_CTX
*mem_ctx
,
1458 struct DRSUAPI_VERIFY_NAMES r
;
1463 if (DEBUGLEVEL
>= 10) {
1464 NDR_PRINT_IN_DEBUG(DRSUAPI_VERIFY_NAMES
, &r
);
1467 status
= cli
->dispatch(cli
,
1470 NDR_DRSUAPI_VERIFY_NAMES
,
1473 if (!NT_STATUS_IS_OK(status
)) {
1477 if (DEBUGLEVEL
>= 10) {
1478 NDR_PRINT_OUT_DEBUG(DRSUAPI_VERIFY_NAMES
, &r
);
1481 if (NT_STATUS_IS_ERR(status
)) {
1485 /* Return variables */
1489 *werror
= r
.out
.result
;
1492 return werror_to_ntstatus(r
.out
.result
);
1495 struct rpccli_drsuapi_DsGetMemberships_state
{
1496 struct drsuapi_DsGetMemberships orig
;
1497 struct drsuapi_DsGetMemberships tmp
;
1498 TALLOC_CTX
*out_mem_ctx
;
1499 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1502 static void rpccli_drsuapi_DsGetMemberships_done(struct tevent_req
*subreq
);
1504 struct tevent_req
*rpccli_drsuapi_DsGetMemberships_send(TALLOC_CTX
*mem_ctx
,
1505 struct tevent_context
*ev
,
1506 struct rpc_pipe_client
*cli
,
1507 struct policy_handle
*_bind_handle
/* [in] [ref] */,
1508 int32_t _level
/* [in] */,
1509 union drsuapi_DsGetMembershipsRequest
*_req
/* [in] [ref,switch_is(level)] */,
1510 int32_t *_level_out
/* [out] [ref] */,
1511 union drsuapi_DsGetMembershipsCtr
*_ctr
/* [out] [ref,switch_is(*level_out)] */)
1513 struct tevent_req
*req
;
1514 struct rpccli_drsuapi_DsGetMemberships_state
*state
;
1515 struct tevent_req
*subreq
;
1517 req
= tevent_req_create(mem_ctx
, &state
,
1518 struct rpccli_drsuapi_DsGetMemberships_state
);
1522 state
->out_mem_ctx
= NULL
;
1523 state
->dispatch_recv
= cli
->dispatch_recv
;
1526 state
->orig
.in
.bind_handle
= _bind_handle
;
1527 state
->orig
.in
.level
= _level
;
1528 state
->orig
.in
.req
= _req
;
1530 /* Out parameters */
1531 state
->orig
.out
.level_out
= _level_out
;
1532 state
->orig
.out
.ctr
= _ctr
;
1535 ZERO_STRUCT(state
->orig
.out
.result
);
1537 if (DEBUGLEVEL
>= 10) {
1538 NDR_PRINT_IN_DEBUG(drsuapi_DsGetMemberships
, &state
->orig
);
1541 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1542 "rpccli_drsuapi_DsGetMemberships_out_memory");
1543 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1544 return tevent_req_post(req
, ev
);
1547 /* make a temporary copy, that we pass to the dispatch function */
1548 state
->tmp
= state
->orig
;
1550 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1552 NDR_DRSUAPI_DSGETMEMBERSHIPS
,
1554 if (tevent_req_nomem(subreq
, req
)) {
1555 return tevent_req_post(req
, ev
);
1557 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsGetMemberships_done
, req
);
1561 static void rpccli_drsuapi_DsGetMemberships_done(struct tevent_req
*subreq
)
1563 struct tevent_req
*req
= tevent_req_callback_data(
1564 subreq
, struct tevent_req
);
1565 struct rpccli_drsuapi_DsGetMemberships_state
*state
= tevent_req_data(
1566 req
, struct rpccli_drsuapi_DsGetMemberships_state
);
1568 TALLOC_CTX
*mem_ctx
;
1570 if (state
->out_mem_ctx
) {
1571 mem_ctx
= state
->out_mem_ctx
;
1576 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1577 TALLOC_FREE(subreq
);
1578 if (!NT_STATUS_IS_OK(status
)) {
1579 tevent_req_nterror(req
, status
);
1583 /* Copy out parameters */
1584 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
1585 *state
->orig
.out
.ctr
= *state
->tmp
.out
.ctr
;
1588 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1590 /* Reset temporary structure */
1591 ZERO_STRUCT(state
->tmp
);
1593 if (DEBUGLEVEL
>= 10) {
1594 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetMemberships
, &state
->orig
);
1597 tevent_req_done(req
);
1600 NTSTATUS
rpccli_drsuapi_DsGetMemberships_recv(struct tevent_req
*req
,
1601 TALLOC_CTX
*mem_ctx
,
1604 struct rpccli_drsuapi_DsGetMemberships_state
*state
= tevent_req_data(
1605 req
, struct rpccli_drsuapi_DsGetMemberships_state
);
1608 if (tevent_req_is_nterror(req
, &status
)) {
1609 tevent_req_received(req
);
1613 /* Steal possbile out parameters to the callers context */
1614 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1617 *result
= state
->orig
.out
.result
;
1619 tevent_req_received(req
);
1620 return NT_STATUS_OK
;
1623 NTSTATUS
rpccli_drsuapi_DsGetMemberships(struct rpc_pipe_client
*cli
,
1624 TALLOC_CTX
*mem_ctx
,
1625 struct policy_handle
*bind_handle
/* [in] [ref] */,
1626 int32_t level
/* [in] */,
1627 union drsuapi_DsGetMembershipsRequest
*req
/* [in] [ref,switch_is(level)] */,
1628 int32_t *level_out
/* [out] [ref] */,
1629 union drsuapi_DsGetMembershipsCtr
*ctr
/* [out] [ref,switch_is(*level_out)] */,
1632 struct drsuapi_DsGetMemberships r
;
1636 r
.in
.bind_handle
= bind_handle
;
1640 if (DEBUGLEVEL
>= 10) {
1641 NDR_PRINT_IN_DEBUG(drsuapi_DsGetMemberships
, &r
);
1644 status
= cli
->dispatch(cli
,
1647 NDR_DRSUAPI_DSGETMEMBERSHIPS
,
1650 if (!NT_STATUS_IS_OK(status
)) {
1654 if (DEBUGLEVEL
>= 10) {
1655 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetMemberships
, &r
);
1658 if (NT_STATUS_IS_ERR(status
)) {
1662 /* Return variables */
1663 *level_out
= *r
.out
.level_out
;
1668 *werror
= r
.out
.result
;
1671 return werror_to_ntstatus(r
.out
.result
);
1674 struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state
{
1675 struct DRSUAPI_INTER_DOMAIN_MOVE orig
;
1676 struct DRSUAPI_INTER_DOMAIN_MOVE tmp
;
1677 TALLOC_CTX
*out_mem_ctx
;
1678 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1681 static void rpccli_DRSUAPI_INTER_DOMAIN_MOVE_done(struct tevent_req
*subreq
);
1683 struct tevent_req
*rpccli_DRSUAPI_INTER_DOMAIN_MOVE_send(TALLOC_CTX
*mem_ctx
,
1684 struct tevent_context
*ev
,
1685 struct rpc_pipe_client
*cli
)
1687 struct tevent_req
*req
;
1688 struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state
*state
;
1689 struct tevent_req
*subreq
;
1691 req
= tevent_req_create(mem_ctx
, &state
,
1692 struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state
);
1696 state
->out_mem_ctx
= NULL
;
1697 state
->dispatch_recv
= cli
->dispatch_recv
;
1701 /* Out parameters */
1704 ZERO_STRUCT(state
->orig
.out
.result
);
1706 if (DEBUGLEVEL
>= 10) {
1707 NDR_PRINT_IN_DEBUG(DRSUAPI_INTER_DOMAIN_MOVE
, &state
->orig
);
1710 /* make a temporary copy, that we pass to the dispatch function */
1711 state
->tmp
= state
->orig
;
1713 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1715 NDR_DRSUAPI_INTER_DOMAIN_MOVE
,
1717 if (tevent_req_nomem(subreq
, req
)) {
1718 return tevent_req_post(req
, ev
);
1720 tevent_req_set_callback(subreq
, rpccli_DRSUAPI_INTER_DOMAIN_MOVE_done
, req
);
1724 static void rpccli_DRSUAPI_INTER_DOMAIN_MOVE_done(struct tevent_req
*subreq
)
1726 struct tevent_req
*req
= tevent_req_callback_data(
1727 subreq
, struct tevent_req
);
1728 struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state
*state
= tevent_req_data(
1729 req
, struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state
);
1731 TALLOC_CTX
*mem_ctx
;
1733 if (state
->out_mem_ctx
) {
1734 mem_ctx
= state
->out_mem_ctx
;
1739 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1740 TALLOC_FREE(subreq
);
1741 if (!NT_STATUS_IS_OK(status
)) {
1742 tevent_req_nterror(req
, status
);
1746 /* Copy out parameters */
1749 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1751 /* Reset temporary structure */
1752 ZERO_STRUCT(state
->tmp
);
1754 if (DEBUGLEVEL
>= 10) {
1755 NDR_PRINT_OUT_DEBUG(DRSUAPI_INTER_DOMAIN_MOVE
, &state
->orig
);
1758 tevent_req_done(req
);
1761 NTSTATUS
rpccli_DRSUAPI_INTER_DOMAIN_MOVE_recv(struct tevent_req
*req
,
1762 TALLOC_CTX
*mem_ctx
,
1765 struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state
*state
= tevent_req_data(
1766 req
, struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state
);
1769 if (tevent_req_is_nterror(req
, &status
)) {
1770 tevent_req_received(req
);
1774 /* Steal possbile out parameters to the callers context */
1775 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1778 *result
= state
->orig
.out
.result
;
1780 tevent_req_received(req
);
1781 return NT_STATUS_OK
;
1784 NTSTATUS
rpccli_DRSUAPI_INTER_DOMAIN_MOVE(struct rpc_pipe_client
*cli
,
1785 TALLOC_CTX
*mem_ctx
,
1788 struct DRSUAPI_INTER_DOMAIN_MOVE r
;
1793 if (DEBUGLEVEL
>= 10) {
1794 NDR_PRINT_IN_DEBUG(DRSUAPI_INTER_DOMAIN_MOVE
, &r
);
1797 status
= cli
->dispatch(cli
,
1800 NDR_DRSUAPI_INTER_DOMAIN_MOVE
,
1803 if (!NT_STATUS_IS_OK(status
)) {
1807 if (DEBUGLEVEL
>= 10) {
1808 NDR_PRINT_OUT_DEBUG(DRSUAPI_INTER_DOMAIN_MOVE
, &r
);
1811 if (NT_STATUS_IS_ERR(status
)) {
1815 /* Return variables */
1819 *werror
= r
.out
.result
;
1822 return werror_to_ntstatus(r
.out
.result
);
1825 struct rpccli_drsuapi_DsGetNT4ChangeLog_state
{
1826 struct drsuapi_DsGetNT4ChangeLog orig
;
1827 struct drsuapi_DsGetNT4ChangeLog tmp
;
1828 TALLOC_CTX
*out_mem_ctx
;
1829 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1832 static void rpccli_drsuapi_DsGetNT4ChangeLog_done(struct tevent_req
*subreq
);
1834 struct tevent_req
*rpccli_drsuapi_DsGetNT4ChangeLog_send(TALLOC_CTX
*mem_ctx
,
1835 struct tevent_context
*ev
,
1836 struct rpc_pipe_client
*cli
,
1837 struct policy_handle
*_bind_handle
/* [in] [ref] */,
1838 uint32_t _level
/* [in] */,
1839 union drsuapi_DsGetNT4ChangeLogRequest
*_req
/* [in] [ref,switch_is(level)] */,
1840 uint32_t *_level_out
/* [out] [ref] */,
1841 union drsuapi_DsGetNT4ChangeLogInfo
*_info
/* [out] [ref,switch_is(*level_out)] */)
1843 struct tevent_req
*req
;
1844 struct rpccli_drsuapi_DsGetNT4ChangeLog_state
*state
;
1845 struct tevent_req
*subreq
;
1847 req
= tevent_req_create(mem_ctx
, &state
,
1848 struct rpccli_drsuapi_DsGetNT4ChangeLog_state
);
1852 state
->out_mem_ctx
= NULL
;
1853 state
->dispatch_recv
= cli
->dispatch_recv
;
1856 state
->orig
.in
.bind_handle
= _bind_handle
;
1857 state
->orig
.in
.level
= _level
;
1858 state
->orig
.in
.req
= _req
;
1860 /* Out parameters */
1861 state
->orig
.out
.level_out
= _level_out
;
1862 state
->orig
.out
.info
= _info
;
1865 ZERO_STRUCT(state
->orig
.out
.result
);
1867 if (DEBUGLEVEL
>= 10) {
1868 NDR_PRINT_IN_DEBUG(drsuapi_DsGetNT4ChangeLog
, &state
->orig
);
1871 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1872 "rpccli_drsuapi_DsGetNT4ChangeLog_out_memory");
1873 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1874 return tevent_req_post(req
, ev
);
1877 /* make a temporary copy, that we pass to the dispatch function */
1878 state
->tmp
= state
->orig
;
1880 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1882 NDR_DRSUAPI_DSGETNT4CHANGELOG
,
1884 if (tevent_req_nomem(subreq
, req
)) {
1885 return tevent_req_post(req
, ev
);
1887 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsGetNT4ChangeLog_done
, req
);
1891 static void rpccli_drsuapi_DsGetNT4ChangeLog_done(struct tevent_req
*subreq
)
1893 struct tevent_req
*req
= tevent_req_callback_data(
1894 subreq
, struct tevent_req
);
1895 struct rpccli_drsuapi_DsGetNT4ChangeLog_state
*state
= tevent_req_data(
1896 req
, struct rpccli_drsuapi_DsGetNT4ChangeLog_state
);
1898 TALLOC_CTX
*mem_ctx
;
1900 if (state
->out_mem_ctx
) {
1901 mem_ctx
= state
->out_mem_ctx
;
1906 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1907 TALLOC_FREE(subreq
);
1908 if (!NT_STATUS_IS_OK(status
)) {
1909 tevent_req_nterror(req
, status
);
1913 /* Copy out parameters */
1914 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
1915 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
1918 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1920 /* Reset temporary structure */
1921 ZERO_STRUCT(state
->tmp
);
1923 if (DEBUGLEVEL
>= 10) {
1924 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNT4ChangeLog
, &state
->orig
);
1927 tevent_req_done(req
);
1930 NTSTATUS
rpccli_drsuapi_DsGetNT4ChangeLog_recv(struct tevent_req
*req
,
1931 TALLOC_CTX
*mem_ctx
,
1934 struct rpccli_drsuapi_DsGetNT4ChangeLog_state
*state
= tevent_req_data(
1935 req
, struct rpccli_drsuapi_DsGetNT4ChangeLog_state
);
1938 if (tevent_req_is_nterror(req
, &status
)) {
1939 tevent_req_received(req
);
1943 /* Steal possbile out parameters to the callers context */
1944 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1947 *result
= state
->orig
.out
.result
;
1949 tevent_req_received(req
);
1950 return NT_STATUS_OK
;
1953 NTSTATUS
rpccli_drsuapi_DsGetNT4ChangeLog(struct rpc_pipe_client
*cli
,
1954 TALLOC_CTX
*mem_ctx
,
1955 struct policy_handle
*bind_handle
/* [in] [ref] */,
1956 uint32_t level
/* [in] */,
1957 union drsuapi_DsGetNT4ChangeLogRequest
*req
/* [in] [ref,switch_is(level)] */,
1958 uint32_t *level_out
/* [out] [ref] */,
1959 union drsuapi_DsGetNT4ChangeLogInfo
*info
/* [out] [ref,switch_is(*level_out)] */,
1962 struct drsuapi_DsGetNT4ChangeLog r
;
1966 r
.in
.bind_handle
= bind_handle
;
1970 if (DEBUGLEVEL
>= 10) {
1971 NDR_PRINT_IN_DEBUG(drsuapi_DsGetNT4ChangeLog
, &r
);
1974 status
= cli
->dispatch(cli
,
1977 NDR_DRSUAPI_DSGETNT4CHANGELOG
,
1980 if (!NT_STATUS_IS_OK(status
)) {
1984 if (DEBUGLEVEL
>= 10) {
1985 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNT4ChangeLog
, &r
);
1988 if (NT_STATUS_IS_ERR(status
)) {
1992 /* Return variables */
1993 *level_out
= *r
.out
.level_out
;
1994 *info
= *r
.out
.info
;
1998 *werror
= r
.out
.result
;
2001 return werror_to_ntstatus(r
.out
.result
);
2004 struct rpccli_drsuapi_DsCrackNames_state
{
2005 struct drsuapi_DsCrackNames orig
;
2006 struct drsuapi_DsCrackNames tmp
;
2007 TALLOC_CTX
*out_mem_ctx
;
2008 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2011 static void rpccli_drsuapi_DsCrackNames_done(struct tevent_req
*subreq
);
2013 struct tevent_req
*rpccli_drsuapi_DsCrackNames_send(TALLOC_CTX
*mem_ctx
,
2014 struct tevent_context
*ev
,
2015 struct rpc_pipe_client
*cli
,
2016 struct policy_handle
*_bind_handle
/* [in] [ref] */,
2017 int32_t _level
/* [in] */,
2018 union drsuapi_DsNameRequest
*_req
/* [in] [ref,switch_is(level)] */,
2019 int32_t *_level_out
/* [out] [ref] */,
2020 union drsuapi_DsNameCtr
*_ctr
/* [out] [ref,switch_is(*level_out)] */)
2022 struct tevent_req
*req
;
2023 struct rpccli_drsuapi_DsCrackNames_state
*state
;
2024 struct tevent_req
*subreq
;
2026 req
= tevent_req_create(mem_ctx
, &state
,
2027 struct rpccli_drsuapi_DsCrackNames_state
);
2031 state
->out_mem_ctx
= NULL
;
2032 state
->dispatch_recv
= cli
->dispatch_recv
;
2035 state
->orig
.in
.bind_handle
= _bind_handle
;
2036 state
->orig
.in
.level
= _level
;
2037 state
->orig
.in
.req
= _req
;
2039 /* Out parameters */
2040 state
->orig
.out
.level_out
= _level_out
;
2041 state
->orig
.out
.ctr
= _ctr
;
2044 ZERO_STRUCT(state
->orig
.out
.result
);
2046 if (DEBUGLEVEL
>= 10) {
2047 NDR_PRINT_IN_DEBUG(drsuapi_DsCrackNames
, &state
->orig
);
2050 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2051 "rpccli_drsuapi_DsCrackNames_out_memory");
2052 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2053 return tevent_req_post(req
, ev
);
2056 /* make a temporary copy, that we pass to the dispatch function */
2057 state
->tmp
= state
->orig
;
2059 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2061 NDR_DRSUAPI_DSCRACKNAMES
,
2063 if (tevent_req_nomem(subreq
, req
)) {
2064 return tevent_req_post(req
, ev
);
2066 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsCrackNames_done
, req
);
2070 static void rpccli_drsuapi_DsCrackNames_done(struct tevent_req
*subreq
)
2072 struct tevent_req
*req
= tevent_req_callback_data(
2073 subreq
, struct tevent_req
);
2074 struct rpccli_drsuapi_DsCrackNames_state
*state
= tevent_req_data(
2075 req
, struct rpccli_drsuapi_DsCrackNames_state
);
2077 TALLOC_CTX
*mem_ctx
;
2079 if (state
->out_mem_ctx
) {
2080 mem_ctx
= state
->out_mem_ctx
;
2085 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2086 TALLOC_FREE(subreq
);
2087 if (!NT_STATUS_IS_OK(status
)) {
2088 tevent_req_nterror(req
, status
);
2092 /* Copy out parameters */
2093 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
2094 *state
->orig
.out
.ctr
= *state
->tmp
.out
.ctr
;
2097 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2099 /* Reset temporary structure */
2100 ZERO_STRUCT(state
->tmp
);
2102 if (DEBUGLEVEL
>= 10) {
2103 NDR_PRINT_OUT_DEBUG(drsuapi_DsCrackNames
, &state
->orig
);
2106 tevent_req_done(req
);
2109 NTSTATUS
rpccli_drsuapi_DsCrackNames_recv(struct tevent_req
*req
,
2110 TALLOC_CTX
*mem_ctx
,
2113 struct rpccli_drsuapi_DsCrackNames_state
*state
= tevent_req_data(
2114 req
, struct rpccli_drsuapi_DsCrackNames_state
);
2117 if (tevent_req_is_nterror(req
, &status
)) {
2118 tevent_req_received(req
);
2122 /* Steal possbile out parameters to the callers context */
2123 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2126 *result
= state
->orig
.out
.result
;
2128 tevent_req_received(req
);
2129 return NT_STATUS_OK
;
2132 NTSTATUS
rpccli_drsuapi_DsCrackNames(struct rpc_pipe_client
*cli
,
2133 TALLOC_CTX
*mem_ctx
,
2134 struct policy_handle
*bind_handle
/* [in] [ref] */,
2135 int32_t level
/* [in] */,
2136 union drsuapi_DsNameRequest
*req
/* [in] [ref,switch_is(level)] */,
2137 int32_t *level_out
/* [out] [ref] */,
2138 union drsuapi_DsNameCtr
*ctr
/* [out] [ref,switch_is(*level_out)] */,
2141 struct drsuapi_DsCrackNames r
;
2145 r
.in
.bind_handle
= bind_handle
;
2149 if (DEBUGLEVEL
>= 10) {
2150 NDR_PRINT_IN_DEBUG(drsuapi_DsCrackNames
, &r
);
2153 status
= cli
->dispatch(cli
,
2156 NDR_DRSUAPI_DSCRACKNAMES
,
2159 if (!NT_STATUS_IS_OK(status
)) {
2163 if (DEBUGLEVEL
>= 10) {
2164 NDR_PRINT_OUT_DEBUG(drsuapi_DsCrackNames
, &r
);
2167 if (NT_STATUS_IS_ERR(status
)) {
2171 /* Return variables */
2172 *level_out
= *r
.out
.level_out
;
2177 *werror
= r
.out
.result
;
2180 return werror_to_ntstatus(r
.out
.result
);
2183 struct rpccli_drsuapi_DsWriteAccountSpn_state
{
2184 struct drsuapi_DsWriteAccountSpn orig
;
2185 struct drsuapi_DsWriteAccountSpn tmp
;
2186 TALLOC_CTX
*out_mem_ctx
;
2187 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2190 static void rpccli_drsuapi_DsWriteAccountSpn_done(struct tevent_req
*subreq
);
2192 struct tevent_req
*rpccli_drsuapi_DsWriteAccountSpn_send(TALLOC_CTX
*mem_ctx
,
2193 struct tevent_context
*ev
,
2194 struct rpc_pipe_client
*cli
,
2195 struct policy_handle
*_bind_handle
/* [in] [ref] */,
2196 int32_t _level
/* [in] */,
2197 union drsuapi_DsWriteAccountSpnRequest
*_req
/* [in] [ref,switch_is(level)] */,
2198 int32_t *_level_out
/* [out] [ref] */,
2199 union drsuapi_DsWriteAccountSpnResult
*_res
/* [out] [ref,switch_is(*level_out)] */)
2201 struct tevent_req
*req
;
2202 struct rpccli_drsuapi_DsWriteAccountSpn_state
*state
;
2203 struct tevent_req
*subreq
;
2205 req
= tevent_req_create(mem_ctx
, &state
,
2206 struct rpccli_drsuapi_DsWriteAccountSpn_state
);
2210 state
->out_mem_ctx
= NULL
;
2211 state
->dispatch_recv
= cli
->dispatch_recv
;
2214 state
->orig
.in
.bind_handle
= _bind_handle
;
2215 state
->orig
.in
.level
= _level
;
2216 state
->orig
.in
.req
= _req
;
2218 /* Out parameters */
2219 state
->orig
.out
.level_out
= _level_out
;
2220 state
->orig
.out
.res
= _res
;
2223 ZERO_STRUCT(state
->orig
.out
.result
);
2225 if (DEBUGLEVEL
>= 10) {
2226 NDR_PRINT_IN_DEBUG(drsuapi_DsWriteAccountSpn
, &state
->orig
);
2229 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2230 "rpccli_drsuapi_DsWriteAccountSpn_out_memory");
2231 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2232 return tevent_req_post(req
, ev
);
2235 /* make a temporary copy, that we pass to the dispatch function */
2236 state
->tmp
= state
->orig
;
2238 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2240 NDR_DRSUAPI_DSWRITEACCOUNTSPN
,
2242 if (tevent_req_nomem(subreq
, req
)) {
2243 return tevent_req_post(req
, ev
);
2245 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsWriteAccountSpn_done
, req
);
2249 static void rpccli_drsuapi_DsWriteAccountSpn_done(struct tevent_req
*subreq
)
2251 struct tevent_req
*req
= tevent_req_callback_data(
2252 subreq
, struct tevent_req
);
2253 struct rpccli_drsuapi_DsWriteAccountSpn_state
*state
= tevent_req_data(
2254 req
, struct rpccli_drsuapi_DsWriteAccountSpn_state
);
2256 TALLOC_CTX
*mem_ctx
;
2258 if (state
->out_mem_ctx
) {
2259 mem_ctx
= state
->out_mem_ctx
;
2264 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2265 TALLOC_FREE(subreq
);
2266 if (!NT_STATUS_IS_OK(status
)) {
2267 tevent_req_nterror(req
, status
);
2271 /* Copy out parameters */
2272 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
2273 *state
->orig
.out
.res
= *state
->tmp
.out
.res
;
2276 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2278 /* Reset temporary structure */
2279 ZERO_STRUCT(state
->tmp
);
2281 if (DEBUGLEVEL
>= 10) {
2282 NDR_PRINT_OUT_DEBUG(drsuapi_DsWriteAccountSpn
, &state
->orig
);
2285 tevent_req_done(req
);
2288 NTSTATUS
rpccli_drsuapi_DsWriteAccountSpn_recv(struct tevent_req
*req
,
2289 TALLOC_CTX
*mem_ctx
,
2292 struct rpccli_drsuapi_DsWriteAccountSpn_state
*state
= tevent_req_data(
2293 req
, struct rpccli_drsuapi_DsWriteAccountSpn_state
);
2296 if (tevent_req_is_nterror(req
, &status
)) {
2297 tevent_req_received(req
);
2301 /* Steal possbile out parameters to the callers context */
2302 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2305 *result
= state
->orig
.out
.result
;
2307 tevent_req_received(req
);
2308 return NT_STATUS_OK
;
2311 NTSTATUS
rpccli_drsuapi_DsWriteAccountSpn(struct rpc_pipe_client
*cli
,
2312 TALLOC_CTX
*mem_ctx
,
2313 struct policy_handle
*bind_handle
/* [in] [ref] */,
2314 int32_t level
/* [in] */,
2315 union drsuapi_DsWriteAccountSpnRequest
*req
/* [in] [ref,switch_is(level)] */,
2316 int32_t *level_out
/* [out] [ref] */,
2317 union drsuapi_DsWriteAccountSpnResult
*res
/* [out] [ref,switch_is(*level_out)] */,
2320 struct drsuapi_DsWriteAccountSpn r
;
2324 r
.in
.bind_handle
= bind_handle
;
2328 if (DEBUGLEVEL
>= 10) {
2329 NDR_PRINT_IN_DEBUG(drsuapi_DsWriteAccountSpn
, &r
);
2332 status
= cli
->dispatch(cli
,
2335 NDR_DRSUAPI_DSWRITEACCOUNTSPN
,
2338 if (!NT_STATUS_IS_OK(status
)) {
2342 if (DEBUGLEVEL
>= 10) {
2343 NDR_PRINT_OUT_DEBUG(drsuapi_DsWriteAccountSpn
, &r
);
2346 if (NT_STATUS_IS_ERR(status
)) {
2350 /* Return variables */
2351 *level_out
= *r
.out
.level_out
;
2356 *werror
= r
.out
.result
;
2359 return werror_to_ntstatus(r
.out
.result
);
2362 struct rpccli_drsuapi_DsRemoveDSServer_state
{
2363 struct drsuapi_DsRemoveDSServer orig
;
2364 struct drsuapi_DsRemoveDSServer tmp
;
2365 TALLOC_CTX
*out_mem_ctx
;
2366 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2369 static void rpccli_drsuapi_DsRemoveDSServer_done(struct tevent_req
*subreq
);
2371 struct tevent_req
*rpccli_drsuapi_DsRemoveDSServer_send(TALLOC_CTX
*mem_ctx
,
2372 struct tevent_context
*ev
,
2373 struct rpc_pipe_client
*cli
,
2374 struct policy_handle
*_bind_handle
/* [in] [ref] */,
2375 int32_t _level
/* [in] */,
2376 union drsuapi_DsRemoveDSServerRequest
*_req
/* [in] [ref,switch_is(level)] */,
2377 int32_t *_level_out
/* [out] [ref] */,
2378 union drsuapi_DsRemoveDSServerResult
*_res
/* [out] [ref,switch_is(*level_out)] */)
2380 struct tevent_req
*req
;
2381 struct rpccli_drsuapi_DsRemoveDSServer_state
*state
;
2382 struct tevent_req
*subreq
;
2384 req
= tevent_req_create(mem_ctx
, &state
,
2385 struct rpccli_drsuapi_DsRemoveDSServer_state
);
2389 state
->out_mem_ctx
= NULL
;
2390 state
->dispatch_recv
= cli
->dispatch_recv
;
2393 state
->orig
.in
.bind_handle
= _bind_handle
;
2394 state
->orig
.in
.level
= _level
;
2395 state
->orig
.in
.req
= _req
;
2397 /* Out parameters */
2398 state
->orig
.out
.level_out
= _level_out
;
2399 state
->orig
.out
.res
= _res
;
2402 ZERO_STRUCT(state
->orig
.out
.result
);
2404 if (DEBUGLEVEL
>= 10) {
2405 NDR_PRINT_IN_DEBUG(drsuapi_DsRemoveDSServer
, &state
->orig
);
2408 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2409 "rpccli_drsuapi_DsRemoveDSServer_out_memory");
2410 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2411 return tevent_req_post(req
, ev
);
2414 /* make a temporary copy, that we pass to the dispatch function */
2415 state
->tmp
= state
->orig
;
2417 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2419 NDR_DRSUAPI_DSREMOVEDSSERVER
,
2421 if (tevent_req_nomem(subreq
, req
)) {
2422 return tevent_req_post(req
, ev
);
2424 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsRemoveDSServer_done
, req
);
2428 static void rpccli_drsuapi_DsRemoveDSServer_done(struct tevent_req
*subreq
)
2430 struct tevent_req
*req
= tevent_req_callback_data(
2431 subreq
, struct tevent_req
);
2432 struct rpccli_drsuapi_DsRemoveDSServer_state
*state
= tevent_req_data(
2433 req
, struct rpccli_drsuapi_DsRemoveDSServer_state
);
2435 TALLOC_CTX
*mem_ctx
;
2437 if (state
->out_mem_ctx
) {
2438 mem_ctx
= state
->out_mem_ctx
;
2443 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2444 TALLOC_FREE(subreq
);
2445 if (!NT_STATUS_IS_OK(status
)) {
2446 tevent_req_nterror(req
, status
);
2450 /* Copy out parameters */
2451 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
2452 *state
->orig
.out
.res
= *state
->tmp
.out
.res
;
2455 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2457 /* Reset temporary structure */
2458 ZERO_STRUCT(state
->tmp
);
2460 if (DEBUGLEVEL
>= 10) {
2461 NDR_PRINT_OUT_DEBUG(drsuapi_DsRemoveDSServer
, &state
->orig
);
2464 tevent_req_done(req
);
2467 NTSTATUS
rpccli_drsuapi_DsRemoveDSServer_recv(struct tevent_req
*req
,
2468 TALLOC_CTX
*mem_ctx
,
2471 struct rpccli_drsuapi_DsRemoveDSServer_state
*state
= tevent_req_data(
2472 req
, struct rpccli_drsuapi_DsRemoveDSServer_state
);
2475 if (tevent_req_is_nterror(req
, &status
)) {
2476 tevent_req_received(req
);
2480 /* Steal possbile out parameters to the callers context */
2481 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2484 *result
= state
->orig
.out
.result
;
2486 tevent_req_received(req
);
2487 return NT_STATUS_OK
;
2490 NTSTATUS
rpccli_drsuapi_DsRemoveDSServer(struct rpc_pipe_client
*cli
,
2491 TALLOC_CTX
*mem_ctx
,
2492 struct policy_handle
*bind_handle
/* [in] [ref] */,
2493 int32_t level
/* [in] */,
2494 union drsuapi_DsRemoveDSServerRequest
*req
/* [in] [ref,switch_is(level)] */,
2495 int32_t *level_out
/* [out] [ref] */,
2496 union drsuapi_DsRemoveDSServerResult
*res
/* [out] [ref,switch_is(*level_out)] */,
2499 struct drsuapi_DsRemoveDSServer r
;
2503 r
.in
.bind_handle
= bind_handle
;
2507 if (DEBUGLEVEL
>= 10) {
2508 NDR_PRINT_IN_DEBUG(drsuapi_DsRemoveDSServer
, &r
);
2511 status
= cli
->dispatch(cli
,
2514 NDR_DRSUAPI_DSREMOVEDSSERVER
,
2517 if (!NT_STATUS_IS_OK(status
)) {
2521 if (DEBUGLEVEL
>= 10) {
2522 NDR_PRINT_OUT_DEBUG(drsuapi_DsRemoveDSServer
, &r
);
2525 if (NT_STATUS_IS_ERR(status
)) {
2529 /* Return variables */
2530 *level_out
= *r
.out
.level_out
;
2535 *werror
= r
.out
.result
;
2538 return werror_to_ntstatus(r
.out
.result
);
2541 struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state
{
2542 struct DRSUAPI_REMOVE_DS_DOMAIN orig
;
2543 struct DRSUAPI_REMOVE_DS_DOMAIN tmp
;
2544 TALLOC_CTX
*out_mem_ctx
;
2545 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2548 static void rpccli_DRSUAPI_REMOVE_DS_DOMAIN_done(struct tevent_req
*subreq
);
2550 struct tevent_req
*rpccli_DRSUAPI_REMOVE_DS_DOMAIN_send(TALLOC_CTX
*mem_ctx
,
2551 struct tevent_context
*ev
,
2552 struct rpc_pipe_client
*cli
)
2554 struct tevent_req
*req
;
2555 struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state
*state
;
2556 struct tevent_req
*subreq
;
2558 req
= tevent_req_create(mem_ctx
, &state
,
2559 struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state
);
2563 state
->out_mem_ctx
= NULL
;
2564 state
->dispatch_recv
= cli
->dispatch_recv
;
2568 /* Out parameters */
2571 ZERO_STRUCT(state
->orig
.out
.result
);
2573 if (DEBUGLEVEL
>= 10) {
2574 NDR_PRINT_IN_DEBUG(DRSUAPI_REMOVE_DS_DOMAIN
, &state
->orig
);
2577 /* make a temporary copy, that we pass to the dispatch function */
2578 state
->tmp
= state
->orig
;
2580 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2582 NDR_DRSUAPI_REMOVE_DS_DOMAIN
,
2584 if (tevent_req_nomem(subreq
, req
)) {
2585 return tevent_req_post(req
, ev
);
2587 tevent_req_set_callback(subreq
, rpccli_DRSUAPI_REMOVE_DS_DOMAIN_done
, req
);
2591 static void rpccli_DRSUAPI_REMOVE_DS_DOMAIN_done(struct tevent_req
*subreq
)
2593 struct tevent_req
*req
= tevent_req_callback_data(
2594 subreq
, struct tevent_req
);
2595 struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state
*state
= tevent_req_data(
2596 req
, struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state
);
2598 TALLOC_CTX
*mem_ctx
;
2600 if (state
->out_mem_ctx
) {
2601 mem_ctx
= state
->out_mem_ctx
;
2606 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2607 TALLOC_FREE(subreq
);
2608 if (!NT_STATUS_IS_OK(status
)) {
2609 tevent_req_nterror(req
, status
);
2613 /* Copy out parameters */
2616 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2618 /* Reset temporary structure */
2619 ZERO_STRUCT(state
->tmp
);
2621 if (DEBUGLEVEL
>= 10) {
2622 NDR_PRINT_OUT_DEBUG(DRSUAPI_REMOVE_DS_DOMAIN
, &state
->orig
);
2625 tevent_req_done(req
);
2628 NTSTATUS
rpccli_DRSUAPI_REMOVE_DS_DOMAIN_recv(struct tevent_req
*req
,
2629 TALLOC_CTX
*mem_ctx
,
2632 struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state
*state
= tevent_req_data(
2633 req
, struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state
);
2636 if (tevent_req_is_nterror(req
, &status
)) {
2637 tevent_req_received(req
);
2641 /* Steal possbile out parameters to the callers context */
2642 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2645 *result
= state
->orig
.out
.result
;
2647 tevent_req_received(req
);
2648 return NT_STATUS_OK
;
2651 NTSTATUS
rpccli_DRSUAPI_REMOVE_DS_DOMAIN(struct rpc_pipe_client
*cli
,
2652 TALLOC_CTX
*mem_ctx
,
2655 struct DRSUAPI_REMOVE_DS_DOMAIN r
;
2660 if (DEBUGLEVEL
>= 10) {
2661 NDR_PRINT_IN_DEBUG(DRSUAPI_REMOVE_DS_DOMAIN
, &r
);
2664 status
= cli
->dispatch(cli
,
2667 NDR_DRSUAPI_REMOVE_DS_DOMAIN
,
2670 if (!NT_STATUS_IS_OK(status
)) {
2674 if (DEBUGLEVEL
>= 10) {
2675 NDR_PRINT_OUT_DEBUG(DRSUAPI_REMOVE_DS_DOMAIN
, &r
);
2678 if (NT_STATUS_IS_ERR(status
)) {
2682 /* Return variables */
2686 *werror
= r
.out
.result
;
2689 return werror_to_ntstatus(r
.out
.result
);
2692 struct rpccli_drsuapi_DsGetDomainControllerInfo_state
{
2693 struct drsuapi_DsGetDomainControllerInfo orig
;
2694 struct drsuapi_DsGetDomainControllerInfo tmp
;
2695 TALLOC_CTX
*out_mem_ctx
;
2696 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2699 static void rpccli_drsuapi_DsGetDomainControllerInfo_done(struct tevent_req
*subreq
);
2701 struct tevent_req
*rpccli_drsuapi_DsGetDomainControllerInfo_send(TALLOC_CTX
*mem_ctx
,
2702 struct tevent_context
*ev
,
2703 struct rpc_pipe_client
*cli
,
2704 struct policy_handle
*_bind_handle
/* [in] [ref] */,
2705 int32_t _level
/* [in] */,
2706 union drsuapi_DsGetDCInfoRequest
*_req
/* [in] [ref,switch_is(level)] */,
2707 int32_t *_level_out
/* [out] [ref] */,
2708 union drsuapi_DsGetDCInfoCtr
*_ctr
/* [out] [ref,switch_is(*level_out)] */)
2710 struct tevent_req
*req
;
2711 struct rpccli_drsuapi_DsGetDomainControllerInfo_state
*state
;
2712 struct tevent_req
*subreq
;
2714 req
= tevent_req_create(mem_ctx
, &state
,
2715 struct rpccli_drsuapi_DsGetDomainControllerInfo_state
);
2719 state
->out_mem_ctx
= NULL
;
2720 state
->dispatch_recv
= cli
->dispatch_recv
;
2723 state
->orig
.in
.bind_handle
= _bind_handle
;
2724 state
->orig
.in
.level
= _level
;
2725 state
->orig
.in
.req
= _req
;
2727 /* Out parameters */
2728 state
->orig
.out
.level_out
= _level_out
;
2729 state
->orig
.out
.ctr
= _ctr
;
2732 ZERO_STRUCT(state
->orig
.out
.result
);
2734 if (DEBUGLEVEL
>= 10) {
2735 NDR_PRINT_IN_DEBUG(drsuapi_DsGetDomainControllerInfo
, &state
->orig
);
2738 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2739 "rpccli_drsuapi_DsGetDomainControllerInfo_out_memory");
2740 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2741 return tevent_req_post(req
, ev
);
2744 /* make a temporary copy, that we pass to the dispatch function */
2745 state
->tmp
= state
->orig
;
2747 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2749 NDR_DRSUAPI_DSGETDOMAINCONTROLLERINFO
,
2751 if (tevent_req_nomem(subreq
, req
)) {
2752 return tevent_req_post(req
, ev
);
2754 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsGetDomainControllerInfo_done
, req
);
2758 static void rpccli_drsuapi_DsGetDomainControllerInfo_done(struct tevent_req
*subreq
)
2760 struct tevent_req
*req
= tevent_req_callback_data(
2761 subreq
, struct tevent_req
);
2762 struct rpccli_drsuapi_DsGetDomainControllerInfo_state
*state
= tevent_req_data(
2763 req
, struct rpccli_drsuapi_DsGetDomainControllerInfo_state
);
2765 TALLOC_CTX
*mem_ctx
;
2767 if (state
->out_mem_ctx
) {
2768 mem_ctx
= state
->out_mem_ctx
;
2773 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2774 TALLOC_FREE(subreq
);
2775 if (!NT_STATUS_IS_OK(status
)) {
2776 tevent_req_nterror(req
, status
);
2780 /* Copy out parameters */
2781 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
2782 *state
->orig
.out
.ctr
= *state
->tmp
.out
.ctr
;
2785 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2787 /* Reset temporary structure */
2788 ZERO_STRUCT(state
->tmp
);
2790 if (DEBUGLEVEL
>= 10) {
2791 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetDomainControllerInfo
, &state
->orig
);
2794 tevent_req_done(req
);
2797 NTSTATUS
rpccli_drsuapi_DsGetDomainControllerInfo_recv(struct tevent_req
*req
,
2798 TALLOC_CTX
*mem_ctx
,
2801 struct rpccli_drsuapi_DsGetDomainControllerInfo_state
*state
= tevent_req_data(
2802 req
, struct rpccli_drsuapi_DsGetDomainControllerInfo_state
);
2805 if (tevent_req_is_nterror(req
, &status
)) {
2806 tevent_req_received(req
);
2810 /* Steal possbile out parameters to the callers context */
2811 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2814 *result
= state
->orig
.out
.result
;
2816 tevent_req_received(req
);
2817 return NT_STATUS_OK
;
2820 NTSTATUS
rpccli_drsuapi_DsGetDomainControllerInfo(struct rpc_pipe_client
*cli
,
2821 TALLOC_CTX
*mem_ctx
,
2822 struct policy_handle
*bind_handle
/* [in] [ref] */,
2823 int32_t level
/* [in] */,
2824 union drsuapi_DsGetDCInfoRequest
*req
/* [in] [ref,switch_is(level)] */,
2825 int32_t *level_out
/* [out] [ref] */,
2826 union drsuapi_DsGetDCInfoCtr
*ctr
/* [out] [ref,switch_is(*level_out)] */,
2829 struct drsuapi_DsGetDomainControllerInfo r
;
2833 r
.in
.bind_handle
= bind_handle
;
2837 if (DEBUGLEVEL
>= 10) {
2838 NDR_PRINT_IN_DEBUG(drsuapi_DsGetDomainControllerInfo
, &r
);
2841 status
= cli
->dispatch(cli
,
2844 NDR_DRSUAPI_DSGETDOMAINCONTROLLERINFO
,
2847 if (!NT_STATUS_IS_OK(status
)) {
2851 if (DEBUGLEVEL
>= 10) {
2852 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetDomainControllerInfo
, &r
);
2855 if (NT_STATUS_IS_ERR(status
)) {
2859 /* Return variables */
2860 *level_out
= *r
.out
.level_out
;
2865 *werror
= r
.out
.result
;
2868 return werror_to_ntstatus(r
.out
.result
);
2871 struct rpccli_drsuapi_DsAddEntry_state
{
2872 struct drsuapi_DsAddEntry orig
;
2873 struct drsuapi_DsAddEntry tmp
;
2874 TALLOC_CTX
*out_mem_ctx
;
2875 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2878 static void rpccli_drsuapi_DsAddEntry_done(struct tevent_req
*subreq
);
2880 struct tevent_req
*rpccli_drsuapi_DsAddEntry_send(TALLOC_CTX
*mem_ctx
,
2881 struct tevent_context
*ev
,
2882 struct rpc_pipe_client
*cli
,
2883 struct policy_handle
*_bind_handle
/* [in] [ref] */,
2884 int32_t _level
/* [in] */,
2885 union drsuapi_DsAddEntryRequest
*_req
/* [in] [ref,switch_is(level)] */,
2886 int32_t *_level_out
/* [out] [ref] */,
2887 union drsuapi_DsAddEntryCtr
*_ctr
/* [out] [ref,switch_is(*level_out)] */)
2889 struct tevent_req
*req
;
2890 struct rpccli_drsuapi_DsAddEntry_state
*state
;
2891 struct tevent_req
*subreq
;
2893 req
= tevent_req_create(mem_ctx
, &state
,
2894 struct rpccli_drsuapi_DsAddEntry_state
);
2898 state
->out_mem_ctx
= NULL
;
2899 state
->dispatch_recv
= cli
->dispatch_recv
;
2902 state
->orig
.in
.bind_handle
= _bind_handle
;
2903 state
->orig
.in
.level
= _level
;
2904 state
->orig
.in
.req
= _req
;
2906 /* Out parameters */
2907 state
->orig
.out
.level_out
= _level_out
;
2908 state
->orig
.out
.ctr
= _ctr
;
2911 ZERO_STRUCT(state
->orig
.out
.result
);
2913 if (DEBUGLEVEL
>= 10) {
2914 NDR_PRINT_IN_DEBUG(drsuapi_DsAddEntry
, &state
->orig
);
2917 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2918 "rpccli_drsuapi_DsAddEntry_out_memory");
2919 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2920 return tevent_req_post(req
, ev
);
2923 /* make a temporary copy, that we pass to the dispatch function */
2924 state
->tmp
= state
->orig
;
2926 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2928 NDR_DRSUAPI_DSADDENTRY
,
2930 if (tevent_req_nomem(subreq
, req
)) {
2931 return tevent_req_post(req
, ev
);
2933 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsAddEntry_done
, req
);
2937 static void rpccli_drsuapi_DsAddEntry_done(struct tevent_req
*subreq
)
2939 struct tevent_req
*req
= tevent_req_callback_data(
2940 subreq
, struct tevent_req
);
2941 struct rpccli_drsuapi_DsAddEntry_state
*state
= tevent_req_data(
2942 req
, struct rpccli_drsuapi_DsAddEntry_state
);
2944 TALLOC_CTX
*mem_ctx
;
2946 if (state
->out_mem_ctx
) {
2947 mem_ctx
= state
->out_mem_ctx
;
2952 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2953 TALLOC_FREE(subreq
);
2954 if (!NT_STATUS_IS_OK(status
)) {
2955 tevent_req_nterror(req
, status
);
2959 /* Copy out parameters */
2960 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
2961 *state
->orig
.out
.ctr
= *state
->tmp
.out
.ctr
;
2964 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2966 /* Reset temporary structure */
2967 ZERO_STRUCT(state
->tmp
);
2969 if (DEBUGLEVEL
>= 10) {
2970 NDR_PRINT_OUT_DEBUG(drsuapi_DsAddEntry
, &state
->orig
);
2973 tevent_req_done(req
);
2976 NTSTATUS
rpccli_drsuapi_DsAddEntry_recv(struct tevent_req
*req
,
2977 TALLOC_CTX
*mem_ctx
,
2980 struct rpccli_drsuapi_DsAddEntry_state
*state
= tevent_req_data(
2981 req
, struct rpccli_drsuapi_DsAddEntry_state
);
2984 if (tevent_req_is_nterror(req
, &status
)) {
2985 tevent_req_received(req
);
2989 /* Steal possbile out parameters to the callers context */
2990 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2993 *result
= state
->orig
.out
.result
;
2995 tevent_req_received(req
);
2996 return NT_STATUS_OK
;
2999 NTSTATUS
rpccli_drsuapi_DsAddEntry(struct rpc_pipe_client
*cli
,
3000 TALLOC_CTX
*mem_ctx
,
3001 struct policy_handle
*bind_handle
/* [in] [ref] */,
3002 int32_t level
/* [in] */,
3003 union drsuapi_DsAddEntryRequest
*req
/* [in] [ref,switch_is(level)] */,
3004 int32_t *level_out
/* [out] [ref] */,
3005 union drsuapi_DsAddEntryCtr
*ctr
/* [out] [ref,switch_is(*level_out)] */,
3008 struct drsuapi_DsAddEntry r
;
3012 r
.in
.bind_handle
= bind_handle
;
3016 if (DEBUGLEVEL
>= 10) {
3017 NDR_PRINT_IN_DEBUG(drsuapi_DsAddEntry
, &r
);
3020 status
= cli
->dispatch(cli
,
3023 NDR_DRSUAPI_DSADDENTRY
,
3026 if (!NT_STATUS_IS_OK(status
)) {
3030 if (DEBUGLEVEL
>= 10) {
3031 NDR_PRINT_OUT_DEBUG(drsuapi_DsAddEntry
, &r
);
3034 if (NT_STATUS_IS_ERR(status
)) {
3038 /* Return variables */
3039 *level_out
= *r
.out
.level_out
;
3044 *werror
= r
.out
.result
;
3047 return werror_to_ntstatus(r
.out
.result
);
3050 struct rpccli_DRSUAPI_EXECUTE_KCC_state
{
3051 struct DRSUAPI_EXECUTE_KCC orig
;
3052 struct DRSUAPI_EXECUTE_KCC tmp
;
3053 TALLOC_CTX
*out_mem_ctx
;
3054 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3057 static void rpccli_DRSUAPI_EXECUTE_KCC_done(struct tevent_req
*subreq
);
3059 struct tevent_req
*rpccli_DRSUAPI_EXECUTE_KCC_send(TALLOC_CTX
*mem_ctx
,
3060 struct tevent_context
*ev
,
3061 struct rpc_pipe_client
*cli
)
3063 struct tevent_req
*req
;
3064 struct rpccli_DRSUAPI_EXECUTE_KCC_state
*state
;
3065 struct tevent_req
*subreq
;
3067 req
= tevent_req_create(mem_ctx
, &state
,
3068 struct rpccli_DRSUAPI_EXECUTE_KCC_state
);
3072 state
->out_mem_ctx
= NULL
;
3073 state
->dispatch_recv
= cli
->dispatch_recv
;
3077 /* Out parameters */
3080 ZERO_STRUCT(state
->orig
.out
.result
);
3082 if (DEBUGLEVEL
>= 10) {
3083 NDR_PRINT_IN_DEBUG(DRSUAPI_EXECUTE_KCC
, &state
->orig
);
3086 /* make a temporary copy, that we pass to the dispatch function */
3087 state
->tmp
= state
->orig
;
3089 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3091 NDR_DRSUAPI_EXECUTE_KCC
,
3093 if (tevent_req_nomem(subreq
, req
)) {
3094 return tevent_req_post(req
, ev
);
3096 tevent_req_set_callback(subreq
, rpccli_DRSUAPI_EXECUTE_KCC_done
, req
);
3100 static void rpccli_DRSUAPI_EXECUTE_KCC_done(struct tevent_req
*subreq
)
3102 struct tevent_req
*req
= tevent_req_callback_data(
3103 subreq
, struct tevent_req
);
3104 struct rpccli_DRSUAPI_EXECUTE_KCC_state
*state
= tevent_req_data(
3105 req
, struct rpccli_DRSUAPI_EXECUTE_KCC_state
);
3107 TALLOC_CTX
*mem_ctx
;
3109 if (state
->out_mem_ctx
) {
3110 mem_ctx
= state
->out_mem_ctx
;
3115 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3116 TALLOC_FREE(subreq
);
3117 if (!NT_STATUS_IS_OK(status
)) {
3118 tevent_req_nterror(req
, status
);
3122 /* Copy out parameters */
3125 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3127 /* Reset temporary structure */
3128 ZERO_STRUCT(state
->tmp
);
3130 if (DEBUGLEVEL
>= 10) {
3131 NDR_PRINT_OUT_DEBUG(DRSUAPI_EXECUTE_KCC
, &state
->orig
);
3134 tevent_req_done(req
);
3137 NTSTATUS
rpccli_DRSUAPI_EXECUTE_KCC_recv(struct tevent_req
*req
,
3138 TALLOC_CTX
*mem_ctx
,
3141 struct rpccli_DRSUAPI_EXECUTE_KCC_state
*state
= tevent_req_data(
3142 req
, struct rpccli_DRSUAPI_EXECUTE_KCC_state
);
3145 if (tevent_req_is_nterror(req
, &status
)) {
3146 tevent_req_received(req
);
3150 /* Steal possbile out parameters to the callers context */
3151 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3154 *result
= state
->orig
.out
.result
;
3156 tevent_req_received(req
);
3157 return NT_STATUS_OK
;
3160 NTSTATUS
rpccli_DRSUAPI_EXECUTE_KCC(struct rpc_pipe_client
*cli
,
3161 TALLOC_CTX
*mem_ctx
,
3164 struct DRSUAPI_EXECUTE_KCC r
;
3169 if (DEBUGLEVEL
>= 10) {
3170 NDR_PRINT_IN_DEBUG(DRSUAPI_EXECUTE_KCC
, &r
);
3173 status
= cli
->dispatch(cli
,
3176 NDR_DRSUAPI_EXECUTE_KCC
,
3179 if (!NT_STATUS_IS_OK(status
)) {
3183 if (DEBUGLEVEL
>= 10) {
3184 NDR_PRINT_OUT_DEBUG(DRSUAPI_EXECUTE_KCC
, &r
);
3187 if (NT_STATUS_IS_ERR(status
)) {
3191 /* Return variables */
3195 *werror
= r
.out
.result
;
3198 return werror_to_ntstatus(r
.out
.result
);
3201 struct rpccli_drsuapi_DsReplicaGetInfo_state
{
3202 struct drsuapi_DsReplicaGetInfo orig
;
3203 struct drsuapi_DsReplicaGetInfo tmp
;
3204 TALLOC_CTX
*out_mem_ctx
;
3205 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3208 static void rpccli_drsuapi_DsReplicaGetInfo_done(struct tevent_req
*subreq
);
3210 struct tevent_req
*rpccli_drsuapi_DsReplicaGetInfo_send(TALLOC_CTX
*mem_ctx
,
3211 struct tevent_context
*ev
,
3212 struct rpc_pipe_client
*cli
,
3213 struct policy_handle
*_bind_handle
/* [in] [ref] */,
3214 enum drsuapi_DsReplicaGetInfoLevel _level
/* [in] */,
3215 union drsuapi_DsReplicaGetInfoRequest
*_req
/* [in] [ref,switch_is(level)] */,
3216 enum drsuapi_DsReplicaInfoType
*_info_type
/* [out] [ref] */,
3217 union drsuapi_DsReplicaInfo
*_info
/* [out] [ref,switch_is(*info_type)] */)
3219 struct tevent_req
*req
;
3220 struct rpccli_drsuapi_DsReplicaGetInfo_state
*state
;
3221 struct tevent_req
*subreq
;
3223 req
= tevent_req_create(mem_ctx
, &state
,
3224 struct rpccli_drsuapi_DsReplicaGetInfo_state
);
3228 state
->out_mem_ctx
= NULL
;
3229 state
->dispatch_recv
= cli
->dispatch_recv
;
3232 state
->orig
.in
.bind_handle
= _bind_handle
;
3233 state
->orig
.in
.level
= _level
;
3234 state
->orig
.in
.req
= _req
;
3236 /* Out parameters */
3237 state
->orig
.out
.info_type
= _info_type
;
3238 state
->orig
.out
.info
= _info
;
3241 ZERO_STRUCT(state
->orig
.out
.result
);
3243 if (DEBUGLEVEL
>= 10) {
3244 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaGetInfo
, &state
->orig
);
3247 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3248 "rpccli_drsuapi_DsReplicaGetInfo_out_memory");
3249 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3250 return tevent_req_post(req
, ev
);
3253 /* make a temporary copy, that we pass to the dispatch function */
3254 state
->tmp
= state
->orig
;
3256 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3258 NDR_DRSUAPI_DSREPLICAGETINFO
,
3260 if (tevent_req_nomem(subreq
, req
)) {
3261 return tevent_req_post(req
, ev
);
3263 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsReplicaGetInfo_done
, req
);
3267 static void rpccli_drsuapi_DsReplicaGetInfo_done(struct tevent_req
*subreq
)
3269 struct tevent_req
*req
= tevent_req_callback_data(
3270 subreq
, struct tevent_req
);
3271 struct rpccli_drsuapi_DsReplicaGetInfo_state
*state
= tevent_req_data(
3272 req
, struct rpccli_drsuapi_DsReplicaGetInfo_state
);
3274 TALLOC_CTX
*mem_ctx
;
3276 if (state
->out_mem_ctx
) {
3277 mem_ctx
= state
->out_mem_ctx
;
3282 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3283 TALLOC_FREE(subreq
);
3284 if (!NT_STATUS_IS_OK(status
)) {
3285 tevent_req_nterror(req
, status
);
3289 /* Copy out parameters */
3290 *state
->orig
.out
.info_type
= *state
->tmp
.out
.info_type
;
3291 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
3294 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3296 /* Reset temporary structure */
3297 ZERO_STRUCT(state
->tmp
);
3299 if (DEBUGLEVEL
>= 10) {
3300 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaGetInfo
, &state
->orig
);
3303 tevent_req_done(req
);
3306 NTSTATUS
rpccli_drsuapi_DsReplicaGetInfo_recv(struct tevent_req
*req
,
3307 TALLOC_CTX
*mem_ctx
,
3310 struct rpccli_drsuapi_DsReplicaGetInfo_state
*state
= tevent_req_data(
3311 req
, struct rpccli_drsuapi_DsReplicaGetInfo_state
);
3314 if (tevent_req_is_nterror(req
, &status
)) {
3315 tevent_req_received(req
);
3319 /* Steal possbile out parameters to the callers context */
3320 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3323 *result
= state
->orig
.out
.result
;
3325 tevent_req_received(req
);
3326 return NT_STATUS_OK
;
3329 NTSTATUS
rpccli_drsuapi_DsReplicaGetInfo(struct rpc_pipe_client
*cli
,
3330 TALLOC_CTX
*mem_ctx
,
3331 struct policy_handle
*bind_handle
/* [in] [ref] */,
3332 enum drsuapi_DsReplicaGetInfoLevel level
/* [in] */,
3333 union drsuapi_DsReplicaGetInfoRequest
*req
/* [in] [ref,switch_is(level)] */,
3334 enum drsuapi_DsReplicaInfoType
*info_type
/* [out] [ref] */,
3335 union drsuapi_DsReplicaInfo
*info
/* [out] [ref,switch_is(*info_type)] */,
3338 struct drsuapi_DsReplicaGetInfo r
;
3342 r
.in
.bind_handle
= bind_handle
;
3346 if (DEBUGLEVEL
>= 10) {
3347 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaGetInfo
, &r
);
3350 status
= cli
->dispatch(cli
,
3353 NDR_DRSUAPI_DSREPLICAGETINFO
,
3356 if (!NT_STATUS_IS_OK(status
)) {
3360 if (DEBUGLEVEL
>= 10) {
3361 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaGetInfo
, &r
);
3364 if (NT_STATUS_IS_ERR(status
)) {
3368 /* Return variables */
3369 *info_type
= *r
.out
.info_type
;
3370 *info
= *r
.out
.info
;
3374 *werror
= r
.out
.result
;
3377 return werror_to_ntstatus(r
.out
.result
);
3380 struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
{
3381 struct DRSUAPI_ADD_SID_HISTORY orig
;
3382 struct DRSUAPI_ADD_SID_HISTORY tmp
;
3383 TALLOC_CTX
*out_mem_ctx
;
3384 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3387 static void rpccli_DRSUAPI_ADD_SID_HISTORY_done(struct tevent_req
*subreq
);
3389 struct tevent_req
*rpccli_DRSUAPI_ADD_SID_HISTORY_send(TALLOC_CTX
*mem_ctx
,
3390 struct tevent_context
*ev
,
3391 struct rpc_pipe_client
*cli
)
3393 struct tevent_req
*req
;
3394 struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
*state
;
3395 struct tevent_req
*subreq
;
3397 req
= tevent_req_create(mem_ctx
, &state
,
3398 struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
);
3402 state
->out_mem_ctx
= NULL
;
3403 state
->dispatch_recv
= cli
->dispatch_recv
;
3407 /* Out parameters */
3410 ZERO_STRUCT(state
->orig
.out
.result
);
3412 if (DEBUGLEVEL
>= 10) {
3413 NDR_PRINT_IN_DEBUG(DRSUAPI_ADD_SID_HISTORY
, &state
->orig
);
3416 /* make a temporary copy, that we pass to the dispatch function */
3417 state
->tmp
= state
->orig
;
3419 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3421 NDR_DRSUAPI_ADD_SID_HISTORY
,
3423 if (tevent_req_nomem(subreq
, req
)) {
3424 return tevent_req_post(req
, ev
);
3426 tevent_req_set_callback(subreq
, rpccli_DRSUAPI_ADD_SID_HISTORY_done
, req
);
3430 static void rpccli_DRSUAPI_ADD_SID_HISTORY_done(struct tevent_req
*subreq
)
3432 struct tevent_req
*req
= tevent_req_callback_data(
3433 subreq
, struct tevent_req
);
3434 struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
*state
= tevent_req_data(
3435 req
, struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
);
3437 TALLOC_CTX
*mem_ctx
;
3439 if (state
->out_mem_ctx
) {
3440 mem_ctx
= state
->out_mem_ctx
;
3445 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3446 TALLOC_FREE(subreq
);
3447 if (!NT_STATUS_IS_OK(status
)) {
3448 tevent_req_nterror(req
, status
);
3452 /* Copy out parameters */
3455 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3457 /* Reset temporary structure */
3458 ZERO_STRUCT(state
->tmp
);
3460 if (DEBUGLEVEL
>= 10) {
3461 NDR_PRINT_OUT_DEBUG(DRSUAPI_ADD_SID_HISTORY
, &state
->orig
);
3464 tevent_req_done(req
);
3467 NTSTATUS
rpccli_DRSUAPI_ADD_SID_HISTORY_recv(struct tevent_req
*req
,
3468 TALLOC_CTX
*mem_ctx
,
3471 struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
*state
= tevent_req_data(
3472 req
, struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
);
3475 if (tevent_req_is_nterror(req
, &status
)) {
3476 tevent_req_received(req
);
3480 /* Steal possbile out parameters to the callers context */
3481 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3484 *result
= state
->orig
.out
.result
;
3486 tevent_req_received(req
);
3487 return NT_STATUS_OK
;
3490 NTSTATUS
rpccli_DRSUAPI_ADD_SID_HISTORY(struct rpc_pipe_client
*cli
,
3491 TALLOC_CTX
*mem_ctx
,
3494 struct DRSUAPI_ADD_SID_HISTORY r
;
3499 if (DEBUGLEVEL
>= 10) {
3500 NDR_PRINT_IN_DEBUG(DRSUAPI_ADD_SID_HISTORY
, &r
);
3503 status
= cli
->dispatch(cli
,
3506 NDR_DRSUAPI_ADD_SID_HISTORY
,
3509 if (!NT_STATUS_IS_OK(status
)) {
3513 if (DEBUGLEVEL
>= 10) {
3514 NDR_PRINT_OUT_DEBUG(DRSUAPI_ADD_SID_HISTORY
, &r
);
3517 if (NT_STATUS_IS_ERR(status
)) {
3521 /* Return variables */
3525 *werror
= r
.out
.result
;
3528 return werror_to_ntstatus(r
.out
.result
);
3531 struct rpccli_drsuapi_DsGetMemberships2_state
{
3532 struct drsuapi_DsGetMemberships2 orig
;
3533 struct drsuapi_DsGetMemberships2 tmp
;
3534 TALLOC_CTX
*out_mem_ctx
;
3535 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3538 static void rpccli_drsuapi_DsGetMemberships2_done(struct tevent_req
*subreq
);
3540 struct tevent_req
*rpccli_drsuapi_DsGetMemberships2_send(TALLOC_CTX
*mem_ctx
,
3541 struct tevent_context
*ev
,
3542 struct rpc_pipe_client
*cli
,
3543 struct policy_handle
*_bind_handle
/* [in] [ref] */,
3544 int32_t _level
/* [in] */,
3545 union drsuapi_DsGetMemberships2Request
*_req
/* [in] [ref,switch_is(level)] */,
3546 int32_t *_level_out
/* [out] [ref] */,
3547 union drsuapi_DsGetMemberships2Ctr
*_ctr
/* [out] [ref,switch_is(*level_out)] */)
3549 struct tevent_req
*req
;
3550 struct rpccli_drsuapi_DsGetMemberships2_state
*state
;
3551 struct tevent_req
*subreq
;
3553 req
= tevent_req_create(mem_ctx
, &state
,
3554 struct rpccli_drsuapi_DsGetMemberships2_state
);
3558 state
->out_mem_ctx
= NULL
;
3559 state
->dispatch_recv
= cli
->dispatch_recv
;
3562 state
->orig
.in
.bind_handle
= _bind_handle
;
3563 state
->orig
.in
.level
= _level
;
3564 state
->orig
.in
.req
= _req
;
3566 /* Out parameters */
3567 state
->orig
.out
.level_out
= _level_out
;
3568 state
->orig
.out
.ctr
= _ctr
;
3571 ZERO_STRUCT(state
->orig
.out
.result
);
3573 if (DEBUGLEVEL
>= 10) {
3574 NDR_PRINT_IN_DEBUG(drsuapi_DsGetMemberships2
, &state
->orig
);
3577 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3578 "rpccli_drsuapi_DsGetMemberships2_out_memory");
3579 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3580 return tevent_req_post(req
, ev
);
3583 /* make a temporary copy, that we pass to the dispatch function */
3584 state
->tmp
= state
->orig
;
3586 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3588 NDR_DRSUAPI_DSGETMEMBERSHIPS2
,
3590 if (tevent_req_nomem(subreq
, req
)) {
3591 return tevent_req_post(req
, ev
);
3593 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsGetMemberships2_done
, req
);
3597 static void rpccli_drsuapi_DsGetMemberships2_done(struct tevent_req
*subreq
)
3599 struct tevent_req
*req
= tevent_req_callback_data(
3600 subreq
, struct tevent_req
);
3601 struct rpccli_drsuapi_DsGetMemberships2_state
*state
= tevent_req_data(
3602 req
, struct rpccli_drsuapi_DsGetMemberships2_state
);
3604 TALLOC_CTX
*mem_ctx
;
3606 if (state
->out_mem_ctx
) {
3607 mem_ctx
= state
->out_mem_ctx
;
3612 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3613 TALLOC_FREE(subreq
);
3614 if (!NT_STATUS_IS_OK(status
)) {
3615 tevent_req_nterror(req
, status
);
3619 /* Copy out parameters */
3620 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
3621 *state
->orig
.out
.ctr
= *state
->tmp
.out
.ctr
;
3624 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3626 /* Reset temporary structure */
3627 ZERO_STRUCT(state
->tmp
);
3629 if (DEBUGLEVEL
>= 10) {
3630 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetMemberships2
, &state
->orig
);
3633 tevent_req_done(req
);
3636 NTSTATUS
rpccli_drsuapi_DsGetMemberships2_recv(struct tevent_req
*req
,
3637 TALLOC_CTX
*mem_ctx
,
3640 struct rpccli_drsuapi_DsGetMemberships2_state
*state
= tevent_req_data(
3641 req
, struct rpccli_drsuapi_DsGetMemberships2_state
);
3644 if (tevent_req_is_nterror(req
, &status
)) {
3645 tevent_req_received(req
);
3649 /* Steal possbile out parameters to the callers context */
3650 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3653 *result
= state
->orig
.out
.result
;
3655 tevent_req_received(req
);
3656 return NT_STATUS_OK
;
3659 NTSTATUS
rpccli_drsuapi_DsGetMemberships2(struct rpc_pipe_client
*cli
,
3660 TALLOC_CTX
*mem_ctx
,
3661 struct policy_handle
*bind_handle
/* [in] [ref] */,
3662 int32_t level
/* [in] */,
3663 union drsuapi_DsGetMemberships2Request
*req
/* [in] [ref,switch_is(level)] */,
3664 int32_t *level_out
/* [out] [ref] */,
3665 union drsuapi_DsGetMemberships2Ctr
*ctr
/* [out] [ref,switch_is(*level_out)] */,
3668 struct drsuapi_DsGetMemberships2 r
;
3672 r
.in
.bind_handle
= bind_handle
;
3676 if (DEBUGLEVEL
>= 10) {
3677 NDR_PRINT_IN_DEBUG(drsuapi_DsGetMemberships2
, &r
);
3680 status
= cli
->dispatch(cli
,
3683 NDR_DRSUAPI_DSGETMEMBERSHIPS2
,
3686 if (!NT_STATUS_IS_OK(status
)) {
3690 if (DEBUGLEVEL
>= 10) {
3691 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetMemberships2
, &r
);
3694 if (NT_STATUS_IS_ERR(status
)) {
3698 /* Return variables */
3699 *level_out
= *r
.out
.level_out
;
3704 *werror
= r
.out
.result
;
3707 return werror_to_ntstatus(r
.out
.result
);
3710 struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
{
3711 struct DRSUAPI_REPLICA_VERIFY_OBJECTS orig
;
3712 struct DRSUAPI_REPLICA_VERIFY_OBJECTS tmp
;
3713 TALLOC_CTX
*out_mem_ctx
;
3714 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3717 static void rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_done(struct tevent_req
*subreq
);
3719 struct tevent_req
*rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_send(TALLOC_CTX
*mem_ctx
,
3720 struct tevent_context
*ev
,
3721 struct rpc_pipe_client
*cli
)
3723 struct tevent_req
*req
;
3724 struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
*state
;
3725 struct tevent_req
*subreq
;
3727 req
= tevent_req_create(mem_ctx
, &state
,
3728 struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
);
3732 state
->out_mem_ctx
= NULL
;
3733 state
->dispatch_recv
= cli
->dispatch_recv
;
3737 /* Out parameters */
3740 ZERO_STRUCT(state
->orig
.out
.result
);
3742 if (DEBUGLEVEL
>= 10) {
3743 NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_VERIFY_OBJECTS
, &state
->orig
);
3746 /* make a temporary copy, that we pass to the dispatch function */
3747 state
->tmp
= state
->orig
;
3749 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3751 NDR_DRSUAPI_REPLICA_VERIFY_OBJECTS
,
3753 if (tevent_req_nomem(subreq
, req
)) {
3754 return tevent_req_post(req
, ev
);
3756 tevent_req_set_callback(subreq
, rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_done
, req
);
3760 static void rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_done(struct tevent_req
*subreq
)
3762 struct tevent_req
*req
= tevent_req_callback_data(
3763 subreq
, struct tevent_req
);
3764 struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
*state
= tevent_req_data(
3765 req
, struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
);
3767 TALLOC_CTX
*mem_ctx
;
3769 if (state
->out_mem_ctx
) {
3770 mem_ctx
= state
->out_mem_ctx
;
3775 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3776 TALLOC_FREE(subreq
);
3777 if (!NT_STATUS_IS_OK(status
)) {
3778 tevent_req_nterror(req
, status
);
3782 /* Copy out parameters */
3785 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3787 /* Reset temporary structure */
3788 ZERO_STRUCT(state
->tmp
);
3790 if (DEBUGLEVEL
>= 10) {
3791 NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_VERIFY_OBJECTS
, &state
->orig
);
3794 tevent_req_done(req
);
3797 NTSTATUS
rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_recv(struct tevent_req
*req
,
3798 TALLOC_CTX
*mem_ctx
,
3801 struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
*state
= tevent_req_data(
3802 req
, struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
);
3805 if (tevent_req_is_nterror(req
, &status
)) {
3806 tevent_req_received(req
);
3810 /* Steal possbile out parameters to the callers context */
3811 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3814 *result
= state
->orig
.out
.result
;
3816 tevent_req_received(req
);
3817 return NT_STATUS_OK
;
3820 NTSTATUS
rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct rpc_pipe_client
*cli
,
3821 TALLOC_CTX
*mem_ctx
,
3824 struct DRSUAPI_REPLICA_VERIFY_OBJECTS r
;
3829 if (DEBUGLEVEL
>= 10) {
3830 NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_VERIFY_OBJECTS
, &r
);
3833 status
= cli
->dispatch(cli
,
3836 NDR_DRSUAPI_REPLICA_VERIFY_OBJECTS
,
3839 if (!NT_STATUS_IS_OK(status
)) {
3843 if (DEBUGLEVEL
>= 10) {
3844 NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_VERIFY_OBJECTS
, &r
);
3847 if (NT_STATUS_IS_ERR(status
)) {
3851 /* Return variables */
3855 *werror
= r
.out
.result
;
3858 return werror_to_ntstatus(r
.out
.result
);
3861 struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
{
3862 struct DRSUAPI_GET_OBJECT_EXISTENCE orig
;
3863 struct DRSUAPI_GET_OBJECT_EXISTENCE tmp
;
3864 TALLOC_CTX
*out_mem_ctx
;
3865 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3868 static void rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_done(struct tevent_req
*subreq
);
3870 struct tevent_req
*rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_send(TALLOC_CTX
*mem_ctx
,
3871 struct tevent_context
*ev
,
3872 struct rpc_pipe_client
*cli
)
3874 struct tevent_req
*req
;
3875 struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
*state
;
3876 struct tevent_req
*subreq
;
3878 req
= tevent_req_create(mem_ctx
, &state
,
3879 struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
);
3883 state
->out_mem_ctx
= NULL
;
3884 state
->dispatch_recv
= cli
->dispatch_recv
;
3888 /* Out parameters */
3891 ZERO_STRUCT(state
->orig
.out
.result
);
3893 if (DEBUGLEVEL
>= 10) {
3894 NDR_PRINT_IN_DEBUG(DRSUAPI_GET_OBJECT_EXISTENCE
, &state
->orig
);
3897 /* make a temporary copy, that we pass to the dispatch function */
3898 state
->tmp
= state
->orig
;
3900 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3902 NDR_DRSUAPI_GET_OBJECT_EXISTENCE
,
3904 if (tevent_req_nomem(subreq
, req
)) {
3905 return tevent_req_post(req
, ev
);
3907 tevent_req_set_callback(subreq
, rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_done
, req
);
3911 static void rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_done(struct tevent_req
*subreq
)
3913 struct tevent_req
*req
= tevent_req_callback_data(
3914 subreq
, struct tevent_req
);
3915 struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
*state
= tevent_req_data(
3916 req
, struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
);
3918 TALLOC_CTX
*mem_ctx
;
3920 if (state
->out_mem_ctx
) {
3921 mem_ctx
= state
->out_mem_ctx
;
3926 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3927 TALLOC_FREE(subreq
);
3928 if (!NT_STATUS_IS_OK(status
)) {
3929 tevent_req_nterror(req
, status
);
3933 /* Copy out parameters */
3936 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3938 /* Reset temporary structure */
3939 ZERO_STRUCT(state
->tmp
);
3941 if (DEBUGLEVEL
>= 10) {
3942 NDR_PRINT_OUT_DEBUG(DRSUAPI_GET_OBJECT_EXISTENCE
, &state
->orig
);
3945 tevent_req_done(req
);
3948 NTSTATUS
rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_recv(struct tevent_req
*req
,
3949 TALLOC_CTX
*mem_ctx
,
3952 struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
*state
= tevent_req_data(
3953 req
, struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
);
3956 if (tevent_req_is_nterror(req
, &status
)) {
3957 tevent_req_received(req
);
3961 /* Steal possbile out parameters to the callers context */
3962 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3965 *result
= state
->orig
.out
.result
;
3967 tevent_req_received(req
);
3968 return NT_STATUS_OK
;
3971 NTSTATUS
rpccli_DRSUAPI_GET_OBJECT_EXISTENCE(struct rpc_pipe_client
*cli
,
3972 TALLOC_CTX
*mem_ctx
,
3975 struct DRSUAPI_GET_OBJECT_EXISTENCE r
;
3980 if (DEBUGLEVEL
>= 10) {
3981 NDR_PRINT_IN_DEBUG(DRSUAPI_GET_OBJECT_EXISTENCE
, &r
);
3984 status
= cli
->dispatch(cli
,
3987 NDR_DRSUAPI_GET_OBJECT_EXISTENCE
,
3990 if (!NT_STATUS_IS_OK(status
)) {
3994 if (DEBUGLEVEL
>= 10) {
3995 NDR_PRINT_OUT_DEBUG(DRSUAPI_GET_OBJECT_EXISTENCE
, &r
);
3998 if (NT_STATUS_IS_ERR(status
)) {
4002 /* Return variables */
4006 *werror
= r
.out
.result
;
4009 return werror_to_ntstatus(r
.out
.result
);
4012 struct rpccli_drsuapi_QuerySitesByCost_state
{
4013 struct drsuapi_QuerySitesByCost orig
;
4014 struct drsuapi_QuerySitesByCost tmp
;
4015 TALLOC_CTX
*out_mem_ctx
;
4016 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4019 static void rpccli_drsuapi_QuerySitesByCost_done(struct tevent_req
*subreq
);
4021 struct tevent_req
*rpccli_drsuapi_QuerySitesByCost_send(TALLOC_CTX
*mem_ctx
,
4022 struct tevent_context
*ev
,
4023 struct rpc_pipe_client
*cli
,
4024 struct policy_handle
*_bind_handle
/* [in] [ref] */,
4025 int32_t _level
/* [in] */,
4026 union drsuapi_QuerySitesByCostRequest
*_req
/* [in] [ref,switch_is(level)] */,
4027 int32_t *_level_out
/* [out] [ref] */,
4028 union drsuapi_QuerySitesByCostCtr
*_ctr
/* [out] [ref,switch_is(*level_out)] */)
4030 struct tevent_req
*req
;
4031 struct rpccli_drsuapi_QuerySitesByCost_state
*state
;
4032 struct tevent_req
*subreq
;
4034 req
= tevent_req_create(mem_ctx
, &state
,
4035 struct rpccli_drsuapi_QuerySitesByCost_state
);
4039 state
->out_mem_ctx
= NULL
;
4040 state
->dispatch_recv
= cli
->dispatch_recv
;
4043 state
->orig
.in
.bind_handle
= _bind_handle
;
4044 state
->orig
.in
.level
= _level
;
4045 state
->orig
.in
.req
= _req
;
4047 /* Out parameters */
4048 state
->orig
.out
.level_out
= _level_out
;
4049 state
->orig
.out
.ctr
= _ctr
;
4052 ZERO_STRUCT(state
->orig
.out
.result
);
4054 if (DEBUGLEVEL
>= 10) {
4055 NDR_PRINT_IN_DEBUG(drsuapi_QuerySitesByCost
, &state
->orig
);
4058 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4059 "rpccli_drsuapi_QuerySitesByCost_out_memory");
4060 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4061 return tevent_req_post(req
, ev
);
4064 /* make a temporary copy, that we pass to the dispatch function */
4065 state
->tmp
= state
->orig
;
4067 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4069 NDR_DRSUAPI_QUERYSITESBYCOST
,
4071 if (tevent_req_nomem(subreq
, req
)) {
4072 return tevent_req_post(req
, ev
);
4074 tevent_req_set_callback(subreq
, rpccli_drsuapi_QuerySitesByCost_done
, req
);
4078 static void rpccli_drsuapi_QuerySitesByCost_done(struct tevent_req
*subreq
)
4080 struct tevent_req
*req
= tevent_req_callback_data(
4081 subreq
, struct tevent_req
);
4082 struct rpccli_drsuapi_QuerySitesByCost_state
*state
= tevent_req_data(
4083 req
, struct rpccli_drsuapi_QuerySitesByCost_state
);
4085 TALLOC_CTX
*mem_ctx
;
4087 if (state
->out_mem_ctx
) {
4088 mem_ctx
= state
->out_mem_ctx
;
4093 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4094 TALLOC_FREE(subreq
);
4095 if (!NT_STATUS_IS_OK(status
)) {
4096 tevent_req_nterror(req
, status
);
4100 /* Copy out parameters */
4101 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
4102 *state
->orig
.out
.ctr
= *state
->tmp
.out
.ctr
;
4105 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4107 /* Reset temporary structure */
4108 ZERO_STRUCT(state
->tmp
);
4110 if (DEBUGLEVEL
>= 10) {
4111 NDR_PRINT_OUT_DEBUG(drsuapi_QuerySitesByCost
, &state
->orig
);
4114 tevent_req_done(req
);
4117 NTSTATUS
rpccli_drsuapi_QuerySitesByCost_recv(struct tevent_req
*req
,
4118 TALLOC_CTX
*mem_ctx
,
4121 struct rpccli_drsuapi_QuerySitesByCost_state
*state
= tevent_req_data(
4122 req
, struct rpccli_drsuapi_QuerySitesByCost_state
);
4125 if (tevent_req_is_nterror(req
, &status
)) {
4126 tevent_req_received(req
);
4130 /* Steal possbile out parameters to the callers context */
4131 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4134 *result
= state
->orig
.out
.result
;
4136 tevent_req_received(req
);
4137 return NT_STATUS_OK
;
4140 NTSTATUS
rpccli_drsuapi_QuerySitesByCost(struct rpc_pipe_client
*cli
,
4141 TALLOC_CTX
*mem_ctx
,
4142 struct policy_handle
*bind_handle
/* [in] [ref] */,
4143 int32_t level
/* [in] */,
4144 union drsuapi_QuerySitesByCostRequest
*req
/* [in] [ref,switch_is(level)] */,
4145 int32_t *level_out
/* [out] [ref] */,
4146 union drsuapi_QuerySitesByCostCtr
*ctr
/* [out] [ref,switch_is(*level_out)] */,
4149 struct drsuapi_QuerySitesByCost r
;
4153 r
.in
.bind_handle
= bind_handle
;
4157 if (DEBUGLEVEL
>= 10) {
4158 NDR_PRINT_IN_DEBUG(drsuapi_QuerySitesByCost
, &r
);
4161 status
= cli
->dispatch(cli
,
4164 NDR_DRSUAPI_QUERYSITESBYCOST
,
4167 if (!NT_STATUS_IS_OK(status
)) {
4171 if (DEBUGLEVEL
>= 10) {
4172 NDR_PRINT_OUT_DEBUG(drsuapi_QuerySitesByCost
, &r
);
4175 if (NT_STATUS_IS_ERR(status
)) {
4179 /* Return variables */
4180 *level_out
= *r
.out
.level_out
;
4185 *werror
= r
.out
.result
;
4188 return werror_to_ntstatus(r
.out
.result
);