samba-3.5.8 for ARM
[tomato.git] / release / src-rt-6.x.4708 / router / samba-3.5.8 / source3 / librpc / gen_ndr / cli_wbint.c
blob7200d2ac94cd43aca318aed8942091b240c2d6df
1 /*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "librpc/gen_ndr/cli_wbint.h"
9 struct rpccli_wbint_Ping_state {
10 struct wbint_Ping orig;
11 struct wbint_Ping tmp;
12 TALLOC_CTX *out_mem_ctx;
13 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
16 static void rpccli_wbint_Ping_done(struct tevent_req *subreq);
18 struct tevent_req *rpccli_wbint_Ping_send(TALLOC_CTX *mem_ctx,
19 struct tevent_context *ev,
20 struct rpc_pipe_client *cli,
21 uint32_t _in_data /* [in] */,
22 uint32_t *_out_data /* [out] [ref] */)
24 struct tevent_req *req;
25 struct rpccli_wbint_Ping_state *state;
26 struct tevent_req *subreq;
28 req = tevent_req_create(mem_ctx, &state,
29 struct rpccli_wbint_Ping_state);
30 if (req == NULL) {
31 return NULL;
33 state->out_mem_ctx = NULL;
34 state->dispatch_recv = cli->dispatch_recv;
36 /* In parameters */
37 state->orig.in.in_data = _in_data;
39 /* Out parameters */
40 state->orig.out.out_data = _out_data;
42 state->out_mem_ctx = talloc_named_const(state, 0,
43 "rpccli_wbint_Ping_out_memory");
44 if (tevent_req_nomem(state->out_mem_ctx, req)) {
45 return tevent_req_post(req, ev);
48 /* make a temporary copy, that we pass to the dispatch function */
49 state->tmp = state->orig;
51 subreq = cli->dispatch_send(state, ev, cli,
52 &ndr_table_wbint,
53 NDR_WBINT_PING,
54 &state->tmp);
55 if (tevent_req_nomem(subreq, req)) {
56 return tevent_req_post(req, ev);
58 tevent_req_set_callback(subreq, rpccli_wbint_Ping_done, req);
59 return req;
62 static void rpccli_wbint_Ping_done(struct tevent_req *subreq)
64 struct tevent_req *req = tevent_req_callback_data(
65 subreq, struct tevent_req);
66 struct rpccli_wbint_Ping_state *state = tevent_req_data(
67 req, struct rpccli_wbint_Ping_state);
68 NTSTATUS status;
69 TALLOC_CTX *mem_ctx;
71 if (state->out_mem_ctx) {
72 mem_ctx = state->out_mem_ctx;
73 } else {
74 mem_ctx = state;
77 status = state->dispatch_recv(subreq, mem_ctx);
78 TALLOC_FREE(subreq);
79 if (!NT_STATUS_IS_OK(status)) {
80 tevent_req_nterror(req, status);
81 return;
84 /* Copy out parameters */
85 *state->orig.out.out_data = *state->tmp.out.out_data;
87 /* Reset temporary structure */
88 ZERO_STRUCT(state->tmp);
90 tevent_req_done(req);
93 NTSTATUS rpccli_wbint_Ping_recv(struct tevent_req *req,
94 TALLOC_CTX *mem_ctx)
96 struct rpccli_wbint_Ping_state *state = tevent_req_data(
97 req, struct rpccli_wbint_Ping_state);
98 NTSTATUS status;
100 if (tevent_req_is_nterror(req, &status)) {
101 tevent_req_received(req);
102 return status;
105 /* Steal possbile out parameters to the callers context */
106 talloc_steal(mem_ctx, state->out_mem_ctx);
108 tevent_req_received(req);
109 return NT_STATUS_OK;
112 NTSTATUS rpccli_wbint_Ping(struct rpc_pipe_client *cli,
113 TALLOC_CTX *mem_ctx,
114 uint32_t in_data /* [in] */,
115 uint32_t *out_data /* [out] [ref] */)
117 struct wbint_Ping r;
118 NTSTATUS status;
120 /* In parameters */
121 r.in.in_data = in_data;
123 status = cli->dispatch(cli,
124 mem_ctx,
125 &ndr_table_wbint,
126 NDR_WBINT_PING,
127 &r);
129 if (!NT_STATUS_IS_OK(status)) {
130 return status;
133 if (NT_STATUS_IS_ERR(status)) {
134 return status;
137 /* Return variables */
138 *out_data = *r.out.out_data;
140 /* Return result */
141 return NT_STATUS_OK;
144 struct rpccli_wbint_LookupSid_state {
145 struct wbint_LookupSid orig;
146 struct wbint_LookupSid tmp;
147 TALLOC_CTX *out_mem_ctx;
148 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
151 static void rpccli_wbint_LookupSid_done(struct tevent_req *subreq);
153 struct tevent_req *rpccli_wbint_LookupSid_send(TALLOC_CTX *mem_ctx,
154 struct tevent_context *ev,
155 struct rpc_pipe_client *cli,
156 struct dom_sid *_sid /* [in] [ref] */,
157 enum lsa_SidType *_type /* [out] [ref] */,
158 const char **_domain /* [out] [ref,charset(UTF8)] */,
159 const char **_name /* [out] [ref,charset(UTF8)] */)
161 struct tevent_req *req;
162 struct rpccli_wbint_LookupSid_state *state;
163 struct tevent_req *subreq;
165 req = tevent_req_create(mem_ctx, &state,
166 struct rpccli_wbint_LookupSid_state);
167 if (req == NULL) {
168 return NULL;
170 state->out_mem_ctx = NULL;
171 state->dispatch_recv = cli->dispatch_recv;
173 /* In parameters */
174 state->orig.in.sid = _sid;
176 /* Out parameters */
177 state->orig.out.type = _type;
178 state->orig.out.domain = _domain;
179 state->orig.out.name = _name;
181 /* Result */
182 ZERO_STRUCT(state->orig.out.result);
184 state->out_mem_ctx = talloc_named_const(state, 0,
185 "rpccli_wbint_LookupSid_out_memory");
186 if (tevent_req_nomem(state->out_mem_ctx, req)) {
187 return tevent_req_post(req, ev);
190 /* make a temporary copy, that we pass to the dispatch function */
191 state->tmp = state->orig;
193 subreq = cli->dispatch_send(state, ev, cli,
194 &ndr_table_wbint,
195 NDR_WBINT_LOOKUPSID,
196 &state->tmp);
197 if (tevent_req_nomem(subreq, req)) {
198 return tevent_req_post(req, ev);
200 tevent_req_set_callback(subreq, rpccli_wbint_LookupSid_done, req);
201 return req;
204 static void rpccli_wbint_LookupSid_done(struct tevent_req *subreq)
206 struct tevent_req *req = tevent_req_callback_data(
207 subreq, struct tevent_req);
208 struct rpccli_wbint_LookupSid_state *state = tevent_req_data(
209 req, struct rpccli_wbint_LookupSid_state);
210 NTSTATUS status;
211 TALLOC_CTX *mem_ctx;
213 if (state->out_mem_ctx) {
214 mem_ctx = state->out_mem_ctx;
215 } else {
216 mem_ctx = state;
219 status = state->dispatch_recv(subreq, mem_ctx);
220 TALLOC_FREE(subreq);
221 if (!NT_STATUS_IS_OK(status)) {
222 tevent_req_nterror(req, status);
223 return;
226 /* Copy out parameters */
227 *state->orig.out.type = *state->tmp.out.type;
228 *state->orig.out.domain = *state->tmp.out.domain;
229 *state->orig.out.name = *state->tmp.out.name;
231 /* Copy result */
232 state->orig.out.result = state->tmp.out.result;
234 /* Reset temporary structure */
235 ZERO_STRUCT(state->tmp);
237 tevent_req_done(req);
240 NTSTATUS rpccli_wbint_LookupSid_recv(struct tevent_req *req,
241 TALLOC_CTX *mem_ctx,
242 NTSTATUS *result)
244 struct rpccli_wbint_LookupSid_state *state = tevent_req_data(
245 req, struct rpccli_wbint_LookupSid_state);
246 NTSTATUS status;
248 if (tevent_req_is_nterror(req, &status)) {
249 tevent_req_received(req);
250 return status;
253 /* Steal possbile out parameters to the callers context */
254 talloc_steal(mem_ctx, state->out_mem_ctx);
256 /* Return result */
257 *result = state->orig.out.result;
259 tevent_req_received(req);
260 return NT_STATUS_OK;
263 NTSTATUS rpccli_wbint_LookupSid(struct rpc_pipe_client *cli,
264 TALLOC_CTX *mem_ctx,
265 struct dom_sid *sid /* [in] [ref] */,
266 enum lsa_SidType *type /* [out] [ref] */,
267 const char **domain /* [out] [ref,charset(UTF8)] */,
268 const char **name /* [out] [ref,charset(UTF8)] */)
270 struct wbint_LookupSid r;
271 NTSTATUS status;
273 /* In parameters */
274 r.in.sid = sid;
276 status = cli->dispatch(cli,
277 mem_ctx,
278 &ndr_table_wbint,
279 NDR_WBINT_LOOKUPSID,
280 &r);
282 if (!NT_STATUS_IS_OK(status)) {
283 return status;
286 if (NT_STATUS_IS_ERR(status)) {
287 return status;
290 /* Return variables */
291 *type = *r.out.type;
292 *domain = *r.out.domain;
293 *name = *r.out.name;
295 /* Return result */
296 return r.out.result;
299 struct rpccli_wbint_LookupName_state {
300 struct wbint_LookupName orig;
301 struct wbint_LookupName tmp;
302 TALLOC_CTX *out_mem_ctx;
303 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
306 static void rpccli_wbint_LookupName_done(struct tevent_req *subreq);
308 struct tevent_req *rpccli_wbint_LookupName_send(TALLOC_CTX *mem_ctx,
309 struct tevent_context *ev,
310 struct rpc_pipe_client *cli,
311 const char *_domain /* [in] [ref,charset(UTF8)] */,
312 const char *_name /* [in] [ref,charset(UTF8)] */,
313 uint32_t _flags /* [in] */,
314 enum lsa_SidType *_type /* [out] [ref] */,
315 struct dom_sid *_sid /* [out] [ref] */)
317 struct tevent_req *req;
318 struct rpccli_wbint_LookupName_state *state;
319 struct tevent_req *subreq;
321 req = tevent_req_create(mem_ctx, &state,
322 struct rpccli_wbint_LookupName_state);
323 if (req == NULL) {
324 return NULL;
326 state->out_mem_ctx = NULL;
327 state->dispatch_recv = cli->dispatch_recv;
329 /* In parameters */
330 state->orig.in.domain = _domain;
331 state->orig.in.name = _name;
332 state->orig.in.flags = _flags;
334 /* Out parameters */
335 state->orig.out.type = _type;
336 state->orig.out.sid = _sid;
338 /* Result */
339 ZERO_STRUCT(state->orig.out.result);
341 state->out_mem_ctx = talloc_named_const(state, 0,
342 "rpccli_wbint_LookupName_out_memory");
343 if (tevent_req_nomem(state->out_mem_ctx, req)) {
344 return tevent_req_post(req, ev);
347 /* make a temporary copy, that we pass to the dispatch function */
348 state->tmp = state->orig;
350 subreq = cli->dispatch_send(state, ev, cli,
351 &ndr_table_wbint,
352 NDR_WBINT_LOOKUPNAME,
353 &state->tmp);
354 if (tevent_req_nomem(subreq, req)) {
355 return tevent_req_post(req, ev);
357 tevent_req_set_callback(subreq, rpccli_wbint_LookupName_done, req);
358 return req;
361 static void rpccli_wbint_LookupName_done(struct tevent_req *subreq)
363 struct tevent_req *req = tevent_req_callback_data(
364 subreq, struct tevent_req);
365 struct rpccli_wbint_LookupName_state *state = tevent_req_data(
366 req, struct rpccli_wbint_LookupName_state);
367 NTSTATUS status;
368 TALLOC_CTX *mem_ctx;
370 if (state->out_mem_ctx) {
371 mem_ctx = state->out_mem_ctx;
372 } else {
373 mem_ctx = state;
376 status = state->dispatch_recv(subreq, mem_ctx);
377 TALLOC_FREE(subreq);
378 if (!NT_STATUS_IS_OK(status)) {
379 tevent_req_nterror(req, status);
380 return;
383 /* Copy out parameters */
384 *state->orig.out.type = *state->tmp.out.type;
385 *state->orig.out.sid = *state->tmp.out.sid;
387 /* Copy result */
388 state->orig.out.result = state->tmp.out.result;
390 /* Reset temporary structure */
391 ZERO_STRUCT(state->tmp);
393 tevent_req_done(req);
396 NTSTATUS rpccli_wbint_LookupName_recv(struct tevent_req *req,
397 TALLOC_CTX *mem_ctx,
398 NTSTATUS *result)
400 struct rpccli_wbint_LookupName_state *state = tevent_req_data(
401 req, struct rpccli_wbint_LookupName_state);
402 NTSTATUS status;
404 if (tevent_req_is_nterror(req, &status)) {
405 tevent_req_received(req);
406 return status;
409 /* Steal possbile out parameters to the callers context */
410 talloc_steal(mem_ctx, state->out_mem_ctx);
412 /* Return result */
413 *result = state->orig.out.result;
415 tevent_req_received(req);
416 return NT_STATUS_OK;
419 NTSTATUS rpccli_wbint_LookupName(struct rpc_pipe_client *cli,
420 TALLOC_CTX *mem_ctx,
421 const char *domain /* [in] [ref,charset(UTF8)] */,
422 const char *name /* [in] [ref,charset(UTF8)] */,
423 uint32_t flags /* [in] */,
424 enum lsa_SidType *type /* [out] [ref] */,
425 struct dom_sid *sid /* [out] [ref] */)
427 struct wbint_LookupName r;
428 NTSTATUS status;
430 /* In parameters */
431 r.in.domain = domain;
432 r.in.name = name;
433 r.in.flags = flags;
435 status = cli->dispatch(cli,
436 mem_ctx,
437 &ndr_table_wbint,
438 NDR_WBINT_LOOKUPNAME,
439 &r);
441 if (!NT_STATUS_IS_OK(status)) {
442 return status;
445 if (NT_STATUS_IS_ERR(status)) {
446 return status;
449 /* Return variables */
450 *type = *r.out.type;
451 *sid = *r.out.sid;
453 /* Return result */
454 return r.out.result;
457 struct rpccli_wbint_Sid2Uid_state {
458 struct wbint_Sid2Uid orig;
459 struct wbint_Sid2Uid tmp;
460 TALLOC_CTX *out_mem_ctx;
461 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
464 static void rpccli_wbint_Sid2Uid_done(struct tevent_req *subreq);
466 struct tevent_req *rpccli_wbint_Sid2Uid_send(TALLOC_CTX *mem_ctx,
467 struct tevent_context *ev,
468 struct rpc_pipe_client *cli,
469 const char *_dom_name /* [in] [unique,charset(UTF8)] */,
470 struct dom_sid *_sid /* [in] [ref] */,
471 uint64_t *_uid /* [out] [ref] */)
473 struct tevent_req *req;
474 struct rpccli_wbint_Sid2Uid_state *state;
475 struct tevent_req *subreq;
477 req = tevent_req_create(mem_ctx, &state,
478 struct rpccli_wbint_Sid2Uid_state);
479 if (req == NULL) {
480 return NULL;
482 state->out_mem_ctx = NULL;
483 state->dispatch_recv = cli->dispatch_recv;
485 /* In parameters */
486 state->orig.in.dom_name = _dom_name;
487 state->orig.in.sid = _sid;
489 /* Out parameters */
490 state->orig.out.uid = _uid;
492 /* Result */
493 ZERO_STRUCT(state->orig.out.result);
495 state->out_mem_ctx = talloc_named_const(state, 0,
496 "rpccli_wbint_Sid2Uid_out_memory");
497 if (tevent_req_nomem(state->out_mem_ctx, req)) {
498 return tevent_req_post(req, ev);
501 /* make a temporary copy, that we pass to the dispatch function */
502 state->tmp = state->orig;
504 subreq = cli->dispatch_send(state, ev, cli,
505 &ndr_table_wbint,
506 NDR_WBINT_SID2UID,
507 &state->tmp);
508 if (tevent_req_nomem(subreq, req)) {
509 return tevent_req_post(req, ev);
511 tevent_req_set_callback(subreq, rpccli_wbint_Sid2Uid_done, req);
512 return req;
515 static void rpccli_wbint_Sid2Uid_done(struct tevent_req *subreq)
517 struct tevent_req *req = tevent_req_callback_data(
518 subreq, struct tevent_req);
519 struct rpccli_wbint_Sid2Uid_state *state = tevent_req_data(
520 req, struct rpccli_wbint_Sid2Uid_state);
521 NTSTATUS status;
522 TALLOC_CTX *mem_ctx;
524 if (state->out_mem_ctx) {
525 mem_ctx = state->out_mem_ctx;
526 } else {
527 mem_ctx = state;
530 status = state->dispatch_recv(subreq, mem_ctx);
531 TALLOC_FREE(subreq);
532 if (!NT_STATUS_IS_OK(status)) {
533 tevent_req_nterror(req, status);
534 return;
537 /* Copy out parameters */
538 *state->orig.out.uid = *state->tmp.out.uid;
540 /* Copy result */
541 state->orig.out.result = state->tmp.out.result;
543 /* Reset temporary structure */
544 ZERO_STRUCT(state->tmp);
546 tevent_req_done(req);
549 NTSTATUS rpccli_wbint_Sid2Uid_recv(struct tevent_req *req,
550 TALLOC_CTX *mem_ctx,
551 NTSTATUS *result)
553 struct rpccli_wbint_Sid2Uid_state *state = tevent_req_data(
554 req, struct rpccli_wbint_Sid2Uid_state);
555 NTSTATUS status;
557 if (tevent_req_is_nterror(req, &status)) {
558 tevent_req_received(req);
559 return status;
562 /* Steal possbile out parameters to the callers context */
563 talloc_steal(mem_ctx, state->out_mem_ctx);
565 /* Return result */
566 *result = state->orig.out.result;
568 tevent_req_received(req);
569 return NT_STATUS_OK;
572 NTSTATUS rpccli_wbint_Sid2Uid(struct rpc_pipe_client *cli,
573 TALLOC_CTX *mem_ctx,
574 const char *dom_name /* [in] [unique,charset(UTF8)] */,
575 struct dom_sid *sid /* [in] [ref] */,
576 uint64_t *uid /* [out] [ref] */)
578 struct wbint_Sid2Uid r;
579 NTSTATUS status;
581 /* In parameters */
582 r.in.dom_name = dom_name;
583 r.in.sid = sid;
585 status = cli->dispatch(cli,
586 mem_ctx,
587 &ndr_table_wbint,
588 NDR_WBINT_SID2UID,
589 &r);
591 if (!NT_STATUS_IS_OK(status)) {
592 return status;
595 if (NT_STATUS_IS_ERR(status)) {
596 return status;
599 /* Return variables */
600 *uid = *r.out.uid;
602 /* Return result */
603 return r.out.result;
606 struct rpccli_wbint_Sid2Gid_state {
607 struct wbint_Sid2Gid orig;
608 struct wbint_Sid2Gid tmp;
609 TALLOC_CTX *out_mem_ctx;
610 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
613 static void rpccli_wbint_Sid2Gid_done(struct tevent_req *subreq);
615 struct tevent_req *rpccli_wbint_Sid2Gid_send(TALLOC_CTX *mem_ctx,
616 struct tevent_context *ev,
617 struct rpc_pipe_client *cli,
618 const char *_dom_name /* [in] [unique,charset(UTF8)] */,
619 struct dom_sid *_sid /* [in] [ref] */,
620 uint64_t *_gid /* [out] [ref] */)
622 struct tevent_req *req;
623 struct rpccli_wbint_Sid2Gid_state *state;
624 struct tevent_req *subreq;
626 req = tevent_req_create(mem_ctx, &state,
627 struct rpccli_wbint_Sid2Gid_state);
628 if (req == NULL) {
629 return NULL;
631 state->out_mem_ctx = NULL;
632 state->dispatch_recv = cli->dispatch_recv;
634 /* In parameters */
635 state->orig.in.dom_name = _dom_name;
636 state->orig.in.sid = _sid;
638 /* Out parameters */
639 state->orig.out.gid = _gid;
641 /* Result */
642 ZERO_STRUCT(state->orig.out.result);
644 state->out_mem_ctx = talloc_named_const(state, 0,
645 "rpccli_wbint_Sid2Gid_out_memory");
646 if (tevent_req_nomem(state->out_mem_ctx, req)) {
647 return tevent_req_post(req, ev);
650 /* make a temporary copy, that we pass to the dispatch function */
651 state->tmp = state->orig;
653 subreq = cli->dispatch_send(state, ev, cli,
654 &ndr_table_wbint,
655 NDR_WBINT_SID2GID,
656 &state->tmp);
657 if (tevent_req_nomem(subreq, req)) {
658 return tevent_req_post(req, ev);
660 tevent_req_set_callback(subreq, rpccli_wbint_Sid2Gid_done, req);
661 return req;
664 static void rpccli_wbint_Sid2Gid_done(struct tevent_req *subreq)
666 struct tevent_req *req = tevent_req_callback_data(
667 subreq, struct tevent_req);
668 struct rpccli_wbint_Sid2Gid_state *state = tevent_req_data(
669 req, struct rpccli_wbint_Sid2Gid_state);
670 NTSTATUS status;
671 TALLOC_CTX *mem_ctx;
673 if (state->out_mem_ctx) {
674 mem_ctx = state->out_mem_ctx;
675 } else {
676 mem_ctx = state;
679 status = state->dispatch_recv(subreq, mem_ctx);
680 TALLOC_FREE(subreq);
681 if (!NT_STATUS_IS_OK(status)) {
682 tevent_req_nterror(req, status);
683 return;
686 /* Copy out parameters */
687 *state->orig.out.gid = *state->tmp.out.gid;
689 /* Copy result */
690 state->orig.out.result = state->tmp.out.result;
692 /* Reset temporary structure */
693 ZERO_STRUCT(state->tmp);
695 tevent_req_done(req);
698 NTSTATUS rpccli_wbint_Sid2Gid_recv(struct tevent_req *req,
699 TALLOC_CTX *mem_ctx,
700 NTSTATUS *result)
702 struct rpccli_wbint_Sid2Gid_state *state = tevent_req_data(
703 req, struct rpccli_wbint_Sid2Gid_state);
704 NTSTATUS status;
706 if (tevent_req_is_nterror(req, &status)) {
707 tevent_req_received(req);
708 return status;
711 /* Steal possbile out parameters to the callers context */
712 talloc_steal(mem_ctx, state->out_mem_ctx);
714 /* Return result */
715 *result = state->orig.out.result;
717 tevent_req_received(req);
718 return NT_STATUS_OK;
721 NTSTATUS rpccli_wbint_Sid2Gid(struct rpc_pipe_client *cli,
722 TALLOC_CTX *mem_ctx,
723 const char *dom_name /* [in] [unique,charset(UTF8)] */,
724 struct dom_sid *sid /* [in] [ref] */,
725 uint64_t *gid /* [out] [ref] */)
727 struct wbint_Sid2Gid r;
728 NTSTATUS status;
730 /* In parameters */
731 r.in.dom_name = dom_name;
732 r.in.sid = sid;
734 status = cli->dispatch(cli,
735 mem_ctx,
736 &ndr_table_wbint,
737 NDR_WBINT_SID2GID,
738 &r);
740 if (!NT_STATUS_IS_OK(status)) {
741 return status;
744 if (NT_STATUS_IS_ERR(status)) {
745 return status;
748 /* Return variables */
749 *gid = *r.out.gid;
751 /* Return result */
752 return r.out.result;
755 struct rpccli_wbint_Uid2Sid_state {
756 struct wbint_Uid2Sid orig;
757 struct wbint_Uid2Sid tmp;
758 TALLOC_CTX *out_mem_ctx;
759 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
762 static void rpccli_wbint_Uid2Sid_done(struct tevent_req *subreq);
764 struct tevent_req *rpccli_wbint_Uid2Sid_send(TALLOC_CTX *mem_ctx,
765 struct tevent_context *ev,
766 struct rpc_pipe_client *cli,
767 const char *_dom_name /* [in] [unique,charset(UTF8)] */,
768 uint64_t _uid /* [in] */,
769 struct dom_sid *_sid /* [out] [ref] */)
771 struct tevent_req *req;
772 struct rpccli_wbint_Uid2Sid_state *state;
773 struct tevent_req *subreq;
775 req = tevent_req_create(mem_ctx, &state,
776 struct rpccli_wbint_Uid2Sid_state);
777 if (req == NULL) {
778 return NULL;
780 state->out_mem_ctx = NULL;
781 state->dispatch_recv = cli->dispatch_recv;
783 /* In parameters */
784 state->orig.in.dom_name = _dom_name;
785 state->orig.in.uid = _uid;
787 /* Out parameters */
788 state->orig.out.sid = _sid;
790 /* Result */
791 ZERO_STRUCT(state->orig.out.result);
793 state->out_mem_ctx = talloc_named_const(state, 0,
794 "rpccli_wbint_Uid2Sid_out_memory");
795 if (tevent_req_nomem(state->out_mem_ctx, req)) {
796 return tevent_req_post(req, ev);
799 /* make a temporary copy, that we pass to the dispatch function */
800 state->tmp = state->orig;
802 subreq = cli->dispatch_send(state, ev, cli,
803 &ndr_table_wbint,
804 NDR_WBINT_UID2SID,
805 &state->tmp);
806 if (tevent_req_nomem(subreq, req)) {
807 return tevent_req_post(req, ev);
809 tevent_req_set_callback(subreq, rpccli_wbint_Uid2Sid_done, req);
810 return req;
813 static void rpccli_wbint_Uid2Sid_done(struct tevent_req *subreq)
815 struct tevent_req *req = tevent_req_callback_data(
816 subreq, struct tevent_req);
817 struct rpccli_wbint_Uid2Sid_state *state = tevent_req_data(
818 req, struct rpccli_wbint_Uid2Sid_state);
819 NTSTATUS status;
820 TALLOC_CTX *mem_ctx;
822 if (state->out_mem_ctx) {
823 mem_ctx = state->out_mem_ctx;
824 } else {
825 mem_ctx = state;
828 status = state->dispatch_recv(subreq, mem_ctx);
829 TALLOC_FREE(subreq);
830 if (!NT_STATUS_IS_OK(status)) {
831 tevent_req_nterror(req, status);
832 return;
835 /* Copy out parameters */
836 *state->orig.out.sid = *state->tmp.out.sid;
838 /* Copy result */
839 state->orig.out.result = state->tmp.out.result;
841 /* Reset temporary structure */
842 ZERO_STRUCT(state->tmp);
844 tevent_req_done(req);
847 NTSTATUS rpccli_wbint_Uid2Sid_recv(struct tevent_req *req,
848 TALLOC_CTX *mem_ctx,
849 NTSTATUS *result)
851 struct rpccli_wbint_Uid2Sid_state *state = tevent_req_data(
852 req, struct rpccli_wbint_Uid2Sid_state);
853 NTSTATUS status;
855 if (tevent_req_is_nterror(req, &status)) {
856 tevent_req_received(req);
857 return status;
860 /* Steal possbile out parameters to the callers context */
861 talloc_steal(mem_ctx, state->out_mem_ctx);
863 /* Return result */
864 *result = state->orig.out.result;
866 tevent_req_received(req);
867 return NT_STATUS_OK;
870 NTSTATUS rpccli_wbint_Uid2Sid(struct rpc_pipe_client *cli,
871 TALLOC_CTX *mem_ctx,
872 const char *dom_name /* [in] [unique,charset(UTF8)] */,
873 uint64_t uid /* [in] */,
874 struct dom_sid *sid /* [out] [ref] */)
876 struct wbint_Uid2Sid r;
877 NTSTATUS status;
879 /* In parameters */
880 r.in.dom_name = dom_name;
881 r.in.uid = uid;
883 status = cli->dispatch(cli,
884 mem_ctx,
885 &ndr_table_wbint,
886 NDR_WBINT_UID2SID,
887 &r);
889 if (!NT_STATUS_IS_OK(status)) {
890 return status;
893 if (NT_STATUS_IS_ERR(status)) {
894 return status;
897 /* Return variables */
898 *sid = *r.out.sid;
900 /* Return result */
901 return r.out.result;
904 struct rpccli_wbint_Gid2Sid_state {
905 struct wbint_Gid2Sid orig;
906 struct wbint_Gid2Sid tmp;
907 TALLOC_CTX *out_mem_ctx;
908 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
911 static void rpccli_wbint_Gid2Sid_done(struct tevent_req *subreq);
913 struct tevent_req *rpccli_wbint_Gid2Sid_send(TALLOC_CTX *mem_ctx,
914 struct tevent_context *ev,
915 struct rpc_pipe_client *cli,
916 const char *_dom_name /* [in] [unique,charset(UTF8)] */,
917 uint64_t _gid /* [in] */,
918 struct dom_sid *_sid /* [out] [ref] */)
920 struct tevent_req *req;
921 struct rpccli_wbint_Gid2Sid_state *state;
922 struct tevent_req *subreq;
924 req = tevent_req_create(mem_ctx, &state,
925 struct rpccli_wbint_Gid2Sid_state);
926 if (req == NULL) {
927 return NULL;
929 state->out_mem_ctx = NULL;
930 state->dispatch_recv = cli->dispatch_recv;
932 /* In parameters */
933 state->orig.in.dom_name = _dom_name;
934 state->orig.in.gid = _gid;
936 /* Out parameters */
937 state->orig.out.sid = _sid;
939 /* Result */
940 ZERO_STRUCT(state->orig.out.result);
942 state->out_mem_ctx = talloc_named_const(state, 0,
943 "rpccli_wbint_Gid2Sid_out_memory");
944 if (tevent_req_nomem(state->out_mem_ctx, req)) {
945 return tevent_req_post(req, ev);
948 /* make a temporary copy, that we pass to the dispatch function */
949 state->tmp = state->orig;
951 subreq = cli->dispatch_send(state, ev, cli,
952 &ndr_table_wbint,
953 NDR_WBINT_GID2SID,
954 &state->tmp);
955 if (tevent_req_nomem(subreq, req)) {
956 return tevent_req_post(req, ev);
958 tevent_req_set_callback(subreq, rpccli_wbint_Gid2Sid_done, req);
959 return req;
962 static void rpccli_wbint_Gid2Sid_done(struct tevent_req *subreq)
964 struct tevent_req *req = tevent_req_callback_data(
965 subreq, struct tevent_req);
966 struct rpccli_wbint_Gid2Sid_state *state = tevent_req_data(
967 req, struct rpccli_wbint_Gid2Sid_state);
968 NTSTATUS status;
969 TALLOC_CTX *mem_ctx;
971 if (state->out_mem_ctx) {
972 mem_ctx = state->out_mem_ctx;
973 } else {
974 mem_ctx = state;
977 status = state->dispatch_recv(subreq, mem_ctx);
978 TALLOC_FREE(subreq);
979 if (!NT_STATUS_IS_OK(status)) {
980 tevent_req_nterror(req, status);
981 return;
984 /* Copy out parameters */
985 *state->orig.out.sid = *state->tmp.out.sid;
987 /* Copy result */
988 state->orig.out.result = state->tmp.out.result;
990 /* Reset temporary structure */
991 ZERO_STRUCT(state->tmp);
993 tevent_req_done(req);
996 NTSTATUS rpccli_wbint_Gid2Sid_recv(struct tevent_req *req,
997 TALLOC_CTX *mem_ctx,
998 NTSTATUS *result)
1000 struct rpccli_wbint_Gid2Sid_state *state = tevent_req_data(
1001 req, struct rpccli_wbint_Gid2Sid_state);
1002 NTSTATUS status;
1004 if (tevent_req_is_nterror(req, &status)) {
1005 tevent_req_received(req);
1006 return status;
1009 /* Steal possbile out parameters to the callers context */
1010 talloc_steal(mem_ctx, state->out_mem_ctx);
1012 /* Return result */
1013 *result = state->orig.out.result;
1015 tevent_req_received(req);
1016 return NT_STATUS_OK;
1019 NTSTATUS rpccli_wbint_Gid2Sid(struct rpc_pipe_client *cli,
1020 TALLOC_CTX *mem_ctx,
1021 const char *dom_name /* [in] [unique,charset(UTF8)] */,
1022 uint64_t gid /* [in] */,
1023 struct dom_sid *sid /* [out] [ref] */)
1025 struct wbint_Gid2Sid r;
1026 NTSTATUS status;
1028 /* In parameters */
1029 r.in.dom_name = dom_name;
1030 r.in.gid = gid;
1032 status = cli->dispatch(cli,
1033 mem_ctx,
1034 &ndr_table_wbint,
1035 NDR_WBINT_GID2SID,
1036 &r);
1038 if (!NT_STATUS_IS_OK(status)) {
1039 return status;
1042 if (NT_STATUS_IS_ERR(status)) {
1043 return status;
1046 /* Return variables */
1047 *sid = *r.out.sid;
1049 /* Return result */
1050 return r.out.result;
1053 struct rpccli_wbint_AllocateUid_state {
1054 struct wbint_AllocateUid orig;
1055 struct wbint_AllocateUid tmp;
1056 TALLOC_CTX *out_mem_ctx;
1057 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1060 static void rpccli_wbint_AllocateUid_done(struct tevent_req *subreq);
1062 struct tevent_req *rpccli_wbint_AllocateUid_send(TALLOC_CTX *mem_ctx,
1063 struct tevent_context *ev,
1064 struct rpc_pipe_client *cli,
1065 uint64_t *_uid /* [out] [ref] */)
1067 struct tevent_req *req;
1068 struct rpccli_wbint_AllocateUid_state *state;
1069 struct tevent_req *subreq;
1071 req = tevent_req_create(mem_ctx, &state,
1072 struct rpccli_wbint_AllocateUid_state);
1073 if (req == NULL) {
1074 return NULL;
1076 state->out_mem_ctx = NULL;
1077 state->dispatch_recv = cli->dispatch_recv;
1079 /* In parameters */
1081 /* Out parameters */
1082 state->orig.out.uid = _uid;
1084 /* Result */
1085 ZERO_STRUCT(state->orig.out.result);
1087 state->out_mem_ctx = talloc_named_const(state, 0,
1088 "rpccli_wbint_AllocateUid_out_memory");
1089 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1090 return tevent_req_post(req, ev);
1093 /* make a temporary copy, that we pass to the dispatch function */
1094 state->tmp = state->orig;
1096 subreq = cli->dispatch_send(state, ev, cli,
1097 &ndr_table_wbint,
1098 NDR_WBINT_ALLOCATEUID,
1099 &state->tmp);
1100 if (tevent_req_nomem(subreq, req)) {
1101 return tevent_req_post(req, ev);
1103 tevent_req_set_callback(subreq, rpccli_wbint_AllocateUid_done, req);
1104 return req;
1107 static void rpccli_wbint_AllocateUid_done(struct tevent_req *subreq)
1109 struct tevent_req *req = tevent_req_callback_data(
1110 subreq, struct tevent_req);
1111 struct rpccli_wbint_AllocateUid_state *state = tevent_req_data(
1112 req, struct rpccli_wbint_AllocateUid_state);
1113 NTSTATUS status;
1114 TALLOC_CTX *mem_ctx;
1116 if (state->out_mem_ctx) {
1117 mem_ctx = state->out_mem_ctx;
1118 } else {
1119 mem_ctx = state;
1122 status = state->dispatch_recv(subreq, mem_ctx);
1123 TALLOC_FREE(subreq);
1124 if (!NT_STATUS_IS_OK(status)) {
1125 tevent_req_nterror(req, status);
1126 return;
1129 /* Copy out parameters */
1130 *state->orig.out.uid = *state->tmp.out.uid;
1132 /* Copy result */
1133 state->orig.out.result = state->tmp.out.result;
1135 /* Reset temporary structure */
1136 ZERO_STRUCT(state->tmp);
1138 tevent_req_done(req);
1141 NTSTATUS rpccli_wbint_AllocateUid_recv(struct tevent_req *req,
1142 TALLOC_CTX *mem_ctx,
1143 NTSTATUS *result)
1145 struct rpccli_wbint_AllocateUid_state *state = tevent_req_data(
1146 req, struct rpccli_wbint_AllocateUid_state);
1147 NTSTATUS status;
1149 if (tevent_req_is_nterror(req, &status)) {
1150 tevent_req_received(req);
1151 return status;
1154 /* Steal possbile out parameters to the callers context */
1155 talloc_steal(mem_ctx, state->out_mem_ctx);
1157 /* Return result */
1158 *result = state->orig.out.result;
1160 tevent_req_received(req);
1161 return NT_STATUS_OK;
1164 NTSTATUS rpccli_wbint_AllocateUid(struct rpc_pipe_client *cli,
1165 TALLOC_CTX *mem_ctx,
1166 uint64_t *uid /* [out] [ref] */)
1168 struct wbint_AllocateUid r;
1169 NTSTATUS status;
1171 /* In parameters */
1173 status = cli->dispatch(cli,
1174 mem_ctx,
1175 &ndr_table_wbint,
1176 NDR_WBINT_ALLOCATEUID,
1177 &r);
1179 if (!NT_STATUS_IS_OK(status)) {
1180 return status;
1183 if (NT_STATUS_IS_ERR(status)) {
1184 return status;
1187 /* Return variables */
1188 *uid = *r.out.uid;
1190 /* Return result */
1191 return r.out.result;
1194 struct rpccli_wbint_AllocateGid_state {
1195 struct wbint_AllocateGid orig;
1196 struct wbint_AllocateGid tmp;
1197 TALLOC_CTX *out_mem_ctx;
1198 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1201 static void rpccli_wbint_AllocateGid_done(struct tevent_req *subreq);
1203 struct tevent_req *rpccli_wbint_AllocateGid_send(TALLOC_CTX *mem_ctx,
1204 struct tevent_context *ev,
1205 struct rpc_pipe_client *cli,
1206 uint64_t *_gid /* [out] [ref] */)
1208 struct tevent_req *req;
1209 struct rpccli_wbint_AllocateGid_state *state;
1210 struct tevent_req *subreq;
1212 req = tevent_req_create(mem_ctx, &state,
1213 struct rpccli_wbint_AllocateGid_state);
1214 if (req == NULL) {
1215 return NULL;
1217 state->out_mem_ctx = NULL;
1218 state->dispatch_recv = cli->dispatch_recv;
1220 /* In parameters */
1222 /* Out parameters */
1223 state->orig.out.gid = _gid;
1225 /* Result */
1226 ZERO_STRUCT(state->orig.out.result);
1228 state->out_mem_ctx = talloc_named_const(state, 0,
1229 "rpccli_wbint_AllocateGid_out_memory");
1230 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1231 return tevent_req_post(req, ev);
1234 /* make a temporary copy, that we pass to the dispatch function */
1235 state->tmp = state->orig;
1237 subreq = cli->dispatch_send(state, ev, cli,
1238 &ndr_table_wbint,
1239 NDR_WBINT_ALLOCATEGID,
1240 &state->tmp);
1241 if (tevent_req_nomem(subreq, req)) {
1242 return tevent_req_post(req, ev);
1244 tevent_req_set_callback(subreq, rpccli_wbint_AllocateGid_done, req);
1245 return req;
1248 static void rpccli_wbint_AllocateGid_done(struct tevent_req *subreq)
1250 struct tevent_req *req = tevent_req_callback_data(
1251 subreq, struct tevent_req);
1252 struct rpccli_wbint_AllocateGid_state *state = tevent_req_data(
1253 req, struct rpccli_wbint_AllocateGid_state);
1254 NTSTATUS status;
1255 TALLOC_CTX *mem_ctx;
1257 if (state->out_mem_ctx) {
1258 mem_ctx = state->out_mem_ctx;
1259 } else {
1260 mem_ctx = state;
1263 status = state->dispatch_recv(subreq, mem_ctx);
1264 TALLOC_FREE(subreq);
1265 if (!NT_STATUS_IS_OK(status)) {
1266 tevent_req_nterror(req, status);
1267 return;
1270 /* Copy out parameters */
1271 *state->orig.out.gid = *state->tmp.out.gid;
1273 /* Copy result */
1274 state->orig.out.result = state->tmp.out.result;
1276 /* Reset temporary structure */
1277 ZERO_STRUCT(state->tmp);
1279 tevent_req_done(req);
1282 NTSTATUS rpccli_wbint_AllocateGid_recv(struct tevent_req *req,
1283 TALLOC_CTX *mem_ctx,
1284 NTSTATUS *result)
1286 struct rpccli_wbint_AllocateGid_state *state = tevent_req_data(
1287 req, struct rpccli_wbint_AllocateGid_state);
1288 NTSTATUS status;
1290 if (tevent_req_is_nterror(req, &status)) {
1291 tevent_req_received(req);
1292 return status;
1295 /* Steal possbile out parameters to the callers context */
1296 talloc_steal(mem_ctx, state->out_mem_ctx);
1298 /* Return result */
1299 *result = state->orig.out.result;
1301 tevent_req_received(req);
1302 return NT_STATUS_OK;
1305 NTSTATUS rpccli_wbint_AllocateGid(struct rpc_pipe_client *cli,
1306 TALLOC_CTX *mem_ctx,
1307 uint64_t *gid /* [out] [ref] */)
1309 struct wbint_AllocateGid r;
1310 NTSTATUS status;
1312 /* In parameters */
1314 status = cli->dispatch(cli,
1315 mem_ctx,
1316 &ndr_table_wbint,
1317 NDR_WBINT_ALLOCATEGID,
1318 &r);
1320 if (!NT_STATUS_IS_OK(status)) {
1321 return status;
1324 if (NT_STATUS_IS_ERR(status)) {
1325 return status;
1328 /* Return variables */
1329 *gid = *r.out.gid;
1331 /* Return result */
1332 return r.out.result;
1335 struct rpccli_wbint_QueryUser_state {
1336 struct wbint_QueryUser orig;
1337 struct wbint_QueryUser tmp;
1338 TALLOC_CTX *out_mem_ctx;
1339 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1342 static void rpccli_wbint_QueryUser_done(struct tevent_req *subreq);
1344 struct tevent_req *rpccli_wbint_QueryUser_send(TALLOC_CTX *mem_ctx,
1345 struct tevent_context *ev,
1346 struct rpc_pipe_client *cli,
1347 struct dom_sid *_sid /* [in] [ref] */,
1348 struct wbint_userinfo *_info /* [out] [ref] */)
1350 struct tevent_req *req;
1351 struct rpccli_wbint_QueryUser_state *state;
1352 struct tevent_req *subreq;
1354 req = tevent_req_create(mem_ctx, &state,
1355 struct rpccli_wbint_QueryUser_state);
1356 if (req == NULL) {
1357 return NULL;
1359 state->out_mem_ctx = NULL;
1360 state->dispatch_recv = cli->dispatch_recv;
1362 /* In parameters */
1363 state->orig.in.sid = _sid;
1365 /* Out parameters */
1366 state->orig.out.info = _info;
1368 /* Result */
1369 ZERO_STRUCT(state->orig.out.result);
1371 state->out_mem_ctx = talloc_named_const(state, 0,
1372 "rpccli_wbint_QueryUser_out_memory");
1373 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1374 return tevent_req_post(req, ev);
1377 /* make a temporary copy, that we pass to the dispatch function */
1378 state->tmp = state->orig;
1380 subreq = cli->dispatch_send(state, ev, cli,
1381 &ndr_table_wbint,
1382 NDR_WBINT_QUERYUSER,
1383 &state->tmp);
1384 if (tevent_req_nomem(subreq, req)) {
1385 return tevent_req_post(req, ev);
1387 tevent_req_set_callback(subreq, rpccli_wbint_QueryUser_done, req);
1388 return req;
1391 static void rpccli_wbint_QueryUser_done(struct tevent_req *subreq)
1393 struct tevent_req *req = tevent_req_callback_data(
1394 subreq, struct tevent_req);
1395 struct rpccli_wbint_QueryUser_state *state = tevent_req_data(
1396 req, struct rpccli_wbint_QueryUser_state);
1397 NTSTATUS status;
1398 TALLOC_CTX *mem_ctx;
1400 if (state->out_mem_ctx) {
1401 mem_ctx = state->out_mem_ctx;
1402 } else {
1403 mem_ctx = state;
1406 status = state->dispatch_recv(subreq, mem_ctx);
1407 TALLOC_FREE(subreq);
1408 if (!NT_STATUS_IS_OK(status)) {
1409 tevent_req_nterror(req, status);
1410 return;
1413 /* Copy out parameters */
1414 *state->orig.out.info = *state->tmp.out.info;
1416 /* Copy result */
1417 state->orig.out.result = state->tmp.out.result;
1419 /* Reset temporary structure */
1420 ZERO_STRUCT(state->tmp);
1422 tevent_req_done(req);
1425 NTSTATUS rpccli_wbint_QueryUser_recv(struct tevent_req *req,
1426 TALLOC_CTX *mem_ctx,
1427 NTSTATUS *result)
1429 struct rpccli_wbint_QueryUser_state *state = tevent_req_data(
1430 req, struct rpccli_wbint_QueryUser_state);
1431 NTSTATUS status;
1433 if (tevent_req_is_nterror(req, &status)) {
1434 tevent_req_received(req);
1435 return status;
1438 /* Steal possbile out parameters to the callers context */
1439 talloc_steal(mem_ctx, state->out_mem_ctx);
1441 /* Return result */
1442 *result = state->orig.out.result;
1444 tevent_req_received(req);
1445 return NT_STATUS_OK;
1448 NTSTATUS rpccli_wbint_QueryUser(struct rpc_pipe_client *cli,
1449 TALLOC_CTX *mem_ctx,
1450 struct dom_sid *sid /* [in] [ref] */,
1451 struct wbint_userinfo *info /* [out] [ref] */)
1453 struct wbint_QueryUser r;
1454 NTSTATUS status;
1456 /* In parameters */
1457 r.in.sid = sid;
1459 status = cli->dispatch(cli,
1460 mem_ctx,
1461 &ndr_table_wbint,
1462 NDR_WBINT_QUERYUSER,
1463 &r);
1465 if (!NT_STATUS_IS_OK(status)) {
1466 return status;
1469 if (NT_STATUS_IS_ERR(status)) {
1470 return status;
1473 /* Return variables */
1474 *info = *r.out.info;
1476 /* Return result */
1477 return r.out.result;
1480 struct rpccli_wbint_LookupUserAliases_state {
1481 struct wbint_LookupUserAliases orig;
1482 struct wbint_LookupUserAliases tmp;
1483 TALLOC_CTX *out_mem_ctx;
1484 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1487 static void rpccli_wbint_LookupUserAliases_done(struct tevent_req *subreq);
1489 struct tevent_req *rpccli_wbint_LookupUserAliases_send(TALLOC_CTX *mem_ctx,
1490 struct tevent_context *ev,
1491 struct rpc_pipe_client *cli,
1492 struct wbint_SidArray *_sids /* [in] [ref] */,
1493 struct wbint_RidArray *_rids /* [out] [ref] */)
1495 struct tevent_req *req;
1496 struct rpccli_wbint_LookupUserAliases_state *state;
1497 struct tevent_req *subreq;
1499 req = tevent_req_create(mem_ctx, &state,
1500 struct rpccli_wbint_LookupUserAliases_state);
1501 if (req == NULL) {
1502 return NULL;
1504 state->out_mem_ctx = NULL;
1505 state->dispatch_recv = cli->dispatch_recv;
1507 /* In parameters */
1508 state->orig.in.sids = _sids;
1510 /* Out parameters */
1511 state->orig.out.rids = _rids;
1513 /* Result */
1514 ZERO_STRUCT(state->orig.out.result);
1516 state->out_mem_ctx = talloc_named_const(state, 0,
1517 "rpccli_wbint_LookupUserAliases_out_memory");
1518 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1519 return tevent_req_post(req, ev);
1522 /* make a temporary copy, that we pass to the dispatch function */
1523 state->tmp = state->orig;
1525 subreq = cli->dispatch_send(state, ev, cli,
1526 &ndr_table_wbint,
1527 NDR_WBINT_LOOKUPUSERALIASES,
1528 &state->tmp);
1529 if (tevent_req_nomem(subreq, req)) {
1530 return tevent_req_post(req, ev);
1532 tevent_req_set_callback(subreq, rpccli_wbint_LookupUserAliases_done, req);
1533 return req;
1536 static void rpccli_wbint_LookupUserAliases_done(struct tevent_req *subreq)
1538 struct tevent_req *req = tevent_req_callback_data(
1539 subreq, struct tevent_req);
1540 struct rpccli_wbint_LookupUserAliases_state *state = tevent_req_data(
1541 req, struct rpccli_wbint_LookupUserAliases_state);
1542 NTSTATUS status;
1543 TALLOC_CTX *mem_ctx;
1545 if (state->out_mem_ctx) {
1546 mem_ctx = state->out_mem_ctx;
1547 } else {
1548 mem_ctx = state;
1551 status = state->dispatch_recv(subreq, mem_ctx);
1552 TALLOC_FREE(subreq);
1553 if (!NT_STATUS_IS_OK(status)) {
1554 tevent_req_nterror(req, status);
1555 return;
1558 /* Copy out parameters */
1559 *state->orig.out.rids = *state->tmp.out.rids;
1561 /* Copy result */
1562 state->orig.out.result = state->tmp.out.result;
1564 /* Reset temporary structure */
1565 ZERO_STRUCT(state->tmp);
1567 tevent_req_done(req);
1570 NTSTATUS rpccli_wbint_LookupUserAliases_recv(struct tevent_req *req,
1571 TALLOC_CTX *mem_ctx,
1572 NTSTATUS *result)
1574 struct rpccli_wbint_LookupUserAliases_state *state = tevent_req_data(
1575 req, struct rpccli_wbint_LookupUserAliases_state);
1576 NTSTATUS status;
1578 if (tevent_req_is_nterror(req, &status)) {
1579 tevent_req_received(req);
1580 return status;
1583 /* Steal possbile out parameters to the callers context */
1584 talloc_steal(mem_ctx, state->out_mem_ctx);
1586 /* Return result */
1587 *result = state->orig.out.result;
1589 tevent_req_received(req);
1590 return NT_STATUS_OK;
1593 NTSTATUS rpccli_wbint_LookupUserAliases(struct rpc_pipe_client *cli,
1594 TALLOC_CTX *mem_ctx,
1595 struct wbint_SidArray *sids /* [in] [ref] */,
1596 struct wbint_RidArray *rids /* [out] [ref] */)
1598 struct wbint_LookupUserAliases r;
1599 NTSTATUS status;
1601 /* In parameters */
1602 r.in.sids = sids;
1604 status = cli->dispatch(cli,
1605 mem_ctx,
1606 &ndr_table_wbint,
1607 NDR_WBINT_LOOKUPUSERALIASES,
1608 &r);
1610 if (!NT_STATUS_IS_OK(status)) {
1611 return status;
1614 if (NT_STATUS_IS_ERR(status)) {
1615 return status;
1618 /* Return variables */
1619 *rids = *r.out.rids;
1621 /* Return result */
1622 return r.out.result;
1625 struct rpccli_wbint_LookupUserGroups_state {
1626 struct wbint_LookupUserGroups orig;
1627 struct wbint_LookupUserGroups tmp;
1628 TALLOC_CTX *out_mem_ctx;
1629 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1632 static void rpccli_wbint_LookupUserGroups_done(struct tevent_req *subreq);
1634 struct tevent_req *rpccli_wbint_LookupUserGroups_send(TALLOC_CTX *mem_ctx,
1635 struct tevent_context *ev,
1636 struct rpc_pipe_client *cli,
1637 struct dom_sid *_sid /* [in] [ref] */,
1638 struct wbint_SidArray *_sids /* [out] [ref] */)
1640 struct tevent_req *req;
1641 struct rpccli_wbint_LookupUserGroups_state *state;
1642 struct tevent_req *subreq;
1644 req = tevent_req_create(mem_ctx, &state,
1645 struct rpccli_wbint_LookupUserGroups_state);
1646 if (req == NULL) {
1647 return NULL;
1649 state->out_mem_ctx = NULL;
1650 state->dispatch_recv = cli->dispatch_recv;
1652 /* In parameters */
1653 state->orig.in.sid = _sid;
1655 /* Out parameters */
1656 state->orig.out.sids = _sids;
1658 /* Result */
1659 ZERO_STRUCT(state->orig.out.result);
1661 state->out_mem_ctx = talloc_named_const(state, 0,
1662 "rpccli_wbint_LookupUserGroups_out_memory");
1663 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1664 return tevent_req_post(req, ev);
1667 /* make a temporary copy, that we pass to the dispatch function */
1668 state->tmp = state->orig;
1670 subreq = cli->dispatch_send(state, ev, cli,
1671 &ndr_table_wbint,
1672 NDR_WBINT_LOOKUPUSERGROUPS,
1673 &state->tmp);
1674 if (tevent_req_nomem(subreq, req)) {
1675 return tevent_req_post(req, ev);
1677 tevent_req_set_callback(subreq, rpccli_wbint_LookupUserGroups_done, req);
1678 return req;
1681 static void rpccli_wbint_LookupUserGroups_done(struct tevent_req *subreq)
1683 struct tevent_req *req = tevent_req_callback_data(
1684 subreq, struct tevent_req);
1685 struct rpccli_wbint_LookupUserGroups_state *state = tevent_req_data(
1686 req, struct rpccli_wbint_LookupUserGroups_state);
1687 NTSTATUS status;
1688 TALLOC_CTX *mem_ctx;
1690 if (state->out_mem_ctx) {
1691 mem_ctx = state->out_mem_ctx;
1692 } else {
1693 mem_ctx = state;
1696 status = state->dispatch_recv(subreq, mem_ctx);
1697 TALLOC_FREE(subreq);
1698 if (!NT_STATUS_IS_OK(status)) {
1699 tevent_req_nterror(req, status);
1700 return;
1703 /* Copy out parameters */
1704 *state->orig.out.sids = *state->tmp.out.sids;
1706 /* Copy result */
1707 state->orig.out.result = state->tmp.out.result;
1709 /* Reset temporary structure */
1710 ZERO_STRUCT(state->tmp);
1712 tevent_req_done(req);
1715 NTSTATUS rpccli_wbint_LookupUserGroups_recv(struct tevent_req *req,
1716 TALLOC_CTX *mem_ctx,
1717 NTSTATUS *result)
1719 struct rpccli_wbint_LookupUserGroups_state *state = tevent_req_data(
1720 req, struct rpccli_wbint_LookupUserGroups_state);
1721 NTSTATUS status;
1723 if (tevent_req_is_nterror(req, &status)) {
1724 tevent_req_received(req);
1725 return status;
1728 /* Steal possbile out parameters to the callers context */
1729 talloc_steal(mem_ctx, state->out_mem_ctx);
1731 /* Return result */
1732 *result = state->orig.out.result;
1734 tevent_req_received(req);
1735 return NT_STATUS_OK;
1738 NTSTATUS rpccli_wbint_LookupUserGroups(struct rpc_pipe_client *cli,
1739 TALLOC_CTX *mem_ctx,
1740 struct dom_sid *sid /* [in] [ref] */,
1741 struct wbint_SidArray *sids /* [out] [ref] */)
1743 struct wbint_LookupUserGroups r;
1744 NTSTATUS status;
1746 /* In parameters */
1747 r.in.sid = sid;
1749 status = cli->dispatch(cli,
1750 mem_ctx,
1751 &ndr_table_wbint,
1752 NDR_WBINT_LOOKUPUSERGROUPS,
1753 &r);
1755 if (!NT_STATUS_IS_OK(status)) {
1756 return status;
1759 if (NT_STATUS_IS_ERR(status)) {
1760 return status;
1763 /* Return variables */
1764 *sids = *r.out.sids;
1766 /* Return result */
1767 return r.out.result;
1770 struct rpccli_wbint_QuerySequenceNumber_state {
1771 struct wbint_QuerySequenceNumber orig;
1772 struct wbint_QuerySequenceNumber tmp;
1773 TALLOC_CTX *out_mem_ctx;
1774 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1777 static void rpccli_wbint_QuerySequenceNumber_done(struct tevent_req *subreq);
1779 struct tevent_req *rpccli_wbint_QuerySequenceNumber_send(TALLOC_CTX *mem_ctx,
1780 struct tevent_context *ev,
1781 struct rpc_pipe_client *cli,
1782 uint32_t *_sequence /* [out] [ref] */)
1784 struct tevent_req *req;
1785 struct rpccli_wbint_QuerySequenceNumber_state *state;
1786 struct tevent_req *subreq;
1788 req = tevent_req_create(mem_ctx, &state,
1789 struct rpccli_wbint_QuerySequenceNumber_state);
1790 if (req == NULL) {
1791 return NULL;
1793 state->out_mem_ctx = NULL;
1794 state->dispatch_recv = cli->dispatch_recv;
1796 /* In parameters */
1798 /* Out parameters */
1799 state->orig.out.sequence = _sequence;
1801 /* Result */
1802 ZERO_STRUCT(state->orig.out.result);
1804 state->out_mem_ctx = talloc_named_const(state, 0,
1805 "rpccli_wbint_QuerySequenceNumber_out_memory");
1806 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1807 return tevent_req_post(req, ev);
1810 /* make a temporary copy, that we pass to the dispatch function */
1811 state->tmp = state->orig;
1813 subreq = cli->dispatch_send(state, ev, cli,
1814 &ndr_table_wbint,
1815 NDR_WBINT_QUERYSEQUENCENUMBER,
1816 &state->tmp);
1817 if (tevent_req_nomem(subreq, req)) {
1818 return tevent_req_post(req, ev);
1820 tevent_req_set_callback(subreq, rpccli_wbint_QuerySequenceNumber_done, req);
1821 return req;
1824 static void rpccli_wbint_QuerySequenceNumber_done(struct tevent_req *subreq)
1826 struct tevent_req *req = tevent_req_callback_data(
1827 subreq, struct tevent_req);
1828 struct rpccli_wbint_QuerySequenceNumber_state *state = tevent_req_data(
1829 req, struct rpccli_wbint_QuerySequenceNumber_state);
1830 NTSTATUS status;
1831 TALLOC_CTX *mem_ctx;
1833 if (state->out_mem_ctx) {
1834 mem_ctx = state->out_mem_ctx;
1835 } else {
1836 mem_ctx = state;
1839 status = state->dispatch_recv(subreq, mem_ctx);
1840 TALLOC_FREE(subreq);
1841 if (!NT_STATUS_IS_OK(status)) {
1842 tevent_req_nterror(req, status);
1843 return;
1846 /* Copy out parameters */
1847 *state->orig.out.sequence = *state->tmp.out.sequence;
1849 /* Copy result */
1850 state->orig.out.result = state->tmp.out.result;
1852 /* Reset temporary structure */
1853 ZERO_STRUCT(state->tmp);
1855 tevent_req_done(req);
1858 NTSTATUS rpccli_wbint_QuerySequenceNumber_recv(struct tevent_req *req,
1859 TALLOC_CTX *mem_ctx,
1860 NTSTATUS *result)
1862 struct rpccli_wbint_QuerySequenceNumber_state *state = tevent_req_data(
1863 req, struct rpccli_wbint_QuerySequenceNumber_state);
1864 NTSTATUS status;
1866 if (tevent_req_is_nterror(req, &status)) {
1867 tevent_req_received(req);
1868 return status;
1871 /* Steal possbile out parameters to the callers context */
1872 talloc_steal(mem_ctx, state->out_mem_ctx);
1874 /* Return result */
1875 *result = state->orig.out.result;
1877 tevent_req_received(req);
1878 return NT_STATUS_OK;
1881 NTSTATUS rpccli_wbint_QuerySequenceNumber(struct rpc_pipe_client *cli,
1882 TALLOC_CTX *mem_ctx,
1883 uint32_t *sequence /* [out] [ref] */)
1885 struct wbint_QuerySequenceNumber r;
1886 NTSTATUS status;
1888 /* In parameters */
1890 status = cli->dispatch(cli,
1891 mem_ctx,
1892 &ndr_table_wbint,
1893 NDR_WBINT_QUERYSEQUENCENUMBER,
1894 &r);
1896 if (!NT_STATUS_IS_OK(status)) {
1897 return status;
1900 if (NT_STATUS_IS_ERR(status)) {
1901 return status;
1904 /* Return variables */
1905 *sequence = *r.out.sequence;
1907 /* Return result */
1908 return r.out.result;
1911 struct rpccli_wbint_LookupGroupMembers_state {
1912 struct wbint_LookupGroupMembers orig;
1913 struct wbint_LookupGroupMembers tmp;
1914 TALLOC_CTX *out_mem_ctx;
1915 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1918 static void rpccli_wbint_LookupGroupMembers_done(struct tevent_req *subreq);
1920 struct tevent_req *rpccli_wbint_LookupGroupMembers_send(TALLOC_CTX *mem_ctx,
1921 struct tevent_context *ev,
1922 struct rpc_pipe_client *cli,
1923 struct dom_sid *_sid /* [in] [ref] */,
1924 enum lsa_SidType _type /* [in] */,
1925 struct wbint_Principals *_members /* [out] [ref] */)
1927 struct tevent_req *req;
1928 struct rpccli_wbint_LookupGroupMembers_state *state;
1929 struct tevent_req *subreq;
1931 req = tevent_req_create(mem_ctx, &state,
1932 struct rpccli_wbint_LookupGroupMembers_state);
1933 if (req == NULL) {
1934 return NULL;
1936 state->out_mem_ctx = NULL;
1937 state->dispatch_recv = cli->dispatch_recv;
1939 /* In parameters */
1940 state->orig.in.sid = _sid;
1941 state->orig.in.type = _type;
1943 /* Out parameters */
1944 state->orig.out.members = _members;
1946 /* Result */
1947 ZERO_STRUCT(state->orig.out.result);
1949 state->out_mem_ctx = talloc_named_const(state, 0,
1950 "rpccli_wbint_LookupGroupMembers_out_memory");
1951 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1952 return tevent_req_post(req, ev);
1955 /* make a temporary copy, that we pass to the dispatch function */
1956 state->tmp = state->orig;
1958 subreq = cli->dispatch_send(state, ev, cli,
1959 &ndr_table_wbint,
1960 NDR_WBINT_LOOKUPGROUPMEMBERS,
1961 &state->tmp);
1962 if (tevent_req_nomem(subreq, req)) {
1963 return tevent_req_post(req, ev);
1965 tevent_req_set_callback(subreq, rpccli_wbint_LookupGroupMembers_done, req);
1966 return req;
1969 static void rpccli_wbint_LookupGroupMembers_done(struct tevent_req *subreq)
1971 struct tevent_req *req = tevent_req_callback_data(
1972 subreq, struct tevent_req);
1973 struct rpccli_wbint_LookupGroupMembers_state *state = tevent_req_data(
1974 req, struct rpccli_wbint_LookupGroupMembers_state);
1975 NTSTATUS status;
1976 TALLOC_CTX *mem_ctx;
1978 if (state->out_mem_ctx) {
1979 mem_ctx = state->out_mem_ctx;
1980 } else {
1981 mem_ctx = state;
1984 status = state->dispatch_recv(subreq, mem_ctx);
1985 TALLOC_FREE(subreq);
1986 if (!NT_STATUS_IS_OK(status)) {
1987 tevent_req_nterror(req, status);
1988 return;
1991 /* Copy out parameters */
1992 *state->orig.out.members = *state->tmp.out.members;
1994 /* Copy result */
1995 state->orig.out.result = state->tmp.out.result;
1997 /* Reset temporary structure */
1998 ZERO_STRUCT(state->tmp);
2000 tevent_req_done(req);
2003 NTSTATUS rpccli_wbint_LookupGroupMembers_recv(struct tevent_req *req,
2004 TALLOC_CTX *mem_ctx,
2005 NTSTATUS *result)
2007 struct rpccli_wbint_LookupGroupMembers_state *state = tevent_req_data(
2008 req, struct rpccli_wbint_LookupGroupMembers_state);
2009 NTSTATUS status;
2011 if (tevent_req_is_nterror(req, &status)) {
2012 tevent_req_received(req);
2013 return status;
2016 /* Steal possbile out parameters to the callers context */
2017 talloc_steal(mem_ctx, state->out_mem_ctx);
2019 /* Return result */
2020 *result = state->orig.out.result;
2022 tevent_req_received(req);
2023 return NT_STATUS_OK;
2026 NTSTATUS rpccli_wbint_LookupGroupMembers(struct rpc_pipe_client *cli,
2027 TALLOC_CTX *mem_ctx,
2028 struct dom_sid *sid /* [in] [ref] */,
2029 enum lsa_SidType type /* [in] */,
2030 struct wbint_Principals *members /* [out] [ref] */)
2032 struct wbint_LookupGroupMembers r;
2033 NTSTATUS status;
2035 /* In parameters */
2036 r.in.sid = sid;
2037 r.in.type = type;
2039 status = cli->dispatch(cli,
2040 mem_ctx,
2041 &ndr_table_wbint,
2042 NDR_WBINT_LOOKUPGROUPMEMBERS,
2043 &r);
2045 if (!NT_STATUS_IS_OK(status)) {
2046 return status;
2049 if (NT_STATUS_IS_ERR(status)) {
2050 return status;
2053 /* Return variables */
2054 *members = *r.out.members;
2056 /* Return result */
2057 return r.out.result;
2060 struct rpccli_wbint_QueryUserList_state {
2061 struct wbint_QueryUserList orig;
2062 struct wbint_QueryUserList tmp;
2063 TALLOC_CTX *out_mem_ctx;
2064 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2067 static void rpccli_wbint_QueryUserList_done(struct tevent_req *subreq);
2069 struct tevent_req *rpccli_wbint_QueryUserList_send(TALLOC_CTX *mem_ctx,
2070 struct tevent_context *ev,
2071 struct rpc_pipe_client *cli,
2072 struct wbint_userinfos *_users /* [out] [ref] */)
2074 struct tevent_req *req;
2075 struct rpccli_wbint_QueryUserList_state *state;
2076 struct tevent_req *subreq;
2078 req = tevent_req_create(mem_ctx, &state,
2079 struct rpccli_wbint_QueryUserList_state);
2080 if (req == NULL) {
2081 return NULL;
2083 state->out_mem_ctx = NULL;
2084 state->dispatch_recv = cli->dispatch_recv;
2086 /* In parameters */
2088 /* Out parameters */
2089 state->orig.out.users = _users;
2091 /* Result */
2092 ZERO_STRUCT(state->orig.out.result);
2094 state->out_mem_ctx = talloc_named_const(state, 0,
2095 "rpccli_wbint_QueryUserList_out_memory");
2096 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2097 return tevent_req_post(req, ev);
2100 /* make a temporary copy, that we pass to the dispatch function */
2101 state->tmp = state->orig;
2103 subreq = cli->dispatch_send(state, ev, cli,
2104 &ndr_table_wbint,
2105 NDR_WBINT_QUERYUSERLIST,
2106 &state->tmp);
2107 if (tevent_req_nomem(subreq, req)) {
2108 return tevent_req_post(req, ev);
2110 tevent_req_set_callback(subreq, rpccli_wbint_QueryUserList_done, req);
2111 return req;
2114 static void rpccli_wbint_QueryUserList_done(struct tevent_req *subreq)
2116 struct tevent_req *req = tevent_req_callback_data(
2117 subreq, struct tevent_req);
2118 struct rpccli_wbint_QueryUserList_state *state = tevent_req_data(
2119 req, struct rpccli_wbint_QueryUserList_state);
2120 NTSTATUS status;
2121 TALLOC_CTX *mem_ctx;
2123 if (state->out_mem_ctx) {
2124 mem_ctx = state->out_mem_ctx;
2125 } else {
2126 mem_ctx = state;
2129 status = state->dispatch_recv(subreq, mem_ctx);
2130 TALLOC_FREE(subreq);
2131 if (!NT_STATUS_IS_OK(status)) {
2132 tevent_req_nterror(req, status);
2133 return;
2136 /* Copy out parameters */
2137 *state->orig.out.users = *state->tmp.out.users;
2139 /* Copy result */
2140 state->orig.out.result = state->tmp.out.result;
2142 /* Reset temporary structure */
2143 ZERO_STRUCT(state->tmp);
2145 tevent_req_done(req);
2148 NTSTATUS rpccli_wbint_QueryUserList_recv(struct tevent_req *req,
2149 TALLOC_CTX *mem_ctx,
2150 NTSTATUS *result)
2152 struct rpccli_wbint_QueryUserList_state *state = tevent_req_data(
2153 req, struct rpccli_wbint_QueryUserList_state);
2154 NTSTATUS status;
2156 if (tevent_req_is_nterror(req, &status)) {
2157 tevent_req_received(req);
2158 return status;
2161 /* Steal possbile out parameters to the callers context */
2162 talloc_steal(mem_ctx, state->out_mem_ctx);
2164 /* Return result */
2165 *result = state->orig.out.result;
2167 tevent_req_received(req);
2168 return NT_STATUS_OK;
2171 NTSTATUS rpccli_wbint_QueryUserList(struct rpc_pipe_client *cli,
2172 TALLOC_CTX *mem_ctx,
2173 struct wbint_userinfos *users /* [out] [ref] */)
2175 struct wbint_QueryUserList r;
2176 NTSTATUS status;
2178 /* In parameters */
2180 status = cli->dispatch(cli,
2181 mem_ctx,
2182 &ndr_table_wbint,
2183 NDR_WBINT_QUERYUSERLIST,
2184 &r);
2186 if (!NT_STATUS_IS_OK(status)) {
2187 return status;
2190 if (NT_STATUS_IS_ERR(status)) {
2191 return status;
2194 /* Return variables */
2195 *users = *r.out.users;
2197 /* Return result */
2198 return r.out.result;
2201 struct rpccli_wbint_QueryGroupList_state {
2202 struct wbint_QueryGroupList orig;
2203 struct wbint_QueryGroupList tmp;
2204 TALLOC_CTX *out_mem_ctx;
2205 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2208 static void rpccli_wbint_QueryGroupList_done(struct tevent_req *subreq);
2210 struct tevent_req *rpccli_wbint_QueryGroupList_send(TALLOC_CTX *mem_ctx,
2211 struct tevent_context *ev,
2212 struct rpc_pipe_client *cli,
2213 struct wbint_Principals *_groups /* [out] [ref] */)
2215 struct tevent_req *req;
2216 struct rpccli_wbint_QueryGroupList_state *state;
2217 struct tevent_req *subreq;
2219 req = tevent_req_create(mem_ctx, &state,
2220 struct rpccli_wbint_QueryGroupList_state);
2221 if (req == NULL) {
2222 return NULL;
2224 state->out_mem_ctx = NULL;
2225 state->dispatch_recv = cli->dispatch_recv;
2227 /* In parameters */
2229 /* Out parameters */
2230 state->orig.out.groups = _groups;
2232 /* Result */
2233 ZERO_STRUCT(state->orig.out.result);
2235 state->out_mem_ctx = talloc_named_const(state, 0,
2236 "rpccli_wbint_QueryGroupList_out_memory");
2237 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2238 return tevent_req_post(req, ev);
2241 /* make a temporary copy, that we pass to the dispatch function */
2242 state->tmp = state->orig;
2244 subreq = cli->dispatch_send(state, ev, cli,
2245 &ndr_table_wbint,
2246 NDR_WBINT_QUERYGROUPLIST,
2247 &state->tmp);
2248 if (tevent_req_nomem(subreq, req)) {
2249 return tevent_req_post(req, ev);
2251 tevent_req_set_callback(subreq, rpccli_wbint_QueryGroupList_done, req);
2252 return req;
2255 static void rpccli_wbint_QueryGroupList_done(struct tevent_req *subreq)
2257 struct tevent_req *req = tevent_req_callback_data(
2258 subreq, struct tevent_req);
2259 struct rpccli_wbint_QueryGroupList_state *state = tevent_req_data(
2260 req, struct rpccli_wbint_QueryGroupList_state);
2261 NTSTATUS status;
2262 TALLOC_CTX *mem_ctx;
2264 if (state->out_mem_ctx) {
2265 mem_ctx = state->out_mem_ctx;
2266 } else {
2267 mem_ctx = state;
2270 status = state->dispatch_recv(subreq, mem_ctx);
2271 TALLOC_FREE(subreq);
2272 if (!NT_STATUS_IS_OK(status)) {
2273 tevent_req_nterror(req, status);
2274 return;
2277 /* Copy out parameters */
2278 *state->orig.out.groups = *state->tmp.out.groups;
2280 /* Copy result */
2281 state->orig.out.result = state->tmp.out.result;
2283 /* Reset temporary structure */
2284 ZERO_STRUCT(state->tmp);
2286 tevent_req_done(req);
2289 NTSTATUS rpccli_wbint_QueryGroupList_recv(struct tevent_req *req,
2290 TALLOC_CTX *mem_ctx,
2291 NTSTATUS *result)
2293 struct rpccli_wbint_QueryGroupList_state *state = tevent_req_data(
2294 req, struct rpccli_wbint_QueryGroupList_state);
2295 NTSTATUS status;
2297 if (tevent_req_is_nterror(req, &status)) {
2298 tevent_req_received(req);
2299 return status;
2302 /* Steal possbile out parameters to the callers context */
2303 talloc_steal(mem_ctx, state->out_mem_ctx);
2305 /* Return result */
2306 *result = state->orig.out.result;
2308 tevent_req_received(req);
2309 return NT_STATUS_OK;
2312 NTSTATUS rpccli_wbint_QueryGroupList(struct rpc_pipe_client *cli,
2313 TALLOC_CTX *mem_ctx,
2314 struct wbint_Principals *groups /* [out] [ref] */)
2316 struct wbint_QueryGroupList r;
2317 NTSTATUS status;
2319 /* In parameters */
2321 status = cli->dispatch(cli,
2322 mem_ctx,
2323 &ndr_table_wbint,
2324 NDR_WBINT_QUERYGROUPLIST,
2325 &r);
2327 if (!NT_STATUS_IS_OK(status)) {
2328 return status;
2331 if (NT_STATUS_IS_ERR(status)) {
2332 return status;
2335 /* Return variables */
2336 *groups = *r.out.groups;
2338 /* Return result */
2339 return r.out.result;
2342 struct rpccli_wbint_DsGetDcName_state {
2343 struct wbint_DsGetDcName orig;
2344 struct wbint_DsGetDcName tmp;
2345 TALLOC_CTX *out_mem_ctx;
2346 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2349 static void rpccli_wbint_DsGetDcName_done(struct tevent_req *subreq);
2351 struct tevent_req *rpccli_wbint_DsGetDcName_send(TALLOC_CTX *mem_ctx,
2352 struct tevent_context *ev,
2353 struct rpc_pipe_client *cli,
2354 const char *_domain_name /* [in] [ref,charset(UTF8)] */,
2355 struct GUID *_domain_guid /* [in] [unique] */,
2356 const char *_site_name /* [in] [unique,charset(UTF8)] */,
2357 uint32_t _flags /* [in] */,
2358 struct netr_DsRGetDCNameInfo **_dc_info /* [out] [ref] */)
2360 struct tevent_req *req;
2361 struct rpccli_wbint_DsGetDcName_state *state;
2362 struct tevent_req *subreq;
2364 req = tevent_req_create(mem_ctx, &state,
2365 struct rpccli_wbint_DsGetDcName_state);
2366 if (req == NULL) {
2367 return NULL;
2369 state->out_mem_ctx = NULL;
2370 state->dispatch_recv = cli->dispatch_recv;
2372 /* In parameters */
2373 state->orig.in.domain_name = _domain_name;
2374 state->orig.in.domain_guid = _domain_guid;
2375 state->orig.in.site_name = _site_name;
2376 state->orig.in.flags = _flags;
2378 /* Out parameters */
2379 state->orig.out.dc_info = _dc_info;
2381 /* Result */
2382 ZERO_STRUCT(state->orig.out.result);
2384 state->out_mem_ctx = talloc_named_const(state, 0,
2385 "rpccli_wbint_DsGetDcName_out_memory");
2386 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2387 return tevent_req_post(req, ev);
2390 /* make a temporary copy, that we pass to the dispatch function */
2391 state->tmp = state->orig;
2393 subreq = cli->dispatch_send(state, ev, cli,
2394 &ndr_table_wbint,
2395 NDR_WBINT_DSGETDCNAME,
2396 &state->tmp);
2397 if (tevent_req_nomem(subreq, req)) {
2398 return tevent_req_post(req, ev);
2400 tevent_req_set_callback(subreq, rpccli_wbint_DsGetDcName_done, req);
2401 return req;
2404 static void rpccli_wbint_DsGetDcName_done(struct tevent_req *subreq)
2406 struct tevent_req *req = tevent_req_callback_data(
2407 subreq, struct tevent_req);
2408 struct rpccli_wbint_DsGetDcName_state *state = tevent_req_data(
2409 req, struct rpccli_wbint_DsGetDcName_state);
2410 NTSTATUS status;
2411 TALLOC_CTX *mem_ctx;
2413 if (state->out_mem_ctx) {
2414 mem_ctx = state->out_mem_ctx;
2415 } else {
2416 mem_ctx = state;
2419 status = state->dispatch_recv(subreq, mem_ctx);
2420 TALLOC_FREE(subreq);
2421 if (!NT_STATUS_IS_OK(status)) {
2422 tevent_req_nterror(req, status);
2423 return;
2426 /* Copy out parameters */
2427 *state->orig.out.dc_info = *state->tmp.out.dc_info;
2429 /* Copy result */
2430 state->orig.out.result = state->tmp.out.result;
2432 /* Reset temporary structure */
2433 ZERO_STRUCT(state->tmp);
2435 tevent_req_done(req);
2438 NTSTATUS rpccli_wbint_DsGetDcName_recv(struct tevent_req *req,
2439 TALLOC_CTX *mem_ctx,
2440 NTSTATUS *result)
2442 struct rpccli_wbint_DsGetDcName_state *state = tevent_req_data(
2443 req, struct rpccli_wbint_DsGetDcName_state);
2444 NTSTATUS status;
2446 if (tevent_req_is_nterror(req, &status)) {
2447 tevent_req_received(req);
2448 return status;
2451 /* Steal possbile out parameters to the callers context */
2452 talloc_steal(mem_ctx, state->out_mem_ctx);
2454 /* Return result */
2455 *result = state->orig.out.result;
2457 tevent_req_received(req);
2458 return NT_STATUS_OK;
2461 NTSTATUS rpccli_wbint_DsGetDcName(struct rpc_pipe_client *cli,
2462 TALLOC_CTX *mem_ctx,
2463 const char *domain_name /* [in] [ref,charset(UTF8)] */,
2464 struct GUID *domain_guid /* [in] [unique] */,
2465 const char *site_name /* [in] [unique,charset(UTF8)] */,
2466 uint32_t flags /* [in] */,
2467 struct netr_DsRGetDCNameInfo **dc_info /* [out] [ref] */)
2469 struct wbint_DsGetDcName r;
2470 NTSTATUS status;
2472 /* In parameters */
2473 r.in.domain_name = domain_name;
2474 r.in.domain_guid = domain_guid;
2475 r.in.site_name = site_name;
2476 r.in.flags = flags;
2478 status = cli->dispatch(cli,
2479 mem_ctx,
2480 &ndr_table_wbint,
2481 NDR_WBINT_DSGETDCNAME,
2482 &r);
2484 if (!NT_STATUS_IS_OK(status)) {
2485 return status;
2488 if (NT_STATUS_IS_ERR(status)) {
2489 return status;
2492 /* Return variables */
2493 *dc_info = *r.out.dc_info;
2495 /* Return result */
2496 return r.out.result;
2499 struct rpccli_wbint_LookupRids_state {
2500 struct wbint_LookupRids orig;
2501 struct wbint_LookupRids tmp;
2502 TALLOC_CTX *out_mem_ctx;
2503 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2506 static void rpccli_wbint_LookupRids_done(struct tevent_req *subreq);
2508 struct tevent_req *rpccli_wbint_LookupRids_send(TALLOC_CTX *mem_ctx,
2509 struct tevent_context *ev,
2510 struct rpc_pipe_client *cli,
2511 struct wbint_RidArray *_rids /* [in] [ref] */,
2512 const char **_domain_name /* [out] [ref,charset(UTF8)] */,
2513 struct wbint_Principals *_names /* [out] [ref] */)
2515 struct tevent_req *req;
2516 struct rpccli_wbint_LookupRids_state *state;
2517 struct tevent_req *subreq;
2519 req = tevent_req_create(mem_ctx, &state,
2520 struct rpccli_wbint_LookupRids_state);
2521 if (req == NULL) {
2522 return NULL;
2524 state->out_mem_ctx = NULL;
2525 state->dispatch_recv = cli->dispatch_recv;
2527 /* In parameters */
2528 state->orig.in.rids = _rids;
2530 /* Out parameters */
2531 state->orig.out.domain_name = _domain_name;
2532 state->orig.out.names = _names;
2534 /* Result */
2535 ZERO_STRUCT(state->orig.out.result);
2537 state->out_mem_ctx = talloc_named_const(state, 0,
2538 "rpccli_wbint_LookupRids_out_memory");
2539 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2540 return tevent_req_post(req, ev);
2543 /* make a temporary copy, that we pass to the dispatch function */
2544 state->tmp = state->orig;
2546 subreq = cli->dispatch_send(state, ev, cli,
2547 &ndr_table_wbint,
2548 NDR_WBINT_LOOKUPRIDS,
2549 &state->tmp);
2550 if (tevent_req_nomem(subreq, req)) {
2551 return tevent_req_post(req, ev);
2553 tevent_req_set_callback(subreq, rpccli_wbint_LookupRids_done, req);
2554 return req;
2557 static void rpccli_wbint_LookupRids_done(struct tevent_req *subreq)
2559 struct tevent_req *req = tevent_req_callback_data(
2560 subreq, struct tevent_req);
2561 struct rpccli_wbint_LookupRids_state *state = tevent_req_data(
2562 req, struct rpccli_wbint_LookupRids_state);
2563 NTSTATUS status;
2564 TALLOC_CTX *mem_ctx;
2566 if (state->out_mem_ctx) {
2567 mem_ctx = state->out_mem_ctx;
2568 } else {
2569 mem_ctx = state;
2572 status = state->dispatch_recv(subreq, mem_ctx);
2573 TALLOC_FREE(subreq);
2574 if (!NT_STATUS_IS_OK(status)) {
2575 tevent_req_nterror(req, status);
2576 return;
2579 /* Copy out parameters */
2580 *state->orig.out.domain_name = *state->tmp.out.domain_name;
2581 *state->orig.out.names = *state->tmp.out.names;
2583 /* Copy result */
2584 state->orig.out.result = state->tmp.out.result;
2586 /* Reset temporary structure */
2587 ZERO_STRUCT(state->tmp);
2589 tevent_req_done(req);
2592 NTSTATUS rpccli_wbint_LookupRids_recv(struct tevent_req *req,
2593 TALLOC_CTX *mem_ctx,
2594 NTSTATUS *result)
2596 struct rpccli_wbint_LookupRids_state *state = tevent_req_data(
2597 req, struct rpccli_wbint_LookupRids_state);
2598 NTSTATUS status;
2600 if (tevent_req_is_nterror(req, &status)) {
2601 tevent_req_received(req);
2602 return status;
2605 /* Steal possbile out parameters to the callers context */
2606 talloc_steal(mem_ctx, state->out_mem_ctx);
2608 /* Return result */
2609 *result = state->orig.out.result;
2611 tevent_req_received(req);
2612 return NT_STATUS_OK;
2615 NTSTATUS rpccli_wbint_LookupRids(struct rpc_pipe_client *cli,
2616 TALLOC_CTX *mem_ctx,
2617 struct wbint_RidArray *rids /* [in] [ref] */,
2618 const char **domain_name /* [out] [ref,charset(UTF8)] */,
2619 struct wbint_Principals *names /* [out] [ref] */)
2621 struct wbint_LookupRids r;
2622 NTSTATUS status;
2624 /* In parameters */
2625 r.in.rids = rids;
2627 status = cli->dispatch(cli,
2628 mem_ctx,
2629 &ndr_table_wbint,
2630 NDR_WBINT_LOOKUPRIDS,
2631 &r);
2633 if (!NT_STATUS_IS_OK(status)) {
2634 return status;
2637 if (NT_STATUS_IS_ERR(status)) {
2638 return status;
2641 /* Return variables */
2642 *domain_name = *r.out.domain_name;
2643 *names = *r.out.names;
2645 /* Return result */
2646 return r.out.result;
2649 struct rpccli_wbint_CheckMachineAccount_state {
2650 struct wbint_CheckMachineAccount orig;
2651 struct wbint_CheckMachineAccount tmp;
2652 TALLOC_CTX *out_mem_ctx;
2653 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2656 static void rpccli_wbint_CheckMachineAccount_done(struct tevent_req *subreq);
2658 struct tevent_req *rpccli_wbint_CheckMachineAccount_send(TALLOC_CTX *mem_ctx,
2659 struct tevent_context *ev,
2660 struct rpc_pipe_client *cli)
2662 struct tevent_req *req;
2663 struct rpccli_wbint_CheckMachineAccount_state *state;
2664 struct tevent_req *subreq;
2666 req = tevent_req_create(mem_ctx, &state,
2667 struct rpccli_wbint_CheckMachineAccount_state);
2668 if (req == NULL) {
2669 return NULL;
2671 state->out_mem_ctx = NULL;
2672 state->dispatch_recv = cli->dispatch_recv;
2674 /* In parameters */
2676 /* Out parameters */
2678 /* Result */
2679 ZERO_STRUCT(state->orig.out.result);
2681 /* make a temporary copy, that we pass to the dispatch function */
2682 state->tmp = state->orig;
2684 subreq = cli->dispatch_send(state, ev, cli,
2685 &ndr_table_wbint,
2686 NDR_WBINT_CHECKMACHINEACCOUNT,
2687 &state->tmp);
2688 if (tevent_req_nomem(subreq, req)) {
2689 return tevent_req_post(req, ev);
2691 tevent_req_set_callback(subreq, rpccli_wbint_CheckMachineAccount_done, req);
2692 return req;
2695 static void rpccli_wbint_CheckMachineAccount_done(struct tevent_req *subreq)
2697 struct tevent_req *req = tevent_req_callback_data(
2698 subreq, struct tevent_req);
2699 struct rpccli_wbint_CheckMachineAccount_state *state = tevent_req_data(
2700 req, struct rpccli_wbint_CheckMachineAccount_state);
2701 NTSTATUS status;
2702 TALLOC_CTX *mem_ctx;
2704 if (state->out_mem_ctx) {
2705 mem_ctx = state->out_mem_ctx;
2706 } else {
2707 mem_ctx = state;
2710 status = state->dispatch_recv(subreq, mem_ctx);
2711 TALLOC_FREE(subreq);
2712 if (!NT_STATUS_IS_OK(status)) {
2713 tevent_req_nterror(req, status);
2714 return;
2717 /* Copy out parameters */
2719 /* Copy result */
2720 state->orig.out.result = state->tmp.out.result;
2722 /* Reset temporary structure */
2723 ZERO_STRUCT(state->tmp);
2725 tevent_req_done(req);
2728 NTSTATUS rpccli_wbint_CheckMachineAccount_recv(struct tevent_req *req,
2729 TALLOC_CTX *mem_ctx,
2730 NTSTATUS *result)
2732 struct rpccli_wbint_CheckMachineAccount_state *state = tevent_req_data(
2733 req, struct rpccli_wbint_CheckMachineAccount_state);
2734 NTSTATUS status;
2736 if (tevent_req_is_nterror(req, &status)) {
2737 tevent_req_received(req);
2738 return status;
2741 /* Steal possbile out parameters to the callers context */
2742 talloc_steal(mem_ctx, state->out_mem_ctx);
2744 /* Return result */
2745 *result = state->orig.out.result;
2747 tevent_req_received(req);
2748 return NT_STATUS_OK;
2751 NTSTATUS rpccli_wbint_CheckMachineAccount(struct rpc_pipe_client *cli,
2752 TALLOC_CTX *mem_ctx)
2754 struct wbint_CheckMachineAccount r;
2755 NTSTATUS status;
2757 /* In parameters */
2759 status = cli->dispatch(cli,
2760 mem_ctx,
2761 &ndr_table_wbint,
2762 NDR_WBINT_CHECKMACHINEACCOUNT,
2763 &r);
2765 if (!NT_STATUS_IS_OK(status)) {
2766 return status;
2769 if (NT_STATUS_IS_ERR(status)) {
2770 return status;
2773 /* Return variables */
2775 /* Return result */
2776 return r.out.result;
2779 struct rpccli_wbint_ChangeMachineAccount_state {
2780 struct wbint_ChangeMachineAccount orig;
2781 struct wbint_ChangeMachineAccount tmp;
2782 TALLOC_CTX *out_mem_ctx;
2783 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2786 static void rpccli_wbint_ChangeMachineAccount_done(struct tevent_req *subreq);
2788 struct tevent_req *rpccli_wbint_ChangeMachineAccount_send(TALLOC_CTX *mem_ctx,
2789 struct tevent_context *ev,
2790 struct rpc_pipe_client *cli)
2792 struct tevent_req *req;
2793 struct rpccli_wbint_ChangeMachineAccount_state *state;
2794 struct tevent_req *subreq;
2796 req = tevent_req_create(mem_ctx, &state,
2797 struct rpccli_wbint_ChangeMachineAccount_state);
2798 if (req == NULL) {
2799 return NULL;
2801 state->out_mem_ctx = NULL;
2802 state->dispatch_recv = cli->dispatch_recv;
2804 /* In parameters */
2806 /* Out parameters */
2808 /* Result */
2809 ZERO_STRUCT(state->orig.out.result);
2811 /* make a temporary copy, that we pass to the dispatch function */
2812 state->tmp = state->orig;
2814 subreq = cli->dispatch_send(state, ev, cli,
2815 &ndr_table_wbint,
2816 NDR_WBINT_CHANGEMACHINEACCOUNT,
2817 &state->tmp);
2818 if (tevent_req_nomem(subreq, req)) {
2819 return tevent_req_post(req, ev);
2821 tevent_req_set_callback(subreq, rpccli_wbint_ChangeMachineAccount_done, req);
2822 return req;
2825 static void rpccli_wbint_ChangeMachineAccount_done(struct tevent_req *subreq)
2827 struct tevent_req *req = tevent_req_callback_data(
2828 subreq, struct tevent_req);
2829 struct rpccli_wbint_ChangeMachineAccount_state *state = tevent_req_data(
2830 req, struct rpccli_wbint_ChangeMachineAccount_state);
2831 NTSTATUS status;
2832 TALLOC_CTX *mem_ctx;
2834 if (state->out_mem_ctx) {
2835 mem_ctx = state->out_mem_ctx;
2836 } else {
2837 mem_ctx = state;
2840 status = state->dispatch_recv(subreq, mem_ctx);
2841 TALLOC_FREE(subreq);
2842 if (!NT_STATUS_IS_OK(status)) {
2843 tevent_req_nterror(req, status);
2844 return;
2847 /* Copy out parameters */
2849 /* Copy result */
2850 state->orig.out.result = state->tmp.out.result;
2852 /* Reset temporary structure */
2853 ZERO_STRUCT(state->tmp);
2855 tevent_req_done(req);
2858 NTSTATUS rpccli_wbint_ChangeMachineAccount_recv(struct tevent_req *req,
2859 TALLOC_CTX *mem_ctx,
2860 NTSTATUS *result)
2862 struct rpccli_wbint_ChangeMachineAccount_state *state = tevent_req_data(
2863 req, struct rpccli_wbint_ChangeMachineAccount_state);
2864 NTSTATUS status;
2866 if (tevent_req_is_nterror(req, &status)) {
2867 tevent_req_received(req);
2868 return status;
2871 /* Steal possbile out parameters to the callers context */
2872 talloc_steal(mem_ctx, state->out_mem_ctx);
2874 /* Return result */
2875 *result = state->orig.out.result;
2877 tevent_req_received(req);
2878 return NT_STATUS_OK;
2881 NTSTATUS rpccli_wbint_ChangeMachineAccount(struct rpc_pipe_client *cli,
2882 TALLOC_CTX *mem_ctx)
2884 struct wbint_ChangeMachineAccount r;
2885 NTSTATUS status;
2887 /* In parameters */
2889 status = cli->dispatch(cli,
2890 mem_ctx,
2891 &ndr_table_wbint,
2892 NDR_WBINT_CHANGEMACHINEACCOUNT,
2893 &r);
2895 if (!NT_STATUS_IS_OK(status)) {
2896 return status;
2899 if (NT_STATUS_IS_ERR(status)) {
2900 return status;
2903 /* Return variables */
2905 /* Return result */
2906 return r.out.result;
2909 struct rpccli_wbint_PingDc_state {
2910 struct wbint_PingDc orig;
2911 struct wbint_PingDc tmp;
2912 TALLOC_CTX *out_mem_ctx;
2913 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2916 static void rpccli_wbint_PingDc_done(struct tevent_req *subreq);
2918 struct tevent_req *rpccli_wbint_PingDc_send(TALLOC_CTX *mem_ctx,
2919 struct tevent_context *ev,
2920 struct rpc_pipe_client *cli)
2922 struct tevent_req *req;
2923 struct rpccli_wbint_PingDc_state *state;
2924 struct tevent_req *subreq;
2926 req = tevent_req_create(mem_ctx, &state,
2927 struct rpccli_wbint_PingDc_state);
2928 if (req == NULL) {
2929 return NULL;
2931 state->out_mem_ctx = NULL;
2932 state->dispatch_recv = cli->dispatch_recv;
2934 /* In parameters */
2936 /* Out parameters */
2938 /* Result */
2939 ZERO_STRUCT(state->orig.out.result);
2941 /* make a temporary copy, that we pass to the dispatch function */
2942 state->tmp = state->orig;
2944 subreq = cli->dispatch_send(state, ev, cli,
2945 &ndr_table_wbint,
2946 NDR_WBINT_PINGDC,
2947 &state->tmp);
2948 if (tevent_req_nomem(subreq, req)) {
2949 return tevent_req_post(req, ev);
2951 tevent_req_set_callback(subreq, rpccli_wbint_PingDc_done, req);
2952 return req;
2955 static void rpccli_wbint_PingDc_done(struct tevent_req *subreq)
2957 struct tevent_req *req = tevent_req_callback_data(
2958 subreq, struct tevent_req);
2959 struct rpccli_wbint_PingDc_state *state = tevent_req_data(
2960 req, struct rpccli_wbint_PingDc_state);
2961 NTSTATUS status;
2962 TALLOC_CTX *mem_ctx;
2964 if (state->out_mem_ctx) {
2965 mem_ctx = state->out_mem_ctx;
2966 } else {
2967 mem_ctx = state;
2970 status = state->dispatch_recv(subreq, mem_ctx);
2971 TALLOC_FREE(subreq);
2972 if (!NT_STATUS_IS_OK(status)) {
2973 tevent_req_nterror(req, status);
2974 return;
2977 /* Copy out parameters */
2979 /* Copy result */
2980 state->orig.out.result = state->tmp.out.result;
2982 /* Reset temporary structure */
2983 ZERO_STRUCT(state->tmp);
2985 tevent_req_done(req);
2988 NTSTATUS rpccli_wbint_PingDc_recv(struct tevent_req *req,
2989 TALLOC_CTX *mem_ctx,
2990 NTSTATUS *result)
2992 struct rpccli_wbint_PingDc_state *state = tevent_req_data(
2993 req, struct rpccli_wbint_PingDc_state);
2994 NTSTATUS status;
2996 if (tevent_req_is_nterror(req, &status)) {
2997 tevent_req_received(req);
2998 return status;
3001 /* Steal possbile out parameters to the callers context */
3002 talloc_steal(mem_ctx, state->out_mem_ctx);
3004 /* Return result */
3005 *result = state->orig.out.result;
3007 tevent_req_received(req);
3008 return NT_STATUS_OK;
3011 NTSTATUS rpccli_wbint_PingDc(struct rpc_pipe_client *cli,
3012 TALLOC_CTX *mem_ctx)
3014 struct wbint_PingDc r;
3015 NTSTATUS status;
3017 /* In parameters */
3019 status = cli->dispatch(cli,
3020 mem_ctx,
3021 &ndr_table_wbint,
3022 NDR_WBINT_PINGDC,
3023 &r);
3025 if (!NT_STATUS_IS_OK(status)) {
3026 return status;
3029 if (NT_STATUS_IS_ERR(status)) {
3030 return status;
3033 /* Return variables */
3035 /* Return result */
3036 return r.out.result;
3039 struct rpccli_wbint_SetMapping_state {
3040 struct wbint_SetMapping orig;
3041 struct wbint_SetMapping tmp;
3042 TALLOC_CTX *out_mem_ctx;
3043 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3046 static void rpccli_wbint_SetMapping_done(struct tevent_req *subreq);
3048 struct tevent_req *rpccli_wbint_SetMapping_send(TALLOC_CTX *mem_ctx,
3049 struct tevent_context *ev,
3050 struct rpc_pipe_client *cli,
3051 struct dom_sid *_sid /* [in] [ref] */,
3052 enum wbint_IdType _type /* [in] */,
3053 uint64_t _id /* [in] */)
3055 struct tevent_req *req;
3056 struct rpccli_wbint_SetMapping_state *state;
3057 struct tevent_req *subreq;
3059 req = tevent_req_create(mem_ctx, &state,
3060 struct rpccli_wbint_SetMapping_state);
3061 if (req == NULL) {
3062 return NULL;
3064 state->out_mem_ctx = NULL;
3065 state->dispatch_recv = cli->dispatch_recv;
3067 /* In parameters */
3068 state->orig.in.sid = _sid;
3069 state->orig.in.type = _type;
3070 state->orig.in.id = _id;
3072 /* Out parameters */
3074 /* Result */
3075 ZERO_STRUCT(state->orig.out.result);
3077 /* make a temporary copy, that we pass to the dispatch function */
3078 state->tmp = state->orig;
3080 subreq = cli->dispatch_send(state, ev, cli,
3081 &ndr_table_wbint,
3082 NDR_WBINT_SETMAPPING,
3083 &state->tmp);
3084 if (tevent_req_nomem(subreq, req)) {
3085 return tevent_req_post(req, ev);
3087 tevent_req_set_callback(subreq, rpccli_wbint_SetMapping_done, req);
3088 return req;
3091 static void rpccli_wbint_SetMapping_done(struct tevent_req *subreq)
3093 struct tevent_req *req = tevent_req_callback_data(
3094 subreq, struct tevent_req);
3095 struct rpccli_wbint_SetMapping_state *state = tevent_req_data(
3096 req, struct rpccli_wbint_SetMapping_state);
3097 NTSTATUS status;
3098 TALLOC_CTX *mem_ctx;
3100 if (state->out_mem_ctx) {
3101 mem_ctx = state->out_mem_ctx;
3102 } else {
3103 mem_ctx = state;
3106 status = state->dispatch_recv(subreq, mem_ctx);
3107 TALLOC_FREE(subreq);
3108 if (!NT_STATUS_IS_OK(status)) {
3109 tevent_req_nterror(req, status);
3110 return;
3113 /* Copy out parameters */
3115 /* Copy result */
3116 state->orig.out.result = state->tmp.out.result;
3118 /* Reset temporary structure */
3119 ZERO_STRUCT(state->tmp);
3121 tevent_req_done(req);
3124 NTSTATUS rpccli_wbint_SetMapping_recv(struct tevent_req *req,
3125 TALLOC_CTX *mem_ctx,
3126 NTSTATUS *result)
3128 struct rpccli_wbint_SetMapping_state *state = tevent_req_data(
3129 req, struct rpccli_wbint_SetMapping_state);
3130 NTSTATUS status;
3132 if (tevent_req_is_nterror(req, &status)) {
3133 tevent_req_received(req);
3134 return status;
3137 /* Steal possbile out parameters to the callers context */
3138 talloc_steal(mem_ctx, state->out_mem_ctx);
3140 /* Return result */
3141 *result = state->orig.out.result;
3143 tevent_req_received(req);
3144 return NT_STATUS_OK;
3147 NTSTATUS rpccli_wbint_SetMapping(struct rpc_pipe_client *cli,
3148 TALLOC_CTX *mem_ctx,
3149 struct dom_sid *sid /* [in] [ref] */,
3150 enum wbint_IdType type /* [in] */,
3151 uint64_t id /* [in] */)
3153 struct wbint_SetMapping r;
3154 NTSTATUS status;
3156 /* In parameters */
3157 r.in.sid = sid;
3158 r.in.type = type;
3159 r.in.id = id;
3161 status = cli->dispatch(cli,
3162 mem_ctx,
3163 &ndr_table_wbint,
3164 NDR_WBINT_SETMAPPING,
3165 &r);
3167 if (!NT_STATUS_IS_OK(status)) {
3168 return status;
3171 if (NT_STATUS_IS_ERR(status)) {
3172 return status;
3175 /* Return variables */
3177 /* Return result */
3178 return r.out.result;
3181 struct rpccli_wbint_RemoveMapping_state {
3182 struct wbint_RemoveMapping orig;
3183 struct wbint_RemoveMapping tmp;
3184 TALLOC_CTX *out_mem_ctx;
3185 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3188 static void rpccli_wbint_RemoveMapping_done(struct tevent_req *subreq);
3190 struct tevent_req *rpccli_wbint_RemoveMapping_send(TALLOC_CTX *mem_ctx,
3191 struct tevent_context *ev,
3192 struct rpc_pipe_client *cli,
3193 struct dom_sid *_sid /* [in] [ref] */,
3194 enum wbint_IdType _type /* [in] */,
3195 uint64_t _id /* [in] */)
3197 struct tevent_req *req;
3198 struct rpccli_wbint_RemoveMapping_state *state;
3199 struct tevent_req *subreq;
3201 req = tevent_req_create(mem_ctx, &state,
3202 struct rpccli_wbint_RemoveMapping_state);
3203 if (req == NULL) {
3204 return NULL;
3206 state->out_mem_ctx = NULL;
3207 state->dispatch_recv = cli->dispatch_recv;
3209 /* In parameters */
3210 state->orig.in.sid = _sid;
3211 state->orig.in.type = _type;
3212 state->orig.in.id = _id;
3214 /* Out parameters */
3216 /* Result */
3217 ZERO_STRUCT(state->orig.out.result);
3219 /* make a temporary copy, that we pass to the dispatch function */
3220 state->tmp = state->orig;
3222 subreq = cli->dispatch_send(state, ev, cli,
3223 &ndr_table_wbint,
3224 NDR_WBINT_REMOVEMAPPING,
3225 &state->tmp);
3226 if (tevent_req_nomem(subreq, req)) {
3227 return tevent_req_post(req, ev);
3229 tevent_req_set_callback(subreq, rpccli_wbint_RemoveMapping_done, req);
3230 return req;
3233 static void rpccli_wbint_RemoveMapping_done(struct tevent_req *subreq)
3235 struct tevent_req *req = tevent_req_callback_data(
3236 subreq, struct tevent_req);
3237 struct rpccli_wbint_RemoveMapping_state *state = tevent_req_data(
3238 req, struct rpccli_wbint_RemoveMapping_state);
3239 NTSTATUS status;
3240 TALLOC_CTX *mem_ctx;
3242 if (state->out_mem_ctx) {
3243 mem_ctx = state->out_mem_ctx;
3244 } else {
3245 mem_ctx = state;
3248 status = state->dispatch_recv(subreq, mem_ctx);
3249 TALLOC_FREE(subreq);
3250 if (!NT_STATUS_IS_OK(status)) {
3251 tevent_req_nterror(req, status);
3252 return;
3255 /* Copy out parameters */
3257 /* Copy result */
3258 state->orig.out.result = state->tmp.out.result;
3260 /* Reset temporary structure */
3261 ZERO_STRUCT(state->tmp);
3263 tevent_req_done(req);
3266 NTSTATUS rpccli_wbint_RemoveMapping_recv(struct tevent_req *req,
3267 TALLOC_CTX *mem_ctx,
3268 NTSTATUS *result)
3270 struct rpccli_wbint_RemoveMapping_state *state = tevent_req_data(
3271 req, struct rpccli_wbint_RemoveMapping_state);
3272 NTSTATUS status;
3274 if (tevent_req_is_nterror(req, &status)) {
3275 tevent_req_received(req);
3276 return status;
3279 /* Steal possbile out parameters to the callers context */
3280 talloc_steal(mem_ctx, state->out_mem_ctx);
3282 /* Return result */
3283 *result = state->orig.out.result;
3285 tevent_req_received(req);
3286 return NT_STATUS_OK;
3289 NTSTATUS rpccli_wbint_RemoveMapping(struct rpc_pipe_client *cli,
3290 TALLOC_CTX *mem_ctx,
3291 struct dom_sid *sid /* [in] [ref] */,
3292 enum wbint_IdType type /* [in] */,
3293 uint64_t id /* [in] */)
3295 struct wbint_RemoveMapping r;
3296 NTSTATUS status;
3298 /* In parameters */
3299 r.in.sid = sid;
3300 r.in.type = type;
3301 r.in.id = id;
3303 status = cli->dispatch(cli,
3304 mem_ctx,
3305 &ndr_table_wbint,
3306 NDR_WBINT_REMOVEMAPPING,
3307 &r);
3309 if (!NT_STATUS_IS_OK(status)) {
3310 return status;
3313 if (NT_STATUS_IS_ERR(status)) {
3314 return status;
3317 /* Return variables */
3319 /* Return result */
3320 return r.out.result;
3323 struct rpccli_wbint_SetHWM_state {
3324 struct wbint_SetHWM orig;
3325 struct wbint_SetHWM tmp;
3326 TALLOC_CTX *out_mem_ctx;
3327 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3330 static void rpccli_wbint_SetHWM_done(struct tevent_req *subreq);
3332 struct tevent_req *rpccli_wbint_SetHWM_send(TALLOC_CTX *mem_ctx,
3333 struct tevent_context *ev,
3334 struct rpc_pipe_client *cli,
3335 enum wbint_IdType _type /* [in] */,
3336 uint64_t _id /* [in] */)
3338 struct tevent_req *req;
3339 struct rpccli_wbint_SetHWM_state *state;
3340 struct tevent_req *subreq;
3342 req = tevent_req_create(mem_ctx, &state,
3343 struct rpccli_wbint_SetHWM_state);
3344 if (req == NULL) {
3345 return NULL;
3347 state->out_mem_ctx = NULL;
3348 state->dispatch_recv = cli->dispatch_recv;
3350 /* In parameters */
3351 state->orig.in.type = _type;
3352 state->orig.in.id = _id;
3354 /* Out parameters */
3356 /* Result */
3357 ZERO_STRUCT(state->orig.out.result);
3359 /* make a temporary copy, that we pass to the dispatch function */
3360 state->tmp = state->orig;
3362 subreq = cli->dispatch_send(state, ev, cli,
3363 &ndr_table_wbint,
3364 NDR_WBINT_SETHWM,
3365 &state->tmp);
3366 if (tevent_req_nomem(subreq, req)) {
3367 return tevent_req_post(req, ev);
3369 tevent_req_set_callback(subreq, rpccli_wbint_SetHWM_done, req);
3370 return req;
3373 static void rpccli_wbint_SetHWM_done(struct tevent_req *subreq)
3375 struct tevent_req *req = tevent_req_callback_data(
3376 subreq, struct tevent_req);
3377 struct rpccli_wbint_SetHWM_state *state = tevent_req_data(
3378 req, struct rpccli_wbint_SetHWM_state);
3379 NTSTATUS status;
3380 TALLOC_CTX *mem_ctx;
3382 if (state->out_mem_ctx) {
3383 mem_ctx = state->out_mem_ctx;
3384 } else {
3385 mem_ctx = state;
3388 status = state->dispatch_recv(subreq, mem_ctx);
3389 TALLOC_FREE(subreq);
3390 if (!NT_STATUS_IS_OK(status)) {
3391 tevent_req_nterror(req, status);
3392 return;
3395 /* Copy out parameters */
3397 /* Copy result */
3398 state->orig.out.result = state->tmp.out.result;
3400 /* Reset temporary structure */
3401 ZERO_STRUCT(state->tmp);
3403 tevent_req_done(req);
3406 NTSTATUS rpccli_wbint_SetHWM_recv(struct tevent_req *req,
3407 TALLOC_CTX *mem_ctx,
3408 NTSTATUS *result)
3410 struct rpccli_wbint_SetHWM_state *state = tevent_req_data(
3411 req, struct rpccli_wbint_SetHWM_state);
3412 NTSTATUS status;
3414 if (tevent_req_is_nterror(req, &status)) {
3415 tevent_req_received(req);
3416 return status;
3419 /* Steal possbile out parameters to the callers context */
3420 talloc_steal(mem_ctx, state->out_mem_ctx);
3422 /* Return result */
3423 *result = state->orig.out.result;
3425 tevent_req_received(req);
3426 return NT_STATUS_OK;
3429 NTSTATUS rpccli_wbint_SetHWM(struct rpc_pipe_client *cli,
3430 TALLOC_CTX *mem_ctx,
3431 enum wbint_IdType type /* [in] */,
3432 uint64_t id /* [in] */)
3434 struct wbint_SetHWM r;
3435 NTSTATUS status;
3437 /* In parameters */
3438 r.in.type = type;
3439 r.in.id = id;
3441 status = cli->dispatch(cli,
3442 mem_ctx,
3443 &ndr_table_wbint,
3444 NDR_WBINT_SETHWM,
3445 &r);
3447 if (!NT_STATUS_IS_OK(status)) {
3448 return status;
3451 if (NT_STATUS_IS_ERR(status)) {
3452 return status;
3455 /* Return variables */
3457 /* Return result */
3458 return r.out.result;