2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/cli_wkssvc.h"
9 struct rpccli_wkssvc_NetWkstaGetInfo_state {
10 struct wkssvc_NetWkstaGetInfo orig;
11 struct wkssvc_NetWkstaGetInfo tmp;
12 TALLOC_CTX *out_mem_ctx;
13 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
16 static void rpccli_wkssvc_NetWkstaGetInfo_done(struct tevent_req *subreq);
18 struct tevent_req *rpccli_wkssvc_NetWkstaGetInfo_send(TALLOC_CTX *mem_ctx,
19 struct tevent_context *ev,
20 struct rpc_pipe_client *cli,
21 const char *_server_name /* [in] [unique,charset(UTF16)] */,
22 uint32_t _level /* [in] */,
23 union wkssvc_NetWkstaInfo *_info /* [out] [ref,switch_is(level)] */)
25 struct tevent_req *req;
26 struct rpccli_wkssvc_NetWkstaGetInfo_state *state;
27 struct tevent_req *subreq;
29 req = tevent_req_create(mem_ctx, &state,
30 struct rpccli_wkssvc_NetWkstaGetInfo_state);
34 state->out_mem_ctx = NULL;
35 state->dispatch_recv = cli->dispatch_recv;
38 state->orig.in.server_name = _server_name;
39 state->orig.in.level = _level;
42 state->orig.out.info = _info;
45 ZERO_STRUCT(state->orig.out.result);
47 if (DEBUGLEVEL >= 10) {
48 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaGetInfo, &state->orig);
51 state->out_mem_ctx = talloc_named_const(state, 0,
52 "rpccli_wkssvc_NetWkstaGetInfo_out_memory");
53 if (tevent_req_nomem(state->out_mem_ctx, req)) {
54 return tevent_req_post(req, ev);
57 /* make a temporary copy, that we pass to the dispatch function */
58 state->tmp = state->orig;
60 subreq = cli->dispatch_send(state, ev, cli,
62 NDR_WKSSVC_NETWKSTAGETINFO,
64 if (tevent_req_nomem(subreq, req)) {
65 return tevent_req_post(req, ev);
67 tevent_req_set_callback(subreq, rpccli_wkssvc_NetWkstaGetInfo_done, req);
71 static void rpccli_wkssvc_NetWkstaGetInfo_done(struct tevent_req *subreq)
73 struct tevent_req *req = tevent_req_callback_data(
74 subreq, struct tevent_req);
75 struct rpccli_wkssvc_NetWkstaGetInfo_state *state = tevent_req_data(
76 req, struct rpccli_wkssvc_NetWkstaGetInfo_state);
80 if (state->out_mem_ctx) {
81 mem_ctx = state->out_mem_ctx;
86 status = state->dispatch_recv(subreq, mem_ctx);
88 if (!NT_STATUS_IS_OK(status)) {
89 tevent_req_nterror(req, status);
93 /* Copy out parameters */
94 *state->orig.out.info = *state->tmp.out.info;
97 state->orig.out.result = state->tmp.out.result;
99 /* Reset temporary structure */
100 ZERO_STRUCT(state->tmp);
102 if (DEBUGLEVEL >= 10) {
103 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaGetInfo, &state->orig);
106 tevent_req_done(req);
109 NTSTATUS rpccli_wkssvc_NetWkstaGetInfo_recv(struct tevent_req *req,
113 struct rpccli_wkssvc_NetWkstaGetInfo_state *state = tevent_req_data(
114 req, struct rpccli_wkssvc_NetWkstaGetInfo_state);
117 if (tevent_req_is_nterror(req, &status)) {
118 tevent_req_received(req);
122 /* Steal possbile out parameters to the callers context */
123 talloc_steal(mem_ctx, state->out_mem_ctx);
126 *result = state->orig.out.result;
128 tevent_req_received(req);
132 NTSTATUS rpccli_wkssvc_NetWkstaGetInfo(struct rpc_pipe_client *cli,
134 const char *server_name /* [in] [unique,charset(UTF16)] */,
135 uint32_t level /* [in] */,
136 union wkssvc_NetWkstaInfo *info /* [out] [ref,switch_is(level)] */,
139 struct wkssvc_NetWkstaGetInfo r;
143 r.in.server_name = server_name;
146 if (DEBUGLEVEL >= 10) {
147 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaGetInfo, &r);
150 status = cli->dispatch(cli,
153 NDR_WKSSVC_NETWKSTAGETINFO,
156 if (!NT_STATUS_IS_OK(status)) {
160 if (DEBUGLEVEL >= 10) {
161 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaGetInfo, &r);
164 if (NT_STATUS_IS_ERR(status)) {
168 /* Return variables */
173 *werror = r.out.result;
176 return werror_to_ntstatus(r.out.result);
179 struct rpccli_wkssvc_NetWkstaSetInfo_state {
180 struct wkssvc_NetWkstaSetInfo orig;
181 struct wkssvc_NetWkstaSetInfo tmp;
182 TALLOC_CTX *out_mem_ctx;
183 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
186 static void rpccli_wkssvc_NetWkstaSetInfo_done(struct tevent_req *subreq);
188 struct tevent_req *rpccli_wkssvc_NetWkstaSetInfo_send(TALLOC_CTX *mem_ctx,
189 struct tevent_context *ev,
190 struct rpc_pipe_client *cli,
191 const char *_server_name /* [in] [unique,charset(UTF16)] */,
192 uint32_t _level /* [in] */,
193 union wkssvc_NetWkstaInfo *_info /* [in] [ref,switch_is(level)] */,
194 uint32_t *_parm_error /* [in,out] [ref] */)
196 struct tevent_req *req;
197 struct rpccli_wkssvc_NetWkstaSetInfo_state *state;
198 struct tevent_req *subreq;
200 req = tevent_req_create(mem_ctx, &state,
201 struct rpccli_wkssvc_NetWkstaSetInfo_state);
205 state->out_mem_ctx = NULL;
206 state->dispatch_recv = cli->dispatch_recv;
209 state->orig.in.server_name = _server_name;
210 state->orig.in.level = _level;
211 state->orig.in.info = _info;
212 state->orig.in.parm_error = _parm_error;
215 state->orig.out.parm_error = _parm_error;
218 ZERO_STRUCT(state->orig.out.result);
220 if (DEBUGLEVEL >= 10) {
221 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaSetInfo, &state->orig);
224 state->out_mem_ctx = talloc_named_const(state, 0,
225 "rpccli_wkssvc_NetWkstaSetInfo_out_memory");
226 if (tevent_req_nomem(state->out_mem_ctx, req)) {
227 return tevent_req_post(req, ev);
230 /* make a temporary copy, that we pass to the dispatch function */
231 state->tmp = state->orig;
233 subreq = cli->dispatch_send(state, ev, cli,
235 NDR_WKSSVC_NETWKSTASETINFO,
237 if (tevent_req_nomem(subreq, req)) {
238 return tevent_req_post(req, ev);
240 tevent_req_set_callback(subreq, rpccli_wkssvc_NetWkstaSetInfo_done, req);
244 static void rpccli_wkssvc_NetWkstaSetInfo_done(struct tevent_req *subreq)
246 struct tevent_req *req = tevent_req_callback_data(
247 subreq, struct tevent_req);
248 struct rpccli_wkssvc_NetWkstaSetInfo_state *state = tevent_req_data(
249 req, struct rpccli_wkssvc_NetWkstaSetInfo_state);
253 if (state->out_mem_ctx) {
254 mem_ctx = state->out_mem_ctx;
259 status = state->dispatch_recv(subreq, mem_ctx);
261 if (!NT_STATUS_IS_OK(status)) {
262 tevent_req_nterror(req, status);
266 /* Copy out parameters */
267 *state->orig.out.parm_error = *state->tmp.out.parm_error;
270 state->orig.out.result = state->tmp.out.result;
272 /* Reset temporary structure */
273 ZERO_STRUCT(state->tmp);
275 if (DEBUGLEVEL >= 10) {
276 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaSetInfo, &state->orig);
279 tevent_req_done(req);
282 NTSTATUS rpccli_wkssvc_NetWkstaSetInfo_recv(struct tevent_req *req,
286 struct rpccli_wkssvc_NetWkstaSetInfo_state *state = tevent_req_data(
287 req, struct rpccli_wkssvc_NetWkstaSetInfo_state);
290 if (tevent_req_is_nterror(req, &status)) {
291 tevent_req_received(req);
295 /* Steal possbile out parameters to the callers context */
296 talloc_steal(mem_ctx, state->out_mem_ctx);
299 *result = state->orig.out.result;
301 tevent_req_received(req);
305 NTSTATUS rpccli_wkssvc_NetWkstaSetInfo(struct rpc_pipe_client *cli,
307 const char *server_name /* [in] [unique,charset(UTF16)] */,
308 uint32_t level /* [in] */,
309 union wkssvc_NetWkstaInfo *info /* [in] [ref,switch_is(level)] */,
310 uint32_t *parm_error /* [in,out] [ref] */,
313 struct wkssvc_NetWkstaSetInfo r;
317 r.in.server_name = server_name;
320 r.in.parm_error = parm_error;
322 if (DEBUGLEVEL >= 10) {
323 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaSetInfo, &r);
326 status = cli->dispatch(cli,
329 NDR_WKSSVC_NETWKSTASETINFO,
332 if (!NT_STATUS_IS_OK(status)) {
336 if (DEBUGLEVEL >= 10) {
337 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaSetInfo, &r);
340 if (NT_STATUS_IS_ERR(status)) {
344 /* Return variables */
345 *parm_error = *r.out.parm_error;
349 *werror = r.out.result;
352 return werror_to_ntstatus(r.out.result);
355 struct rpccli_wkssvc_NetWkstaEnumUsers_state {
356 struct wkssvc_NetWkstaEnumUsers orig;
357 struct wkssvc_NetWkstaEnumUsers tmp;
358 TALLOC_CTX *out_mem_ctx;
359 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
362 static void rpccli_wkssvc_NetWkstaEnumUsers_done(struct tevent_req *subreq);
364 struct tevent_req *rpccli_wkssvc_NetWkstaEnumUsers_send(TALLOC_CTX *mem_ctx,
365 struct tevent_context *ev,
366 struct rpc_pipe_client *cli,
367 const char *_server_name /* [in] [unique,charset(UTF16)] */,
368 struct wkssvc_NetWkstaEnumUsersInfo *_info /* [in,out] [ref] */,
369 uint32_t _prefmaxlen /* [in] */,
370 uint32_t *_entries_read /* [out] [ref] */,
371 uint32_t *_resume_handle /* [in,out] [unique] */)
373 struct tevent_req *req;
374 struct rpccli_wkssvc_NetWkstaEnumUsers_state *state;
375 struct tevent_req *subreq;
377 req = tevent_req_create(mem_ctx, &state,
378 struct rpccli_wkssvc_NetWkstaEnumUsers_state);
382 state->out_mem_ctx = NULL;
383 state->dispatch_recv = cli->dispatch_recv;
386 state->orig.in.server_name = _server_name;
387 state->orig.in.info = _info;
388 state->orig.in.prefmaxlen = _prefmaxlen;
389 state->orig.in.resume_handle = _resume_handle;
392 state->orig.out.info = _info;
393 state->orig.out.entries_read = _entries_read;
394 state->orig.out.resume_handle = _resume_handle;
397 ZERO_STRUCT(state->orig.out.result);
399 if (DEBUGLEVEL >= 10) {
400 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaEnumUsers, &state->orig);
403 state->out_mem_ctx = talloc_named_const(state, 0,
404 "rpccli_wkssvc_NetWkstaEnumUsers_out_memory");
405 if (tevent_req_nomem(state->out_mem_ctx, req)) {
406 return tevent_req_post(req, ev);
409 /* make a temporary copy, that we pass to the dispatch function */
410 state->tmp = state->orig;
412 subreq = cli->dispatch_send(state, ev, cli,
414 NDR_WKSSVC_NETWKSTAENUMUSERS,
416 if (tevent_req_nomem(subreq, req)) {
417 return tevent_req_post(req, ev);
419 tevent_req_set_callback(subreq, rpccli_wkssvc_NetWkstaEnumUsers_done, req);
423 static void rpccli_wkssvc_NetWkstaEnumUsers_done(struct tevent_req *subreq)
425 struct tevent_req *req = tevent_req_callback_data(
426 subreq, struct tevent_req);
427 struct rpccli_wkssvc_NetWkstaEnumUsers_state *state = tevent_req_data(
428 req, struct rpccli_wkssvc_NetWkstaEnumUsers_state);
432 if (state->out_mem_ctx) {
433 mem_ctx = state->out_mem_ctx;
438 status = state->dispatch_recv(subreq, mem_ctx);
440 if (!NT_STATUS_IS_OK(status)) {
441 tevent_req_nterror(req, status);
445 /* Copy out parameters */
446 *state->orig.out.info = *state->tmp.out.info;
447 *state->orig.out.entries_read = *state->tmp.out.entries_read;
448 if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
449 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
453 state->orig.out.result = state->tmp.out.result;
455 /* Reset temporary structure */
456 ZERO_STRUCT(state->tmp);
458 if (DEBUGLEVEL >= 10) {
459 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaEnumUsers, &state->orig);
462 tevent_req_done(req);
465 NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers_recv(struct tevent_req *req,
469 struct rpccli_wkssvc_NetWkstaEnumUsers_state *state = tevent_req_data(
470 req, struct rpccli_wkssvc_NetWkstaEnumUsers_state);
473 if (tevent_req_is_nterror(req, &status)) {
474 tevent_req_received(req);
478 /* Steal possbile out parameters to the callers context */
479 talloc_steal(mem_ctx, state->out_mem_ctx);
482 *result = state->orig.out.result;
484 tevent_req_received(req);
488 NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli,
490 const char *server_name /* [in] [unique,charset(UTF16)] */,
491 struct wkssvc_NetWkstaEnumUsersInfo *info /* [in,out] [ref] */,
492 uint32_t prefmaxlen /* [in] */,
493 uint32_t *entries_read /* [out] [ref] */,
494 uint32_t *resume_handle /* [in,out] [unique] */,
497 struct wkssvc_NetWkstaEnumUsers r;
501 r.in.server_name = server_name;
503 r.in.prefmaxlen = prefmaxlen;
504 r.in.resume_handle = resume_handle;
506 if (DEBUGLEVEL >= 10) {
507 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaEnumUsers, &r);
510 status = cli->dispatch(cli,
513 NDR_WKSSVC_NETWKSTAENUMUSERS,
516 if (!NT_STATUS_IS_OK(status)) {
520 if (DEBUGLEVEL >= 10) {
521 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaEnumUsers, &r);
524 if (NT_STATUS_IS_ERR(status)) {
528 /* Return variables */
530 *entries_read = *r.out.entries_read;
531 if (resume_handle && r.out.resume_handle) {
532 *resume_handle = *r.out.resume_handle;
537 *werror = r.out.result;
540 return werror_to_ntstatus(r.out.result);
543 struct rpccli_wkssvc_NetrWkstaUserGetInfo_state {
544 struct wkssvc_NetrWkstaUserGetInfo orig;
545 struct wkssvc_NetrWkstaUserGetInfo tmp;
546 TALLOC_CTX *out_mem_ctx;
547 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
550 static void rpccli_wkssvc_NetrWkstaUserGetInfo_done(struct tevent_req *subreq);
552 struct tevent_req *rpccli_wkssvc_NetrWkstaUserGetInfo_send(TALLOC_CTX *mem_ctx,
553 struct tevent_context *ev,
554 struct rpc_pipe_client *cli,
555 const char *_unknown /* [in] [unique,charset(UTF16)] */,
556 uint32_t _level /* [in] */,
557 union wkssvc_NetrWkstaUserInfo *_info /* [out] [ref,switch_is(level)] */)
559 struct tevent_req *req;
560 struct rpccli_wkssvc_NetrWkstaUserGetInfo_state *state;
561 struct tevent_req *subreq;
563 req = tevent_req_create(mem_ctx, &state,
564 struct rpccli_wkssvc_NetrWkstaUserGetInfo_state);
568 state->out_mem_ctx = NULL;
569 state->dispatch_recv = cli->dispatch_recv;
572 state->orig.in.unknown = _unknown;
573 state->orig.in.level = _level;
576 state->orig.out.info = _info;
579 ZERO_STRUCT(state->orig.out.result);
581 if (DEBUGLEVEL >= 10) {
582 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaUserGetInfo, &state->orig);
585 state->out_mem_ctx = talloc_named_const(state, 0,
586 "rpccli_wkssvc_NetrWkstaUserGetInfo_out_memory");
587 if (tevent_req_nomem(state->out_mem_ctx, req)) {
588 return tevent_req_post(req, ev);
591 /* make a temporary copy, that we pass to the dispatch function */
592 state->tmp = state->orig;
594 subreq = cli->dispatch_send(state, ev, cli,
596 NDR_WKSSVC_NETRWKSTAUSERGETINFO,
598 if (tevent_req_nomem(subreq, req)) {
599 return tevent_req_post(req, ev);
601 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrWkstaUserGetInfo_done, req);
605 static void rpccli_wkssvc_NetrWkstaUserGetInfo_done(struct tevent_req *subreq)
607 struct tevent_req *req = tevent_req_callback_data(
608 subreq, struct tevent_req);
609 struct rpccli_wkssvc_NetrWkstaUserGetInfo_state *state = tevent_req_data(
610 req, struct rpccli_wkssvc_NetrWkstaUserGetInfo_state);
614 if (state->out_mem_ctx) {
615 mem_ctx = state->out_mem_ctx;
620 status = state->dispatch_recv(subreq, mem_ctx);
622 if (!NT_STATUS_IS_OK(status)) {
623 tevent_req_nterror(req, status);
627 /* Copy out parameters */
628 *state->orig.out.info = *state->tmp.out.info;
631 state->orig.out.result = state->tmp.out.result;
633 /* Reset temporary structure */
634 ZERO_STRUCT(state->tmp);
636 if (DEBUGLEVEL >= 10) {
637 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaUserGetInfo, &state->orig);
640 tevent_req_done(req);
643 NTSTATUS rpccli_wkssvc_NetrWkstaUserGetInfo_recv(struct tevent_req *req,
647 struct rpccli_wkssvc_NetrWkstaUserGetInfo_state *state = tevent_req_data(
648 req, struct rpccli_wkssvc_NetrWkstaUserGetInfo_state);
651 if (tevent_req_is_nterror(req, &status)) {
652 tevent_req_received(req);
656 /* Steal possbile out parameters to the callers context */
657 talloc_steal(mem_ctx, state->out_mem_ctx);
660 *result = state->orig.out.result;
662 tevent_req_received(req);
666 NTSTATUS rpccli_wkssvc_NetrWkstaUserGetInfo(struct rpc_pipe_client *cli,
668 const char *unknown /* [in] [unique,charset(UTF16)] */,
669 uint32_t level /* [in] */,
670 union wkssvc_NetrWkstaUserInfo *info /* [out] [ref,switch_is(level)] */,
673 struct wkssvc_NetrWkstaUserGetInfo r;
677 r.in.unknown = unknown;
680 if (DEBUGLEVEL >= 10) {
681 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaUserGetInfo, &r);
684 status = cli->dispatch(cli,
687 NDR_WKSSVC_NETRWKSTAUSERGETINFO,
690 if (!NT_STATUS_IS_OK(status)) {
694 if (DEBUGLEVEL >= 10) {
695 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaUserGetInfo, &r);
698 if (NT_STATUS_IS_ERR(status)) {
702 /* Return variables */
707 *werror = r.out.result;
710 return werror_to_ntstatus(r.out.result);
713 struct rpccli_wkssvc_NetrWkstaUserSetInfo_state {
714 struct wkssvc_NetrWkstaUserSetInfo orig;
715 struct wkssvc_NetrWkstaUserSetInfo tmp;
716 TALLOC_CTX *out_mem_ctx;
717 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
720 static void rpccli_wkssvc_NetrWkstaUserSetInfo_done(struct tevent_req *subreq);
722 struct tevent_req *rpccli_wkssvc_NetrWkstaUserSetInfo_send(TALLOC_CTX *mem_ctx,
723 struct tevent_context *ev,
724 struct rpc_pipe_client *cli,
725 const char *_unknown /* [in] [unique,charset(UTF16)] */,
726 uint32_t _level /* [in] */,
727 union wkssvc_NetrWkstaUserInfo *_info /* [in] [ref,switch_is(level)] */,
728 uint32_t *_parm_err /* [in,out] [unique] */)
730 struct tevent_req *req;
731 struct rpccli_wkssvc_NetrWkstaUserSetInfo_state *state;
732 struct tevent_req *subreq;
734 req = tevent_req_create(mem_ctx, &state,
735 struct rpccli_wkssvc_NetrWkstaUserSetInfo_state);
739 state->out_mem_ctx = NULL;
740 state->dispatch_recv = cli->dispatch_recv;
743 state->orig.in.unknown = _unknown;
744 state->orig.in.level = _level;
745 state->orig.in.info = _info;
746 state->orig.in.parm_err = _parm_err;
749 state->orig.out.parm_err = _parm_err;
752 ZERO_STRUCT(state->orig.out.result);
754 if (DEBUGLEVEL >= 10) {
755 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaUserSetInfo, &state->orig);
758 state->out_mem_ctx = talloc_named_const(state, 0,
759 "rpccli_wkssvc_NetrWkstaUserSetInfo_out_memory");
760 if (tevent_req_nomem(state->out_mem_ctx, req)) {
761 return tevent_req_post(req, ev);
764 /* make a temporary copy, that we pass to the dispatch function */
765 state->tmp = state->orig;
767 subreq = cli->dispatch_send(state, ev, cli,
769 NDR_WKSSVC_NETRWKSTAUSERSETINFO,
771 if (tevent_req_nomem(subreq, req)) {
772 return tevent_req_post(req, ev);
774 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrWkstaUserSetInfo_done, req);
778 static void rpccli_wkssvc_NetrWkstaUserSetInfo_done(struct tevent_req *subreq)
780 struct tevent_req *req = tevent_req_callback_data(
781 subreq, struct tevent_req);
782 struct rpccli_wkssvc_NetrWkstaUserSetInfo_state *state = tevent_req_data(
783 req, struct rpccli_wkssvc_NetrWkstaUserSetInfo_state);
787 if (state->out_mem_ctx) {
788 mem_ctx = state->out_mem_ctx;
793 status = state->dispatch_recv(subreq, mem_ctx);
795 if (!NT_STATUS_IS_OK(status)) {
796 tevent_req_nterror(req, status);
800 /* Copy out parameters */
801 if (state->orig.out.parm_err && state->tmp.out.parm_err) {
802 *state->orig.out.parm_err = *state->tmp.out.parm_err;
806 state->orig.out.result = state->tmp.out.result;
808 /* Reset temporary structure */
809 ZERO_STRUCT(state->tmp);
811 if (DEBUGLEVEL >= 10) {
812 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaUserSetInfo, &state->orig);
815 tevent_req_done(req);
818 NTSTATUS rpccli_wkssvc_NetrWkstaUserSetInfo_recv(struct tevent_req *req,
822 struct rpccli_wkssvc_NetrWkstaUserSetInfo_state *state = tevent_req_data(
823 req, struct rpccli_wkssvc_NetrWkstaUserSetInfo_state);
826 if (tevent_req_is_nterror(req, &status)) {
827 tevent_req_received(req);
831 /* Steal possbile out parameters to the callers context */
832 talloc_steal(mem_ctx, state->out_mem_ctx);
835 *result = state->orig.out.result;
837 tevent_req_received(req);
841 NTSTATUS rpccli_wkssvc_NetrWkstaUserSetInfo(struct rpc_pipe_client *cli,
843 const char *unknown /* [in] [unique,charset(UTF16)] */,
844 uint32_t level /* [in] */,
845 union wkssvc_NetrWkstaUserInfo *info /* [in] [ref,switch_is(level)] */,
846 uint32_t *parm_err /* [in,out] [unique] */,
849 struct wkssvc_NetrWkstaUserSetInfo r;
853 r.in.unknown = unknown;
856 r.in.parm_err = parm_err;
858 if (DEBUGLEVEL >= 10) {
859 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaUserSetInfo, &r);
862 status = cli->dispatch(cli,
865 NDR_WKSSVC_NETRWKSTAUSERSETINFO,
868 if (!NT_STATUS_IS_OK(status)) {
872 if (DEBUGLEVEL >= 10) {
873 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaUserSetInfo, &r);
876 if (NT_STATUS_IS_ERR(status)) {
880 /* Return variables */
881 if (parm_err && r.out.parm_err) {
882 *parm_err = *r.out.parm_err;
887 *werror = r.out.result;
890 return werror_to_ntstatus(r.out.result);
893 struct rpccli_wkssvc_NetWkstaTransportEnum_state {
894 struct wkssvc_NetWkstaTransportEnum orig;
895 struct wkssvc_NetWkstaTransportEnum tmp;
896 TALLOC_CTX *out_mem_ctx;
897 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
900 static void rpccli_wkssvc_NetWkstaTransportEnum_done(struct tevent_req *subreq);
902 struct tevent_req *rpccli_wkssvc_NetWkstaTransportEnum_send(TALLOC_CTX *mem_ctx,
903 struct tevent_context *ev,
904 struct rpc_pipe_client *cli,
905 const char *_server_name /* [in] [unique,charset(UTF16)] */,
906 struct wkssvc_NetWkstaTransportInfo *_info /* [in,out] [ref] */,
907 uint32_t _max_buffer /* [in] */,
908 uint32_t *_total_entries /* [out] [ref] */,
909 uint32_t *_resume_handle /* [in,out] [unique] */)
911 struct tevent_req *req;
912 struct rpccli_wkssvc_NetWkstaTransportEnum_state *state;
913 struct tevent_req *subreq;
915 req = tevent_req_create(mem_ctx, &state,
916 struct rpccli_wkssvc_NetWkstaTransportEnum_state);
920 state->out_mem_ctx = NULL;
921 state->dispatch_recv = cli->dispatch_recv;
924 state->orig.in.server_name = _server_name;
925 state->orig.in.info = _info;
926 state->orig.in.max_buffer = _max_buffer;
927 state->orig.in.resume_handle = _resume_handle;
930 state->orig.out.info = _info;
931 state->orig.out.total_entries = _total_entries;
932 state->orig.out.resume_handle = _resume_handle;
935 ZERO_STRUCT(state->orig.out.result);
937 if (DEBUGLEVEL >= 10) {
938 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaTransportEnum, &state->orig);
941 state->out_mem_ctx = talloc_named_const(state, 0,
942 "rpccli_wkssvc_NetWkstaTransportEnum_out_memory");
943 if (tevent_req_nomem(state->out_mem_ctx, req)) {
944 return tevent_req_post(req, ev);
947 /* make a temporary copy, that we pass to the dispatch function */
948 state->tmp = state->orig;
950 subreq = cli->dispatch_send(state, ev, cli,
952 NDR_WKSSVC_NETWKSTATRANSPORTENUM,
954 if (tevent_req_nomem(subreq, req)) {
955 return tevent_req_post(req, ev);
957 tevent_req_set_callback(subreq, rpccli_wkssvc_NetWkstaTransportEnum_done, req);
961 static void rpccli_wkssvc_NetWkstaTransportEnum_done(struct tevent_req *subreq)
963 struct tevent_req *req = tevent_req_callback_data(
964 subreq, struct tevent_req);
965 struct rpccli_wkssvc_NetWkstaTransportEnum_state *state = tevent_req_data(
966 req, struct rpccli_wkssvc_NetWkstaTransportEnum_state);
970 if (state->out_mem_ctx) {
971 mem_ctx = state->out_mem_ctx;
976 status = state->dispatch_recv(subreq, mem_ctx);
978 if (!NT_STATUS_IS_OK(status)) {
979 tevent_req_nterror(req, status);
983 /* Copy out parameters */
984 *state->orig.out.info = *state->tmp.out.info;
985 *state->orig.out.total_entries = *state->tmp.out.total_entries;
986 if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
987 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
991 state->orig.out.result = state->tmp.out.result;
993 /* Reset temporary structure */
994 ZERO_STRUCT(state->tmp);
996 if (DEBUGLEVEL >= 10) {
997 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaTransportEnum, &state->orig);
1000 tevent_req_done(req);
1003 NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum_recv(struct tevent_req *req,
1004 TALLOC_CTX *mem_ctx,
1007 struct rpccli_wkssvc_NetWkstaTransportEnum_state *state = tevent_req_data(
1008 req, struct rpccli_wkssvc_NetWkstaTransportEnum_state);
1011 if (tevent_req_is_nterror(req, &status)) {
1012 tevent_req_received(req);
1016 /* Steal possbile out parameters to the callers context */
1017 talloc_steal(mem_ctx, state->out_mem_ctx);
1020 *result = state->orig.out.result;
1022 tevent_req_received(req);
1023 return NT_STATUS_OK;
1026 NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client *cli,
1027 TALLOC_CTX *mem_ctx,
1028 const char *server_name /* [in] [unique,charset(UTF16)] */,
1029 struct wkssvc_NetWkstaTransportInfo *info /* [in,out] [ref] */,
1030 uint32_t max_buffer /* [in] */,
1031 uint32_t *total_entries /* [out] [ref] */,
1032 uint32_t *resume_handle /* [in,out] [unique] */,
1035 struct wkssvc_NetWkstaTransportEnum r;
1039 r.in.server_name = server_name;
1041 r.in.max_buffer = max_buffer;
1042 r.in.resume_handle = resume_handle;
1044 if (DEBUGLEVEL >= 10) {
1045 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaTransportEnum, &r);
1048 status = cli->dispatch(cli,
1051 NDR_WKSSVC_NETWKSTATRANSPORTENUM,
1054 if (!NT_STATUS_IS_OK(status)) {
1058 if (DEBUGLEVEL >= 10) {
1059 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaTransportEnum, &r);
1062 if (NT_STATUS_IS_ERR(status)) {
1066 /* Return variables */
1067 *info = *r.out.info;
1068 *total_entries = *r.out.total_entries;
1069 if (resume_handle && r.out.resume_handle) {
1070 *resume_handle = *r.out.resume_handle;
1075 *werror = r.out.result;
1078 return werror_to_ntstatus(r.out.result);
1081 struct rpccli_wkssvc_NetrWkstaTransportAdd_state {
1082 struct wkssvc_NetrWkstaTransportAdd orig;
1083 struct wkssvc_NetrWkstaTransportAdd tmp;
1084 TALLOC_CTX *out_mem_ctx;
1085 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1088 static void rpccli_wkssvc_NetrWkstaTransportAdd_done(struct tevent_req *subreq);
1090 struct tevent_req *rpccli_wkssvc_NetrWkstaTransportAdd_send(TALLOC_CTX *mem_ctx,
1091 struct tevent_context *ev,
1092 struct rpc_pipe_client *cli,
1093 const char *_server_name /* [in] [unique,charset(UTF16)] */,
1094 uint32_t _level /* [in] */,
1095 struct wkssvc_NetWkstaTransportInfo0 *_info0 /* [in] [ref] */,
1096 uint32_t *_parm_err /* [in,out] [unique] */)
1098 struct tevent_req *req;
1099 struct rpccli_wkssvc_NetrWkstaTransportAdd_state *state;
1100 struct tevent_req *subreq;
1102 req = tevent_req_create(mem_ctx, &state,
1103 struct rpccli_wkssvc_NetrWkstaTransportAdd_state);
1107 state->out_mem_ctx = NULL;
1108 state->dispatch_recv = cli->dispatch_recv;
1111 state->orig.in.server_name = _server_name;
1112 state->orig.in.level = _level;
1113 state->orig.in.info0 = _info0;
1114 state->orig.in.parm_err = _parm_err;
1116 /* Out parameters */
1117 state->orig.out.parm_err = _parm_err;
1120 ZERO_STRUCT(state->orig.out.result);
1122 if (DEBUGLEVEL >= 10) {
1123 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaTransportAdd, &state->orig);
1126 state->out_mem_ctx = talloc_named_const(state, 0,
1127 "rpccli_wkssvc_NetrWkstaTransportAdd_out_memory");
1128 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1129 return tevent_req_post(req, ev);
1132 /* make a temporary copy, that we pass to the dispatch function */
1133 state->tmp = state->orig;
1135 subreq = cli->dispatch_send(state, ev, cli,
1137 NDR_WKSSVC_NETRWKSTATRANSPORTADD,
1139 if (tevent_req_nomem(subreq, req)) {
1140 return tevent_req_post(req, ev);
1142 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrWkstaTransportAdd_done, req);
1146 static void rpccli_wkssvc_NetrWkstaTransportAdd_done(struct tevent_req *subreq)
1148 struct tevent_req *req = tevent_req_callback_data(
1149 subreq, struct tevent_req);
1150 struct rpccli_wkssvc_NetrWkstaTransportAdd_state *state = tevent_req_data(
1151 req, struct rpccli_wkssvc_NetrWkstaTransportAdd_state);
1153 TALLOC_CTX *mem_ctx;
1155 if (state->out_mem_ctx) {
1156 mem_ctx = state->out_mem_ctx;
1161 status = state->dispatch_recv(subreq, mem_ctx);
1162 TALLOC_FREE(subreq);
1163 if (!NT_STATUS_IS_OK(status)) {
1164 tevent_req_nterror(req, status);
1168 /* Copy out parameters */
1169 if (state->orig.out.parm_err && state->tmp.out.parm_err) {
1170 *state->orig.out.parm_err = *state->tmp.out.parm_err;
1174 state->orig.out.result = state->tmp.out.result;
1176 /* Reset temporary structure */
1177 ZERO_STRUCT(state->tmp);
1179 if (DEBUGLEVEL >= 10) {
1180 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaTransportAdd, &state->orig);
1183 tevent_req_done(req);
1186 NTSTATUS rpccli_wkssvc_NetrWkstaTransportAdd_recv(struct tevent_req *req,
1187 TALLOC_CTX *mem_ctx,
1190 struct rpccli_wkssvc_NetrWkstaTransportAdd_state *state = tevent_req_data(
1191 req, struct rpccli_wkssvc_NetrWkstaTransportAdd_state);
1194 if (tevent_req_is_nterror(req, &status)) {
1195 tevent_req_received(req);
1199 /* Steal possbile out parameters to the callers context */
1200 talloc_steal(mem_ctx, state->out_mem_ctx);
1203 *result = state->orig.out.result;
1205 tevent_req_received(req);
1206 return NT_STATUS_OK;
1209 NTSTATUS rpccli_wkssvc_NetrWkstaTransportAdd(struct rpc_pipe_client *cli,
1210 TALLOC_CTX *mem_ctx,
1211 const char *server_name /* [in] [unique,charset(UTF16)] */,
1212 uint32_t level /* [in] */,
1213 struct wkssvc_NetWkstaTransportInfo0 *info0 /* [in] [ref] */,
1214 uint32_t *parm_err /* [in,out] [unique] */,
1217 struct wkssvc_NetrWkstaTransportAdd r;
1221 r.in.server_name = server_name;
1224 r.in.parm_err = parm_err;
1226 if (DEBUGLEVEL >= 10) {
1227 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaTransportAdd, &r);
1230 status = cli->dispatch(cli,
1233 NDR_WKSSVC_NETRWKSTATRANSPORTADD,
1236 if (!NT_STATUS_IS_OK(status)) {
1240 if (DEBUGLEVEL >= 10) {
1241 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaTransportAdd, &r);
1244 if (NT_STATUS_IS_ERR(status)) {
1248 /* Return variables */
1249 if (parm_err && r.out.parm_err) {
1250 *parm_err = *r.out.parm_err;
1255 *werror = r.out.result;
1258 return werror_to_ntstatus(r.out.result);
1261 struct rpccli_wkssvc_NetrWkstaTransportDel_state {
1262 struct wkssvc_NetrWkstaTransportDel orig;
1263 struct wkssvc_NetrWkstaTransportDel tmp;
1264 TALLOC_CTX *out_mem_ctx;
1265 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1268 static void rpccli_wkssvc_NetrWkstaTransportDel_done(struct tevent_req *subreq);
1270 struct tevent_req *rpccli_wkssvc_NetrWkstaTransportDel_send(TALLOC_CTX *mem_ctx,
1271 struct tevent_context *ev,
1272 struct rpc_pipe_client *cli,
1273 const char *_server_name /* [in] [unique,charset(UTF16)] */,
1274 const char *_transport_name /* [in] [unique,charset(UTF16)] */,
1275 uint32_t _unknown3 /* [in] */)
1277 struct tevent_req *req;
1278 struct rpccli_wkssvc_NetrWkstaTransportDel_state *state;
1279 struct tevent_req *subreq;
1281 req = tevent_req_create(mem_ctx, &state,
1282 struct rpccli_wkssvc_NetrWkstaTransportDel_state);
1286 state->out_mem_ctx = NULL;
1287 state->dispatch_recv = cli->dispatch_recv;
1290 state->orig.in.server_name = _server_name;
1291 state->orig.in.transport_name = _transport_name;
1292 state->orig.in.unknown3 = _unknown3;
1294 /* Out parameters */
1297 ZERO_STRUCT(state->orig.out.result);
1299 if (DEBUGLEVEL >= 10) {
1300 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaTransportDel, &state->orig);
1303 /* make a temporary copy, that we pass to the dispatch function */
1304 state->tmp = state->orig;
1306 subreq = cli->dispatch_send(state, ev, cli,
1308 NDR_WKSSVC_NETRWKSTATRANSPORTDEL,
1310 if (tevent_req_nomem(subreq, req)) {
1311 return tevent_req_post(req, ev);
1313 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrWkstaTransportDel_done, req);
1317 static void rpccli_wkssvc_NetrWkstaTransportDel_done(struct tevent_req *subreq)
1319 struct tevent_req *req = tevent_req_callback_data(
1320 subreq, struct tevent_req);
1321 struct rpccli_wkssvc_NetrWkstaTransportDel_state *state = tevent_req_data(
1322 req, struct rpccli_wkssvc_NetrWkstaTransportDel_state);
1324 TALLOC_CTX *mem_ctx;
1326 if (state->out_mem_ctx) {
1327 mem_ctx = state->out_mem_ctx;
1332 status = state->dispatch_recv(subreq, mem_ctx);
1333 TALLOC_FREE(subreq);
1334 if (!NT_STATUS_IS_OK(status)) {
1335 tevent_req_nterror(req, status);
1339 /* Copy out parameters */
1342 state->orig.out.result = state->tmp.out.result;
1344 /* Reset temporary structure */
1345 ZERO_STRUCT(state->tmp);
1347 if (DEBUGLEVEL >= 10) {
1348 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaTransportDel, &state->orig);
1351 tevent_req_done(req);
1354 NTSTATUS rpccli_wkssvc_NetrWkstaTransportDel_recv(struct tevent_req *req,
1355 TALLOC_CTX *mem_ctx,
1358 struct rpccli_wkssvc_NetrWkstaTransportDel_state *state = tevent_req_data(
1359 req, struct rpccli_wkssvc_NetrWkstaTransportDel_state);
1362 if (tevent_req_is_nterror(req, &status)) {
1363 tevent_req_received(req);
1367 /* Steal possbile out parameters to the callers context */
1368 talloc_steal(mem_ctx, state->out_mem_ctx);
1371 *result = state->orig.out.result;
1373 tevent_req_received(req);
1374 return NT_STATUS_OK;
1377 NTSTATUS rpccli_wkssvc_NetrWkstaTransportDel(struct rpc_pipe_client *cli,
1378 TALLOC_CTX *mem_ctx,
1379 const char *server_name /* [in] [unique,charset(UTF16)] */,
1380 const char *transport_name /* [in] [unique,charset(UTF16)] */,
1381 uint32_t unknown3 /* [in] */,
1384 struct wkssvc_NetrWkstaTransportDel r;
1388 r.in.server_name = server_name;
1389 r.in.transport_name = transport_name;
1390 r.in.unknown3 = unknown3;
1392 if (DEBUGLEVEL >= 10) {
1393 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaTransportDel, &r);
1396 status = cli->dispatch(cli,
1399 NDR_WKSSVC_NETRWKSTATRANSPORTDEL,
1402 if (!NT_STATUS_IS_OK(status)) {
1406 if (DEBUGLEVEL >= 10) {
1407 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaTransportDel, &r);
1410 if (NT_STATUS_IS_ERR(status)) {
1414 /* Return variables */
1418 *werror = r.out.result;
1421 return werror_to_ntstatus(r.out.result);
1424 struct rpccli_wkssvc_NetrUseAdd_state {
1425 struct wkssvc_NetrUseAdd orig;
1426 struct wkssvc_NetrUseAdd tmp;
1427 TALLOC_CTX *out_mem_ctx;
1428 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1431 static void rpccli_wkssvc_NetrUseAdd_done(struct tevent_req *subreq);
1433 struct tevent_req *rpccli_wkssvc_NetrUseAdd_send(TALLOC_CTX *mem_ctx,
1434 struct tevent_context *ev,
1435 struct rpc_pipe_client *cli,
1436 const char *_server_name /* [in] [unique,charset(UTF16)] */,
1437 uint32_t _level /* [in] */,
1438 union wkssvc_NetrUseGetInfoCtr *_ctr /* [in] [ref,switch_is(level)] */,
1439 uint32_t *_parm_err /* [in,out] [unique] */)
1441 struct tevent_req *req;
1442 struct rpccli_wkssvc_NetrUseAdd_state *state;
1443 struct tevent_req *subreq;
1445 req = tevent_req_create(mem_ctx, &state,
1446 struct rpccli_wkssvc_NetrUseAdd_state);
1450 state->out_mem_ctx = NULL;
1451 state->dispatch_recv = cli->dispatch_recv;
1454 state->orig.in.server_name = _server_name;
1455 state->orig.in.level = _level;
1456 state->orig.in.ctr = _ctr;
1457 state->orig.in.parm_err = _parm_err;
1459 /* Out parameters */
1460 state->orig.out.parm_err = _parm_err;
1463 ZERO_STRUCT(state->orig.out.result);
1465 if (DEBUGLEVEL >= 10) {
1466 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseAdd, &state->orig);
1469 state->out_mem_ctx = talloc_named_const(state, 0,
1470 "rpccli_wkssvc_NetrUseAdd_out_memory");
1471 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1472 return tevent_req_post(req, ev);
1475 /* make a temporary copy, that we pass to the dispatch function */
1476 state->tmp = state->orig;
1478 subreq = cli->dispatch_send(state, ev, cli,
1480 NDR_WKSSVC_NETRUSEADD,
1482 if (tevent_req_nomem(subreq, req)) {
1483 return tevent_req_post(req, ev);
1485 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrUseAdd_done, req);
1489 static void rpccli_wkssvc_NetrUseAdd_done(struct tevent_req *subreq)
1491 struct tevent_req *req = tevent_req_callback_data(
1492 subreq, struct tevent_req);
1493 struct rpccli_wkssvc_NetrUseAdd_state *state = tevent_req_data(
1494 req, struct rpccli_wkssvc_NetrUseAdd_state);
1496 TALLOC_CTX *mem_ctx;
1498 if (state->out_mem_ctx) {
1499 mem_ctx = state->out_mem_ctx;
1504 status = state->dispatch_recv(subreq, mem_ctx);
1505 TALLOC_FREE(subreq);
1506 if (!NT_STATUS_IS_OK(status)) {
1507 tevent_req_nterror(req, status);
1511 /* Copy out parameters */
1512 if (state->orig.out.parm_err && state->tmp.out.parm_err) {
1513 *state->orig.out.parm_err = *state->tmp.out.parm_err;
1517 state->orig.out.result = state->tmp.out.result;
1519 /* Reset temporary structure */
1520 ZERO_STRUCT(state->tmp);
1522 if (DEBUGLEVEL >= 10) {
1523 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseAdd, &state->orig);
1526 tevent_req_done(req);
1529 NTSTATUS rpccli_wkssvc_NetrUseAdd_recv(struct tevent_req *req,
1530 TALLOC_CTX *mem_ctx,
1533 struct rpccli_wkssvc_NetrUseAdd_state *state = tevent_req_data(
1534 req, struct rpccli_wkssvc_NetrUseAdd_state);
1537 if (tevent_req_is_nterror(req, &status)) {
1538 tevent_req_received(req);
1542 /* Steal possbile out parameters to the callers context */
1543 talloc_steal(mem_ctx, state->out_mem_ctx);
1546 *result = state->orig.out.result;
1548 tevent_req_received(req);
1549 return NT_STATUS_OK;
1552 NTSTATUS rpccli_wkssvc_NetrUseAdd(struct rpc_pipe_client *cli,
1553 TALLOC_CTX *mem_ctx,
1554 const char *server_name /* [in] [unique,charset(UTF16)] */,
1555 uint32_t level /* [in] */,
1556 union wkssvc_NetrUseGetInfoCtr *ctr /* [in] [ref,switch_is(level)] */,
1557 uint32_t *parm_err /* [in,out] [unique] */,
1560 struct wkssvc_NetrUseAdd r;
1564 r.in.server_name = server_name;
1567 r.in.parm_err = parm_err;
1569 if (DEBUGLEVEL >= 10) {
1570 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseAdd, &r);
1573 status = cli->dispatch(cli,
1576 NDR_WKSSVC_NETRUSEADD,
1579 if (!NT_STATUS_IS_OK(status)) {
1583 if (DEBUGLEVEL >= 10) {
1584 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseAdd, &r);
1587 if (NT_STATUS_IS_ERR(status)) {
1591 /* Return variables */
1592 if (parm_err && r.out.parm_err) {
1593 *parm_err = *r.out.parm_err;
1598 *werror = r.out.result;
1601 return werror_to_ntstatus(r.out.result);
1604 struct rpccli_wkssvc_NetrUseGetInfo_state {
1605 struct wkssvc_NetrUseGetInfo orig;
1606 struct wkssvc_NetrUseGetInfo tmp;
1607 TALLOC_CTX *out_mem_ctx;
1608 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1611 static void rpccli_wkssvc_NetrUseGetInfo_done(struct tevent_req *subreq);
1613 struct tevent_req *rpccli_wkssvc_NetrUseGetInfo_send(TALLOC_CTX *mem_ctx,
1614 struct tevent_context *ev,
1615 struct rpc_pipe_client *cli,
1616 const char *_server_name /* [in] [unique,charset(UTF16)] */,
1617 const char *_use_name /* [in] [ref,charset(UTF16)] */,
1618 uint32_t _level /* [in] */,
1619 union wkssvc_NetrUseGetInfoCtr *_ctr /* [out] [ref,switch_is(level)] */)
1621 struct tevent_req *req;
1622 struct rpccli_wkssvc_NetrUseGetInfo_state *state;
1623 struct tevent_req *subreq;
1625 req = tevent_req_create(mem_ctx, &state,
1626 struct rpccli_wkssvc_NetrUseGetInfo_state);
1630 state->out_mem_ctx = NULL;
1631 state->dispatch_recv = cli->dispatch_recv;
1634 state->orig.in.server_name = _server_name;
1635 state->orig.in.use_name = _use_name;
1636 state->orig.in.level = _level;
1638 /* Out parameters */
1639 state->orig.out.ctr = _ctr;
1642 ZERO_STRUCT(state->orig.out.result);
1644 if (DEBUGLEVEL >= 10) {
1645 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseGetInfo, &state->orig);
1648 state->out_mem_ctx = talloc_named_const(state, 0,
1649 "rpccli_wkssvc_NetrUseGetInfo_out_memory");
1650 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1651 return tevent_req_post(req, ev);
1654 /* make a temporary copy, that we pass to the dispatch function */
1655 state->tmp = state->orig;
1657 subreq = cli->dispatch_send(state, ev, cli,
1659 NDR_WKSSVC_NETRUSEGETINFO,
1661 if (tevent_req_nomem(subreq, req)) {
1662 return tevent_req_post(req, ev);
1664 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrUseGetInfo_done, req);
1668 static void rpccli_wkssvc_NetrUseGetInfo_done(struct tevent_req *subreq)
1670 struct tevent_req *req = tevent_req_callback_data(
1671 subreq, struct tevent_req);
1672 struct rpccli_wkssvc_NetrUseGetInfo_state *state = tevent_req_data(
1673 req, struct rpccli_wkssvc_NetrUseGetInfo_state);
1675 TALLOC_CTX *mem_ctx;
1677 if (state->out_mem_ctx) {
1678 mem_ctx = state->out_mem_ctx;
1683 status = state->dispatch_recv(subreq, mem_ctx);
1684 TALLOC_FREE(subreq);
1685 if (!NT_STATUS_IS_OK(status)) {
1686 tevent_req_nterror(req, status);
1690 /* Copy out parameters */
1691 *state->orig.out.ctr = *state->tmp.out.ctr;
1694 state->orig.out.result = state->tmp.out.result;
1696 /* Reset temporary structure */
1697 ZERO_STRUCT(state->tmp);
1699 if (DEBUGLEVEL >= 10) {
1700 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseGetInfo, &state->orig);
1703 tevent_req_done(req);
1706 NTSTATUS rpccli_wkssvc_NetrUseGetInfo_recv(struct tevent_req *req,
1707 TALLOC_CTX *mem_ctx,
1710 struct rpccli_wkssvc_NetrUseGetInfo_state *state = tevent_req_data(
1711 req, struct rpccli_wkssvc_NetrUseGetInfo_state);
1714 if (tevent_req_is_nterror(req, &status)) {
1715 tevent_req_received(req);
1719 /* Steal possbile out parameters to the callers context */
1720 talloc_steal(mem_ctx, state->out_mem_ctx);
1723 *result = state->orig.out.result;
1725 tevent_req_received(req);
1726 return NT_STATUS_OK;
1729 NTSTATUS rpccli_wkssvc_NetrUseGetInfo(struct rpc_pipe_client *cli,
1730 TALLOC_CTX *mem_ctx,
1731 const char *server_name /* [in] [unique,charset(UTF16)] */,
1732 const char *use_name /* [in] [ref,charset(UTF16)] */,
1733 uint32_t level /* [in] */,
1734 union wkssvc_NetrUseGetInfoCtr *ctr /* [out] [ref,switch_is(level)] */,
1737 struct wkssvc_NetrUseGetInfo r;
1741 r.in.server_name = server_name;
1742 r.in.use_name = use_name;
1745 if (DEBUGLEVEL >= 10) {
1746 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseGetInfo, &r);
1749 status = cli->dispatch(cli,
1752 NDR_WKSSVC_NETRUSEGETINFO,
1755 if (!NT_STATUS_IS_OK(status)) {
1759 if (DEBUGLEVEL >= 10) {
1760 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseGetInfo, &r);
1763 if (NT_STATUS_IS_ERR(status)) {
1767 /* Return variables */
1772 *werror = r.out.result;
1775 return werror_to_ntstatus(r.out.result);
1778 struct rpccli_wkssvc_NetrUseDel_state {
1779 struct wkssvc_NetrUseDel orig;
1780 struct wkssvc_NetrUseDel tmp;
1781 TALLOC_CTX *out_mem_ctx;
1782 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1785 static void rpccli_wkssvc_NetrUseDel_done(struct tevent_req *subreq);
1787 struct tevent_req *rpccli_wkssvc_NetrUseDel_send(TALLOC_CTX *mem_ctx,
1788 struct tevent_context *ev,
1789 struct rpc_pipe_client *cli,
1790 const char *_server_name /* [in] [unique,charset(UTF16)] */,
1791 const char *_use_name /* [in] [ref,charset(UTF16)] */,
1792 uint32_t _force_cond /* [in] */)
1794 struct tevent_req *req;
1795 struct rpccli_wkssvc_NetrUseDel_state *state;
1796 struct tevent_req *subreq;
1798 req = tevent_req_create(mem_ctx, &state,
1799 struct rpccli_wkssvc_NetrUseDel_state);
1803 state->out_mem_ctx = NULL;
1804 state->dispatch_recv = cli->dispatch_recv;
1807 state->orig.in.server_name = _server_name;
1808 state->orig.in.use_name = _use_name;
1809 state->orig.in.force_cond = _force_cond;
1811 /* Out parameters */
1814 ZERO_STRUCT(state->orig.out.result);
1816 if (DEBUGLEVEL >= 10) {
1817 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseDel, &state->orig);
1820 /* make a temporary copy, that we pass to the dispatch function */
1821 state->tmp = state->orig;
1823 subreq = cli->dispatch_send(state, ev, cli,
1825 NDR_WKSSVC_NETRUSEDEL,
1827 if (tevent_req_nomem(subreq, req)) {
1828 return tevent_req_post(req, ev);
1830 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrUseDel_done, req);
1834 static void rpccli_wkssvc_NetrUseDel_done(struct tevent_req *subreq)
1836 struct tevent_req *req = tevent_req_callback_data(
1837 subreq, struct tevent_req);
1838 struct rpccli_wkssvc_NetrUseDel_state *state = tevent_req_data(
1839 req, struct rpccli_wkssvc_NetrUseDel_state);
1841 TALLOC_CTX *mem_ctx;
1843 if (state->out_mem_ctx) {
1844 mem_ctx = state->out_mem_ctx;
1849 status = state->dispatch_recv(subreq, mem_ctx);
1850 TALLOC_FREE(subreq);
1851 if (!NT_STATUS_IS_OK(status)) {
1852 tevent_req_nterror(req, status);
1856 /* Copy out parameters */
1859 state->orig.out.result = state->tmp.out.result;
1861 /* Reset temporary structure */
1862 ZERO_STRUCT(state->tmp);
1864 if (DEBUGLEVEL >= 10) {
1865 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseDel, &state->orig);
1868 tevent_req_done(req);
1871 NTSTATUS rpccli_wkssvc_NetrUseDel_recv(struct tevent_req *req,
1872 TALLOC_CTX *mem_ctx,
1875 struct rpccli_wkssvc_NetrUseDel_state *state = tevent_req_data(
1876 req, struct rpccli_wkssvc_NetrUseDel_state);
1879 if (tevent_req_is_nterror(req, &status)) {
1880 tevent_req_received(req);
1884 /* Steal possbile out parameters to the callers context */
1885 talloc_steal(mem_ctx, state->out_mem_ctx);
1888 *result = state->orig.out.result;
1890 tevent_req_received(req);
1891 return NT_STATUS_OK;
1894 NTSTATUS rpccli_wkssvc_NetrUseDel(struct rpc_pipe_client *cli,
1895 TALLOC_CTX *mem_ctx,
1896 const char *server_name /* [in] [unique,charset(UTF16)] */,
1897 const char *use_name /* [in] [ref,charset(UTF16)] */,
1898 uint32_t force_cond /* [in] */,
1901 struct wkssvc_NetrUseDel r;
1905 r.in.server_name = server_name;
1906 r.in.use_name = use_name;
1907 r.in.force_cond = force_cond;
1909 if (DEBUGLEVEL >= 10) {
1910 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseDel, &r);
1913 status = cli->dispatch(cli,
1916 NDR_WKSSVC_NETRUSEDEL,
1919 if (!NT_STATUS_IS_OK(status)) {
1923 if (DEBUGLEVEL >= 10) {
1924 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseDel, &r);
1927 if (NT_STATUS_IS_ERR(status)) {
1931 /* Return variables */
1935 *werror = r.out.result;
1938 return werror_to_ntstatus(r.out.result);
1941 struct rpccli_wkssvc_NetrUseEnum_state {
1942 struct wkssvc_NetrUseEnum orig;
1943 struct wkssvc_NetrUseEnum tmp;
1944 TALLOC_CTX *out_mem_ctx;
1945 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1948 static void rpccli_wkssvc_NetrUseEnum_done(struct tevent_req *subreq);
1950 struct tevent_req *rpccli_wkssvc_NetrUseEnum_send(TALLOC_CTX *mem_ctx,
1951 struct tevent_context *ev,
1952 struct rpc_pipe_client *cli,
1953 const char *_server_name /* [in] [unique,charset(UTF16)] */,
1954 struct wkssvc_NetrUseEnumInfo *_info /* [in,out] [ref] */,
1955 uint32_t _prefmaxlen /* [in] */,
1956 uint32_t *_entries_read /* [out] [ref] */,
1957 uint32_t *_resume_handle /* [in,out] [unique] */)
1959 struct tevent_req *req;
1960 struct rpccli_wkssvc_NetrUseEnum_state *state;
1961 struct tevent_req *subreq;
1963 req = tevent_req_create(mem_ctx, &state,
1964 struct rpccli_wkssvc_NetrUseEnum_state);
1968 state->out_mem_ctx = NULL;
1969 state->dispatch_recv = cli->dispatch_recv;
1972 state->orig.in.server_name = _server_name;
1973 state->orig.in.info = _info;
1974 state->orig.in.prefmaxlen = _prefmaxlen;
1975 state->orig.in.resume_handle = _resume_handle;
1977 /* Out parameters */
1978 state->orig.out.info = _info;
1979 state->orig.out.entries_read = _entries_read;
1980 state->orig.out.resume_handle = _resume_handle;
1983 ZERO_STRUCT(state->orig.out.result);
1985 if (DEBUGLEVEL >= 10) {
1986 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseEnum, &state->orig);
1989 state->out_mem_ctx = talloc_named_const(state, 0,
1990 "rpccli_wkssvc_NetrUseEnum_out_memory");
1991 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1992 return tevent_req_post(req, ev);
1995 /* make a temporary copy, that we pass to the dispatch function */
1996 state->tmp = state->orig;
1998 subreq = cli->dispatch_send(state, ev, cli,
2000 NDR_WKSSVC_NETRUSEENUM,
2002 if (tevent_req_nomem(subreq, req)) {
2003 return tevent_req_post(req, ev);
2005 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrUseEnum_done, req);
2009 static void rpccli_wkssvc_NetrUseEnum_done(struct tevent_req *subreq)
2011 struct tevent_req *req = tevent_req_callback_data(
2012 subreq, struct tevent_req);
2013 struct rpccli_wkssvc_NetrUseEnum_state *state = tevent_req_data(
2014 req, struct rpccli_wkssvc_NetrUseEnum_state);
2016 TALLOC_CTX *mem_ctx;
2018 if (state->out_mem_ctx) {
2019 mem_ctx = state->out_mem_ctx;
2024 status = state->dispatch_recv(subreq, mem_ctx);
2025 TALLOC_FREE(subreq);
2026 if (!NT_STATUS_IS_OK(status)) {
2027 tevent_req_nterror(req, status);
2031 /* Copy out parameters */
2032 *state->orig.out.info = *state->tmp.out.info;
2033 *state->orig.out.entries_read = *state->tmp.out.entries_read;
2034 if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
2035 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
2039 state->orig.out.result = state->tmp.out.result;
2041 /* Reset temporary structure */
2042 ZERO_STRUCT(state->tmp);
2044 if (DEBUGLEVEL >= 10) {
2045 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseEnum, &state->orig);
2048 tevent_req_done(req);
2051 NTSTATUS rpccli_wkssvc_NetrUseEnum_recv(struct tevent_req *req,
2052 TALLOC_CTX *mem_ctx,
2055 struct rpccli_wkssvc_NetrUseEnum_state *state = tevent_req_data(
2056 req, struct rpccli_wkssvc_NetrUseEnum_state);
2059 if (tevent_req_is_nterror(req, &status)) {
2060 tevent_req_received(req);
2064 /* Steal possbile out parameters to the callers context */
2065 talloc_steal(mem_ctx, state->out_mem_ctx);
2068 *result = state->orig.out.result;
2070 tevent_req_received(req);
2071 return NT_STATUS_OK;
2074 NTSTATUS rpccli_wkssvc_NetrUseEnum(struct rpc_pipe_client *cli,
2075 TALLOC_CTX *mem_ctx,
2076 const char *server_name /* [in] [unique,charset(UTF16)] */,
2077 struct wkssvc_NetrUseEnumInfo *info /* [in,out] [ref] */,
2078 uint32_t prefmaxlen /* [in] */,
2079 uint32_t *entries_read /* [out] [ref] */,
2080 uint32_t *resume_handle /* [in,out] [unique] */,
2083 struct wkssvc_NetrUseEnum r;
2087 r.in.server_name = server_name;
2089 r.in.prefmaxlen = prefmaxlen;
2090 r.in.resume_handle = resume_handle;
2092 if (DEBUGLEVEL >= 10) {
2093 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseEnum, &r);
2096 status = cli->dispatch(cli,
2099 NDR_WKSSVC_NETRUSEENUM,
2102 if (!NT_STATUS_IS_OK(status)) {
2106 if (DEBUGLEVEL >= 10) {
2107 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseEnum, &r);
2110 if (NT_STATUS_IS_ERR(status)) {
2114 /* Return variables */
2115 *info = *r.out.info;
2116 *entries_read = *r.out.entries_read;
2117 if (resume_handle && r.out.resume_handle) {
2118 *resume_handle = *r.out.resume_handle;
2123 *werror = r.out.result;
2126 return werror_to_ntstatus(r.out.result);
2129 struct rpccli_wkssvc_NetrMessageBufferSend_state {
2130 struct wkssvc_NetrMessageBufferSend orig;
2131 struct wkssvc_NetrMessageBufferSend tmp;
2132 TALLOC_CTX *out_mem_ctx;
2133 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2136 static void rpccli_wkssvc_NetrMessageBufferSend_done(struct tevent_req *subreq);
2138 struct tevent_req *rpccli_wkssvc_NetrMessageBufferSend_send(TALLOC_CTX *mem_ctx,
2139 struct tevent_context *ev,
2140 struct rpc_pipe_client *cli,
2141 const char *_server_name /* [in] [unique,charset(UTF16)] */,
2142 const char *_message_name /* [in] [ref,charset(UTF16)] */,
2143 const char *_message_sender_name /* [in] [unique,charset(UTF16)] */,
2144 uint8_t *_message_buffer /* [in] [ref,size_is(message_size)] */,
2145 uint32_t _message_size /* [in] */)
2147 struct tevent_req *req;
2148 struct rpccli_wkssvc_NetrMessageBufferSend_state *state;
2149 struct tevent_req *subreq;
2151 req = tevent_req_create(mem_ctx, &state,
2152 struct rpccli_wkssvc_NetrMessageBufferSend_state);
2156 state->out_mem_ctx = NULL;
2157 state->dispatch_recv = cli->dispatch_recv;
2160 state->orig.in.server_name = _server_name;
2161 state->orig.in.message_name = _message_name;
2162 state->orig.in.message_sender_name = _message_sender_name;
2163 state->orig.in.message_buffer = _message_buffer;
2164 state->orig.in.message_size = _message_size;
2166 /* Out parameters */
2169 ZERO_STRUCT(state->orig.out.result);
2171 if (DEBUGLEVEL >= 10) {
2172 NDR_PRINT_IN_DEBUG(wkssvc_NetrMessageBufferSend, &state->orig);
2175 /* make a temporary copy, that we pass to the dispatch function */
2176 state->tmp = state->orig;
2178 subreq = cli->dispatch_send(state, ev, cli,
2180 NDR_WKSSVC_NETRMESSAGEBUFFERSEND,
2182 if (tevent_req_nomem(subreq, req)) {
2183 return tevent_req_post(req, ev);
2185 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrMessageBufferSend_done, req);
2189 static void rpccli_wkssvc_NetrMessageBufferSend_done(struct tevent_req *subreq)
2191 struct tevent_req *req = tevent_req_callback_data(
2192 subreq, struct tevent_req);
2193 struct rpccli_wkssvc_NetrMessageBufferSend_state *state = tevent_req_data(
2194 req, struct rpccli_wkssvc_NetrMessageBufferSend_state);
2196 TALLOC_CTX *mem_ctx;
2198 if (state->out_mem_ctx) {
2199 mem_ctx = state->out_mem_ctx;
2204 status = state->dispatch_recv(subreq, mem_ctx);
2205 TALLOC_FREE(subreq);
2206 if (!NT_STATUS_IS_OK(status)) {
2207 tevent_req_nterror(req, status);
2211 /* Copy out parameters */
2214 state->orig.out.result = state->tmp.out.result;
2216 /* Reset temporary structure */
2217 ZERO_STRUCT(state->tmp);
2219 if (DEBUGLEVEL >= 10) {
2220 NDR_PRINT_OUT_DEBUG(wkssvc_NetrMessageBufferSend, &state->orig);
2223 tevent_req_done(req);
2226 NTSTATUS rpccli_wkssvc_NetrMessageBufferSend_recv(struct tevent_req *req,
2227 TALLOC_CTX *mem_ctx,
2230 struct rpccli_wkssvc_NetrMessageBufferSend_state *state = tevent_req_data(
2231 req, struct rpccli_wkssvc_NetrMessageBufferSend_state);
2234 if (tevent_req_is_nterror(req, &status)) {
2235 tevent_req_received(req);
2239 /* Steal possbile out parameters to the callers context */
2240 talloc_steal(mem_ctx, state->out_mem_ctx);
2243 *result = state->orig.out.result;
2245 tevent_req_received(req);
2246 return NT_STATUS_OK;
2249 NTSTATUS rpccli_wkssvc_NetrMessageBufferSend(struct rpc_pipe_client *cli,
2250 TALLOC_CTX *mem_ctx,
2251 const char *server_name /* [in] [unique,charset(UTF16)] */,
2252 const char *message_name /* [in] [ref,charset(UTF16)] */,
2253 const char *message_sender_name /* [in] [unique,charset(UTF16)] */,
2254 uint8_t *message_buffer /* [in] [ref,size_is(message_size)] */,
2255 uint32_t message_size /* [in] */,
2258 struct wkssvc_NetrMessageBufferSend r;
2262 r.in.server_name = server_name;
2263 r.in.message_name = message_name;
2264 r.in.message_sender_name = message_sender_name;
2265 r.in.message_buffer = message_buffer;
2266 r.in.message_size = message_size;
2268 if (DEBUGLEVEL >= 10) {
2269 NDR_PRINT_IN_DEBUG(wkssvc_NetrMessageBufferSend, &r);
2272 status = cli->dispatch(cli,
2275 NDR_WKSSVC_NETRMESSAGEBUFFERSEND,
2278 if (!NT_STATUS_IS_OK(status)) {
2282 if (DEBUGLEVEL >= 10) {
2283 NDR_PRINT_OUT_DEBUG(wkssvc_NetrMessageBufferSend, &r);
2286 if (NT_STATUS_IS_ERR(status)) {
2290 /* Return variables */
2294 *werror = r.out.result;
2297 return werror_to_ntstatus(r.out.result);
2300 struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state {
2301 struct wkssvc_NetrWorkstationStatisticsGet orig;
2302 struct wkssvc_NetrWorkstationStatisticsGet tmp;
2303 TALLOC_CTX *out_mem_ctx;
2304 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2307 static void rpccli_wkssvc_NetrWorkstationStatisticsGet_done(struct tevent_req *subreq);
2309 struct tevent_req *rpccli_wkssvc_NetrWorkstationStatisticsGet_send(TALLOC_CTX *mem_ctx,
2310 struct tevent_context *ev,
2311 struct rpc_pipe_client *cli,
2312 const char *_server_name /* [in] [unique,charset(UTF16)] */,
2313 const char *_unknown2 /* [in] [unique,charset(UTF16)] */,
2314 uint32_t _unknown3 /* [in] */,
2315 uint32_t _unknown4 /* [in] */,
2316 struct wkssvc_NetrWorkstationStatistics **_info /* [out] [ref] */)
2318 struct tevent_req *req;
2319 struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state *state;
2320 struct tevent_req *subreq;
2322 req = tevent_req_create(mem_ctx, &state,
2323 struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state);
2327 state->out_mem_ctx = NULL;
2328 state->dispatch_recv = cli->dispatch_recv;
2331 state->orig.in.server_name = _server_name;
2332 state->orig.in.unknown2 = _unknown2;
2333 state->orig.in.unknown3 = _unknown3;
2334 state->orig.in.unknown4 = _unknown4;
2336 /* Out parameters */
2337 state->orig.out.info = _info;
2340 ZERO_STRUCT(state->orig.out.result);
2342 if (DEBUGLEVEL >= 10) {
2343 NDR_PRINT_IN_DEBUG(wkssvc_NetrWorkstationStatisticsGet, &state->orig);
2346 state->out_mem_ctx = talloc_named_const(state, 0,
2347 "rpccli_wkssvc_NetrWorkstationStatisticsGet_out_memory");
2348 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2349 return tevent_req_post(req, ev);
2352 /* make a temporary copy, that we pass to the dispatch function */
2353 state->tmp = state->orig;
2355 subreq = cli->dispatch_send(state, ev, cli,
2357 NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET,
2359 if (tevent_req_nomem(subreq, req)) {
2360 return tevent_req_post(req, ev);
2362 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrWorkstationStatisticsGet_done, req);
2366 static void rpccli_wkssvc_NetrWorkstationStatisticsGet_done(struct tevent_req *subreq)
2368 struct tevent_req *req = tevent_req_callback_data(
2369 subreq, struct tevent_req);
2370 struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state *state = tevent_req_data(
2371 req, struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state);
2373 TALLOC_CTX *mem_ctx;
2375 if (state->out_mem_ctx) {
2376 mem_ctx = state->out_mem_ctx;
2381 status = state->dispatch_recv(subreq, mem_ctx);
2382 TALLOC_FREE(subreq);
2383 if (!NT_STATUS_IS_OK(status)) {
2384 tevent_req_nterror(req, status);
2388 /* Copy out parameters */
2389 *state->orig.out.info = *state->tmp.out.info;
2392 state->orig.out.result = state->tmp.out.result;
2394 /* Reset temporary structure */
2395 ZERO_STRUCT(state->tmp);
2397 if (DEBUGLEVEL >= 10) {
2398 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWorkstationStatisticsGet, &state->orig);
2401 tevent_req_done(req);
2404 NTSTATUS rpccli_wkssvc_NetrWorkstationStatisticsGet_recv(struct tevent_req *req,
2405 TALLOC_CTX *mem_ctx,
2408 struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state *state = tevent_req_data(
2409 req, struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state);
2412 if (tevent_req_is_nterror(req, &status)) {
2413 tevent_req_received(req);
2417 /* Steal possbile out parameters to the callers context */
2418 talloc_steal(mem_ctx, state->out_mem_ctx);
2421 *result = state->orig.out.result;
2423 tevent_req_received(req);
2424 return NT_STATUS_OK;
2427 NTSTATUS rpccli_wkssvc_NetrWorkstationStatisticsGet(struct rpc_pipe_client *cli,
2428 TALLOC_CTX *mem_ctx,
2429 const char *server_name /* [in] [unique,charset(UTF16)] */,
2430 const char *unknown2 /* [in] [unique,charset(UTF16)] */,
2431 uint32_t unknown3 /* [in] */,
2432 uint32_t unknown4 /* [in] */,
2433 struct wkssvc_NetrWorkstationStatistics **info /* [out] [ref] */,
2436 struct wkssvc_NetrWorkstationStatisticsGet r;
2440 r.in.server_name = server_name;
2441 r.in.unknown2 = unknown2;
2442 r.in.unknown3 = unknown3;
2443 r.in.unknown4 = unknown4;
2445 if (DEBUGLEVEL >= 10) {
2446 NDR_PRINT_IN_DEBUG(wkssvc_NetrWorkstationStatisticsGet, &r);
2449 status = cli->dispatch(cli,
2452 NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET,
2455 if (!NT_STATUS_IS_OK(status)) {
2459 if (DEBUGLEVEL >= 10) {
2460 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWorkstationStatisticsGet, &r);
2463 if (NT_STATUS_IS_ERR(status)) {
2467 /* Return variables */
2468 *info = *r.out.info;
2472 *werror = r.out.result;
2475 return werror_to_ntstatus(r.out.result);
2478 struct rpccli_wkssvc_NetrLogonDomainNameAdd_state {
2479 struct wkssvc_NetrLogonDomainNameAdd orig;
2480 struct wkssvc_NetrLogonDomainNameAdd tmp;
2481 TALLOC_CTX *out_mem_ctx;
2482 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2485 static void rpccli_wkssvc_NetrLogonDomainNameAdd_done(struct tevent_req *subreq);
2487 struct tevent_req *rpccli_wkssvc_NetrLogonDomainNameAdd_send(TALLOC_CTX *mem_ctx,
2488 struct tevent_context *ev,
2489 struct rpc_pipe_client *cli,
2490 const char *_domain_name /* [in] [ref,charset(UTF16)] */)
2492 struct tevent_req *req;
2493 struct rpccli_wkssvc_NetrLogonDomainNameAdd_state *state;
2494 struct tevent_req *subreq;
2496 req = tevent_req_create(mem_ctx, &state,
2497 struct rpccli_wkssvc_NetrLogonDomainNameAdd_state);
2501 state->out_mem_ctx = NULL;
2502 state->dispatch_recv = cli->dispatch_recv;
2505 state->orig.in.domain_name = _domain_name;
2507 /* Out parameters */
2510 ZERO_STRUCT(state->orig.out.result);
2512 if (DEBUGLEVEL >= 10) {
2513 NDR_PRINT_IN_DEBUG(wkssvc_NetrLogonDomainNameAdd, &state->orig);
2516 /* make a temporary copy, that we pass to the dispatch function */
2517 state->tmp = state->orig;
2519 subreq = cli->dispatch_send(state, ev, cli,
2521 NDR_WKSSVC_NETRLOGONDOMAINNAMEADD,
2523 if (tevent_req_nomem(subreq, req)) {
2524 return tevent_req_post(req, ev);
2526 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrLogonDomainNameAdd_done, req);
2530 static void rpccli_wkssvc_NetrLogonDomainNameAdd_done(struct tevent_req *subreq)
2532 struct tevent_req *req = tevent_req_callback_data(
2533 subreq, struct tevent_req);
2534 struct rpccli_wkssvc_NetrLogonDomainNameAdd_state *state = tevent_req_data(
2535 req, struct rpccli_wkssvc_NetrLogonDomainNameAdd_state);
2537 TALLOC_CTX *mem_ctx;
2539 if (state->out_mem_ctx) {
2540 mem_ctx = state->out_mem_ctx;
2545 status = state->dispatch_recv(subreq, mem_ctx);
2546 TALLOC_FREE(subreq);
2547 if (!NT_STATUS_IS_OK(status)) {
2548 tevent_req_nterror(req, status);
2552 /* Copy out parameters */
2555 state->orig.out.result = state->tmp.out.result;
2557 /* Reset temporary structure */
2558 ZERO_STRUCT(state->tmp);
2560 if (DEBUGLEVEL >= 10) {
2561 NDR_PRINT_OUT_DEBUG(wkssvc_NetrLogonDomainNameAdd, &state->orig);
2564 tevent_req_done(req);
2567 NTSTATUS rpccli_wkssvc_NetrLogonDomainNameAdd_recv(struct tevent_req *req,
2568 TALLOC_CTX *mem_ctx,
2571 struct rpccli_wkssvc_NetrLogonDomainNameAdd_state *state = tevent_req_data(
2572 req, struct rpccli_wkssvc_NetrLogonDomainNameAdd_state);
2575 if (tevent_req_is_nterror(req, &status)) {
2576 tevent_req_received(req);
2580 /* Steal possbile out parameters to the callers context */
2581 talloc_steal(mem_ctx, state->out_mem_ctx);
2584 *result = state->orig.out.result;
2586 tevent_req_received(req);
2587 return NT_STATUS_OK;
2590 NTSTATUS rpccli_wkssvc_NetrLogonDomainNameAdd(struct rpc_pipe_client *cli,
2591 TALLOC_CTX *mem_ctx,
2592 const char *domain_name /* [in] [ref,charset(UTF16)] */,
2595 struct wkssvc_NetrLogonDomainNameAdd r;
2599 r.in.domain_name = domain_name;
2601 if (DEBUGLEVEL >= 10) {
2602 NDR_PRINT_IN_DEBUG(wkssvc_NetrLogonDomainNameAdd, &r);
2605 status = cli->dispatch(cli,
2608 NDR_WKSSVC_NETRLOGONDOMAINNAMEADD,
2611 if (!NT_STATUS_IS_OK(status)) {
2615 if (DEBUGLEVEL >= 10) {
2616 NDR_PRINT_OUT_DEBUG(wkssvc_NetrLogonDomainNameAdd, &r);
2619 if (NT_STATUS_IS_ERR(status)) {
2623 /* Return variables */
2627 *werror = r.out.result;
2630 return werror_to_ntstatus(r.out.result);
2633 struct rpccli_wkssvc_NetrLogonDomainNameDel_state {
2634 struct wkssvc_NetrLogonDomainNameDel orig;
2635 struct wkssvc_NetrLogonDomainNameDel tmp;
2636 TALLOC_CTX *out_mem_ctx;
2637 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2640 static void rpccli_wkssvc_NetrLogonDomainNameDel_done(struct tevent_req *subreq);
2642 struct tevent_req *rpccli_wkssvc_NetrLogonDomainNameDel_send(TALLOC_CTX *mem_ctx,
2643 struct tevent_context *ev,
2644 struct rpc_pipe_client *cli,
2645 const char *_domain_name /* [in] [ref,charset(UTF16)] */)
2647 struct tevent_req *req;
2648 struct rpccli_wkssvc_NetrLogonDomainNameDel_state *state;
2649 struct tevent_req *subreq;
2651 req = tevent_req_create(mem_ctx, &state,
2652 struct rpccli_wkssvc_NetrLogonDomainNameDel_state);
2656 state->out_mem_ctx = NULL;
2657 state->dispatch_recv = cli->dispatch_recv;
2660 state->orig.in.domain_name = _domain_name;
2662 /* Out parameters */
2665 ZERO_STRUCT(state->orig.out.result);
2667 if (DEBUGLEVEL >= 10) {
2668 NDR_PRINT_IN_DEBUG(wkssvc_NetrLogonDomainNameDel, &state->orig);
2671 /* make a temporary copy, that we pass to the dispatch function */
2672 state->tmp = state->orig;
2674 subreq = cli->dispatch_send(state, ev, cli,
2676 NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL,
2678 if (tevent_req_nomem(subreq, req)) {
2679 return tevent_req_post(req, ev);
2681 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrLogonDomainNameDel_done, req);
2685 static void rpccli_wkssvc_NetrLogonDomainNameDel_done(struct tevent_req *subreq)
2687 struct tevent_req *req = tevent_req_callback_data(
2688 subreq, struct tevent_req);
2689 struct rpccli_wkssvc_NetrLogonDomainNameDel_state *state = tevent_req_data(
2690 req, struct rpccli_wkssvc_NetrLogonDomainNameDel_state);
2692 TALLOC_CTX *mem_ctx;
2694 if (state->out_mem_ctx) {
2695 mem_ctx = state->out_mem_ctx;
2700 status = state->dispatch_recv(subreq, mem_ctx);
2701 TALLOC_FREE(subreq);
2702 if (!NT_STATUS_IS_OK(status)) {
2703 tevent_req_nterror(req, status);
2707 /* Copy out parameters */
2710 state->orig.out.result = state->tmp.out.result;
2712 /* Reset temporary structure */
2713 ZERO_STRUCT(state->tmp);
2715 if (DEBUGLEVEL >= 10) {
2716 NDR_PRINT_OUT_DEBUG(wkssvc_NetrLogonDomainNameDel, &state->orig);
2719 tevent_req_done(req);
2722 NTSTATUS rpccli_wkssvc_NetrLogonDomainNameDel_recv(struct tevent_req *req,
2723 TALLOC_CTX *mem_ctx,
2726 struct rpccli_wkssvc_NetrLogonDomainNameDel_state *state = tevent_req_data(
2727 req, struct rpccli_wkssvc_NetrLogonDomainNameDel_state);
2730 if (tevent_req_is_nterror(req, &status)) {
2731 tevent_req_received(req);
2735 /* Steal possbile out parameters to the callers context */
2736 talloc_steal(mem_ctx, state->out_mem_ctx);
2739 *result = state->orig.out.result;
2741 tevent_req_received(req);
2742 return NT_STATUS_OK;
2745 NTSTATUS rpccli_wkssvc_NetrLogonDomainNameDel(struct rpc_pipe_client *cli,
2746 TALLOC_CTX *mem_ctx,
2747 const char *domain_name /* [in] [ref,charset(UTF16)] */,
2750 struct wkssvc_NetrLogonDomainNameDel r;
2754 r.in.domain_name = domain_name;
2756 if (DEBUGLEVEL >= 10) {
2757 NDR_PRINT_IN_DEBUG(wkssvc_NetrLogonDomainNameDel, &r);
2760 status = cli->dispatch(cli,
2763 NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL,
2766 if (!NT_STATUS_IS_OK(status)) {
2770 if (DEBUGLEVEL >= 10) {
2771 NDR_PRINT_OUT_DEBUG(wkssvc_NetrLogonDomainNameDel, &r);
2774 if (NT_STATUS_IS_ERR(status)) {
2778 /* Return variables */
2782 *werror = r.out.result;
2785 return werror_to_ntstatus(r.out.result);
2788 struct rpccli_wkssvc_NetrJoinDomain_state {
2789 struct wkssvc_NetrJoinDomain orig;
2790 struct wkssvc_NetrJoinDomain tmp;
2791 TALLOC_CTX *out_mem_ctx;
2792 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2795 static void rpccli_wkssvc_NetrJoinDomain_done(struct tevent_req *subreq);
2797 struct tevent_req *rpccli_wkssvc_NetrJoinDomain_send(TALLOC_CTX *mem_ctx,
2798 struct tevent_context *ev,
2799 struct rpc_pipe_client *cli,
2800 const char *_server_name /* [in] [unique,charset(UTF16)] */,
2801 const char *_domain_name /* [in] [ref,charset(UTF16)] */,
2802 const char *_account_ou /* [in] [unique,charset(UTF16)] */,
2803 const char *_Account /* [in] [unique,charset(UTF16)] */,
2804 const char *_password /* [in] [unique,charset(UTF16)] */,
2805 uint32_t _join_flags /* [in] */)
2807 struct tevent_req *req;
2808 struct rpccli_wkssvc_NetrJoinDomain_state *state;
2809 struct tevent_req *subreq;
2811 req = tevent_req_create(mem_ctx, &state,
2812 struct rpccli_wkssvc_NetrJoinDomain_state);
2816 state->out_mem_ctx = NULL;
2817 state->dispatch_recv = cli->dispatch_recv;
2820 state->orig.in.server_name = _server_name;
2821 state->orig.in.domain_name = _domain_name;
2822 state->orig.in.account_ou = _account_ou;
2823 state->orig.in.Account = _Account;
2824 state->orig.in.password = _password;
2825 state->orig.in.join_flags = _join_flags;
2827 /* Out parameters */
2830 ZERO_STRUCT(state->orig.out.result);
2832 if (DEBUGLEVEL >= 10) {
2833 NDR_PRINT_IN_DEBUG(wkssvc_NetrJoinDomain, &state->orig);
2836 /* make a temporary copy, that we pass to the dispatch function */
2837 state->tmp = state->orig;
2839 subreq = cli->dispatch_send(state, ev, cli,
2841 NDR_WKSSVC_NETRJOINDOMAIN,
2843 if (tevent_req_nomem(subreq, req)) {
2844 return tevent_req_post(req, ev);
2846 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrJoinDomain_done, req);
2850 static void rpccli_wkssvc_NetrJoinDomain_done(struct tevent_req *subreq)
2852 struct tevent_req *req = tevent_req_callback_data(
2853 subreq, struct tevent_req);
2854 struct rpccli_wkssvc_NetrJoinDomain_state *state = tevent_req_data(
2855 req, struct rpccli_wkssvc_NetrJoinDomain_state);
2857 TALLOC_CTX *mem_ctx;
2859 if (state->out_mem_ctx) {
2860 mem_ctx = state->out_mem_ctx;
2865 status = state->dispatch_recv(subreq, mem_ctx);
2866 TALLOC_FREE(subreq);
2867 if (!NT_STATUS_IS_OK(status)) {
2868 tevent_req_nterror(req, status);
2872 /* Copy out parameters */
2875 state->orig.out.result = state->tmp.out.result;
2877 /* Reset temporary structure */
2878 ZERO_STRUCT(state->tmp);
2880 if (DEBUGLEVEL >= 10) {
2881 NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain, &state->orig);
2884 tevent_req_done(req);
2887 NTSTATUS rpccli_wkssvc_NetrJoinDomain_recv(struct tevent_req *req,
2888 TALLOC_CTX *mem_ctx,
2891 struct rpccli_wkssvc_NetrJoinDomain_state *state = tevent_req_data(
2892 req, struct rpccli_wkssvc_NetrJoinDomain_state);
2895 if (tevent_req_is_nterror(req, &status)) {
2896 tevent_req_received(req);
2900 /* Steal possbile out parameters to the callers context */
2901 talloc_steal(mem_ctx, state->out_mem_ctx);
2904 *result = state->orig.out.result;
2906 tevent_req_received(req);
2907 return NT_STATUS_OK;
2910 NTSTATUS rpccli_wkssvc_NetrJoinDomain(struct rpc_pipe_client *cli,
2911 TALLOC_CTX *mem_ctx,
2912 const char *server_name /* [in] [unique,charset(UTF16)] */,
2913 const char *domain_name /* [in] [ref,charset(UTF16)] */,
2914 const char *account_ou /* [in] [unique,charset(UTF16)] */,
2915 const char *Account /* [in] [unique,charset(UTF16)] */,
2916 const char *password /* [in] [unique,charset(UTF16)] */,
2917 uint32_t join_flags /* [in] */,
2920 struct wkssvc_NetrJoinDomain r;
2924 r.in.server_name = server_name;
2925 r.in.domain_name = domain_name;
2926 r.in.account_ou = account_ou;
2927 r.in.Account = Account;
2928 r.in.password = password;
2929 r.in.join_flags = join_flags;
2931 if (DEBUGLEVEL >= 10) {
2932 NDR_PRINT_IN_DEBUG(wkssvc_NetrJoinDomain, &r);
2935 status = cli->dispatch(cli,
2938 NDR_WKSSVC_NETRJOINDOMAIN,
2941 if (!NT_STATUS_IS_OK(status)) {
2945 if (DEBUGLEVEL >= 10) {
2946 NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain, &r);
2949 if (NT_STATUS_IS_ERR(status)) {
2953 /* Return variables */
2957 *werror = r.out.result;
2960 return werror_to_ntstatus(r.out.result);
2963 struct rpccli_wkssvc_NetrUnjoinDomain_state {
2964 struct wkssvc_NetrUnjoinDomain orig;
2965 struct wkssvc_NetrUnjoinDomain tmp;
2966 TALLOC_CTX *out_mem_ctx;
2967 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2970 static void rpccli_wkssvc_NetrUnjoinDomain_done(struct tevent_req *subreq);
2972 struct tevent_req *rpccli_wkssvc_NetrUnjoinDomain_send(TALLOC_CTX *mem_ctx,
2973 struct tevent_context *ev,
2974 struct rpc_pipe_client *cli,
2975 const char *_server_name /* [in] [unique,charset(UTF16)] */,
2976 const char *_Account /* [in] [unique,charset(UTF16)] */,
2977 const char *_password /* [in] [unique,charset(UTF16)] */,
2978 uint32_t _unjoin_flags /* [in] */)
2980 struct tevent_req *req;
2981 struct rpccli_wkssvc_NetrUnjoinDomain_state *state;
2982 struct tevent_req *subreq;
2984 req = tevent_req_create(mem_ctx, &state,
2985 struct rpccli_wkssvc_NetrUnjoinDomain_state);
2989 state->out_mem_ctx = NULL;
2990 state->dispatch_recv = cli->dispatch_recv;
2993 state->orig.in.server_name = _server_name;
2994 state->orig.in.Account = _Account;
2995 state->orig.in.password = _password;
2996 state->orig.in.unjoin_flags = _unjoin_flags;
2998 /* Out parameters */
3001 ZERO_STRUCT(state->orig.out.result);
3003 if (DEBUGLEVEL >= 10) {
3004 NDR_PRINT_IN_DEBUG(wkssvc_NetrUnjoinDomain, &state->orig);
3007 /* make a temporary copy, that we pass to the dispatch function */
3008 state->tmp = state->orig;
3010 subreq = cli->dispatch_send(state, ev, cli,
3012 NDR_WKSSVC_NETRUNJOINDOMAIN,
3014 if (tevent_req_nomem(subreq, req)) {
3015 return tevent_req_post(req, ev);
3017 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrUnjoinDomain_done, req);
3021 static void rpccli_wkssvc_NetrUnjoinDomain_done(struct tevent_req *subreq)
3023 struct tevent_req *req = tevent_req_callback_data(
3024 subreq, struct tevent_req);
3025 struct rpccli_wkssvc_NetrUnjoinDomain_state *state = tevent_req_data(
3026 req, struct rpccli_wkssvc_NetrUnjoinDomain_state);
3028 TALLOC_CTX *mem_ctx;
3030 if (state->out_mem_ctx) {
3031 mem_ctx = state->out_mem_ctx;
3036 status = state->dispatch_recv(subreq, mem_ctx);
3037 TALLOC_FREE(subreq);
3038 if (!NT_STATUS_IS_OK(status)) {
3039 tevent_req_nterror(req, status);
3043 /* Copy out parameters */
3046 state->orig.out.result = state->tmp.out.result;
3048 /* Reset temporary structure */
3049 ZERO_STRUCT(state->tmp);
3051 if (DEBUGLEVEL >= 10) {
3052 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain, &state->orig);
3055 tevent_req_done(req);
3058 NTSTATUS rpccli_wkssvc_NetrUnjoinDomain_recv(struct tevent_req *req,
3059 TALLOC_CTX *mem_ctx,
3062 struct rpccli_wkssvc_NetrUnjoinDomain_state *state = tevent_req_data(
3063 req, struct rpccli_wkssvc_NetrUnjoinDomain_state);
3066 if (tevent_req_is_nterror(req, &status)) {
3067 tevent_req_received(req);
3071 /* Steal possbile out parameters to the callers context */
3072 talloc_steal(mem_ctx, state->out_mem_ctx);
3075 *result = state->orig.out.result;
3077 tevent_req_received(req);
3078 return NT_STATUS_OK;
3081 NTSTATUS rpccli_wkssvc_NetrUnjoinDomain(struct rpc_pipe_client *cli,
3082 TALLOC_CTX *mem_ctx,
3083 const char *server_name /* [in] [unique,charset(UTF16)] */,
3084 const char *Account /* [in] [unique,charset(UTF16)] */,
3085 const char *password /* [in] [unique,charset(UTF16)] */,
3086 uint32_t unjoin_flags /* [in] */,
3089 struct wkssvc_NetrUnjoinDomain r;
3093 r.in.server_name = server_name;
3094 r.in.Account = Account;
3095 r.in.password = password;
3096 r.in.unjoin_flags = unjoin_flags;
3098 if (DEBUGLEVEL >= 10) {
3099 NDR_PRINT_IN_DEBUG(wkssvc_NetrUnjoinDomain, &r);
3102 status = cli->dispatch(cli,
3105 NDR_WKSSVC_NETRUNJOINDOMAIN,
3108 if (!NT_STATUS_IS_OK(status)) {
3112 if (DEBUGLEVEL >= 10) {
3113 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain, &r);
3116 if (NT_STATUS_IS_ERR(status)) {
3120 /* Return variables */
3124 *werror = r.out.result;
3127 return werror_to_ntstatus(r.out.result);
3130 struct rpccli_wkssvc_NetrRenameMachineInDomain_state {
3131 struct wkssvc_NetrRenameMachineInDomain orig;
3132 struct wkssvc_NetrRenameMachineInDomain tmp;
3133 TALLOC_CTX *out_mem_ctx;
3134 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3137 static void rpccli_wkssvc_NetrRenameMachineInDomain_done(struct tevent_req *subreq);
3139 struct tevent_req *rpccli_wkssvc_NetrRenameMachineInDomain_send(TALLOC_CTX *mem_ctx,
3140 struct tevent_context *ev,
3141 struct rpc_pipe_client *cli,
3142 const char *_server_name /* [in] [unique,charset(UTF16)] */,
3143 const char *_NewMachineName /* [in] [unique,charset(UTF16)] */,
3144 const char *_Account /* [in] [unique,charset(UTF16)] */,
3145 const char *_password /* [in] [unique,charset(UTF16)] */,
3146 uint32_t _RenameOptions /* [in] */)
3148 struct tevent_req *req;
3149 struct rpccli_wkssvc_NetrRenameMachineInDomain_state *state;
3150 struct tevent_req *subreq;
3152 req = tevent_req_create(mem_ctx, &state,
3153 struct rpccli_wkssvc_NetrRenameMachineInDomain_state);
3157 state->out_mem_ctx = NULL;
3158 state->dispatch_recv = cli->dispatch_recv;
3161 state->orig.in.server_name = _server_name;
3162 state->orig.in.NewMachineName = _NewMachineName;
3163 state->orig.in.Account = _Account;
3164 state->orig.in.password = _password;
3165 state->orig.in.RenameOptions = _RenameOptions;
3167 /* Out parameters */
3170 ZERO_STRUCT(state->orig.out.result);
3172 if (DEBUGLEVEL >= 10) {
3173 NDR_PRINT_IN_DEBUG(wkssvc_NetrRenameMachineInDomain, &state->orig);
3176 /* make a temporary copy, that we pass to the dispatch function */
3177 state->tmp = state->orig;
3179 subreq = cli->dispatch_send(state, ev, cli,
3181 NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN,
3183 if (tevent_req_nomem(subreq, req)) {
3184 return tevent_req_post(req, ev);
3186 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrRenameMachineInDomain_done, req);
3190 static void rpccli_wkssvc_NetrRenameMachineInDomain_done(struct tevent_req *subreq)
3192 struct tevent_req *req = tevent_req_callback_data(
3193 subreq, struct tevent_req);
3194 struct rpccli_wkssvc_NetrRenameMachineInDomain_state *state = tevent_req_data(
3195 req, struct rpccli_wkssvc_NetrRenameMachineInDomain_state);
3197 TALLOC_CTX *mem_ctx;
3199 if (state->out_mem_ctx) {
3200 mem_ctx = state->out_mem_ctx;
3205 status = state->dispatch_recv(subreq, mem_ctx);
3206 TALLOC_FREE(subreq);
3207 if (!NT_STATUS_IS_OK(status)) {
3208 tevent_req_nterror(req, status);
3212 /* Copy out parameters */
3215 state->orig.out.result = state->tmp.out.result;
3217 /* Reset temporary structure */
3218 ZERO_STRUCT(state->tmp);
3220 if (DEBUGLEVEL >= 10) {
3221 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain, &state->orig);
3224 tevent_req_done(req);
3227 NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain_recv(struct tevent_req *req,
3228 TALLOC_CTX *mem_ctx,
3231 struct rpccli_wkssvc_NetrRenameMachineInDomain_state *state = tevent_req_data(
3232 req, struct rpccli_wkssvc_NetrRenameMachineInDomain_state);
3235 if (tevent_req_is_nterror(req, &status)) {
3236 tevent_req_received(req);
3240 /* Steal possbile out parameters to the callers context */
3241 talloc_steal(mem_ctx, state->out_mem_ctx);
3244 *result = state->orig.out.result;
3246 tevent_req_received(req);
3247 return NT_STATUS_OK;
3250 NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain(struct rpc_pipe_client *cli,
3251 TALLOC_CTX *mem_ctx,
3252 const char *server_name /* [in] [unique,charset(UTF16)] */,
3253 const char *NewMachineName /* [in] [unique,charset(UTF16)] */,
3254 const char *Account /* [in] [unique,charset(UTF16)] */,
3255 const char *password /* [in] [unique,charset(UTF16)] */,
3256 uint32_t RenameOptions /* [in] */,
3259 struct wkssvc_NetrRenameMachineInDomain r;
3263 r.in.server_name = server_name;
3264 r.in.NewMachineName = NewMachineName;
3265 r.in.Account = Account;
3266 r.in.password = password;
3267 r.in.RenameOptions = RenameOptions;
3269 if (DEBUGLEVEL >= 10) {
3270 NDR_PRINT_IN_DEBUG(wkssvc_NetrRenameMachineInDomain, &r);
3273 status = cli->dispatch(cli,
3276 NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN,
3279 if (!NT_STATUS_IS_OK(status)) {
3283 if (DEBUGLEVEL >= 10) {
3284 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain, &r);
3287 if (NT_STATUS_IS_ERR(status)) {
3291 /* Return variables */
3295 *werror = r.out.result;
3298 return werror_to_ntstatus(r.out.result);
3301 struct rpccli_wkssvc_NetrValidateName_state {
3302 struct wkssvc_NetrValidateName orig;
3303 struct wkssvc_NetrValidateName tmp;
3304 TALLOC_CTX *out_mem_ctx;
3305 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3308 static void rpccli_wkssvc_NetrValidateName_done(struct tevent_req *subreq);
3310 struct tevent_req *rpccli_wkssvc_NetrValidateName_send(TALLOC_CTX *mem_ctx,
3311 struct tevent_context *ev,
3312 struct rpc_pipe_client *cli,
3313 const char *_server_name /* [in] [unique,charset(UTF16)] */,
3314 const char *_name /* [in] [ref,charset(UTF16)] */,
3315 const char *_Account /* [in] [unique,charset(UTF16)] */,
3316 const char *_Password /* [in] [unique,charset(UTF16)] */,
3317 enum wkssvc_NetValidateNameType _name_type /* [in] */)
3319 struct tevent_req *req;
3320 struct rpccli_wkssvc_NetrValidateName_state *state;
3321 struct tevent_req *subreq;
3323 req = tevent_req_create(mem_ctx, &state,
3324 struct rpccli_wkssvc_NetrValidateName_state);
3328 state->out_mem_ctx = NULL;
3329 state->dispatch_recv = cli->dispatch_recv;
3332 state->orig.in.server_name = _server_name;
3333 state->orig.in.name = _name;
3334 state->orig.in.Account = _Account;
3335 state->orig.in.Password = _Password;
3336 state->orig.in.name_type = _name_type;
3338 /* Out parameters */
3341 ZERO_STRUCT(state->orig.out.result);
3343 if (DEBUGLEVEL >= 10) {
3344 NDR_PRINT_IN_DEBUG(wkssvc_NetrValidateName, &state->orig);
3347 /* make a temporary copy, that we pass to the dispatch function */
3348 state->tmp = state->orig;
3350 subreq = cli->dispatch_send(state, ev, cli,
3352 NDR_WKSSVC_NETRVALIDATENAME,
3354 if (tevent_req_nomem(subreq, req)) {
3355 return tevent_req_post(req, ev);
3357 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrValidateName_done, req);
3361 static void rpccli_wkssvc_NetrValidateName_done(struct tevent_req *subreq)
3363 struct tevent_req *req = tevent_req_callback_data(
3364 subreq, struct tevent_req);
3365 struct rpccli_wkssvc_NetrValidateName_state *state = tevent_req_data(
3366 req, struct rpccli_wkssvc_NetrValidateName_state);
3368 TALLOC_CTX *mem_ctx;
3370 if (state->out_mem_ctx) {
3371 mem_ctx = state->out_mem_ctx;
3376 status = state->dispatch_recv(subreq, mem_ctx);
3377 TALLOC_FREE(subreq);
3378 if (!NT_STATUS_IS_OK(status)) {
3379 tevent_req_nterror(req, status);
3383 /* Copy out parameters */
3386 state->orig.out.result = state->tmp.out.result;
3388 /* Reset temporary structure */
3389 ZERO_STRUCT(state->tmp);
3391 if (DEBUGLEVEL >= 10) {
3392 NDR_PRINT_OUT_DEBUG(wkssvc_NetrValidateName, &state->orig);
3395 tevent_req_done(req);
3398 NTSTATUS rpccli_wkssvc_NetrValidateName_recv(struct tevent_req *req,
3399 TALLOC_CTX *mem_ctx,
3402 struct rpccli_wkssvc_NetrValidateName_state *state = tevent_req_data(
3403 req, struct rpccli_wkssvc_NetrValidateName_state);
3406 if (tevent_req_is_nterror(req, &status)) {
3407 tevent_req_received(req);
3411 /* Steal possbile out parameters to the callers context */
3412 talloc_steal(mem_ctx, state->out_mem_ctx);
3415 *result = state->orig.out.result;
3417 tevent_req_received(req);
3418 return NT_STATUS_OK;
3421 NTSTATUS rpccli_wkssvc_NetrValidateName(struct rpc_pipe_client *cli,
3422 TALLOC_CTX *mem_ctx,
3423 const char *server_name /* [in] [unique,charset(UTF16)] */,
3424 const char *name /* [in] [ref,charset(UTF16)] */,
3425 const char *Account /* [in] [unique,charset(UTF16)] */,
3426 const char *Password /* [in] [unique,charset(UTF16)] */,
3427 enum wkssvc_NetValidateNameType name_type /* [in] */,
3430 struct wkssvc_NetrValidateName r;
3434 r.in.server_name = server_name;
3436 r.in.Account = Account;
3437 r.in.Password = Password;
3438 r.in.name_type = name_type;
3440 if (DEBUGLEVEL >= 10) {
3441 NDR_PRINT_IN_DEBUG(wkssvc_NetrValidateName, &r);
3444 status = cli->dispatch(cli,
3447 NDR_WKSSVC_NETRVALIDATENAME,
3450 if (!NT_STATUS_IS_OK(status)) {
3454 if (DEBUGLEVEL >= 10) {
3455 NDR_PRINT_OUT_DEBUG(wkssvc_NetrValidateName, &r);
3458 if (NT_STATUS_IS_ERR(status)) {
3462 /* Return variables */
3466 *werror = r.out.result;
3469 return werror_to_ntstatus(r.out.result);
3472 struct rpccli_wkssvc_NetrGetJoinInformation_state {
3473 struct wkssvc_NetrGetJoinInformation orig;
3474 struct wkssvc_NetrGetJoinInformation tmp;
3475 TALLOC_CTX *out_mem_ctx;
3476 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3479 static void rpccli_wkssvc_NetrGetJoinInformation_done(struct tevent_req *subreq);
3481 struct tevent_req *rpccli_wkssvc_NetrGetJoinInformation_send(TALLOC_CTX *mem_ctx,
3482 struct tevent_context *ev,
3483 struct rpc_pipe_client *cli,
3484 const char *_server_name /* [in] [unique,charset(UTF16)] */,
3485 const char **_name_buffer /* [in,out] [ref,charset(UTF16)] */,
3486 enum wkssvc_NetJoinStatus *_name_type /* [out] [ref] */)
3488 struct tevent_req *req;
3489 struct rpccli_wkssvc_NetrGetJoinInformation_state *state;
3490 struct tevent_req *subreq;
3492 req = tevent_req_create(mem_ctx, &state,
3493 struct rpccli_wkssvc_NetrGetJoinInformation_state);
3497 state->out_mem_ctx = NULL;
3498 state->dispatch_recv = cli->dispatch_recv;
3501 state->orig.in.server_name = _server_name;
3502 state->orig.in.name_buffer = _name_buffer;
3504 /* Out parameters */
3505 state->orig.out.name_buffer = _name_buffer;
3506 state->orig.out.name_type = _name_type;
3509 ZERO_STRUCT(state->orig.out.result);
3511 if (DEBUGLEVEL >= 10) {
3512 NDR_PRINT_IN_DEBUG(wkssvc_NetrGetJoinInformation, &state->orig);
3515 state->out_mem_ctx = talloc_named_const(state, 0,
3516 "rpccli_wkssvc_NetrGetJoinInformation_out_memory");
3517 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3518 return tevent_req_post(req, ev);
3521 /* make a temporary copy, that we pass to the dispatch function */
3522 state->tmp = state->orig;
3524 subreq = cli->dispatch_send(state, ev, cli,
3526 NDR_WKSSVC_NETRGETJOININFORMATION,
3528 if (tevent_req_nomem(subreq, req)) {
3529 return tevent_req_post(req, ev);
3531 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrGetJoinInformation_done, req);
3535 static void rpccli_wkssvc_NetrGetJoinInformation_done(struct tevent_req *subreq)
3537 struct tevent_req *req = tevent_req_callback_data(
3538 subreq, struct tevent_req);
3539 struct rpccli_wkssvc_NetrGetJoinInformation_state *state = tevent_req_data(
3540 req, struct rpccli_wkssvc_NetrGetJoinInformation_state);
3542 TALLOC_CTX *mem_ctx;
3544 if (state->out_mem_ctx) {
3545 mem_ctx = state->out_mem_ctx;
3550 status = state->dispatch_recv(subreq, mem_ctx);
3551 TALLOC_FREE(subreq);
3552 if (!NT_STATUS_IS_OK(status)) {
3553 tevent_req_nterror(req, status);
3557 /* Copy out parameters */
3558 *state->orig.out.name_buffer = *state->tmp.out.name_buffer;
3559 *state->orig.out.name_type = *state->tmp.out.name_type;
3562 state->orig.out.result = state->tmp.out.result;
3564 /* Reset temporary structure */
3565 ZERO_STRUCT(state->tmp);
3567 if (DEBUGLEVEL >= 10) {
3568 NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinInformation, &state->orig);
3571 tevent_req_done(req);
3574 NTSTATUS rpccli_wkssvc_NetrGetJoinInformation_recv(struct tevent_req *req,
3575 TALLOC_CTX *mem_ctx,
3578 struct rpccli_wkssvc_NetrGetJoinInformation_state *state = tevent_req_data(
3579 req, struct rpccli_wkssvc_NetrGetJoinInformation_state);
3582 if (tevent_req_is_nterror(req, &status)) {
3583 tevent_req_received(req);
3587 /* Steal possbile out parameters to the callers context */
3588 talloc_steal(mem_ctx, state->out_mem_ctx);
3591 *result = state->orig.out.result;
3593 tevent_req_received(req);
3594 return NT_STATUS_OK;
3597 NTSTATUS rpccli_wkssvc_NetrGetJoinInformation(struct rpc_pipe_client *cli,
3598 TALLOC_CTX *mem_ctx,
3599 const char *server_name /* [in] [unique,charset(UTF16)] */,
3600 const char **name_buffer /* [in,out] [ref,charset(UTF16)] */,
3601 enum wkssvc_NetJoinStatus *name_type /* [out] [ref] */,
3604 struct wkssvc_NetrGetJoinInformation r;
3608 r.in.server_name = server_name;
3609 r.in.name_buffer = name_buffer;
3611 if (DEBUGLEVEL >= 10) {
3612 NDR_PRINT_IN_DEBUG(wkssvc_NetrGetJoinInformation, &r);
3615 status = cli->dispatch(cli,
3618 NDR_WKSSVC_NETRGETJOININFORMATION,
3621 if (!NT_STATUS_IS_OK(status)) {
3625 if (DEBUGLEVEL >= 10) {
3626 NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinInformation, &r);
3629 if (NT_STATUS_IS_ERR(status)) {
3633 /* Return variables */
3634 *name_buffer = *r.out.name_buffer;
3635 *name_type = *r.out.name_type;
3639 *werror = r.out.result;
3642 return werror_to_ntstatus(r.out.result);
3645 struct rpccli_wkssvc_NetrGetJoinableOus_state {
3646 struct wkssvc_NetrGetJoinableOus orig;
3647 struct wkssvc_NetrGetJoinableOus tmp;
3648 TALLOC_CTX *out_mem_ctx;
3649 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3652 static void rpccli_wkssvc_NetrGetJoinableOus_done(struct tevent_req *subreq);
3654 struct tevent_req *rpccli_wkssvc_NetrGetJoinableOus_send(TALLOC_CTX *mem_ctx,
3655 struct tevent_context *ev,
3656 struct rpc_pipe_client *cli,
3657 const char *_server_name /* [in] [unique,charset(UTF16)] */,
3658 const char *_domain_name /* [in] [ref,charset(UTF16)] */,
3659 const char *_Account /* [in] [unique,charset(UTF16)] */,
3660 const char *_unknown /* [in] [unique,charset(UTF16)] */,
3661 uint32_t *_num_ous /* [in,out] [ref] */,
3662 const char ***_ous /* [out] [ref,charset(UTF16),size_is(,*num_ous)] */)
3664 struct tevent_req *req;
3665 struct rpccli_wkssvc_NetrGetJoinableOus_state *state;
3666 struct tevent_req *subreq;
3668 req = tevent_req_create(mem_ctx, &state,
3669 struct rpccli_wkssvc_NetrGetJoinableOus_state);
3673 state->out_mem_ctx = NULL;
3674 state->dispatch_recv = cli->dispatch_recv;
3677 state->orig.in.server_name = _server_name;
3678 state->orig.in.domain_name = _domain_name;
3679 state->orig.in.Account = _Account;
3680 state->orig.in.unknown = _unknown;
3681 state->orig.in.num_ous = _num_ous;
3683 /* Out parameters */
3684 state->orig.out.num_ous = _num_ous;
3685 state->orig.out.ous = _ous;
3688 ZERO_STRUCT(state->orig.out.result);
3690 if (DEBUGLEVEL >= 10) {
3691 NDR_PRINT_IN_DEBUG(wkssvc_NetrGetJoinableOus, &state->orig);
3694 state->out_mem_ctx = talloc_named_const(state, 0,
3695 "rpccli_wkssvc_NetrGetJoinableOus_out_memory");
3696 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3697 return tevent_req_post(req, ev);
3700 /* make a temporary copy, that we pass to the dispatch function */
3701 state->tmp = state->orig;
3703 subreq = cli->dispatch_send(state, ev, cli,
3705 NDR_WKSSVC_NETRGETJOINABLEOUS,
3707 if (tevent_req_nomem(subreq, req)) {
3708 return tevent_req_post(req, ev);
3710 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrGetJoinableOus_done, req);
3714 static void rpccli_wkssvc_NetrGetJoinableOus_done(struct tevent_req *subreq)
3716 struct tevent_req *req = tevent_req_callback_data(
3717 subreq, struct tevent_req);
3718 struct rpccli_wkssvc_NetrGetJoinableOus_state *state = tevent_req_data(
3719 req, struct rpccli_wkssvc_NetrGetJoinableOus_state);
3721 TALLOC_CTX *mem_ctx;
3723 if (state->out_mem_ctx) {
3724 mem_ctx = state->out_mem_ctx;
3729 status = state->dispatch_recv(subreq, mem_ctx);
3730 TALLOC_FREE(subreq);
3731 if (!NT_STATUS_IS_OK(status)) {
3732 tevent_req_nterror(req, status);
3736 /* Copy out parameters */
3737 *state->orig.out.num_ous = *state->tmp.out.num_ous;
3738 *state->orig.out.ous = *state->tmp.out.ous;
3741 state->orig.out.result = state->tmp.out.result;
3743 /* Reset temporary structure */
3744 ZERO_STRUCT(state->tmp);
3746 if (DEBUGLEVEL >= 10) {
3747 NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinableOus, &state->orig);
3750 tevent_req_done(req);
3753 NTSTATUS rpccli_wkssvc_NetrGetJoinableOus_recv(struct tevent_req *req,
3754 TALLOC_CTX *mem_ctx,
3757 struct rpccli_wkssvc_NetrGetJoinableOus_state *state = tevent_req_data(
3758 req, struct rpccli_wkssvc_NetrGetJoinableOus_state);
3761 if (tevent_req_is_nterror(req, &status)) {
3762 tevent_req_received(req);
3766 /* Steal possbile out parameters to the callers context */
3767 talloc_steal(mem_ctx, state->out_mem_ctx);
3770 *result = state->orig.out.result;
3772 tevent_req_received(req);
3773 return NT_STATUS_OK;
3776 NTSTATUS rpccli_wkssvc_NetrGetJoinableOus(struct rpc_pipe_client *cli,
3777 TALLOC_CTX *mem_ctx,
3778 const char *server_name /* [in] [unique,charset(UTF16)] */,
3779 const char *domain_name /* [in] [ref,charset(UTF16)] */,
3780 const char *Account /* [in] [unique,charset(UTF16)] */,
3781 const char *unknown /* [in] [unique,charset(UTF16)] */,
3782 uint32_t *num_ous /* [in,out] [ref] */,
3783 const char ***ous /* [out] [ref,charset(UTF16),size_is(,*num_ous)] */,
3786 struct wkssvc_NetrGetJoinableOus r;
3790 r.in.server_name = server_name;
3791 r.in.domain_name = domain_name;
3792 r.in.Account = Account;
3793 r.in.unknown = unknown;
3794 r.in.num_ous = num_ous;
3796 if (DEBUGLEVEL >= 10) {
3797 NDR_PRINT_IN_DEBUG(wkssvc_NetrGetJoinableOus, &r);
3800 status = cli->dispatch(cli,
3803 NDR_WKSSVC_NETRGETJOINABLEOUS,
3806 if (!NT_STATUS_IS_OK(status)) {
3810 if (DEBUGLEVEL >= 10) {
3811 NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinableOus, &r);
3814 if (NT_STATUS_IS_ERR(status)) {
3818 /* Return variables */
3819 *num_ous = *r.out.num_ous;
3824 *werror = r.out.result;
3827 return werror_to_ntstatus(r.out.result);
3830 struct rpccli_wkssvc_NetrJoinDomain2_state {
3831 struct wkssvc_NetrJoinDomain2 orig;
3832 struct wkssvc_NetrJoinDomain2 tmp;
3833 TALLOC_CTX *out_mem_ctx;
3834 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3837 static void rpccli_wkssvc_NetrJoinDomain2_done(struct tevent_req *subreq);
3839 struct tevent_req *rpccli_wkssvc_NetrJoinDomain2_send(TALLOC_CTX *mem_ctx,
3840 struct tevent_context *ev,
3841 struct rpc_pipe_client *cli,
3842 const char *_server_name /* [in] [unique,charset(UTF16)] */,
3843 const char *_domain_name /* [in] [ref,charset(UTF16)] */,
3844 const char *_account_ou /* [in] [unique,charset(UTF16)] */,
3845 const char *_admin_account /* [in] [unique,charset(UTF16)] */,
3846 struct wkssvc_PasswordBuffer *_encrypted_password /* [in] [unique] */,
3847 uint32_t _join_flags /* [in] */)
3849 struct tevent_req *req;
3850 struct rpccli_wkssvc_NetrJoinDomain2_state *state;
3851 struct tevent_req *subreq;
3853 req = tevent_req_create(mem_ctx, &state,
3854 struct rpccli_wkssvc_NetrJoinDomain2_state);
3858 state->out_mem_ctx = NULL;
3859 state->dispatch_recv = cli->dispatch_recv;
3862 state->orig.in.server_name = _server_name;
3863 state->orig.in.domain_name = _domain_name;
3864 state->orig.in.account_ou = _account_ou;
3865 state->orig.in.admin_account = _admin_account;
3866 state->orig.in.encrypted_password = _encrypted_password;
3867 state->orig.in.join_flags = _join_flags;
3869 /* Out parameters */
3872 ZERO_STRUCT(state->orig.out.result);
3874 if (DEBUGLEVEL >= 10) {
3875 NDR_PRINT_IN_DEBUG(wkssvc_NetrJoinDomain2, &state->orig);
3878 /* make a temporary copy, that we pass to the dispatch function */
3879 state->tmp = state->orig;
3881 subreq = cli->dispatch_send(state, ev, cli,
3883 NDR_WKSSVC_NETRJOINDOMAIN2,
3885 if (tevent_req_nomem(subreq, req)) {
3886 return tevent_req_post(req, ev);
3888 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrJoinDomain2_done, req);
3892 static void rpccli_wkssvc_NetrJoinDomain2_done(struct tevent_req *subreq)
3894 struct tevent_req *req = tevent_req_callback_data(
3895 subreq, struct tevent_req);
3896 struct rpccli_wkssvc_NetrJoinDomain2_state *state = tevent_req_data(
3897 req, struct rpccli_wkssvc_NetrJoinDomain2_state);
3899 TALLOC_CTX *mem_ctx;
3901 if (state->out_mem_ctx) {
3902 mem_ctx = state->out_mem_ctx;
3907 status = state->dispatch_recv(subreq, mem_ctx);
3908 TALLOC_FREE(subreq);
3909 if (!NT_STATUS_IS_OK(status)) {
3910 tevent_req_nterror(req, status);
3914 /* Copy out parameters */
3917 state->orig.out.result = state->tmp.out.result;
3919 /* Reset temporary structure */
3920 ZERO_STRUCT(state->tmp);
3922 if (DEBUGLEVEL >= 10) {
3923 NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain2, &state->orig);
3926 tevent_req_done(req);
3929 NTSTATUS rpccli_wkssvc_NetrJoinDomain2_recv(struct tevent_req *req,
3930 TALLOC_CTX *mem_ctx,
3933 struct rpccli_wkssvc_NetrJoinDomain2_state *state = tevent_req_data(
3934 req, struct rpccli_wkssvc_NetrJoinDomain2_state);
3937 if (tevent_req_is_nterror(req, &status)) {
3938 tevent_req_received(req);
3942 /* Steal possbile out parameters to the callers context */
3943 talloc_steal(mem_ctx, state->out_mem_ctx);
3946 *result = state->orig.out.result;
3948 tevent_req_received(req);
3949 return NT_STATUS_OK;
3952 NTSTATUS rpccli_wkssvc_NetrJoinDomain2(struct rpc_pipe_client *cli,
3953 TALLOC_CTX *mem_ctx,
3954 const char *server_name /* [in] [unique,charset(UTF16)] */,
3955 const char *domain_name /* [in] [ref,charset(UTF16)] */,
3956 const char *account_ou /* [in] [unique,charset(UTF16)] */,
3957 const char *admin_account /* [in] [unique,charset(UTF16)] */,
3958 struct wkssvc_PasswordBuffer *encrypted_password /* [in] [unique] */,
3959 uint32_t join_flags /* [in] */,
3962 struct wkssvc_NetrJoinDomain2 r;
3966 r.in.server_name = server_name;
3967 r.in.domain_name = domain_name;
3968 r.in.account_ou = account_ou;
3969 r.in.admin_account = admin_account;
3970 r.in.encrypted_password = encrypted_password;
3971 r.in.join_flags = join_flags;
3973 if (DEBUGLEVEL >= 10) {
3974 NDR_PRINT_IN_DEBUG(wkssvc_NetrJoinDomain2, &r);
3977 status = cli->dispatch(cli,
3980 NDR_WKSSVC_NETRJOINDOMAIN2,
3983 if (!NT_STATUS_IS_OK(status)) {
3987 if (DEBUGLEVEL >= 10) {
3988 NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain2, &r);
3991 if (NT_STATUS_IS_ERR(status)) {
3995 /* Return variables */
3999 *werror = r.out.result;
4002 return werror_to_ntstatus(r.out.result);
4005 struct rpccli_wkssvc_NetrUnjoinDomain2_state {
4006 struct wkssvc_NetrUnjoinDomain2 orig;
4007 struct wkssvc_NetrUnjoinDomain2 tmp;
4008 TALLOC_CTX *out_mem_ctx;
4009 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4012 static void rpccli_wkssvc_NetrUnjoinDomain2_done(struct tevent_req *subreq);
4014 struct tevent_req *rpccli_wkssvc_NetrUnjoinDomain2_send(TALLOC_CTX *mem_ctx,
4015 struct tevent_context *ev,
4016 struct rpc_pipe_client *cli,
4017 const char *_server_name /* [in] [unique,charset(UTF16)] */,
4018 const char *_account /* [in] [unique,charset(UTF16)] */,
4019 struct wkssvc_PasswordBuffer *_encrypted_password /* [in] [unique] */,
4020 uint32_t _unjoin_flags /* [in] */)
4022 struct tevent_req *req;
4023 struct rpccli_wkssvc_NetrUnjoinDomain2_state *state;
4024 struct tevent_req *subreq;
4026 req = tevent_req_create(mem_ctx, &state,
4027 struct rpccli_wkssvc_NetrUnjoinDomain2_state);
4031 state->out_mem_ctx = NULL;
4032 state->dispatch_recv = cli->dispatch_recv;
4035 state->orig.in.server_name = _server_name;
4036 state->orig.in.account = _account;
4037 state->orig.in.encrypted_password = _encrypted_password;
4038 state->orig.in.unjoin_flags = _unjoin_flags;
4040 /* Out parameters */
4043 ZERO_STRUCT(state->orig.out.result);
4045 if (DEBUGLEVEL >= 10) {
4046 NDR_PRINT_IN_DEBUG(wkssvc_NetrUnjoinDomain2, &state->orig);
4049 /* make a temporary copy, that we pass to the dispatch function */
4050 state->tmp = state->orig;
4052 subreq = cli->dispatch_send(state, ev, cli,
4054 NDR_WKSSVC_NETRUNJOINDOMAIN2,
4056 if (tevent_req_nomem(subreq, req)) {
4057 return tevent_req_post(req, ev);
4059 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrUnjoinDomain2_done, req);
4063 static void rpccli_wkssvc_NetrUnjoinDomain2_done(struct tevent_req *subreq)
4065 struct tevent_req *req = tevent_req_callback_data(
4066 subreq, struct tevent_req);
4067 struct rpccli_wkssvc_NetrUnjoinDomain2_state *state = tevent_req_data(
4068 req, struct rpccli_wkssvc_NetrUnjoinDomain2_state);
4070 TALLOC_CTX *mem_ctx;
4072 if (state->out_mem_ctx) {
4073 mem_ctx = state->out_mem_ctx;
4078 status = state->dispatch_recv(subreq, mem_ctx);
4079 TALLOC_FREE(subreq);
4080 if (!NT_STATUS_IS_OK(status)) {
4081 tevent_req_nterror(req, status);
4085 /* Copy out parameters */
4088 state->orig.out.result = state->tmp.out.result;
4090 /* Reset temporary structure */
4091 ZERO_STRUCT(state->tmp);
4093 if (DEBUGLEVEL >= 10) {
4094 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain2, &state->orig);
4097 tevent_req_done(req);
4100 NTSTATUS rpccli_wkssvc_NetrUnjoinDomain2_recv(struct tevent_req *req,
4101 TALLOC_CTX *mem_ctx,
4104 struct rpccli_wkssvc_NetrUnjoinDomain2_state *state = tevent_req_data(
4105 req, struct rpccli_wkssvc_NetrUnjoinDomain2_state);
4108 if (tevent_req_is_nterror(req, &status)) {
4109 tevent_req_received(req);
4113 /* Steal possbile out parameters to the callers context */
4114 talloc_steal(mem_ctx, state->out_mem_ctx);
4117 *result = state->orig.out.result;
4119 tevent_req_received(req);
4120 return NT_STATUS_OK;
4123 NTSTATUS rpccli_wkssvc_NetrUnjoinDomain2(struct rpc_pipe_client *cli,
4124 TALLOC_CTX *mem_ctx,
4125 const char *server_name /* [in] [unique,charset(UTF16)] */,
4126 const char *account /* [in] [unique,charset(UTF16)] */,
4127 struct wkssvc_PasswordBuffer *encrypted_password /* [in] [unique] */,
4128 uint32_t unjoin_flags /* [in] */,
4131 struct wkssvc_NetrUnjoinDomain2 r;
4135 r.in.server_name = server_name;
4136 r.in.account = account;
4137 r.in.encrypted_password = encrypted_password;
4138 r.in.unjoin_flags = unjoin_flags;
4140 if (DEBUGLEVEL >= 10) {
4141 NDR_PRINT_IN_DEBUG(wkssvc_NetrUnjoinDomain2, &r);
4144 status = cli->dispatch(cli,
4147 NDR_WKSSVC_NETRUNJOINDOMAIN2,
4150 if (!NT_STATUS_IS_OK(status)) {
4154 if (DEBUGLEVEL >= 10) {
4155 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain2, &r);
4158 if (NT_STATUS_IS_ERR(status)) {
4162 /* Return variables */
4166 *werror = r.out.result;
4169 return werror_to_ntstatus(r.out.result);
4172 struct rpccli_wkssvc_NetrRenameMachineInDomain2_state {
4173 struct wkssvc_NetrRenameMachineInDomain2 orig;
4174 struct wkssvc_NetrRenameMachineInDomain2 tmp;
4175 TALLOC_CTX *out_mem_ctx;
4176 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4179 static void rpccli_wkssvc_NetrRenameMachineInDomain2_done(struct tevent_req *subreq);
4181 struct tevent_req *rpccli_wkssvc_NetrRenameMachineInDomain2_send(TALLOC_CTX *mem_ctx,
4182 struct tevent_context *ev,
4183 struct rpc_pipe_client *cli,
4184 const char *_server_name /* [in] [unique,charset(UTF16)] */,
4185 const char *_NewMachineName /* [in] [unique,charset(UTF16)] */,
4186 const char *_Account /* [in] [unique,charset(UTF16)] */,
4187 struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */,
4188 uint32_t _RenameOptions /* [in] */)
4190 struct tevent_req *req;
4191 struct rpccli_wkssvc_NetrRenameMachineInDomain2_state *state;
4192 struct tevent_req *subreq;
4194 req = tevent_req_create(mem_ctx, &state,
4195 struct rpccli_wkssvc_NetrRenameMachineInDomain2_state);
4199 state->out_mem_ctx = NULL;
4200 state->dispatch_recv = cli->dispatch_recv;
4203 state->orig.in.server_name = _server_name;
4204 state->orig.in.NewMachineName = _NewMachineName;
4205 state->orig.in.Account = _Account;
4206 state->orig.in.EncryptedPassword = _EncryptedPassword;
4207 state->orig.in.RenameOptions = _RenameOptions;
4209 /* Out parameters */
4212 ZERO_STRUCT(state->orig.out.result);
4214 if (DEBUGLEVEL >= 10) {
4215 NDR_PRINT_IN_DEBUG(wkssvc_NetrRenameMachineInDomain2, &state->orig);
4218 /* make a temporary copy, that we pass to the dispatch function */
4219 state->tmp = state->orig;
4221 subreq = cli->dispatch_send(state, ev, cli,
4223 NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2,
4225 if (tevent_req_nomem(subreq, req)) {
4226 return tevent_req_post(req, ev);
4228 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrRenameMachineInDomain2_done, req);
4232 static void rpccli_wkssvc_NetrRenameMachineInDomain2_done(struct tevent_req *subreq)
4234 struct tevent_req *req = tevent_req_callback_data(
4235 subreq, struct tevent_req);
4236 struct rpccli_wkssvc_NetrRenameMachineInDomain2_state *state = tevent_req_data(
4237 req, struct rpccli_wkssvc_NetrRenameMachineInDomain2_state);
4239 TALLOC_CTX *mem_ctx;
4241 if (state->out_mem_ctx) {
4242 mem_ctx = state->out_mem_ctx;
4247 status = state->dispatch_recv(subreq, mem_ctx);
4248 TALLOC_FREE(subreq);
4249 if (!NT_STATUS_IS_OK(status)) {
4250 tevent_req_nterror(req, status);
4254 /* Copy out parameters */
4257 state->orig.out.result = state->tmp.out.result;
4259 /* Reset temporary structure */
4260 ZERO_STRUCT(state->tmp);
4262 if (DEBUGLEVEL >= 10) {
4263 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain2, &state->orig);
4266 tevent_req_done(req);
4269 NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain2_recv(struct tevent_req *req,
4270 TALLOC_CTX *mem_ctx,
4273 struct rpccli_wkssvc_NetrRenameMachineInDomain2_state *state = tevent_req_data(
4274 req, struct rpccli_wkssvc_NetrRenameMachineInDomain2_state);
4277 if (tevent_req_is_nterror(req, &status)) {
4278 tevent_req_received(req);
4282 /* Steal possbile out parameters to the callers context */
4283 talloc_steal(mem_ctx, state->out_mem_ctx);
4286 *result = state->orig.out.result;
4288 tevent_req_received(req);
4289 return NT_STATUS_OK;
4292 NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain2(struct rpc_pipe_client *cli,
4293 TALLOC_CTX *mem_ctx,
4294 const char *server_name /* [in] [unique,charset(UTF16)] */,
4295 const char *NewMachineName /* [in] [unique,charset(UTF16)] */,
4296 const char *Account /* [in] [unique,charset(UTF16)] */,
4297 struct wkssvc_PasswordBuffer *EncryptedPassword /* [in] [unique] */,
4298 uint32_t RenameOptions /* [in] */,
4301 struct wkssvc_NetrRenameMachineInDomain2 r;
4305 r.in.server_name = server_name;
4306 r.in.NewMachineName = NewMachineName;
4307 r.in.Account = Account;
4308 r.in.EncryptedPassword = EncryptedPassword;
4309 r.in.RenameOptions = RenameOptions;
4311 if (DEBUGLEVEL >= 10) {
4312 NDR_PRINT_IN_DEBUG(wkssvc_NetrRenameMachineInDomain2, &r);
4315 status = cli->dispatch(cli,
4318 NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2,
4321 if (!NT_STATUS_IS_OK(status)) {
4325 if (DEBUGLEVEL >= 10) {
4326 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain2, &r);
4329 if (NT_STATUS_IS_ERR(status)) {
4333 /* Return variables */
4337 *werror = r.out.result;
4340 return werror_to_ntstatus(r.out.result);
4343 struct rpccli_wkssvc_NetrValidateName2_state {
4344 struct wkssvc_NetrValidateName2 orig;
4345 struct wkssvc_NetrValidateName2 tmp;
4346 TALLOC_CTX *out_mem_ctx;
4347 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4350 static void rpccli_wkssvc_NetrValidateName2_done(struct tevent_req *subreq);
4352 struct tevent_req *rpccli_wkssvc_NetrValidateName2_send(TALLOC_CTX *mem_ctx,
4353 struct tevent_context *ev,
4354 struct rpc_pipe_client *cli,
4355 const char *_server_name /* [in] [unique,charset(UTF16)] */,
4356 const char *_name /* [in] [ref,charset(UTF16)] */,
4357 const char *_Account /* [in] [unique,charset(UTF16)] */,
4358 struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */,
4359 enum wkssvc_NetValidateNameType _name_type /* [in] */)
4361 struct tevent_req *req;
4362 struct rpccli_wkssvc_NetrValidateName2_state *state;
4363 struct tevent_req *subreq;
4365 req = tevent_req_create(mem_ctx, &state,
4366 struct rpccli_wkssvc_NetrValidateName2_state);
4370 state->out_mem_ctx = NULL;
4371 state->dispatch_recv = cli->dispatch_recv;
4374 state->orig.in.server_name = _server_name;
4375 state->orig.in.name = _name;
4376 state->orig.in.Account = _Account;
4377 state->orig.in.EncryptedPassword = _EncryptedPassword;
4378 state->orig.in.name_type = _name_type;
4380 /* Out parameters */
4383 ZERO_STRUCT(state->orig.out.result);
4385 if (DEBUGLEVEL >= 10) {
4386 NDR_PRINT_IN_DEBUG(wkssvc_NetrValidateName2, &state->orig);
4389 /* make a temporary copy, that we pass to the dispatch function */
4390 state->tmp = state->orig;
4392 subreq = cli->dispatch_send(state, ev, cli,
4394 NDR_WKSSVC_NETRVALIDATENAME2,
4396 if (tevent_req_nomem(subreq, req)) {
4397 return tevent_req_post(req, ev);
4399 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrValidateName2_done, req);
4403 static void rpccli_wkssvc_NetrValidateName2_done(struct tevent_req *subreq)
4405 struct tevent_req *req = tevent_req_callback_data(
4406 subreq, struct tevent_req);
4407 struct rpccli_wkssvc_NetrValidateName2_state *state = tevent_req_data(
4408 req, struct rpccli_wkssvc_NetrValidateName2_state);
4410 TALLOC_CTX *mem_ctx;
4412 if (state->out_mem_ctx) {
4413 mem_ctx = state->out_mem_ctx;
4418 status = state->dispatch_recv(subreq, mem_ctx);
4419 TALLOC_FREE(subreq);
4420 if (!NT_STATUS_IS_OK(status)) {
4421 tevent_req_nterror(req, status);
4425 /* Copy out parameters */
4428 state->orig.out.result = state->tmp.out.result;
4430 /* Reset temporary structure */
4431 ZERO_STRUCT(state->tmp);
4433 if (DEBUGLEVEL >= 10) {
4434 NDR_PRINT_OUT_DEBUG(wkssvc_NetrValidateName2, &state->orig);
4437 tevent_req_done(req);
4440 NTSTATUS rpccli_wkssvc_NetrValidateName2_recv(struct tevent_req *req,
4441 TALLOC_CTX *mem_ctx,
4444 struct rpccli_wkssvc_NetrValidateName2_state *state = tevent_req_data(
4445 req, struct rpccli_wkssvc_NetrValidateName2_state);
4448 if (tevent_req_is_nterror(req, &status)) {
4449 tevent_req_received(req);
4453 /* Steal possbile out parameters to the callers context */
4454 talloc_steal(mem_ctx, state->out_mem_ctx);
4457 *result = state->orig.out.result;
4459 tevent_req_received(req);
4460 return NT_STATUS_OK;
4463 NTSTATUS rpccli_wkssvc_NetrValidateName2(struct rpc_pipe_client *cli,
4464 TALLOC_CTX *mem_ctx,
4465 const char *server_name /* [in] [unique,charset(UTF16)] */,
4466 const char *name /* [in] [ref,charset(UTF16)] */,
4467 const char *Account /* [in] [unique,charset(UTF16)] */,
4468 struct wkssvc_PasswordBuffer *EncryptedPassword /* [in] [unique] */,
4469 enum wkssvc_NetValidateNameType name_type /* [in] */,
4472 struct wkssvc_NetrValidateName2 r;
4476 r.in.server_name = server_name;
4478 r.in.Account = Account;
4479 r.in.EncryptedPassword = EncryptedPassword;
4480 r.in.name_type = name_type;
4482 if (DEBUGLEVEL >= 10) {
4483 NDR_PRINT_IN_DEBUG(wkssvc_NetrValidateName2, &r);
4486 status = cli->dispatch(cli,
4489 NDR_WKSSVC_NETRVALIDATENAME2,
4492 if (!NT_STATUS_IS_OK(status)) {
4496 if (DEBUGLEVEL >= 10) {
4497 NDR_PRINT_OUT_DEBUG(wkssvc_NetrValidateName2, &r);
4500 if (NT_STATUS_IS_ERR(status)) {
4504 /* Return variables */
4508 *werror = r.out.result;
4511 return werror_to_ntstatus(r.out.result);
4514 struct rpccli_wkssvc_NetrGetJoinableOus2_state {
4515 struct wkssvc_NetrGetJoinableOus2 orig;
4516 struct wkssvc_NetrGetJoinableOus2 tmp;
4517 TALLOC_CTX *out_mem_ctx;
4518 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4521 static void rpccli_wkssvc_NetrGetJoinableOus2_done(struct tevent_req *subreq);
4523 struct tevent_req *rpccli_wkssvc_NetrGetJoinableOus2_send(TALLOC_CTX *mem_ctx,
4524 struct tevent_context *ev,
4525 struct rpc_pipe_client *cli,
4526 const char *_server_name /* [in] [unique,charset(UTF16)] */,
4527 const char *_domain_name /* [in] [ref,charset(UTF16)] */,
4528 const char *_Account /* [in] [unique,charset(UTF16)] */,
4529 struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */,
4530 uint32_t *_num_ous /* [in,out] [ref] */,
4531 const char ***_ous /* [out] [ref,charset(UTF16),size_is(,*num_ous)] */)
4533 struct tevent_req *req;
4534 struct rpccli_wkssvc_NetrGetJoinableOus2_state *state;
4535 struct tevent_req *subreq;
4537 req = tevent_req_create(mem_ctx, &state,
4538 struct rpccli_wkssvc_NetrGetJoinableOus2_state);
4542 state->out_mem_ctx = NULL;
4543 state->dispatch_recv = cli->dispatch_recv;
4546 state->orig.in.server_name = _server_name;
4547 state->orig.in.domain_name = _domain_name;
4548 state->orig.in.Account = _Account;
4549 state->orig.in.EncryptedPassword = _EncryptedPassword;
4550 state->orig.in.num_ous = _num_ous;
4552 /* Out parameters */
4553 state->orig.out.num_ous = _num_ous;
4554 state->orig.out.ous = _ous;
4557 ZERO_STRUCT(state->orig.out.result);
4559 if (DEBUGLEVEL >= 10) {
4560 NDR_PRINT_IN_DEBUG(wkssvc_NetrGetJoinableOus2, &state->orig);
4563 state->out_mem_ctx = talloc_named_const(state, 0,
4564 "rpccli_wkssvc_NetrGetJoinableOus2_out_memory");
4565 if (tevent_req_nomem(state->out_mem_ctx, req)) {
4566 return tevent_req_post(req, ev);
4569 /* make a temporary copy, that we pass to the dispatch function */
4570 state->tmp = state->orig;
4572 subreq = cli->dispatch_send(state, ev, cli,
4574 NDR_WKSSVC_NETRGETJOINABLEOUS2,
4576 if (tevent_req_nomem(subreq, req)) {
4577 return tevent_req_post(req, ev);
4579 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrGetJoinableOus2_done, req);
4583 static void rpccli_wkssvc_NetrGetJoinableOus2_done(struct tevent_req *subreq)
4585 struct tevent_req *req = tevent_req_callback_data(
4586 subreq, struct tevent_req);
4587 struct rpccli_wkssvc_NetrGetJoinableOus2_state *state = tevent_req_data(
4588 req, struct rpccli_wkssvc_NetrGetJoinableOus2_state);
4590 TALLOC_CTX *mem_ctx;
4592 if (state->out_mem_ctx) {
4593 mem_ctx = state->out_mem_ctx;
4598 status = state->dispatch_recv(subreq, mem_ctx);
4599 TALLOC_FREE(subreq);
4600 if (!NT_STATUS_IS_OK(status)) {
4601 tevent_req_nterror(req, status);
4605 /* Copy out parameters */
4606 *state->orig.out.num_ous = *state->tmp.out.num_ous;
4607 *state->orig.out.ous = *state->tmp.out.ous;
4610 state->orig.out.result = state->tmp.out.result;
4612 /* Reset temporary structure */
4613 ZERO_STRUCT(state->tmp);
4615 if (DEBUGLEVEL >= 10) {
4616 NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinableOus2, &state->orig);
4619 tevent_req_done(req);
4622 NTSTATUS rpccli_wkssvc_NetrGetJoinableOus2_recv(struct tevent_req *req,
4623 TALLOC_CTX *mem_ctx,
4626 struct rpccli_wkssvc_NetrGetJoinableOus2_state *state = tevent_req_data(
4627 req, struct rpccli_wkssvc_NetrGetJoinableOus2_state);
4630 if (tevent_req_is_nterror(req, &status)) {
4631 tevent_req_received(req);
4635 /* Steal possbile out parameters to the callers context */
4636 talloc_steal(mem_ctx, state->out_mem_ctx);
4639 *result = state->orig.out.result;
4641 tevent_req_received(req);
4642 return NT_STATUS_OK;
4645 NTSTATUS rpccli_wkssvc_NetrGetJoinableOus2(struct rpc_pipe_client *cli,
4646 TALLOC_CTX *mem_ctx,
4647 const char *server_name /* [in] [unique,charset(UTF16)] */,
4648 const char *domain_name /* [in] [ref,charset(UTF16)] */,
4649 const char *Account /* [in] [unique,charset(UTF16)] */,
4650 struct wkssvc_PasswordBuffer *EncryptedPassword /* [in] [unique] */,
4651 uint32_t *num_ous /* [in,out] [ref] */,
4652 const char ***ous /* [out] [ref,charset(UTF16),size_is(,*num_ous)] */,
4655 struct wkssvc_NetrGetJoinableOus2 r;
4659 r.in.server_name = server_name;
4660 r.in.domain_name = domain_name;
4661 r.in.Account = Account;
4662 r.in.EncryptedPassword = EncryptedPassword;
4663 r.in.num_ous = num_ous;
4665 if (DEBUGLEVEL >= 10) {
4666 NDR_PRINT_IN_DEBUG(wkssvc_NetrGetJoinableOus2, &r);
4669 status = cli->dispatch(cli,
4672 NDR_WKSSVC_NETRGETJOINABLEOUS2,
4675 if (!NT_STATUS_IS_OK(status)) {
4679 if (DEBUGLEVEL >= 10) {
4680 NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinableOus2, &r);
4683 if (NT_STATUS_IS_ERR(status)) {
4687 /* Return variables */
4688 *num_ous = *r.out.num_ous;
4693 *werror = r.out.result;
4696 return werror_to_ntstatus(r.out.result);
4699 struct rpccli_wkssvc_NetrAddAlternateComputerName_state {
4700 struct wkssvc_NetrAddAlternateComputerName orig;
4701 struct wkssvc_NetrAddAlternateComputerName tmp;
4702 TALLOC_CTX *out_mem_ctx;
4703 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4706 static void rpccli_wkssvc_NetrAddAlternateComputerName_done(struct tevent_req *subreq);
4708 struct tevent_req *rpccli_wkssvc_NetrAddAlternateComputerName_send(TALLOC_CTX *mem_ctx,
4709 struct tevent_context *ev,
4710 struct rpc_pipe_client *cli,
4711 const char *_server_name /* [in] [unique,charset(UTF16)] */,
4712 const char *_NewAlternateMachineName /* [in] [unique,charset(UTF16)] */,
4713 const char *_Account /* [in] [unique,charset(UTF16)] */,
4714 struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */,
4715 uint32_t _Reserved /* [in] */)
4717 struct tevent_req *req;
4718 struct rpccli_wkssvc_NetrAddAlternateComputerName_state *state;
4719 struct tevent_req *subreq;
4721 req = tevent_req_create(mem_ctx, &state,
4722 struct rpccli_wkssvc_NetrAddAlternateComputerName_state);
4726 state->out_mem_ctx = NULL;
4727 state->dispatch_recv = cli->dispatch_recv;
4730 state->orig.in.server_name = _server_name;
4731 state->orig.in.NewAlternateMachineName = _NewAlternateMachineName;
4732 state->orig.in.Account = _Account;
4733 state->orig.in.EncryptedPassword = _EncryptedPassword;
4734 state->orig.in.Reserved = _Reserved;
4736 /* Out parameters */
4739 ZERO_STRUCT(state->orig.out.result);
4741 if (DEBUGLEVEL >= 10) {
4742 NDR_PRINT_IN_DEBUG(wkssvc_NetrAddAlternateComputerName, &state->orig);
4745 /* make a temporary copy, that we pass to the dispatch function */
4746 state->tmp = state->orig;
4748 subreq = cli->dispatch_send(state, ev, cli,
4750 NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME,
4752 if (tevent_req_nomem(subreq, req)) {
4753 return tevent_req_post(req, ev);
4755 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrAddAlternateComputerName_done, req);
4759 static void rpccli_wkssvc_NetrAddAlternateComputerName_done(struct tevent_req *subreq)
4761 struct tevent_req *req = tevent_req_callback_data(
4762 subreq, struct tevent_req);
4763 struct rpccli_wkssvc_NetrAddAlternateComputerName_state *state = tevent_req_data(
4764 req, struct rpccli_wkssvc_NetrAddAlternateComputerName_state);
4766 TALLOC_CTX *mem_ctx;
4768 if (state->out_mem_ctx) {
4769 mem_ctx = state->out_mem_ctx;
4774 status = state->dispatch_recv(subreq, mem_ctx);
4775 TALLOC_FREE(subreq);
4776 if (!NT_STATUS_IS_OK(status)) {
4777 tevent_req_nterror(req, status);
4781 /* Copy out parameters */
4784 state->orig.out.result = state->tmp.out.result;
4786 /* Reset temporary structure */
4787 ZERO_STRUCT(state->tmp);
4789 if (DEBUGLEVEL >= 10) {
4790 NDR_PRINT_OUT_DEBUG(wkssvc_NetrAddAlternateComputerName, &state->orig);
4793 tevent_req_done(req);
4796 NTSTATUS rpccli_wkssvc_NetrAddAlternateComputerName_recv(struct tevent_req *req,
4797 TALLOC_CTX *mem_ctx,
4800 struct rpccli_wkssvc_NetrAddAlternateComputerName_state *state = tevent_req_data(
4801 req, struct rpccli_wkssvc_NetrAddAlternateComputerName_state);
4804 if (tevent_req_is_nterror(req, &status)) {
4805 tevent_req_received(req);
4809 /* Steal possbile out parameters to the callers context */
4810 talloc_steal(mem_ctx, state->out_mem_ctx);
4813 *result = state->orig.out.result;
4815 tevent_req_received(req);
4816 return NT_STATUS_OK;
4819 NTSTATUS rpccli_wkssvc_NetrAddAlternateComputerName(struct rpc_pipe_client *cli,
4820 TALLOC_CTX *mem_ctx,
4821 const char *server_name /* [in] [unique,charset(UTF16)] */,
4822 const char *NewAlternateMachineName /* [in] [unique,charset(UTF16)] */,
4823 const char *Account /* [in] [unique,charset(UTF16)] */,
4824 struct wkssvc_PasswordBuffer *EncryptedPassword /* [in] [unique] */,
4825 uint32_t Reserved /* [in] */,
4828 struct wkssvc_NetrAddAlternateComputerName r;
4832 r.in.server_name = server_name;
4833 r.in.NewAlternateMachineName = NewAlternateMachineName;
4834 r.in.Account = Account;
4835 r.in.EncryptedPassword = EncryptedPassword;
4836 r.in.Reserved = Reserved;
4838 if (DEBUGLEVEL >= 10) {
4839 NDR_PRINT_IN_DEBUG(wkssvc_NetrAddAlternateComputerName, &r);
4842 status = cli->dispatch(cli,
4845 NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME,
4848 if (!NT_STATUS_IS_OK(status)) {
4852 if (DEBUGLEVEL >= 10) {
4853 NDR_PRINT_OUT_DEBUG(wkssvc_NetrAddAlternateComputerName, &r);
4856 if (NT_STATUS_IS_ERR(status)) {
4860 /* Return variables */
4864 *werror = r.out.result;
4867 return werror_to_ntstatus(r.out.result);
4870 struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state {
4871 struct wkssvc_NetrRemoveAlternateComputerName orig;
4872 struct wkssvc_NetrRemoveAlternateComputerName tmp;
4873 TALLOC_CTX *out_mem_ctx;
4874 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4877 static void rpccli_wkssvc_NetrRemoveAlternateComputerName_done(struct tevent_req *subreq);
4879 struct tevent_req *rpccli_wkssvc_NetrRemoveAlternateComputerName_send(TALLOC_CTX *mem_ctx,
4880 struct tevent_context *ev,
4881 struct rpc_pipe_client *cli,
4882 const char *_server_name /* [in] [unique,charset(UTF16)] */,
4883 const char *_AlternateMachineNameToRemove /* [in] [unique,charset(UTF16)] */,
4884 const char *_Account /* [in] [unique,charset(UTF16)] */,
4885 struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */,
4886 uint32_t _Reserved /* [in] */)
4888 struct tevent_req *req;
4889 struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state *state;
4890 struct tevent_req *subreq;
4892 req = tevent_req_create(mem_ctx, &state,
4893 struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state);
4897 state->out_mem_ctx = NULL;
4898 state->dispatch_recv = cli->dispatch_recv;
4901 state->orig.in.server_name = _server_name;
4902 state->orig.in.AlternateMachineNameToRemove = _AlternateMachineNameToRemove;
4903 state->orig.in.Account = _Account;
4904 state->orig.in.EncryptedPassword = _EncryptedPassword;
4905 state->orig.in.Reserved = _Reserved;
4907 /* Out parameters */
4910 ZERO_STRUCT(state->orig.out.result);
4912 if (DEBUGLEVEL >= 10) {
4913 NDR_PRINT_IN_DEBUG(wkssvc_NetrRemoveAlternateComputerName, &state->orig);
4916 /* make a temporary copy, that we pass to the dispatch function */
4917 state->tmp = state->orig;
4919 subreq = cli->dispatch_send(state, ev, cli,
4921 NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME,
4923 if (tevent_req_nomem(subreq, req)) {
4924 return tevent_req_post(req, ev);
4926 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrRemoveAlternateComputerName_done, req);
4930 static void rpccli_wkssvc_NetrRemoveAlternateComputerName_done(struct tevent_req *subreq)
4932 struct tevent_req *req = tevent_req_callback_data(
4933 subreq, struct tevent_req);
4934 struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state *state = tevent_req_data(
4935 req, struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state);
4937 TALLOC_CTX *mem_ctx;
4939 if (state->out_mem_ctx) {
4940 mem_ctx = state->out_mem_ctx;
4945 status = state->dispatch_recv(subreq, mem_ctx);
4946 TALLOC_FREE(subreq);
4947 if (!NT_STATUS_IS_OK(status)) {
4948 tevent_req_nterror(req, status);
4952 /* Copy out parameters */
4955 state->orig.out.result = state->tmp.out.result;
4957 /* Reset temporary structure */
4958 ZERO_STRUCT(state->tmp);
4960 if (DEBUGLEVEL >= 10) {
4961 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRemoveAlternateComputerName, &state->orig);
4964 tevent_req_done(req);
4967 NTSTATUS rpccli_wkssvc_NetrRemoveAlternateComputerName_recv(struct tevent_req *req,
4968 TALLOC_CTX *mem_ctx,
4971 struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state *state = tevent_req_data(
4972 req, struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state);
4975 if (tevent_req_is_nterror(req, &status)) {
4976 tevent_req_received(req);
4980 /* Steal possbile out parameters to the callers context */
4981 talloc_steal(mem_ctx, state->out_mem_ctx);
4984 *result = state->orig.out.result;
4986 tevent_req_received(req);
4987 return NT_STATUS_OK;
4990 NTSTATUS rpccli_wkssvc_NetrRemoveAlternateComputerName(struct rpc_pipe_client *cli,
4991 TALLOC_CTX *mem_ctx,
4992 const char *server_name /* [in] [unique,charset(UTF16)] */,
4993 const char *AlternateMachineNameToRemove /* [in] [unique,charset(UTF16)] */,
4994 const char *Account /* [in] [unique,charset(UTF16)] */,
4995 struct wkssvc_PasswordBuffer *EncryptedPassword /* [in] [unique] */,
4996 uint32_t Reserved /* [in] */,
4999 struct wkssvc_NetrRemoveAlternateComputerName r;
5003 r.in.server_name = server_name;
5004 r.in.AlternateMachineNameToRemove = AlternateMachineNameToRemove;
5005 r.in.Account = Account;
5006 r.in.EncryptedPassword = EncryptedPassword;
5007 r.in.Reserved = Reserved;
5009 if (DEBUGLEVEL >= 10) {
5010 NDR_PRINT_IN_DEBUG(wkssvc_NetrRemoveAlternateComputerName, &r);
5013 status = cli->dispatch(cli,
5016 NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME,
5019 if (!NT_STATUS_IS_OK(status)) {
5023 if (DEBUGLEVEL >= 10) {
5024 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRemoveAlternateComputerName, &r);
5027 if (NT_STATUS_IS_ERR(status)) {
5031 /* Return variables */
5035 *werror = r.out.result;
5038 return werror_to_ntstatus(r.out.result);
5041 struct rpccli_wkssvc_NetrSetPrimaryComputername_state {
5042 struct wkssvc_NetrSetPrimaryComputername orig;
5043 struct wkssvc_NetrSetPrimaryComputername tmp;
5044 TALLOC_CTX *out_mem_ctx;
5045 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5048 static void rpccli_wkssvc_NetrSetPrimaryComputername_done(struct tevent_req *subreq);
5050 struct tevent_req *rpccli_wkssvc_NetrSetPrimaryComputername_send(TALLOC_CTX *mem_ctx,
5051 struct tevent_context *ev,
5052 struct rpc_pipe_client *cli,
5053 const char *_server_name /* [in] [unique,charset(UTF16)] */,
5054 const char *_primary_name /* [in] [unique,charset(UTF16)] */,
5055 const char *_Account /* [in] [unique,charset(UTF16)] */,
5056 struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */,
5057 uint32_t _Reserved /* [in] */)
5059 struct tevent_req *req;
5060 struct rpccli_wkssvc_NetrSetPrimaryComputername_state *state;
5061 struct tevent_req *subreq;
5063 req = tevent_req_create(mem_ctx, &state,
5064 struct rpccli_wkssvc_NetrSetPrimaryComputername_state);
5068 state->out_mem_ctx = NULL;
5069 state->dispatch_recv = cli->dispatch_recv;
5072 state->orig.in.server_name = _server_name;
5073 state->orig.in.primary_name = _primary_name;
5074 state->orig.in.Account = _Account;
5075 state->orig.in.EncryptedPassword = _EncryptedPassword;
5076 state->orig.in.Reserved = _Reserved;
5078 /* Out parameters */
5081 ZERO_STRUCT(state->orig.out.result);
5083 if (DEBUGLEVEL >= 10) {
5084 NDR_PRINT_IN_DEBUG(wkssvc_NetrSetPrimaryComputername, &state->orig);
5087 /* make a temporary copy, that we pass to the dispatch function */
5088 state->tmp = state->orig;
5090 subreq = cli->dispatch_send(state, ev, cli,
5092 NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME,
5094 if (tevent_req_nomem(subreq, req)) {
5095 return tevent_req_post(req, ev);
5097 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrSetPrimaryComputername_done, req);
5101 static void rpccli_wkssvc_NetrSetPrimaryComputername_done(struct tevent_req *subreq)
5103 struct tevent_req *req = tevent_req_callback_data(
5104 subreq, struct tevent_req);
5105 struct rpccli_wkssvc_NetrSetPrimaryComputername_state *state = tevent_req_data(
5106 req, struct rpccli_wkssvc_NetrSetPrimaryComputername_state);
5108 TALLOC_CTX *mem_ctx;
5110 if (state->out_mem_ctx) {
5111 mem_ctx = state->out_mem_ctx;
5116 status = state->dispatch_recv(subreq, mem_ctx);
5117 TALLOC_FREE(subreq);
5118 if (!NT_STATUS_IS_OK(status)) {
5119 tevent_req_nterror(req, status);
5123 /* Copy out parameters */
5126 state->orig.out.result = state->tmp.out.result;
5128 /* Reset temporary structure */
5129 ZERO_STRUCT(state->tmp);
5131 if (DEBUGLEVEL >= 10) {
5132 NDR_PRINT_OUT_DEBUG(wkssvc_NetrSetPrimaryComputername, &state->orig);
5135 tevent_req_done(req);
5138 NTSTATUS rpccli_wkssvc_NetrSetPrimaryComputername_recv(struct tevent_req *req,
5139 TALLOC_CTX *mem_ctx,
5142 struct rpccli_wkssvc_NetrSetPrimaryComputername_state *state = tevent_req_data(
5143 req, struct rpccli_wkssvc_NetrSetPrimaryComputername_state);
5146 if (tevent_req_is_nterror(req, &status)) {
5147 tevent_req_received(req);
5151 /* Steal possbile out parameters to the callers context */
5152 talloc_steal(mem_ctx, state->out_mem_ctx);
5155 *result = state->orig.out.result;
5157 tevent_req_received(req);
5158 return NT_STATUS_OK;
5161 NTSTATUS rpccli_wkssvc_NetrSetPrimaryComputername(struct rpc_pipe_client *cli,
5162 TALLOC_CTX *mem_ctx,
5163 const char *server_name /* [in] [unique,charset(UTF16)] */,
5164 const char *primary_name /* [in] [unique,charset(UTF16)] */,
5165 const char *Account /* [in] [unique,charset(UTF16)] */,
5166 struct wkssvc_PasswordBuffer *EncryptedPassword /* [in] [unique] */,
5167 uint32_t Reserved /* [in] */,
5170 struct wkssvc_NetrSetPrimaryComputername r;
5174 r.in.server_name = server_name;
5175 r.in.primary_name = primary_name;
5176 r.in.Account = Account;
5177 r.in.EncryptedPassword = EncryptedPassword;
5178 r.in.Reserved = Reserved;
5180 if (DEBUGLEVEL >= 10) {
5181 NDR_PRINT_IN_DEBUG(wkssvc_NetrSetPrimaryComputername, &r);
5184 status = cli->dispatch(cli,
5187 NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME,
5190 if (!NT_STATUS_IS_OK(status)) {
5194 if (DEBUGLEVEL >= 10) {
5195 NDR_PRINT_OUT_DEBUG(wkssvc_NetrSetPrimaryComputername, &r);
5198 if (NT_STATUS_IS_ERR(status)) {
5202 /* Return variables */
5206 *werror = r.out.result;
5209 return werror_to_ntstatus(r.out.result);
5212 struct rpccli_wkssvc_NetrEnumerateComputerNames_state {
5213 struct wkssvc_NetrEnumerateComputerNames orig;
5214 struct wkssvc_NetrEnumerateComputerNames tmp;
5215 TALLOC_CTX *out_mem_ctx;
5216 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5219 static void rpccli_wkssvc_NetrEnumerateComputerNames_done(struct tevent_req *subreq);
5221 struct tevent_req *rpccli_wkssvc_NetrEnumerateComputerNames_send(TALLOC_CTX *mem_ctx,
5222 struct tevent_context *ev,
5223 struct rpc_pipe_client *cli,
5224 const char *_server_name /* [in] [unique,charset(UTF16)] */,
5225 enum wkssvc_ComputerNameType _name_type /* [in] */,
5226 uint32_t _Reserved /* [in] */,
5227 struct wkssvc_ComputerNamesCtr **_ctr /* [out] [ref] */)
5229 struct tevent_req *req;
5230 struct rpccli_wkssvc_NetrEnumerateComputerNames_state *state;
5231 struct tevent_req *subreq;
5233 req = tevent_req_create(mem_ctx, &state,
5234 struct rpccli_wkssvc_NetrEnumerateComputerNames_state);
5238 state->out_mem_ctx = NULL;
5239 state->dispatch_recv = cli->dispatch_recv;
5242 state->orig.in.server_name = _server_name;
5243 state->orig.in.name_type = _name_type;
5244 state->orig.in.Reserved = _Reserved;
5246 /* Out parameters */
5247 state->orig.out.ctr = _ctr;
5250 ZERO_STRUCT(state->orig.out.result);
5252 if (DEBUGLEVEL >= 10) {
5253 NDR_PRINT_IN_DEBUG(wkssvc_NetrEnumerateComputerNames, &state->orig);
5256 state->out_mem_ctx = talloc_named_const(state, 0,
5257 "rpccli_wkssvc_NetrEnumerateComputerNames_out_memory");
5258 if (tevent_req_nomem(state->out_mem_ctx, req)) {
5259 return tevent_req_post(req, ev);
5262 /* make a temporary copy, that we pass to the dispatch function */
5263 state->tmp = state->orig;
5265 subreq = cli->dispatch_send(state, ev, cli,
5267 NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES,
5269 if (tevent_req_nomem(subreq, req)) {
5270 return tevent_req_post(req, ev);
5272 tevent_req_set_callback(subreq, rpccli_wkssvc_NetrEnumerateComputerNames_done, req);
5276 static void rpccli_wkssvc_NetrEnumerateComputerNames_done(struct tevent_req *subreq)
5278 struct tevent_req *req = tevent_req_callback_data(
5279 subreq, struct tevent_req);
5280 struct rpccli_wkssvc_NetrEnumerateComputerNames_state *state = tevent_req_data(
5281 req, struct rpccli_wkssvc_NetrEnumerateComputerNames_state);
5283 TALLOC_CTX *mem_ctx;
5285 if (state->out_mem_ctx) {
5286 mem_ctx = state->out_mem_ctx;
5291 status = state->dispatch_recv(subreq, mem_ctx);
5292 TALLOC_FREE(subreq);
5293 if (!NT_STATUS_IS_OK(status)) {
5294 tevent_req_nterror(req, status);
5298 /* Copy out parameters */
5299 *state->orig.out.ctr = *state->tmp.out.ctr;
5302 state->orig.out.result = state->tmp.out.result;
5304 /* Reset temporary structure */
5305 ZERO_STRUCT(state->tmp);
5307 if (DEBUGLEVEL >= 10) {
5308 NDR_PRINT_OUT_DEBUG(wkssvc_NetrEnumerateComputerNames, &state->orig);
5311 tevent_req_done(req);
5314 NTSTATUS rpccli_wkssvc_NetrEnumerateComputerNames_recv(struct tevent_req *req,
5315 TALLOC_CTX *mem_ctx,
5318 struct rpccli_wkssvc_NetrEnumerateComputerNames_state *state = tevent_req_data(
5319 req, struct rpccli_wkssvc_NetrEnumerateComputerNames_state);
5322 if (tevent_req_is_nterror(req, &status)) {
5323 tevent_req_received(req);
5327 /* Steal possbile out parameters to the callers context */
5328 talloc_steal(mem_ctx, state->out_mem_ctx);
5331 *result = state->orig.out.result;
5333 tevent_req_received(req);
5334 return NT_STATUS_OK;
5337 NTSTATUS rpccli_wkssvc_NetrEnumerateComputerNames(struct rpc_pipe_client *cli,
5338 TALLOC_CTX *mem_ctx,
5339 const char *server_name /* [in] [unique,charset(UTF16)] */,
5340 enum wkssvc_ComputerNameType name_type /* [in] */,
5341 uint32_t Reserved /* [in] */,
5342 struct wkssvc_ComputerNamesCtr **ctr /* [out] [ref] */,
5345 struct wkssvc_NetrEnumerateComputerNames r;
5349 r.in.server_name = server_name;
5350 r.in.name_type = name_type;
5351 r.in.Reserved = Reserved;
5353 if (DEBUGLEVEL >= 10) {
5354 NDR_PRINT_IN_DEBUG(wkssvc_NetrEnumerateComputerNames, &r);
5357 status = cli->dispatch(cli,
5360 NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES,
5363 if (!NT_STATUS_IS_OK(status)) {
5367 if (DEBUGLEVEL >= 10) {
5368 NDR_PRINT_OUT_DEBUG(wkssvc_NetrEnumerateComputerNames, &r);
5371 if (NT_STATUS_IS_ERR(status)) {
5375 /* Return variables */
5380 *werror = r.out.result;
5383 return werror_to_ntstatus(r.out.result);