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 state
->out_mem_ctx
= talloc_named_const(state
, 0,
48 "rpccli_wkssvc_NetWkstaGetInfo_out_memory");
49 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
50 return tevent_req_post(req
, ev
);
53 /* make a temporary copy, that we pass to the dispatch function */
54 state
->tmp
= state
->orig
;
56 subreq
= cli
->dispatch_send(state
, ev
, cli
,
58 NDR_WKSSVC_NETWKSTAGETINFO
,
60 if (tevent_req_nomem(subreq
, req
)) {
61 return tevent_req_post(req
, ev
);
63 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetWkstaGetInfo_done
, req
);
67 static void rpccli_wkssvc_NetWkstaGetInfo_done(struct tevent_req
*subreq
)
69 struct tevent_req
*req
= tevent_req_callback_data(
70 subreq
, struct tevent_req
);
71 struct rpccli_wkssvc_NetWkstaGetInfo_state
*state
= tevent_req_data(
72 req
, struct rpccli_wkssvc_NetWkstaGetInfo_state
);
76 if (state
->out_mem_ctx
) {
77 mem_ctx
= state
->out_mem_ctx
;
82 status
= state
->dispatch_recv(subreq
, mem_ctx
);
84 if (!NT_STATUS_IS_OK(status
)) {
85 tevent_req_nterror(req
, status
);
89 /* Copy out parameters */
90 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
93 state
->orig
.out
.result
= state
->tmp
.out
.result
;
95 /* Reset temporary structure */
96 ZERO_STRUCT(state
->tmp
);
101 NTSTATUS
rpccli_wkssvc_NetWkstaGetInfo_recv(struct tevent_req
*req
,
105 struct rpccli_wkssvc_NetWkstaGetInfo_state
*state
= tevent_req_data(
106 req
, struct rpccli_wkssvc_NetWkstaGetInfo_state
);
109 if (tevent_req_is_nterror(req
, &status
)) {
110 tevent_req_received(req
);
114 /* Steal possbile out parameters to the callers context */
115 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
118 *result
= state
->orig
.out
.result
;
120 tevent_req_received(req
);
124 NTSTATUS
rpccli_wkssvc_NetWkstaGetInfo(struct rpc_pipe_client
*cli
,
126 const char *server_name
/* [in] [unique,charset(UTF16)] */,
127 uint32_t level
/* [in] */,
128 union wkssvc_NetWkstaInfo
*info
/* [out] [ref,switch_is(level)] */,
131 struct wkssvc_NetWkstaGetInfo r
;
135 r
.in
.server_name
= server_name
;
138 status
= cli
->dispatch(cli
,
141 NDR_WKSSVC_NETWKSTAGETINFO
,
144 if (!NT_STATUS_IS_OK(status
)) {
148 if (NT_STATUS_IS_ERR(status
)) {
152 /* Return variables */
157 *werror
= r
.out
.result
;
160 return werror_to_ntstatus(r
.out
.result
);
163 struct rpccli_wkssvc_NetWkstaSetInfo_state
{
164 struct wkssvc_NetWkstaSetInfo orig
;
165 struct wkssvc_NetWkstaSetInfo tmp
;
166 TALLOC_CTX
*out_mem_ctx
;
167 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
170 static void rpccli_wkssvc_NetWkstaSetInfo_done(struct tevent_req
*subreq
);
172 struct tevent_req
*rpccli_wkssvc_NetWkstaSetInfo_send(TALLOC_CTX
*mem_ctx
,
173 struct tevent_context
*ev
,
174 struct rpc_pipe_client
*cli
,
175 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
176 uint32_t _level
/* [in] */,
177 union wkssvc_NetWkstaInfo
*_info
/* [in] [ref,switch_is(level)] */,
178 uint32_t *_parm_error
/* [in,out] [ref] */)
180 struct tevent_req
*req
;
181 struct rpccli_wkssvc_NetWkstaSetInfo_state
*state
;
182 struct tevent_req
*subreq
;
184 req
= tevent_req_create(mem_ctx
, &state
,
185 struct rpccli_wkssvc_NetWkstaSetInfo_state
);
189 state
->out_mem_ctx
= NULL
;
190 state
->dispatch_recv
= cli
->dispatch_recv
;
193 state
->orig
.in
.server_name
= _server_name
;
194 state
->orig
.in
.level
= _level
;
195 state
->orig
.in
.info
= _info
;
196 state
->orig
.in
.parm_error
= _parm_error
;
199 state
->orig
.out
.parm_error
= _parm_error
;
202 ZERO_STRUCT(state
->orig
.out
.result
);
204 state
->out_mem_ctx
= talloc_named_const(state
, 0,
205 "rpccli_wkssvc_NetWkstaSetInfo_out_memory");
206 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
207 return tevent_req_post(req
, ev
);
210 /* make a temporary copy, that we pass to the dispatch function */
211 state
->tmp
= state
->orig
;
213 subreq
= cli
->dispatch_send(state
, ev
, cli
,
215 NDR_WKSSVC_NETWKSTASETINFO
,
217 if (tevent_req_nomem(subreq
, req
)) {
218 return tevent_req_post(req
, ev
);
220 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetWkstaSetInfo_done
, req
);
224 static void rpccli_wkssvc_NetWkstaSetInfo_done(struct tevent_req
*subreq
)
226 struct tevent_req
*req
= tevent_req_callback_data(
227 subreq
, struct tevent_req
);
228 struct rpccli_wkssvc_NetWkstaSetInfo_state
*state
= tevent_req_data(
229 req
, struct rpccli_wkssvc_NetWkstaSetInfo_state
);
233 if (state
->out_mem_ctx
) {
234 mem_ctx
= state
->out_mem_ctx
;
239 status
= state
->dispatch_recv(subreq
, mem_ctx
);
241 if (!NT_STATUS_IS_OK(status
)) {
242 tevent_req_nterror(req
, status
);
246 /* Copy out parameters */
247 *state
->orig
.out
.parm_error
= *state
->tmp
.out
.parm_error
;
250 state
->orig
.out
.result
= state
->tmp
.out
.result
;
252 /* Reset temporary structure */
253 ZERO_STRUCT(state
->tmp
);
255 tevent_req_done(req
);
258 NTSTATUS
rpccli_wkssvc_NetWkstaSetInfo_recv(struct tevent_req
*req
,
262 struct rpccli_wkssvc_NetWkstaSetInfo_state
*state
= tevent_req_data(
263 req
, struct rpccli_wkssvc_NetWkstaSetInfo_state
);
266 if (tevent_req_is_nterror(req
, &status
)) {
267 tevent_req_received(req
);
271 /* Steal possbile out parameters to the callers context */
272 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
275 *result
= state
->orig
.out
.result
;
277 tevent_req_received(req
);
281 NTSTATUS
rpccli_wkssvc_NetWkstaSetInfo(struct rpc_pipe_client
*cli
,
283 const char *server_name
/* [in] [unique,charset(UTF16)] */,
284 uint32_t level
/* [in] */,
285 union wkssvc_NetWkstaInfo
*info
/* [in] [ref,switch_is(level)] */,
286 uint32_t *parm_error
/* [in,out] [ref] */,
289 struct wkssvc_NetWkstaSetInfo r
;
293 r
.in
.server_name
= server_name
;
296 r
.in
.parm_error
= parm_error
;
298 status
= cli
->dispatch(cli
,
301 NDR_WKSSVC_NETWKSTASETINFO
,
304 if (!NT_STATUS_IS_OK(status
)) {
308 if (NT_STATUS_IS_ERR(status
)) {
312 /* Return variables */
313 *parm_error
= *r
.out
.parm_error
;
317 *werror
= r
.out
.result
;
320 return werror_to_ntstatus(r
.out
.result
);
323 struct rpccli_wkssvc_NetWkstaEnumUsers_state
{
324 struct wkssvc_NetWkstaEnumUsers orig
;
325 struct wkssvc_NetWkstaEnumUsers tmp
;
326 TALLOC_CTX
*out_mem_ctx
;
327 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
330 static void rpccli_wkssvc_NetWkstaEnumUsers_done(struct tevent_req
*subreq
);
332 struct tevent_req
*rpccli_wkssvc_NetWkstaEnumUsers_send(TALLOC_CTX
*mem_ctx
,
333 struct tevent_context
*ev
,
334 struct rpc_pipe_client
*cli
,
335 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
336 struct wkssvc_NetWkstaEnumUsersInfo
*_info
/* [in,out] [ref] */,
337 uint32_t _prefmaxlen
/* [in] */,
338 uint32_t *_entries_read
/* [out] [ref] */,
339 uint32_t *_resume_handle
/* [in,out] [unique] */)
341 struct tevent_req
*req
;
342 struct rpccli_wkssvc_NetWkstaEnumUsers_state
*state
;
343 struct tevent_req
*subreq
;
345 req
= tevent_req_create(mem_ctx
, &state
,
346 struct rpccli_wkssvc_NetWkstaEnumUsers_state
);
350 state
->out_mem_ctx
= NULL
;
351 state
->dispatch_recv
= cli
->dispatch_recv
;
354 state
->orig
.in
.server_name
= _server_name
;
355 state
->orig
.in
.info
= _info
;
356 state
->orig
.in
.prefmaxlen
= _prefmaxlen
;
357 state
->orig
.in
.resume_handle
= _resume_handle
;
360 state
->orig
.out
.info
= _info
;
361 state
->orig
.out
.entries_read
= _entries_read
;
362 state
->orig
.out
.resume_handle
= _resume_handle
;
365 ZERO_STRUCT(state
->orig
.out
.result
);
367 state
->out_mem_ctx
= talloc_named_const(state
, 0,
368 "rpccli_wkssvc_NetWkstaEnumUsers_out_memory");
369 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
370 return tevent_req_post(req
, ev
);
373 /* make a temporary copy, that we pass to the dispatch function */
374 state
->tmp
= state
->orig
;
376 subreq
= cli
->dispatch_send(state
, ev
, cli
,
378 NDR_WKSSVC_NETWKSTAENUMUSERS
,
380 if (tevent_req_nomem(subreq
, req
)) {
381 return tevent_req_post(req
, ev
);
383 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetWkstaEnumUsers_done
, req
);
387 static void rpccli_wkssvc_NetWkstaEnumUsers_done(struct tevent_req
*subreq
)
389 struct tevent_req
*req
= tevent_req_callback_data(
390 subreq
, struct tevent_req
);
391 struct rpccli_wkssvc_NetWkstaEnumUsers_state
*state
= tevent_req_data(
392 req
, struct rpccli_wkssvc_NetWkstaEnumUsers_state
);
396 if (state
->out_mem_ctx
) {
397 mem_ctx
= state
->out_mem_ctx
;
402 status
= state
->dispatch_recv(subreq
, mem_ctx
);
404 if (!NT_STATUS_IS_OK(status
)) {
405 tevent_req_nterror(req
, status
);
409 /* Copy out parameters */
410 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
411 *state
->orig
.out
.entries_read
= *state
->tmp
.out
.entries_read
;
412 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
413 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
417 state
->orig
.out
.result
= state
->tmp
.out
.result
;
419 /* Reset temporary structure */
420 ZERO_STRUCT(state
->tmp
);
422 tevent_req_done(req
);
425 NTSTATUS
rpccli_wkssvc_NetWkstaEnumUsers_recv(struct tevent_req
*req
,
429 struct rpccli_wkssvc_NetWkstaEnumUsers_state
*state
= tevent_req_data(
430 req
, struct rpccli_wkssvc_NetWkstaEnumUsers_state
);
433 if (tevent_req_is_nterror(req
, &status
)) {
434 tevent_req_received(req
);
438 /* Steal possbile out parameters to the callers context */
439 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
442 *result
= state
->orig
.out
.result
;
444 tevent_req_received(req
);
448 NTSTATUS
rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client
*cli
,
450 const char *server_name
/* [in] [unique,charset(UTF16)] */,
451 struct wkssvc_NetWkstaEnumUsersInfo
*info
/* [in,out] [ref] */,
452 uint32_t prefmaxlen
/* [in] */,
453 uint32_t *entries_read
/* [out] [ref] */,
454 uint32_t *resume_handle
/* [in,out] [unique] */,
457 struct wkssvc_NetWkstaEnumUsers r
;
461 r
.in
.server_name
= server_name
;
463 r
.in
.prefmaxlen
= prefmaxlen
;
464 r
.in
.resume_handle
= resume_handle
;
466 status
= cli
->dispatch(cli
,
469 NDR_WKSSVC_NETWKSTAENUMUSERS
,
472 if (!NT_STATUS_IS_OK(status
)) {
476 if (NT_STATUS_IS_ERR(status
)) {
480 /* Return variables */
482 *entries_read
= *r
.out
.entries_read
;
483 if (resume_handle
&& r
.out
.resume_handle
) {
484 *resume_handle
= *r
.out
.resume_handle
;
489 *werror
= r
.out
.result
;
492 return werror_to_ntstatus(r
.out
.result
);
495 struct rpccli_wkssvc_NetrWkstaUserGetInfo_state
{
496 struct wkssvc_NetrWkstaUserGetInfo orig
;
497 struct wkssvc_NetrWkstaUserGetInfo tmp
;
498 TALLOC_CTX
*out_mem_ctx
;
499 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
502 static void rpccli_wkssvc_NetrWkstaUserGetInfo_done(struct tevent_req
*subreq
);
504 struct tevent_req
*rpccli_wkssvc_NetrWkstaUserGetInfo_send(TALLOC_CTX
*mem_ctx
,
505 struct tevent_context
*ev
,
506 struct rpc_pipe_client
*cli
,
507 const char *_unknown
/* [in] [unique,charset(UTF16)] */,
508 uint32_t _level
/* [in] */,
509 union wkssvc_NetrWkstaUserInfo
*_info
/* [out] [ref,switch_is(level)] */)
511 struct tevent_req
*req
;
512 struct rpccli_wkssvc_NetrWkstaUserGetInfo_state
*state
;
513 struct tevent_req
*subreq
;
515 req
= tevent_req_create(mem_ctx
, &state
,
516 struct rpccli_wkssvc_NetrWkstaUserGetInfo_state
);
520 state
->out_mem_ctx
= NULL
;
521 state
->dispatch_recv
= cli
->dispatch_recv
;
524 state
->orig
.in
.unknown
= _unknown
;
525 state
->orig
.in
.level
= _level
;
528 state
->orig
.out
.info
= _info
;
531 ZERO_STRUCT(state
->orig
.out
.result
);
533 state
->out_mem_ctx
= talloc_named_const(state
, 0,
534 "rpccli_wkssvc_NetrWkstaUserGetInfo_out_memory");
535 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
536 return tevent_req_post(req
, ev
);
539 /* make a temporary copy, that we pass to the dispatch function */
540 state
->tmp
= state
->orig
;
542 subreq
= cli
->dispatch_send(state
, ev
, cli
,
544 NDR_WKSSVC_NETRWKSTAUSERGETINFO
,
546 if (tevent_req_nomem(subreq
, req
)) {
547 return tevent_req_post(req
, ev
);
549 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrWkstaUserGetInfo_done
, req
);
553 static void rpccli_wkssvc_NetrWkstaUserGetInfo_done(struct tevent_req
*subreq
)
555 struct tevent_req
*req
= tevent_req_callback_data(
556 subreq
, struct tevent_req
);
557 struct rpccli_wkssvc_NetrWkstaUserGetInfo_state
*state
= tevent_req_data(
558 req
, struct rpccli_wkssvc_NetrWkstaUserGetInfo_state
);
562 if (state
->out_mem_ctx
) {
563 mem_ctx
= state
->out_mem_ctx
;
568 status
= state
->dispatch_recv(subreq
, mem_ctx
);
570 if (!NT_STATUS_IS_OK(status
)) {
571 tevent_req_nterror(req
, status
);
575 /* Copy out parameters */
576 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
579 state
->orig
.out
.result
= state
->tmp
.out
.result
;
581 /* Reset temporary structure */
582 ZERO_STRUCT(state
->tmp
);
584 tevent_req_done(req
);
587 NTSTATUS
rpccli_wkssvc_NetrWkstaUserGetInfo_recv(struct tevent_req
*req
,
591 struct rpccli_wkssvc_NetrWkstaUserGetInfo_state
*state
= tevent_req_data(
592 req
, struct rpccli_wkssvc_NetrWkstaUserGetInfo_state
);
595 if (tevent_req_is_nterror(req
, &status
)) {
596 tevent_req_received(req
);
600 /* Steal possbile out parameters to the callers context */
601 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
604 *result
= state
->orig
.out
.result
;
606 tevent_req_received(req
);
610 NTSTATUS
rpccli_wkssvc_NetrWkstaUserGetInfo(struct rpc_pipe_client
*cli
,
612 const char *unknown
/* [in] [unique,charset(UTF16)] */,
613 uint32_t level
/* [in] */,
614 union wkssvc_NetrWkstaUserInfo
*info
/* [out] [ref,switch_is(level)] */,
617 struct wkssvc_NetrWkstaUserGetInfo r
;
621 r
.in
.unknown
= unknown
;
624 status
= cli
->dispatch(cli
,
627 NDR_WKSSVC_NETRWKSTAUSERGETINFO
,
630 if (!NT_STATUS_IS_OK(status
)) {
634 if (NT_STATUS_IS_ERR(status
)) {
638 /* Return variables */
643 *werror
= r
.out
.result
;
646 return werror_to_ntstatus(r
.out
.result
);
649 struct rpccli_wkssvc_NetrWkstaUserSetInfo_state
{
650 struct wkssvc_NetrWkstaUserSetInfo orig
;
651 struct wkssvc_NetrWkstaUserSetInfo tmp
;
652 TALLOC_CTX
*out_mem_ctx
;
653 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
656 static void rpccli_wkssvc_NetrWkstaUserSetInfo_done(struct tevent_req
*subreq
);
658 struct tevent_req
*rpccli_wkssvc_NetrWkstaUserSetInfo_send(TALLOC_CTX
*mem_ctx
,
659 struct tevent_context
*ev
,
660 struct rpc_pipe_client
*cli
,
661 const char *_unknown
/* [in] [unique,charset(UTF16)] */,
662 uint32_t _level
/* [in] */,
663 union wkssvc_NetrWkstaUserInfo
*_info
/* [in] [ref,switch_is(level)] */,
664 uint32_t *_parm_err
/* [in,out] [unique] */)
666 struct tevent_req
*req
;
667 struct rpccli_wkssvc_NetrWkstaUserSetInfo_state
*state
;
668 struct tevent_req
*subreq
;
670 req
= tevent_req_create(mem_ctx
, &state
,
671 struct rpccli_wkssvc_NetrWkstaUserSetInfo_state
);
675 state
->out_mem_ctx
= NULL
;
676 state
->dispatch_recv
= cli
->dispatch_recv
;
679 state
->orig
.in
.unknown
= _unknown
;
680 state
->orig
.in
.level
= _level
;
681 state
->orig
.in
.info
= _info
;
682 state
->orig
.in
.parm_err
= _parm_err
;
685 state
->orig
.out
.parm_err
= _parm_err
;
688 ZERO_STRUCT(state
->orig
.out
.result
);
690 state
->out_mem_ctx
= talloc_named_const(state
, 0,
691 "rpccli_wkssvc_NetrWkstaUserSetInfo_out_memory");
692 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
693 return tevent_req_post(req
, ev
);
696 /* make a temporary copy, that we pass to the dispatch function */
697 state
->tmp
= state
->orig
;
699 subreq
= cli
->dispatch_send(state
, ev
, cli
,
701 NDR_WKSSVC_NETRWKSTAUSERSETINFO
,
703 if (tevent_req_nomem(subreq
, req
)) {
704 return tevent_req_post(req
, ev
);
706 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrWkstaUserSetInfo_done
, req
);
710 static void rpccli_wkssvc_NetrWkstaUserSetInfo_done(struct tevent_req
*subreq
)
712 struct tevent_req
*req
= tevent_req_callback_data(
713 subreq
, struct tevent_req
);
714 struct rpccli_wkssvc_NetrWkstaUserSetInfo_state
*state
= tevent_req_data(
715 req
, struct rpccli_wkssvc_NetrWkstaUserSetInfo_state
);
719 if (state
->out_mem_ctx
) {
720 mem_ctx
= state
->out_mem_ctx
;
725 status
= state
->dispatch_recv(subreq
, mem_ctx
);
727 if (!NT_STATUS_IS_OK(status
)) {
728 tevent_req_nterror(req
, status
);
732 /* Copy out parameters */
733 if (state
->orig
.out
.parm_err
&& state
->tmp
.out
.parm_err
) {
734 *state
->orig
.out
.parm_err
= *state
->tmp
.out
.parm_err
;
738 state
->orig
.out
.result
= state
->tmp
.out
.result
;
740 /* Reset temporary structure */
741 ZERO_STRUCT(state
->tmp
);
743 tevent_req_done(req
);
746 NTSTATUS
rpccli_wkssvc_NetrWkstaUserSetInfo_recv(struct tevent_req
*req
,
750 struct rpccli_wkssvc_NetrWkstaUserSetInfo_state
*state
= tevent_req_data(
751 req
, struct rpccli_wkssvc_NetrWkstaUserSetInfo_state
);
754 if (tevent_req_is_nterror(req
, &status
)) {
755 tevent_req_received(req
);
759 /* Steal possbile out parameters to the callers context */
760 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
763 *result
= state
->orig
.out
.result
;
765 tevent_req_received(req
);
769 NTSTATUS
rpccli_wkssvc_NetrWkstaUserSetInfo(struct rpc_pipe_client
*cli
,
771 const char *unknown
/* [in] [unique,charset(UTF16)] */,
772 uint32_t level
/* [in] */,
773 union wkssvc_NetrWkstaUserInfo
*info
/* [in] [ref,switch_is(level)] */,
774 uint32_t *parm_err
/* [in,out] [unique] */,
777 struct wkssvc_NetrWkstaUserSetInfo r
;
781 r
.in
.unknown
= unknown
;
784 r
.in
.parm_err
= parm_err
;
786 status
= cli
->dispatch(cli
,
789 NDR_WKSSVC_NETRWKSTAUSERSETINFO
,
792 if (!NT_STATUS_IS_OK(status
)) {
796 if (NT_STATUS_IS_ERR(status
)) {
800 /* Return variables */
801 if (parm_err
&& r
.out
.parm_err
) {
802 *parm_err
= *r
.out
.parm_err
;
807 *werror
= r
.out
.result
;
810 return werror_to_ntstatus(r
.out
.result
);
813 struct rpccli_wkssvc_NetWkstaTransportEnum_state
{
814 struct wkssvc_NetWkstaTransportEnum orig
;
815 struct wkssvc_NetWkstaTransportEnum tmp
;
816 TALLOC_CTX
*out_mem_ctx
;
817 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
820 static void rpccli_wkssvc_NetWkstaTransportEnum_done(struct tevent_req
*subreq
);
822 struct tevent_req
*rpccli_wkssvc_NetWkstaTransportEnum_send(TALLOC_CTX
*mem_ctx
,
823 struct tevent_context
*ev
,
824 struct rpc_pipe_client
*cli
,
825 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
826 struct wkssvc_NetWkstaTransportInfo
*_info
/* [in,out] [ref] */,
827 uint32_t _max_buffer
/* [in] */,
828 uint32_t *_total_entries
/* [out] [ref] */,
829 uint32_t *_resume_handle
/* [in,out] [unique] */)
831 struct tevent_req
*req
;
832 struct rpccli_wkssvc_NetWkstaTransportEnum_state
*state
;
833 struct tevent_req
*subreq
;
835 req
= tevent_req_create(mem_ctx
, &state
,
836 struct rpccli_wkssvc_NetWkstaTransportEnum_state
);
840 state
->out_mem_ctx
= NULL
;
841 state
->dispatch_recv
= cli
->dispatch_recv
;
844 state
->orig
.in
.server_name
= _server_name
;
845 state
->orig
.in
.info
= _info
;
846 state
->orig
.in
.max_buffer
= _max_buffer
;
847 state
->orig
.in
.resume_handle
= _resume_handle
;
850 state
->orig
.out
.info
= _info
;
851 state
->orig
.out
.total_entries
= _total_entries
;
852 state
->orig
.out
.resume_handle
= _resume_handle
;
855 ZERO_STRUCT(state
->orig
.out
.result
);
857 state
->out_mem_ctx
= talloc_named_const(state
, 0,
858 "rpccli_wkssvc_NetWkstaTransportEnum_out_memory");
859 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
860 return tevent_req_post(req
, ev
);
863 /* make a temporary copy, that we pass to the dispatch function */
864 state
->tmp
= state
->orig
;
866 subreq
= cli
->dispatch_send(state
, ev
, cli
,
868 NDR_WKSSVC_NETWKSTATRANSPORTENUM
,
870 if (tevent_req_nomem(subreq
, req
)) {
871 return tevent_req_post(req
, ev
);
873 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetWkstaTransportEnum_done
, req
);
877 static void rpccli_wkssvc_NetWkstaTransportEnum_done(struct tevent_req
*subreq
)
879 struct tevent_req
*req
= tevent_req_callback_data(
880 subreq
, struct tevent_req
);
881 struct rpccli_wkssvc_NetWkstaTransportEnum_state
*state
= tevent_req_data(
882 req
, struct rpccli_wkssvc_NetWkstaTransportEnum_state
);
886 if (state
->out_mem_ctx
) {
887 mem_ctx
= state
->out_mem_ctx
;
892 status
= state
->dispatch_recv(subreq
, mem_ctx
);
894 if (!NT_STATUS_IS_OK(status
)) {
895 tevent_req_nterror(req
, status
);
899 /* Copy out parameters */
900 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
901 *state
->orig
.out
.total_entries
= *state
->tmp
.out
.total_entries
;
902 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
903 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
907 state
->orig
.out
.result
= state
->tmp
.out
.result
;
909 /* Reset temporary structure */
910 ZERO_STRUCT(state
->tmp
);
912 tevent_req_done(req
);
915 NTSTATUS
rpccli_wkssvc_NetWkstaTransportEnum_recv(struct tevent_req
*req
,
919 struct rpccli_wkssvc_NetWkstaTransportEnum_state
*state
= tevent_req_data(
920 req
, struct rpccli_wkssvc_NetWkstaTransportEnum_state
);
923 if (tevent_req_is_nterror(req
, &status
)) {
924 tevent_req_received(req
);
928 /* Steal possbile out parameters to the callers context */
929 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
932 *result
= state
->orig
.out
.result
;
934 tevent_req_received(req
);
938 NTSTATUS
rpccli_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client
*cli
,
940 const char *server_name
/* [in] [unique,charset(UTF16)] */,
941 struct wkssvc_NetWkstaTransportInfo
*info
/* [in,out] [ref] */,
942 uint32_t max_buffer
/* [in] */,
943 uint32_t *total_entries
/* [out] [ref] */,
944 uint32_t *resume_handle
/* [in,out] [unique] */,
947 struct wkssvc_NetWkstaTransportEnum r
;
951 r
.in
.server_name
= server_name
;
953 r
.in
.max_buffer
= max_buffer
;
954 r
.in
.resume_handle
= resume_handle
;
956 status
= cli
->dispatch(cli
,
959 NDR_WKSSVC_NETWKSTATRANSPORTENUM
,
962 if (!NT_STATUS_IS_OK(status
)) {
966 if (NT_STATUS_IS_ERR(status
)) {
970 /* Return variables */
972 *total_entries
= *r
.out
.total_entries
;
973 if (resume_handle
&& r
.out
.resume_handle
) {
974 *resume_handle
= *r
.out
.resume_handle
;
979 *werror
= r
.out
.result
;
982 return werror_to_ntstatus(r
.out
.result
);
985 struct rpccli_wkssvc_NetrWkstaTransportAdd_state
{
986 struct wkssvc_NetrWkstaTransportAdd orig
;
987 struct wkssvc_NetrWkstaTransportAdd tmp
;
988 TALLOC_CTX
*out_mem_ctx
;
989 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
992 static void rpccli_wkssvc_NetrWkstaTransportAdd_done(struct tevent_req
*subreq
);
994 struct tevent_req
*rpccli_wkssvc_NetrWkstaTransportAdd_send(TALLOC_CTX
*mem_ctx
,
995 struct tevent_context
*ev
,
996 struct rpc_pipe_client
*cli
,
997 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
998 uint32_t _level
/* [in] */,
999 struct wkssvc_NetWkstaTransportInfo0
*_info0
/* [in] [ref] */,
1000 uint32_t *_parm_err
/* [in,out] [unique] */)
1002 struct tevent_req
*req
;
1003 struct rpccli_wkssvc_NetrWkstaTransportAdd_state
*state
;
1004 struct tevent_req
*subreq
;
1006 req
= tevent_req_create(mem_ctx
, &state
,
1007 struct rpccli_wkssvc_NetrWkstaTransportAdd_state
);
1011 state
->out_mem_ctx
= NULL
;
1012 state
->dispatch_recv
= cli
->dispatch_recv
;
1015 state
->orig
.in
.server_name
= _server_name
;
1016 state
->orig
.in
.level
= _level
;
1017 state
->orig
.in
.info0
= _info0
;
1018 state
->orig
.in
.parm_err
= _parm_err
;
1020 /* Out parameters */
1021 state
->orig
.out
.parm_err
= _parm_err
;
1024 ZERO_STRUCT(state
->orig
.out
.result
);
1026 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1027 "rpccli_wkssvc_NetrWkstaTransportAdd_out_memory");
1028 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1029 return tevent_req_post(req
, ev
);
1032 /* make a temporary copy, that we pass to the dispatch function */
1033 state
->tmp
= state
->orig
;
1035 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1037 NDR_WKSSVC_NETRWKSTATRANSPORTADD
,
1039 if (tevent_req_nomem(subreq
, req
)) {
1040 return tevent_req_post(req
, ev
);
1042 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrWkstaTransportAdd_done
, req
);
1046 static void rpccli_wkssvc_NetrWkstaTransportAdd_done(struct tevent_req
*subreq
)
1048 struct tevent_req
*req
= tevent_req_callback_data(
1049 subreq
, struct tevent_req
);
1050 struct rpccli_wkssvc_NetrWkstaTransportAdd_state
*state
= tevent_req_data(
1051 req
, struct rpccli_wkssvc_NetrWkstaTransportAdd_state
);
1053 TALLOC_CTX
*mem_ctx
;
1055 if (state
->out_mem_ctx
) {
1056 mem_ctx
= state
->out_mem_ctx
;
1061 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1062 TALLOC_FREE(subreq
);
1063 if (!NT_STATUS_IS_OK(status
)) {
1064 tevent_req_nterror(req
, status
);
1068 /* Copy out parameters */
1069 if (state
->orig
.out
.parm_err
&& state
->tmp
.out
.parm_err
) {
1070 *state
->orig
.out
.parm_err
= *state
->tmp
.out
.parm_err
;
1074 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1076 /* Reset temporary structure */
1077 ZERO_STRUCT(state
->tmp
);
1079 tevent_req_done(req
);
1082 NTSTATUS
rpccli_wkssvc_NetrWkstaTransportAdd_recv(struct tevent_req
*req
,
1083 TALLOC_CTX
*mem_ctx
,
1086 struct rpccli_wkssvc_NetrWkstaTransportAdd_state
*state
= tevent_req_data(
1087 req
, struct rpccli_wkssvc_NetrWkstaTransportAdd_state
);
1090 if (tevent_req_is_nterror(req
, &status
)) {
1091 tevent_req_received(req
);
1095 /* Steal possbile out parameters to the callers context */
1096 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1099 *result
= state
->orig
.out
.result
;
1101 tevent_req_received(req
);
1102 return NT_STATUS_OK
;
1105 NTSTATUS
rpccli_wkssvc_NetrWkstaTransportAdd(struct rpc_pipe_client
*cli
,
1106 TALLOC_CTX
*mem_ctx
,
1107 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1108 uint32_t level
/* [in] */,
1109 struct wkssvc_NetWkstaTransportInfo0
*info0
/* [in] [ref] */,
1110 uint32_t *parm_err
/* [in,out] [unique] */,
1113 struct wkssvc_NetrWkstaTransportAdd r
;
1117 r
.in
.server_name
= server_name
;
1120 r
.in
.parm_err
= parm_err
;
1122 status
= cli
->dispatch(cli
,
1125 NDR_WKSSVC_NETRWKSTATRANSPORTADD
,
1128 if (!NT_STATUS_IS_OK(status
)) {
1132 if (NT_STATUS_IS_ERR(status
)) {
1136 /* Return variables */
1137 if (parm_err
&& r
.out
.parm_err
) {
1138 *parm_err
= *r
.out
.parm_err
;
1143 *werror
= r
.out
.result
;
1146 return werror_to_ntstatus(r
.out
.result
);
1149 struct rpccli_wkssvc_NetrWkstaTransportDel_state
{
1150 struct wkssvc_NetrWkstaTransportDel orig
;
1151 struct wkssvc_NetrWkstaTransportDel tmp
;
1152 TALLOC_CTX
*out_mem_ctx
;
1153 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1156 static void rpccli_wkssvc_NetrWkstaTransportDel_done(struct tevent_req
*subreq
);
1158 struct tevent_req
*rpccli_wkssvc_NetrWkstaTransportDel_send(TALLOC_CTX
*mem_ctx
,
1159 struct tevent_context
*ev
,
1160 struct rpc_pipe_client
*cli
,
1161 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
1162 const char *_transport_name
/* [in] [unique,charset(UTF16)] */,
1163 uint32_t _unknown3
/* [in] */)
1165 struct tevent_req
*req
;
1166 struct rpccli_wkssvc_NetrWkstaTransportDel_state
*state
;
1167 struct tevent_req
*subreq
;
1169 req
= tevent_req_create(mem_ctx
, &state
,
1170 struct rpccli_wkssvc_NetrWkstaTransportDel_state
);
1174 state
->out_mem_ctx
= NULL
;
1175 state
->dispatch_recv
= cli
->dispatch_recv
;
1178 state
->orig
.in
.server_name
= _server_name
;
1179 state
->orig
.in
.transport_name
= _transport_name
;
1180 state
->orig
.in
.unknown3
= _unknown3
;
1182 /* Out parameters */
1185 ZERO_STRUCT(state
->orig
.out
.result
);
1187 /* make a temporary copy, that we pass to the dispatch function */
1188 state
->tmp
= state
->orig
;
1190 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1192 NDR_WKSSVC_NETRWKSTATRANSPORTDEL
,
1194 if (tevent_req_nomem(subreq
, req
)) {
1195 return tevent_req_post(req
, ev
);
1197 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrWkstaTransportDel_done
, req
);
1201 static void rpccli_wkssvc_NetrWkstaTransportDel_done(struct tevent_req
*subreq
)
1203 struct tevent_req
*req
= tevent_req_callback_data(
1204 subreq
, struct tevent_req
);
1205 struct rpccli_wkssvc_NetrWkstaTransportDel_state
*state
= tevent_req_data(
1206 req
, struct rpccli_wkssvc_NetrWkstaTransportDel_state
);
1208 TALLOC_CTX
*mem_ctx
;
1210 if (state
->out_mem_ctx
) {
1211 mem_ctx
= state
->out_mem_ctx
;
1216 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1217 TALLOC_FREE(subreq
);
1218 if (!NT_STATUS_IS_OK(status
)) {
1219 tevent_req_nterror(req
, status
);
1223 /* Copy out parameters */
1226 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1228 /* Reset temporary structure */
1229 ZERO_STRUCT(state
->tmp
);
1231 tevent_req_done(req
);
1234 NTSTATUS
rpccli_wkssvc_NetrWkstaTransportDel_recv(struct tevent_req
*req
,
1235 TALLOC_CTX
*mem_ctx
,
1238 struct rpccli_wkssvc_NetrWkstaTransportDel_state
*state
= tevent_req_data(
1239 req
, struct rpccli_wkssvc_NetrWkstaTransportDel_state
);
1242 if (tevent_req_is_nterror(req
, &status
)) {
1243 tevent_req_received(req
);
1247 /* Steal possbile out parameters to the callers context */
1248 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1251 *result
= state
->orig
.out
.result
;
1253 tevent_req_received(req
);
1254 return NT_STATUS_OK
;
1257 NTSTATUS
rpccli_wkssvc_NetrWkstaTransportDel(struct rpc_pipe_client
*cli
,
1258 TALLOC_CTX
*mem_ctx
,
1259 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1260 const char *transport_name
/* [in] [unique,charset(UTF16)] */,
1261 uint32_t unknown3
/* [in] */,
1264 struct wkssvc_NetrWkstaTransportDel r
;
1268 r
.in
.server_name
= server_name
;
1269 r
.in
.transport_name
= transport_name
;
1270 r
.in
.unknown3
= unknown3
;
1272 status
= cli
->dispatch(cli
,
1275 NDR_WKSSVC_NETRWKSTATRANSPORTDEL
,
1278 if (!NT_STATUS_IS_OK(status
)) {
1282 if (NT_STATUS_IS_ERR(status
)) {
1286 /* Return variables */
1290 *werror
= r
.out
.result
;
1293 return werror_to_ntstatus(r
.out
.result
);
1296 struct rpccli_wkssvc_NetrUseAdd_state
{
1297 struct wkssvc_NetrUseAdd orig
;
1298 struct wkssvc_NetrUseAdd tmp
;
1299 TALLOC_CTX
*out_mem_ctx
;
1300 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1303 static void rpccli_wkssvc_NetrUseAdd_done(struct tevent_req
*subreq
);
1305 struct tevent_req
*rpccli_wkssvc_NetrUseAdd_send(TALLOC_CTX
*mem_ctx
,
1306 struct tevent_context
*ev
,
1307 struct rpc_pipe_client
*cli
,
1308 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
1309 uint32_t _level
/* [in] */,
1310 union wkssvc_NetrUseGetInfoCtr
*_ctr
/* [in] [ref,switch_is(level)] */,
1311 uint32_t *_parm_err
/* [in,out] [unique] */)
1313 struct tevent_req
*req
;
1314 struct rpccli_wkssvc_NetrUseAdd_state
*state
;
1315 struct tevent_req
*subreq
;
1317 req
= tevent_req_create(mem_ctx
, &state
,
1318 struct rpccli_wkssvc_NetrUseAdd_state
);
1322 state
->out_mem_ctx
= NULL
;
1323 state
->dispatch_recv
= cli
->dispatch_recv
;
1326 state
->orig
.in
.server_name
= _server_name
;
1327 state
->orig
.in
.level
= _level
;
1328 state
->orig
.in
.ctr
= _ctr
;
1329 state
->orig
.in
.parm_err
= _parm_err
;
1331 /* Out parameters */
1332 state
->orig
.out
.parm_err
= _parm_err
;
1335 ZERO_STRUCT(state
->orig
.out
.result
);
1337 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1338 "rpccli_wkssvc_NetrUseAdd_out_memory");
1339 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1340 return tevent_req_post(req
, ev
);
1343 /* make a temporary copy, that we pass to the dispatch function */
1344 state
->tmp
= state
->orig
;
1346 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1348 NDR_WKSSVC_NETRUSEADD
,
1350 if (tevent_req_nomem(subreq
, req
)) {
1351 return tevent_req_post(req
, ev
);
1353 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrUseAdd_done
, req
);
1357 static void rpccli_wkssvc_NetrUseAdd_done(struct tevent_req
*subreq
)
1359 struct tevent_req
*req
= tevent_req_callback_data(
1360 subreq
, struct tevent_req
);
1361 struct rpccli_wkssvc_NetrUseAdd_state
*state
= tevent_req_data(
1362 req
, struct rpccli_wkssvc_NetrUseAdd_state
);
1364 TALLOC_CTX
*mem_ctx
;
1366 if (state
->out_mem_ctx
) {
1367 mem_ctx
= state
->out_mem_ctx
;
1372 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1373 TALLOC_FREE(subreq
);
1374 if (!NT_STATUS_IS_OK(status
)) {
1375 tevent_req_nterror(req
, status
);
1379 /* Copy out parameters */
1380 if (state
->orig
.out
.parm_err
&& state
->tmp
.out
.parm_err
) {
1381 *state
->orig
.out
.parm_err
= *state
->tmp
.out
.parm_err
;
1385 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1387 /* Reset temporary structure */
1388 ZERO_STRUCT(state
->tmp
);
1390 tevent_req_done(req
);
1393 NTSTATUS
rpccli_wkssvc_NetrUseAdd_recv(struct tevent_req
*req
,
1394 TALLOC_CTX
*mem_ctx
,
1397 struct rpccli_wkssvc_NetrUseAdd_state
*state
= tevent_req_data(
1398 req
, struct rpccli_wkssvc_NetrUseAdd_state
);
1401 if (tevent_req_is_nterror(req
, &status
)) {
1402 tevent_req_received(req
);
1406 /* Steal possbile out parameters to the callers context */
1407 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1410 *result
= state
->orig
.out
.result
;
1412 tevent_req_received(req
);
1413 return NT_STATUS_OK
;
1416 NTSTATUS
rpccli_wkssvc_NetrUseAdd(struct rpc_pipe_client
*cli
,
1417 TALLOC_CTX
*mem_ctx
,
1418 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1419 uint32_t level
/* [in] */,
1420 union wkssvc_NetrUseGetInfoCtr
*ctr
/* [in] [ref,switch_is(level)] */,
1421 uint32_t *parm_err
/* [in,out] [unique] */,
1424 struct wkssvc_NetrUseAdd r
;
1428 r
.in
.server_name
= server_name
;
1431 r
.in
.parm_err
= parm_err
;
1433 status
= cli
->dispatch(cli
,
1436 NDR_WKSSVC_NETRUSEADD
,
1439 if (!NT_STATUS_IS_OK(status
)) {
1443 if (NT_STATUS_IS_ERR(status
)) {
1447 /* Return variables */
1448 if (parm_err
&& r
.out
.parm_err
) {
1449 *parm_err
= *r
.out
.parm_err
;
1454 *werror
= r
.out
.result
;
1457 return werror_to_ntstatus(r
.out
.result
);
1460 struct rpccli_wkssvc_NetrUseGetInfo_state
{
1461 struct wkssvc_NetrUseGetInfo orig
;
1462 struct wkssvc_NetrUseGetInfo tmp
;
1463 TALLOC_CTX
*out_mem_ctx
;
1464 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1467 static void rpccli_wkssvc_NetrUseGetInfo_done(struct tevent_req
*subreq
);
1469 struct tevent_req
*rpccli_wkssvc_NetrUseGetInfo_send(TALLOC_CTX
*mem_ctx
,
1470 struct tevent_context
*ev
,
1471 struct rpc_pipe_client
*cli
,
1472 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
1473 const char *_use_name
/* [in] [ref,charset(UTF16)] */,
1474 uint32_t _level
/* [in] */,
1475 union wkssvc_NetrUseGetInfoCtr
*_ctr
/* [out] [ref,switch_is(level)] */)
1477 struct tevent_req
*req
;
1478 struct rpccli_wkssvc_NetrUseGetInfo_state
*state
;
1479 struct tevent_req
*subreq
;
1481 req
= tevent_req_create(mem_ctx
, &state
,
1482 struct rpccli_wkssvc_NetrUseGetInfo_state
);
1486 state
->out_mem_ctx
= NULL
;
1487 state
->dispatch_recv
= cli
->dispatch_recv
;
1490 state
->orig
.in
.server_name
= _server_name
;
1491 state
->orig
.in
.use_name
= _use_name
;
1492 state
->orig
.in
.level
= _level
;
1494 /* Out parameters */
1495 state
->orig
.out
.ctr
= _ctr
;
1498 ZERO_STRUCT(state
->orig
.out
.result
);
1500 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1501 "rpccli_wkssvc_NetrUseGetInfo_out_memory");
1502 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1503 return tevent_req_post(req
, ev
);
1506 /* make a temporary copy, that we pass to the dispatch function */
1507 state
->tmp
= state
->orig
;
1509 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1511 NDR_WKSSVC_NETRUSEGETINFO
,
1513 if (tevent_req_nomem(subreq
, req
)) {
1514 return tevent_req_post(req
, ev
);
1516 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrUseGetInfo_done
, req
);
1520 static void rpccli_wkssvc_NetrUseGetInfo_done(struct tevent_req
*subreq
)
1522 struct tevent_req
*req
= tevent_req_callback_data(
1523 subreq
, struct tevent_req
);
1524 struct rpccli_wkssvc_NetrUseGetInfo_state
*state
= tevent_req_data(
1525 req
, struct rpccli_wkssvc_NetrUseGetInfo_state
);
1527 TALLOC_CTX
*mem_ctx
;
1529 if (state
->out_mem_ctx
) {
1530 mem_ctx
= state
->out_mem_ctx
;
1535 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1536 TALLOC_FREE(subreq
);
1537 if (!NT_STATUS_IS_OK(status
)) {
1538 tevent_req_nterror(req
, status
);
1542 /* Copy out parameters */
1543 *state
->orig
.out
.ctr
= *state
->tmp
.out
.ctr
;
1546 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1548 /* Reset temporary structure */
1549 ZERO_STRUCT(state
->tmp
);
1551 tevent_req_done(req
);
1554 NTSTATUS
rpccli_wkssvc_NetrUseGetInfo_recv(struct tevent_req
*req
,
1555 TALLOC_CTX
*mem_ctx
,
1558 struct rpccli_wkssvc_NetrUseGetInfo_state
*state
= tevent_req_data(
1559 req
, struct rpccli_wkssvc_NetrUseGetInfo_state
);
1562 if (tevent_req_is_nterror(req
, &status
)) {
1563 tevent_req_received(req
);
1567 /* Steal possbile out parameters to the callers context */
1568 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1571 *result
= state
->orig
.out
.result
;
1573 tevent_req_received(req
);
1574 return NT_STATUS_OK
;
1577 NTSTATUS
rpccli_wkssvc_NetrUseGetInfo(struct rpc_pipe_client
*cli
,
1578 TALLOC_CTX
*mem_ctx
,
1579 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1580 const char *use_name
/* [in] [ref,charset(UTF16)] */,
1581 uint32_t level
/* [in] */,
1582 union wkssvc_NetrUseGetInfoCtr
*ctr
/* [out] [ref,switch_is(level)] */,
1585 struct wkssvc_NetrUseGetInfo r
;
1589 r
.in
.server_name
= server_name
;
1590 r
.in
.use_name
= use_name
;
1593 status
= cli
->dispatch(cli
,
1596 NDR_WKSSVC_NETRUSEGETINFO
,
1599 if (!NT_STATUS_IS_OK(status
)) {
1603 if (NT_STATUS_IS_ERR(status
)) {
1607 /* Return variables */
1612 *werror
= r
.out
.result
;
1615 return werror_to_ntstatus(r
.out
.result
);
1618 struct rpccli_wkssvc_NetrUseDel_state
{
1619 struct wkssvc_NetrUseDel orig
;
1620 struct wkssvc_NetrUseDel tmp
;
1621 TALLOC_CTX
*out_mem_ctx
;
1622 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1625 static void rpccli_wkssvc_NetrUseDel_done(struct tevent_req
*subreq
);
1627 struct tevent_req
*rpccli_wkssvc_NetrUseDel_send(TALLOC_CTX
*mem_ctx
,
1628 struct tevent_context
*ev
,
1629 struct rpc_pipe_client
*cli
,
1630 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
1631 const char *_use_name
/* [in] [ref,charset(UTF16)] */,
1632 uint32_t _force_cond
/* [in] */)
1634 struct tevent_req
*req
;
1635 struct rpccli_wkssvc_NetrUseDel_state
*state
;
1636 struct tevent_req
*subreq
;
1638 req
= tevent_req_create(mem_ctx
, &state
,
1639 struct rpccli_wkssvc_NetrUseDel_state
);
1643 state
->out_mem_ctx
= NULL
;
1644 state
->dispatch_recv
= cli
->dispatch_recv
;
1647 state
->orig
.in
.server_name
= _server_name
;
1648 state
->orig
.in
.use_name
= _use_name
;
1649 state
->orig
.in
.force_cond
= _force_cond
;
1651 /* Out parameters */
1654 ZERO_STRUCT(state
->orig
.out
.result
);
1656 /* make a temporary copy, that we pass to the dispatch function */
1657 state
->tmp
= state
->orig
;
1659 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1661 NDR_WKSSVC_NETRUSEDEL
,
1663 if (tevent_req_nomem(subreq
, req
)) {
1664 return tevent_req_post(req
, ev
);
1666 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrUseDel_done
, req
);
1670 static void rpccli_wkssvc_NetrUseDel_done(struct tevent_req
*subreq
)
1672 struct tevent_req
*req
= tevent_req_callback_data(
1673 subreq
, struct tevent_req
);
1674 struct rpccli_wkssvc_NetrUseDel_state
*state
= tevent_req_data(
1675 req
, struct rpccli_wkssvc_NetrUseDel_state
);
1677 TALLOC_CTX
*mem_ctx
;
1679 if (state
->out_mem_ctx
) {
1680 mem_ctx
= state
->out_mem_ctx
;
1685 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1686 TALLOC_FREE(subreq
);
1687 if (!NT_STATUS_IS_OK(status
)) {
1688 tevent_req_nterror(req
, status
);
1692 /* Copy out parameters */
1695 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1697 /* Reset temporary structure */
1698 ZERO_STRUCT(state
->tmp
);
1700 tevent_req_done(req
);
1703 NTSTATUS
rpccli_wkssvc_NetrUseDel_recv(struct tevent_req
*req
,
1704 TALLOC_CTX
*mem_ctx
,
1707 struct rpccli_wkssvc_NetrUseDel_state
*state
= tevent_req_data(
1708 req
, struct rpccli_wkssvc_NetrUseDel_state
);
1711 if (tevent_req_is_nterror(req
, &status
)) {
1712 tevent_req_received(req
);
1716 /* Steal possbile out parameters to the callers context */
1717 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1720 *result
= state
->orig
.out
.result
;
1722 tevent_req_received(req
);
1723 return NT_STATUS_OK
;
1726 NTSTATUS
rpccli_wkssvc_NetrUseDel(struct rpc_pipe_client
*cli
,
1727 TALLOC_CTX
*mem_ctx
,
1728 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1729 const char *use_name
/* [in] [ref,charset(UTF16)] */,
1730 uint32_t force_cond
/* [in] */,
1733 struct wkssvc_NetrUseDel r
;
1737 r
.in
.server_name
= server_name
;
1738 r
.in
.use_name
= use_name
;
1739 r
.in
.force_cond
= force_cond
;
1741 status
= cli
->dispatch(cli
,
1744 NDR_WKSSVC_NETRUSEDEL
,
1747 if (!NT_STATUS_IS_OK(status
)) {
1751 if (NT_STATUS_IS_ERR(status
)) {
1755 /* Return variables */
1759 *werror
= r
.out
.result
;
1762 return werror_to_ntstatus(r
.out
.result
);
1765 struct rpccli_wkssvc_NetrUseEnum_state
{
1766 struct wkssvc_NetrUseEnum orig
;
1767 struct wkssvc_NetrUseEnum tmp
;
1768 TALLOC_CTX
*out_mem_ctx
;
1769 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1772 static void rpccli_wkssvc_NetrUseEnum_done(struct tevent_req
*subreq
);
1774 struct tevent_req
*rpccli_wkssvc_NetrUseEnum_send(TALLOC_CTX
*mem_ctx
,
1775 struct tevent_context
*ev
,
1776 struct rpc_pipe_client
*cli
,
1777 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
1778 struct wkssvc_NetrUseEnumInfo
*_info
/* [in,out] [ref] */,
1779 uint32_t _prefmaxlen
/* [in] */,
1780 uint32_t *_entries_read
/* [out] [ref] */,
1781 uint32_t *_resume_handle
/* [in,out] [unique] */)
1783 struct tevent_req
*req
;
1784 struct rpccli_wkssvc_NetrUseEnum_state
*state
;
1785 struct tevent_req
*subreq
;
1787 req
= tevent_req_create(mem_ctx
, &state
,
1788 struct rpccli_wkssvc_NetrUseEnum_state
);
1792 state
->out_mem_ctx
= NULL
;
1793 state
->dispatch_recv
= cli
->dispatch_recv
;
1796 state
->orig
.in
.server_name
= _server_name
;
1797 state
->orig
.in
.info
= _info
;
1798 state
->orig
.in
.prefmaxlen
= _prefmaxlen
;
1799 state
->orig
.in
.resume_handle
= _resume_handle
;
1801 /* Out parameters */
1802 state
->orig
.out
.info
= _info
;
1803 state
->orig
.out
.entries_read
= _entries_read
;
1804 state
->orig
.out
.resume_handle
= _resume_handle
;
1807 ZERO_STRUCT(state
->orig
.out
.result
);
1809 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1810 "rpccli_wkssvc_NetrUseEnum_out_memory");
1811 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1812 return tevent_req_post(req
, ev
);
1815 /* make a temporary copy, that we pass to the dispatch function */
1816 state
->tmp
= state
->orig
;
1818 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1820 NDR_WKSSVC_NETRUSEENUM
,
1822 if (tevent_req_nomem(subreq
, req
)) {
1823 return tevent_req_post(req
, ev
);
1825 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrUseEnum_done
, req
);
1829 static void rpccli_wkssvc_NetrUseEnum_done(struct tevent_req
*subreq
)
1831 struct tevent_req
*req
= tevent_req_callback_data(
1832 subreq
, struct tevent_req
);
1833 struct rpccli_wkssvc_NetrUseEnum_state
*state
= tevent_req_data(
1834 req
, struct rpccli_wkssvc_NetrUseEnum_state
);
1836 TALLOC_CTX
*mem_ctx
;
1838 if (state
->out_mem_ctx
) {
1839 mem_ctx
= state
->out_mem_ctx
;
1844 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1845 TALLOC_FREE(subreq
);
1846 if (!NT_STATUS_IS_OK(status
)) {
1847 tevent_req_nterror(req
, status
);
1851 /* Copy out parameters */
1852 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
1853 *state
->orig
.out
.entries_read
= *state
->tmp
.out
.entries_read
;
1854 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
1855 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
1859 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1861 /* Reset temporary structure */
1862 ZERO_STRUCT(state
->tmp
);
1864 tevent_req_done(req
);
1867 NTSTATUS
rpccli_wkssvc_NetrUseEnum_recv(struct tevent_req
*req
,
1868 TALLOC_CTX
*mem_ctx
,
1871 struct rpccli_wkssvc_NetrUseEnum_state
*state
= tevent_req_data(
1872 req
, struct rpccli_wkssvc_NetrUseEnum_state
);
1875 if (tevent_req_is_nterror(req
, &status
)) {
1876 tevent_req_received(req
);
1880 /* Steal possbile out parameters to the callers context */
1881 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1884 *result
= state
->orig
.out
.result
;
1886 tevent_req_received(req
);
1887 return NT_STATUS_OK
;
1890 NTSTATUS
rpccli_wkssvc_NetrUseEnum(struct rpc_pipe_client
*cli
,
1891 TALLOC_CTX
*mem_ctx
,
1892 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1893 struct wkssvc_NetrUseEnumInfo
*info
/* [in,out] [ref] */,
1894 uint32_t prefmaxlen
/* [in] */,
1895 uint32_t *entries_read
/* [out] [ref] */,
1896 uint32_t *resume_handle
/* [in,out] [unique] */,
1899 struct wkssvc_NetrUseEnum r
;
1903 r
.in
.server_name
= server_name
;
1905 r
.in
.prefmaxlen
= prefmaxlen
;
1906 r
.in
.resume_handle
= resume_handle
;
1908 status
= cli
->dispatch(cli
,
1911 NDR_WKSSVC_NETRUSEENUM
,
1914 if (!NT_STATUS_IS_OK(status
)) {
1918 if (NT_STATUS_IS_ERR(status
)) {
1922 /* Return variables */
1923 *info
= *r
.out
.info
;
1924 *entries_read
= *r
.out
.entries_read
;
1925 if (resume_handle
&& r
.out
.resume_handle
) {
1926 *resume_handle
= *r
.out
.resume_handle
;
1931 *werror
= r
.out
.result
;
1934 return werror_to_ntstatus(r
.out
.result
);
1937 struct rpccli_wkssvc_NetrMessageBufferSend_state
{
1938 struct wkssvc_NetrMessageBufferSend orig
;
1939 struct wkssvc_NetrMessageBufferSend tmp
;
1940 TALLOC_CTX
*out_mem_ctx
;
1941 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1944 static void rpccli_wkssvc_NetrMessageBufferSend_done(struct tevent_req
*subreq
);
1946 struct tevent_req
*rpccli_wkssvc_NetrMessageBufferSend_send(TALLOC_CTX
*mem_ctx
,
1947 struct tevent_context
*ev
,
1948 struct rpc_pipe_client
*cli
,
1949 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
1950 const char *_message_name
/* [in] [ref,charset(UTF16)] */,
1951 const char *_message_sender_name
/* [in] [unique,charset(UTF16)] */,
1952 uint8_t *_message_buffer
/* [in] [ref,size_is(message_size)] */,
1953 uint32_t _message_size
/* [in] */)
1955 struct tevent_req
*req
;
1956 struct rpccli_wkssvc_NetrMessageBufferSend_state
*state
;
1957 struct tevent_req
*subreq
;
1959 req
= tevent_req_create(mem_ctx
, &state
,
1960 struct rpccli_wkssvc_NetrMessageBufferSend_state
);
1964 state
->out_mem_ctx
= NULL
;
1965 state
->dispatch_recv
= cli
->dispatch_recv
;
1968 state
->orig
.in
.server_name
= _server_name
;
1969 state
->orig
.in
.message_name
= _message_name
;
1970 state
->orig
.in
.message_sender_name
= _message_sender_name
;
1971 state
->orig
.in
.message_buffer
= _message_buffer
;
1972 state
->orig
.in
.message_size
= _message_size
;
1974 /* Out parameters */
1977 ZERO_STRUCT(state
->orig
.out
.result
);
1979 /* make a temporary copy, that we pass to the dispatch function */
1980 state
->tmp
= state
->orig
;
1982 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1984 NDR_WKSSVC_NETRMESSAGEBUFFERSEND
,
1986 if (tevent_req_nomem(subreq
, req
)) {
1987 return tevent_req_post(req
, ev
);
1989 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrMessageBufferSend_done
, req
);
1993 static void rpccli_wkssvc_NetrMessageBufferSend_done(struct tevent_req
*subreq
)
1995 struct tevent_req
*req
= tevent_req_callback_data(
1996 subreq
, struct tevent_req
);
1997 struct rpccli_wkssvc_NetrMessageBufferSend_state
*state
= tevent_req_data(
1998 req
, struct rpccli_wkssvc_NetrMessageBufferSend_state
);
2000 TALLOC_CTX
*mem_ctx
;
2002 if (state
->out_mem_ctx
) {
2003 mem_ctx
= state
->out_mem_ctx
;
2008 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2009 TALLOC_FREE(subreq
);
2010 if (!NT_STATUS_IS_OK(status
)) {
2011 tevent_req_nterror(req
, status
);
2015 /* Copy out parameters */
2018 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2020 /* Reset temporary structure */
2021 ZERO_STRUCT(state
->tmp
);
2023 tevent_req_done(req
);
2026 NTSTATUS
rpccli_wkssvc_NetrMessageBufferSend_recv(struct tevent_req
*req
,
2027 TALLOC_CTX
*mem_ctx
,
2030 struct rpccli_wkssvc_NetrMessageBufferSend_state
*state
= tevent_req_data(
2031 req
, struct rpccli_wkssvc_NetrMessageBufferSend_state
);
2034 if (tevent_req_is_nterror(req
, &status
)) {
2035 tevent_req_received(req
);
2039 /* Steal possbile out parameters to the callers context */
2040 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2043 *result
= state
->orig
.out
.result
;
2045 tevent_req_received(req
);
2046 return NT_STATUS_OK
;
2049 NTSTATUS
rpccli_wkssvc_NetrMessageBufferSend(struct rpc_pipe_client
*cli
,
2050 TALLOC_CTX
*mem_ctx
,
2051 const char *server_name
/* [in] [unique,charset(UTF16)] */,
2052 const char *message_name
/* [in] [ref,charset(UTF16)] */,
2053 const char *message_sender_name
/* [in] [unique,charset(UTF16)] */,
2054 uint8_t *message_buffer
/* [in] [ref,size_is(message_size)] */,
2055 uint32_t message_size
/* [in] */,
2058 struct wkssvc_NetrMessageBufferSend r
;
2062 r
.in
.server_name
= server_name
;
2063 r
.in
.message_name
= message_name
;
2064 r
.in
.message_sender_name
= message_sender_name
;
2065 r
.in
.message_buffer
= message_buffer
;
2066 r
.in
.message_size
= message_size
;
2068 status
= cli
->dispatch(cli
,
2071 NDR_WKSSVC_NETRMESSAGEBUFFERSEND
,
2074 if (!NT_STATUS_IS_OK(status
)) {
2078 if (NT_STATUS_IS_ERR(status
)) {
2082 /* Return variables */
2086 *werror
= r
.out
.result
;
2089 return werror_to_ntstatus(r
.out
.result
);
2092 struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state
{
2093 struct wkssvc_NetrWorkstationStatisticsGet orig
;
2094 struct wkssvc_NetrWorkstationStatisticsGet tmp
;
2095 TALLOC_CTX
*out_mem_ctx
;
2096 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2099 static void rpccli_wkssvc_NetrWorkstationStatisticsGet_done(struct tevent_req
*subreq
);
2101 struct tevent_req
*rpccli_wkssvc_NetrWorkstationStatisticsGet_send(TALLOC_CTX
*mem_ctx
,
2102 struct tevent_context
*ev
,
2103 struct rpc_pipe_client
*cli
,
2104 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
2105 const char *_unknown2
/* [in] [unique,charset(UTF16)] */,
2106 uint32_t _unknown3
/* [in] */,
2107 uint32_t _unknown4
/* [in] */,
2108 struct wkssvc_NetrWorkstationStatistics
**_info
/* [out] [ref] */)
2110 struct tevent_req
*req
;
2111 struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state
*state
;
2112 struct tevent_req
*subreq
;
2114 req
= tevent_req_create(mem_ctx
, &state
,
2115 struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state
);
2119 state
->out_mem_ctx
= NULL
;
2120 state
->dispatch_recv
= cli
->dispatch_recv
;
2123 state
->orig
.in
.server_name
= _server_name
;
2124 state
->orig
.in
.unknown2
= _unknown2
;
2125 state
->orig
.in
.unknown3
= _unknown3
;
2126 state
->orig
.in
.unknown4
= _unknown4
;
2128 /* Out parameters */
2129 state
->orig
.out
.info
= _info
;
2132 ZERO_STRUCT(state
->orig
.out
.result
);
2134 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2135 "rpccli_wkssvc_NetrWorkstationStatisticsGet_out_memory");
2136 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2137 return tevent_req_post(req
, ev
);
2140 /* make a temporary copy, that we pass to the dispatch function */
2141 state
->tmp
= state
->orig
;
2143 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2145 NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET
,
2147 if (tevent_req_nomem(subreq
, req
)) {
2148 return tevent_req_post(req
, ev
);
2150 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrWorkstationStatisticsGet_done
, req
);
2154 static void rpccli_wkssvc_NetrWorkstationStatisticsGet_done(struct tevent_req
*subreq
)
2156 struct tevent_req
*req
= tevent_req_callback_data(
2157 subreq
, struct tevent_req
);
2158 struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state
*state
= tevent_req_data(
2159 req
, struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state
);
2161 TALLOC_CTX
*mem_ctx
;
2163 if (state
->out_mem_ctx
) {
2164 mem_ctx
= state
->out_mem_ctx
;
2169 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2170 TALLOC_FREE(subreq
);
2171 if (!NT_STATUS_IS_OK(status
)) {
2172 tevent_req_nterror(req
, status
);
2176 /* Copy out parameters */
2177 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
2180 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2182 /* Reset temporary structure */
2183 ZERO_STRUCT(state
->tmp
);
2185 tevent_req_done(req
);
2188 NTSTATUS
rpccli_wkssvc_NetrWorkstationStatisticsGet_recv(struct tevent_req
*req
,
2189 TALLOC_CTX
*mem_ctx
,
2192 struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state
*state
= tevent_req_data(
2193 req
, struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state
);
2196 if (tevent_req_is_nterror(req
, &status
)) {
2197 tevent_req_received(req
);
2201 /* Steal possbile out parameters to the callers context */
2202 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2205 *result
= state
->orig
.out
.result
;
2207 tevent_req_received(req
);
2208 return NT_STATUS_OK
;
2211 NTSTATUS
rpccli_wkssvc_NetrWorkstationStatisticsGet(struct rpc_pipe_client
*cli
,
2212 TALLOC_CTX
*mem_ctx
,
2213 const char *server_name
/* [in] [unique,charset(UTF16)] */,
2214 const char *unknown2
/* [in] [unique,charset(UTF16)] */,
2215 uint32_t unknown3
/* [in] */,
2216 uint32_t unknown4
/* [in] */,
2217 struct wkssvc_NetrWorkstationStatistics
**info
/* [out] [ref] */,
2220 struct wkssvc_NetrWorkstationStatisticsGet r
;
2224 r
.in
.server_name
= server_name
;
2225 r
.in
.unknown2
= unknown2
;
2226 r
.in
.unknown3
= unknown3
;
2227 r
.in
.unknown4
= unknown4
;
2229 status
= cli
->dispatch(cli
,
2232 NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET
,
2235 if (!NT_STATUS_IS_OK(status
)) {
2239 if (NT_STATUS_IS_ERR(status
)) {
2243 /* Return variables */
2244 *info
= *r
.out
.info
;
2248 *werror
= r
.out
.result
;
2251 return werror_to_ntstatus(r
.out
.result
);
2254 struct rpccli_wkssvc_NetrLogonDomainNameAdd_state
{
2255 struct wkssvc_NetrLogonDomainNameAdd orig
;
2256 struct wkssvc_NetrLogonDomainNameAdd tmp
;
2257 TALLOC_CTX
*out_mem_ctx
;
2258 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2261 static void rpccli_wkssvc_NetrLogonDomainNameAdd_done(struct tevent_req
*subreq
);
2263 struct tevent_req
*rpccli_wkssvc_NetrLogonDomainNameAdd_send(TALLOC_CTX
*mem_ctx
,
2264 struct tevent_context
*ev
,
2265 struct rpc_pipe_client
*cli
,
2266 const char *_domain_name
/* [in] [ref,charset(UTF16)] */)
2268 struct tevent_req
*req
;
2269 struct rpccli_wkssvc_NetrLogonDomainNameAdd_state
*state
;
2270 struct tevent_req
*subreq
;
2272 req
= tevent_req_create(mem_ctx
, &state
,
2273 struct rpccli_wkssvc_NetrLogonDomainNameAdd_state
);
2277 state
->out_mem_ctx
= NULL
;
2278 state
->dispatch_recv
= cli
->dispatch_recv
;
2281 state
->orig
.in
.domain_name
= _domain_name
;
2283 /* Out parameters */
2286 ZERO_STRUCT(state
->orig
.out
.result
);
2288 /* make a temporary copy, that we pass to the dispatch function */
2289 state
->tmp
= state
->orig
;
2291 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2293 NDR_WKSSVC_NETRLOGONDOMAINNAMEADD
,
2295 if (tevent_req_nomem(subreq
, req
)) {
2296 return tevent_req_post(req
, ev
);
2298 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrLogonDomainNameAdd_done
, req
);
2302 static void rpccli_wkssvc_NetrLogonDomainNameAdd_done(struct tevent_req
*subreq
)
2304 struct tevent_req
*req
= tevent_req_callback_data(
2305 subreq
, struct tevent_req
);
2306 struct rpccli_wkssvc_NetrLogonDomainNameAdd_state
*state
= tevent_req_data(
2307 req
, struct rpccli_wkssvc_NetrLogonDomainNameAdd_state
);
2309 TALLOC_CTX
*mem_ctx
;
2311 if (state
->out_mem_ctx
) {
2312 mem_ctx
= state
->out_mem_ctx
;
2317 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2318 TALLOC_FREE(subreq
);
2319 if (!NT_STATUS_IS_OK(status
)) {
2320 tevent_req_nterror(req
, status
);
2324 /* Copy out parameters */
2327 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2329 /* Reset temporary structure */
2330 ZERO_STRUCT(state
->tmp
);
2332 tevent_req_done(req
);
2335 NTSTATUS
rpccli_wkssvc_NetrLogonDomainNameAdd_recv(struct tevent_req
*req
,
2336 TALLOC_CTX
*mem_ctx
,
2339 struct rpccli_wkssvc_NetrLogonDomainNameAdd_state
*state
= tevent_req_data(
2340 req
, struct rpccli_wkssvc_NetrLogonDomainNameAdd_state
);
2343 if (tevent_req_is_nterror(req
, &status
)) {
2344 tevent_req_received(req
);
2348 /* Steal possbile out parameters to the callers context */
2349 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2352 *result
= state
->orig
.out
.result
;
2354 tevent_req_received(req
);
2355 return NT_STATUS_OK
;
2358 NTSTATUS
rpccli_wkssvc_NetrLogonDomainNameAdd(struct rpc_pipe_client
*cli
,
2359 TALLOC_CTX
*mem_ctx
,
2360 const char *domain_name
/* [in] [ref,charset(UTF16)] */,
2363 struct wkssvc_NetrLogonDomainNameAdd r
;
2367 r
.in
.domain_name
= domain_name
;
2369 status
= cli
->dispatch(cli
,
2372 NDR_WKSSVC_NETRLOGONDOMAINNAMEADD
,
2375 if (!NT_STATUS_IS_OK(status
)) {
2379 if (NT_STATUS_IS_ERR(status
)) {
2383 /* Return variables */
2387 *werror
= r
.out
.result
;
2390 return werror_to_ntstatus(r
.out
.result
);
2393 struct rpccli_wkssvc_NetrLogonDomainNameDel_state
{
2394 struct wkssvc_NetrLogonDomainNameDel orig
;
2395 struct wkssvc_NetrLogonDomainNameDel tmp
;
2396 TALLOC_CTX
*out_mem_ctx
;
2397 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2400 static void rpccli_wkssvc_NetrLogonDomainNameDel_done(struct tevent_req
*subreq
);
2402 struct tevent_req
*rpccli_wkssvc_NetrLogonDomainNameDel_send(TALLOC_CTX
*mem_ctx
,
2403 struct tevent_context
*ev
,
2404 struct rpc_pipe_client
*cli
,
2405 const char *_domain_name
/* [in] [ref,charset(UTF16)] */)
2407 struct tevent_req
*req
;
2408 struct rpccli_wkssvc_NetrLogonDomainNameDel_state
*state
;
2409 struct tevent_req
*subreq
;
2411 req
= tevent_req_create(mem_ctx
, &state
,
2412 struct rpccli_wkssvc_NetrLogonDomainNameDel_state
);
2416 state
->out_mem_ctx
= NULL
;
2417 state
->dispatch_recv
= cli
->dispatch_recv
;
2420 state
->orig
.in
.domain_name
= _domain_name
;
2422 /* Out parameters */
2425 ZERO_STRUCT(state
->orig
.out
.result
);
2427 /* make a temporary copy, that we pass to the dispatch function */
2428 state
->tmp
= state
->orig
;
2430 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2432 NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL
,
2434 if (tevent_req_nomem(subreq
, req
)) {
2435 return tevent_req_post(req
, ev
);
2437 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrLogonDomainNameDel_done
, req
);
2441 static void rpccli_wkssvc_NetrLogonDomainNameDel_done(struct tevent_req
*subreq
)
2443 struct tevent_req
*req
= tevent_req_callback_data(
2444 subreq
, struct tevent_req
);
2445 struct rpccli_wkssvc_NetrLogonDomainNameDel_state
*state
= tevent_req_data(
2446 req
, struct rpccli_wkssvc_NetrLogonDomainNameDel_state
);
2448 TALLOC_CTX
*mem_ctx
;
2450 if (state
->out_mem_ctx
) {
2451 mem_ctx
= state
->out_mem_ctx
;
2456 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2457 TALLOC_FREE(subreq
);
2458 if (!NT_STATUS_IS_OK(status
)) {
2459 tevent_req_nterror(req
, status
);
2463 /* Copy out parameters */
2466 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2468 /* Reset temporary structure */
2469 ZERO_STRUCT(state
->tmp
);
2471 tevent_req_done(req
);
2474 NTSTATUS
rpccli_wkssvc_NetrLogonDomainNameDel_recv(struct tevent_req
*req
,
2475 TALLOC_CTX
*mem_ctx
,
2478 struct rpccli_wkssvc_NetrLogonDomainNameDel_state
*state
= tevent_req_data(
2479 req
, struct rpccli_wkssvc_NetrLogonDomainNameDel_state
);
2482 if (tevent_req_is_nterror(req
, &status
)) {
2483 tevent_req_received(req
);
2487 /* Steal possbile out parameters to the callers context */
2488 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2491 *result
= state
->orig
.out
.result
;
2493 tevent_req_received(req
);
2494 return NT_STATUS_OK
;
2497 NTSTATUS
rpccli_wkssvc_NetrLogonDomainNameDel(struct rpc_pipe_client
*cli
,
2498 TALLOC_CTX
*mem_ctx
,
2499 const char *domain_name
/* [in] [ref,charset(UTF16)] */,
2502 struct wkssvc_NetrLogonDomainNameDel r
;
2506 r
.in
.domain_name
= domain_name
;
2508 status
= cli
->dispatch(cli
,
2511 NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL
,
2514 if (!NT_STATUS_IS_OK(status
)) {
2518 if (NT_STATUS_IS_ERR(status
)) {
2522 /* Return variables */
2526 *werror
= r
.out
.result
;
2529 return werror_to_ntstatus(r
.out
.result
);
2532 struct rpccli_wkssvc_NetrJoinDomain_state
{
2533 struct wkssvc_NetrJoinDomain orig
;
2534 struct wkssvc_NetrJoinDomain tmp
;
2535 TALLOC_CTX
*out_mem_ctx
;
2536 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2539 static void rpccli_wkssvc_NetrJoinDomain_done(struct tevent_req
*subreq
);
2541 struct tevent_req
*rpccli_wkssvc_NetrJoinDomain_send(TALLOC_CTX
*mem_ctx
,
2542 struct tevent_context
*ev
,
2543 struct rpc_pipe_client
*cli
,
2544 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
2545 const char *_domain_name
/* [in] [ref,charset(UTF16)] */,
2546 const char *_account_ou
/* [in] [unique,charset(UTF16)] */,
2547 const char *_Account
/* [in] [unique,charset(UTF16)] */,
2548 const char *_password
/* [in] [unique,charset(UTF16)] */,
2549 uint32_t _join_flags
/* [in] */)
2551 struct tevent_req
*req
;
2552 struct rpccli_wkssvc_NetrJoinDomain_state
*state
;
2553 struct tevent_req
*subreq
;
2555 req
= tevent_req_create(mem_ctx
, &state
,
2556 struct rpccli_wkssvc_NetrJoinDomain_state
);
2560 state
->out_mem_ctx
= NULL
;
2561 state
->dispatch_recv
= cli
->dispatch_recv
;
2564 state
->orig
.in
.server_name
= _server_name
;
2565 state
->orig
.in
.domain_name
= _domain_name
;
2566 state
->orig
.in
.account_ou
= _account_ou
;
2567 state
->orig
.in
.Account
= _Account
;
2568 state
->orig
.in
.password
= _password
;
2569 state
->orig
.in
.join_flags
= _join_flags
;
2571 /* Out parameters */
2574 ZERO_STRUCT(state
->orig
.out
.result
);
2576 /* make a temporary copy, that we pass to the dispatch function */
2577 state
->tmp
= state
->orig
;
2579 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2581 NDR_WKSSVC_NETRJOINDOMAIN
,
2583 if (tevent_req_nomem(subreq
, req
)) {
2584 return tevent_req_post(req
, ev
);
2586 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrJoinDomain_done
, req
);
2590 static void rpccli_wkssvc_NetrJoinDomain_done(struct tevent_req
*subreq
)
2592 struct tevent_req
*req
= tevent_req_callback_data(
2593 subreq
, struct tevent_req
);
2594 struct rpccli_wkssvc_NetrJoinDomain_state
*state
= tevent_req_data(
2595 req
, struct rpccli_wkssvc_NetrJoinDomain_state
);
2597 TALLOC_CTX
*mem_ctx
;
2599 if (state
->out_mem_ctx
) {
2600 mem_ctx
= state
->out_mem_ctx
;
2605 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2606 TALLOC_FREE(subreq
);
2607 if (!NT_STATUS_IS_OK(status
)) {
2608 tevent_req_nterror(req
, status
);
2612 /* Copy out parameters */
2615 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2617 /* Reset temporary structure */
2618 ZERO_STRUCT(state
->tmp
);
2620 tevent_req_done(req
);
2623 NTSTATUS
rpccli_wkssvc_NetrJoinDomain_recv(struct tevent_req
*req
,
2624 TALLOC_CTX
*mem_ctx
,
2627 struct rpccli_wkssvc_NetrJoinDomain_state
*state
= tevent_req_data(
2628 req
, struct rpccli_wkssvc_NetrJoinDomain_state
);
2631 if (tevent_req_is_nterror(req
, &status
)) {
2632 tevent_req_received(req
);
2636 /* Steal possbile out parameters to the callers context */
2637 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2640 *result
= state
->orig
.out
.result
;
2642 tevent_req_received(req
);
2643 return NT_STATUS_OK
;
2646 NTSTATUS
rpccli_wkssvc_NetrJoinDomain(struct rpc_pipe_client
*cli
,
2647 TALLOC_CTX
*mem_ctx
,
2648 const char *server_name
/* [in] [unique,charset(UTF16)] */,
2649 const char *domain_name
/* [in] [ref,charset(UTF16)] */,
2650 const char *account_ou
/* [in] [unique,charset(UTF16)] */,
2651 const char *Account
/* [in] [unique,charset(UTF16)] */,
2652 const char *password
/* [in] [unique,charset(UTF16)] */,
2653 uint32_t join_flags
/* [in] */,
2656 struct wkssvc_NetrJoinDomain r
;
2660 r
.in
.server_name
= server_name
;
2661 r
.in
.domain_name
= domain_name
;
2662 r
.in
.account_ou
= account_ou
;
2663 r
.in
.Account
= Account
;
2664 r
.in
.password
= password
;
2665 r
.in
.join_flags
= join_flags
;
2667 status
= cli
->dispatch(cli
,
2670 NDR_WKSSVC_NETRJOINDOMAIN
,
2673 if (!NT_STATUS_IS_OK(status
)) {
2677 if (NT_STATUS_IS_ERR(status
)) {
2681 /* Return variables */
2685 *werror
= r
.out
.result
;
2688 return werror_to_ntstatus(r
.out
.result
);
2691 struct rpccli_wkssvc_NetrUnjoinDomain_state
{
2692 struct wkssvc_NetrUnjoinDomain orig
;
2693 struct wkssvc_NetrUnjoinDomain tmp
;
2694 TALLOC_CTX
*out_mem_ctx
;
2695 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2698 static void rpccli_wkssvc_NetrUnjoinDomain_done(struct tevent_req
*subreq
);
2700 struct tevent_req
*rpccli_wkssvc_NetrUnjoinDomain_send(TALLOC_CTX
*mem_ctx
,
2701 struct tevent_context
*ev
,
2702 struct rpc_pipe_client
*cli
,
2703 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
2704 const char *_Account
/* [in] [unique,charset(UTF16)] */,
2705 const char *_password
/* [in] [unique,charset(UTF16)] */,
2706 uint32_t _unjoin_flags
/* [in] */)
2708 struct tevent_req
*req
;
2709 struct rpccli_wkssvc_NetrUnjoinDomain_state
*state
;
2710 struct tevent_req
*subreq
;
2712 req
= tevent_req_create(mem_ctx
, &state
,
2713 struct rpccli_wkssvc_NetrUnjoinDomain_state
);
2717 state
->out_mem_ctx
= NULL
;
2718 state
->dispatch_recv
= cli
->dispatch_recv
;
2721 state
->orig
.in
.server_name
= _server_name
;
2722 state
->orig
.in
.Account
= _Account
;
2723 state
->orig
.in
.password
= _password
;
2724 state
->orig
.in
.unjoin_flags
= _unjoin_flags
;
2726 /* Out parameters */
2729 ZERO_STRUCT(state
->orig
.out
.result
);
2731 /* make a temporary copy, that we pass to the dispatch function */
2732 state
->tmp
= state
->orig
;
2734 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2736 NDR_WKSSVC_NETRUNJOINDOMAIN
,
2738 if (tevent_req_nomem(subreq
, req
)) {
2739 return tevent_req_post(req
, ev
);
2741 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrUnjoinDomain_done
, req
);
2745 static void rpccli_wkssvc_NetrUnjoinDomain_done(struct tevent_req
*subreq
)
2747 struct tevent_req
*req
= tevent_req_callback_data(
2748 subreq
, struct tevent_req
);
2749 struct rpccli_wkssvc_NetrUnjoinDomain_state
*state
= tevent_req_data(
2750 req
, struct rpccli_wkssvc_NetrUnjoinDomain_state
);
2752 TALLOC_CTX
*mem_ctx
;
2754 if (state
->out_mem_ctx
) {
2755 mem_ctx
= state
->out_mem_ctx
;
2760 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2761 TALLOC_FREE(subreq
);
2762 if (!NT_STATUS_IS_OK(status
)) {
2763 tevent_req_nterror(req
, status
);
2767 /* Copy out parameters */
2770 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2772 /* Reset temporary structure */
2773 ZERO_STRUCT(state
->tmp
);
2775 tevent_req_done(req
);
2778 NTSTATUS
rpccli_wkssvc_NetrUnjoinDomain_recv(struct tevent_req
*req
,
2779 TALLOC_CTX
*mem_ctx
,
2782 struct rpccli_wkssvc_NetrUnjoinDomain_state
*state
= tevent_req_data(
2783 req
, struct rpccli_wkssvc_NetrUnjoinDomain_state
);
2786 if (tevent_req_is_nterror(req
, &status
)) {
2787 tevent_req_received(req
);
2791 /* Steal possbile out parameters to the callers context */
2792 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2795 *result
= state
->orig
.out
.result
;
2797 tevent_req_received(req
);
2798 return NT_STATUS_OK
;
2801 NTSTATUS
rpccli_wkssvc_NetrUnjoinDomain(struct rpc_pipe_client
*cli
,
2802 TALLOC_CTX
*mem_ctx
,
2803 const char *server_name
/* [in] [unique,charset(UTF16)] */,
2804 const char *Account
/* [in] [unique,charset(UTF16)] */,
2805 const char *password
/* [in] [unique,charset(UTF16)] */,
2806 uint32_t unjoin_flags
/* [in] */,
2809 struct wkssvc_NetrUnjoinDomain r
;
2813 r
.in
.server_name
= server_name
;
2814 r
.in
.Account
= Account
;
2815 r
.in
.password
= password
;
2816 r
.in
.unjoin_flags
= unjoin_flags
;
2818 status
= cli
->dispatch(cli
,
2821 NDR_WKSSVC_NETRUNJOINDOMAIN
,
2824 if (!NT_STATUS_IS_OK(status
)) {
2828 if (NT_STATUS_IS_ERR(status
)) {
2832 /* Return variables */
2836 *werror
= r
.out
.result
;
2839 return werror_to_ntstatus(r
.out
.result
);
2842 struct rpccli_wkssvc_NetrRenameMachineInDomain_state
{
2843 struct wkssvc_NetrRenameMachineInDomain orig
;
2844 struct wkssvc_NetrRenameMachineInDomain tmp
;
2845 TALLOC_CTX
*out_mem_ctx
;
2846 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2849 static void rpccli_wkssvc_NetrRenameMachineInDomain_done(struct tevent_req
*subreq
);
2851 struct tevent_req
*rpccli_wkssvc_NetrRenameMachineInDomain_send(TALLOC_CTX
*mem_ctx
,
2852 struct tevent_context
*ev
,
2853 struct rpc_pipe_client
*cli
,
2854 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
2855 const char *_NewMachineName
/* [in] [unique,charset(UTF16)] */,
2856 const char *_Account
/* [in] [unique,charset(UTF16)] */,
2857 const char *_password
/* [in] [unique,charset(UTF16)] */,
2858 uint32_t _RenameOptions
/* [in] */)
2860 struct tevent_req
*req
;
2861 struct rpccli_wkssvc_NetrRenameMachineInDomain_state
*state
;
2862 struct tevent_req
*subreq
;
2864 req
= tevent_req_create(mem_ctx
, &state
,
2865 struct rpccli_wkssvc_NetrRenameMachineInDomain_state
);
2869 state
->out_mem_ctx
= NULL
;
2870 state
->dispatch_recv
= cli
->dispatch_recv
;
2873 state
->orig
.in
.server_name
= _server_name
;
2874 state
->orig
.in
.NewMachineName
= _NewMachineName
;
2875 state
->orig
.in
.Account
= _Account
;
2876 state
->orig
.in
.password
= _password
;
2877 state
->orig
.in
.RenameOptions
= _RenameOptions
;
2879 /* Out parameters */
2882 ZERO_STRUCT(state
->orig
.out
.result
);
2884 /* make a temporary copy, that we pass to the dispatch function */
2885 state
->tmp
= state
->orig
;
2887 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2889 NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN
,
2891 if (tevent_req_nomem(subreq
, req
)) {
2892 return tevent_req_post(req
, ev
);
2894 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrRenameMachineInDomain_done
, req
);
2898 static void rpccli_wkssvc_NetrRenameMachineInDomain_done(struct tevent_req
*subreq
)
2900 struct tevent_req
*req
= tevent_req_callback_data(
2901 subreq
, struct tevent_req
);
2902 struct rpccli_wkssvc_NetrRenameMachineInDomain_state
*state
= tevent_req_data(
2903 req
, struct rpccli_wkssvc_NetrRenameMachineInDomain_state
);
2905 TALLOC_CTX
*mem_ctx
;
2907 if (state
->out_mem_ctx
) {
2908 mem_ctx
= state
->out_mem_ctx
;
2913 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2914 TALLOC_FREE(subreq
);
2915 if (!NT_STATUS_IS_OK(status
)) {
2916 tevent_req_nterror(req
, status
);
2920 /* Copy out parameters */
2923 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2925 /* Reset temporary structure */
2926 ZERO_STRUCT(state
->tmp
);
2928 tevent_req_done(req
);
2931 NTSTATUS
rpccli_wkssvc_NetrRenameMachineInDomain_recv(struct tevent_req
*req
,
2932 TALLOC_CTX
*mem_ctx
,
2935 struct rpccli_wkssvc_NetrRenameMachineInDomain_state
*state
= tevent_req_data(
2936 req
, struct rpccli_wkssvc_NetrRenameMachineInDomain_state
);
2939 if (tevent_req_is_nterror(req
, &status
)) {
2940 tevent_req_received(req
);
2944 /* Steal possbile out parameters to the callers context */
2945 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2948 *result
= state
->orig
.out
.result
;
2950 tevent_req_received(req
);
2951 return NT_STATUS_OK
;
2954 NTSTATUS
rpccli_wkssvc_NetrRenameMachineInDomain(struct rpc_pipe_client
*cli
,
2955 TALLOC_CTX
*mem_ctx
,
2956 const char *server_name
/* [in] [unique,charset(UTF16)] */,
2957 const char *NewMachineName
/* [in] [unique,charset(UTF16)] */,
2958 const char *Account
/* [in] [unique,charset(UTF16)] */,
2959 const char *password
/* [in] [unique,charset(UTF16)] */,
2960 uint32_t RenameOptions
/* [in] */,
2963 struct wkssvc_NetrRenameMachineInDomain r
;
2967 r
.in
.server_name
= server_name
;
2968 r
.in
.NewMachineName
= NewMachineName
;
2969 r
.in
.Account
= Account
;
2970 r
.in
.password
= password
;
2971 r
.in
.RenameOptions
= RenameOptions
;
2973 status
= cli
->dispatch(cli
,
2976 NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN
,
2979 if (!NT_STATUS_IS_OK(status
)) {
2983 if (NT_STATUS_IS_ERR(status
)) {
2987 /* Return variables */
2991 *werror
= r
.out
.result
;
2994 return werror_to_ntstatus(r
.out
.result
);
2997 struct rpccli_wkssvc_NetrValidateName_state
{
2998 struct wkssvc_NetrValidateName orig
;
2999 struct wkssvc_NetrValidateName tmp
;
3000 TALLOC_CTX
*out_mem_ctx
;
3001 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3004 static void rpccli_wkssvc_NetrValidateName_done(struct tevent_req
*subreq
);
3006 struct tevent_req
*rpccli_wkssvc_NetrValidateName_send(TALLOC_CTX
*mem_ctx
,
3007 struct tevent_context
*ev
,
3008 struct rpc_pipe_client
*cli
,
3009 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
3010 const char *_name
/* [in] [ref,charset(UTF16)] */,
3011 const char *_Account
/* [in] [unique,charset(UTF16)] */,
3012 const char *_Password
/* [in] [unique,charset(UTF16)] */,
3013 enum wkssvc_NetValidateNameType _name_type
/* [in] */)
3015 struct tevent_req
*req
;
3016 struct rpccli_wkssvc_NetrValidateName_state
*state
;
3017 struct tevent_req
*subreq
;
3019 req
= tevent_req_create(mem_ctx
, &state
,
3020 struct rpccli_wkssvc_NetrValidateName_state
);
3024 state
->out_mem_ctx
= NULL
;
3025 state
->dispatch_recv
= cli
->dispatch_recv
;
3028 state
->orig
.in
.server_name
= _server_name
;
3029 state
->orig
.in
.name
= _name
;
3030 state
->orig
.in
.Account
= _Account
;
3031 state
->orig
.in
.Password
= _Password
;
3032 state
->orig
.in
.name_type
= _name_type
;
3034 /* Out parameters */
3037 ZERO_STRUCT(state
->orig
.out
.result
);
3039 /* make a temporary copy, that we pass to the dispatch function */
3040 state
->tmp
= state
->orig
;
3042 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3044 NDR_WKSSVC_NETRVALIDATENAME
,
3046 if (tevent_req_nomem(subreq
, req
)) {
3047 return tevent_req_post(req
, ev
);
3049 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrValidateName_done
, req
);
3053 static void rpccli_wkssvc_NetrValidateName_done(struct tevent_req
*subreq
)
3055 struct tevent_req
*req
= tevent_req_callback_data(
3056 subreq
, struct tevent_req
);
3057 struct rpccli_wkssvc_NetrValidateName_state
*state
= tevent_req_data(
3058 req
, struct rpccli_wkssvc_NetrValidateName_state
);
3060 TALLOC_CTX
*mem_ctx
;
3062 if (state
->out_mem_ctx
) {
3063 mem_ctx
= state
->out_mem_ctx
;
3068 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3069 TALLOC_FREE(subreq
);
3070 if (!NT_STATUS_IS_OK(status
)) {
3071 tevent_req_nterror(req
, status
);
3075 /* Copy out parameters */
3078 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3080 /* Reset temporary structure */
3081 ZERO_STRUCT(state
->tmp
);
3083 tevent_req_done(req
);
3086 NTSTATUS
rpccli_wkssvc_NetrValidateName_recv(struct tevent_req
*req
,
3087 TALLOC_CTX
*mem_ctx
,
3090 struct rpccli_wkssvc_NetrValidateName_state
*state
= tevent_req_data(
3091 req
, struct rpccli_wkssvc_NetrValidateName_state
);
3094 if (tevent_req_is_nterror(req
, &status
)) {
3095 tevent_req_received(req
);
3099 /* Steal possbile out parameters to the callers context */
3100 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3103 *result
= state
->orig
.out
.result
;
3105 tevent_req_received(req
);
3106 return NT_STATUS_OK
;
3109 NTSTATUS
rpccli_wkssvc_NetrValidateName(struct rpc_pipe_client
*cli
,
3110 TALLOC_CTX
*mem_ctx
,
3111 const char *server_name
/* [in] [unique,charset(UTF16)] */,
3112 const char *name
/* [in] [ref,charset(UTF16)] */,
3113 const char *Account
/* [in] [unique,charset(UTF16)] */,
3114 const char *Password
/* [in] [unique,charset(UTF16)] */,
3115 enum wkssvc_NetValidateNameType name_type
/* [in] */,
3118 struct wkssvc_NetrValidateName r
;
3122 r
.in
.server_name
= server_name
;
3124 r
.in
.Account
= Account
;
3125 r
.in
.Password
= Password
;
3126 r
.in
.name_type
= name_type
;
3128 status
= cli
->dispatch(cli
,
3131 NDR_WKSSVC_NETRVALIDATENAME
,
3134 if (!NT_STATUS_IS_OK(status
)) {
3138 if (NT_STATUS_IS_ERR(status
)) {
3142 /* Return variables */
3146 *werror
= r
.out
.result
;
3149 return werror_to_ntstatus(r
.out
.result
);
3152 struct rpccli_wkssvc_NetrGetJoinInformation_state
{
3153 struct wkssvc_NetrGetJoinInformation orig
;
3154 struct wkssvc_NetrGetJoinInformation tmp
;
3155 TALLOC_CTX
*out_mem_ctx
;
3156 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3159 static void rpccli_wkssvc_NetrGetJoinInformation_done(struct tevent_req
*subreq
);
3161 struct tevent_req
*rpccli_wkssvc_NetrGetJoinInformation_send(TALLOC_CTX
*mem_ctx
,
3162 struct tevent_context
*ev
,
3163 struct rpc_pipe_client
*cli
,
3164 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
3165 const char **_name_buffer
/* [in,out] [ref,charset(UTF16)] */,
3166 enum wkssvc_NetJoinStatus
*_name_type
/* [out] [ref] */)
3168 struct tevent_req
*req
;
3169 struct rpccli_wkssvc_NetrGetJoinInformation_state
*state
;
3170 struct tevent_req
*subreq
;
3172 req
= tevent_req_create(mem_ctx
, &state
,
3173 struct rpccli_wkssvc_NetrGetJoinInformation_state
);
3177 state
->out_mem_ctx
= NULL
;
3178 state
->dispatch_recv
= cli
->dispatch_recv
;
3181 state
->orig
.in
.server_name
= _server_name
;
3182 state
->orig
.in
.name_buffer
= _name_buffer
;
3184 /* Out parameters */
3185 state
->orig
.out
.name_buffer
= _name_buffer
;
3186 state
->orig
.out
.name_type
= _name_type
;
3189 ZERO_STRUCT(state
->orig
.out
.result
);
3191 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3192 "rpccli_wkssvc_NetrGetJoinInformation_out_memory");
3193 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3194 return tevent_req_post(req
, ev
);
3197 /* make a temporary copy, that we pass to the dispatch function */
3198 state
->tmp
= state
->orig
;
3200 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3202 NDR_WKSSVC_NETRGETJOININFORMATION
,
3204 if (tevent_req_nomem(subreq
, req
)) {
3205 return tevent_req_post(req
, ev
);
3207 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrGetJoinInformation_done
, req
);
3211 static void rpccli_wkssvc_NetrGetJoinInformation_done(struct tevent_req
*subreq
)
3213 struct tevent_req
*req
= tevent_req_callback_data(
3214 subreq
, struct tevent_req
);
3215 struct rpccli_wkssvc_NetrGetJoinInformation_state
*state
= tevent_req_data(
3216 req
, struct rpccli_wkssvc_NetrGetJoinInformation_state
);
3218 TALLOC_CTX
*mem_ctx
;
3220 if (state
->out_mem_ctx
) {
3221 mem_ctx
= state
->out_mem_ctx
;
3226 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3227 TALLOC_FREE(subreq
);
3228 if (!NT_STATUS_IS_OK(status
)) {
3229 tevent_req_nterror(req
, status
);
3233 /* Copy out parameters */
3234 *state
->orig
.out
.name_buffer
= *state
->tmp
.out
.name_buffer
;
3235 *state
->orig
.out
.name_type
= *state
->tmp
.out
.name_type
;
3238 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3240 /* Reset temporary structure */
3241 ZERO_STRUCT(state
->tmp
);
3243 tevent_req_done(req
);
3246 NTSTATUS
rpccli_wkssvc_NetrGetJoinInformation_recv(struct tevent_req
*req
,
3247 TALLOC_CTX
*mem_ctx
,
3250 struct rpccli_wkssvc_NetrGetJoinInformation_state
*state
= tevent_req_data(
3251 req
, struct rpccli_wkssvc_NetrGetJoinInformation_state
);
3254 if (tevent_req_is_nterror(req
, &status
)) {
3255 tevent_req_received(req
);
3259 /* Steal possbile out parameters to the callers context */
3260 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3263 *result
= state
->orig
.out
.result
;
3265 tevent_req_received(req
);
3266 return NT_STATUS_OK
;
3269 NTSTATUS
rpccli_wkssvc_NetrGetJoinInformation(struct rpc_pipe_client
*cli
,
3270 TALLOC_CTX
*mem_ctx
,
3271 const char *server_name
/* [in] [unique,charset(UTF16)] */,
3272 const char **name_buffer
/* [in,out] [ref,charset(UTF16)] */,
3273 enum wkssvc_NetJoinStatus
*name_type
/* [out] [ref] */,
3276 struct wkssvc_NetrGetJoinInformation r
;
3280 r
.in
.server_name
= server_name
;
3281 r
.in
.name_buffer
= name_buffer
;
3283 status
= cli
->dispatch(cli
,
3286 NDR_WKSSVC_NETRGETJOININFORMATION
,
3289 if (!NT_STATUS_IS_OK(status
)) {
3293 if (NT_STATUS_IS_ERR(status
)) {
3297 /* Return variables */
3298 *name_buffer
= *r
.out
.name_buffer
;
3299 *name_type
= *r
.out
.name_type
;
3303 *werror
= r
.out
.result
;
3306 return werror_to_ntstatus(r
.out
.result
);
3309 struct rpccli_wkssvc_NetrGetJoinableOus_state
{
3310 struct wkssvc_NetrGetJoinableOus orig
;
3311 struct wkssvc_NetrGetJoinableOus tmp
;
3312 TALLOC_CTX
*out_mem_ctx
;
3313 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3316 static void rpccli_wkssvc_NetrGetJoinableOus_done(struct tevent_req
*subreq
);
3318 struct tevent_req
*rpccli_wkssvc_NetrGetJoinableOus_send(TALLOC_CTX
*mem_ctx
,
3319 struct tevent_context
*ev
,
3320 struct rpc_pipe_client
*cli
,
3321 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
3322 const char *_domain_name
/* [in] [ref,charset(UTF16)] */,
3323 const char *_Account
/* [in] [unique,charset(UTF16)] */,
3324 const char *_unknown
/* [in] [unique,charset(UTF16)] */,
3325 uint32_t *_num_ous
/* [in,out] [ref] */,
3326 const char ***_ous
/* [out] [ref,charset(UTF16),size_is(,*num_ous)] */)
3328 struct tevent_req
*req
;
3329 struct rpccli_wkssvc_NetrGetJoinableOus_state
*state
;
3330 struct tevent_req
*subreq
;
3332 req
= tevent_req_create(mem_ctx
, &state
,
3333 struct rpccli_wkssvc_NetrGetJoinableOus_state
);
3337 state
->out_mem_ctx
= NULL
;
3338 state
->dispatch_recv
= cli
->dispatch_recv
;
3341 state
->orig
.in
.server_name
= _server_name
;
3342 state
->orig
.in
.domain_name
= _domain_name
;
3343 state
->orig
.in
.Account
= _Account
;
3344 state
->orig
.in
.unknown
= _unknown
;
3345 state
->orig
.in
.num_ous
= _num_ous
;
3347 /* Out parameters */
3348 state
->orig
.out
.num_ous
= _num_ous
;
3349 state
->orig
.out
.ous
= _ous
;
3352 ZERO_STRUCT(state
->orig
.out
.result
);
3354 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3355 "rpccli_wkssvc_NetrGetJoinableOus_out_memory");
3356 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3357 return tevent_req_post(req
, ev
);
3360 /* make a temporary copy, that we pass to the dispatch function */
3361 state
->tmp
= state
->orig
;
3363 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3365 NDR_WKSSVC_NETRGETJOINABLEOUS
,
3367 if (tevent_req_nomem(subreq
, req
)) {
3368 return tevent_req_post(req
, ev
);
3370 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrGetJoinableOus_done
, req
);
3374 static void rpccli_wkssvc_NetrGetJoinableOus_done(struct tevent_req
*subreq
)
3376 struct tevent_req
*req
= tevent_req_callback_data(
3377 subreq
, struct tevent_req
);
3378 struct rpccli_wkssvc_NetrGetJoinableOus_state
*state
= tevent_req_data(
3379 req
, struct rpccli_wkssvc_NetrGetJoinableOus_state
);
3381 TALLOC_CTX
*mem_ctx
;
3383 if (state
->out_mem_ctx
) {
3384 mem_ctx
= state
->out_mem_ctx
;
3389 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3390 TALLOC_FREE(subreq
);
3391 if (!NT_STATUS_IS_OK(status
)) {
3392 tevent_req_nterror(req
, status
);
3396 /* Copy out parameters */
3397 *state
->orig
.out
.num_ous
= *state
->tmp
.out
.num_ous
;
3398 *state
->orig
.out
.ous
= *state
->tmp
.out
.ous
;
3401 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3403 /* Reset temporary structure */
3404 ZERO_STRUCT(state
->tmp
);
3406 tevent_req_done(req
);
3409 NTSTATUS
rpccli_wkssvc_NetrGetJoinableOus_recv(struct tevent_req
*req
,
3410 TALLOC_CTX
*mem_ctx
,
3413 struct rpccli_wkssvc_NetrGetJoinableOus_state
*state
= tevent_req_data(
3414 req
, struct rpccli_wkssvc_NetrGetJoinableOus_state
);
3417 if (tevent_req_is_nterror(req
, &status
)) {
3418 tevent_req_received(req
);
3422 /* Steal possbile out parameters to the callers context */
3423 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3426 *result
= state
->orig
.out
.result
;
3428 tevent_req_received(req
);
3429 return NT_STATUS_OK
;
3432 NTSTATUS
rpccli_wkssvc_NetrGetJoinableOus(struct rpc_pipe_client
*cli
,
3433 TALLOC_CTX
*mem_ctx
,
3434 const char *server_name
/* [in] [unique,charset(UTF16)] */,
3435 const char *domain_name
/* [in] [ref,charset(UTF16)] */,
3436 const char *Account
/* [in] [unique,charset(UTF16)] */,
3437 const char *unknown
/* [in] [unique,charset(UTF16)] */,
3438 uint32_t *num_ous
/* [in,out] [ref] */,
3439 const char ***ous
/* [out] [ref,charset(UTF16),size_is(,*num_ous)] */,
3442 struct wkssvc_NetrGetJoinableOus r
;
3446 r
.in
.server_name
= server_name
;
3447 r
.in
.domain_name
= domain_name
;
3448 r
.in
.Account
= Account
;
3449 r
.in
.unknown
= unknown
;
3450 r
.in
.num_ous
= num_ous
;
3452 status
= cli
->dispatch(cli
,
3455 NDR_WKSSVC_NETRGETJOINABLEOUS
,
3458 if (!NT_STATUS_IS_OK(status
)) {
3462 if (NT_STATUS_IS_ERR(status
)) {
3466 /* Return variables */
3467 *num_ous
= *r
.out
.num_ous
;
3472 *werror
= r
.out
.result
;
3475 return werror_to_ntstatus(r
.out
.result
);
3478 struct rpccli_wkssvc_NetrJoinDomain2_state
{
3479 struct wkssvc_NetrJoinDomain2 orig
;
3480 struct wkssvc_NetrJoinDomain2 tmp
;
3481 TALLOC_CTX
*out_mem_ctx
;
3482 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3485 static void rpccli_wkssvc_NetrJoinDomain2_done(struct tevent_req
*subreq
);
3487 struct tevent_req
*rpccli_wkssvc_NetrJoinDomain2_send(TALLOC_CTX
*mem_ctx
,
3488 struct tevent_context
*ev
,
3489 struct rpc_pipe_client
*cli
,
3490 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
3491 const char *_domain_name
/* [in] [ref,charset(UTF16)] */,
3492 const char *_account_ou
/* [in] [unique,charset(UTF16)] */,
3493 const char *_admin_account
/* [in] [unique,charset(UTF16)] */,
3494 struct wkssvc_PasswordBuffer
*_encrypted_password
/* [in] [unique] */,
3495 uint32_t _join_flags
/* [in] */)
3497 struct tevent_req
*req
;
3498 struct rpccli_wkssvc_NetrJoinDomain2_state
*state
;
3499 struct tevent_req
*subreq
;
3501 req
= tevent_req_create(mem_ctx
, &state
,
3502 struct rpccli_wkssvc_NetrJoinDomain2_state
);
3506 state
->out_mem_ctx
= NULL
;
3507 state
->dispatch_recv
= cli
->dispatch_recv
;
3510 state
->orig
.in
.server_name
= _server_name
;
3511 state
->orig
.in
.domain_name
= _domain_name
;
3512 state
->orig
.in
.account_ou
= _account_ou
;
3513 state
->orig
.in
.admin_account
= _admin_account
;
3514 state
->orig
.in
.encrypted_password
= _encrypted_password
;
3515 state
->orig
.in
.join_flags
= _join_flags
;
3517 /* Out parameters */
3520 ZERO_STRUCT(state
->orig
.out
.result
);
3522 /* make a temporary copy, that we pass to the dispatch function */
3523 state
->tmp
= state
->orig
;
3525 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3527 NDR_WKSSVC_NETRJOINDOMAIN2
,
3529 if (tevent_req_nomem(subreq
, req
)) {
3530 return tevent_req_post(req
, ev
);
3532 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrJoinDomain2_done
, req
);
3536 static void rpccli_wkssvc_NetrJoinDomain2_done(struct tevent_req
*subreq
)
3538 struct tevent_req
*req
= tevent_req_callback_data(
3539 subreq
, struct tevent_req
);
3540 struct rpccli_wkssvc_NetrJoinDomain2_state
*state
= tevent_req_data(
3541 req
, struct rpccli_wkssvc_NetrJoinDomain2_state
);
3543 TALLOC_CTX
*mem_ctx
;
3545 if (state
->out_mem_ctx
) {
3546 mem_ctx
= state
->out_mem_ctx
;
3551 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3552 TALLOC_FREE(subreq
);
3553 if (!NT_STATUS_IS_OK(status
)) {
3554 tevent_req_nterror(req
, status
);
3558 /* Copy out parameters */
3561 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3563 /* Reset temporary structure */
3564 ZERO_STRUCT(state
->tmp
);
3566 tevent_req_done(req
);
3569 NTSTATUS
rpccli_wkssvc_NetrJoinDomain2_recv(struct tevent_req
*req
,
3570 TALLOC_CTX
*mem_ctx
,
3573 struct rpccli_wkssvc_NetrJoinDomain2_state
*state
= tevent_req_data(
3574 req
, struct rpccli_wkssvc_NetrJoinDomain2_state
);
3577 if (tevent_req_is_nterror(req
, &status
)) {
3578 tevent_req_received(req
);
3582 /* Steal possbile out parameters to the callers context */
3583 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3586 *result
= state
->orig
.out
.result
;
3588 tevent_req_received(req
);
3589 return NT_STATUS_OK
;
3592 NTSTATUS
rpccli_wkssvc_NetrJoinDomain2(struct rpc_pipe_client
*cli
,
3593 TALLOC_CTX
*mem_ctx
,
3594 const char *server_name
/* [in] [unique,charset(UTF16)] */,
3595 const char *domain_name
/* [in] [ref,charset(UTF16)] */,
3596 const char *account_ou
/* [in] [unique,charset(UTF16)] */,
3597 const char *admin_account
/* [in] [unique,charset(UTF16)] */,
3598 struct wkssvc_PasswordBuffer
*encrypted_password
/* [in] [unique] */,
3599 uint32_t join_flags
/* [in] */,
3602 struct wkssvc_NetrJoinDomain2 r
;
3606 r
.in
.server_name
= server_name
;
3607 r
.in
.domain_name
= domain_name
;
3608 r
.in
.account_ou
= account_ou
;
3609 r
.in
.admin_account
= admin_account
;
3610 r
.in
.encrypted_password
= encrypted_password
;
3611 r
.in
.join_flags
= join_flags
;
3613 status
= cli
->dispatch(cli
,
3616 NDR_WKSSVC_NETRJOINDOMAIN2
,
3619 if (!NT_STATUS_IS_OK(status
)) {
3623 if (NT_STATUS_IS_ERR(status
)) {
3627 /* Return variables */
3631 *werror
= r
.out
.result
;
3634 return werror_to_ntstatus(r
.out
.result
);
3637 struct rpccli_wkssvc_NetrUnjoinDomain2_state
{
3638 struct wkssvc_NetrUnjoinDomain2 orig
;
3639 struct wkssvc_NetrUnjoinDomain2 tmp
;
3640 TALLOC_CTX
*out_mem_ctx
;
3641 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3644 static void rpccli_wkssvc_NetrUnjoinDomain2_done(struct tevent_req
*subreq
);
3646 struct tevent_req
*rpccli_wkssvc_NetrUnjoinDomain2_send(TALLOC_CTX
*mem_ctx
,
3647 struct tevent_context
*ev
,
3648 struct rpc_pipe_client
*cli
,
3649 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
3650 const char *_account
/* [in] [unique,charset(UTF16)] */,
3651 struct wkssvc_PasswordBuffer
*_encrypted_password
/* [in] [unique] */,
3652 uint32_t _unjoin_flags
/* [in] */)
3654 struct tevent_req
*req
;
3655 struct rpccli_wkssvc_NetrUnjoinDomain2_state
*state
;
3656 struct tevent_req
*subreq
;
3658 req
= tevent_req_create(mem_ctx
, &state
,
3659 struct rpccli_wkssvc_NetrUnjoinDomain2_state
);
3663 state
->out_mem_ctx
= NULL
;
3664 state
->dispatch_recv
= cli
->dispatch_recv
;
3667 state
->orig
.in
.server_name
= _server_name
;
3668 state
->orig
.in
.account
= _account
;
3669 state
->orig
.in
.encrypted_password
= _encrypted_password
;
3670 state
->orig
.in
.unjoin_flags
= _unjoin_flags
;
3672 /* Out parameters */
3675 ZERO_STRUCT(state
->orig
.out
.result
);
3677 /* make a temporary copy, that we pass to the dispatch function */
3678 state
->tmp
= state
->orig
;
3680 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3682 NDR_WKSSVC_NETRUNJOINDOMAIN2
,
3684 if (tevent_req_nomem(subreq
, req
)) {
3685 return tevent_req_post(req
, ev
);
3687 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrUnjoinDomain2_done
, req
);
3691 static void rpccli_wkssvc_NetrUnjoinDomain2_done(struct tevent_req
*subreq
)
3693 struct tevent_req
*req
= tevent_req_callback_data(
3694 subreq
, struct tevent_req
);
3695 struct rpccli_wkssvc_NetrUnjoinDomain2_state
*state
= tevent_req_data(
3696 req
, struct rpccli_wkssvc_NetrUnjoinDomain2_state
);
3698 TALLOC_CTX
*mem_ctx
;
3700 if (state
->out_mem_ctx
) {
3701 mem_ctx
= state
->out_mem_ctx
;
3706 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3707 TALLOC_FREE(subreq
);
3708 if (!NT_STATUS_IS_OK(status
)) {
3709 tevent_req_nterror(req
, status
);
3713 /* Copy out parameters */
3716 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3718 /* Reset temporary structure */
3719 ZERO_STRUCT(state
->tmp
);
3721 tevent_req_done(req
);
3724 NTSTATUS
rpccli_wkssvc_NetrUnjoinDomain2_recv(struct tevent_req
*req
,
3725 TALLOC_CTX
*mem_ctx
,
3728 struct rpccli_wkssvc_NetrUnjoinDomain2_state
*state
= tevent_req_data(
3729 req
, struct rpccli_wkssvc_NetrUnjoinDomain2_state
);
3732 if (tevent_req_is_nterror(req
, &status
)) {
3733 tevent_req_received(req
);
3737 /* Steal possbile out parameters to the callers context */
3738 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3741 *result
= state
->orig
.out
.result
;
3743 tevent_req_received(req
);
3744 return NT_STATUS_OK
;
3747 NTSTATUS
rpccli_wkssvc_NetrUnjoinDomain2(struct rpc_pipe_client
*cli
,
3748 TALLOC_CTX
*mem_ctx
,
3749 const char *server_name
/* [in] [unique,charset(UTF16)] */,
3750 const char *account
/* [in] [unique,charset(UTF16)] */,
3751 struct wkssvc_PasswordBuffer
*encrypted_password
/* [in] [unique] */,
3752 uint32_t unjoin_flags
/* [in] */,
3755 struct wkssvc_NetrUnjoinDomain2 r
;
3759 r
.in
.server_name
= server_name
;
3760 r
.in
.account
= account
;
3761 r
.in
.encrypted_password
= encrypted_password
;
3762 r
.in
.unjoin_flags
= unjoin_flags
;
3764 status
= cli
->dispatch(cli
,
3767 NDR_WKSSVC_NETRUNJOINDOMAIN2
,
3770 if (!NT_STATUS_IS_OK(status
)) {
3774 if (NT_STATUS_IS_ERR(status
)) {
3778 /* Return variables */
3782 *werror
= r
.out
.result
;
3785 return werror_to_ntstatus(r
.out
.result
);
3788 struct rpccli_wkssvc_NetrRenameMachineInDomain2_state
{
3789 struct wkssvc_NetrRenameMachineInDomain2 orig
;
3790 struct wkssvc_NetrRenameMachineInDomain2 tmp
;
3791 TALLOC_CTX
*out_mem_ctx
;
3792 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3795 static void rpccli_wkssvc_NetrRenameMachineInDomain2_done(struct tevent_req
*subreq
);
3797 struct tevent_req
*rpccli_wkssvc_NetrRenameMachineInDomain2_send(TALLOC_CTX
*mem_ctx
,
3798 struct tevent_context
*ev
,
3799 struct rpc_pipe_client
*cli
,
3800 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
3801 const char *_NewMachineName
/* [in] [unique,charset(UTF16)] */,
3802 const char *_Account
/* [in] [unique,charset(UTF16)] */,
3803 struct wkssvc_PasswordBuffer
*_EncryptedPassword
/* [in] [unique] */,
3804 uint32_t _RenameOptions
/* [in] */)
3806 struct tevent_req
*req
;
3807 struct rpccli_wkssvc_NetrRenameMachineInDomain2_state
*state
;
3808 struct tevent_req
*subreq
;
3810 req
= tevent_req_create(mem_ctx
, &state
,
3811 struct rpccli_wkssvc_NetrRenameMachineInDomain2_state
);
3815 state
->out_mem_ctx
= NULL
;
3816 state
->dispatch_recv
= cli
->dispatch_recv
;
3819 state
->orig
.in
.server_name
= _server_name
;
3820 state
->orig
.in
.NewMachineName
= _NewMachineName
;
3821 state
->orig
.in
.Account
= _Account
;
3822 state
->orig
.in
.EncryptedPassword
= _EncryptedPassword
;
3823 state
->orig
.in
.RenameOptions
= _RenameOptions
;
3825 /* Out parameters */
3828 ZERO_STRUCT(state
->orig
.out
.result
);
3830 /* make a temporary copy, that we pass to the dispatch function */
3831 state
->tmp
= state
->orig
;
3833 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3835 NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2
,
3837 if (tevent_req_nomem(subreq
, req
)) {
3838 return tevent_req_post(req
, ev
);
3840 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrRenameMachineInDomain2_done
, req
);
3844 static void rpccli_wkssvc_NetrRenameMachineInDomain2_done(struct tevent_req
*subreq
)
3846 struct tevent_req
*req
= tevent_req_callback_data(
3847 subreq
, struct tevent_req
);
3848 struct rpccli_wkssvc_NetrRenameMachineInDomain2_state
*state
= tevent_req_data(
3849 req
, struct rpccli_wkssvc_NetrRenameMachineInDomain2_state
);
3851 TALLOC_CTX
*mem_ctx
;
3853 if (state
->out_mem_ctx
) {
3854 mem_ctx
= state
->out_mem_ctx
;
3859 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3860 TALLOC_FREE(subreq
);
3861 if (!NT_STATUS_IS_OK(status
)) {
3862 tevent_req_nterror(req
, status
);
3866 /* Copy out parameters */
3869 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3871 /* Reset temporary structure */
3872 ZERO_STRUCT(state
->tmp
);
3874 tevent_req_done(req
);
3877 NTSTATUS
rpccli_wkssvc_NetrRenameMachineInDomain2_recv(struct tevent_req
*req
,
3878 TALLOC_CTX
*mem_ctx
,
3881 struct rpccli_wkssvc_NetrRenameMachineInDomain2_state
*state
= tevent_req_data(
3882 req
, struct rpccli_wkssvc_NetrRenameMachineInDomain2_state
);
3885 if (tevent_req_is_nterror(req
, &status
)) {
3886 tevent_req_received(req
);
3890 /* Steal possbile out parameters to the callers context */
3891 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3894 *result
= state
->orig
.out
.result
;
3896 tevent_req_received(req
);
3897 return NT_STATUS_OK
;
3900 NTSTATUS
rpccli_wkssvc_NetrRenameMachineInDomain2(struct rpc_pipe_client
*cli
,
3901 TALLOC_CTX
*mem_ctx
,
3902 const char *server_name
/* [in] [unique,charset(UTF16)] */,
3903 const char *NewMachineName
/* [in] [unique,charset(UTF16)] */,
3904 const char *Account
/* [in] [unique,charset(UTF16)] */,
3905 struct wkssvc_PasswordBuffer
*EncryptedPassword
/* [in] [unique] */,
3906 uint32_t RenameOptions
/* [in] */,
3909 struct wkssvc_NetrRenameMachineInDomain2 r
;
3913 r
.in
.server_name
= server_name
;
3914 r
.in
.NewMachineName
= NewMachineName
;
3915 r
.in
.Account
= Account
;
3916 r
.in
.EncryptedPassword
= EncryptedPassword
;
3917 r
.in
.RenameOptions
= RenameOptions
;
3919 status
= cli
->dispatch(cli
,
3922 NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2
,
3925 if (!NT_STATUS_IS_OK(status
)) {
3929 if (NT_STATUS_IS_ERR(status
)) {
3933 /* Return variables */
3937 *werror
= r
.out
.result
;
3940 return werror_to_ntstatus(r
.out
.result
);
3943 struct rpccli_wkssvc_NetrValidateName2_state
{
3944 struct wkssvc_NetrValidateName2 orig
;
3945 struct wkssvc_NetrValidateName2 tmp
;
3946 TALLOC_CTX
*out_mem_ctx
;
3947 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3950 static void rpccli_wkssvc_NetrValidateName2_done(struct tevent_req
*subreq
);
3952 struct tevent_req
*rpccli_wkssvc_NetrValidateName2_send(TALLOC_CTX
*mem_ctx
,
3953 struct tevent_context
*ev
,
3954 struct rpc_pipe_client
*cli
,
3955 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
3956 const char *_name
/* [in] [ref,charset(UTF16)] */,
3957 const char *_Account
/* [in] [unique,charset(UTF16)] */,
3958 struct wkssvc_PasswordBuffer
*_EncryptedPassword
/* [in] [unique] */,
3959 enum wkssvc_NetValidateNameType _name_type
/* [in] */)
3961 struct tevent_req
*req
;
3962 struct rpccli_wkssvc_NetrValidateName2_state
*state
;
3963 struct tevent_req
*subreq
;
3965 req
= tevent_req_create(mem_ctx
, &state
,
3966 struct rpccli_wkssvc_NetrValidateName2_state
);
3970 state
->out_mem_ctx
= NULL
;
3971 state
->dispatch_recv
= cli
->dispatch_recv
;
3974 state
->orig
.in
.server_name
= _server_name
;
3975 state
->orig
.in
.name
= _name
;
3976 state
->orig
.in
.Account
= _Account
;
3977 state
->orig
.in
.EncryptedPassword
= _EncryptedPassword
;
3978 state
->orig
.in
.name_type
= _name_type
;
3980 /* Out parameters */
3983 ZERO_STRUCT(state
->orig
.out
.result
);
3985 /* make a temporary copy, that we pass to the dispatch function */
3986 state
->tmp
= state
->orig
;
3988 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3990 NDR_WKSSVC_NETRVALIDATENAME2
,
3992 if (tevent_req_nomem(subreq
, req
)) {
3993 return tevent_req_post(req
, ev
);
3995 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrValidateName2_done
, req
);
3999 static void rpccli_wkssvc_NetrValidateName2_done(struct tevent_req
*subreq
)
4001 struct tevent_req
*req
= tevent_req_callback_data(
4002 subreq
, struct tevent_req
);
4003 struct rpccli_wkssvc_NetrValidateName2_state
*state
= tevent_req_data(
4004 req
, struct rpccli_wkssvc_NetrValidateName2_state
);
4006 TALLOC_CTX
*mem_ctx
;
4008 if (state
->out_mem_ctx
) {
4009 mem_ctx
= state
->out_mem_ctx
;
4014 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4015 TALLOC_FREE(subreq
);
4016 if (!NT_STATUS_IS_OK(status
)) {
4017 tevent_req_nterror(req
, status
);
4021 /* Copy out parameters */
4024 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4026 /* Reset temporary structure */
4027 ZERO_STRUCT(state
->tmp
);
4029 tevent_req_done(req
);
4032 NTSTATUS
rpccli_wkssvc_NetrValidateName2_recv(struct tevent_req
*req
,
4033 TALLOC_CTX
*mem_ctx
,
4036 struct rpccli_wkssvc_NetrValidateName2_state
*state
= tevent_req_data(
4037 req
, struct rpccli_wkssvc_NetrValidateName2_state
);
4040 if (tevent_req_is_nterror(req
, &status
)) {
4041 tevent_req_received(req
);
4045 /* Steal possbile out parameters to the callers context */
4046 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4049 *result
= state
->orig
.out
.result
;
4051 tevent_req_received(req
);
4052 return NT_STATUS_OK
;
4055 NTSTATUS
rpccli_wkssvc_NetrValidateName2(struct rpc_pipe_client
*cli
,
4056 TALLOC_CTX
*mem_ctx
,
4057 const char *server_name
/* [in] [unique,charset(UTF16)] */,
4058 const char *name
/* [in] [ref,charset(UTF16)] */,
4059 const char *Account
/* [in] [unique,charset(UTF16)] */,
4060 struct wkssvc_PasswordBuffer
*EncryptedPassword
/* [in] [unique] */,
4061 enum wkssvc_NetValidateNameType name_type
/* [in] */,
4064 struct wkssvc_NetrValidateName2 r
;
4068 r
.in
.server_name
= server_name
;
4070 r
.in
.Account
= Account
;
4071 r
.in
.EncryptedPassword
= EncryptedPassword
;
4072 r
.in
.name_type
= name_type
;
4074 status
= cli
->dispatch(cli
,
4077 NDR_WKSSVC_NETRVALIDATENAME2
,
4080 if (!NT_STATUS_IS_OK(status
)) {
4084 if (NT_STATUS_IS_ERR(status
)) {
4088 /* Return variables */
4092 *werror
= r
.out
.result
;
4095 return werror_to_ntstatus(r
.out
.result
);
4098 struct rpccli_wkssvc_NetrGetJoinableOus2_state
{
4099 struct wkssvc_NetrGetJoinableOus2 orig
;
4100 struct wkssvc_NetrGetJoinableOus2 tmp
;
4101 TALLOC_CTX
*out_mem_ctx
;
4102 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4105 static void rpccli_wkssvc_NetrGetJoinableOus2_done(struct tevent_req
*subreq
);
4107 struct tevent_req
*rpccli_wkssvc_NetrGetJoinableOus2_send(TALLOC_CTX
*mem_ctx
,
4108 struct tevent_context
*ev
,
4109 struct rpc_pipe_client
*cli
,
4110 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
4111 const char *_domain_name
/* [in] [ref,charset(UTF16)] */,
4112 const char *_Account
/* [in] [unique,charset(UTF16)] */,
4113 struct wkssvc_PasswordBuffer
*_EncryptedPassword
/* [in] [unique] */,
4114 uint32_t *_num_ous
/* [in,out] [ref] */,
4115 const char ***_ous
/* [out] [ref,charset(UTF16),size_is(,*num_ous)] */)
4117 struct tevent_req
*req
;
4118 struct rpccli_wkssvc_NetrGetJoinableOus2_state
*state
;
4119 struct tevent_req
*subreq
;
4121 req
= tevent_req_create(mem_ctx
, &state
,
4122 struct rpccli_wkssvc_NetrGetJoinableOus2_state
);
4126 state
->out_mem_ctx
= NULL
;
4127 state
->dispatch_recv
= cli
->dispatch_recv
;
4130 state
->orig
.in
.server_name
= _server_name
;
4131 state
->orig
.in
.domain_name
= _domain_name
;
4132 state
->orig
.in
.Account
= _Account
;
4133 state
->orig
.in
.EncryptedPassword
= _EncryptedPassword
;
4134 state
->orig
.in
.num_ous
= _num_ous
;
4136 /* Out parameters */
4137 state
->orig
.out
.num_ous
= _num_ous
;
4138 state
->orig
.out
.ous
= _ous
;
4141 ZERO_STRUCT(state
->orig
.out
.result
);
4143 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4144 "rpccli_wkssvc_NetrGetJoinableOus2_out_memory");
4145 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4146 return tevent_req_post(req
, ev
);
4149 /* make a temporary copy, that we pass to the dispatch function */
4150 state
->tmp
= state
->orig
;
4152 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4154 NDR_WKSSVC_NETRGETJOINABLEOUS2
,
4156 if (tevent_req_nomem(subreq
, req
)) {
4157 return tevent_req_post(req
, ev
);
4159 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrGetJoinableOus2_done
, req
);
4163 static void rpccli_wkssvc_NetrGetJoinableOus2_done(struct tevent_req
*subreq
)
4165 struct tevent_req
*req
= tevent_req_callback_data(
4166 subreq
, struct tevent_req
);
4167 struct rpccli_wkssvc_NetrGetJoinableOus2_state
*state
= tevent_req_data(
4168 req
, struct rpccli_wkssvc_NetrGetJoinableOus2_state
);
4170 TALLOC_CTX
*mem_ctx
;
4172 if (state
->out_mem_ctx
) {
4173 mem_ctx
= state
->out_mem_ctx
;
4178 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4179 TALLOC_FREE(subreq
);
4180 if (!NT_STATUS_IS_OK(status
)) {
4181 tevent_req_nterror(req
, status
);
4185 /* Copy out parameters */
4186 *state
->orig
.out
.num_ous
= *state
->tmp
.out
.num_ous
;
4187 *state
->orig
.out
.ous
= *state
->tmp
.out
.ous
;
4190 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4192 /* Reset temporary structure */
4193 ZERO_STRUCT(state
->tmp
);
4195 tevent_req_done(req
);
4198 NTSTATUS
rpccli_wkssvc_NetrGetJoinableOus2_recv(struct tevent_req
*req
,
4199 TALLOC_CTX
*mem_ctx
,
4202 struct rpccli_wkssvc_NetrGetJoinableOus2_state
*state
= tevent_req_data(
4203 req
, struct rpccli_wkssvc_NetrGetJoinableOus2_state
);
4206 if (tevent_req_is_nterror(req
, &status
)) {
4207 tevent_req_received(req
);
4211 /* Steal possbile out parameters to the callers context */
4212 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4215 *result
= state
->orig
.out
.result
;
4217 tevent_req_received(req
);
4218 return NT_STATUS_OK
;
4221 NTSTATUS
rpccli_wkssvc_NetrGetJoinableOus2(struct rpc_pipe_client
*cli
,
4222 TALLOC_CTX
*mem_ctx
,
4223 const char *server_name
/* [in] [unique,charset(UTF16)] */,
4224 const char *domain_name
/* [in] [ref,charset(UTF16)] */,
4225 const char *Account
/* [in] [unique,charset(UTF16)] */,
4226 struct wkssvc_PasswordBuffer
*EncryptedPassword
/* [in] [unique] */,
4227 uint32_t *num_ous
/* [in,out] [ref] */,
4228 const char ***ous
/* [out] [ref,charset(UTF16),size_is(,*num_ous)] */,
4231 struct wkssvc_NetrGetJoinableOus2 r
;
4235 r
.in
.server_name
= server_name
;
4236 r
.in
.domain_name
= domain_name
;
4237 r
.in
.Account
= Account
;
4238 r
.in
.EncryptedPassword
= EncryptedPassword
;
4239 r
.in
.num_ous
= num_ous
;
4241 status
= cli
->dispatch(cli
,
4244 NDR_WKSSVC_NETRGETJOINABLEOUS2
,
4247 if (!NT_STATUS_IS_OK(status
)) {
4251 if (NT_STATUS_IS_ERR(status
)) {
4255 /* Return variables */
4256 *num_ous
= *r
.out
.num_ous
;
4261 *werror
= r
.out
.result
;
4264 return werror_to_ntstatus(r
.out
.result
);
4267 struct rpccli_wkssvc_NetrAddAlternateComputerName_state
{
4268 struct wkssvc_NetrAddAlternateComputerName orig
;
4269 struct wkssvc_NetrAddAlternateComputerName tmp
;
4270 TALLOC_CTX
*out_mem_ctx
;
4271 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4274 static void rpccli_wkssvc_NetrAddAlternateComputerName_done(struct tevent_req
*subreq
);
4276 struct tevent_req
*rpccli_wkssvc_NetrAddAlternateComputerName_send(TALLOC_CTX
*mem_ctx
,
4277 struct tevent_context
*ev
,
4278 struct rpc_pipe_client
*cli
,
4279 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
4280 const char *_NewAlternateMachineName
/* [in] [unique,charset(UTF16)] */,
4281 const char *_Account
/* [in] [unique,charset(UTF16)] */,
4282 struct wkssvc_PasswordBuffer
*_EncryptedPassword
/* [in] [unique] */,
4283 uint32_t _Reserved
/* [in] */)
4285 struct tevent_req
*req
;
4286 struct rpccli_wkssvc_NetrAddAlternateComputerName_state
*state
;
4287 struct tevent_req
*subreq
;
4289 req
= tevent_req_create(mem_ctx
, &state
,
4290 struct rpccli_wkssvc_NetrAddAlternateComputerName_state
);
4294 state
->out_mem_ctx
= NULL
;
4295 state
->dispatch_recv
= cli
->dispatch_recv
;
4298 state
->orig
.in
.server_name
= _server_name
;
4299 state
->orig
.in
.NewAlternateMachineName
= _NewAlternateMachineName
;
4300 state
->orig
.in
.Account
= _Account
;
4301 state
->orig
.in
.EncryptedPassword
= _EncryptedPassword
;
4302 state
->orig
.in
.Reserved
= _Reserved
;
4304 /* Out parameters */
4307 ZERO_STRUCT(state
->orig
.out
.result
);
4309 /* make a temporary copy, that we pass to the dispatch function */
4310 state
->tmp
= state
->orig
;
4312 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4314 NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME
,
4316 if (tevent_req_nomem(subreq
, req
)) {
4317 return tevent_req_post(req
, ev
);
4319 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrAddAlternateComputerName_done
, req
);
4323 static void rpccli_wkssvc_NetrAddAlternateComputerName_done(struct tevent_req
*subreq
)
4325 struct tevent_req
*req
= tevent_req_callback_data(
4326 subreq
, struct tevent_req
);
4327 struct rpccli_wkssvc_NetrAddAlternateComputerName_state
*state
= tevent_req_data(
4328 req
, struct rpccli_wkssvc_NetrAddAlternateComputerName_state
);
4330 TALLOC_CTX
*mem_ctx
;
4332 if (state
->out_mem_ctx
) {
4333 mem_ctx
= state
->out_mem_ctx
;
4338 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4339 TALLOC_FREE(subreq
);
4340 if (!NT_STATUS_IS_OK(status
)) {
4341 tevent_req_nterror(req
, status
);
4345 /* Copy out parameters */
4348 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4350 /* Reset temporary structure */
4351 ZERO_STRUCT(state
->tmp
);
4353 tevent_req_done(req
);
4356 NTSTATUS
rpccli_wkssvc_NetrAddAlternateComputerName_recv(struct tevent_req
*req
,
4357 TALLOC_CTX
*mem_ctx
,
4360 struct rpccli_wkssvc_NetrAddAlternateComputerName_state
*state
= tevent_req_data(
4361 req
, struct rpccli_wkssvc_NetrAddAlternateComputerName_state
);
4364 if (tevent_req_is_nterror(req
, &status
)) {
4365 tevent_req_received(req
);
4369 /* Steal possbile out parameters to the callers context */
4370 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4373 *result
= state
->orig
.out
.result
;
4375 tevent_req_received(req
);
4376 return NT_STATUS_OK
;
4379 NTSTATUS
rpccli_wkssvc_NetrAddAlternateComputerName(struct rpc_pipe_client
*cli
,
4380 TALLOC_CTX
*mem_ctx
,
4381 const char *server_name
/* [in] [unique,charset(UTF16)] */,
4382 const char *NewAlternateMachineName
/* [in] [unique,charset(UTF16)] */,
4383 const char *Account
/* [in] [unique,charset(UTF16)] */,
4384 struct wkssvc_PasswordBuffer
*EncryptedPassword
/* [in] [unique] */,
4385 uint32_t Reserved
/* [in] */,
4388 struct wkssvc_NetrAddAlternateComputerName r
;
4392 r
.in
.server_name
= server_name
;
4393 r
.in
.NewAlternateMachineName
= NewAlternateMachineName
;
4394 r
.in
.Account
= Account
;
4395 r
.in
.EncryptedPassword
= EncryptedPassword
;
4396 r
.in
.Reserved
= Reserved
;
4398 status
= cli
->dispatch(cli
,
4401 NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME
,
4404 if (!NT_STATUS_IS_OK(status
)) {
4408 if (NT_STATUS_IS_ERR(status
)) {
4412 /* Return variables */
4416 *werror
= r
.out
.result
;
4419 return werror_to_ntstatus(r
.out
.result
);
4422 struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state
{
4423 struct wkssvc_NetrRemoveAlternateComputerName orig
;
4424 struct wkssvc_NetrRemoveAlternateComputerName tmp
;
4425 TALLOC_CTX
*out_mem_ctx
;
4426 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4429 static void rpccli_wkssvc_NetrRemoveAlternateComputerName_done(struct tevent_req
*subreq
);
4431 struct tevent_req
*rpccli_wkssvc_NetrRemoveAlternateComputerName_send(TALLOC_CTX
*mem_ctx
,
4432 struct tevent_context
*ev
,
4433 struct rpc_pipe_client
*cli
,
4434 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
4435 const char *_AlternateMachineNameToRemove
/* [in] [unique,charset(UTF16)] */,
4436 const char *_Account
/* [in] [unique,charset(UTF16)] */,
4437 struct wkssvc_PasswordBuffer
*_EncryptedPassword
/* [in] [unique] */,
4438 uint32_t _Reserved
/* [in] */)
4440 struct tevent_req
*req
;
4441 struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state
*state
;
4442 struct tevent_req
*subreq
;
4444 req
= tevent_req_create(mem_ctx
, &state
,
4445 struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state
);
4449 state
->out_mem_ctx
= NULL
;
4450 state
->dispatch_recv
= cli
->dispatch_recv
;
4453 state
->orig
.in
.server_name
= _server_name
;
4454 state
->orig
.in
.AlternateMachineNameToRemove
= _AlternateMachineNameToRemove
;
4455 state
->orig
.in
.Account
= _Account
;
4456 state
->orig
.in
.EncryptedPassword
= _EncryptedPassword
;
4457 state
->orig
.in
.Reserved
= _Reserved
;
4459 /* Out parameters */
4462 ZERO_STRUCT(state
->orig
.out
.result
);
4464 /* make a temporary copy, that we pass to the dispatch function */
4465 state
->tmp
= state
->orig
;
4467 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4469 NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME
,
4471 if (tevent_req_nomem(subreq
, req
)) {
4472 return tevent_req_post(req
, ev
);
4474 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrRemoveAlternateComputerName_done
, req
);
4478 static void rpccli_wkssvc_NetrRemoveAlternateComputerName_done(struct tevent_req
*subreq
)
4480 struct tevent_req
*req
= tevent_req_callback_data(
4481 subreq
, struct tevent_req
);
4482 struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state
*state
= tevent_req_data(
4483 req
, struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state
);
4485 TALLOC_CTX
*mem_ctx
;
4487 if (state
->out_mem_ctx
) {
4488 mem_ctx
= state
->out_mem_ctx
;
4493 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4494 TALLOC_FREE(subreq
);
4495 if (!NT_STATUS_IS_OK(status
)) {
4496 tevent_req_nterror(req
, status
);
4500 /* Copy out parameters */
4503 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4505 /* Reset temporary structure */
4506 ZERO_STRUCT(state
->tmp
);
4508 tevent_req_done(req
);
4511 NTSTATUS
rpccli_wkssvc_NetrRemoveAlternateComputerName_recv(struct tevent_req
*req
,
4512 TALLOC_CTX
*mem_ctx
,
4515 struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state
*state
= tevent_req_data(
4516 req
, struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state
);
4519 if (tevent_req_is_nterror(req
, &status
)) {
4520 tevent_req_received(req
);
4524 /* Steal possbile out parameters to the callers context */
4525 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4528 *result
= state
->orig
.out
.result
;
4530 tevent_req_received(req
);
4531 return NT_STATUS_OK
;
4534 NTSTATUS
rpccli_wkssvc_NetrRemoveAlternateComputerName(struct rpc_pipe_client
*cli
,
4535 TALLOC_CTX
*mem_ctx
,
4536 const char *server_name
/* [in] [unique,charset(UTF16)] */,
4537 const char *AlternateMachineNameToRemove
/* [in] [unique,charset(UTF16)] */,
4538 const char *Account
/* [in] [unique,charset(UTF16)] */,
4539 struct wkssvc_PasswordBuffer
*EncryptedPassword
/* [in] [unique] */,
4540 uint32_t Reserved
/* [in] */,
4543 struct wkssvc_NetrRemoveAlternateComputerName r
;
4547 r
.in
.server_name
= server_name
;
4548 r
.in
.AlternateMachineNameToRemove
= AlternateMachineNameToRemove
;
4549 r
.in
.Account
= Account
;
4550 r
.in
.EncryptedPassword
= EncryptedPassword
;
4551 r
.in
.Reserved
= Reserved
;
4553 status
= cli
->dispatch(cli
,
4556 NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME
,
4559 if (!NT_STATUS_IS_OK(status
)) {
4563 if (NT_STATUS_IS_ERR(status
)) {
4567 /* Return variables */
4571 *werror
= r
.out
.result
;
4574 return werror_to_ntstatus(r
.out
.result
);
4577 struct rpccli_wkssvc_NetrSetPrimaryComputername_state
{
4578 struct wkssvc_NetrSetPrimaryComputername orig
;
4579 struct wkssvc_NetrSetPrimaryComputername tmp
;
4580 TALLOC_CTX
*out_mem_ctx
;
4581 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4584 static void rpccli_wkssvc_NetrSetPrimaryComputername_done(struct tevent_req
*subreq
);
4586 struct tevent_req
*rpccli_wkssvc_NetrSetPrimaryComputername_send(TALLOC_CTX
*mem_ctx
,
4587 struct tevent_context
*ev
,
4588 struct rpc_pipe_client
*cli
,
4589 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
4590 const char *_primary_name
/* [in] [unique,charset(UTF16)] */,
4591 const char *_Account
/* [in] [unique,charset(UTF16)] */,
4592 struct wkssvc_PasswordBuffer
*_EncryptedPassword
/* [in] [unique] */,
4593 uint32_t _Reserved
/* [in] */)
4595 struct tevent_req
*req
;
4596 struct rpccli_wkssvc_NetrSetPrimaryComputername_state
*state
;
4597 struct tevent_req
*subreq
;
4599 req
= tevent_req_create(mem_ctx
, &state
,
4600 struct rpccli_wkssvc_NetrSetPrimaryComputername_state
);
4604 state
->out_mem_ctx
= NULL
;
4605 state
->dispatch_recv
= cli
->dispatch_recv
;
4608 state
->orig
.in
.server_name
= _server_name
;
4609 state
->orig
.in
.primary_name
= _primary_name
;
4610 state
->orig
.in
.Account
= _Account
;
4611 state
->orig
.in
.EncryptedPassword
= _EncryptedPassword
;
4612 state
->orig
.in
.Reserved
= _Reserved
;
4614 /* Out parameters */
4617 ZERO_STRUCT(state
->orig
.out
.result
);
4619 /* make a temporary copy, that we pass to the dispatch function */
4620 state
->tmp
= state
->orig
;
4622 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4624 NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME
,
4626 if (tevent_req_nomem(subreq
, req
)) {
4627 return tevent_req_post(req
, ev
);
4629 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrSetPrimaryComputername_done
, req
);
4633 static void rpccli_wkssvc_NetrSetPrimaryComputername_done(struct tevent_req
*subreq
)
4635 struct tevent_req
*req
= tevent_req_callback_data(
4636 subreq
, struct tevent_req
);
4637 struct rpccli_wkssvc_NetrSetPrimaryComputername_state
*state
= tevent_req_data(
4638 req
, struct rpccli_wkssvc_NetrSetPrimaryComputername_state
);
4640 TALLOC_CTX
*mem_ctx
;
4642 if (state
->out_mem_ctx
) {
4643 mem_ctx
= state
->out_mem_ctx
;
4648 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4649 TALLOC_FREE(subreq
);
4650 if (!NT_STATUS_IS_OK(status
)) {
4651 tevent_req_nterror(req
, status
);
4655 /* Copy out parameters */
4658 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4660 /* Reset temporary structure */
4661 ZERO_STRUCT(state
->tmp
);
4663 tevent_req_done(req
);
4666 NTSTATUS
rpccli_wkssvc_NetrSetPrimaryComputername_recv(struct tevent_req
*req
,
4667 TALLOC_CTX
*mem_ctx
,
4670 struct rpccli_wkssvc_NetrSetPrimaryComputername_state
*state
= tevent_req_data(
4671 req
, struct rpccli_wkssvc_NetrSetPrimaryComputername_state
);
4674 if (tevent_req_is_nterror(req
, &status
)) {
4675 tevent_req_received(req
);
4679 /* Steal possbile out parameters to the callers context */
4680 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4683 *result
= state
->orig
.out
.result
;
4685 tevent_req_received(req
);
4686 return NT_STATUS_OK
;
4689 NTSTATUS
rpccli_wkssvc_NetrSetPrimaryComputername(struct rpc_pipe_client
*cli
,
4690 TALLOC_CTX
*mem_ctx
,
4691 const char *server_name
/* [in] [unique,charset(UTF16)] */,
4692 const char *primary_name
/* [in] [unique,charset(UTF16)] */,
4693 const char *Account
/* [in] [unique,charset(UTF16)] */,
4694 struct wkssvc_PasswordBuffer
*EncryptedPassword
/* [in] [unique] */,
4695 uint32_t Reserved
/* [in] */,
4698 struct wkssvc_NetrSetPrimaryComputername r
;
4702 r
.in
.server_name
= server_name
;
4703 r
.in
.primary_name
= primary_name
;
4704 r
.in
.Account
= Account
;
4705 r
.in
.EncryptedPassword
= EncryptedPassword
;
4706 r
.in
.Reserved
= Reserved
;
4708 status
= cli
->dispatch(cli
,
4711 NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME
,
4714 if (!NT_STATUS_IS_OK(status
)) {
4718 if (NT_STATUS_IS_ERR(status
)) {
4722 /* Return variables */
4726 *werror
= r
.out
.result
;
4729 return werror_to_ntstatus(r
.out
.result
);
4732 struct rpccli_wkssvc_NetrEnumerateComputerNames_state
{
4733 struct wkssvc_NetrEnumerateComputerNames orig
;
4734 struct wkssvc_NetrEnumerateComputerNames tmp
;
4735 TALLOC_CTX
*out_mem_ctx
;
4736 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4739 static void rpccli_wkssvc_NetrEnumerateComputerNames_done(struct tevent_req
*subreq
);
4741 struct tevent_req
*rpccli_wkssvc_NetrEnumerateComputerNames_send(TALLOC_CTX
*mem_ctx
,
4742 struct tevent_context
*ev
,
4743 struct rpc_pipe_client
*cli
,
4744 const char *_server_name
/* [in] [unique,charset(UTF16)] */,
4745 enum wkssvc_ComputerNameType _name_type
/* [in] */,
4746 uint32_t _Reserved
/* [in] */,
4747 struct wkssvc_ComputerNamesCtr
**_ctr
/* [out] [ref] */)
4749 struct tevent_req
*req
;
4750 struct rpccli_wkssvc_NetrEnumerateComputerNames_state
*state
;
4751 struct tevent_req
*subreq
;
4753 req
= tevent_req_create(mem_ctx
, &state
,
4754 struct rpccli_wkssvc_NetrEnumerateComputerNames_state
);
4758 state
->out_mem_ctx
= NULL
;
4759 state
->dispatch_recv
= cli
->dispatch_recv
;
4762 state
->orig
.in
.server_name
= _server_name
;
4763 state
->orig
.in
.name_type
= _name_type
;
4764 state
->orig
.in
.Reserved
= _Reserved
;
4766 /* Out parameters */
4767 state
->orig
.out
.ctr
= _ctr
;
4770 ZERO_STRUCT(state
->orig
.out
.result
);
4772 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4773 "rpccli_wkssvc_NetrEnumerateComputerNames_out_memory");
4774 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4775 return tevent_req_post(req
, ev
);
4778 /* make a temporary copy, that we pass to the dispatch function */
4779 state
->tmp
= state
->orig
;
4781 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4783 NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES
,
4785 if (tevent_req_nomem(subreq
, req
)) {
4786 return tevent_req_post(req
, ev
);
4788 tevent_req_set_callback(subreq
, rpccli_wkssvc_NetrEnumerateComputerNames_done
, req
);
4792 static void rpccli_wkssvc_NetrEnumerateComputerNames_done(struct tevent_req
*subreq
)
4794 struct tevent_req
*req
= tevent_req_callback_data(
4795 subreq
, struct tevent_req
);
4796 struct rpccli_wkssvc_NetrEnumerateComputerNames_state
*state
= tevent_req_data(
4797 req
, struct rpccli_wkssvc_NetrEnumerateComputerNames_state
);
4799 TALLOC_CTX
*mem_ctx
;
4801 if (state
->out_mem_ctx
) {
4802 mem_ctx
= state
->out_mem_ctx
;
4807 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4808 TALLOC_FREE(subreq
);
4809 if (!NT_STATUS_IS_OK(status
)) {
4810 tevent_req_nterror(req
, status
);
4814 /* Copy out parameters */
4815 *state
->orig
.out
.ctr
= *state
->tmp
.out
.ctr
;
4818 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4820 /* Reset temporary structure */
4821 ZERO_STRUCT(state
->tmp
);
4823 tevent_req_done(req
);
4826 NTSTATUS
rpccli_wkssvc_NetrEnumerateComputerNames_recv(struct tevent_req
*req
,
4827 TALLOC_CTX
*mem_ctx
,
4830 struct rpccli_wkssvc_NetrEnumerateComputerNames_state
*state
= tevent_req_data(
4831 req
, struct rpccli_wkssvc_NetrEnumerateComputerNames_state
);
4834 if (tevent_req_is_nterror(req
, &status
)) {
4835 tevent_req_received(req
);
4839 /* Steal possbile out parameters to the callers context */
4840 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4843 *result
= state
->orig
.out
.result
;
4845 tevent_req_received(req
);
4846 return NT_STATUS_OK
;
4849 NTSTATUS
rpccli_wkssvc_NetrEnumerateComputerNames(struct rpc_pipe_client
*cli
,
4850 TALLOC_CTX
*mem_ctx
,
4851 const char *server_name
/* [in] [unique,charset(UTF16)] */,
4852 enum wkssvc_ComputerNameType name_type
/* [in] */,
4853 uint32_t Reserved
/* [in] */,
4854 struct wkssvc_ComputerNamesCtr
**ctr
/* [out] [ref] */,
4857 struct wkssvc_NetrEnumerateComputerNames r
;
4861 r
.in
.server_name
= server_name
;
4862 r
.in
.name_type
= name_type
;
4863 r
.in
.Reserved
= Reserved
;
4865 status
= cli
->dispatch(cli
,
4868 NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES
,
4871 if (!NT_STATUS_IS_OK(status
)) {
4875 if (NT_STATUS_IS_ERR(status
)) {
4879 /* Return variables */
4884 *werror
= r
.out
.result
;
4887 return werror_to_ntstatus(r
.out
.result
);