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_DsExecuteKCC_state
{
3051 struct drsuapi_DsExecuteKCC orig
;
3052 struct drsuapi_DsExecuteKCC tmp
;
3053 TALLOC_CTX
*out_mem_ctx
;
3054 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3057 static void rpccli_drsuapi_DsExecuteKCC_done(struct tevent_req
*subreq
);
3059 struct tevent_req
*rpccli_drsuapi_DsExecuteKCC_send(TALLOC_CTX
*mem_ctx
,
3060 struct tevent_context
*ev
,
3061 struct rpc_pipe_client
*cli
,
3062 struct policy_handle
*_bind_handle
/* [in] [ref] */,
3063 uint32_t _level
/* [in] */,
3064 union drsuapi_DsExecuteKCCRequest
*_req
/* [in] [ref,switch_is(level)] */)
3066 struct tevent_req
*req
;
3067 struct rpccli_drsuapi_DsExecuteKCC_state
*state
;
3068 struct tevent_req
*subreq
;
3070 req
= tevent_req_create(mem_ctx
, &state
,
3071 struct rpccli_drsuapi_DsExecuteKCC_state
);
3075 state
->out_mem_ctx
= NULL
;
3076 state
->dispatch_recv
= cli
->dispatch_recv
;
3079 state
->orig
.in
.bind_handle
= _bind_handle
;
3080 state
->orig
.in
.level
= _level
;
3081 state
->orig
.in
.req
= _req
;
3083 /* Out parameters */
3086 ZERO_STRUCT(state
->orig
.out
.result
);
3088 if (DEBUGLEVEL
>= 10) {
3089 NDR_PRINT_IN_DEBUG(drsuapi_DsExecuteKCC
, &state
->orig
);
3092 /* make a temporary copy, that we pass to the dispatch function */
3093 state
->tmp
= state
->orig
;
3095 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3097 NDR_DRSUAPI_DSEXECUTEKCC
,
3099 if (tevent_req_nomem(subreq
, req
)) {
3100 return tevent_req_post(req
, ev
);
3102 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsExecuteKCC_done
, req
);
3106 static void rpccli_drsuapi_DsExecuteKCC_done(struct tevent_req
*subreq
)
3108 struct tevent_req
*req
= tevent_req_callback_data(
3109 subreq
, struct tevent_req
);
3110 struct rpccli_drsuapi_DsExecuteKCC_state
*state
= tevent_req_data(
3111 req
, struct rpccli_drsuapi_DsExecuteKCC_state
);
3113 TALLOC_CTX
*mem_ctx
;
3115 if (state
->out_mem_ctx
) {
3116 mem_ctx
= state
->out_mem_ctx
;
3121 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3122 TALLOC_FREE(subreq
);
3123 if (!NT_STATUS_IS_OK(status
)) {
3124 tevent_req_nterror(req
, status
);
3128 /* Copy out parameters */
3131 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3133 /* Reset temporary structure */
3134 ZERO_STRUCT(state
->tmp
);
3136 if (DEBUGLEVEL
>= 10) {
3137 NDR_PRINT_OUT_DEBUG(drsuapi_DsExecuteKCC
, &state
->orig
);
3140 tevent_req_done(req
);
3143 NTSTATUS
rpccli_drsuapi_DsExecuteKCC_recv(struct tevent_req
*req
,
3144 TALLOC_CTX
*mem_ctx
,
3147 struct rpccli_drsuapi_DsExecuteKCC_state
*state
= tevent_req_data(
3148 req
, struct rpccli_drsuapi_DsExecuteKCC_state
);
3151 if (tevent_req_is_nterror(req
, &status
)) {
3152 tevent_req_received(req
);
3156 /* Steal possbile out parameters to the callers context */
3157 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3160 *result
= state
->orig
.out
.result
;
3162 tevent_req_received(req
);
3163 return NT_STATUS_OK
;
3166 NTSTATUS
rpccli_drsuapi_DsExecuteKCC(struct rpc_pipe_client
*cli
,
3167 TALLOC_CTX
*mem_ctx
,
3168 struct policy_handle
*bind_handle
/* [in] [ref] */,
3169 uint32_t level
/* [in] */,
3170 union drsuapi_DsExecuteKCCRequest
*req
/* [in] [ref,switch_is(level)] */,
3173 struct drsuapi_DsExecuteKCC r
;
3177 r
.in
.bind_handle
= bind_handle
;
3181 if (DEBUGLEVEL
>= 10) {
3182 NDR_PRINT_IN_DEBUG(drsuapi_DsExecuteKCC
, &r
);
3185 status
= cli
->dispatch(cli
,
3188 NDR_DRSUAPI_DSEXECUTEKCC
,
3191 if (!NT_STATUS_IS_OK(status
)) {
3195 if (DEBUGLEVEL
>= 10) {
3196 NDR_PRINT_OUT_DEBUG(drsuapi_DsExecuteKCC
, &r
);
3199 if (NT_STATUS_IS_ERR(status
)) {
3203 /* Return variables */
3207 *werror
= r
.out
.result
;
3210 return werror_to_ntstatus(r
.out
.result
);
3213 struct rpccli_drsuapi_DsReplicaGetInfo_state
{
3214 struct drsuapi_DsReplicaGetInfo orig
;
3215 struct drsuapi_DsReplicaGetInfo tmp
;
3216 TALLOC_CTX
*out_mem_ctx
;
3217 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3220 static void rpccli_drsuapi_DsReplicaGetInfo_done(struct tevent_req
*subreq
);
3222 struct tevent_req
*rpccli_drsuapi_DsReplicaGetInfo_send(TALLOC_CTX
*mem_ctx
,
3223 struct tevent_context
*ev
,
3224 struct rpc_pipe_client
*cli
,
3225 struct policy_handle
*_bind_handle
/* [in] [ref] */,
3226 enum drsuapi_DsReplicaGetInfoLevel _level
/* [in] */,
3227 union drsuapi_DsReplicaGetInfoRequest
*_req
/* [in] [ref,switch_is(level)] */,
3228 enum drsuapi_DsReplicaInfoType
*_info_type
/* [out] [ref] */,
3229 union drsuapi_DsReplicaInfo
*_info
/* [out] [ref,switch_is(*info_type)] */)
3231 struct tevent_req
*req
;
3232 struct rpccli_drsuapi_DsReplicaGetInfo_state
*state
;
3233 struct tevent_req
*subreq
;
3235 req
= tevent_req_create(mem_ctx
, &state
,
3236 struct rpccli_drsuapi_DsReplicaGetInfo_state
);
3240 state
->out_mem_ctx
= NULL
;
3241 state
->dispatch_recv
= cli
->dispatch_recv
;
3244 state
->orig
.in
.bind_handle
= _bind_handle
;
3245 state
->orig
.in
.level
= _level
;
3246 state
->orig
.in
.req
= _req
;
3248 /* Out parameters */
3249 state
->orig
.out
.info_type
= _info_type
;
3250 state
->orig
.out
.info
= _info
;
3253 ZERO_STRUCT(state
->orig
.out
.result
);
3255 if (DEBUGLEVEL
>= 10) {
3256 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaGetInfo
, &state
->orig
);
3259 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3260 "rpccli_drsuapi_DsReplicaGetInfo_out_memory");
3261 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3262 return tevent_req_post(req
, ev
);
3265 /* make a temporary copy, that we pass to the dispatch function */
3266 state
->tmp
= state
->orig
;
3268 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3270 NDR_DRSUAPI_DSREPLICAGETINFO
,
3272 if (tevent_req_nomem(subreq
, req
)) {
3273 return tevent_req_post(req
, ev
);
3275 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsReplicaGetInfo_done
, req
);
3279 static void rpccli_drsuapi_DsReplicaGetInfo_done(struct tevent_req
*subreq
)
3281 struct tevent_req
*req
= tevent_req_callback_data(
3282 subreq
, struct tevent_req
);
3283 struct rpccli_drsuapi_DsReplicaGetInfo_state
*state
= tevent_req_data(
3284 req
, struct rpccli_drsuapi_DsReplicaGetInfo_state
);
3286 TALLOC_CTX
*mem_ctx
;
3288 if (state
->out_mem_ctx
) {
3289 mem_ctx
= state
->out_mem_ctx
;
3294 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3295 TALLOC_FREE(subreq
);
3296 if (!NT_STATUS_IS_OK(status
)) {
3297 tevent_req_nterror(req
, status
);
3301 /* Copy out parameters */
3302 *state
->orig
.out
.info_type
= *state
->tmp
.out
.info_type
;
3303 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
3306 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3308 /* Reset temporary structure */
3309 ZERO_STRUCT(state
->tmp
);
3311 if (DEBUGLEVEL
>= 10) {
3312 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaGetInfo
, &state
->orig
);
3315 tevent_req_done(req
);
3318 NTSTATUS
rpccli_drsuapi_DsReplicaGetInfo_recv(struct tevent_req
*req
,
3319 TALLOC_CTX
*mem_ctx
,
3322 struct rpccli_drsuapi_DsReplicaGetInfo_state
*state
= tevent_req_data(
3323 req
, struct rpccli_drsuapi_DsReplicaGetInfo_state
);
3326 if (tevent_req_is_nterror(req
, &status
)) {
3327 tevent_req_received(req
);
3331 /* Steal possbile out parameters to the callers context */
3332 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3335 *result
= state
->orig
.out
.result
;
3337 tevent_req_received(req
);
3338 return NT_STATUS_OK
;
3341 NTSTATUS
rpccli_drsuapi_DsReplicaGetInfo(struct rpc_pipe_client
*cli
,
3342 TALLOC_CTX
*mem_ctx
,
3343 struct policy_handle
*bind_handle
/* [in] [ref] */,
3344 enum drsuapi_DsReplicaGetInfoLevel level
/* [in] */,
3345 union drsuapi_DsReplicaGetInfoRequest
*req
/* [in] [ref,switch_is(level)] */,
3346 enum drsuapi_DsReplicaInfoType
*info_type
/* [out] [ref] */,
3347 union drsuapi_DsReplicaInfo
*info
/* [out] [ref,switch_is(*info_type)] */,
3350 struct drsuapi_DsReplicaGetInfo r
;
3354 r
.in
.bind_handle
= bind_handle
;
3358 if (DEBUGLEVEL
>= 10) {
3359 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaGetInfo
, &r
);
3362 status
= cli
->dispatch(cli
,
3365 NDR_DRSUAPI_DSREPLICAGETINFO
,
3368 if (!NT_STATUS_IS_OK(status
)) {
3372 if (DEBUGLEVEL
>= 10) {
3373 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaGetInfo
, &r
);
3376 if (NT_STATUS_IS_ERR(status
)) {
3380 /* Return variables */
3381 *info_type
= *r
.out
.info_type
;
3382 *info
= *r
.out
.info
;
3386 *werror
= r
.out
.result
;
3389 return werror_to_ntstatus(r
.out
.result
);
3392 struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
{
3393 struct DRSUAPI_ADD_SID_HISTORY orig
;
3394 struct DRSUAPI_ADD_SID_HISTORY tmp
;
3395 TALLOC_CTX
*out_mem_ctx
;
3396 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3399 static void rpccli_DRSUAPI_ADD_SID_HISTORY_done(struct tevent_req
*subreq
);
3401 struct tevent_req
*rpccli_DRSUAPI_ADD_SID_HISTORY_send(TALLOC_CTX
*mem_ctx
,
3402 struct tevent_context
*ev
,
3403 struct rpc_pipe_client
*cli
)
3405 struct tevent_req
*req
;
3406 struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
*state
;
3407 struct tevent_req
*subreq
;
3409 req
= tevent_req_create(mem_ctx
, &state
,
3410 struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
);
3414 state
->out_mem_ctx
= NULL
;
3415 state
->dispatch_recv
= cli
->dispatch_recv
;
3419 /* Out parameters */
3422 ZERO_STRUCT(state
->orig
.out
.result
);
3424 if (DEBUGLEVEL
>= 10) {
3425 NDR_PRINT_IN_DEBUG(DRSUAPI_ADD_SID_HISTORY
, &state
->orig
);
3428 /* make a temporary copy, that we pass to the dispatch function */
3429 state
->tmp
= state
->orig
;
3431 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3433 NDR_DRSUAPI_ADD_SID_HISTORY
,
3435 if (tevent_req_nomem(subreq
, req
)) {
3436 return tevent_req_post(req
, ev
);
3438 tevent_req_set_callback(subreq
, rpccli_DRSUAPI_ADD_SID_HISTORY_done
, req
);
3442 static void rpccli_DRSUAPI_ADD_SID_HISTORY_done(struct tevent_req
*subreq
)
3444 struct tevent_req
*req
= tevent_req_callback_data(
3445 subreq
, struct tevent_req
);
3446 struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
*state
= tevent_req_data(
3447 req
, struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
);
3449 TALLOC_CTX
*mem_ctx
;
3451 if (state
->out_mem_ctx
) {
3452 mem_ctx
= state
->out_mem_ctx
;
3457 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3458 TALLOC_FREE(subreq
);
3459 if (!NT_STATUS_IS_OK(status
)) {
3460 tevent_req_nterror(req
, status
);
3464 /* Copy out parameters */
3467 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3469 /* Reset temporary structure */
3470 ZERO_STRUCT(state
->tmp
);
3472 if (DEBUGLEVEL
>= 10) {
3473 NDR_PRINT_OUT_DEBUG(DRSUAPI_ADD_SID_HISTORY
, &state
->orig
);
3476 tevent_req_done(req
);
3479 NTSTATUS
rpccli_DRSUAPI_ADD_SID_HISTORY_recv(struct tevent_req
*req
,
3480 TALLOC_CTX
*mem_ctx
,
3483 struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
*state
= tevent_req_data(
3484 req
, struct rpccli_DRSUAPI_ADD_SID_HISTORY_state
);
3487 if (tevent_req_is_nterror(req
, &status
)) {
3488 tevent_req_received(req
);
3492 /* Steal possbile out parameters to the callers context */
3493 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3496 *result
= state
->orig
.out
.result
;
3498 tevent_req_received(req
);
3499 return NT_STATUS_OK
;
3502 NTSTATUS
rpccli_DRSUAPI_ADD_SID_HISTORY(struct rpc_pipe_client
*cli
,
3503 TALLOC_CTX
*mem_ctx
,
3506 struct DRSUAPI_ADD_SID_HISTORY r
;
3511 if (DEBUGLEVEL
>= 10) {
3512 NDR_PRINT_IN_DEBUG(DRSUAPI_ADD_SID_HISTORY
, &r
);
3515 status
= cli
->dispatch(cli
,
3518 NDR_DRSUAPI_ADD_SID_HISTORY
,
3521 if (!NT_STATUS_IS_OK(status
)) {
3525 if (DEBUGLEVEL
>= 10) {
3526 NDR_PRINT_OUT_DEBUG(DRSUAPI_ADD_SID_HISTORY
, &r
);
3529 if (NT_STATUS_IS_ERR(status
)) {
3533 /* Return variables */
3537 *werror
= r
.out
.result
;
3540 return werror_to_ntstatus(r
.out
.result
);
3543 struct rpccli_drsuapi_DsGetMemberships2_state
{
3544 struct drsuapi_DsGetMemberships2 orig
;
3545 struct drsuapi_DsGetMemberships2 tmp
;
3546 TALLOC_CTX
*out_mem_ctx
;
3547 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3550 static void rpccli_drsuapi_DsGetMemberships2_done(struct tevent_req
*subreq
);
3552 struct tevent_req
*rpccli_drsuapi_DsGetMemberships2_send(TALLOC_CTX
*mem_ctx
,
3553 struct tevent_context
*ev
,
3554 struct rpc_pipe_client
*cli
,
3555 struct policy_handle
*_bind_handle
/* [in] [ref] */,
3556 int32_t _level
/* [in] */,
3557 union drsuapi_DsGetMemberships2Request
*_req
/* [in] [ref,switch_is(level)] */,
3558 int32_t *_level_out
/* [out] [ref] */,
3559 union drsuapi_DsGetMemberships2Ctr
*_ctr
/* [out] [ref,switch_is(*level_out)] */)
3561 struct tevent_req
*req
;
3562 struct rpccli_drsuapi_DsGetMemberships2_state
*state
;
3563 struct tevent_req
*subreq
;
3565 req
= tevent_req_create(mem_ctx
, &state
,
3566 struct rpccli_drsuapi_DsGetMemberships2_state
);
3570 state
->out_mem_ctx
= NULL
;
3571 state
->dispatch_recv
= cli
->dispatch_recv
;
3574 state
->orig
.in
.bind_handle
= _bind_handle
;
3575 state
->orig
.in
.level
= _level
;
3576 state
->orig
.in
.req
= _req
;
3578 /* Out parameters */
3579 state
->orig
.out
.level_out
= _level_out
;
3580 state
->orig
.out
.ctr
= _ctr
;
3583 ZERO_STRUCT(state
->orig
.out
.result
);
3585 if (DEBUGLEVEL
>= 10) {
3586 NDR_PRINT_IN_DEBUG(drsuapi_DsGetMemberships2
, &state
->orig
);
3589 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3590 "rpccli_drsuapi_DsGetMemberships2_out_memory");
3591 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3592 return tevent_req_post(req
, ev
);
3595 /* make a temporary copy, that we pass to the dispatch function */
3596 state
->tmp
= state
->orig
;
3598 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3600 NDR_DRSUAPI_DSGETMEMBERSHIPS2
,
3602 if (tevent_req_nomem(subreq
, req
)) {
3603 return tevent_req_post(req
, ev
);
3605 tevent_req_set_callback(subreq
, rpccli_drsuapi_DsGetMemberships2_done
, req
);
3609 static void rpccli_drsuapi_DsGetMemberships2_done(struct tevent_req
*subreq
)
3611 struct tevent_req
*req
= tevent_req_callback_data(
3612 subreq
, struct tevent_req
);
3613 struct rpccli_drsuapi_DsGetMemberships2_state
*state
= tevent_req_data(
3614 req
, struct rpccli_drsuapi_DsGetMemberships2_state
);
3616 TALLOC_CTX
*mem_ctx
;
3618 if (state
->out_mem_ctx
) {
3619 mem_ctx
= state
->out_mem_ctx
;
3624 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3625 TALLOC_FREE(subreq
);
3626 if (!NT_STATUS_IS_OK(status
)) {
3627 tevent_req_nterror(req
, status
);
3631 /* Copy out parameters */
3632 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
3633 *state
->orig
.out
.ctr
= *state
->tmp
.out
.ctr
;
3636 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3638 /* Reset temporary structure */
3639 ZERO_STRUCT(state
->tmp
);
3641 if (DEBUGLEVEL
>= 10) {
3642 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetMemberships2
, &state
->orig
);
3645 tevent_req_done(req
);
3648 NTSTATUS
rpccli_drsuapi_DsGetMemberships2_recv(struct tevent_req
*req
,
3649 TALLOC_CTX
*mem_ctx
,
3652 struct rpccli_drsuapi_DsGetMemberships2_state
*state
= tevent_req_data(
3653 req
, struct rpccli_drsuapi_DsGetMemberships2_state
);
3656 if (tevent_req_is_nterror(req
, &status
)) {
3657 tevent_req_received(req
);
3661 /* Steal possbile out parameters to the callers context */
3662 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3665 *result
= state
->orig
.out
.result
;
3667 tevent_req_received(req
);
3668 return NT_STATUS_OK
;
3671 NTSTATUS
rpccli_drsuapi_DsGetMemberships2(struct rpc_pipe_client
*cli
,
3672 TALLOC_CTX
*mem_ctx
,
3673 struct policy_handle
*bind_handle
/* [in] [ref] */,
3674 int32_t level
/* [in] */,
3675 union drsuapi_DsGetMemberships2Request
*req
/* [in] [ref,switch_is(level)] */,
3676 int32_t *level_out
/* [out] [ref] */,
3677 union drsuapi_DsGetMemberships2Ctr
*ctr
/* [out] [ref,switch_is(*level_out)] */,
3680 struct drsuapi_DsGetMemberships2 r
;
3684 r
.in
.bind_handle
= bind_handle
;
3688 if (DEBUGLEVEL
>= 10) {
3689 NDR_PRINT_IN_DEBUG(drsuapi_DsGetMemberships2
, &r
);
3692 status
= cli
->dispatch(cli
,
3695 NDR_DRSUAPI_DSGETMEMBERSHIPS2
,
3698 if (!NT_STATUS_IS_OK(status
)) {
3702 if (DEBUGLEVEL
>= 10) {
3703 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetMemberships2
, &r
);
3706 if (NT_STATUS_IS_ERR(status
)) {
3710 /* Return variables */
3711 *level_out
= *r
.out
.level_out
;
3716 *werror
= r
.out
.result
;
3719 return werror_to_ntstatus(r
.out
.result
);
3722 struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
{
3723 struct DRSUAPI_REPLICA_VERIFY_OBJECTS orig
;
3724 struct DRSUAPI_REPLICA_VERIFY_OBJECTS tmp
;
3725 TALLOC_CTX
*out_mem_ctx
;
3726 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3729 static void rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_done(struct tevent_req
*subreq
);
3731 struct tevent_req
*rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_send(TALLOC_CTX
*mem_ctx
,
3732 struct tevent_context
*ev
,
3733 struct rpc_pipe_client
*cli
)
3735 struct tevent_req
*req
;
3736 struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
*state
;
3737 struct tevent_req
*subreq
;
3739 req
= tevent_req_create(mem_ctx
, &state
,
3740 struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
);
3744 state
->out_mem_ctx
= NULL
;
3745 state
->dispatch_recv
= cli
->dispatch_recv
;
3749 /* Out parameters */
3752 ZERO_STRUCT(state
->orig
.out
.result
);
3754 if (DEBUGLEVEL
>= 10) {
3755 NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_VERIFY_OBJECTS
, &state
->orig
);
3758 /* make a temporary copy, that we pass to the dispatch function */
3759 state
->tmp
= state
->orig
;
3761 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3763 NDR_DRSUAPI_REPLICA_VERIFY_OBJECTS
,
3765 if (tevent_req_nomem(subreq
, req
)) {
3766 return tevent_req_post(req
, ev
);
3768 tevent_req_set_callback(subreq
, rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_done
, req
);
3772 static void rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_done(struct tevent_req
*subreq
)
3774 struct tevent_req
*req
= tevent_req_callback_data(
3775 subreq
, struct tevent_req
);
3776 struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
*state
= tevent_req_data(
3777 req
, struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
);
3779 TALLOC_CTX
*mem_ctx
;
3781 if (state
->out_mem_ctx
) {
3782 mem_ctx
= state
->out_mem_ctx
;
3787 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3788 TALLOC_FREE(subreq
);
3789 if (!NT_STATUS_IS_OK(status
)) {
3790 tevent_req_nterror(req
, status
);
3794 /* Copy out parameters */
3797 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3799 /* Reset temporary structure */
3800 ZERO_STRUCT(state
->tmp
);
3802 if (DEBUGLEVEL
>= 10) {
3803 NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_VERIFY_OBJECTS
, &state
->orig
);
3806 tevent_req_done(req
);
3809 NTSTATUS
rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_recv(struct tevent_req
*req
,
3810 TALLOC_CTX
*mem_ctx
,
3813 struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
*state
= tevent_req_data(
3814 req
, struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state
);
3817 if (tevent_req_is_nterror(req
, &status
)) {
3818 tevent_req_received(req
);
3822 /* Steal possbile out parameters to the callers context */
3823 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3826 *result
= state
->orig
.out
.result
;
3828 tevent_req_received(req
);
3829 return NT_STATUS_OK
;
3832 NTSTATUS
rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct rpc_pipe_client
*cli
,
3833 TALLOC_CTX
*mem_ctx
,
3836 struct DRSUAPI_REPLICA_VERIFY_OBJECTS r
;
3841 if (DEBUGLEVEL
>= 10) {
3842 NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_VERIFY_OBJECTS
, &r
);
3845 status
= cli
->dispatch(cli
,
3848 NDR_DRSUAPI_REPLICA_VERIFY_OBJECTS
,
3851 if (!NT_STATUS_IS_OK(status
)) {
3855 if (DEBUGLEVEL
>= 10) {
3856 NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_VERIFY_OBJECTS
, &r
);
3859 if (NT_STATUS_IS_ERR(status
)) {
3863 /* Return variables */
3867 *werror
= r
.out
.result
;
3870 return werror_to_ntstatus(r
.out
.result
);
3873 struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
{
3874 struct DRSUAPI_GET_OBJECT_EXISTENCE orig
;
3875 struct DRSUAPI_GET_OBJECT_EXISTENCE tmp
;
3876 TALLOC_CTX
*out_mem_ctx
;
3877 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3880 static void rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_done(struct tevent_req
*subreq
);
3882 struct tevent_req
*rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_send(TALLOC_CTX
*mem_ctx
,
3883 struct tevent_context
*ev
,
3884 struct rpc_pipe_client
*cli
)
3886 struct tevent_req
*req
;
3887 struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
*state
;
3888 struct tevent_req
*subreq
;
3890 req
= tevent_req_create(mem_ctx
, &state
,
3891 struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
);
3895 state
->out_mem_ctx
= NULL
;
3896 state
->dispatch_recv
= cli
->dispatch_recv
;
3900 /* Out parameters */
3903 ZERO_STRUCT(state
->orig
.out
.result
);
3905 if (DEBUGLEVEL
>= 10) {
3906 NDR_PRINT_IN_DEBUG(DRSUAPI_GET_OBJECT_EXISTENCE
, &state
->orig
);
3909 /* make a temporary copy, that we pass to the dispatch function */
3910 state
->tmp
= state
->orig
;
3912 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3914 NDR_DRSUAPI_GET_OBJECT_EXISTENCE
,
3916 if (tevent_req_nomem(subreq
, req
)) {
3917 return tevent_req_post(req
, ev
);
3919 tevent_req_set_callback(subreq
, rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_done
, req
);
3923 static void rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_done(struct tevent_req
*subreq
)
3925 struct tevent_req
*req
= tevent_req_callback_data(
3926 subreq
, struct tevent_req
);
3927 struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
*state
= tevent_req_data(
3928 req
, struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
);
3930 TALLOC_CTX
*mem_ctx
;
3932 if (state
->out_mem_ctx
) {
3933 mem_ctx
= state
->out_mem_ctx
;
3938 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3939 TALLOC_FREE(subreq
);
3940 if (!NT_STATUS_IS_OK(status
)) {
3941 tevent_req_nterror(req
, status
);
3945 /* Copy out parameters */
3948 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3950 /* Reset temporary structure */
3951 ZERO_STRUCT(state
->tmp
);
3953 if (DEBUGLEVEL
>= 10) {
3954 NDR_PRINT_OUT_DEBUG(DRSUAPI_GET_OBJECT_EXISTENCE
, &state
->orig
);
3957 tevent_req_done(req
);
3960 NTSTATUS
rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_recv(struct tevent_req
*req
,
3961 TALLOC_CTX
*mem_ctx
,
3964 struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
*state
= tevent_req_data(
3965 req
, struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state
);
3968 if (tevent_req_is_nterror(req
, &status
)) {
3969 tevent_req_received(req
);
3973 /* Steal possbile out parameters to the callers context */
3974 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3977 *result
= state
->orig
.out
.result
;
3979 tevent_req_received(req
);
3980 return NT_STATUS_OK
;
3983 NTSTATUS
rpccli_DRSUAPI_GET_OBJECT_EXISTENCE(struct rpc_pipe_client
*cli
,
3984 TALLOC_CTX
*mem_ctx
,
3987 struct DRSUAPI_GET_OBJECT_EXISTENCE r
;
3992 if (DEBUGLEVEL
>= 10) {
3993 NDR_PRINT_IN_DEBUG(DRSUAPI_GET_OBJECT_EXISTENCE
, &r
);
3996 status
= cli
->dispatch(cli
,
3999 NDR_DRSUAPI_GET_OBJECT_EXISTENCE
,
4002 if (!NT_STATUS_IS_OK(status
)) {
4006 if (DEBUGLEVEL
>= 10) {
4007 NDR_PRINT_OUT_DEBUG(DRSUAPI_GET_OBJECT_EXISTENCE
, &r
);
4010 if (NT_STATUS_IS_ERR(status
)) {
4014 /* Return variables */
4018 *werror
= r
.out
.result
;
4021 return werror_to_ntstatus(r
.out
.result
);
4024 struct rpccli_drsuapi_QuerySitesByCost_state
{
4025 struct drsuapi_QuerySitesByCost orig
;
4026 struct drsuapi_QuerySitesByCost tmp
;
4027 TALLOC_CTX
*out_mem_ctx
;
4028 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4031 static void rpccli_drsuapi_QuerySitesByCost_done(struct tevent_req
*subreq
);
4033 struct tevent_req
*rpccli_drsuapi_QuerySitesByCost_send(TALLOC_CTX
*mem_ctx
,
4034 struct tevent_context
*ev
,
4035 struct rpc_pipe_client
*cli
,
4036 struct policy_handle
*_bind_handle
/* [in] [ref] */,
4037 int32_t _level
/* [in] */,
4038 union drsuapi_QuerySitesByCostRequest
*_req
/* [in] [ref,switch_is(level)] */,
4039 int32_t *_level_out
/* [out] [ref] */,
4040 union drsuapi_QuerySitesByCostCtr
*_ctr
/* [out] [ref,switch_is(*level_out)] */)
4042 struct tevent_req
*req
;
4043 struct rpccli_drsuapi_QuerySitesByCost_state
*state
;
4044 struct tevent_req
*subreq
;
4046 req
= tevent_req_create(mem_ctx
, &state
,
4047 struct rpccli_drsuapi_QuerySitesByCost_state
);
4051 state
->out_mem_ctx
= NULL
;
4052 state
->dispatch_recv
= cli
->dispatch_recv
;
4055 state
->orig
.in
.bind_handle
= _bind_handle
;
4056 state
->orig
.in
.level
= _level
;
4057 state
->orig
.in
.req
= _req
;
4059 /* Out parameters */
4060 state
->orig
.out
.level_out
= _level_out
;
4061 state
->orig
.out
.ctr
= _ctr
;
4064 ZERO_STRUCT(state
->orig
.out
.result
);
4066 if (DEBUGLEVEL
>= 10) {
4067 NDR_PRINT_IN_DEBUG(drsuapi_QuerySitesByCost
, &state
->orig
);
4070 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4071 "rpccli_drsuapi_QuerySitesByCost_out_memory");
4072 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4073 return tevent_req_post(req
, ev
);
4076 /* make a temporary copy, that we pass to the dispatch function */
4077 state
->tmp
= state
->orig
;
4079 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4081 NDR_DRSUAPI_QUERYSITESBYCOST
,
4083 if (tevent_req_nomem(subreq
, req
)) {
4084 return tevent_req_post(req
, ev
);
4086 tevent_req_set_callback(subreq
, rpccli_drsuapi_QuerySitesByCost_done
, req
);
4090 static void rpccli_drsuapi_QuerySitesByCost_done(struct tevent_req
*subreq
)
4092 struct tevent_req
*req
= tevent_req_callback_data(
4093 subreq
, struct tevent_req
);
4094 struct rpccli_drsuapi_QuerySitesByCost_state
*state
= tevent_req_data(
4095 req
, struct rpccli_drsuapi_QuerySitesByCost_state
);
4097 TALLOC_CTX
*mem_ctx
;
4099 if (state
->out_mem_ctx
) {
4100 mem_ctx
= state
->out_mem_ctx
;
4105 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4106 TALLOC_FREE(subreq
);
4107 if (!NT_STATUS_IS_OK(status
)) {
4108 tevent_req_nterror(req
, status
);
4112 /* Copy out parameters */
4113 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
4114 *state
->orig
.out
.ctr
= *state
->tmp
.out
.ctr
;
4117 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4119 /* Reset temporary structure */
4120 ZERO_STRUCT(state
->tmp
);
4122 if (DEBUGLEVEL
>= 10) {
4123 NDR_PRINT_OUT_DEBUG(drsuapi_QuerySitesByCost
, &state
->orig
);
4126 tevent_req_done(req
);
4129 NTSTATUS
rpccli_drsuapi_QuerySitesByCost_recv(struct tevent_req
*req
,
4130 TALLOC_CTX
*mem_ctx
,
4133 struct rpccli_drsuapi_QuerySitesByCost_state
*state
= tevent_req_data(
4134 req
, struct rpccli_drsuapi_QuerySitesByCost_state
);
4137 if (tevent_req_is_nterror(req
, &status
)) {
4138 tevent_req_received(req
);
4142 /* Steal possbile out parameters to the callers context */
4143 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4146 *result
= state
->orig
.out
.result
;
4148 tevent_req_received(req
);
4149 return NT_STATUS_OK
;
4152 NTSTATUS
rpccli_drsuapi_QuerySitesByCost(struct rpc_pipe_client
*cli
,
4153 TALLOC_CTX
*mem_ctx
,
4154 struct policy_handle
*bind_handle
/* [in] [ref] */,
4155 int32_t level
/* [in] */,
4156 union drsuapi_QuerySitesByCostRequest
*req
/* [in] [ref,switch_is(level)] */,
4157 int32_t *level_out
/* [out] [ref] */,
4158 union drsuapi_QuerySitesByCostCtr
*ctr
/* [out] [ref,switch_is(*level_out)] */,
4161 struct drsuapi_QuerySitesByCost r
;
4165 r
.in
.bind_handle
= bind_handle
;
4169 if (DEBUGLEVEL
>= 10) {
4170 NDR_PRINT_IN_DEBUG(drsuapi_QuerySitesByCost
, &r
);
4173 status
= cli
->dispatch(cli
,
4176 NDR_DRSUAPI_QUERYSITESBYCOST
,
4179 if (!NT_STATUS_IS_OK(status
)) {
4183 if (DEBUGLEVEL
>= 10) {
4184 NDR_PRINT_OUT_DEBUG(drsuapi_QuerySitesByCost
, &r
);
4187 if (NT_STATUS_IS_ERR(status
)) {
4191 /* Return variables */
4192 *level_out
= *r
.out
.level_out
;
4197 *werror
= r
.out
.result
;
4200 return werror_to_ntstatus(r
.out
.result
);