2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/cli_srvsvc.h"
9 struct rpccli_srvsvc_NetCharDevEnum_state
{
10 struct srvsvc_NetCharDevEnum orig
;
11 struct srvsvc_NetCharDevEnum tmp
;
12 TALLOC_CTX
*out_mem_ctx
;
13 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
16 static void rpccli_srvsvc_NetCharDevEnum_done(struct tevent_req
*subreq
);
18 struct tevent_req
*rpccli_srvsvc_NetCharDevEnum_send(TALLOC_CTX
*mem_ctx
,
19 struct tevent_context
*ev
,
20 struct rpc_pipe_client
*cli
,
21 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
22 struct srvsvc_NetCharDevInfoCtr
*_info_ctr
/* [in,out] [ref] */,
23 uint32_t _max_buffer
/* [in] */,
24 uint32_t *_totalentries
/* [out] [ref] */,
25 uint32_t *_resume_handle
/* [in,out] [unique] */)
27 struct tevent_req
*req
;
28 struct rpccli_srvsvc_NetCharDevEnum_state
*state
;
29 struct tevent_req
*subreq
;
31 req
= tevent_req_create(mem_ctx
, &state
,
32 struct rpccli_srvsvc_NetCharDevEnum_state
);
36 state
->out_mem_ctx
= NULL
;
37 state
->dispatch_recv
= cli
->dispatch_recv
;
40 state
->orig
.in
.server_unc
= _server_unc
;
41 state
->orig
.in
.info_ctr
= _info_ctr
;
42 state
->orig
.in
.max_buffer
= _max_buffer
;
43 state
->orig
.in
.resume_handle
= _resume_handle
;
46 state
->orig
.out
.info_ctr
= _info_ctr
;
47 state
->orig
.out
.totalentries
= _totalentries
;
48 state
->orig
.out
.resume_handle
= _resume_handle
;
51 ZERO_STRUCT(state
->orig
.out
.result
);
53 if (DEBUGLEVEL
>= 10) {
54 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevEnum
, &state
->orig
);
57 state
->out_mem_ctx
= talloc_named_const(state
, 0,
58 "rpccli_srvsvc_NetCharDevEnum_out_memory");
59 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
60 return tevent_req_post(req
, ev
);
63 /* make a temporary copy, that we pass to the dispatch function */
64 state
->tmp
= state
->orig
;
66 subreq
= cli
->dispatch_send(state
, ev
, cli
,
68 NDR_SRVSVC_NETCHARDEVENUM
,
70 if (tevent_req_nomem(subreq
, req
)) {
71 return tevent_req_post(req
, ev
);
73 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetCharDevEnum_done
, req
);
77 static void rpccli_srvsvc_NetCharDevEnum_done(struct tevent_req
*subreq
)
79 struct tevent_req
*req
= tevent_req_callback_data(
80 subreq
, struct tevent_req
);
81 struct rpccli_srvsvc_NetCharDevEnum_state
*state
= tevent_req_data(
82 req
, struct rpccli_srvsvc_NetCharDevEnum_state
);
86 if (state
->out_mem_ctx
) {
87 mem_ctx
= state
->out_mem_ctx
;
92 status
= state
->dispatch_recv(subreq
, mem_ctx
);
94 if (!NT_STATUS_IS_OK(status
)) {
95 tevent_req_nterror(req
, status
);
99 /* Copy out parameters */
100 *state
->orig
.out
.info_ctr
= *state
->tmp
.out
.info_ctr
;
101 *state
->orig
.out
.totalentries
= *state
->tmp
.out
.totalentries
;
102 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
103 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
107 state
->orig
.out
.result
= state
->tmp
.out
.result
;
109 /* Reset temporary structure */
110 ZERO_STRUCT(state
->tmp
);
112 if (DEBUGLEVEL
>= 10) {
113 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevEnum
, &state
->orig
);
116 tevent_req_done(req
);
119 NTSTATUS
rpccli_srvsvc_NetCharDevEnum_recv(struct tevent_req
*req
,
123 struct rpccli_srvsvc_NetCharDevEnum_state
*state
= tevent_req_data(
124 req
, struct rpccli_srvsvc_NetCharDevEnum_state
);
127 if (tevent_req_is_nterror(req
, &status
)) {
128 tevent_req_received(req
);
132 /* Steal possbile out parameters to the callers context */
133 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
136 *result
= state
->orig
.out
.result
;
138 tevent_req_received(req
);
142 NTSTATUS
rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client
*cli
,
144 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
145 struct srvsvc_NetCharDevInfoCtr
*info_ctr
/* [in,out] [ref] */,
146 uint32_t max_buffer
/* [in] */,
147 uint32_t *totalentries
/* [out] [ref] */,
148 uint32_t *resume_handle
/* [in,out] [unique] */,
151 struct srvsvc_NetCharDevEnum r
;
155 r
.in
.server_unc
= server_unc
;
156 r
.in
.info_ctr
= info_ctr
;
157 r
.in
.max_buffer
= max_buffer
;
158 r
.in
.resume_handle
= resume_handle
;
160 if (DEBUGLEVEL
>= 10) {
161 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevEnum
, &r
);
164 status
= cli
->dispatch(cli
,
167 NDR_SRVSVC_NETCHARDEVENUM
,
170 if (!NT_STATUS_IS_OK(status
)) {
174 if (DEBUGLEVEL
>= 10) {
175 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevEnum
, &r
);
178 if (NT_STATUS_IS_ERR(status
)) {
182 /* Return variables */
183 *info_ctr
= *r
.out
.info_ctr
;
184 *totalentries
= *r
.out
.totalentries
;
185 if (resume_handle
&& r
.out
.resume_handle
) {
186 *resume_handle
= *r
.out
.resume_handle
;
191 *werror
= r
.out
.result
;
194 return werror_to_ntstatus(r
.out
.result
);
197 struct rpccli_srvsvc_NetCharDevGetInfo_state
{
198 struct srvsvc_NetCharDevGetInfo orig
;
199 struct srvsvc_NetCharDevGetInfo tmp
;
200 TALLOC_CTX
*out_mem_ctx
;
201 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
204 static void rpccli_srvsvc_NetCharDevGetInfo_done(struct tevent_req
*subreq
);
206 struct tevent_req
*rpccli_srvsvc_NetCharDevGetInfo_send(TALLOC_CTX
*mem_ctx
,
207 struct tevent_context
*ev
,
208 struct rpc_pipe_client
*cli
,
209 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
210 const char *_device_name
/* [in] [charset(UTF16)] */,
211 uint32_t _level
/* [in] */,
212 union srvsvc_NetCharDevInfo
*_info
/* [out] [ref,switch_is(level)] */)
214 struct tevent_req
*req
;
215 struct rpccli_srvsvc_NetCharDevGetInfo_state
*state
;
216 struct tevent_req
*subreq
;
218 req
= tevent_req_create(mem_ctx
, &state
,
219 struct rpccli_srvsvc_NetCharDevGetInfo_state
);
223 state
->out_mem_ctx
= NULL
;
224 state
->dispatch_recv
= cli
->dispatch_recv
;
227 state
->orig
.in
.server_unc
= _server_unc
;
228 state
->orig
.in
.device_name
= _device_name
;
229 state
->orig
.in
.level
= _level
;
232 state
->orig
.out
.info
= _info
;
235 ZERO_STRUCT(state
->orig
.out
.result
);
237 if (DEBUGLEVEL
>= 10) {
238 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevGetInfo
, &state
->orig
);
241 state
->out_mem_ctx
= talloc_named_const(state
, 0,
242 "rpccli_srvsvc_NetCharDevGetInfo_out_memory");
243 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
244 return tevent_req_post(req
, ev
);
247 /* make a temporary copy, that we pass to the dispatch function */
248 state
->tmp
= state
->orig
;
250 subreq
= cli
->dispatch_send(state
, ev
, cli
,
252 NDR_SRVSVC_NETCHARDEVGETINFO
,
254 if (tevent_req_nomem(subreq
, req
)) {
255 return tevent_req_post(req
, ev
);
257 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetCharDevGetInfo_done
, req
);
261 static void rpccli_srvsvc_NetCharDevGetInfo_done(struct tevent_req
*subreq
)
263 struct tevent_req
*req
= tevent_req_callback_data(
264 subreq
, struct tevent_req
);
265 struct rpccli_srvsvc_NetCharDevGetInfo_state
*state
= tevent_req_data(
266 req
, struct rpccli_srvsvc_NetCharDevGetInfo_state
);
270 if (state
->out_mem_ctx
) {
271 mem_ctx
= state
->out_mem_ctx
;
276 status
= state
->dispatch_recv(subreq
, mem_ctx
);
278 if (!NT_STATUS_IS_OK(status
)) {
279 tevent_req_nterror(req
, status
);
283 /* Copy out parameters */
284 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
287 state
->orig
.out
.result
= state
->tmp
.out
.result
;
289 /* Reset temporary structure */
290 ZERO_STRUCT(state
->tmp
);
292 if (DEBUGLEVEL
>= 10) {
293 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevGetInfo
, &state
->orig
);
296 tevent_req_done(req
);
299 NTSTATUS
rpccli_srvsvc_NetCharDevGetInfo_recv(struct tevent_req
*req
,
303 struct rpccli_srvsvc_NetCharDevGetInfo_state
*state
= tevent_req_data(
304 req
, struct rpccli_srvsvc_NetCharDevGetInfo_state
);
307 if (tevent_req_is_nterror(req
, &status
)) {
308 tevent_req_received(req
);
312 /* Steal possbile out parameters to the callers context */
313 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
316 *result
= state
->orig
.out
.result
;
318 tevent_req_received(req
);
322 NTSTATUS
rpccli_srvsvc_NetCharDevGetInfo(struct rpc_pipe_client
*cli
,
324 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
325 const char *device_name
/* [in] [charset(UTF16)] */,
326 uint32_t level
/* [in] */,
327 union srvsvc_NetCharDevInfo
*info
/* [out] [ref,switch_is(level)] */,
330 struct srvsvc_NetCharDevGetInfo r
;
334 r
.in
.server_unc
= server_unc
;
335 r
.in
.device_name
= device_name
;
338 if (DEBUGLEVEL
>= 10) {
339 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevGetInfo
, &r
);
342 status
= cli
->dispatch(cli
,
345 NDR_SRVSVC_NETCHARDEVGETINFO
,
348 if (!NT_STATUS_IS_OK(status
)) {
352 if (DEBUGLEVEL
>= 10) {
353 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevGetInfo
, &r
);
356 if (NT_STATUS_IS_ERR(status
)) {
360 /* Return variables */
365 *werror
= r
.out
.result
;
368 return werror_to_ntstatus(r
.out
.result
);
371 struct rpccli_srvsvc_NetCharDevControl_state
{
372 struct srvsvc_NetCharDevControl orig
;
373 struct srvsvc_NetCharDevControl tmp
;
374 TALLOC_CTX
*out_mem_ctx
;
375 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
378 static void rpccli_srvsvc_NetCharDevControl_done(struct tevent_req
*subreq
);
380 struct tevent_req
*rpccli_srvsvc_NetCharDevControl_send(TALLOC_CTX
*mem_ctx
,
381 struct tevent_context
*ev
,
382 struct rpc_pipe_client
*cli
,
383 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
384 const char *_device_name
/* [in] [charset(UTF16)] */,
385 uint32_t _opcode
/* [in] */)
387 struct tevent_req
*req
;
388 struct rpccli_srvsvc_NetCharDevControl_state
*state
;
389 struct tevent_req
*subreq
;
391 req
= tevent_req_create(mem_ctx
, &state
,
392 struct rpccli_srvsvc_NetCharDevControl_state
);
396 state
->out_mem_ctx
= NULL
;
397 state
->dispatch_recv
= cli
->dispatch_recv
;
400 state
->orig
.in
.server_unc
= _server_unc
;
401 state
->orig
.in
.device_name
= _device_name
;
402 state
->orig
.in
.opcode
= _opcode
;
407 ZERO_STRUCT(state
->orig
.out
.result
);
409 if (DEBUGLEVEL
>= 10) {
410 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevControl
, &state
->orig
);
413 /* make a temporary copy, that we pass to the dispatch function */
414 state
->tmp
= state
->orig
;
416 subreq
= cli
->dispatch_send(state
, ev
, cli
,
418 NDR_SRVSVC_NETCHARDEVCONTROL
,
420 if (tevent_req_nomem(subreq
, req
)) {
421 return tevent_req_post(req
, ev
);
423 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetCharDevControl_done
, req
);
427 static void rpccli_srvsvc_NetCharDevControl_done(struct tevent_req
*subreq
)
429 struct tevent_req
*req
= tevent_req_callback_data(
430 subreq
, struct tevent_req
);
431 struct rpccli_srvsvc_NetCharDevControl_state
*state
= tevent_req_data(
432 req
, struct rpccli_srvsvc_NetCharDevControl_state
);
436 if (state
->out_mem_ctx
) {
437 mem_ctx
= state
->out_mem_ctx
;
442 status
= state
->dispatch_recv(subreq
, mem_ctx
);
444 if (!NT_STATUS_IS_OK(status
)) {
445 tevent_req_nterror(req
, status
);
449 /* Copy out parameters */
452 state
->orig
.out
.result
= state
->tmp
.out
.result
;
454 /* Reset temporary structure */
455 ZERO_STRUCT(state
->tmp
);
457 if (DEBUGLEVEL
>= 10) {
458 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevControl
, &state
->orig
);
461 tevent_req_done(req
);
464 NTSTATUS
rpccli_srvsvc_NetCharDevControl_recv(struct tevent_req
*req
,
468 struct rpccli_srvsvc_NetCharDevControl_state
*state
= tevent_req_data(
469 req
, struct rpccli_srvsvc_NetCharDevControl_state
);
472 if (tevent_req_is_nterror(req
, &status
)) {
473 tevent_req_received(req
);
477 /* Steal possbile out parameters to the callers context */
478 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
481 *result
= state
->orig
.out
.result
;
483 tevent_req_received(req
);
487 NTSTATUS
rpccli_srvsvc_NetCharDevControl(struct rpc_pipe_client
*cli
,
489 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
490 const char *device_name
/* [in] [charset(UTF16)] */,
491 uint32_t opcode
/* [in] */,
494 struct srvsvc_NetCharDevControl r
;
498 r
.in
.server_unc
= server_unc
;
499 r
.in
.device_name
= device_name
;
500 r
.in
.opcode
= opcode
;
502 if (DEBUGLEVEL
>= 10) {
503 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevControl
, &r
);
506 status
= cli
->dispatch(cli
,
509 NDR_SRVSVC_NETCHARDEVCONTROL
,
512 if (!NT_STATUS_IS_OK(status
)) {
516 if (DEBUGLEVEL
>= 10) {
517 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevControl
, &r
);
520 if (NT_STATUS_IS_ERR(status
)) {
524 /* Return variables */
528 *werror
= r
.out
.result
;
531 return werror_to_ntstatus(r
.out
.result
);
534 struct rpccli_srvsvc_NetCharDevQEnum_state
{
535 struct srvsvc_NetCharDevQEnum orig
;
536 struct srvsvc_NetCharDevQEnum tmp
;
537 TALLOC_CTX
*out_mem_ctx
;
538 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
541 static void rpccli_srvsvc_NetCharDevQEnum_done(struct tevent_req
*subreq
);
543 struct tevent_req
*rpccli_srvsvc_NetCharDevQEnum_send(TALLOC_CTX
*mem_ctx
,
544 struct tevent_context
*ev
,
545 struct rpc_pipe_client
*cli
,
546 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
547 const char *_user
/* [in] [unique,charset(UTF16)] */,
548 struct srvsvc_NetCharDevQInfoCtr
*_info_ctr
/* [in,out] [ref] */,
549 uint32_t _max_buffer
/* [in] */,
550 uint32_t *_totalentries
/* [out] [ref] */,
551 uint32_t *_resume_handle
/* [in,out] [unique] */)
553 struct tevent_req
*req
;
554 struct rpccli_srvsvc_NetCharDevQEnum_state
*state
;
555 struct tevent_req
*subreq
;
557 req
= tevent_req_create(mem_ctx
, &state
,
558 struct rpccli_srvsvc_NetCharDevQEnum_state
);
562 state
->out_mem_ctx
= NULL
;
563 state
->dispatch_recv
= cli
->dispatch_recv
;
566 state
->orig
.in
.server_unc
= _server_unc
;
567 state
->orig
.in
.user
= _user
;
568 state
->orig
.in
.info_ctr
= _info_ctr
;
569 state
->orig
.in
.max_buffer
= _max_buffer
;
570 state
->orig
.in
.resume_handle
= _resume_handle
;
573 state
->orig
.out
.info_ctr
= _info_ctr
;
574 state
->orig
.out
.totalentries
= _totalentries
;
575 state
->orig
.out
.resume_handle
= _resume_handle
;
578 ZERO_STRUCT(state
->orig
.out
.result
);
580 if (DEBUGLEVEL
>= 10) {
581 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQEnum
, &state
->orig
);
584 state
->out_mem_ctx
= talloc_named_const(state
, 0,
585 "rpccli_srvsvc_NetCharDevQEnum_out_memory");
586 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
587 return tevent_req_post(req
, ev
);
590 /* make a temporary copy, that we pass to the dispatch function */
591 state
->tmp
= state
->orig
;
593 subreq
= cli
->dispatch_send(state
, ev
, cli
,
595 NDR_SRVSVC_NETCHARDEVQENUM
,
597 if (tevent_req_nomem(subreq
, req
)) {
598 return tevent_req_post(req
, ev
);
600 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetCharDevQEnum_done
, req
);
604 static void rpccli_srvsvc_NetCharDevQEnum_done(struct tevent_req
*subreq
)
606 struct tevent_req
*req
= tevent_req_callback_data(
607 subreq
, struct tevent_req
);
608 struct rpccli_srvsvc_NetCharDevQEnum_state
*state
= tevent_req_data(
609 req
, struct rpccli_srvsvc_NetCharDevQEnum_state
);
613 if (state
->out_mem_ctx
) {
614 mem_ctx
= state
->out_mem_ctx
;
619 status
= state
->dispatch_recv(subreq
, mem_ctx
);
621 if (!NT_STATUS_IS_OK(status
)) {
622 tevent_req_nterror(req
, status
);
626 /* Copy out parameters */
627 *state
->orig
.out
.info_ctr
= *state
->tmp
.out
.info_ctr
;
628 *state
->orig
.out
.totalentries
= *state
->tmp
.out
.totalentries
;
629 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
630 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
634 state
->orig
.out
.result
= state
->tmp
.out
.result
;
636 /* Reset temporary structure */
637 ZERO_STRUCT(state
->tmp
);
639 if (DEBUGLEVEL
>= 10) {
640 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQEnum
, &state
->orig
);
643 tevent_req_done(req
);
646 NTSTATUS
rpccli_srvsvc_NetCharDevQEnum_recv(struct tevent_req
*req
,
650 struct rpccli_srvsvc_NetCharDevQEnum_state
*state
= tevent_req_data(
651 req
, struct rpccli_srvsvc_NetCharDevQEnum_state
);
654 if (tevent_req_is_nterror(req
, &status
)) {
655 tevent_req_received(req
);
659 /* Steal possbile out parameters to the callers context */
660 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
663 *result
= state
->orig
.out
.result
;
665 tevent_req_received(req
);
669 NTSTATUS
rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client
*cli
,
671 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
672 const char *user
/* [in] [unique,charset(UTF16)] */,
673 struct srvsvc_NetCharDevQInfoCtr
*info_ctr
/* [in,out] [ref] */,
674 uint32_t max_buffer
/* [in] */,
675 uint32_t *totalentries
/* [out] [ref] */,
676 uint32_t *resume_handle
/* [in,out] [unique] */,
679 struct srvsvc_NetCharDevQEnum r
;
683 r
.in
.server_unc
= server_unc
;
685 r
.in
.info_ctr
= info_ctr
;
686 r
.in
.max_buffer
= max_buffer
;
687 r
.in
.resume_handle
= resume_handle
;
689 if (DEBUGLEVEL
>= 10) {
690 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQEnum
, &r
);
693 status
= cli
->dispatch(cli
,
696 NDR_SRVSVC_NETCHARDEVQENUM
,
699 if (!NT_STATUS_IS_OK(status
)) {
703 if (DEBUGLEVEL
>= 10) {
704 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQEnum
, &r
);
707 if (NT_STATUS_IS_ERR(status
)) {
711 /* Return variables */
712 *info_ctr
= *r
.out
.info_ctr
;
713 *totalentries
= *r
.out
.totalentries
;
714 if (resume_handle
&& r
.out
.resume_handle
) {
715 *resume_handle
= *r
.out
.resume_handle
;
720 *werror
= r
.out
.result
;
723 return werror_to_ntstatus(r
.out
.result
);
726 struct rpccli_srvsvc_NetCharDevQGetInfo_state
{
727 struct srvsvc_NetCharDevQGetInfo orig
;
728 struct srvsvc_NetCharDevQGetInfo tmp
;
729 TALLOC_CTX
*out_mem_ctx
;
730 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
733 static void rpccli_srvsvc_NetCharDevQGetInfo_done(struct tevent_req
*subreq
);
735 struct tevent_req
*rpccli_srvsvc_NetCharDevQGetInfo_send(TALLOC_CTX
*mem_ctx
,
736 struct tevent_context
*ev
,
737 struct rpc_pipe_client
*cli
,
738 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
739 const char *_queue_name
/* [in] [charset(UTF16)] */,
740 const char *_user
/* [in] [charset(UTF16)] */,
741 uint32_t _level
/* [in] */,
742 union srvsvc_NetCharDevQInfo
*_info
/* [out] [ref,switch_is(level)] */)
744 struct tevent_req
*req
;
745 struct rpccli_srvsvc_NetCharDevQGetInfo_state
*state
;
746 struct tevent_req
*subreq
;
748 req
= tevent_req_create(mem_ctx
, &state
,
749 struct rpccli_srvsvc_NetCharDevQGetInfo_state
);
753 state
->out_mem_ctx
= NULL
;
754 state
->dispatch_recv
= cli
->dispatch_recv
;
757 state
->orig
.in
.server_unc
= _server_unc
;
758 state
->orig
.in
.queue_name
= _queue_name
;
759 state
->orig
.in
.user
= _user
;
760 state
->orig
.in
.level
= _level
;
763 state
->orig
.out
.info
= _info
;
766 ZERO_STRUCT(state
->orig
.out
.result
);
768 if (DEBUGLEVEL
>= 10) {
769 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQGetInfo
, &state
->orig
);
772 state
->out_mem_ctx
= talloc_named_const(state
, 0,
773 "rpccli_srvsvc_NetCharDevQGetInfo_out_memory");
774 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
775 return tevent_req_post(req
, ev
);
778 /* make a temporary copy, that we pass to the dispatch function */
779 state
->tmp
= state
->orig
;
781 subreq
= cli
->dispatch_send(state
, ev
, cli
,
783 NDR_SRVSVC_NETCHARDEVQGETINFO
,
785 if (tevent_req_nomem(subreq
, req
)) {
786 return tevent_req_post(req
, ev
);
788 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetCharDevQGetInfo_done
, req
);
792 static void rpccli_srvsvc_NetCharDevQGetInfo_done(struct tevent_req
*subreq
)
794 struct tevent_req
*req
= tevent_req_callback_data(
795 subreq
, struct tevent_req
);
796 struct rpccli_srvsvc_NetCharDevQGetInfo_state
*state
= tevent_req_data(
797 req
, struct rpccli_srvsvc_NetCharDevQGetInfo_state
);
801 if (state
->out_mem_ctx
) {
802 mem_ctx
= state
->out_mem_ctx
;
807 status
= state
->dispatch_recv(subreq
, mem_ctx
);
809 if (!NT_STATUS_IS_OK(status
)) {
810 tevent_req_nterror(req
, status
);
814 /* Copy out parameters */
815 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
818 state
->orig
.out
.result
= state
->tmp
.out
.result
;
820 /* Reset temporary structure */
821 ZERO_STRUCT(state
->tmp
);
823 if (DEBUGLEVEL
>= 10) {
824 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQGetInfo
, &state
->orig
);
827 tevent_req_done(req
);
830 NTSTATUS
rpccli_srvsvc_NetCharDevQGetInfo_recv(struct tevent_req
*req
,
834 struct rpccli_srvsvc_NetCharDevQGetInfo_state
*state
= tevent_req_data(
835 req
, struct rpccli_srvsvc_NetCharDevQGetInfo_state
);
838 if (tevent_req_is_nterror(req
, &status
)) {
839 tevent_req_received(req
);
843 /* Steal possbile out parameters to the callers context */
844 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
847 *result
= state
->orig
.out
.result
;
849 tevent_req_received(req
);
853 NTSTATUS
rpccli_srvsvc_NetCharDevQGetInfo(struct rpc_pipe_client
*cli
,
855 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
856 const char *queue_name
/* [in] [charset(UTF16)] */,
857 const char *user
/* [in] [charset(UTF16)] */,
858 uint32_t level
/* [in] */,
859 union srvsvc_NetCharDevQInfo
*info
/* [out] [ref,switch_is(level)] */,
862 struct srvsvc_NetCharDevQGetInfo r
;
866 r
.in
.server_unc
= server_unc
;
867 r
.in
.queue_name
= queue_name
;
871 if (DEBUGLEVEL
>= 10) {
872 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQGetInfo
, &r
);
875 status
= cli
->dispatch(cli
,
878 NDR_SRVSVC_NETCHARDEVQGETINFO
,
881 if (!NT_STATUS_IS_OK(status
)) {
885 if (DEBUGLEVEL
>= 10) {
886 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQGetInfo
, &r
);
889 if (NT_STATUS_IS_ERR(status
)) {
893 /* Return variables */
898 *werror
= r
.out
.result
;
901 return werror_to_ntstatus(r
.out
.result
);
904 struct rpccli_srvsvc_NetCharDevQSetInfo_state
{
905 struct srvsvc_NetCharDevQSetInfo orig
;
906 struct srvsvc_NetCharDevQSetInfo tmp
;
907 TALLOC_CTX
*out_mem_ctx
;
908 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
911 static void rpccli_srvsvc_NetCharDevQSetInfo_done(struct tevent_req
*subreq
);
913 struct tevent_req
*rpccli_srvsvc_NetCharDevQSetInfo_send(TALLOC_CTX
*mem_ctx
,
914 struct tevent_context
*ev
,
915 struct rpc_pipe_client
*cli
,
916 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
917 const char *_queue_name
/* [in] [charset(UTF16)] */,
918 uint32_t _level
/* [in] */,
919 union srvsvc_NetCharDevQInfo _info
/* [in] [switch_is(level)] */,
920 uint32_t *_parm_error
/* [in,out] [unique] */)
922 struct tevent_req
*req
;
923 struct rpccli_srvsvc_NetCharDevQSetInfo_state
*state
;
924 struct tevent_req
*subreq
;
926 req
= tevent_req_create(mem_ctx
, &state
,
927 struct rpccli_srvsvc_NetCharDevQSetInfo_state
);
931 state
->out_mem_ctx
= NULL
;
932 state
->dispatch_recv
= cli
->dispatch_recv
;
935 state
->orig
.in
.server_unc
= _server_unc
;
936 state
->orig
.in
.queue_name
= _queue_name
;
937 state
->orig
.in
.level
= _level
;
938 state
->orig
.in
.info
= _info
;
939 state
->orig
.in
.parm_error
= _parm_error
;
942 state
->orig
.out
.parm_error
= _parm_error
;
945 ZERO_STRUCT(state
->orig
.out
.result
);
947 if (DEBUGLEVEL
>= 10) {
948 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQSetInfo
, &state
->orig
);
951 state
->out_mem_ctx
= talloc_named_const(state
, 0,
952 "rpccli_srvsvc_NetCharDevQSetInfo_out_memory");
953 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
954 return tevent_req_post(req
, ev
);
957 /* make a temporary copy, that we pass to the dispatch function */
958 state
->tmp
= state
->orig
;
960 subreq
= cli
->dispatch_send(state
, ev
, cli
,
962 NDR_SRVSVC_NETCHARDEVQSETINFO
,
964 if (tevent_req_nomem(subreq
, req
)) {
965 return tevent_req_post(req
, ev
);
967 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetCharDevQSetInfo_done
, req
);
971 static void rpccli_srvsvc_NetCharDevQSetInfo_done(struct tevent_req
*subreq
)
973 struct tevent_req
*req
= tevent_req_callback_data(
974 subreq
, struct tevent_req
);
975 struct rpccli_srvsvc_NetCharDevQSetInfo_state
*state
= tevent_req_data(
976 req
, struct rpccli_srvsvc_NetCharDevQSetInfo_state
);
980 if (state
->out_mem_ctx
) {
981 mem_ctx
= state
->out_mem_ctx
;
986 status
= state
->dispatch_recv(subreq
, mem_ctx
);
988 if (!NT_STATUS_IS_OK(status
)) {
989 tevent_req_nterror(req
, status
);
993 /* Copy out parameters */
994 if (state
->orig
.out
.parm_error
&& state
->tmp
.out
.parm_error
) {
995 *state
->orig
.out
.parm_error
= *state
->tmp
.out
.parm_error
;
999 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1001 /* Reset temporary structure */
1002 ZERO_STRUCT(state
->tmp
);
1004 if (DEBUGLEVEL
>= 10) {
1005 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQSetInfo
, &state
->orig
);
1008 tevent_req_done(req
);
1011 NTSTATUS
rpccli_srvsvc_NetCharDevQSetInfo_recv(struct tevent_req
*req
,
1012 TALLOC_CTX
*mem_ctx
,
1015 struct rpccli_srvsvc_NetCharDevQSetInfo_state
*state
= tevent_req_data(
1016 req
, struct rpccli_srvsvc_NetCharDevQSetInfo_state
);
1019 if (tevent_req_is_nterror(req
, &status
)) {
1020 tevent_req_received(req
);
1024 /* Steal possbile out parameters to the callers context */
1025 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1028 *result
= state
->orig
.out
.result
;
1030 tevent_req_received(req
);
1031 return NT_STATUS_OK
;
1034 NTSTATUS
rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client
*cli
,
1035 TALLOC_CTX
*mem_ctx
,
1036 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
1037 const char *queue_name
/* [in] [charset(UTF16)] */,
1038 uint32_t level
/* [in] */,
1039 union srvsvc_NetCharDevQInfo info
/* [in] [switch_is(level)] */,
1040 uint32_t *parm_error
/* [in,out] [unique] */,
1043 struct srvsvc_NetCharDevQSetInfo r
;
1047 r
.in
.server_unc
= server_unc
;
1048 r
.in
.queue_name
= queue_name
;
1051 r
.in
.parm_error
= parm_error
;
1053 if (DEBUGLEVEL
>= 10) {
1054 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQSetInfo
, &r
);
1057 status
= cli
->dispatch(cli
,
1060 NDR_SRVSVC_NETCHARDEVQSETINFO
,
1063 if (!NT_STATUS_IS_OK(status
)) {
1067 if (DEBUGLEVEL
>= 10) {
1068 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQSetInfo
, &r
);
1071 if (NT_STATUS_IS_ERR(status
)) {
1075 /* Return variables */
1076 if (parm_error
&& r
.out
.parm_error
) {
1077 *parm_error
= *r
.out
.parm_error
;
1082 *werror
= r
.out
.result
;
1085 return werror_to_ntstatus(r
.out
.result
);
1088 struct rpccli_srvsvc_NetCharDevQPurge_state
{
1089 struct srvsvc_NetCharDevQPurge orig
;
1090 struct srvsvc_NetCharDevQPurge tmp
;
1091 TALLOC_CTX
*out_mem_ctx
;
1092 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1095 static void rpccli_srvsvc_NetCharDevQPurge_done(struct tevent_req
*subreq
);
1097 struct tevent_req
*rpccli_srvsvc_NetCharDevQPurge_send(TALLOC_CTX
*mem_ctx
,
1098 struct tevent_context
*ev
,
1099 struct rpc_pipe_client
*cli
,
1100 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
1101 const char *_queue_name
/* [in] [charset(UTF16)] */)
1103 struct tevent_req
*req
;
1104 struct rpccli_srvsvc_NetCharDevQPurge_state
*state
;
1105 struct tevent_req
*subreq
;
1107 req
= tevent_req_create(mem_ctx
, &state
,
1108 struct rpccli_srvsvc_NetCharDevQPurge_state
);
1112 state
->out_mem_ctx
= NULL
;
1113 state
->dispatch_recv
= cli
->dispatch_recv
;
1116 state
->orig
.in
.server_unc
= _server_unc
;
1117 state
->orig
.in
.queue_name
= _queue_name
;
1119 /* Out parameters */
1122 ZERO_STRUCT(state
->orig
.out
.result
);
1124 if (DEBUGLEVEL
>= 10) {
1125 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQPurge
, &state
->orig
);
1128 /* make a temporary copy, that we pass to the dispatch function */
1129 state
->tmp
= state
->orig
;
1131 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1133 NDR_SRVSVC_NETCHARDEVQPURGE
,
1135 if (tevent_req_nomem(subreq
, req
)) {
1136 return tevent_req_post(req
, ev
);
1138 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetCharDevQPurge_done
, req
);
1142 static void rpccli_srvsvc_NetCharDevQPurge_done(struct tevent_req
*subreq
)
1144 struct tevent_req
*req
= tevent_req_callback_data(
1145 subreq
, struct tevent_req
);
1146 struct rpccli_srvsvc_NetCharDevQPurge_state
*state
= tevent_req_data(
1147 req
, struct rpccli_srvsvc_NetCharDevQPurge_state
);
1149 TALLOC_CTX
*mem_ctx
;
1151 if (state
->out_mem_ctx
) {
1152 mem_ctx
= state
->out_mem_ctx
;
1157 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1158 TALLOC_FREE(subreq
);
1159 if (!NT_STATUS_IS_OK(status
)) {
1160 tevent_req_nterror(req
, status
);
1164 /* Copy out parameters */
1167 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1169 /* Reset temporary structure */
1170 ZERO_STRUCT(state
->tmp
);
1172 if (DEBUGLEVEL
>= 10) {
1173 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurge
, &state
->orig
);
1176 tevent_req_done(req
);
1179 NTSTATUS
rpccli_srvsvc_NetCharDevQPurge_recv(struct tevent_req
*req
,
1180 TALLOC_CTX
*mem_ctx
,
1183 struct rpccli_srvsvc_NetCharDevQPurge_state
*state
= tevent_req_data(
1184 req
, struct rpccli_srvsvc_NetCharDevQPurge_state
);
1187 if (tevent_req_is_nterror(req
, &status
)) {
1188 tevent_req_received(req
);
1192 /* Steal possbile out parameters to the callers context */
1193 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1196 *result
= state
->orig
.out
.result
;
1198 tevent_req_received(req
);
1199 return NT_STATUS_OK
;
1202 NTSTATUS
rpccli_srvsvc_NetCharDevQPurge(struct rpc_pipe_client
*cli
,
1203 TALLOC_CTX
*mem_ctx
,
1204 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
1205 const char *queue_name
/* [in] [charset(UTF16)] */,
1208 struct srvsvc_NetCharDevQPurge r
;
1212 r
.in
.server_unc
= server_unc
;
1213 r
.in
.queue_name
= queue_name
;
1215 if (DEBUGLEVEL
>= 10) {
1216 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQPurge
, &r
);
1219 status
= cli
->dispatch(cli
,
1222 NDR_SRVSVC_NETCHARDEVQPURGE
,
1225 if (!NT_STATUS_IS_OK(status
)) {
1229 if (DEBUGLEVEL
>= 10) {
1230 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurge
, &r
);
1233 if (NT_STATUS_IS_ERR(status
)) {
1237 /* Return variables */
1241 *werror
= r
.out
.result
;
1244 return werror_to_ntstatus(r
.out
.result
);
1247 struct rpccli_srvsvc_NetCharDevQPurgeSelf_state
{
1248 struct srvsvc_NetCharDevQPurgeSelf orig
;
1249 struct srvsvc_NetCharDevQPurgeSelf tmp
;
1250 TALLOC_CTX
*out_mem_ctx
;
1251 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1254 static void rpccli_srvsvc_NetCharDevQPurgeSelf_done(struct tevent_req
*subreq
);
1256 struct tevent_req
*rpccli_srvsvc_NetCharDevQPurgeSelf_send(TALLOC_CTX
*mem_ctx
,
1257 struct tevent_context
*ev
,
1258 struct rpc_pipe_client
*cli
,
1259 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
1260 const char *_queue_name
/* [in] [charset(UTF16)] */,
1261 const char *_computer_name
/* [in] [charset(UTF16)] */)
1263 struct tevent_req
*req
;
1264 struct rpccli_srvsvc_NetCharDevQPurgeSelf_state
*state
;
1265 struct tevent_req
*subreq
;
1267 req
= tevent_req_create(mem_ctx
, &state
,
1268 struct rpccli_srvsvc_NetCharDevQPurgeSelf_state
);
1272 state
->out_mem_ctx
= NULL
;
1273 state
->dispatch_recv
= cli
->dispatch_recv
;
1276 state
->orig
.in
.server_unc
= _server_unc
;
1277 state
->orig
.in
.queue_name
= _queue_name
;
1278 state
->orig
.in
.computer_name
= _computer_name
;
1280 /* Out parameters */
1283 ZERO_STRUCT(state
->orig
.out
.result
);
1285 if (DEBUGLEVEL
>= 10) {
1286 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQPurgeSelf
, &state
->orig
);
1289 /* make a temporary copy, that we pass to the dispatch function */
1290 state
->tmp
= state
->orig
;
1292 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1294 NDR_SRVSVC_NETCHARDEVQPURGESELF
,
1296 if (tevent_req_nomem(subreq
, req
)) {
1297 return tevent_req_post(req
, ev
);
1299 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetCharDevQPurgeSelf_done
, req
);
1303 static void rpccli_srvsvc_NetCharDevQPurgeSelf_done(struct tevent_req
*subreq
)
1305 struct tevent_req
*req
= tevent_req_callback_data(
1306 subreq
, struct tevent_req
);
1307 struct rpccli_srvsvc_NetCharDevQPurgeSelf_state
*state
= tevent_req_data(
1308 req
, struct rpccli_srvsvc_NetCharDevQPurgeSelf_state
);
1310 TALLOC_CTX
*mem_ctx
;
1312 if (state
->out_mem_ctx
) {
1313 mem_ctx
= state
->out_mem_ctx
;
1318 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1319 TALLOC_FREE(subreq
);
1320 if (!NT_STATUS_IS_OK(status
)) {
1321 tevent_req_nterror(req
, status
);
1325 /* Copy out parameters */
1328 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1330 /* Reset temporary structure */
1331 ZERO_STRUCT(state
->tmp
);
1333 if (DEBUGLEVEL
>= 10) {
1334 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurgeSelf
, &state
->orig
);
1337 tevent_req_done(req
);
1340 NTSTATUS
rpccli_srvsvc_NetCharDevQPurgeSelf_recv(struct tevent_req
*req
,
1341 TALLOC_CTX
*mem_ctx
,
1344 struct rpccli_srvsvc_NetCharDevQPurgeSelf_state
*state
= tevent_req_data(
1345 req
, struct rpccli_srvsvc_NetCharDevQPurgeSelf_state
);
1348 if (tevent_req_is_nterror(req
, &status
)) {
1349 tevent_req_received(req
);
1353 /* Steal possbile out parameters to the callers context */
1354 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1357 *result
= state
->orig
.out
.result
;
1359 tevent_req_received(req
);
1360 return NT_STATUS_OK
;
1363 NTSTATUS
rpccli_srvsvc_NetCharDevQPurgeSelf(struct rpc_pipe_client
*cli
,
1364 TALLOC_CTX
*mem_ctx
,
1365 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
1366 const char *queue_name
/* [in] [charset(UTF16)] */,
1367 const char *computer_name
/* [in] [charset(UTF16)] */,
1370 struct srvsvc_NetCharDevQPurgeSelf r
;
1374 r
.in
.server_unc
= server_unc
;
1375 r
.in
.queue_name
= queue_name
;
1376 r
.in
.computer_name
= computer_name
;
1378 if (DEBUGLEVEL
>= 10) {
1379 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQPurgeSelf
, &r
);
1382 status
= cli
->dispatch(cli
,
1385 NDR_SRVSVC_NETCHARDEVQPURGESELF
,
1388 if (!NT_STATUS_IS_OK(status
)) {
1392 if (DEBUGLEVEL
>= 10) {
1393 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurgeSelf
, &r
);
1396 if (NT_STATUS_IS_ERR(status
)) {
1400 /* Return variables */
1404 *werror
= r
.out
.result
;
1407 return werror_to_ntstatus(r
.out
.result
);
1410 struct rpccli_srvsvc_NetConnEnum_state
{
1411 struct srvsvc_NetConnEnum orig
;
1412 struct srvsvc_NetConnEnum tmp
;
1413 TALLOC_CTX
*out_mem_ctx
;
1414 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1417 static void rpccli_srvsvc_NetConnEnum_done(struct tevent_req
*subreq
);
1419 struct tevent_req
*rpccli_srvsvc_NetConnEnum_send(TALLOC_CTX
*mem_ctx
,
1420 struct tevent_context
*ev
,
1421 struct rpc_pipe_client
*cli
,
1422 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
1423 const char *_path
/* [in] [unique,charset(UTF16)] */,
1424 struct srvsvc_NetConnInfoCtr
*_info_ctr
/* [in,out] [ref] */,
1425 uint32_t _max_buffer
/* [in] */,
1426 uint32_t *_totalentries
/* [out] [ref] */,
1427 uint32_t *_resume_handle
/* [in,out] [unique] */)
1429 struct tevent_req
*req
;
1430 struct rpccli_srvsvc_NetConnEnum_state
*state
;
1431 struct tevent_req
*subreq
;
1433 req
= tevent_req_create(mem_ctx
, &state
,
1434 struct rpccli_srvsvc_NetConnEnum_state
);
1438 state
->out_mem_ctx
= NULL
;
1439 state
->dispatch_recv
= cli
->dispatch_recv
;
1442 state
->orig
.in
.server_unc
= _server_unc
;
1443 state
->orig
.in
.path
= _path
;
1444 state
->orig
.in
.info_ctr
= _info_ctr
;
1445 state
->orig
.in
.max_buffer
= _max_buffer
;
1446 state
->orig
.in
.resume_handle
= _resume_handle
;
1448 /* Out parameters */
1449 state
->orig
.out
.info_ctr
= _info_ctr
;
1450 state
->orig
.out
.totalentries
= _totalentries
;
1451 state
->orig
.out
.resume_handle
= _resume_handle
;
1454 ZERO_STRUCT(state
->orig
.out
.result
);
1456 if (DEBUGLEVEL
>= 10) {
1457 NDR_PRINT_IN_DEBUG(srvsvc_NetConnEnum
, &state
->orig
);
1460 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1461 "rpccli_srvsvc_NetConnEnum_out_memory");
1462 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1463 return tevent_req_post(req
, ev
);
1466 /* make a temporary copy, that we pass to the dispatch function */
1467 state
->tmp
= state
->orig
;
1469 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1471 NDR_SRVSVC_NETCONNENUM
,
1473 if (tevent_req_nomem(subreq
, req
)) {
1474 return tevent_req_post(req
, ev
);
1476 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetConnEnum_done
, req
);
1480 static void rpccli_srvsvc_NetConnEnum_done(struct tevent_req
*subreq
)
1482 struct tevent_req
*req
= tevent_req_callback_data(
1483 subreq
, struct tevent_req
);
1484 struct rpccli_srvsvc_NetConnEnum_state
*state
= tevent_req_data(
1485 req
, struct rpccli_srvsvc_NetConnEnum_state
);
1487 TALLOC_CTX
*mem_ctx
;
1489 if (state
->out_mem_ctx
) {
1490 mem_ctx
= state
->out_mem_ctx
;
1495 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1496 TALLOC_FREE(subreq
);
1497 if (!NT_STATUS_IS_OK(status
)) {
1498 tevent_req_nterror(req
, status
);
1502 /* Copy out parameters */
1503 *state
->orig
.out
.info_ctr
= *state
->tmp
.out
.info_ctr
;
1504 *state
->orig
.out
.totalentries
= *state
->tmp
.out
.totalentries
;
1505 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
1506 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
1510 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1512 /* Reset temporary structure */
1513 ZERO_STRUCT(state
->tmp
);
1515 if (DEBUGLEVEL
>= 10) {
1516 NDR_PRINT_OUT_DEBUG(srvsvc_NetConnEnum
, &state
->orig
);
1519 tevent_req_done(req
);
1522 NTSTATUS
rpccli_srvsvc_NetConnEnum_recv(struct tevent_req
*req
,
1523 TALLOC_CTX
*mem_ctx
,
1526 struct rpccli_srvsvc_NetConnEnum_state
*state
= tevent_req_data(
1527 req
, struct rpccli_srvsvc_NetConnEnum_state
);
1530 if (tevent_req_is_nterror(req
, &status
)) {
1531 tevent_req_received(req
);
1535 /* Steal possbile out parameters to the callers context */
1536 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1539 *result
= state
->orig
.out
.result
;
1541 tevent_req_received(req
);
1542 return NT_STATUS_OK
;
1545 NTSTATUS
rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client
*cli
,
1546 TALLOC_CTX
*mem_ctx
,
1547 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
1548 const char *path
/* [in] [unique,charset(UTF16)] */,
1549 struct srvsvc_NetConnInfoCtr
*info_ctr
/* [in,out] [ref] */,
1550 uint32_t max_buffer
/* [in] */,
1551 uint32_t *totalentries
/* [out] [ref] */,
1552 uint32_t *resume_handle
/* [in,out] [unique] */,
1555 struct srvsvc_NetConnEnum r
;
1559 r
.in
.server_unc
= server_unc
;
1561 r
.in
.info_ctr
= info_ctr
;
1562 r
.in
.max_buffer
= max_buffer
;
1563 r
.in
.resume_handle
= resume_handle
;
1565 if (DEBUGLEVEL
>= 10) {
1566 NDR_PRINT_IN_DEBUG(srvsvc_NetConnEnum
, &r
);
1569 status
= cli
->dispatch(cli
,
1572 NDR_SRVSVC_NETCONNENUM
,
1575 if (!NT_STATUS_IS_OK(status
)) {
1579 if (DEBUGLEVEL
>= 10) {
1580 NDR_PRINT_OUT_DEBUG(srvsvc_NetConnEnum
, &r
);
1583 if (NT_STATUS_IS_ERR(status
)) {
1587 /* Return variables */
1588 *info_ctr
= *r
.out
.info_ctr
;
1589 *totalentries
= *r
.out
.totalentries
;
1590 if (resume_handle
&& r
.out
.resume_handle
) {
1591 *resume_handle
= *r
.out
.resume_handle
;
1596 *werror
= r
.out
.result
;
1599 return werror_to_ntstatus(r
.out
.result
);
1602 struct rpccli_srvsvc_NetFileEnum_state
{
1603 struct srvsvc_NetFileEnum orig
;
1604 struct srvsvc_NetFileEnum tmp
;
1605 TALLOC_CTX
*out_mem_ctx
;
1606 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1609 static void rpccli_srvsvc_NetFileEnum_done(struct tevent_req
*subreq
);
1611 struct tevent_req
*rpccli_srvsvc_NetFileEnum_send(TALLOC_CTX
*mem_ctx
,
1612 struct tevent_context
*ev
,
1613 struct rpc_pipe_client
*cli
,
1614 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
1615 const char *_path
/* [in] [unique,charset(UTF16)] */,
1616 const char *_user
/* [in] [unique,charset(UTF16)] */,
1617 struct srvsvc_NetFileInfoCtr
*_info_ctr
/* [in,out] [ref] */,
1618 uint32_t _max_buffer
/* [in] */,
1619 uint32_t *_totalentries
/* [out] [ref] */,
1620 uint32_t *_resume_handle
/* [in,out] [unique] */)
1622 struct tevent_req
*req
;
1623 struct rpccli_srvsvc_NetFileEnum_state
*state
;
1624 struct tevent_req
*subreq
;
1626 req
= tevent_req_create(mem_ctx
, &state
,
1627 struct rpccli_srvsvc_NetFileEnum_state
);
1631 state
->out_mem_ctx
= NULL
;
1632 state
->dispatch_recv
= cli
->dispatch_recv
;
1635 state
->orig
.in
.server_unc
= _server_unc
;
1636 state
->orig
.in
.path
= _path
;
1637 state
->orig
.in
.user
= _user
;
1638 state
->orig
.in
.info_ctr
= _info_ctr
;
1639 state
->orig
.in
.max_buffer
= _max_buffer
;
1640 state
->orig
.in
.resume_handle
= _resume_handle
;
1642 /* Out parameters */
1643 state
->orig
.out
.info_ctr
= _info_ctr
;
1644 state
->orig
.out
.totalentries
= _totalentries
;
1645 state
->orig
.out
.resume_handle
= _resume_handle
;
1648 ZERO_STRUCT(state
->orig
.out
.result
);
1650 if (DEBUGLEVEL
>= 10) {
1651 NDR_PRINT_IN_DEBUG(srvsvc_NetFileEnum
, &state
->orig
);
1654 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1655 "rpccli_srvsvc_NetFileEnum_out_memory");
1656 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1657 return tevent_req_post(req
, ev
);
1660 /* make a temporary copy, that we pass to the dispatch function */
1661 state
->tmp
= state
->orig
;
1663 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1665 NDR_SRVSVC_NETFILEENUM
,
1667 if (tevent_req_nomem(subreq
, req
)) {
1668 return tevent_req_post(req
, ev
);
1670 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetFileEnum_done
, req
);
1674 static void rpccli_srvsvc_NetFileEnum_done(struct tevent_req
*subreq
)
1676 struct tevent_req
*req
= tevent_req_callback_data(
1677 subreq
, struct tevent_req
);
1678 struct rpccli_srvsvc_NetFileEnum_state
*state
= tevent_req_data(
1679 req
, struct rpccli_srvsvc_NetFileEnum_state
);
1681 TALLOC_CTX
*mem_ctx
;
1683 if (state
->out_mem_ctx
) {
1684 mem_ctx
= state
->out_mem_ctx
;
1689 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1690 TALLOC_FREE(subreq
);
1691 if (!NT_STATUS_IS_OK(status
)) {
1692 tevent_req_nterror(req
, status
);
1696 /* Copy out parameters */
1697 *state
->orig
.out
.info_ctr
= *state
->tmp
.out
.info_ctr
;
1698 *state
->orig
.out
.totalentries
= *state
->tmp
.out
.totalentries
;
1699 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
1700 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
1704 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1706 /* Reset temporary structure */
1707 ZERO_STRUCT(state
->tmp
);
1709 if (DEBUGLEVEL
>= 10) {
1710 NDR_PRINT_OUT_DEBUG(srvsvc_NetFileEnum
, &state
->orig
);
1713 tevent_req_done(req
);
1716 NTSTATUS
rpccli_srvsvc_NetFileEnum_recv(struct tevent_req
*req
,
1717 TALLOC_CTX
*mem_ctx
,
1720 struct rpccli_srvsvc_NetFileEnum_state
*state
= tevent_req_data(
1721 req
, struct rpccli_srvsvc_NetFileEnum_state
);
1724 if (tevent_req_is_nterror(req
, &status
)) {
1725 tevent_req_received(req
);
1729 /* Steal possbile out parameters to the callers context */
1730 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1733 *result
= state
->orig
.out
.result
;
1735 tevent_req_received(req
);
1736 return NT_STATUS_OK
;
1739 NTSTATUS
rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client
*cli
,
1740 TALLOC_CTX
*mem_ctx
,
1741 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
1742 const char *path
/* [in] [unique,charset(UTF16)] */,
1743 const char *user
/* [in] [unique,charset(UTF16)] */,
1744 struct srvsvc_NetFileInfoCtr
*info_ctr
/* [in,out] [ref] */,
1745 uint32_t max_buffer
/* [in] */,
1746 uint32_t *totalentries
/* [out] [ref] */,
1747 uint32_t *resume_handle
/* [in,out] [unique] */,
1750 struct srvsvc_NetFileEnum r
;
1754 r
.in
.server_unc
= server_unc
;
1757 r
.in
.info_ctr
= info_ctr
;
1758 r
.in
.max_buffer
= max_buffer
;
1759 r
.in
.resume_handle
= resume_handle
;
1761 if (DEBUGLEVEL
>= 10) {
1762 NDR_PRINT_IN_DEBUG(srvsvc_NetFileEnum
, &r
);
1765 status
= cli
->dispatch(cli
,
1768 NDR_SRVSVC_NETFILEENUM
,
1771 if (!NT_STATUS_IS_OK(status
)) {
1775 if (DEBUGLEVEL
>= 10) {
1776 NDR_PRINT_OUT_DEBUG(srvsvc_NetFileEnum
, &r
);
1779 if (NT_STATUS_IS_ERR(status
)) {
1783 /* Return variables */
1784 *info_ctr
= *r
.out
.info_ctr
;
1785 *totalentries
= *r
.out
.totalentries
;
1786 if (resume_handle
&& r
.out
.resume_handle
) {
1787 *resume_handle
= *r
.out
.resume_handle
;
1792 *werror
= r
.out
.result
;
1795 return werror_to_ntstatus(r
.out
.result
);
1798 struct rpccli_srvsvc_NetFileGetInfo_state
{
1799 struct srvsvc_NetFileGetInfo orig
;
1800 struct srvsvc_NetFileGetInfo tmp
;
1801 TALLOC_CTX
*out_mem_ctx
;
1802 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1805 static void rpccli_srvsvc_NetFileGetInfo_done(struct tevent_req
*subreq
);
1807 struct tevent_req
*rpccli_srvsvc_NetFileGetInfo_send(TALLOC_CTX
*mem_ctx
,
1808 struct tevent_context
*ev
,
1809 struct rpc_pipe_client
*cli
,
1810 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
1811 uint32_t _fid
/* [in] */,
1812 uint32_t _level
/* [in] */,
1813 union srvsvc_NetFileInfo
*_info
/* [out] [ref,switch_is(level)] */)
1815 struct tevent_req
*req
;
1816 struct rpccli_srvsvc_NetFileGetInfo_state
*state
;
1817 struct tevent_req
*subreq
;
1819 req
= tevent_req_create(mem_ctx
, &state
,
1820 struct rpccli_srvsvc_NetFileGetInfo_state
);
1824 state
->out_mem_ctx
= NULL
;
1825 state
->dispatch_recv
= cli
->dispatch_recv
;
1828 state
->orig
.in
.server_unc
= _server_unc
;
1829 state
->orig
.in
.fid
= _fid
;
1830 state
->orig
.in
.level
= _level
;
1832 /* Out parameters */
1833 state
->orig
.out
.info
= _info
;
1836 ZERO_STRUCT(state
->orig
.out
.result
);
1838 if (DEBUGLEVEL
>= 10) {
1839 NDR_PRINT_IN_DEBUG(srvsvc_NetFileGetInfo
, &state
->orig
);
1842 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1843 "rpccli_srvsvc_NetFileGetInfo_out_memory");
1844 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1845 return tevent_req_post(req
, ev
);
1848 /* make a temporary copy, that we pass to the dispatch function */
1849 state
->tmp
= state
->orig
;
1851 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1853 NDR_SRVSVC_NETFILEGETINFO
,
1855 if (tevent_req_nomem(subreq
, req
)) {
1856 return tevent_req_post(req
, ev
);
1858 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetFileGetInfo_done
, req
);
1862 static void rpccli_srvsvc_NetFileGetInfo_done(struct tevent_req
*subreq
)
1864 struct tevent_req
*req
= tevent_req_callback_data(
1865 subreq
, struct tevent_req
);
1866 struct rpccli_srvsvc_NetFileGetInfo_state
*state
= tevent_req_data(
1867 req
, struct rpccli_srvsvc_NetFileGetInfo_state
);
1869 TALLOC_CTX
*mem_ctx
;
1871 if (state
->out_mem_ctx
) {
1872 mem_ctx
= state
->out_mem_ctx
;
1877 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1878 TALLOC_FREE(subreq
);
1879 if (!NT_STATUS_IS_OK(status
)) {
1880 tevent_req_nterror(req
, status
);
1884 /* Copy out parameters */
1885 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
1888 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1890 /* Reset temporary structure */
1891 ZERO_STRUCT(state
->tmp
);
1893 if (DEBUGLEVEL
>= 10) {
1894 NDR_PRINT_OUT_DEBUG(srvsvc_NetFileGetInfo
, &state
->orig
);
1897 tevent_req_done(req
);
1900 NTSTATUS
rpccli_srvsvc_NetFileGetInfo_recv(struct tevent_req
*req
,
1901 TALLOC_CTX
*mem_ctx
,
1904 struct rpccli_srvsvc_NetFileGetInfo_state
*state
= tevent_req_data(
1905 req
, struct rpccli_srvsvc_NetFileGetInfo_state
);
1908 if (tevent_req_is_nterror(req
, &status
)) {
1909 tevent_req_received(req
);
1913 /* Steal possbile out parameters to the callers context */
1914 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1917 *result
= state
->orig
.out
.result
;
1919 tevent_req_received(req
);
1920 return NT_STATUS_OK
;
1923 NTSTATUS
rpccli_srvsvc_NetFileGetInfo(struct rpc_pipe_client
*cli
,
1924 TALLOC_CTX
*mem_ctx
,
1925 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
1926 uint32_t fid
/* [in] */,
1927 uint32_t level
/* [in] */,
1928 union srvsvc_NetFileInfo
*info
/* [out] [ref,switch_is(level)] */,
1931 struct srvsvc_NetFileGetInfo r
;
1935 r
.in
.server_unc
= server_unc
;
1939 if (DEBUGLEVEL
>= 10) {
1940 NDR_PRINT_IN_DEBUG(srvsvc_NetFileGetInfo
, &r
);
1943 status
= cli
->dispatch(cli
,
1946 NDR_SRVSVC_NETFILEGETINFO
,
1949 if (!NT_STATUS_IS_OK(status
)) {
1953 if (DEBUGLEVEL
>= 10) {
1954 NDR_PRINT_OUT_DEBUG(srvsvc_NetFileGetInfo
, &r
);
1957 if (NT_STATUS_IS_ERR(status
)) {
1961 /* Return variables */
1962 *info
= *r
.out
.info
;
1966 *werror
= r
.out
.result
;
1969 return werror_to_ntstatus(r
.out
.result
);
1972 struct rpccli_srvsvc_NetFileClose_state
{
1973 struct srvsvc_NetFileClose orig
;
1974 struct srvsvc_NetFileClose tmp
;
1975 TALLOC_CTX
*out_mem_ctx
;
1976 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1979 static void rpccli_srvsvc_NetFileClose_done(struct tevent_req
*subreq
);
1981 struct tevent_req
*rpccli_srvsvc_NetFileClose_send(TALLOC_CTX
*mem_ctx
,
1982 struct tevent_context
*ev
,
1983 struct rpc_pipe_client
*cli
,
1984 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
1985 uint32_t _fid
/* [in] */)
1987 struct tevent_req
*req
;
1988 struct rpccli_srvsvc_NetFileClose_state
*state
;
1989 struct tevent_req
*subreq
;
1991 req
= tevent_req_create(mem_ctx
, &state
,
1992 struct rpccli_srvsvc_NetFileClose_state
);
1996 state
->out_mem_ctx
= NULL
;
1997 state
->dispatch_recv
= cli
->dispatch_recv
;
2000 state
->orig
.in
.server_unc
= _server_unc
;
2001 state
->orig
.in
.fid
= _fid
;
2003 /* Out parameters */
2006 ZERO_STRUCT(state
->orig
.out
.result
);
2008 if (DEBUGLEVEL
>= 10) {
2009 NDR_PRINT_IN_DEBUG(srvsvc_NetFileClose
, &state
->orig
);
2012 /* make a temporary copy, that we pass to the dispatch function */
2013 state
->tmp
= state
->orig
;
2015 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2017 NDR_SRVSVC_NETFILECLOSE
,
2019 if (tevent_req_nomem(subreq
, req
)) {
2020 return tevent_req_post(req
, ev
);
2022 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetFileClose_done
, req
);
2026 static void rpccli_srvsvc_NetFileClose_done(struct tevent_req
*subreq
)
2028 struct tevent_req
*req
= tevent_req_callback_data(
2029 subreq
, struct tevent_req
);
2030 struct rpccli_srvsvc_NetFileClose_state
*state
= tevent_req_data(
2031 req
, struct rpccli_srvsvc_NetFileClose_state
);
2033 TALLOC_CTX
*mem_ctx
;
2035 if (state
->out_mem_ctx
) {
2036 mem_ctx
= state
->out_mem_ctx
;
2041 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2042 TALLOC_FREE(subreq
);
2043 if (!NT_STATUS_IS_OK(status
)) {
2044 tevent_req_nterror(req
, status
);
2048 /* Copy out parameters */
2051 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2053 /* Reset temporary structure */
2054 ZERO_STRUCT(state
->tmp
);
2056 if (DEBUGLEVEL
>= 10) {
2057 NDR_PRINT_OUT_DEBUG(srvsvc_NetFileClose
, &state
->orig
);
2060 tevent_req_done(req
);
2063 NTSTATUS
rpccli_srvsvc_NetFileClose_recv(struct tevent_req
*req
,
2064 TALLOC_CTX
*mem_ctx
,
2067 struct rpccli_srvsvc_NetFileClose_state
*state
= tevent_req_data(
2068 req
, struct rpccli_srvsvc_NetFileClose_state
);
2071 if (tevent_req_is_nterror(req
, &status
)) {
2072 tevent_req_received(req
);
2076 /* Steal possbile out parameters to the callers context */
2077 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2080 *result
= state
->orig
.out
.result
;
2082 tevent_req_received(req
);
2083 return NT_STATUS_OK
;
2086 NTSTATUS
rpccli_srvsvc_NetFileClose(struct rpc_pipe_client
*cli
,
2087 TALLOC_CTX
*mem_ctx
,
2088 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
2089 uint32_t fid
/* [in] */,
2092 struct srvsvc_NetFileClose r
;
2096 r
.in
.server_unc
= server_unc
;
2099 if (DEBUGLEVEL
>= 10) {
2100 NDR_PRINT_IN_DEBUG(srvsvc_NetFileClose
, &r
);
2103 status
= cli
->dispatch(cli
,
2106 NDR_SRVSVC_NETFILECLOSE
,
2109 if (!NT_STATUS_IS_OK(status
)) {
2113 if (DEBUGLEVEL
>= 10) {
2114 NDR_PRINT_OUT_DEBUG(srvsvc_NetFileClose
, &r
);
2117 if (NT_STATUS_IS_ERR(status
)) {
2121 /* Return variables */
2125 *werror
= r
.out
.result
;
2128 return werror_to_ntstatus(r
.out
.result
);
2131 struct rpccli_srvsvc_NetSessEnum_state
{
2132 struct srvsvc_NetSessEnum orig
;
2133 struct srvsvc_NetSessEnum tmp
;
2134 TALLOC_CTX
*out_mem_ctx
;
2135 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2138 static void rpccli_srvsvc_NetSessEnum_done(struct tevent_req
*subreq
);
2140 struct tevent_req
*rpccli_srvsvc_NetSessEnum_send(TALLOC_CTX
*mem_ctx
,
2141 struct tevent_context
*ev
,
2142 struct rpc_pipe_client
*cli
,
2143 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
2144 const char *_client
/* [in] [unique,charset(UTF16)] */,
2145 const char *_user
/* [in] [unique,charset(UTF16)] */,
2146 struct srvsvc_NetSessInfoCtr
*_info_ctr
/* [in,out] [ref] */,
2147 uint32_t _max_buffer
/* [in] */,
2148 uint32_t *_totalentries
/* [out] [ref] */,
2149 uint32_t *_resume_handle
/* [in,out] [unique] */)
2151 struct tevent_req
*req
;
2152 struct rpccli_srvsvc_NetSessEnum_state
*state
;
2153 struct tevent_req
*subreq
;
2155 req
= tevent_req_create(mem_ctx
, &state
,
2156 struct rpccli_srvsvc_NetSessEnum_state
);
2160 state
->out_mem_ctx
= NULL
;
2161 state
->dispatch_recv
= cli
->dispatch_recv
;
2164 state
->orig
.in
.server_unc
= _server_unc
;
2165 state
->orig
.in
.client
= _client
;
2166 state
->orig
.in
.user
= _user
;
2167 state
->orig
.in
.info_ctr
= _info_ctr
;
2168 state
->orig
.in
.max_buffer
= _max_buffer
;
2169 state
->orig
.in
.resume_handle
= _resume_handle
;
2171 /* Out parameters */
2172 state
->orig
.out
.info_ctr
= _info_ctr
;
2173 state
->orig
.out
.totalentries
= _totalentries
;
2174 state
->orig
.out
.resume_handle
= _resume_handle
;
2177 ZERO_STRUCT(state
->orig
.out
.result
);
2179 if (DEBUGLEVEL
>= 10) {
2180 NDR_PRINT_IN_DEBUG(srvsvc_NetSessEnum
, &state
->orig
);
2183 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2184 "rpccli_srvsvc_NetSessEnum_out_memory");
2185 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2186 return tevent_req_post(req
, ev
);
2189 /* make a temporary copy, that we pass to the dispatch function */
2190 state
->tmp
= state
->orig
;
2192 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2194 NDR_SRVSVC_NETSESSENUM
,
2196 if (tevent_req_nomem(subreq
, req
)) {
2197 return tevent_req_post(req
, ev
);
2199 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetSessEnum_done
, req
);
2203 static void rpccli_srvsvc_NetSessEnum_done(struct tevent_req
*subreq
)
2205 struct tevent_req
*req
= tevent_req_callback_data(
2206 subreq
, struct tevent_req
);
2207 struct rpccli_srvsvc_NetSessEnum_state
*state
= tevent_req_data(
2208 req
, struct rpccli_srvsvc_NetSessEnum_state
);
2210 TALLOC_CTX
*mem_ctx
;
2212 if (state
->out_mem_ctx
) {
2213 mem_ctx
= state
->out_mem_ctx
;
2218 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2219 TALLOC_FREE(subreq
);
2220 if (!NT_STATUS_IS_OK(status
)) {
2221 tevent_req_nterror(req
, status
);
2225 /* Copy out parameters */
2226 *state
->orig
.out
.info_ctr
= *state
->tmp
.out
.info_ctr
;
2227 *state
->orig
.out
.totalentries
= *state
->tmp
.out
.totalentries
;
2228 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
2229 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
2233 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2235 /* Reset temporary structure */
2236 ZERO_STRUCT(state
->tmp
);
2238 if (DEBUGLEVEL
>= 10) {
2239 NDR_PRINT_OUT_DEBUG(srvsvc_NetSessEnum
, &state
->orig
);
2242 tevent_req_done(req
);
2245 NTSTATUS
rpccli_srvsvc_NetSessEnum_recv(struct tevent_req
*req
,
2246 TALLOC_CTX
*mem_ctx
,
2249 struct rpccli_srvsvc_NetSessEnum_state
*state
= tevent_req_data(
2250 req
, struct rpccli_srvsvc_NetSessEnum_state
);
2253 if (tevent_req_is_nterror(req
, &status
)) {
2254 tevent_req_received(req
);
2258 /* Steal possbile out parameters to the callers context */
2259 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2262 *result
= state
->orig
.out
.result
;
2264 tevent_req_received(req
);
2265 return NT_STATUS_OK
;
2268 NTSTATUS
rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client
*cli
,
2269 TALLOC_CTX
*mem_ctx
,
2270 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
2271 const char *client
/* [in] [unique,charset(UTF16)] */,
2272 const char *user
/* [in] [unique,charset(UTF16)] */,
2273 struct srvsvc_NetSessInfoCtr
*info_ctr
/* [in,out] [ref] */,
2274 uint32_t max_buffer
/* [in] */,
2275 uint32_t *totalentries
/* [out] [ref] */,
2276 uint32_t *resume_handle
/* [in,out] [unique] */,
2279 struct srvsvc_NetSessEnum r
;
2283 r
.in
.server_unc
= server_unc
;
2284 r
.in
.client
= client
;
2286 r
.in
.info_ctr
= info_ctr
;
2287 r
.in
.max_buffer
= max_buffer
;
2288 r
.in
.resume_handle
= resume_handle
;
2290 if (DEBUGLEVEL
>= 10) {
2291 NDR_PRINT_IN_DEBUG(srvsvc_NetSessEnum
, &r
);
2294 status
= cli
->dispatch(cli
,
2297 NDR_SRVSVC_NETSESSENUM
,
2300 if (!NT_STATUS_IS_OK(status
)) {
2304 if (DEBUGLEVEL
>= 10) {
2305 NDR_PRINT_OUT_DEBUG(srvsvc_NetSessEnum
, &r
);
2308 if (NT_STATUS_IS_ERR(status
)) {
2312 /* Return variables */
2313 *info_ctr
= *r
.out
.info_ctr
;
2314 *totalentries
= *r
.out
.totalentries
;
2315 if (resume_handle
&& r
.out
.resume_handle
) {
2316 *resume_handle
= *r
.out
.resume_handle
;
2321 *werror
= r
.out
.result
;
2324 return werror_to_ntstatus(r
.out
.result
);
2327 struct rpccli_srvsvc_NetSessDel_state
{
2328 struct srvsvc_NetSessDel orig
;
2329 struct srvsvc_NetSessDel tmp
;
2330 TALLOC_CTX
*out_mem_ctx
;
2331 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2334 static void rpccli_srvsvc_NetSessDel_done(struct tevent_req
*subreq
);
2336 struct tevent_req
*rpccli_srvsvc_NetSessDel_send(TALLOC_CTX
*mem_ctx
,
2337 struct tevent_context
*ev
,
2338 struct rpc_pipe_client
*cli
,
2339 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
2340 const char *_client
/* [in] [unique,charset(UTF16)] */,
2341 const char *_user
/* [in] [unique,charset(UTF16)] */)
2343 struct tevent_req
*req
;
2344 struct rpccli_srvsvc_NetSessDel_state
*state
;
2345 struct tevent_req
*subreq
;
2347 req
= tevent_req_create(mem_ctx
, &state
,
2348 struct rpccli_srvsvc_NetSessDel_state
);
2352 state
->out_mem_ctx
= NULL
;
2353 state
->dispatch_recv
= cli
->dispatch_recv
;
2356 state
->orig
.in
.server_unc
= _server_unc
;
2357 state
->orig
.in
.client
= _client
;
2358 state
->orig
.in
.user
= _user
;
2360 /* Out parameters */
2363 ZERO_STRUCT(state
->orig
.out
.result
);
2365 if (DEBUGLEVEL
>= 10) {
2366 NDR_PRINT_IN_DEBUG(srvsvc_NetSessDel
, &state
->orig
);
2369 /* make a temporary copy, that we pass to the dispatch function */
2370 state
->tmp
= state
->orig
;
2372 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2374 NDR_SRVSVC_NETSESSDEL
,
2376 if (tevent_req_nomem(subreq
, req
)) {
2377 return tevent_req_post(req
, ev
);
2379 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetSessDel_done
, req
);
2383 static void rpccli_srvsvc_NetSessDel_done(struct tevent_req
*subreq
)
2385 struct tevent_req
*req
= tevent_req_callback_data(
2386 subreq
, struct tevent_req
);
2387 struct rpccli_srvsvc_NetSessDel_state
*state
= tevent_req_data(
2388 req
, struct rpccli_srvsvc_NetSessDel_state
);
2390 TALLOC_CTX
*mem_ctx
;
2392 if (state
->out_mem_ctx
) {
2393 mem_ctx
= state
->out_mem_ctx
;
2398 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2399 TALLOC_FREE(subreq
);
2400 if (!NT_STATUS_IS_OK(status
)) {
2401 tevent_req_nterror(req
, status
);
2405 /* Copy out parameters */
2408 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2410 /* Reset temporary structure */
2411 ZERO_STRUCT(state
->tmp
);
2413 if (DEBUGLEVEL
>= 10) {
2414 NDR_PRINT_OUT_DEBUG(srvsvc_NetSessDel
, &state
->orig
);
2417 tevent_req_done(req
);
2420 NTSTATUS
rpccli_srvsvc_NetSessDel_recv(struct tevent_req
*req
,
2421 TALLOC_CTX
*mem_ctx
,
2424 struct rpccli_srvsvc_NetSessDel_state
*state
= tevent_req_data(
2425 req
, struct rpccli_srvsvc_NetSessDel_state
);
2428 if (tevent_req_is_nterror(req
, &status
)) {
2429 tevent_req_received(req
);
2433 /* Steal possbile out parameters to the callers context */
2434 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2437 *result
= state
->orig
.out
.result
;
2439 tevent_req_received(req
);
2440 return NT_STATUS_OK
;
2443 NTSTATUS
rpccli_srvsvc_NetSessDel(struct rpc_pipe_client
*cli
,
2444 TALLOC_CTX
*mem_ctx
,
2445 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
2446 const char *client
/* [in] [unique,charset(UTF16)] */,
2447 const char *user
/* [in] [unique,charset(UTF16)] */,
2450 struct srvsvc_NetSessDel r
;
2454 r
.in
.server_unc
= server_unc
;
2455 r
.in
.client
= client
;
2458 if (DEBUGLEVEL
>= 10) {
2459 NDR_PRINT_IN_DEBUG(srvsvc_NetSessDel
, &r
);
2462 status
= cli
->dispatch(cli
,
2465 NDR_SRVSVC_NETSESSDEL
,
2468 if (!NT_STATUS_IS_OK(status
)) {
2472 if (DEBUGLEVEL
>= 10) {
2473 NDR_PRINT_OUT_DEBUG(srvsvc_NetSessDel
, &r
);
2476 if (NT_STATUS_IS_ERR(status
)) {
2480 /* Return variables */
2484 *werror
= r
.out
.result
;
2487 return werror_to_ntstatus(r
.out
.result
);
2490 struct rpccli_srvsvc_NetShareAdd_state
{
2491 struct srvsvc_NetShareAdd orig
;
2492 struct srvsvc_NetShareAdd tmp
;
2493 TALLOC_CTX
*out_mem_ctx
;
2494 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2497 static void rpccli_srvsvc_NetShareAdd_done(struct tevent_req
*subreq
);
2499 struct tevent_req
*rpccli_srvsvc_NetShareAdd_send(TALLOC_CTX
*mem_ctx
,
2500 struct tevent_context
*ev
,
2501 struct rpc_pipe_client
*cli
,
2502 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
2503 uint32_t _level
/* [in] */,
2504 union srvsvc_NetShareInfo
*_info
/* [in] [ref,switch_is(level)] */,
2505 uint32_t *_parm_error
/* [in,out] [unique] */)
2507 struct tevent_req
*req
;
2508 struct rpccli_srvsvc_NetShareAdd_state
*state
;
2509 struct tevent_req
*subreq
;
2511 req
= tevent_req_create(mem_ctx
, &state
,
2512 struct rpccli_srvsvc_NetShareAdd_state
);
2516 state
->out_mem_ctx
= NULL
;
2517 state
->dispatch_recv
= cli
->dispatch_recv
;
2520 state
->orig
.in
.server_unc
= _server_unc
;
2521 state
->orig
.in
.level
= _level
;
2522 state
->orig
.in
.info
= _info
;
2523 state
->orig
.in
.parm_error
= _parm_error
;
2525 /* Out parameters */
2526 state
->orig
.out
.parm_error
= _parm_error
;
2529 ZERO_STRUCT(state
->orig
.out
.result
);
2531 if (DEBUGLEVEL
>= 10) {
2532 NDR_PRINT_IN_DEBUG(srvsvc_NetShareAdd
, &state
->orig
);
2535 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2536 "rpccli_srvsvc_NetShareAdd_out_memory");
2537 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2538 return tevent_req_post(req
, ev
);
2541 /* make a temporary copy, that we pass to the dispatch function */
2542 state
->tmp
= state
->orig
;
2544 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2546 NDR_SRVSVC_NETSHAREADD
,
2548 if (tevent_req_nomem(subreq
, req
)) {
2549 return tevent_req_post(req
, ev
);
2551 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareAdd_done
, req
);
2555 static void rpccli_srvsvc_NetShareAdd_done(struct tevent_req
*subreq
)
2557 struct tevent_req
*req
= tevent_req_callback_data(
2558 subreq
, struct tevent_req
);
2559 struct rpccli_srvsvc_NetShareAdd_state
*state
= tevent_req_data(
2560 req
, struct rpccli_srvsvc_NetShareAdd_state
);
2562 TALLOC_CTX
*mem_ctx
;
2564 if (state
->out_mem_ctx
) {
2565 mem_ctx
= state
->out_mem_ctx
;
2570 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2571 TALLOC_FREE(subreq
);
2572 if (!NT_STATUS_IS_OK(status
)) {
2573 tevent_req_nterror(req
, status
);
2577 /* Copy out parameters */
2578 if (state
->orig
.out
.parm_error
&& state
->tmp
.out
.parm_error
) {
2579 *state
->orig
.out
.parm_error
= *state
->tmp
.out
.parm_error
;
2583 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2585 /* Reset temporary structure */
2586 ZERO_STRUCT(state
->tmp
);
2588 if (DEBUGLEVEL
>= 10) {
2589 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareAdd
, &state
->orig
);
2592 tevent_req_done(req
);
2595 NTSTATUS
rpccli_srvsvc_NetShareAdd_recv(struct tevent_req
*req
,
2596 TALLOC_CTX
*mem_ctx
,
2599 struct rpccli_srvsvc_NetShareAdd_state
*state
= tevent_req_data(
2600 req
, struct rpccli_srvsvc_NetShareAdd_state
);
2603 if (tevent_req_is_nterror(req
, &status
)) {
2604 tevent_req_received(req
);
2608 /* Steal possbile out parameters to the callers context */
2609 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2612 *result
= state
->orig
.out
.result
;
2614 tevent_req_received(req
);
2615 return NT_STATUS_OK
;
2618 NTSTATUS
rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client
*cli
,
2619 TALLOC_CTX
*mem_ctx
,
2620 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
2621 uint32_t level
/* [in] */,
2622 union srvsvc_NetShareInfo
*info
/* [in] [ref,switch_is(level)] */,
2623 uint32_t *parm_error
/* [in,out] [unique] */,
2626 struct srvsvc_NetShareAdd r
;
2630 r
.in
.server_unc
= server_unc
;
2633 r
.in
.parm_error
= parm_error
;
2635 if (DEBUGLEVEL
>= 10) {
2636 NDR_PRINT_IN_DEBUG(srvsvc_NetShareAdd
, &r
);
2639 status
= cli
->dispatch(cli
,
2642 NDR_SRVSVC_NETSHAREADD
,
2645 if (!NT_STATUS_IS_OK(status
)) {
2649 if (DEBUGLEVEL
>= 10) {
2650 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareAdd
, &r
);
2653 if (NT_STATUS_IS_ERR(status
)) {
2657 /* Return variables */
2658 if (parm_error
&& r
.out
.parm_error
) {
2659 *parm_error
= *r
.out
.parm_error
;
2664 *werror
= r
.out
.result
;
2667 return werror_to_ntstatus(r
.out
.result
);
2670 struct rpccli_srvsvc_NetShareEnumAll_state
{
2671 struct srvsvc_NetShareEnumAll orig
;
2672 struct srvsvc_NetShareEnumAll tmp
;
2673 TALLOC_CTX
*out_mem_ctx
;
2674 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2677 static void rpccli_srvsvc_NetShareEnumAll_done(struct tevent_req
*subreq
);
2679 struct tevent_req
*rpccli_srvsvc_NetShareEnumAll_send(TALLOC_CTX
*mem_ctx
,
2680 struct tevent_context
*ev
,
2681 struct rpc_pipe_client
*cli
,
2682 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
2683 struct srvsvc_NetShareInfoCtr
*_info_ctr
/* [in,out] [ref] */,
2684 uint32_t _max_buffer
/* [in] */,
2685 uint32_t *_totalentries
/* [out] [ref] */,
2686 uint32_t *_resume_handle
/* [in,out] [unique] */)
2688 struct tevent_req
*req
;
2689 struct rpccli_srvsvc_NetShareEnumAll_state
*state
;
2690 struct tevent_req
*subreq
;
2692 req
= tevent_req_create(mem_ctx
, &state
,
2693 struct rpccli_srvsvc_NetShareEnumAll_state
);
2697 state
->out_mem_ctx
= NULL
;
2698 state
->dispatch_recv
= cli
->dispatch_recv
;
2701 state
->orig
.in
.server_unc
= _server_unc
;
2702 state
->orig
.in
.info_ctr
= _info_ctr
;
2703 state
->orig
.in
.max_buffer
= _max_buffer
;
2704 state
->orig
.in
.resume_handle
= _resume_handle
;
2706 /* Out parameters */
2707 state
->orig
.out
.info_ctr
= _info_ctr
;
2708 state
->orig
.out
.totalentries
= _totalentries
;
2709 state
->orig
.out
.resume_handle
= _resume_handle
;
2712 ZERO_STRUCT(state
->orig
.out
.result
);
2714 if (DEBUGLEVEL
>= 10) {
2715 NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnumAll
, &state
->orig
);
2718 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2719 "rpccli_srvsvc_NetShareEnumAll_out_memory");
2720 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2721 return tevent_req_post(req
, ev
);
2724 /* make a temporary copy, that we pass to the dispatch function */
2725 state
->tmp
= state
->orig
;
2727 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2729 NDR_SRVSVC_NETSHAREENUMALL
,
2731 if (tevent_req_nomem(subreq
, req
)) {
2732 return tevent_req_post(req
, ev
);
2734 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareEnumAll_done
, req
);
2738 static void rpccli_srvsvc_NetShareEnumAll_done(struct tevent_req
*subreq
)
2740 struct tevent_req
*req
= tevent_req_callback_data(
2741 subreq
, struct tevent_req
);
2742 struct rpccli_srvsvc_NetShareEnumAll_state
*state
= tevent_req_data(
2743 req
, struct rpccli_srvsvc_NetShareEnumAll_state
);
2745 TALLOC_CTX
*mem_ctx
;
2747 if (state
->out_mem_ctx
) {
2748 mem_ctx
= state
->out_mem_ctx
;
2753 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2754 TALLOC_FREE(subreq
);
2755 if (!NT_STATUS_IS_OK(status
)) {
2756 tevent_req_nterror(req
, status
);
2760 /* Copy out parameters */
2761 *state
->orig
.out
.info_ctr
= *state
->tmp
.out
.info_ctr
;
2762 *state
->orig
.out
.totalentries
= *state
->tmp
.out
.totalentries
;
2763 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
2764 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
2768 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2770 /* Reset temporary structure */
2771 ZERO_STRUCT(state
->tmp
);
2773 if (DEBUGLEVEL
>= 10) {
2774 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnumAll
, &state
->orig
);
2777 tevent_req_done(req
);
2780 NTSTATUS
rpccli_srvsvc_NetShareEnumAll_recv(struct tevent_req
*req
,
2781 TALLOC_CTX
*mem_ctx
,
2784 struct rpccli_srvsvc_NetShareEnumAll_state
*state
= tevent_req_data(
2785 req
, struct rpccli_srvsvc_NetShareEnumAll_state
);
2788 if (tevent_req_is_nterror(req
, &status
)) {
2789 tevent_req_received(req
);
2793 /* Steal possbile out parameters to the callers context */
2794 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2797 *result
= state
->orig
.out
.result
;
2799 tevent_req_received(req
);
2800 return NT_STATUS_OK
;
2803 NTSTATUS
rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client
*cli
,
2804 TALLOC_CTX
*mem_ctx
,
2805 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
2806 struct srvsvc_NetShareInfoCtr
*info_ctr
/* [in,out] [ref] */,
2807 uint32_t max_buffer
/* [in] */,
2808 uint32_t *totalentries
/* [out] [ref] */,
2809 uint32_t *resume_handle
/* [in,out] [unique] */,
2812 struct srvsvc_NetShareEnumAll r
;
2816 r
.in
.server_unc
= server_unc
;
2817 r
.in
.info_ctr
= info_ctr
;
2818 r
.in
.max_buffer
= max_buffer
;
2819 r
.in
.resume_handle
= resume_handle
;
2821 if (DEBUGLEVEL
>= 10) {
2822 NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnumAll
, &r
);
2825 status
= cli
->dispatch(cli
,
2828 NDR_SRVSVC_NETSHAREENUMALL
,
2831 if (!NT_STATUS_IS_OK(status
)) {
2835 if (DEBUGLEVEL
>= 10) {
2836 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnumAll
, &r
);
2839 if (NT_STATUS_IS_ERR(status
)) {
2843 /* Return variables */
2844 *info_ctr
= *r
.out
.info_ctr
;
2845 *totalentries
= *r
.out
.totalentries
;
2846 if (resume_handle
&& r
.out
.resume_handle
) {
2847 *resume_handle
= *r
.out
.resume_handle
;
2852 *werror
= r
.out
.result
;
2855 return werror_to_ntstatus(r
.out
.result
);
2858 struct rpccli_srvsvc_NetShareGetInfo_state
{
2859 struct srvsvc_NetShareGetInfo orig
;
2860 struct srvsvc_NetShareGetInfo tmp
;
2861 TALLOC_CTX
*out_mem_ctx
;
2862 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2865 static void rpccli_srvsvc_NetShareGetInfo_done(struct tevent_req
*subreq
);
2867 struct tevent_req
*rpccli_srvsvc_NetShareGetInfo_send(TALLOC_CTX
*mem_ctx
,
2868 struct tevent_context
*ev
,
2869 struct rpc_pipe_client
*cli
,
2870 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
2871 const char *_share_name
/* [in] [charset(UTF16)] */,
2872 uint32_t _level
/* [in] */,
2873 union srvsvc_NetShareInfo
*_info
/* [out] [ref,switch_is(level)] */)
2875 struct tevent_req
*req
;
2876 struct rpccli_srvsvc_NetShareGetInfo_state
*state
;
2877 struct tevent_req
*subreq
;
2879 req
= tevent_req_create(mem_ctx
, &state
,
2880 struct rpccli_srvsvc_NetShareGetInfo_state
);
2884 state
->out_mem_ctx
= NULL
;
2885 state
->dispatch_recv
= cli
->dispatch_recv
;
2888 state
->orig
.in
.server_unc
= _server_unc
;
2889 state
->orig
.in
.share_name
= _share_name
;
2890 state
->orig
.in
.level
= _level
;
2892 /* Out parameters */
2893 state
->orig
.out
.info
= _info
;
2896 ZERO_STRUCT(state
->orig
.out
.result
);
2898 if (DEBUGLEVEL
>= 10) {
2899 NDR_PRINT_IN_DEBUG(srvsvc_NetShareGetInfo
, &state
->orig
);
2902 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2903 "rpccli_srvsvc_NetShareGetInfo_out_memory");
2904 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2905 return tevent_req_post(req
, ev
);
2908 /* make a temporary copy, that we pass to the dispatch function */
2909 state
->tmp
= state
->orig
;
2911 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2913 NDR_SRVSVC_NETSHAREGETINFO
,
2915 if (tevent_req_nomem(subreq
, req
)) {
2916 return tevent_req_post(req
, ev
);
2918 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareGetInfo_done
, req
);
2922 static void rpccli_srvsvc_NetShareGetInfo_done(struct tevent_req
*subreq
)
2924 struct tevent_req
*req
= tevent_req_callback_data(
2925 subreq
, struct tevent_req
);
2926 struct rpccli_srvsvc_NetShareGetInfo_state
*state
= tevent_req_data(
2927 req
, struct rpccli_srvsvc_NetShareGetInfo_state
);
2929 TALLOC_CTX
*mem_ctx
;
2931 if (state
->out_mem_ctx
) {
2932 mem_ctx
= state
->out_mem_ctx
;
2937 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2938 TALLOC_FREE(subreq
);
2939 if (!NT_STATUS_IS_OK(status
)) {
2940 tevent_req_nterror(req
, status
);
2944 /* Copy out parameters */
2945 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
2948 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2950 /* Reset temporary structure */
2951 ZERO_STRUCT(state
->tmp
);
2953 if (DEBUGLEVEL
>= 10) {
2954 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareGetInfo
, &state
->orig
);
2957 tevent_req_done(req
);
2960 NTSTATUS
rpccli_srvsvc_NetShareGetInfo_recv(struct tevent_req
*req
,
2961 TALLOC_CTX
*mem_ctx
,
2964 struct rpccli_srvsvc_NetShareGetInfo_state
*state
= tevent_req_data(
2965 req
, struct rpccli_srvsvc_NetShareGetInfo_state
);
2968 if (tevent_req_is_nterror(req
, &status
)) {
2969 tevent_req_received(req
);
2973 /* Steal possbile out parameters to the callers context */
2974 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2977 *result
= state
->orig
.out
.result
;
2979 tevent_req_received(req
);
2980 return NT_STATUS_OK
;
2983 NTSTATUS
rpccli_srvsvc_NetShareGetInfo(struct rpc_pipe_client
*cli
,
2984 TALLOC_CTX
*mem_ctx
,
2985 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
2986 const char *share_name
/* [in] [charset(UTF16)] */,
2987 uint32_t level
/* [in] */,
2988 union srvsvc_NetShareInfo
*info
/* [out] [ref,switch_is(level)] */,
2991 struct srvsvc_NetShareGetInfo r
;
2995 r
.in
.server_unc
= server_unc
;
2996 r
.in
.share_name
= share_name
;
2999 if (DEBUGLEVEL
>= 10) {
3000 NDR_PRINT_IN_DEBUG(srvsvc_NetShareGetInfo
, &r
);
3003 status
= cli
->dispatch(cli
,
3006 NDR_SRVSVC_NETSHAREGETINFO
,
3009 if (!NT_STATUS_IS_OK(status
)) {
3013 if (DEBUGLEVEL
>= 10) {
3014 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareGetInfo
, &r
);
3017 if (NT_STATUS_IS_ERR(status
)) {
3021 /* Return variables */
3022 *info
= *r
.out
.info
;
3026 *werror
= r
.out
.result
;
3029 return werror_to_ntstatus(r
.out
.result
);
3032 struct rpccli_srvsvc_NetShareSetInfo_state
{
3033 struct srvsvc_NetShareSetInfo orig
;
3034 struct srvsvc_NetShareSetInfo tmp
;
3035 TALLOC_CTX
*out_mem_ctx
;
3036 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3039 static void rpccli_srvsvc_NetShareSetInfo_done(struct tevent_req
*subreq
);
3041 struct tevent_req
*rpccli_srvsvc_NetShareSetInfo_send(TALLOC_CTX
*mem_ctx
,
3042 struct tevent_context
*ev
,
3043 struct rpc_pipe_client
*cli
,
3044 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
3045 const char *_share_name
/* [in] [charset(UTF16)] */,
3046 uint32_t _level
/* [in] */,
3047 union srvsvc_NetShareInfo
*_info
/* [in] [ref,switch_is(level)] */,
3048 uint32_t *_parm_error
/* [in,out] [unique] */)
3050 struct tevent_req
*req
;
3051 struct rpccli_srvsvc_NetShareSetInfo_state
*state
;
3052 struct tevent_req
*subreq
;
3054 req
= tevent_req_create(mem_ctx
, &state
,
3055 struct rpccli_srvsvc_NetShareSetInfo_state
);
3059 state
->out_mem_ctx
= NULL
;
3060 state
->dispatch_recv
= cli
->dispatch_recv
;
3063 state
->orig
.in
.server_unc
= _server_unc
;
3064 state
->orig
.in
.share_name
= _share_name
;
3065 state
->orig
.in
.level
= _level
;
3066 state
->orig
.in
.info
= _info
;
3067 state
->orig
.in
.parm_error
= _parm_error
;
3069 /* Out parameters */
3070 state
->orig
.out
.parm_error
= _parm_error
;
3073 ZERO_STRUCT(state
->orig
.out
.result
);
3075 if (DEBUGLEVEL
>= 10) {
3076 NDR_PRINT_IN_DEBUG(srvsvc_NetShareSetInfo
, &state
->orig
);
3079 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3080 "rpccli_srvsvc_NetShareSetInfo_out_memory");
3081 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3082 return tevent_req_post(req
, ev
);
3085 /* make a temporary copy, that we pass to the dispatch function */
3086 state
->tmp
= state
->orig
;
3088 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3090 NDR_SRVSVC_NETSHARESETINFO
,
3092 if (tevent_req_nomem(subreq
, req
)) {
3093 return tevent_req_post(req
, ev
);
3095 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareSetInfo_done
, req
);
3099 static void rpccli_srvsvc_NetShareSetInfo_done(struct tevent_req
*subreq
)
3101 struct tevent_req
*req
= tevent_req_callback_data(
3102 subreq
, struct tevent_req
);
3103 struct rpccli_srvsvc_NetShareSetInfo_state
*state
= tevent_req_data(
3104 req
, struct rpccli_srvsvc_NetShareSetInfo_state
);
3106 TALLOC_CTX
*mem_ctx
;
3108 if (state
->out_mem_ctx
) {
3109 mem_ctx
= state
->out_mem_ctx
;
3114 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3115 TALLOC_FREE(subreq
);
3116 if (!NT_STATUS_IS_OK(status
)) {
3117 tevent_req_nterror(req
, status
);
3121 /* Copy out parameters */
3122 if (state
->orig
.out
.parm_error
&& state
->tmp
.out
.parm_error
) {
3123 *state
->orig
.out
.parm_error
= *state
->tmp
.out
.parm_error
;
3127 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3129 /* Reset temporary structure */
3130 ZERO_STRUCT(state
->tmp
);
3132 if (DEBUGLEVEL
>= 10) {
3133 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareSetInfo
, &state
->orig
);
3136 tevent_req_done(req
);
3139 NTSTATUS
rpccli_srvsvc_NetShareSetInfo_recv(struct tevent_req
*req
,
3140 TALLOC_CTX
*mem_ctx
,
3143 struct rpccli_srvsvc_NetShareSetInfo_state
*state
= tevent_req_data(
3144 req
, struct rpccli_srvsvc_NetShareSetInfo_state
);
3147 if (tevent_req_is_nterror(req
, &status
)) {
3148 tevent_req_received(req
);
3152 /* Steal possbile out parameters to the callers context */
3153 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3156 *result
= state
->orig
.out
.result
;
3158 tevent_req_received(req
);
3159 return NT_STATUS_OK
;
3162 NTSTATUS
rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client
*cli
,
3163 TALLOC_CTX
*mem_ctx
,
3164 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
3165 const char *share_name
/* [in] [charset(UTF16)] */,
3166 uint32_t level
/* [in] */,
3167 union srvsvc_NetShareInfo
*info
/* [in] [ref,switch_is(level)] */,
3168 uint32_t *parm_error
/* [in,out] [unique] */,
3171 struct srvsvc_NetShareSetInfo r
;
3175 r
.in
.server_unc
= server_unc
;
3176 r
.in
.share_name
= share_name
;
3179 r
.in
.parm_error
= parm_error
;
3181 if (DEBUGLEVEL
>= 10) {
3182 NDR_PRINT_IN_DEBUG(srvsvc_NetShareSetInfo
, &r
);
3185 status
= cli
->dispatch(cli
,
3188 NDR_SRVSVC_NETSHARESETINFO
,
3191 if (!NT_STATUS_IS_OK(status
)) {
3195 if (DEBUGLEVEL
>= 10) {
3196 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareSetInfo
, &r
);
3199 if (NT_STATUS_IS_ERR(status
)) {
3203 /* Return variables */
3204 if (parm_error
&& r
.out
.parm_error
) {
3205 *parm_error
= *r
.out
.parm_error
;
3210 *werror
= r
.out
.result
;
3213 return werror_to_ntstatus(r
.out
.result
);
3216 struct rpccli_srvsvc_NetShareDel_state
{
3217 struct srvsvc_NetShareDel orig
;
3218 struct srvsvc_NetShareDel tmp
;
3219 TALLOC_CTX
*out_mem_ctx
;
3220 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3223 static void rpccli_srvsvc_NetShareDel_done(struct tevent_req
*subreq
);
3225 struct tevent_req
*rpccli_srvsvc_NetShareDel_send(TALLOC_CTX
*mem_ctx
,
3226 struct tevent_context
*ev
,
3227 struct rpc_pipe_client
*cli
,
3228 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
3229 const char *_share_name
/* [in] [charset(UTF16)] */,
3230 uint32_t _reserved
/* [in] */)
3232 struct tevent_req
*req
;
3233 struct rpccli_srvsvc_NetShareDel_state
*state
;
3234 struct tevent_req
*subreq
;
3236 req
= tevent_req_create(mem_ctx
, &state
,
3237 struct rpccli_srvsvc_NetShareDel_state
);
3241 state
->out_mem_ctx
= NULL
;
3242 state
->dispatch_recv
= cli
->dispatch_recv
;
3245 state
->orig
.in
.server_unc
= _server_unc
;
3246 state
->orig
.in
.share_name
= _share_name
;
3247 state
->orig
.in
.reserved
= _reserved
;
3249 /* Out parameters */
3252 ZERO_STRUCT(state
->orig
.out
.result
);
3254 if (DEBUGLEVEL
>= 10) {
3255 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDel
, &state
->orig
);
3258 /* make a temporary copy, that we pass to the dispatch function */
3259 state
->tmp
= state
->orig
;
3261 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3263 NDR_SRVSVC_NETSHAREDEL
,
3265 if (tevent_req_nomem(subreq
, req
)) {
3266 return tevent_req_post(req
, ev
);
3268 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareDel_done
, req
);
3272 static void rpccli_srvsvc_NetShareDel_done(struct tevent_req
*subreq
)
3274 struct tevent_req
*req
= tevent_req_callback_data(
3275 subreq
, struct tevent_req
);
3276 struct rpccli_srvsvc_NetShareDel_state
*state
= tevent_req_data(
3277 req
, struct rpccli_srvsvc_NetShareDel_state
);
3279 TALLOC_CTX
*mem_ctx
;
3281 if (state
->out_mem_ctx
) {
3282 mem_ctx
= state
->out_mem_ctx
;
3287 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3288 TALLOC_FREE(subreq
);
3289 if (!NT_STATUS_IS_OK(status
)) {
3290 tevent_req_nterror(req
, status
);
3294 /* Copy out parameters */
3297 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3299 /* Reset temporary structure */
3300 ZERO_STRUCT(state
->tmp
);
3302 if (DEBUGLEVEL
>= 10) {
3303 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDel
, &state
->orig
);
3306 tevent_req_done(req
);
3309 NTSTATUS
rpccli_srvsvc_NetShareDel_recv(struct tevent_req
*req
,
3310 TALLOC_CTX
*mem_ctx
,
3313 struct rpccli_srvsvc_NetShareDel_state
*state
= tevent_req_data(
3314 req
, struct rpccli_srvsvc_NetShareDel_state
);
3317 if (tevent_req_is_nterror(req
, &status
)) {
3318 tevent_req_received(req
);
3322 /* Steal possbile out parameters to the callers context */
3323 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3326 *result
= state
->orig
.out
.result
;
3328 tevent_req_received(req
);
3329 return NT_STATUS_OK
;
3332 NTSTATUS
rpccli_srvsvc_NetShareDel(struct rpc_pipe_client
*cli
,
3333 TALLOC_CTX
*mem_ctx
,
3334 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
3335 const char *share_name
/* [in] [charset(UTF16)] */,
3336 uint32_t reserved
/* [in] */,
3339 struct srvsvc_NetShareDel r
;
3343 r
.in
.server_unc
= server_unc
;
3344 r
.in
.share_name
= share_name
;
3345 r
.in
.reserved
= reserved
;
3347 if (DEBUGLEVEL
>= 10) {
3348 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDel
, &r
);
3351 status
= cli
->dispatch(cli
,
3354 NDR_SRVSVC_NETSHAREDEL
,
3357 if (!NT_STATUS_IS_OK(status
)) {
3361 if (DEBUGLEVEL
>= 10) {
3362 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDel
, &r
);
3365 if (NT_STATUS_IS_ERR(status
)) {
3369 /* Return variables */
3373 *werror
= r
.out
.result
;
3376 return werror_to_ntstatus(r
.out
.result
);
3379 struct rpccli_srvsvc_NetShareDelSticky_state
{
3380 struct srvsvc_NetShareDelSticky orig
;
3381 struct srvsvc_NetShareDelSticky tmp
;
3382 TALLOC_CTX
*out_mem_ctx
;
3383 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3386 static void rpccli_srvsvc_NetShareDelSticky_done(struct tevent_req
*subreq
);
3388 struct tevent_req
*rpccli_srvsvc_NetShareDelSticky_send(TALLOC_CTX
*mem_ctx
,
3389 struct tevent_context
*ev
,
3390 struct rpc_pipe_client
*cli
,
3391 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
3392 const char *_share_name
/* [in] [charset(UTF16)] */,
3393 uint32_t _reserved
/* [in] */)
3395 struct tevent_req
*req
;
3396 struct rpccli_srvsvc_NetShareDelSticky_state
*state
;
3397 struct tevent_req
*subreq
;
3399 req
= tevent_req_create(mem_ctx
, &state
,
3400 struct rpccli_srvsvc_NetShareDelSticky_state
);
3404 state
->out_mem_ctx
= NULL
;
3405 state
->dispatch_recv
= cli
->dispatch_recv
;
3408 state
->orig
.in
.server_unc
= _server_unc
;
3409 state
->orig
.in
.share_name
= _share_name
;
3410 state
->orig
.in
.reserved
= _reserved
;
3412 /* Out parameters */
3415 ZERO_STRUCT(state
->orig
.out
.result
);
3417 if (DEBUGLEVEL
>= 10) {
3418 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelSticky
, &state
->orig
);
3421 /* make a temporary copy, that we pass to the dispatch function */
3422 state
->tmp
= state
->orig
;
3424 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3426 NDR_SRVSVC_NETSHAREDELSTICKY
,
3428 if (tevent_req_nomem(subreq
, req
)) {
3429 return tevent_req_post(req
, ev
);
3431 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareDelSticky_done
, req
);
3435 static void rpccli_srvsvc_NetShareDelSticky_done(struct tevent_req
*subreq
)
3437 struct tevent_req
*req
= tevent_req_callback_data(
3438 subreq
, struct tevent_req
);
3439 struct rpccli_srvsvc_NetShareDelSticky_state
*state
= tevent_req_data(
3440 req
, struct rpccli_srvsvc_NetShareDelSticky_state
);
3442 TALLOC_CTX
*mem_ctx
;
3444 if (state
->out_mem_ctx
) {
3445 mem_ctx
= state
->out_mem_ctx
;
3450 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3451 TALLOC_FREE(subreq
);
3452 if (!NT_STATUS_IS_OK(status
)) {
3453 tevent_req_nterror(req
, status
);
3457 /* Copy out parameters */
3460 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3462 /* Reset temporary structure */
3463 ZERO_STRUCT(state
->tmp
);
3465 if (DEBUGLEVEL
>= 10) {
3466 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelSticky
, &state
->orig
);
3469 tevent_req_done(req
);
3472 NTSTATUS
rpccli_srvsvc_NetShareDelSticky_recv(struct tevent_req
*req
,
3473 TALLOC_CTX
*mem_ctx
,
3476 struct rpccli_srvsvc_NetShareDelSticky_state
*state
= tevent_req_data(
3477 req
, struct rpccli_srvsvc_NetShareDelSticky_state
);
3480 if (tevent_req_is_nterror(req
, &status
)) {
3481 tevent_req_received(req
);
3485 /* Steal possbile out parameters to the callers context */
3486 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3489 *result
= state
->orig
.out
.result
;
3491 tevent_req_received(req
);
3492 return NT_STATUS_OK
;
3495 NTSTATUS
rpccli_srvsvc_NetShareDelSticky(struct rpc_pipe_client
*cli
,
3496 TALLOC_CTX
*mem_ctx
,
3497 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
3498 const char *share_name
/* [in] [charset(UTF16)] */,
3499 uint32_t reserved
/* [in] */,
3502 struct srvsvc_NetShareDelSticky r
;
3506 r
.in
.server_unc
= server_unc
;
3507 r
.in
.share_name
= share_name
;
3508 r
.in
.reserved
= reserved
;
3510 if (DEBUGLEVEL
>= 10) {
3511 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelSticky
, &r
);
3514 status
= cli
->dispatch(cli
,
3517 NDR_SRVSVC_NETSHAREDELSTICKY
,
3520 if (!NT_STATUS_IS_OK(status
)) {
3524 if (DEBUGLEVEL
>= 10) {
3525 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelSticky
, &r
);
3528 if (NT_STATUS_IS_ERR(status
)) {
3532 /* Return variables */
3536 *werror
= r
.out
.result
;
3539 return werror_to_ntstatus(r
.out
.result
);
3542 struct rpccli_srvsvc_NetShareCheck_state
{
3543 struct srvsvc_NetShareCheck orig
;
3544 struct srvsvc_NetShareCheck tmp
;
3545 TALLOC_CTX
*out_mem_ctx
;
3546 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3549 static void rpccli_srvsvc_NetShareCheck_done(struct tevent_req
*subreq
);
3551 struct tevent_req
*rpccli_srvsvc_NetShareCheck_send(TALLOC_CTX
*mem_ctx
,
3552 struct tevent_context
*ev
,
3553 struct rpc_pipe_client
*cli
,
3554 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
3555 const char *_device_name
/* [in] [charset(UTF16)] */,
3556 enum srvsvc_ShareType
*_type
/* [out] [ref] */)
3558 struct tevent_req
*req
;
3559 struct rpccli_srvsvc_NetShareCheck_state
*state
;
3560 struct tevent_req
*subreq
;
3562 req
= tevent_req_create(mem_ctx
, &state
,
3563 struct rpccli_srvsvc_NetShareCheck_state
);
3567 state
->out_mem_ctx
= NULL
;
3568 state
->dispatch_recv
= cli
->dispatch_recv
;
3571 state
->orig
.in
.server_unc
= _server_unc
;
3572 state
->orig
.in
.device_name
= _device_name
;
3574 /* Out parameters */
3575 state
->orig
.out
.type
= _type
;
3578 ZERO_STRUCT(state
->orig
.out
.result
);
3580 if (DEBUGLEVEL
>= 10) {
3581 NDR_PRINT_IN_DEBUG(srvsvc_NetShareCheck
, &state
->orig
);
3584 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3585 "rpccli_srvsvc_NetShareCheck_out_memory");
3586 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3587 return tevent_req_post(req
, ev
);
3590 /* make a temporary copy, that we pass to the dispatch function */
3591 state
->tmp
= state
->orig
;
3593 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3595 NDR_SRVSVC_NETSHARECHECK
,
3597 if (tevent_req_nomem(subreq
, req
)) {
3598 return tevent_req_post(req
, ev
);
3600 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareCheck_done
, req
);
3604 static void rpccli_srvsvc_NetShareCheck_done(struct tevent_req
*subreq
)
3606 struct tevent_req
*req
= tevent_req_callback_data(
3607 subreq
, struct tevent_req
);
3608 struct rpccli_srvsvc_NetShareCheck_state
*state
= tevent_req_data(
3609 req
, struct rpccli_srvsvc_NetShareCheck_state
);
3611 TALLOC_CTX
*mem_ctx
;
3613 if (state
->out_mem_ctx
) {
3614 mem_ctx
= state
->out_mem_ctx
;
3619 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3620 TALLOC_FREE(subreq
);
3621 if (!NT_STATUS_IS_OK(status
)) {
3622 tevent_req_nterror(req
, status
);
3626 /* Copy out parameters */
3627 *state
->orig
.out
.type
= *state
->tmp
.out
.type
;
3630 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3632 /* Reset temporary structure */
3633 ZERO_STRUCT(state
->tmp
);
3635 if (DEBUGLEVEL
>= 10) {
3636 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareCheck
, &state
->orig
);
3639 tevent_req_done(req
);
3642 NTSTATUS
rpccli_srvsvc_NetShareCheck_recv(struct tevent_req
*req
,
3643 TALLOC_CTX
*mem_ctx
,
3646 struct rpccli_srvsvc_NetShareCheck_state
*state
= tevent_req_data(
3647 req
, struct rpccli_srvsvc_NetShareCheck_state
);
3650 if (tevent_req_is_nterror(req
, &status
)) {
3651 tevent_req_received(req
);
3655 /* Steal possbile out parameters to the callers context */
3656 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3659 *result
= state
->orig
.out
.result
;
3661 tevent_req_received(req
);
3662 return NT_STATUS_OK
;
3665 NTSTATUS
rpccli_srvsvc_NetShareCheck(struct rpc_pipe_client
*cli
,
3666 TALLOC_CTX
*mem_ctx
,
3667 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
3668 const char *device_name
/* [in] [charset(UTF16)] */,
3669 enum srvsvc_ShareType
*type
/* [out] [ref] */,
3672 struct srvsvc_NetShareCheck r
;
3676 r
.in
.server_unc
= server_unc
;
3677 r
.in
.device_name
= device_name
;
3679 if (DEBUGLEVEL
>= 10) {
3680 NDR_PRINT_IN_DEBUG(srvsvc_NetShareCheck
, &r
);
3683 status
= cli
->dispatch(cli
,
3686 NDR_SRVSVC_NETSHARECHECK
,
3689 if (!NT_STATUS_IS_OK(status
)) {
3693 if (DEBUGLEVEL
>= 10) {
3694 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareCheck
, &r
);
3697 if (NT_STATUS_IS_ERR(status
)) {
3701 /* Return variables */
3702 *type
= *r
.out
.type
;
3706 *werror
= r
.out
.result
;
3709 return werror_to_ntstatus(r
.out
.result
);
3712 struct rpccli_srvsvc_NetSrvGetInfo_state
{
3713 struct srvsvc_NetSrvGetInfo orig
;
3714 struct srvsvc_NetSrvGetInfo tmp
;
3715 TALLOC_CTX
*out_mem_ctx
;
3716 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3719 static void rpccli_srvsvc_NetSrvGetInfo_done(struct tevent_req
*subreq
);
3721 struct tevent_req
*rpccli_srvsvc_NetSrvGetInfo_send(TALLOC_CTX
*mem_ctx
,
3722 struct tevent_context
*ev
,
3723 struct rpc_pipe_client
*cli
,
3724 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
3725 uint32_t _level
/* [in] */,
3726 union srvsvc_NetSrvInfo
*_info
/* [out] [ref,switch_is(level)] */)
3728 struct tevent_req
*req
;
3729 struct rpccli_srvsvc_NetSrvGetInfo_state
*state
;
3730 struct tevent_req
*subreq
;
3732 req
= tevent_req_create(mem_ctx
, &state
,
3733 struct rpccli_srvsvc_NetSrvGetInfo_state
);
3737 state
->out_mem_ctx
= NULL
;
3738 state
->dispatch_recv
= cli
->dispatch_recv
;
3741 state
->orig
.in
.server_unc
= _server_unc
;
3742 state
->orig
.in
.level
= _level
;
3744 /* Out parameters */
3745 state
->orig
.out
.info
= _info
;
3748 ZERO_STRUCT(state
->orig
.out
.result
);
3750 if (DEBUGLEVEL
>= 10) {
3751 NDR_PRINT_IN_DEBUG(srvsvc_NetSrvGetInfo
, &state
->orig
);
3754 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3755 "rpccli_srvsvc_NetSrvGetInfo_out_memory");
3756 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3757 return tevent_req_post(req
, ev
);
3760 /* make a temporary copy, that we pass to the dispatch function */
3761 state
->tmp
= state
->orig
;
3763 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3765 NDR_SRVSVC_NETSRVGETINFO
,
3767 if (tevent_req_nomem(subreq
, req
)) {
3768 return tevent_req_post(req
, ev
);
3770 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetSrvGetInfo_done
, req
);
3774 static void rpccli_srvsvc_NetSrvGetInfo_done(struct tevent_req
*subreq
)
3776 struct tevent_req
*req
= tevent_req_callback_data(
3777 subreq
, struct tevent_req
);
3778 struct rpccli_srvsvc_NetSrvGetInfo_state
*state
= tevent_req_data(
3779 req
, struct rpccli_srvsvc_NetSrvGetInfo_state
);
3781 TALLOC_CTX
*mem_ctx
;
3783 if (state
->out_mem_ctx
) {
3784 mem_ctx
= state
->out_mem_ctx
;
3789 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3790 TALLOC_FREE(subreq
);
3791 if (!NT_STATUS_IS_OK(status
)) {
3792 tevent_req_nterror(req
, status
);
3796 /* Copy out parameters */
3797 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
3800 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3802 /* Reset temporary structure */
3803 ZERO_STRUCT(state
->tmp
);
3805 if (DEBUGLEVEL
>= 10) {
3806 NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvGetInfo
, &state
->orig
);
3809 tevent_req_done(req
);
3812 NTSTATUS
rpccli_srvsvc_NetSrvGetInfo_recv(struct tevent_req
*req
,
3813 TALLOC_CTX
*mem_ctx
,
3816 struct rpccli_srvsvc_NetSrvGetInfo_state
*state
= tevent_req_data(
3817 req
, struct rpccli_srvsvc_NetSrvGetInfo_state
);
3820 if (tevent_req_is_nterror(req
, &status
)) {
3821 tevent_req_received(req
);
3825 /* Steal possbile out parameters to the callers context */
3826 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3829 *result
= state
->orig
.out
.result
;
3831 tevent_req_received(req
);
3832 return NT_STATUS_OK
;
3835 NTSTATUS
rpccli_srvsvc_NetSrvGetInfo(struct rpc_pipe_client
*cli
,
3836 TALLOC_CTX
*mem_ctx
,
3837 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
3838 uint32_t level
/* [in] */,
3839 union srvsvc_NetSrvInfo
*info
/* [out] [ref,switch_is(level)] */,
3842 struct srvsvc_NetSrvGetInfo r
;
3846 r
.in
.server_unc
= server_unc
;
3849 if (DEBUGLEVEL
>= 10) {
3850 NDR_PRINT_IN_DEBUG(srvsvc_NetSrvGetInfo
, &r
);
3853 status
= cli
->dispatch(cli
,
3856 NDR_SRVSVC_NETSRVGETINFO
,
3859 if (!NT_STATUS_IS_OK(status
)) {
3863 if (DEBUGLEVEL
>= 10) {
3864 NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvGetInfo
, &r
);
3867 if (NT_STATUS_IS_ERR(status
)) {
3871 /* Return variables */
3872 *info
= *r
.out
.info
;
3876 *werror
= r
.out
.result
;
3879 return werror_to_ntstatus(r
.out
.result
);
3882 struct rpccli_srvsvc_NetSrvSetInfo_state
{
3883 struct srvsvc_NetSrvSetInfo orig
;
3884 struct srvsvc_NetSrvSetInfo tmp
;
3885 TALLOC_CTX
*out_mem_ctx
;
3886 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3889 static void rpccli_srvsvc_NetSrvSetInfo_done(struct tevent_req
*subreq
);
3891 struct tevent_req
*rpccli_srvsvc_NetSrvSetInfo_send(TALLOC_CTX
*mem_ctx
,
3892 struct tevent_context
*ev
,
3893 struct rpc_pipe_client
*cli
,
3894 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
3895 uint32_t _level
/* [in] */,
3896 union srvsvc_NetSrvInfo
*_info
/* [in] [ref,switch_is(level)] */,
3897 uint32_t *_parm_error
/* [in,out] [unique] */)
3899 struct tevent_req
*req
;
3900 struct rpccli_srvsvc_NetSrvSetInfo_state
*state
;
3901 struct tevent_req
*subreq
;
3903 req
= tevent_req_create(mem_ctx
, &state
,
3904 struct rpccli_srvsvc_NetSrvSetInfo_state
);
3908 state
->out_mem_ctx
= NULL
;
3909 state
->dispatch_recv
= cli
->dispatch_recv
;
3912 state
->orig
.in
.server_unc
= _server_unc
;
3913 state
->orig
.in
.level
= _level
;
3914 state
->orig
.in
.info
= _info
;
3915 state
->orig
.in
.parm_error
= _parm_error
;
3917 /* Out parameters */
3918 state
->orig
.out
.parm_error
= _parm_error
;
3921 ZERO_STRUCT(state
->orig
.out
.result
);
3923 if (DEBUGLEVEL
>= 10) {
3924 NDR_PRINT_IN_DEBUG(srvsvc_NetSrvSetInfo
, &state
->orig
);
3927 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3928 "rpccli_srvsvc_NetSrvSetInfo_out_memory");
3929 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3930 return tevent_req_post(req
, ev
);
3933 /* make a temporary copy, that we pass to the dispatch function */
3934 state
->tmp
= state
->orig
;
3936 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3938 NDR_SRVSVC_NETSRVSETINFO
,
3940 if (tevent_req_nomem(subreq
, req
)) {
3941 return tevent_req_post(req
, ev
);
3943 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetSrvSetInfo_done
, req
);
3947 static void rpccli_srvsvc_NetSrvSetInfo_done(struct tevent_req
*subreq
)
3949 struct tevent_req
*req
= tevent_req_callback_data(
3950 subreq
, struct tevent_req
);
3951 struct rpccli_srvsvc_NetSrvSetInfo_state
*state
= tevent_req_data(
3952 req
, struct rpccli_srvsvc_NetSrvSetInfo_state
);
3954 TALLOC_CTX
*mem_ctx
;
3956 if (state
->out_mem_ctx
) {
3957 mem_ctx
= state
->out_mem_ctx
;
3962 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3963 TALLOC_FREE(subreq
);
3964 if (!NT_STATUS_IS_OK(status
)) {
3965 tevent_req_nterror(req
, status
);
3969 /* Copy out parameters */
3970 if (state
->orig
.out
.parm_error
&& state
->tmp
.out
.parm_error
) {
3971 *state
->orig
.out
.parm_error
= *state
->tmp
.out
.parm_error
;
3975 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3977 /* Reset temporary structure */
3978 ZERO_STRUCT(state
->tmp
);
3980 if (DEBUGLEVEL
>= 10) {
3981 NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvSetInfo
, &state
->orig
);
3984 tevent_req_done(req
);
3987 NTSTATUS
rpccli_srvsvc_NetSrvSetInfo_recv(struct tevent_req
*req
,
3988 TALLOC_CTX
*mem_ctx
,
3991 struct rpccli_srvsvc_NetSrvSetInfo_state
*state
= tevent_req_data(
3992 req
, struct rpccli_srvsvc_NetSrvSetInfo_state
);
3995 if (tevent_req_is_nterror(req
, &status
)) {
3996 tevent_req_received(req
);
4000 /* Steal possbile out parameters to the callers context */
4001 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4004 *result
= state
->orig
.out
.result
;
4006 tevent_req_received(req
);
4007 return NT_STATUS_OK
;
4010 NTSTATUS
rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client
*cli
,
4011 TALLOC_CTX
*mem_ctx
,
4012 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
4013 uint32_t level
/* [in] */,
4014 union srvsvc_NetSrvInfo
*info
/* [in] [ref,switch_is(level)] */,
4015 uint32_t *parm_error
/* [in,out] [unique] */,
4018 struct srvsvc_NetSrvSetInfo r
;
4022 r
.in
.server_unc
= server_unc
;
4025 r
.in
.parm_error
= parm_error
;
4027 if (DEBUGLEVEL
>= 10) {
4028 NDR_PRINT_IN_DEBUG(srvsvc_NetSrvSetInfo
, &r
);
4031 status
= cli
->dispatch(cli
,
4034 NDR_SRVSVC_NETSRVSETINFO
,
4037 if (!NT_STATUS_IS_OK(status
)) {
4041 if (DEBUGLEVEL
>= 10) {
4042 NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvSetInfo
, &r
);
4045 if (NT_STATUS_IS_ERR(status
)) {
4049 /* Return variables */
4050 if (parm_error
&& r
.out
.parm_error
) {
4051 *parm_error
= *r
.out
.parm_error
;
4056 *werror
= r
.out
.result
;
4059 return werror_to_ntstatus(r
.out
.result
);
4062 struct rpccli_srvsvc_NetDiskEnum_state
{
4063 struct srvsvc_NetDiskEnum orig
;
4064 struct srvsvc_NetDiskEnum tmp
;
4065 TALLOC_CTX
*out_mem_ctx
;
4066 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4069 static void rpccli_srvsvc_NetDiskEnum_done(struct tevent_req
*subreq
);
4071 struct tevent_req
*rpccli_srvsvc_NetDiskEnum_send(TALLOC_CTX
*mem_ctx
,
4072 struct tevent_context
*ev
,
4073 struct rpc_pipe_client
*cli
,
4074 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
4075 uint32_t _level
/* [in] */,
4076 struct srvsvc_NetDiskInfo
*_info
/* [in,out] [ref] */,
4077 uint32_t _maxlen
/* [in] */,
4078 uint32_t *_totalentries
/* [out] [ref] */,
4079 uint32_t *_resume_handle
/* [in,out] [unique] */)
4081 struct tevent_req
*req
;
4082 struct rpccli_srvsvc_NetDiskEnum_state
*state
;
4083 struct tevent_req
*subreq
;
4085 req
= tevent_req_create(mem_ctx
, &state
,
4086 struct rpccli_srvsvc_NetDiskEnum_state
);
4090 state
->out_mem_ctx
= NULL
;
4091 state
->dispatch_recv
= cli
->dispatch_recv
;
4094 state
->orig
.in
.server_unc
= _server_unc
;
4095 state
->orig
.in
.level
= _level
;
4096 state
->orig
.in
.info
= _info
;
4097 state
->orig
.in
.maxlen
= _maxlen
;
4098 state
->orig
.in
.resume_handle
= _resume_handle
;
4100 /* Out parameters */
4101 state
->orig
.out
.info
= _info
;
4102 state
->orig
.out
.totalentries
= _totalentries
;
4103 state
->orig
.out
.resume_handle
= _resume_handle
;
4106 ZERO_STRUCT(state
->orig
.out
.result
);
4108 if (DEBUGLEVEL
>= 10) {
4109 NDR_PRINT_IN_DEBUG(srvsvc_NetDiskEnum
, &state
->orig
);
4112 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4113 "rpccli_srvsvc_NetDiskEnum_out_memory");
4114 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4115 return tevent_req_post(req
, ev
);
4118 /* make a temporary copy, that we pass to the dispatch function */
4119 state
->tmp
= state
->orig
;
4121 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4123 NDR_SRVSVC_NETDISKENUM
,
4125 if (tevent_req_nomem(subreq
, req
)) {
4126 return tevent_req_post(req
, ev
);
4128 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetDiskEnum_done
, req
);
4132 static void rpccli_srvsvc_NetDiskEnum_done(struct tevent_req
*subreq
)
4134 struct tevent_req
*req
= tevent_req_callback_data(
4135 subreq
, struct tevent_req
);
4136 struct rpccli_srvsvc_NetDiskEnum_state
*state
= tevent_req_data(
4137 req
, struct rpccli_srvsvc_NetDiskEnum_state
);
4139 TALLOC_CTX
*mem_ctx
;
4141 if (state
->out_mem_ctx
) {
4142 mem_ctx
= state
->out_mem_ctx
;
4147 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4148 TALLOC_FREE(subreq
);
4149 if (!NT_STATUS_IS_OK(status
)) {
4150 tevent_req_nterror(req
, status
);
4154 /* Copy out parameters */
4155 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
4156 *state
->orig
.out
.totalentries
= *state
->tmp
.out
.totalentries
;
4157 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
4158 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
4162 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4164 /* Reset temporary structure */
4165 ZERO_STRUCT(state
->tmp
);
4167 if (DEBUGLEVEL
>= 10) {
4168 NDR_PRINT_OUT_DEBUG(srvsvc_NetDiskEnum
, &state
->orig
);
4171 tevent_req_done(req
);
4174 NTSTATUS
rpccli_srvsvc_NetDiskEnum_recv(struct tevent_req
*req
,
4175 TALLOC_CTX
*mem_ctx
,
4178 struct rpccli_srvsvc_NetDiskEnum_state
*state
= tevent_req_data(
4179 req
, struct rpccli_srvsvc_NetDiskEnum_state
);
4182 if (tevent_req_is_nterror(req
, &status
)) {
4183 tevent_req_received(req
);
4187 /* Steal possbile out parameters to the callers context */
4188 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4191 *result
= state
->orig
.out
.result
;
4193 tevent_req_received(req
);
4194 return NT_STATUS_OK
;
4197 NTSTATUS
rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client
*cli
,
4198 TALLOC_CTX
*mem_ctx
,
4199 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
4200 uint32_t level
/* [in] */,
4201 struct srvsvc_NetDiskInfo
*info
/* [in,out] [ref] */,
4202 uint32_t maxlen
/* [in] */,
4203 uint32_t *totalentries
/* [out] [ref] */,
4204 uint32_t *resume_handle
/* [in,out] [unique] */,
4207 struct srvsvc_NetDiskEnum r
;
4211 r
.in
.server_unc
= server_unc
;
4214 r
.in
.maxlen
= maxlen
;
4215 r
.in
.resume_handle
= resume_handle
;
4217 if (DEBUGLEVEL
>= 10) {
4218 NDR_PRINT_IN_DEBUG(srvsvc_NetDiskEnum
, &r
);
4221 status
= cli
->dispatch(cli
,
4224 NDR_SRVSVC_NETDISKENUM
,
4227 if (!NT_STATUS_IS_OK(status
)) {
4231 if (DEBUGLEVEL
>= 10) {
4232 NDR_PRINT_OUT_DEBUG(srvsvc_NetDiskEnum
, &r
);
4235 if (NT_STATUS_IS_ERR(status
)) {
4239 /* Return variables */
4240 *info
= *r
.out
.info
;
4241 *totalentries
= *r
.out
.totalentries
;
4242 if (resume_handle
&& r
.out
.resume_handle
) {
4243 *resume_handle
= *r
.out
.resume_handle
;
4248 *werror
= r
.out
.result
;
4251 return werror_to_ntstatus(r
.out
.result
);
4254 struct rpccli_srvsvc_NetServerStatisticsGet_state
{
4255 struct srvsvc_NetServerStatisticsGet orig
;
4256 struct srvsvc_NetServerStatisticsGet tmp
;
4257 TALLOC_CTX
*out_mem_ctx
;
4258 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4261 static void rpccli_srvsvc_NetServerStatisticsGet_done(struct tevent_req
*subreq
);
4263 struct tevent_req
*rpccli_srvsvc_NetServerStatisticsGet_send(TALLOC_CTX
*mem_ctx
,
4264 struct tevent_context
*ev
,
4265 struct rpc_pipe_client
*cli
,
4266 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
4267 const char *_service
/* [in] [unique,charset(UTF16)] */,
4268 uint32_t _level
/* [in] */,
4269 uint32_t _options
/* [in] */,
4270 struct srvsvc_Statistics
**_stats
/* [out] [ref] */)
4272 struct tevent_req
*req
;
4273 struct rpccli_srvsvc_NetServerStatisticsGet_state
*state
;
4274 struct tevent_req
*subreq
;
4276 req
= tevent_req_create(mem_ctx
, &state
,
4277 struct rpccli_srvsvc_NetServerStatisticsGet_state
);
4281 state
->out_mem_ctx
= NULL
;
4282 state
->dispatch_recv
= cli
->dispatch_recv
;
4285 state
->orig
.in
.server_unc
= _server_unc
;
4286 state
->orig
.in
.service
= _service
;
4287 state
->orig
.in
.level
= _level
;
4288 state
->orig
.in
.options
= _options
;
4290 /* Out parameters */
4291 state
->orig
.out
.stats
= _stats
;
4294 ZERO_STRUCT(state
->orig
.out
.result
);
4296 if (DEBUGLEVEL
>= 10) {
4297 NDR_PRINT_IN_DEBUG(srvsvc_NetServerStatisticsGet
, &state
->orig
);
4300 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4301 "rpccli_srvsvc_NetServerStatisticsGet_out_memory");
4302 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4303 return tevent_req_post(req
, ev
);
4306 /* make a temporary copy, that we pass to the dispatch function */
4307 state
->tmp
= state
->orig
;
4309 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4311 NDR_SRVSVC_NETSERVERSTATISTICSGET
,
4313 if (tevent_req_nomem(subreq
, req
)) {
4314 return tevent_req_post(req
, ev
);
4316 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetServerStatisticsGet_done
, req
);
4320 static void rpccli_srvsvc_NetServerStatisticsGet_done(struct tevent_req
*subreq
)
4322 struct tevent_req
*req
= tevent_req_callback_data(
4323 subreq
, struct tevent_req
);
4324 struct rpccli_srvsvc_NetServerStatisticsGet_state
*state
= tevent_req_data(
4325 req
, struct rpccli_srvsvc_NetServerStatisticsGet_state
);
4327 TALLOC_CTX
*mem_ctx
;
4329 if (state
->out_mem_ctx
) {
4330 mem_ctx
= state
->out_mem_ctx
;
4335 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4336 TALLOC_FREE(subreq
);
4337 if (!NT_STATUS_IS_OK(status
)) {
4338 tevent_req_nterror(req
, status
);
4342 /* Copy out parameters */
4343 *state
->orig
.out
.stats
= *state
->tmp
.out
.stats
;
4346 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4348 /* Reset temporary structure */
4349 ZERO_STRUCT(state
->tmp
);
4351 if (DEBUGLEVEL
>= 10) {
4352 NDR_PRINT_OUT_DEBUG(srvsvc_NetServerStatisticsGet
, &state
->orig
);
4355 tevent_req_done(req
);
4358 NTSTATUS
rpccli_srvsvc_NetServerStatisticsGet_recv(struct tevent_req
*req
,
4359 TALLOC_CTX
*mem_ctx
,
4362 struct rpccli_srvsvc_NetServerStatisticsGet_state
*state
= tevent_req_data(
4363 req
, struct rpccli_srvsvc_NetServerStatisticsGet_state
);
4366 if (tevent_req_is_nterror(req
, &status
)) {
4367 tevent_req_received(req
);
4371 /* Steal possbile out parameters to the callers context */
4372 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4375 *result
= state
->orig
.out
.result
;
4377 tevent_req_received(req
);
4378 return NT_STATUS_OK
;
4381 NTSTATUS
rpccli_srvsvc_NetServerStatisticsGet(struct rpc_pipe_client
*cli
,
4382 TALLOC_CTX
*mem_ctx
,
4383 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
4384 const char *service
/* [in] [unique,charset(UTF16)] */,
4385 uint32_t level
/* [in] */,
4386 uint32_t options
/* [in] */,
4387 struct srvsvc_Statistics
**stats
/* [out] [ref] */,
4390 struct srvsvc_NetServerStatisticsGet r
;
4394 r
.in
.server_unc
= server_unc
;
4395 r
.in
.service
= service
;
4397 r
.in
.options
= options
;
4399 if (DEBUGLEVEL
>= 10) {
4400 NDR_PRINT_IN_DEBUG(srvsvc_NetServerStatisticsGet
, &r
);
4403 status
= cli
->dispatch(cli
,
4406 NDR_SRVSVC_NETSERVERSTATISTICSGET
,
4409 if (!NT_STATUS_IS_OK(status
)) {
4413 if (DEBUGLEVEL
>= 10) {
4414 NDR_PRINT_OUT_DEBUG(srvsvc_NetServerStatisticsGet
, &r
);
4417 if (NT_STATUS_IS_ERR(status
)) {
4421 /* Return variables */
4422 *stats
= *r
.out
.stats
;
4426 *werror
= r
.out
.result
;
4429 return werror_to_ntstatus(r
.out
.result
);
4432 struct rpccli_srvsvc_NetTransportAdd_state
{
4433 struct srvsvc_NetTransportAdd orig
;
4434 struct srvsvc_NetTransportAdd tmp
;
4435 TALLOC_CTX
*out_mem_ctx
;
4436 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4439 static void rpccli_srvsvc_NetTransportAdd_done(struct tevent_req
*subreq
);
4441 struct tevent_req
*rpccli_srvsvc_NetTransportAdd_send(TALLOC_CTX
*mem_ctx
,
4442 struct tevent_context
*ev
,
4443 struct rpc_pipe_client
*cli
,
4444 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
4445 uint32_t _level
/* [in] */,
4446 union srvsvc_NetTransportInfo _info
/* [in] [switch_is(level)] */)
4448 struct tevent_req
*req
;
4449 struct rpccli_srvsvc_NetTransportAdd_state
*state
;
4450 struct tevent_req
*subreq
;
4452 req
= tevent_req_create(mem_ctx
, &state
,
4453 struct rpccli_srvsvc_NetTransportAdd_state
);
4457 state
->out_mem_ctx
= NULL
;
4458 state
->dispatch_recv
= cli
->dispatch_recv
;
4461 state
->orig
.in
.server_unc
= _server_unc
;
4462 state
->orig
.in
.level
= _level
;
4463 state
->orig
.in
.info
= _info
;
4465 /* Out parameters */
4468 ZERO_STRUCT(state
->orig
.out
.result
);
4470 if (DEBUGLEVEL
>= 10) {
4471 NDR_PRINT_IN_DEBUG(srvsvc_NetTransportAdd
, &state
->orig
);
4474 /* make a temporary copy, that we pass to the dispatch function */
4475 state
->tmp
= state
->orig
;
4477 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4479 NDR_SRVSVC_NETTRANSPORTADD
,
4481 if (tevent_req_nomem(subreq
, req
)) {
4482 return tevent_req_post(req
, ev
);
4484 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetTransportAdd_done
, req
);
4488 static void rpccli_srvsvc_NetTransportAdd_done(struct tevent_req
*subreq
)
4490 struct tevent_req
*req
= tevent_req_callback_data(
4491 subreq
, struct tevent_req
);
4492 struct rpccli_srvsvc_NetTransportAdd_state
*state
= tevent_req_data(
4493 req
, struct rpccli_srvsvc_NetTransportAdd_state
);
4495 TALLOC_CTX
*mem_ctx
;
4497 if (state
->out_mem_ctx
) {
4498 mem_ctx
= state
->out_mem_ctx
;
4503 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4504 TALLOC_FREE(subreq
);
4505 if (!NT_STATUS_IS_OK(status
)) {
4506 tevent_req_nterror(req
, status
);
4510 /* Copy out parameters */
4513 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4515 /* Reset temporary structure */
4516 ZERO_STRUCT(state
->tmp
);
4518 if (DEBUGLEVEL
>= 10) {
4519 NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportAdd
, &state
->orig
);
4522 tevent_req_done(req
);
4525 NTSTATUS
rpccli_srvsvc_NetTransportAdd_recv(struct tevent_req
*req
,
4526 TALLOC_CTX
*mem_ctx
,
4529 struct rpccli_srvsvc_NetTransportAdd_state
*state
= tevent_req_data(
4530 req
, struct rpccli_srvsvc_NetTransportAdd_state
);
4533 if (tevent_req_is_nterror(req
, &status
)) {
4534 tevent_req_received(req
);
4538 /* Steal possbile out parameters to the callers context */
4539 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4542 *result
= state
->orig
.out
.result
;
4544 tevent_req_received(req
);
4545 return NT_STATUS_OK
;
4548 NTSTATUS
rpccli_srvsvc_NetTransportAdd(struct rpc_pipe_client
*cli
,
4549 TALLOC_CTX
*mem_ctx
,
4550 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
4551 uint32_t level
/* [in] */,
4552 union srvsvc_NetTransportInfo info
/* [in] [switch_is(level)] */,
4555 struct srvsvc_NetTransportAdd r
;
4559 r
.in
.server_unc
= server_unc
;
4563 if (DEBUGLEVEL
>= 10) {
4564 NDR_PRINT_IN_DEBUG(srvsvc_NetTransportAdd
, &r
);
4567 status
= cli
->dispatch(cli
,
4570 NDR_SRVSVC_NETTRANSPORTADD
,
4573 if (!NT_STATUS_IS_OK(status
)) {
4577 if (DEBUGLEVEL
>= 10) {
4578 NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportAdd
, &r
);
4581 if (NT_STATUS_IS_ERR(status
)) {
4585 /* Return variables */
4589 *werror
= r
.out
.result
;
4592 return werror_to_ntstatus(r
.out
.result
);
4595 struct rpccli_srvsvc_NetTransportEnum_state
{
4596 struct srvsvc_NetTransportEnum orig
;
4597 struct srvsvc_NetTransportEnum tmp
;
4598 TALLOC_CTX
*out_mem_ctx
;
4599 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4602 static void rpccli_srvsvc_NetTransportEnum_done(struct tevent_req
*subreq
);
4604 struct tevent_req
*rpccli_srvsvc_NetTransportEnum_send(TALLOC_CTX
*mem_ctx
,
4605 struct tevent_context
*ev
,
4606 struct rpc_pipe_client
*cli
,
4607 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
4608 struct srvsvc_NetTransportInfoCtr
*_transports
/* [in,out] [ref] */,
4609 uint32_t _max_buffer
/* [in] */,
4610 uint32_t *_totalentries
/* [out] [ref] */,
4611 uint32_t *_resume_handle
/* [in,out] [unique] */)
4613 struct tevent_req
*req
;
4614 struct rpccli_srvsvc_NetTransportEnum_state
*state
;
4615 struct tevent_req
*subreq
;
4617 req
= tevent_req_create(mem_ctx
, &state
,
4618 struct rpccli_srvsvc_NetTransportEnum_state
);
4622 state
->out_mem_ctx
= NULL
;
4623 state
->dispatch_recv
= cli
->dispatch_recv
;
4626 state
->orig
.in
.server_unc
= _server_unc
;
4627 state
->orig
.in
.transports
= _transports
;
4628 state
->orig
.in
.max_buffer
= _max_buffer
;
4629 state
->orig
.in
.resume_handle
= _resume_handle
;
4631 /* Out parameters */
4632 state
->orig
.out
.transports
= _transports
;
4633 state
->orig
.out
.totalentries
= _totalentries
;
4634 state
->orig
.out
.resume_handle
= _resume_handle
;
4637 ZERO_STRUCT(state
->orig
.out
.result
);
4639 if (DEBUGLEVEL
>= 10) {
4640 NDR_PRINT_IN_DEBUG(srvsvc_NetTransportEnum
, &state
->orig
);
4643 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4644 "rpccli_srvsvc_NetTransportEnum_out_memory");
4645 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4646 return tevent_req_post(req
, ev
);
4649 /* make a temporary copy, that we pass to the dispatch function */
4650 state
->tmp
= state
->orig
;
4652 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4654 NDR_SRVSVC_NETTRANSPORTENUM
,
4656 if (tevent_req_nomem(subreq
, req
)) {
4657 return tevent_req_post(req
, ev
);
4659 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetTransportEnum_done
, req
);
4663 static void rpccli_srvsvc_NetTransportEnum_done(struct tevent_req
*subreq
)
4665 struct tevent_req
*req
= tevent_req_callback_data(
4666 subreq
, struct tevent_req
);
4667 struct rpccli_srvsvc_NetTransportEnum_state
*state
= tevent_req_data(
4668 req
, struct rpccli_srvsvc_NetTransportEnum_state
);
4670 TALLOC_CTX
*mem_ctx
;
4672 if (state
->out_mem_ctx
) {
4673 mem_ctx
= state
->out_mem_ctx
;
4678 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4679 TALLOC_FREE(subreq
);
4680 if (!NT_STATUS_IS_OK(status
)) {
4681 tevent_req_nterror(req
, status
);
4685 /* Copy out parameters */
4686 *state
->orig
.out
.transports
= *state
->tmp
.out
.transports
;
4687 *state
->orig
.out
.totalentries
= *state
->tmp
.out
.totalentries
;
4688 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
4689 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
4693 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4695 /* Reset temporary structure */
4696 ZERO_STRUCT(state
->tmp
);
4698 if (DEBUGLEVEL
>= 10) {
4699 NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportEnum
, &state
->orig
);
4702 tevent_req_done(req
);
4705 NTSTATUS
rpccli_srvsvc_NetTransportEnum_recv(struct tevent_req
*req
,
4706 TALLOC_CTX
*mem_ctx
,
4709 struct rpccli_srvsvc_NetTransportEnum_state
*state
= tevent_req_data(
4710 req
, struct rpccli_srvsvc_NetTransportEnum_state
);
4713 if (tevent_req_is_nterror(req
, &status
)) {
4714 tevent_req_received(req
);
4718 /* Steal possbile out parameters to the callers context */
4719 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4722 *result
= state
->orig
.out
.result
;
4724 tevent_req_received(req
);
4725 return NT_STATUS_OK
;
4728 NTSTATUS
rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client
*cli
,
4729 TALLOC_CTX
*mem_ctx
,
4730 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
4731 struct srvsvc_NetTransportInfoCtr
*transports
/* [in,out] [ref] */,
4732 uint32_t max_buffer
/* [in] */,
4733 uint32_t *totalentries
/* [out] [ref] */,
4734 uint32_t *resume_handle
/* [in,out] [unique] */,
4737 struct srvsvc_NetTransportEnum r
;
4741 r
.in
.server_unc
= server_unc
;
4742 r
.in
.transports
= transports
;
4743 r
.in
.max_buffer
= max_buffer
;
4744 r
.in
.resume_handle
= resume_handle
;
4746 if (DEBUGLEVEL
>= 10) {
4747 NDR_PRINT_IN_DEBUG(srvsvc_NetTransportEnum
, &r
);
4750 status
= cli
->dispatch(cli
,
4753 NDR_SRVSVC_NETTRANSPORTENUM
,
4756 if (!NT_STATUS_IS_OK(status
)) {
4760 if (DEBUGLEVEL
>= 10) {
4761 NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportEnum
, &r
);
4764 if (NT_STATUS_IS_ERR(status
)) {
4768 /* Return variables */
4769 *transports
= *r
.out
.transports
;
4770 *totalentries
= *r
.out
.totalentries
;
4771 if (resume_handle
&& r
.out
.resume_handle
) {
4772 *resume_handle
= *r
.out
.resume_handle
;
4777 *werror
= r
.out
.result
;
4780 return werror_to_ntstatus(r
.out
.result
);
4783 struct rpccli_srvsvc_NetTransportDel_state
{
4784 struct srvsvc_NetTransportDel orig
;
4785 struct srvsvc_NetTransportDel tmp
;
4786 TALLOC_CTX
*out_mem_ctx
;
4787 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4790 static void rpccli_srvsvc_NetTransportDel_done(struct tevent_req
*subreq
);
4792 struct tevent_req
*rpccli_srvsvc_NetTransportDel_send(TALLOC_CTX
*mem_ctx
,
4793 struct tevent_context
*ev
,
4794 struct rpc_pipe_client
*cli
,
4795 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
4796 uint32_t _level
/* [in] */,
4797 struct srvsvc_NetTransportInfo0
*_info0
/* [in] [ref] */)
4799 struct tevent_req
*req
;
4800 struct rpccli_srvsvc_NetTransportDel_state
*state
;
4801 struct tevent_req
*subreq
;
4803 req
= tevent_req_create(mem_ctx
, &state
,
4804 struct rpccli_srvsvc_NetTransportDel_state
);
4808 state
->out_mem_ctx
= NULL
;
4809 state
->dispatch_recv
= cli
->dispatch_recv
;
4812 state
->orig
.in
.server_unc
= _server_unc
;
4813 state
->orig
.in
.level
= _level
;
4814 state
->orig
.in
.info0
= _info0
;
4816 /* Out parameters */
4819 ZERO_STRUCT(state
->orig
.out
.result
);
4821 if (DEBUGLEVEL
>= 10) {
4822 NDR_PRINT_IN_DEBUG(srvsvc_NetTransportDel
, &state
->orig
);
4825 /* make a temporary copy, that we pass to the dispatch function */
4826 state
->tmp
= state
->orig
;
4828 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4830 NDR_SRVSVC_NETTRANSPORTDEL
,
4832 if (tevent_req_nomem(subreq
, req
)) {
4833 return tevent_req_post(req
, ev
);
4835 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetTransportDel_done
, req
);
4839 static void rpccli_srvsvc_NetTransportDel_done(struct tevent_req
*subreq
)
4841 struct tevent_req
*req
= tevent_req_callback_data(
4842 subreq
, struct tevent_req
);
4843 struct rpccli_srvsvc_NetTransportDel_state
*state
= tevent_req_data(
4844 req
, struct rpccli_srvsvc_NetTransportDel_state
);
4846 TALLOC_CTX
*mem_ctx
;
4848 if (state
->out_mem_ctx
) {
4849 mem_ctx
= state
->out_mem_ctx
;
4854 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4855 TALLOC_FREE(subreq
);
4856 if (!NT_STATUS_IS_OK(status
)) {
4857 tevent_req_nterror(req
, status
);
4861 /* Copy out parameters */
4864 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4866 /* Reset temporary structure */
4867 ZERO_STRUCT(state
->tmp
);
4869 if (DEBUGLEVEL
>= 10) {
4870 NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportDel
, &state
->orig
);
4873 tevent_req_done(req
);
4876 NTSTATUS
rpccli_srvsvc_NetTransportDel_recv(struct tevent_req
*req
,
4877 TALLOC_CTX
*mem_ctx
,
4880 struct rpccli_srvsvc_NetTransportDel_state
*state
= tevent_req_data(
4881 req
, struct rpccli_srvsvc_NetTransportDel_state
);
4884 if (tevent_req_is_nterror(req
, &status
)) {
4885 tevent_req_received(req
);
4889 /* Steal possbile out parameters to the callers context */
4890 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4893 *result
= state
->orig
.out
.result
;
4895 tevent_req_received(req
);
4896 return NT_STATUS_OK
;
4899 NTSTATUS
rpccli_srvsvc_NetTransportDel(struct rpc_pipe_client
*cli
,
4900 TALLOC_CTX
*mem_ctx
,
4901 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
4902 uint32_t level
/* [in] */,
4903 struct srvsvc_NetTransportInfo0
*info0
/* [in] [ref] */,
4906 struct srvsvc_NetTransportDel r
;
4910 r
.in
.server_unc
= server_unc
;
4914 if (DEBUGLEVEL
>= 10) {
4915 NDR_PRINT_IN_DEBUG(srvsvc_NetTransportDel
, &r
);
4918 status
= cli
->dispatch(cli
,
4921 NDR_SRVSVC_NETTRANSPORTDEL
,
4924 if (!NT_STATUS_IS_OK(status
)) {
4928 if (DEBUGLEVEL
>= 10) {
4929 NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportDel
, &r
);
4932 if (NT_STATUS_IS_ERR(status
)) {
4936 /* Return variables */
4940 *werror
= r
.out
.result
;
4943 return werror_to_ntstatus(r
.out
.result
);
4946 struct rpccli_srvsvc_NetRemoteTOD_state
{
4947 struct srvsvc_NetRemoteTOD orig
;
4948 struct srvsvc_NetRemoteTOD tmp
;
4949 TALLOC_CTX
*out_mem_ctx
;
4950 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4953 static void rpccli_srvsvc_NetRemoteTOD_done(struct tevent_req
*subreq
);
4955 struct tevent_req
*rpccli_srvsvc_NetRemoteTOD_send(TALLOC_CTX
*mem_ctx
,
4956 struct tevent_context
*ev
,
4957 struct rpc_pipe_client
*cli
,
4958 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
4959 struct srvsvc_NetRemoteTODInfo
**_info
/* [out] [ref] */)
4961 struct tevent_req
*req
;
4962 struct rpccli_srvsvc_NetRemoteTOD_state
*state
;
4963 struct tevent_req
*subreq
;
4965 req
= tevent_req_create(mem_ctx
, &state
,
4966 struct rpccli_srvsvc_NetRemoteTOD_state
);
4970 state
->out_mem_ctx
= NULL
;
4971 state
->dispatch_recv
= cli
->dispatch_recv
;
4974 state
->orig
.in
.server_unc
= _server_unc
;
4976 /* Out parameters */
4977 state
->orig
.out
.info
= _info
;
4980 ZERO_STRUCT(state
->orig
.out
.result
);
4982 if (DEBUGLEVEL
>= 10) {
4983 NDR_PRINT_IN_DEBUG(srvsvc_NetRemoteTOD
, &state
->orig
);
4986 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4987 "rpccli_srvsvc_NetRemoteTOD_out_memory");
4988 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4989 return tevent_req_post(req
, ev
);
4992 /* make a temporary copy, that we pass to the dispatch function */
4993 state
->tmp
= state
->orig
;
4995 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4997 NDR_SRVSVC_NETREMOTETOD
,
4999 if (tevent_req_nomem(subreq
, req
)) {
5000 return tevent_req_post(req
, ev
);
5002 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetRemoteTOD_done
, req
);
5006 static void rpccli_srvsvc_NetRemoteTOD_done(struct tevent_req
*subreq
)
5008 struct tevent_req
*req
= tevent_req_callback_data(
5009 subreq
, struct tevent_req
);
5010 struct rpccli_srvsvc_NetRemoteTOD_state
*state
= tevent_req_data(
5011 req
, struct rpccli_srvsvc_NetRemoteTOD_state
);
5013 TALLOC_CTX
*mem_ctx
;
5015 if (state
->out_mem_ctx
) {
5016 mem_ctx
= state
->out_mem_ctx
;
5021 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5022 TALLOC_FREE(subreq
);
5023 if (!NT_STATUS_IS_OK(status
)) {
5024 tevent_req_nterror(req
, status
);
5028 /* Copy out parameters */
5029 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
5032 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5034 /* Reset temporary structure */
5035 ZERO_STRUCT(state
->tmp
);
5037 if (DEBUGLEVEL
>= 10) {
5038 NDR_PRINT_OUT_DEBUG(srvsvc_NetRemoteTOD
, &state
->orig
);
5041 tevent_req_done(req
);
5044 NTSTATUS
rpccli_srvsvc_NetRemoteTOD_recv(struct tevent_req
*req
,
5045 TALLOC_CTX
*mem_ctx
,
5048 struct rpccli_srvsvc_NetRemoteTOD_state
*state
= tevent_req_data(
5049 req
, struct rpccli_srvsvc_NetRemoteTOD_state
);
5052 if (tevent_req_is_nterror(req
, &status
)) {
5053 tevent_req_received(req
);
5057 /* Steal possbile out parameters to the callers context */
5058 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5061 *result
= state
->orig
.out
.result
;
5063 tevent_req_received(req
);
5064 return NT_STATUS_OK
;
5067 NTSTATUS
rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client
*cli
,
5068 TALLOC_CTX
*mem_ctx
,
5069 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
5070 struct srvsvc_NetRemoteTODInfo
**info
/* [out] [ref] */,
5073 struct srvsvc_NetRemoteTOD r
;
5077 r
.in
.server_unc
= server_unc
;
5079 if (DEBUGLEVEL
>= 10) {
5080 NDR_PRINT_IN_DEBUG(srvsvc_NetRemoteTOD
, &r
);
5083 status
= cli
->dispatch(cli
,
5086 NDR_SRVSVC_NETREMOTETOD
,
5089 if (!NT_STATUS_IS_OK(status
)) {
5093 if (DEBUGLEVEL
>= 10) {
5094 NDR_PRINT_OUT_DEBUG(srvsvc_NetRemoteTOD
, &r
);
5097 if (NT_STATUS_IS_ERR(status
)) {
5101 /* Return variables */
5102 *info
= *r
.out
.info
;
5106 *werror
= r
.out
.result
;
5109 return werror_to_ntstatus(r
.out
.result
);
5112 struct rpccli_srvsvc_NetSetServiceBits_state
{
5113 struct srvsvc_NetSetServiceBits orig
;
5114 struct srvsvc_NetSetServiceBits tmp
;
5115 TALLOC_CTX
*out_mem_ctx
;
5116 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5119 static void rpccli_srvsvc_NetSetServiceBits_done(struct tevent_req
*subreq
);
5121 struct tevent_req
*rpccli_srvsvc_NetSetServiceBits_send(TALLOC_CTX
*mem_ctx
,
5122 struct tevent_context
*ev
,
5123 struct rpc_pipe_client
*cli
,
5124 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
5125 const char *_transport
/* [in] [unique,charset(UTF16)] */,
5126 uint32_t _servicebits
/* [in] */,
5127 uint32_t _updateimmediately
/* [in] */)
5129 struct tevent_req
*req
;
5130 struct rpccli_srvsvc_NetSetServiceBits_state
*state
;
5131 struct tevent_req
*subreq
;
5133 req
= tevent_req_create(mem_ctx
, &state
,
5134 struct rpccli_srvsvc_NetSetServiceBits_state
);
5138 state
->out_mem_ctx
= NULL
;
5139 state
->dispatch_recv
= cli
->dispatch_recv
;
5142 state
->orig
.in
.server_unc
= _server_unc
;
5143 state
->orig
.in
.transport
= _transport
;
5144 state
->orig
.in
.servicebits
= _servicebits
;
5145 state
->orig
.in
.updateimmediately
= _updateimmediately
;
5147 /* Out parameters */
5150 ZERO_STRUCT(state
->orig
.out
.result
);
5152 if (DEBUGLEVEL
>= 10) {
5153 NDR_PRINT_IN_DEBUG(srvsvc_NetSetServiceBits
, &state
->orig
);
5156 /* make a temporary copy, that we pass to the dispatch function */
5157 state
->tmp
= state
->orig
;
5159 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5161 NDR_SRVSVC_NETSETSERVICEBITS
,
5163 if (tevent_req_nomem(subreq
, req
)) {
5164 return tevent_req_post(req
, ev
);
5166 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetSetServiceBits_done
, req
);
5170 static void rpccli_srvsvc_NetSetServiceBits_done(struct tevent_req
*subreq
)
5172 struct tevent_req
*req
= tevent_req_callback_data(
5173 subreq
, struct tevent_req
);
5174 struct rpccli_srvsvc_NetSetServiceBits_state
*state
= tevent_req_data(
5175 req
, struct rpccli_srvsvc_NetSetServiceBits_state
);
5177 TALLOC_CTX
*mem_ctx
;
5179 if (state
->out_mem_ctx
) {
5180 mem_ctx
= state
->out_mem_ctx
;
5185 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5186 TALLOC_FREE(subreq
);
5187 if (!NT_STATUS_IS_OK(status
)) {
5188 tevent_req_nterror(req
, status
);
5192 /* Copy out parameters */
5195 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5197 /* Reset temporary structure */
5198 ZERO_STRUCT(state
->tmp
);
5200 if (DEBUGLEVEL
>= 10) {
5201 NDR_PRINT_OUT_DEBUG(srvsvc_NetSetServiceBits
, &state
->orig
);
5204 tevent_req_done(req
);
5207 NTSTATUS
rpccli_srvsvc_NetSetServiceBits_recv(struct tevent_req
*req
,
5208 TALLOC_CTX
*mem_ctx
,
5211 struct rpccli_srvsvc_NetSetServiceBits_state
*state
= tevent_req_data(
5212 req
, struct rpccli_srvsvc_NetSetServiceBits_state
);
5215 if (tevent_req_is_nterror(req
, &status
)) {
5216 tevent_req_received(req
);
5220 /* Steal possbile out parameters to the callers context */
5221 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5224 *result
= state
->orig
.out
.result
;
5226 tevent_req_received(req
);
5227 return NT_STATUS_OK
;
5230 NTSTATUS
rpccli_srvsvc_NetSetServiceBits(struct rpc_pipe_client
*cli
,
5231 TALLOC_CTX
*mem_ctx
,
5232 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
5233 const char *transport
/* [in] [unique,charset(UTF16)] */,
5234 uint32_t servicebits
/* [in] */,
5235 uint32_t updateimmediately
/* [in] */,
5238 struct srvsvc_NetSetServiceBits r
;
5242 r
.in
.server_unc
= server_unc
;
5243 r
.in
.transport
= transport
;
5244 r
.in
.servicebits
= servicebits
;
5245 r
.in
.updateimmediately
= updateimmediately
;
5247 if (DEBUGLEVEL
>= 10) {
5248 NDR_PRINT_IN_DEBUG(srvsvc_NetSetServiceBits
, &r
);
5251 status
= cli
->dispatch(cli
,
5254 NDR_SRVSVC_NETSETSERVICEBITS
,
5257 if (!NT_STATUS_IS_OK(status
)) {
5261 if (DEBUGLEVEL
>= 10) {
5262 NDR_PRINT_OUT_DEBUG(srvsvc_NetSetServiceBits
, &r
);
5265 if (NT_STATUS_IS_ERR(status
)) {
5269 /* Return variables */
5273 *werror
= r
.out
.result
;
5276 return werror_to_ntstatus(r
.out
.result
);
5279 struct rpccli_srvsvc_NetPathType_state
{
5280 struct srvsvc_NetPathType orig
;
5281 struct srvsvc_NetPathType tmp
;
5282 TALLOC_CTX
*out_mem_ctx
;
5283 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5286 static void rpccli_srvsvc_NetPathType_done(struct tevent_req
*subreq
);
5288 struct tevent_req
*rpccli_srvsvc_NetPathType_send(TALLOC_CTX
*mem_ctx
,
5289 struct tevent_context
*ev
,
5290 struct rpc_pipe_client
*cli
,
5291 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
5292 const char *_path
/* [in] [charset(UTF16)] */,
5293 uint32_t _pathflags
/* [in] */,
5294 uint32_t *_pathtype
/* [out] [ref] */)
5296 struct tevent_req
*req
;
5297 struct rpccli_srvsvc_NetPathType_state
*state
;
5298 struct tevent_req
*subreq
;
5300 req
= tevent_req_create(mem_ctx
, &state
,
5301 struct rpccli_srvsvc_NetPathType_state
);
5305 state
->out_mem_ctx
= NULL
;
5306 state
->dispatch_recv
= cli
->dispatch_recv
;
5309 state
->orig
.in
.server_unc
= _server_unc
;
5310 state
->orig
.in
.path
= _path
;
5311 state
->orig
.in
.pathflags
= _pathflags
;
5313 /* Out parameters */
5314 state
->orig
.out
.pathtype
= _pathtype
;
5317 ZERO_STRUCT(state
->orig
.out
.result
);
5319 if (DEBUGLEVEL
>= 10) {
5320 NDR_PRINT_IN_DEBUG(srvsvc_NetPathType
, &state
->orig
);
5323 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5324 "rpccli_srvsvc_NetPathType_out_memory");
5325 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5326 return tevent_req_post(req
, ev
);
5329 /* make a temporary copy, that we pass to the dispatch function */
5330 state
->tmp
= state
->orig
;
5332 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5334 NDR_SRVSVC_NETPATHTYPE
,
5336 if (tevent_req_nomem(subreq
, req
)) {
5337 return tevent_req_post(req
, ev
);
5339 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetPathType_done
, req
);
5343 static void rpccli_srvsvc_NetPathType_done(struct tevent_req
*subreq
)
5345 struct tevent_req
*req
= tevent_req_callback_data(
5346 subreq
, struct tevent_req
);
5347 struct rpccli_srvsvc_NetPathType_state
*state
= tevent_req_data(
5348 req
, struct rpccli_srvsvc_NetPathType_state
);
5350 TALLOC_CTX
*mem_ctx
;
5352 if (state
->out_mem_ctx
) {
5353 mem_ctx
= state
->out_mem_ctx
;
5358 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5359 TALLOC_FREE(subreq
);
5360 if (!NT_STATUS_IS_OK(status
)) {
5361 tevent_req_nterror(req
, status
);
5365 /* Copy out parameters */
5366 *state
->orig
.out
.pathtype
= *state
->tmp
.out
.pathtype
;
5369 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5371 /* Reset temporary structure */
5372 ZERO_STRUCT(state
->tmp
);
5374 if (DEBUGLEVEL
>= 10) {
5375 NDR_PRINT_OUT_DEBUG(srvsvc_NetPathType
, &state
->orig
);
5378 tevent_req_done(req
);
5381 NTSTATUS
rpccli_srvsvc_NetPathType_recv(struct tevent_req
*req
,
5382 TALLOC_CTX
*mem_ctx
,
5385 struct rpccli_srvsvc_NetPathType_state
*state
= tevent_req_data(
5386 req
, struct rpccli_srvsvc_NetPathType_state
);
5389 if (tevent_req_is_nterror(req
, &status
)) {
5390 tevent_req_received(req
);
5394 /* Steal possbile out parameters to the callers context */
5395 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5398 *result
= state
->orig
.out
.result
;
5400 tevent_req_received(req
);
5401 return NT_STATUS_OK
;
5404 NTSTATUS
rpccli_srvsvc_NetPathType(struct rpc_pipe_client
*cli
,
5405 TALLOC_CTX
*mem_ctx
,
5406 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
5407 const char *path
/* [in] [charset(UTF16)] */,
5408 uint32_t pathflags
/* [in] */,
5409 uint32_t *pathtype
/* [out] [ref] */,
5412 struct srvsvc_NetPathType r
;
5416 r
.in
.server_unc
= server_unc
;
5418 r
.in
.pathflags
= pathflags
;
5420 if (DEBUGLEVEL
>= 10) {
5421 NDR_PRINT_IN_DEBUG(srvsvc_NetPathType
, &r
);
5424 status
= cli
->dispatch(cli
,
5427 NDR_SRVSVC_NETPATHTYPE
,
5430 if (!NT_STATUS_IS_OK(status
)) {
5434 if (DEBUGLEVEL
>= 10) {
5435 NDR_PRINT_OUT_DEBUG(srvsvc_NetPathType
, &r
);
5438 if (NT_STATUS_IS_ERR(status
)) {
5442 /* Return variables */
5443 *pathtype
= *r
.out
.pathtype
;
5447 *werror
= r
.out
.result
;
5450 return werror_to_ntstatus(r
.out
.result
);
5453 struct rpccli_srvsvc_NetPathCanonicalize_state
{
5454 struct srvsvc_NetPathCanonicalize orig
;
5455 struct srvsvc_NetPathCanonicalize tmp
;
5456 TALLOC_CTX
*out_mem_ctx
;
5457 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5460 static void rpccli_srvsvc_NetPathCanonicalize_done(struct tevent_req
*subreq
);
5462 struct tevent_req
*rpccli_srvsvc_NetPathCanonicalize_send(TALLOC_CTX
*mem_ctx
,
5463 struct tevent_context
*ev
,
5464 struct rpc_pipe_client
*cli
,
5465 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
5466 const char *_path
/* [in] [charset(UTF16)] */,
5467 uint8_t *_can_path
/* [out] [size_is(maxbuf)] */,
5468 uint32_t _maxbuf
/* [in] */,
5469 const char *_prefix
/* [in] [charset(UTF16)] */,
5470 uint32_t *_pathtype
/* [in,out] [ref] */,
5471 uint32_t _pathflags
/* [in] */)
5473 struct tevent_req
*req
;
5474 struct rpccli_srvsvc_NetPathCanonicalize_state
*state
;
5475 struct tevent_req
*subreq
;
5477 req
= tevent_req_create(mem_ctx
, &state
,
5478 struct rpccli_srvsvc_NetPathCanonicalize_state
);
5482 state
->out_mem_ctx
= NULL
;
5483 state
->dispatch_recv
= cli
->dispatch_recv
;
5486 state
->orig
.in
.server_unc
= _server_unc
;
5487 state
->orig
.in
.path
= _path
;
5488 state
->orig
.in
.maxbuf
= _maxbuf
;
5489 state
->orig
.in
.prefix
= _prefix
;
5490 state
->orig
.in
.pathtype
= _pathtype
;
5491 state
->orig
.in
.pathflags
= _pathflags
;
5493 /* Out parameters */
5494 state
->orig
.out
.can_path
= _can_path
;
5495 state
->orig
.out
.pathtype
= _pathtype
;
5498 ZERO_STRUCT(state
->orig
.out
.result
);
5500 if (DEBUGLEVEL
>= 10) {
5501 NDR_PRINT_IN_DEBUG(srvsvc_NetPathCanonicalize
, &state
->orig
);
5504 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5505 "rpccli_srvsvc_NetPathCanonicalize_out_memory");
5506 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5507 return tevent_req_post(req
, ev
);
5510 /* make a temporary copy, that we pass to the dispatch function */
5511 state
->tmp
= state
->orig
;
5513 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5515 NDR_SRVSVC_NETPATHCANONICALIZE
,
5517 if (tevent_req_nomem(subreq
, req
)) {
5518 return tevent_req_post(req
, ev
);
5520 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetPathCanonicalize_done
, req
);
5524 static void rpccli_srvsvc_NetPathCanonicalize_done(struct tevent_req
*subreq
)
5526 struct tevent_req
*req
= tevent_req_callback_data(
5527 subreq
, struct tevent_req
);
5528 struct rpccli_srvsvc_NetPathCanonicalize_state
*state
= tevent_req_data(
5529 req
, struct rpccli_srvsvc_NetPathCanonicalize_state
);
5531 TALLOC_CTX
*mem_ctx
;
5533 if (state
->out_mem_ctx
) {
5534 mem_ctx
= state
->out_mem_ctx
;
5539 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5540 TALLOC_FREE(subreq
);
5541 if (!NT_STATUS_IS_OK(status
)) {
5542 tevent_req_nterror(req
, status
);
5546 /* Copy out parameters */
5547 memcpy(state
->orig
.out
.can_path
, state
->tmp
.out
.can_path
, state
->tmp
.in
.maxbuf
* sizeof(*state
->orig
.out
.can_path
));
5548 *state
->orig
.out
.pathtype
= *state
->tmp
.out
.pathtype
;
5551 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5553 /* Reset temporary structure */
5554 ZERO_STRUCT(state
->tmp
);
5556 if (DEBUGLEVEL
>= 10) {
5557 NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCanonicalize
, &state
->orig
);
5560 tevent_req_done(req
);
5563 NTSTATUS
rpccli_srvsvc_NetPathCanonicalize_recv(struct tevent_req
*req
,
5564 TALLOC_CTX
*mem_ctx
,
5567 struct rpccli_srvsvc_NetPathCanonicalize_state
*state
= tevent_req_data(
5568 req
, struct rpccli_srvsvc_NetPathCanonicalize_state
);
5571 if (tevent_req_is_nterror(req
, &status
)) {
5572 tevent_req_received(req
);
5576 /* Steal possbile out parameters to the callers context */
5577 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5580 *result
= state
->orig
.out
.result
;
5582 tevent_req_received(req
);
5583 return NT_STATUS_OK
;
5586 NTSTATUS
rpccli_srvsvc_NetPathCanonicalize(struct rpc_pipe_client
*cli
,
5587 TALLOC_CTX
*mem_ctx
,
5588 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
5589 const char *path
/* [in] [charset(UTF16)] */,
5590 uint8_t *can_path
/* [out] [size_is(maxbuf)] */,
5591 uint32_t maxbuf
/* [in] */,
5592 const char *prefix
/* [in] [charset(UTF16)] */,
5593 uint32_t *pathtype
/* [in,out] [ref] */,
5594 uint32_t pathflags
/* [in] */,
5597 struct srvsvc_NetPathCanonicalize r
;
5601 r
.in
.server_unc
= server_unc
;
5603 r
.in
.maxbuf
= maxbuf
;
5604 r
.in
.prefix
= prefix
;
5605 r
.in
.pathtype
= pathtype
;
5606 r
.in
.pathflags
= pathflags
;
5608 if (DEBUGLEVEL
>= 10) {
5609 NDR_PRINT_IN_DEBUG(srvsvc_NetPathCanonicalize
, &r
);
5612 status
= cli
->dispatch(cli
,
5615 NDR_SRVSVC_NETPATHCANONICALIZE
,
5618 if (!NT_STATUS_IS_OK(status
)) {
5622 if (DEBUGLEVEL
>= 10) {
5623 NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCanonicalize
, &r
);
5626 if (NT_STATUS_IS_ERR(status
)) {
5630 /* Return variables */
5631 memcpy(can_path
, r
.out
.can_path
, r
.in
.maxbuf
* sizeof(*can_path
));
5632 *pathtype
= *r
.out
.pathtype
;
5636 *werror
= r
.out
.result
;
5639 return werror_to_ntstatus(r
.out
.result
);
5642 struct rpccli_srvsvc_NetPathCompare_state
{
5643 struct srvsvc_NetPathCompare orig
;
5644 struct srvsvc_NetPathCompare tmp
;
5645 TALLOC_CTX
*out_mem_ctx
;
5646 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5649 static void rpccli_srvsvc_NetPathCompare_done(struct tevent_req
*subreq
);
5651 struct tevent_req
*rpccli_srvsvc_NetPathCompare_send(TALLOC_CTX
*mem_ctx
,
5652 struct tevent_context
*ev
,
5653 struct rpc_pipe_client
*cli
,
5654 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
5655 const char *_path1
/* [in] [charset(UTF16)] */,
5656 const char *_path2
/* [in] [charset(UTF16)] */,
5657 uint32_t _pathtype
/* [in] */,
5658 uint32_t _pathflags
/* [in] */)
5660 struct tevent_req
*req
;
5661 struct rpccli_srvsvc_NetPathCompare_state
*state
;
5662 struct tevent_req
*subreq
;
5664 req
= tevent_req_create(mem_ctx
, &state
,
5665 struct rpccli_srvsvc_NetPathCompare_state
);
5669 state
->out_mem_ctx
= NULL
;
5670 state
->dispatch_recv
= cli
->dispatch_recv
;
5673 state
->orig
.in
.server_unc
= _server_unc
;
5674 state
->orig
.in
.path1
= _path1
;
5675 state
->orig
.in
.path2
= _path2
;
5676 state
->orig
.in
.pathtype
= _pathtype
;
5677 state
->orig
.in
.pathflags
= _pathflags
;
5679 /* Out parameters */
5682 ZERO_STRUCT(state
->orig
.out
.result
);
5684 if (DEBUGLEVEL
>= 10) {
5685 NDR_PRINT_IN_DEBUG(srvsvc_NetPathCompare
, &state
->orig
);
5688 /* make a temporary copy, that we pass to the dispatch function */
5689 state
->tmp
= state
->orig
;
5691 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5693 NDR_SRVSVC_NETPATHCOMPARE
,
5695 if (tevent_req_nomem(subreq
, req
)) {
5696 return tevent_req_post(req
, ev
);
5698 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetPathCompare_done
, req
);
5702 static void rpccli_srvsvc_NetPathCompare_done(struct tevent_req
*subreq
)
5704 struct tevent_req
*req
= tevent_req_callback_data(
5705 subreq
, struct tevent_req
);
5706 struct rpccli_srvsvc_NetPathCompare_state
*state
= tevent_req_data(
5707 req
, struct rpccli_srvsvc_NetPathCompare_state
);
5709 TALLOC_CTX
*mem_ctx
;
5711 if (state
->out_mem_ctx
) {
5712 mem_ctx
= state
->out_mem_ctx
;
5717 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5718 TALLOC_FREE(subreq
);
5719 if (!NT_STATUS_IS_OK(status
)) {
5720 tevent_req_nterror(req
, status
);
5724 /* Copy out parameters */
5727 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5729 /* Reset temporary structure */
5730 ZERO_STRUCT(state
->tmp
);
5732 if (DEBUGLEVEL
>= 10) {
5733 NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCompare
, &state
->orig
);
5736 tevent_req_done(req
);
5739 NTSTATUS
rpccli_srvsvc_NetPathCompare_recv(struct tevent_req
*req
,
5740 TALLOC_CTX
*mem_ctx
,
5743 struct rpccli_srvsvc_NetPathCompare_state
*state
= tevent_req_data(
5744 req
, struct rpccli_srvsvc_NetPathCompare_state
);
5747 if (tevent_req_is_nterror(req
, &status
)) {
5748 tevent_req_received(req
);
5752 /* Steal possbile out parameters to the callers context */
5753 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5756 *result
= state
->orig
.out
.result
;
5758 tevent_req_received(req
);
5759 return NT_STATUS_OK
;
5762 NTSTATUS
rpccli_srvsvc_NetPathCompare(struct rpc_pipe_client
*cli
,
5763 TALLOC_CTX
*mem_ctx
,
5764 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
5765 const char *path1
/* [in] [charset(UTF16)] */,
5766 const char *path2
/* [in] [charset(UTF16)] */,
5767 uint32_t pathtype
/* [in] */,
5768 uint32_t pathflags
/* [in] */,
5771 struct srvsvc_NetPathCompare r
;
5775 r
.in
.server_unc
= server_unc
;
5778 r
.in
.pathtype
= pathtype
;
5779 r
.in
.pathflags
= pathflags
;
5781 if (DEBUGLEVEL
>= 10) {
5782 NDR_PRINT_IN_DEBUG(srvsvc_NetPathCompare
, &r
);
5785 status
= cli
->dispatch(cli
,
5788 NDR_SRVSVC_NETPATHCOMPARE
,
5791 if (!NT_STATUS_IS_OK(status
)) {
5795 if (DEBUGLEVEL
>= 10) {
5796 NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCompare
, &r
);
5799 if (NT_STATUS_IS_ERR(status
)) {
5803 /* Return variables */
5807 *werror
= r
.out
.result
;
5810 return werror_to_ntstatus(r
.out
.result
);
5813 struct rpccli_srvsvc_NetNameValidate_state
{
5814 struct srvsvc_NetNameValidate orig
;
5815 struct srvsvc_NetNameValidate tmp
;
5816 TALLOC_CTX
*out_mem_ctx
;
5817 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5820 static void rpccli_srvsvc_NetNameValidate_done(struct tevent_req
*subreq
);
5822 struct tevent_req
*rpccli_srvsvc_NetNameValidate_send(TALLOC_CTX
*mem_ctx
,
5823 struct tevent_context
*ev
,
5824 struct rpc_pipe_client
*cli
,
5825 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
5826 const char *_name
/* [in] [charset(UTF16)] */,
5827 uint32_t _name_type
/* [in] */,
5828 uint32_t _flags
/* [in] */)
5830 struct tevent_req
*req
;
5831 struct rpccli_srvsvc_NetNameValidate_state
*state
;
5832 struct tevent_req
*subreq
;
5834 req
= tevent_req_create(mem_ctx
, &state
,
5835 struct rpccli_srvsvc_NetNameValidate_state
);
5839 state
->out_mem_ctx
= NULL
;
5840 state
->dispatch_recv
= cli
->dispatch_recv
;
5843 state
->orig
.in
.server_unc
= _server_unc
;
5844 state
->orig
.in
.name
= _name
;
5845 state
->orig
.in
.name_type
= _name_type
;
5846 state
->orig
.in
.flags
= _flags
;
5848 /* Out parameters */
5851 ZERO_STRUCT(state
->orig
.out
.result
);
5853 if (DEBUGLEVEL
>= 10) {
5854 NDR_PRINT_IN_DEBUG(srvsvc_NetNameValidate
, &state
->orig
);
5857 /* make a temporary copy, that we pass to the dispatch function */
5858 state
->tmp
= state
->orig
;
5860 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5862 NDR_SRVSVC_NETNAMEVALIDATE
,
5864 if (tevent_req_nomem(subreq
, req
)) {
5865 return tevent_req_post(req
, ev
);
5867 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetNameValidate_done
, req
);
5871 static void rpccli_srvsvc_NetNameValidate_done(struct tevent_req
*subreq
)
5873 struct tevent_req
*req
= tevent_req_callback_data(
5874 subreq
, struct tevent_req
);
5875 struct rpccli_srvsvc_NetNameValidate_state
*state
= tevent_req_data(
5876 req
, struct rpccli_srvsvc_NetNameValidate_state
);
5878 TALLOC_CTX
*mem_ctx
;
5880 if (state
->out_mem_ctx
) {
5881 mem_ctx
= state
->out_mem_ctx
;
5886 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5887 TALLOC_FREE(subreq
);
5888 if (!NT_STATUS_IS_OK(status
)) {
5889 tevent_req_nterror(req
, status
);
5893 /* Copy out parameters */
5896 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5898 /* Reset temporary structure */
5899 ZERO_STRUCT(state
->tmp
);
5901 if (DEBUGLEVEL
>= 10) {
5902 NDR_PRINT_OUT_DEBUG(srvsvc_NetNameValidate
, &state
->orig
);
5905 tevent_req_done(req
);
5908 NTSTATUS
rpccli_srvsvc_NetNameValidate_recv(struct tevent_req
*req
,
5909 TALLOC_CTX
*mem_ctx
,
5912 struct rpccli_srvsvc_NetNameValidate_state
*state
= tevent_req_data(
5913 req
, struct rpccli_srvsvc_NetNameValidate_state
);
5916 if (tevent_req_is_nterror(req
, &status
)) {
5917 tevent_req_received(req
);
5921 /* Steal possbile out parameters to the callers context */
5922 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5925 *result
= state
->orig
.out
.result
;
5927 tevent_req_received(req
);
5928 return NT_STATUS_OK
;
5931 NTSTATUS
rpccli_srvsvc_NetNameValidate(struct rpc_pipe_client
*cli
,
5932 TALLOC_CTX
*mem_ctx
,
5933 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
5934 const char *name
/* [in] [charset(UTF16)] */,
5935 uint32_t name_type
/* [in] */,
5936 uint32_t flags
/* [in] */,
5939 struct srvsvc_NetNameValidate r
;
5943 r
.in
.server_unc
= server_unc
;
5945 r
.in
.name_type
= name_type
;
5948 if (DEBUGLEVEL
>= 10) {
5949 NDR_PRINT_IN_DEBUG(srvsvc_NetNameValidate
, &r
);
5952 status
= cli
->dispatch(cli
,
5955 NDR_SRVSVC_NETNAMEVALIDATE
,
5958 if (!NT_STATUS_IS_OK(status
)) {
5962 if (DEBUGLEVEL
>= 10) {
5963 NDR_PRINT_OUT_DEBUG(srvsvc_NetNameValidate
, &r
);
5966 if (NT_STATUS_IS_ERR(status
)) {
5970 /* Return variables */
5974 *werror
= r
.out
.result
;
5977 return werror_to_ntstatus(r
.out
.result
);
5980 struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state
{
5981 struct srvsvc_NETRPRNAMECANONICALIZE orig
;
5982 struct srvsvc_NETRPRNAMECANONICALIZE tmp
;
5983 TALLOC_CTX
*out_mem_ctx
;
5984 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5987 static void rpccli_srvsvc_NETRPRNAMECANONICALIZE_done(struct tevent_req
*subreq
);
5989 struct tevent_req
*rpccli_srvsvc_NETRPRNAMECANONICALIZE_send(TALLOC_CTX
*mem_ctx
,
5990 struct tevent_context
*ev
,
5991 struct rpc_pipe_client
*cli
)
5993 struct tevent_req
*req
;
5994 struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state
*state
;
5995 struct tevent_req
*subreq
;
5997 req
= tevent_req_create(mem_ctx
, &state
,
5998 struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state
);
6002 state
->out_mem_ctx
= NULL
;
6003 state
->dispatch_recv
= cli
->dispatch_recv
;
6007 /* Out parameters */
6010 ZERO_STRUCT(state
->orig
.out
.result
);
6012 if (DEBUGLEVEL
>= 10) {
6013 NDR_PRINT_IN_DEBUG(srvsvc_NETRPRNAMECANONICALIZE
, &state
->orig
);
6016 /* make a temporary copy, that we pass to the dispatch function */
6017 state
->tmp
= state
->orig
;
6019 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6021 NDR_SRVSVC_NETRPRNAMECANONICALIZE
,
6023 if (tevent_req_nomem(subreq
, req
)) {
6024 return tevent_req_post(req
, ev
);
6026 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRPRNAMECANONICALIZE_done
, req
);
6030 static void rpccli_srvsvc_NETRPRNAMECANONICALIZE_done(struct tevent_req
*subreq
)
6032 struct tevent_req
*req
= tevent_req_callback_data(
6033 subreq
, struct tevent_req
);
6034 struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state
*state
= tevent_req_data(
6035 req
, struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state
);
6037 TALLOC_CTX
*mem_ctx
;
6039 if (state
->out_mem_ctx
) {
6040 mem_ctx
= state
->out_mem_ctx
;
6045 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6046 TALLOC_FREE(subreq
);
6047 if (!NT_STATUS_IS_OK(status
)) {
6048 tevent_req_nterror(req
, status
);
6052 /* Copy out parameters */
6055 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6057 /* Reset temporary structure */
6058 ZERO_STRUCT(state
->tmp
);
6060 if (DEBUGLEVEL
>= 10) {
6061 NDR_PRINT_OUT_DEBUG(srvsvc_NETRPRNAMECANONICALIZE
, &state
->orig
);
6064 tevent_req_done(req
);
6067 NTSTATUS
rpccli_srvsvc_NETRPRNAMECANONICALIZE_recv(struct tevent_req
*req
,
6068 TALLOC_CTX
*mem_ctx
,
6071 struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state
*state
= tevent_req_data(
6072 req
, struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state
);
6075 if (tevent_req_is_nterror(req
, &status
)) {
6076 tevent_req_received(req
);
6080 /* Steal possbile out parameters to the callers context */
6081 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6084 *result
= state
->orig
.out
.result
;
6086 tevent_req_received(req
);
6087 return NT_STATUS_OK
;
6090 NTSTATUS
rpccli_srvsvc_NETRPRNAMECANONICALIZE(struct rpc_pipe_client
*cli
,
6091 TALLOC_CTX
*mem_ctx
,
6094 struct srvsvc_NETRPRNAMECANONICALIZE r
;
6099 if (DEBUGLEVEL
>= 10) {
6100 NDR_PRINT_IN_DEBUG(srvsvc_NETRPRNAMECANONICALIZE
, &r
);
6103 status
= cli
->dispatch(cli
,
6106 NDR_SRVSVC_NETRPRNAMECANONICALIZE
,
6109 if (!NT_STATUS_IS_OK(status
)) {
6113 if (DEBUGLEVEL
>= 10) {
6114 NDR_PRINT_OUT_DEBUG(srvsvc_NETRPRNAMECANONICALIZE
, &r
);
6117 if (NT_STATUS_IS_ERR(status
)) {
6121 /* Return variables */
6125 *werror
= r
.out
.result
;
6128 return werror_to_ntstatus(r
.out
.result
);
6131 struct rpccli_srvsvc_NetPRNameCompare_state
{
6132 struct srvsvc_NetPRNameCompare orig
;
6133 struct srvsvc_NetPRNameCompare tmp
;
6134 TALLOC_CTX
*out_mem_ctx
;
6135 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6138 static void rpccli_srvsvc_NetPRNameCompare_done(struct tevent_req
*subreq
);
6140 struct tevent_req
*rpccli_srvsvc_NetPRNameCompare_send(TALLOC_CTX
*mem_ctx
,
6141 struct tevent_context
*ev
,
6142 struct rpc_pipe_client
*cli
,
6143 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
6144 const char *_name1
/* [in] [charset(UTF16)] */,
6145 const char *_name2
/* [in] [charset(UTF16)] */,
6146 uint32_t _name_type
/* [in] */,
6147 uint32_t _flags
/* [in] */)
6149 struct tevent_req
*req
;
6150 struct rpccli_srvsvc_NetPRNameCompare_state
*state
;
6151 struct tevent_req
*subreq
;
6153 req
= tevent_req_create(mem_ctx
, &state
,
6154 struct rpccli_srvsvc_NetPRNameCompare_state
);
6158 state
->out_mem_ctx
= NULL
;
6159 state
->dispatch_recv
= cli
->dispatch_recv
;
6162 state
->orig
.in
.server_unc
= _server_unc
;
6163 state
->orig
.in
.name1
= _name1
;
6164 state
->orig
.in
.name2
= _name2
;
6165 state
->orig
.in
.name_type
= _name_type
;
6166 state
->orig
.in
.flags
= _flags
;
6168 /* Out parameters */
6171 ZERO_STRUCT(state
->orig
.out
.result
);
6173 if (DEBUGLEVEL
>= 10) {
6174 NDR_PRINT_IN_DEBUG(srvsvc_NetPRNameCompare
, &state
->orig
);
6177 /* make a temporary copy, that we pass to the dispatch function */
6178 state
->tmp
= state
->orig
;
6180 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6182 NDR_SRVSVC_NETPRNAMECOMPARE
,
6184 if (tevent_req_nomem(subreq
, req
)) {
6185 return tevent_req_post(req
, ev
);
6187 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetPRNameCompare_done
, req
);
6191 static void rpccli_srvsvc_NetPRNameCompare_done(struct tevent_req
*subreq
)
6193 struct tevent_req
*req
= tevent_req_callback_data(
6194 subreq
, struct tevent_req
);
6195 struct rpccli_srvsvc_NetPRNameCompare_state
*state
= tevent_req_data(
6196 req
, struct rpccli_srvsvc_NetPRNameCompare_state
);
6198 TALLOC_CTX
*mem_ctx
;
6200 if (state
->out_mem_ctx
) {
6201 mem_ctx
= state
->out_mem_ctx
;
6206 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6207 TALLOC_FREE(subreq
);
6208 if (!NT_STATUS_IS_OK(status
)) {
6209 tevent_req_nterror(req
, status
);
6213 /* Copy out parameters */
6216 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6218 /* Reset temporary structure */
6219 ZERO_STRUCT(state
->tmp
);
6221 if (DEBUGLEVEL
>= 10) {
6222 NDR_PRINT_OUT_DEBUG(srvsvc_NetPRNameCompare
, &state
->orig
);
6225 tevent_req_done(req
);
6228 NTSTATUS
rpccli_srvsvc_NetPRNameCompare_recv(struct tevent_req
*req
,
6229 TALLOC_CTX
*mem_ctx
,
6232 struct rpccli_srvsvc_NetPRNameCompare_state
*state
= tevent_req_data(
6233 req
, struct rpccli_srvsvc_NetPRNameCompare_state
);
6236 if (tevent_req_is_nterror(req
, &status
)) {
6237 tevent_req_received(req
);
6241 /* Steal possbile out parameters to the callers context */
6242 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6245 *result
= state
->orig
.out
.result
;
6247 tevent_req_received(req
);
6248 return NT_STATUS_OK
;
6251 NTSTATUS
rpccli_srvsvc_NetPRNameCompare(struct rpc_pipe_client
*cli
,
6252 TALLOC_CTX
*mem_ctx
,
6253 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
6254 const char *name1
/* [in] [charset(UTF16)] */,
6255 const char *name2
/* [in] [charset(UTF16)] */,
6256 uint32_t name_type
/* [in] */,
6257 uint32_t flags
/* [in] */,
6260 struct srvsvc_NetPRNameCompare r
;
6264 r
.in
.server_unc
= server_unc
;
6267 r
.in
.name_type
= name_type
;
6270 if (DEBUGLEVEL
>= 10) {
6271 NDR_PRINT_IN_DEBUG(srvsvc_NetPRNameCompare
, &r
);
6274 status
= cli
->dispatch(cli
,
6277 NDR_SRVSVC_NETPRNAMECOMPARE
,
6280 if (!NT_STATUS_IS_OK(status
)) {
6284 if (DEBUGLEVEL
>= 10) {
6285 NDR_PRINT_OUT_DEBUG(srvsvc_NetPRNameCompare
, &r
);
6288 if (NT_STATUS_IS_ERR(status
)) {
6292 /* Return variables */
6296 *werror
= r
.out
.result
;
6299 return werror_to_ntstatus(r
.out
.result
);
6302 struct rpccli_srvsvc_NetShareEnum_state
{
6303 struct srvsvc_NetShareEnum orig
;
6304 struct srvsvc_NetShareEnum tmp
;
6305 TALLOC_CTX
*out_mem_ctx
;
6306 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6309 static void rpccli_srvsvc_NetShareEnum_done(struct tevent_req
*subreq
);
6311 struct tevent_req
*rpccli_srvsvc_NetShareEnum_send(TALLOC_CTX
*mem_ctx
,
6312 struct tevent_context
*ev
,
6313 struct rpc_pipe_client
*cli
,
6314 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
6315 struct srvsvc_NetShareInfoCtr
*_info_ctr
/* [in,out] [ref] */,
6316 uint32_t _max_buffer
/* [in] */,
6317 uint32_t *_totalentries
/* [out] [ref] */,
6318 uint32_t *_resume_handle
/* [in,out] [unique] */)
6320 struct tevent_req
*req
;
6321 struct rpccli_srvsvc_NetShareEnum_state
*state
;
6322 struct tevent_req
*subreq
;
6324 req
= tevent_req_create(mem_ctx
, &state
,
6325 struct rpccli_srvsvc_NetShareEnum_state
);
6329 state
->out_mem_ctx
= NULL
;
6330 state
->dispatch_recv
= cli
->dispatch_recv
;
6333 state
->orig
.in
.server_unc
= _server_unc
;
6334 state
->orig
.in
.info_ctr
= _info_ctr
;
6335 state
->orig
.in
.max_buffer
= _max_buffer
;
6336 state
->orig
.in
.resume_handle
= _resume_handle
;
6338 /* Out parameters */
6339 state
->orig
.out
.info_ctr
= _info_ctr
;
6340 state
->orig
.out
.totalentries
= _totalentries
;
6341 state
->orig
.out
.resume_handle
= _resume_handle
;
6344 ZERO_STRUCT(state
->orig
.out
.result
);
6346 if (DEBUGLEVEL
>= 10) {
6347 NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnum
, &state
->orig
);
6350 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6351 "rpccli_srvsvc_NetShareEnum_out_memory");
6352 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6353 return tevent_req_post(req
, ev
);
6356 /* make a temporary copy, that we pass to the dispatch function */
6357 state
->tmp
= state
->orig
;
6359 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6361 NDR_SRVSVC_NETSHAREENUM
,
6363 if (tevent_req_nomem(subreq
, req
)) {
6364 return tevent_req_post(req
, ev
);
6366 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareEnum_done
, req
);
6370 static void rpccli_srvsvc_NetShareEnum_done(struct tevent_req
*subreq
)
6372 struct tevent_req
*req
= tevent_req_callback_data(
6373 subreq
, struct tevent_req
);
6374 struct rpccli_srvsvc_NetShareEnum_state
*state
= tevent_req_data(
6375 req
, struct rpccli_srvsvc_NetShareEnum_state
);
6377 TALLOC_CTX
*mem_ctx
;
6379 if (state
->out_mem_ctx
) {
6380 mem_ctx
= state
->out_mem_ctx
;
6385 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6386 TALLOC_FREE(subreq
);
6387 if (!NT_STATUS_IS_OK(status
)) {
6388 tevent_req_nterror(req
, status
);
6392 /* Copy out parameters */
6393 *state
->orig
.out
.info_ctr
= *state
->tmp
.out
.info_ctr
;
6394 *state
->orig
.out
.totalentries
= *state
->tmp
.out
.totalentries
;
6395 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
6396 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
6400 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6402 /* Reset temporary structure */
6403 ZERO_STRUCT(state
->tmp
);
6405 if (DEBUGLEVEL
>= 10) {
6406 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnum
, &state
->orig
);
6409 tevent_req_done(req
);
6412 NTSTATUS
rpccli_srvsvc_NetShareEnum_recv(struct tevent_req
*req
,
6413 TALLOC_CTX
*mem_ctx
,
6416 struct rpccli_srvsvc_NetShareEnum_state
*state
= tevent_req_data(
6417 req
, struct rpccli_srvsvc_NetShareEnum_state
);
6420 if (tevent_req_is_nterror(req
, &status
)) {
6421 tevent_req_received(req
);
6425 /* Steal possbile out parameters to the callers context */
6426 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6429 *result
= state
->orig
.out
.result
;
6431 tevent_req_received(req
);
6432 return NT_STATUS_OK
;
6435 NTSTATUS
rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client
*cli
,
6436 TALLOC_CTX
*mem_ctx
,
6437 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
6438 struct srvsvc_NetShareInfoCtr
*info_ctr
/* [in,out] [ref] */,
6439 uint32_t max_buffer
/* [in] */,
6440 uint32_t *totalentries
/* [out] [ref] */,
6441 uint32_t *resume_handle
/* [in,out] [unique] */,
6444 struct srvsvc_NetShareEnum r
;
6448 r
.in
.server_unc
= server_unc
;
6449 r
.in
.info_ctr
= info_ctr
;
6450 r
.in
.max_buffer
= max_buffer
;
6451 r
.in
.resume_handle
= resume_handle
;
6453 if (DEBUGLEVEL
>= 10) {
6454 NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnum
, &r
);
6457 status
= cli
->dispatch(cli
,
6460 NDR_SRVSVC_NETSHAREENUM
,
6463 if (!NT_STATUS_IS_OK(status
)) {
6467 if (DEBUGLEVEL
>= 10) {
6468 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnum
, &r
);
6471 if (NT_STATUS_IS_ERR(status
)) {
6475 /* Return variables */
6476 *info_ctr
= *r
.out
.info_ctr
;
6477 *totalentries
= *r
.out
.totalentries
;
6478 if (resume_handle
&& r
.out
.resume_handle
) {
6479 *resume_handle
= *r
.out
.resume_handle
;
6484 *werror
= r
.out
.result
;
6487 return werror_to_ntstatus(r
.out
.result
);
6490 struct rpccli_srvsvc_NetShareDelStart_state
{
6491 struct srvsvc_NetShareDelStart orig
;
6492 struct srvsvc_NetShareDelStart tmp
;
6493 TALLOC_CTX
*out_mem_ctx
;
6494 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6497 static void rpccli_srvsvc_NetShareDelStart_done(struct tevent_req
*subreq
);
6499 struct tevent_req
*rpccli_srvsvc_NetShareDelStart_send(TALLOC_CTX
*mem_ctx
,
6500 struct tevent_context
*ev
,
6501 struct rpc_pipe_client
*cli
,
6502 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
6503 const char *_share
/* [in] [charset(UTF16)] */,
6504 uint32_t _reserved
/* [in] */,
6505 struct policy_handle
*_hnd
/* [out] [unique] */)
6507 struct tevent_req
*req
;
6508 struct rpccli_srvsvc_NetShareDelStart_state
*state
;
6509 struct tevent_req
*subreq
;
6511 req
= tevent_req_create(mem_ctx
, &state
,
6512 struct rpccli_srvsvc_NetShareDelStart_state
);
6516 state
->out_mem_ctx
= NULL
;
6517 state
->dispatch_recv
= cli
->dispatch_recv
;
6520 state
->orig
.in
.server_unc
= _server_unc
;
6521 state
->orig
.in
.share
= _share
;
6522 state
->orig
.in
.reserved
= _reserved
;
6524 /* Out parameters */
6525 state
->orig
.out
.hnd
= _hnd
;
6528 ZERO_STRUCT(state
->orig
.out
.result
);
6530 if (DEBUGLEVEL
>= 10) {
6531 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelStart
, &state
->orig
);
6534 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6535 "rpccli_srvsvc_NetShareDelStart_out_memory");
6536 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6537 return tevent_req_post(req
, ev
);
6540 /* make a temporary copy, that we pass to the dispatch function */
6541 state
->tmp
= state
->orig
;
6543 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6545 NDR_SRVSVC_NETSHAREDELSTART
,
6547 if (tevent_req_nomem(subreq
, req
)) {
6548 return tevent_req_post(req
, ev
);
6550 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareDelStart_done
, req
);
6554 static void rpccli_srvsvc_NetShareDelStart_done(struct tevent_req
*subreq
)
6556 struct tevent_req
*req
= tevent_req_callback_data(
6557 subreq
, struct tevent_req
);
6558 struct rpccli_srvsvc_NetShareDelStart_state
*state
= tevent_req_data(
6559 req
, struct rpccli_srvsvc_NetShareDelStart_state
);
6561 TALLOC_CTX
*mem_ctx
;
6563 if (state
->out_mem_ctx
) {
6564 mem_ctx
= state
->out_mem_ctx
;
6569 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6570 TALLOC_FREE(subreq
);
6571 if (!NT_STATUS_IS_OK(status
)) {
6572 tevent_req_nterror(req
, status
);
6576 /* Copy out parameters */
6577 if (state
->orig
.out
.hnd
&& state
->tmp
.out
.hnd
) {
6578 *state
->orig
.out
.hnd
= *state
->tmp
.out
.hnd
;
6582 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6584 /* Reset temporary structure */
6585 ZERO_STRUCT(state
->tmp
);
6587 if (DEBUGLEVEL
>= 10) {
6588 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelStart
, &state
->orig
);
6591 tevent_req_done(req
);
6594 NTSTATUS
rpccli_srvsvc_NetShareDelStart_recv(struct tevent_req
*req
,
6595 TALLOC_CTX
*mem_ctx
,
6598 struct rpccli_srvsvc_NetShareDelStart_state
*state
= tevent_req_data(
6599 req
, struct rpccli_srvsvc_NetShareDelStart_state
);
6602 if (tevent_req_is_nterror(req
, &status
)) {
6603 tevent_req_received(req
);
6607 /* Steal possbile out parameters to the callers context */
6608 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6611 *result
= state
->orig
.out
.result
;
6613 tevent_req_received(req
);
6614 return NT_STATUS_OK
;
6617 NTSTATUS
rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client
*cli
,
6618 TALLOC_CTX
*mem_ctx
,
6619 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
6620 const char *share
/* [in] [charset(UTF16)] */,
6621 uint32_t reserved
/* [in] */,
6622 struct policy_handle
*hnd
/* [out] [unique] */,
6625 struct srvsvc_NetShareDelStart r
;
6629 r
.in
.server_unc
= server_unc
;
6631 r
.in
.reserved
= reserved
;
6633 if (DEBUGLEVEL
>= 10) {
6634 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelStart
, &r
);
6637 status
= cli
->dispatch(cli
,
6640 NDR_SRVSVC_NETSHAREDELSTART
,
6643 if (!NT_STATUS_IS_OK(status
)) {
6647 if (DEBUGLEVEL
>= 10) {
6648 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelStart
, &r
);
6651 if (NT_STATUS_IS_ERR(status
)) {
6655 /* Return variables */
6656 if (hnd
&& r
.out
.hnd
) {
6662 *werror
= r
.out
.result
;
6665 return werror_to_ntstatus(r
.out
.result
);
6668 struct rpccli_srvsvc_NetShareDelCommit_state
{
6669 struct srvsvc_NetShareDelCommit orig
;
6670 struct srvsvc_NetShareDelCommit tmp
;
6671 TALLOC_CTX
*out_mem_ctx
;
6672 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6675 static void rpccli_srvsvc_NetShareDelCommit_done(struct tevent_req
*subreq
);
6677 struct tevent_req
*rpccli_srvsvc_NetShareDelCommit_send(TALLOC_CTX
*mem_ctx
,
6678 struct tevent_context
*ev
,
6679 struct rpc_pipe_client
*cli
,
6680 struct policy_handle
*_hnd
/* [in,out] [unique] */)
6682 struct tevent_req
*req
;
6683 struct rpccli_srvsvc_NetShareDelCommit_state
*state
;
6684 struct tevent_req
*subreq
;
6686 req
= tevent_req_create(mem_ctx
, &state
,
6687 struct rpccli_srvsvc_NetShareDelCommit_state
);
6691 state
->out_mem_ctx
= NULL
;
6692 state
->dispatch_recv
= cli
->dispatch_recv
;
6695 state
->orig
.in
.hnd
= _hnd
;
6697 /* Out parameters */
6698 state
->orig
.out
.hnd
= _hnd
;
6701 ZERO_STRUCT(state
->orig
.out
.result
);
6703 if (DEBUGLEVEL
>= 10) {
6704 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelCommit
, &state
->orig
);
6707 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6708 "rpccli_srvsvc_NetShareDelCommit_out_memory");
6709 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6710 return tevent_req_post(req
, ev
);
6713 /* make a temporary copy, that we pass to the dispatch function */
6714 state
->tmp
= state
->orig
;
6716 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6718 NDR_SRVSVC_NETSHAREDELCOMMIT
,
6720 if (tevent_req_nomem(subreq
, req
)) {
6721 return tevent_req_post(req
, ev
);
6723 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareDelCommit_done
, req
);
6727 static void rpccli_srvsvc_NetShareDelCommit_done(struct tevent_req
*subreq
)
6729 struct tevent_req
*req
= tevent_req_callback_data(
6730 subreq
, struct tevent_req
);
6731 struct rpccli_srvsvc_NetShareDelCommit_state
*state
= tevent_req_data(
6732 req
, struct rpccli_srvsvc_NetShareDelCommit_state
);
6734 TALLOC_CTX
*mem_ctx
;
6736 if (state
->out_mem_ctx
) {
6737 mem_ctx
= state
->out_mem_ctx
;
6742 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6743 TALLOC_FREE(subreq
);
6744 if (!NT_STATUS_IS_OK(status
)) {
6745 tevent_req_nterror(req
, status
);
6749 /* Copy out parameters */
6750 if (state
->orig
.out
.hnd
&& state
->tmp
.out
.hnd
) {
6751 *state
->orig
.out
.hnd
= *state
->tmp
.out
.hnd
;
6755 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6757 /* Reset temporary structure */
6758 ZERO_STRUCT(state
->tmp
);
6760 if (DEBUGLEVEL
>= 10) {
6761 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelCommit
, &state
->orig
);
6764 tevent_req_done(req
);
6767 NTSTATUS
rpccli_srvsvc_NetShareDelCommit_recv(struct tevent_req
*req
,
6768 TALLOC_CTX
*mem_ctx
,
6771 struct rpccli_srvsvc_NetShareDelCommit_state
*state
= tevent_req_data(
6772 req
, struct rpccli_srvsvc_NetShareDelCommit_state
);
6775 if (tevent_req_is_nterror(req
, &status
)) {
6776 tevent_req_received(req
);
6780 /* Steal possbile out parameters to the callers context */
6781 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6784 *result
= state
->orig
.out
.result
;
6786 tevent_req_received(req
);
6787 return NT_STATUS_OK
;
6790 NTSTATUS
rpccli_srvsvc_NetShareDelCommit(struct rpc_pipe_client
*cli
,
6791 TALLOC_CTX
*mem_ctx
,
6792 struct policy_handle
*hnd
/* [in,out] [unique] */,
6795 struct srvsvc_NetShareDelCommit r
;
6801 if (DEBUGLEVEL
>= 10) {
6802 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelCommit
, &r
);
6805 status
= cli
->dispatch(cli
,
6808 NDR_SRVSVC_NETSHAREDELCOMMIT
,
6811 if (!NT_STATUS_IS_OK(status
)) {
6815 if (DEBUGLEVEL
>= 10) {
6816 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelCommit
, &r
);
6819 if (NT_STATUS_IS_ERR(status
)) {
6823 /* Return variables */
6824 if (hnd
&& r
.out
.hnd
) {
6830 *werror
= r
.out
.result
;
6833 return werror_to_ntstatus(r
.out
.result
);
6836 struct rpccli_srvsvc_NetGetFileSecurity_state
{
6837 struct srvsvc_NetGetFileSecurity orig
;
6838 struct srvsvc_NetGetFileSecurity tmp
;
6839 TALLOC_CTX
*out_mem_ctx
;
6840 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6843 static void rpccli_srvsvc_NetGetFileSecurity_done(struct tevent_req
*subreq
);
6845 struct tevent_req
*rpccli_srvsvc_NetGetFileSecurity_send(TALLOC_CTX
*mem_ctx
,
6846 struct tevent_context
*ev
,
6847 struct rpc_pipe_client
*cli
,
6848 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
6849 const char *_share
/* [in] [unique,charset(UTF16)] */,
6850 const char *_file
/* [in] [charset(UTF16)] */,
6851 uint32_t _securityinformation
/* [in] */,
6852 struct sec_desc_buf
**_sd_buf
/* [out] [ref] */)
6854 struct tevent_req
*req
;
6855 struct rpccli_srvsvc_NetGetFileSecurity_state
*state
;
6856 struct tevent_req
*subreq
;
6858 req
= tevent_req_create(mem_ctx
, &state
,
6859 struct rpccli_srvsvc_NetGetFileSecurity_state
);
6863 state
->out_mem_ctx
= NULL
;
6864 state
->dispatch_recv
= cli
->dispatch_recv
;
6867 state
->orig
.in
.server_unc
= _server_unc
;
6868 state
->orig
.in
.share
= _share
;
6869 state
->orig
.in
.file
= _file
;
6870 state
->orig
.in
.securityinformation
= _securityinformation
;
6872 /* Out parameters */
6873 state
->orig
.out
.sd_buf
= _sd_buf
;
6876 ZERO_STRUCT(state
->orig
.out
.result
);
6878 if (DEBUGLEVEL
>= 10) {
6879 NDR_PRINT_IN_DEBUG(srvsvc_NetGetFileSecurity
, &state
->orig
);
6882 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6883 "rpccli_srvsvc_NetGetFileSecurity_out_memory");
6884 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6885 return tevent_req_post(req
, ev
);
6888 /* make a temporary copy, that we pass to the dispatch function */
6889 state
->tmp
= state
->orig
;
6891 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6893 NDR_SRVSVC_NETGETFILESECURITY
,
6895 if (tevent_req_nomem(subreq
, req
)) {
6896 return tevent_req_post(req
, ev
);
6898 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetGetFileSecurity_done
, req
);
6902 static void rpccli_srvsvc_NetGetFileSecurity_done(struct tevent_req
*subreq
)
6904 struct tevent_req
*req
= tevent_req_callback_data(
6905 subreq
, struct tevent_req
);
6906 struct rpccli_srvsvc_NetGetFileSecurity_state
*state
= tevent_req_data(
6907 req
, struct rpccli_srvsvc_NetGetFileSecurity_state
);
6909 TALLOC_CTX
*mem_ctx
;
6911 if (state
->out_mem_ctx
) {
6912 mem_ctx
= state
->out_mem_ctx
;
6917 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6918 TALLOC_FREE(subreq
);
6919 if (!NT_STATUS_IS_OK(status
)) {
6920 tevent_req_nterror(req
, status
);
6924 /* Copy out parameters */
6925 *state
->orig
.out
.sd_buf
= *state
->tmp
.out
.sd_buf
;
6928 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6930 /* Reset temporary structure */
6931 ZERO_STRUCT(state
->tmp
);
6933 if (DEBUGLEVEL
>= 10) {
6934 NDR_PRINT_OUT_DEBUG(srvsvc_NetGetFileSecurity
, &state
->orig
);
6937 tevent_req_done(req
);
6940 NTSTATUS
rpccli_srvsvc_NetGetFileSecurity_recv(struct tevent_req
*req
,
6941 TALLOC_CTX
*mem_ctx
,
6944 struct rpccli_srvsvc_NetGetFileSecurity_state
*state
= tevent_req_data(
6945 req
, struct rpccli_srvsvc_NetGetFileSecurity_state
);
6948 if (tevent_req_is_nterror(req
, &status
)) {
6949 tevent_req_received(req
);
6953 /* Steal possbile out parameters to the callers context */
6954 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6957 *result
= state
->orig
.out
.result
;
6959 tevent_req_received(req
);
6960 return NT_STATUS_OK
;
6963 NTSTATUS
rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client
*cli
,
6964 TALLOC_CTX
*mem_ctx
,
6965 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
6966 const char *share
/* [in] [unique,charset(UTF16)] */,
6967 const char *file
/* [in] [charset(UTF16)] */,
6968 uint32_t securityinformation
/* [in] */,
6969 struct sec_desc_buf
**sd_buf
/* [out] [ref] */,
6972 struct srvsvc_NetGetFileSecurity r
;
6976 r
.in
.server_unc
= server_unc
;
6979 r
.in
.securityinformation
= securityinformation
;
6981 if (DEBUGLEVEL
>= 10) {
6982 NDR_PRINT_IN_DEBUG(srvsvc_NetGetFileSecurity
, &r
);
6985 status
= cli
->dispatch(cli
,
6988 NDR_SRVSVC_NETGETFILESECURITY
,
6991 if (!NT_STATUS_IS_OK(status
)) {
6995 if (DEBUGLEVEL
>= 10) {
6996 NDR_PRINT_OUT_DEBUG(srvsvc_NetGetFileSecurity
, &r
);
6999 if (NT_STATUS_IS_ERR(status
)) {
7003 /* Return variables */
7004 *sd_buf
= *r
.out
.sd_buf
;
7008 *werror
= r
.out
.result
;
7011 return werror_to_ntstatus(r
.out
.result
);
7014 struct rpccli_srvsvc_NetSetFileSecurity_state
{
7015 struct srvsvc_NetSetFileSecurity orig
;
7016 struct srvsvc_NetSetFileSecurity tmp
;
7017 TALLOC_CTX
*out_mem_ctx
;
7018 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7021 static void rpccli_srvsvc_NetSetFileSecurity_done(struct tevent_req
*subreq
);
7023 struct tevent_req
*rpccli_srvsvc_NetSetFileSecurity_send(TALLOC_CTX
*mem_ctx
,
7024 struct tevent_context
*ev
,
7025 struct rpc_pipe_client
*cli
,
7026 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
7027 const char *_share
/* [in] [unique,charset(UTF16)] */,
7028 const char *_file
/* [in] [charset(UTF16)] */,
7029 uint32_t _securityinformation
/* [in] */,
7030 struct sec_desc_buf
*_sd_buf
/* [in] [ref] */)
7032 struct tevent_req
*req
;
7033 struct rpccli_srvsvc_NetSetFileSecurity_state
*state
;
7034 struct tevent_req
*subreq
;
7036 req
= tevent_req_create(mem_ctx
, &state
,
7037 struct rpccli_srvsvc_NetSetFileSecurity_state
);
7041 state
->out_mem_ctx
= NULL
;
7042 state
->dispatch_recv
= cli
->dispatch_recv
;
7045 state
->orig
.in
.server_unc
= _server_unc
;
7046 state
->orig
.in
.share
= _share
;
7047 state
->orig
.in
.file
= _file
;
7048 state
->orig
.in
.securityinformation
= _securityinformation
;
7049 state
->orig
.in
.sd_buf
= _sd_buf
;
7051 /* Out parameters */
7054 ZERO_STRUCT(state
->orig
.out
.result
);
7056 if (DEBUGLEVEL
>= 10) {
7057 NDR_PRINT_IN_DEBUG(srvsvc_NetSetFileSecurity
, &state
->orig
);
7060 /* make a temporary copy, that we pass to the dispatch function */
7061 state
->tmp
= state
->orig
;
7063 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7065 NDR_SRVSVC_NETSETFILESECURITY
,
7067 if (tevent_req_nomem(subreq
, req
)) {
7068 return tevent_req_post(req
, ev
);
7070 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetSetFileSecurity_done
, req
);
7074 static void rpccli_srvsvc_NetSetFileSecurity_done(struct tevent_req
*subreq
)
7076 struct tevent_req
*req
= tevent_req_callback_data(
7077 subreq
, struct tevent_req
);
7078 struct rpccli_srvsvc_NetSetFileSecurity_state
*state
= tevent_req_data(
7079 req
, struct rpccli_srvsvc_NetSetFileSecurity_state
);
7081 TALLOC_CTX
*mem_ctx
;
7083 if (state
->out_mem_ctx
) {
7084 mem_ctx
= state
->out_mem_ctx
;
7089 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7090 TALLOC_FREE(subreq
);
7091 if (!NT_STATUS_IS_OK(status
)) {
7092 tevent_req_nterror(req
, status
);
7096 /* Copy out parameters */
7099 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7101 /* Reset temporary structure */
7102 ZERO_STRUCT(state
->tmp
);
7104 if (DEBUGLEVEL
>= 10) {
7105 NDR_PRINT_OUT_DEBUG(srvsvc_NetSetFileSecurity
, &state
->orig
);
7108 tevent_req_done(req
);
7111 NTSTATUS
rpccli_srvsvc_NetSetFileSecurity_recv(struct tevent_req
*req
,
7112 TALLOC_CTX
*mem_ctx
,
7115 struct rpccli_srvsvc_NetSetFileSecurity_state
*state
= tevent_req_data(
7116 req
, struct rpccli_srvsvc_NetSetFileSecurity_state
);
7119 if (tevent_req_is_nterror(req
, &status
)) {
7120 tevent_req_received(req
);
7124 /* Steal possbile out parameters to the callers context */
7125 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7128 *result
= state
->orig
.out
.result
;
7130 tevent_req_received(req
);
7131 return NT_STATUS_OK
;
7134 NTSTATUS
rpccli_srvsvc_NetSetFileSecurity(struct rpc_pipe_client
*cli
,
7135 TALLOC_CTX
*mem_ctx
,
7136 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
7137 const char *share
/* [in] [unique,charset(UTF16)] */,
7138 const char *file
/* [in] [charset(UTF16)] */,
7139 uint32_t securityinformation
/* [in] */,
7140 struct sec_desc_buf
*sd_buf
/* [in] [ref] */,
7143 struct srvsvc_NetSetFileSecurity r
;
7147 r
.in
.server_unc
= server_unc
;
7150 r
.in
.securityinformation
= securityinformation
;
7151 r
.in
.sd_buf
= sd_buf
;
7153 if (DEBUGLEVEL
>= 10) {
7154 NDR_PRINT_IN_DEBUG(srvsvc_NetSetFileSecurity
, &r
);
7157 status
= cli
->dispatch(cli
,
7160 NDR_SRVSVC_NETSETFILESECURITY
,
7163 if (!NT_STATUS_IS_OK(status
)) {
7167 if (DEBUGLEVEL
>= 10) {
7168 NDR_PRINT_OUT_DEBUG(srvsvc_NetSetFileSecurity
, &r
);
7171 if (NT_STATUS_IS_ERR(status
)) {
7175 /* Return variables */
7179 *werror
= r
.out
.result
;
7182 return werror_to_ntstatus(r
.out
.result
);
7185 struct rpccli_srvsvc_NetServerTransportAddEx_state
{
7186 struct srvsvc_NetServerTransportAddEx orig
;
7187 struct srvsvc_NetServerTransportAddEx tmp
;
7188 TALLOC_CTX
*out_mem_ctx
;
7189 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7192 static void rpccli_srvsvc_NetServerTransportAddEx_done(struct tevent_req
*subreq
);
7194 struct tevent_req
*rpccli_srvsvc_NetServerTransportAddEx_send(TALLOC_CTX
*mem_ctx
,
7195 struct tevent_context
*ev
,
7196 struct rpc_pipe_client
*cli
,
7197 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
7198 uint32_t _level
/* [in] */,
7199 union srvsvc_NetTransportInfo _info
/* [in] [switch_is(level)] */)
7201 struct tevent_req
*req
;
7202 struct rpccli_srvsvc_NetServerTransportAddEx_state
*state
;
7203 struct tevent_req
*subreq
;
7205 req
= tevent_req_create(mem_ctx
, &state
,
7206 struct rpccli_srvsvc_NetServerTransportAddEx_state
);
7210 state
->out_mem_ctx
= NULL
;
7211 state
->dispatch_recv
= cli
->dispatch_recv
;
7214 state
->orig
.in
.server_unc
= _server_unc
;
7215 state
->orig
.in
.level
= _level
;
7216 state
->orig
.in
.info
= _info
;
7218 /* Out parameters */
7221 ZERO_STRUCT(state
->orig
.out
.result
);
7223 if (DEBUGLEVEL
>= 10) {
7224 NDR_PRINT_IN_DEBUG(srvsvc_NetServerTransportAddEx
, &state
->orig
);
7227 /* make a temporary copy, that we pass to the dispatch function */
7228 state
->tmp
= state
->orig
;
7230 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7232 NDR_SRVSVC_NETSERVERTRANSPORTADDEX
,
7234 if (tevent_req_nomem(subreq
, req
)) {
7235 return tevent_req_post(req
, ev
);
7237 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetServerTransportAddEx_done
, req
);
7241 static void rpccli_srvsvc_NetServerTransportAddEx_done(struct tevent_req
*subreq
)
7243 struct tevent_req
*req
= tevent_req_callback_data(
7244 subreq
, struct tevent_req
);
7245 struct rpccli_srvsvc_NetServerTransportAddEx_state
*state
= tevent_req_data(
7246 req
, struct rpccli_srvsvc_NetServerTransportAddEx_state
);
7248 TALLOC_CTX
*mem_ctx
;
7250 if (state
->out_mem_ctx
) {
7251 mem_ctx
= state
->out_mem_ctx
;
7256 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7257 TALLOC_FREE(subreq
);
7258 if (!NT_STATUS_IS_OK(status
)) {
7259 tevent_req_nterror(req
, status
);
7263 /* Copy out parameters */
7266 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7268 /* Reset temporary structure */
7269 ZERO_STRUCT(state
->tmp
);
7271 if (DEBUGLEVEL
>= 10) {
7272 NDR_PRINT_OUT_DEBUG(srvsvc_NetServerTransportAddEx
, &state
->orig
);
7275 tevent_req_done(req
);
7278 NTSTATUS
rpccli_srvsvc_NetServerTransportAddEx_recv(struct tevent_req
*req
,
7279 TALLOC_CTX
*mem_ctx
,
7282 struct rpccli_srvsvc_NetServerTransportAddEx_state
*state
= tevent_req_data(
7283 req
, struct rpccli_srvsvc_NetServerTransportAddEx_state
);
7286 if (tevent_req_is_nterror(req
, &status
)) {
7287 tevent_req_received(req
);
7291 /* Steal possbile out parameters to the callers context */
7292 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7295 *result
= state
->orig
.out
.result
;
7297 tevent_req_received(req
);
7298 return NT_STATUS_OK
;
7301 NTSTATUS
rpccli_srvsvc_NetServerTransportAddEx(struct rpc_pipe_client
*cli
,
7302 TALLOC_CTX
*mem_ctx
,
7303 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
7304 uint32_t level
/* [in] */,
7305 union srvsvc_NetTransportInfo info
/* [in] [switch_is(level)] */,
7308 struct srvsvc_NetServerTransportAddEx r
;
7312 r
.in
.server_unc
= server_unc
;
7316 if (DEBUGLEVEL
>= 10) {
7317 NDR_PRINT_IN_DEBUG(srvsvc_NetServerTransportAddEx
, &r
);
7320 status
= cli
->dispatch(cli
,
7323 NDR_SRVSVC_NETSERVERTRANSPORTADDEX
,
7326 if (!NT_STATUS_IS_OK(status
)) {
7330 if (DEBUGLEVEL
>= 10) {
7331 NDR_PRINT_OUT_DEBUG(srvsvc_NetServerTransportAddEx
, &r
);
7334 if (NT_STATUS_IS_ERR(status
)) {
7338 /* Return variables */
7342 *werror
= r
.out
.result
;
7345 return werror_to_ntstatus(r
.out
.result
);
7348 struct rpccli_srvsvc_NetServerSetServiceBitsEx_state
{
7349 struct srvsvc_NetServerSetServiceBitsEx orig
;
7350 struct srvsvc_NetServerSetServiceBitsEx tmp
;
7351 TALLOC_CTX
*out_mem_ctx
;
7352 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7355 static void rpccli_srvsvc_NetServerSetServiceBitsEx_done(struct tevent_req
*subreq
);
7357 struct tevent_req
*rpccli_srvsvc_NetServerSetServiceBitsEx_send(TALLOC_CTX
*mem_ctx
,
7358 struct tevent_context
*ev
,
7359 struct rpc_pipe_client
*cli
,
7360 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
7361 const char *_emulated_server_unc
/* [in] [unique,charset(UTF16)] */,
7362 const char *_transport
/* [in] [unique,charset(UTF16)] */,
7363 uint32_t _servicebitsofinterest
/* [in] */,
7364 uint32_t _servicebits
/* [in] */,
7365 uint32_t _updateimmediately
/* [in] */)
7367 struct tevent_req
*req
;
7368 struct rpccli_srvsvc_NetServerSetServiceBitsEx_state
*state
;
7369 struct tevent_req
*subreq
;
7371 req
= tevent_req_create(mem_ctx
, &state
,
7372 struct rpccli_srvsvc_NetServerSetServiceBitsEx_state
);
7376 state
->out_mem_ctx
= NULL
;
7377 state
->dispatch_recv
= cli
->dispatch_recv
;
7380 state
->orig
.in
.server_unc
= _server_unc
;
7381 state
->orig
.in
.emulated_server_unc
= _emulated_server_unc
;
7382 state
->orig
.in
.transport
= _transport
;
7383 state
->orig
.in
.servicebitsofinterest
= _servicebitsofinterest
;
7384 state
->orig
.in
.servicebits
= _servicebits
;
7385 state
->orig
.in
.updateimmediately
= _updateimmediately
;
7387 /* Out parameters */
7390 ZERO_STRUCT(state
->orig
.out
.result
);
7392 if (DEBUGLEVEL
>= 10) {
7393 NDR_PRINT_IN_DEBUG(srvsvc_NetServerSetServiceBitsEx
, &state
->orig
);
7396 /* make a temporary copy, that we pass to the dispatch function */
7397 state
->tmp
= state
->orig
;
7399 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7401 NDR_SRVSVC_NETSERVERSETSERVICEBITSEX
,
7403 if (tevent_req_nomem(subreq
, req
)) {
7404 return tevent_req_post(req
, ev
);
7406 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetServerSetServiceBitsEx_done
, req
);
7410 static void rpccli_srvsvc_NetServerSetServiceBitsEx_done(struct tevent_req
*subreq
)
7412 struct tevent_req
*req
= tevent_req_callback_data(
7413 subreq
, struct tevent_req
);
7414 struct rpccli_srvsvc_NetServerSetServiceBitsEx_state
*state
= tevent_req_data(
7415 req
, struct rpccli_srvsvc_NetServerSetServiceBitsEx_state
);
7417 TALLOC_CTX
*mem_ctx
;
7419 if (state
->out_mem_ctx
) {
7420 mem_ctx
= state
->out_mem_ctx
;
7425 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7426 TALLOC_FREE(subreq
);
7427 if (!NT_STATUS_IS_OK(status
)) {
7428 tevent_req_nterror(req
, status
);
7432 /* Copy out parameters */
7435 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7437 /* Reset temporary structure */
7438 ZERO_STRUCT(state
->tmp
);
7440 if (DEBUGLEVEL
>= 10) {
7441 NDR_PRINT_OUT_DEBUG(srvsvc_NetServerSetServiceBitsEx
, &state
->orig
);
7444 tevent_req_done(req
);
7447 NTSTATUS
rpccli_srvsvc_NetServerSetServiceBitsEx_recv(struct tevent_req
*req
,
7448 TALLOC_CTX
*mem_ctx
,
7451 struct rpccli_srvsvc_NetServerSetServiceBitsEx_state
*state
= tevent_req_data(
7452 req
, struct rpccli_srvsvc_NetServerSetServiceBitsEx_state
);
7455 if (tevent_req_is_nterror(req
, &status
)) {
7456 tevent_req_received(req
);
7460 /* Steal possbile out parameters to the callers context */
7461 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7464 *result
= state
->orig
.out
.result
;
7466 tevent_req_received(req
);
7467 return NT_STATUS_OK
;
7470 NTSTATUS
rpccli_srvsvc_NetServerSetServiceBitsEx(struct rpc_pipe_client
*cli
,
7471 TALLOC_CTX
*mem_ctx
,
7472 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
7473 const char *emulated_server_unc
/* [in] [unique,charset(UTF16)] */,
7474 const char *transport
/* [in] [unique,charset(UTF16)] */,
7475 uint32_t servicebitsofinterest
/* [in] */,
7476 uint32_t servicebits
/* [in] */,
7477 uint32_t updateimmediately
/* [in] */,
7480 struct srvsvc_NetServerSetServiceBitsEx r
;
7484 r
.in
.server_unc
= server_unc
;
7485 r
.in
.emulated_server_unc
= emulated_server_unc
;
7486 r
.in
.transport
= transport
;
7487 r
.in
.servicebitsofinterest
= servicebitsofinterest
;
7488 r
.in
.servicebits
= servicebits
;
7489 r
.in
.updateimmediately
= updateimmediately
;
7491 if (DEBUGLEVEL
>= 10) {
7492 NDR_PRINT_IN_DEBUG(srvsvc_NetServerSetServiceBitsEx
, &r
);
7495 status
= cli
->dispatch(cli
,
7498 NDR_SRVSVC_NETSERVERSETSERVICEBITSEX
,
7501 if (!NT_STATUS_IS_OK(status
)) {
7505 if (DEBUGLEVEL
>= 10) {
7506 NDR_PRINT_OUT_DEBUG(srvsvc_NetServerSetServiceBitsEx
, &r
);
7509 if (NT_STATUS_IS_ERR(status
)) {
7513 /* Return variables */
7517 *werror
= r
.out
.result
;
7520 return werror_to_ntstatus(r
.out
.result
);
7523 struct rpccli_srvsvc_NETRDFSGETVERSION_state
{
7524 struct srvsvc_NETRDFSGETVERSION orig
;
7525 struct srvsvc_NETRDFSGETVERSION tmp
;
7526 TALLOC_CTX
*out_mem_ctx
;
7527 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7530 static void rpccli_srvsvc_NETRDFSGETVERSION_done(struct tevent_req
*subreq
);
7532 struct tevent_req
*rpccli_srvsvc_NETRDFSGETVERSION_send(TALLOC_CTX
*mem_ctx
,
7533 struct tevent_context
*ev
,
7534 struct rpc_pipe_client
*cli
)
7536 struct tevent_req
*req
;
7537 struct rpccli_srvsvc_NETRDFSGETVERSION_state
*state
;
7538 struct tevent_req
*subreq
;
7540 req
= tevent_req_create(mem_ctx
, &state
,
7541 struct rpccli_srvsvc_NETRDFSGETVERSION_state
);
7545 state
->out_mem_ctx
= NULL
;
7546 state
->dispatch_recv
= cli
->dispatch_recv
;
7550 /* Out parameters */
7553 ZERO_STRUCT(state
->orig
.out
.result
);
7555 if (DEBUGLEVEL
>= 10) {
7556 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSGETVERSION
, &state
->orig
);
7559 /* make a temporary copy, that we pass to the dispatch function */
7560 state
->tmp
= state
->orig
;
7562 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7564 NDR_SRVSVC_NETRDFSGETVERSION
,
7566 if (tevent_req_nomem(subreq
, req
)) {
7567 return tevent_req_post(req
, ev
);
7569 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSGETVERSION_done
, req
);
7573 static void rpccli_srvsvc_NETRDFSGETVERSION_done(struct tevent_req
*subreq
)
7575 struct tevent_req
*req
= tevent_req_callback_data(
7576 subreq
, struct tevent_req
);
7577 struct rpccli_srvsvc_NETRDFSGETVERSION_state
*state
= tevent_req_data(
7578 req
, struct rpccli_srvsvc_NETRDFSGETVERSION_state
);
7580 TALLOC_CTX
*mem_ctx
;
7582 if (state
->out_mem_ctx
) {
7583 mem_ctx
= state
->out_mem_ctx
;
7588 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7589 TALLOC_FREE(subreq
);
7590 if (!NT_STATUS_IS_OK(status
)) {
7591 tevent_req_nterror(req
, status
);
7595 /* Copy out parameters */
7598 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7600 /* Reset temporary structure */
7601 ZERO_STRUCT(state
->tmp
);
7603 if (DEBUGLEVEL
>= 10) {
7604 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSGETVERSION
, &state
->orig
);
7607 tevent_req_done(req
);
7610 NTSTATUS
rpccli_srvsvc_NETRDFSGETVERSION_recv(struct tevent_req
*req
,
7611 TALLOC_CTX
*mem_ctx
,
7614 struct rpccli_srvsvc_NETRDFSGETVERSION_state
*state
= tevent_req_data(
7615 req
, struct rpccli_srvsvc_NETRDFSGETVERSION_state
);
7618 if (tevent_req_is_nterror(req
, &status
)) {
7619 tevent_req_received(req
);
7623 /* Steal possbile out parameters to the callers context */
7624 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7627 *result
= state
->orig
.out
.result
;
7629 tevent_req_received(req
);
7630 return NT_STATUS_OK
;
7633 NTSTATUS
rpccli_srvsvc_NETRDFSGETVERSION(struct rpc_pipe_client
*cli
,
7634 TALLOC_CTX
*mem_ctx
,
7637 struct srvsvc_NETRDFSGETVERSION r
;
7642 if (DEBUGLEVEL
>= 10) {
7643 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSGETVERSION
, &r
);
7646 status
= cli
->dispatch(cli
,
7649 NDR_SRVSVC_NETRDFSGETVERSION
,
7652 if (!NT_STATUS_IS_OK(status
)) {
7656 if (DEBUGLEVEL
>= 10) {
7657 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSGETVERSION
, &r
);
7660 if (NT_STATUS_IS_ERR(status
)) {
7664 /* Return variables */
7668 *werror
= r
.out
.result
;
7671 return werror_to_ntstatus(r
.out
.result
);
7674 struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state
{
7675 struct srvsvc_NETRDFSCREATELOCALPARTITION orig
;
7676 struct srvsvc_NETRDFSCREATELOCALPARTITION tmp
;
7677 TALLOC_CTX
*out_mem_ctx
;
7678 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7681 static void rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_done(struct tevent_req
*subreq
);
7683 struct tevent_req
*rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_send(TALLOC_CTX
*mem_ctx
,
7684 struct tevent_context
*ev
,
7685 struct rpc_pipe_client
*cli
)
7687 struct tevent_req
*req
;
7688 struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state
*state
;
7689 struct tevent_req
*subreq
;
7691 req
= tevent_req_create(mem_ctx
, &state
,
7692 struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state
);
7696 state
->out_mem_ctx
= NULL
;
7697 state
->dispatch_recv
= cli
->dispatch_recv
;
7701 /* Out parameters */
7704 ZERO_STRUCT(state
->orig
.out
.result
);
7706 if (DEBUGLEVEL
>= 10) {
7707 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION
, &state
->orig
);
7710 /* make a temporary copy, that we pass to the dispatch function */
7711 state
->tmp
= state
->orig
;
7713 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7715 NDR_SRVSVC_NETRDFSCREATELOCALPARTITION
,
7717 if (tevent_req_nomem(subreq
, req
)) {
7718 return tevent_req_post(req
, ev
);
7720 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_done
, req
);
7724 static void rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_done(struct tevent_req
*subreq
)
7726 struct tevent_req
*req
= tevent_req_callback_data(
7727 subreq
, struct tevent_req
);
7728 struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state
*state
= tevent_req_data(
7729 req
, struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state
);
7731 TALLOC_CTX
*mem_ctx
;
7733 if (state
->out_mem_ctx
) {
7734 mem_ctx
= state
->out_mem_ctx
;
7739 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7740 TALLOC_FREE(subreq
);
7741 if (!NT_STATUS_IS_OK(status
)) {
7742 tevent_req_nterror(req
, status
);
7746 /* Copy out parameters */
7749 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7751 /* Reset temporary structure */
7752 ZERO_STRUCT(state
->tmp
);
7754 if (DEBUGLEVEL
>= 10) {
7755 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION
, &state
->orig
);
7758 tevent_req_done(req
);
7761 NTSTATUS
rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_recv(struct tevent_req
*req
,
7762 TALLOC_CTX
*mem_ctx
,
7765 struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state
*state
= tevent_req_data(
7766 req
, struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state
);
7769 if (tevent_req_is_nterror(req
, &status
)) {
7770 tevent_req_received(req
);
7774 /* Steal possbile out parameters to the callers context */
7775 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7778 *result
= state
->orig
.out
.result
;
7780 tevent_req_received(req
);
7781 return NT_STATUS_OK
;
7784 NTSTATUS
rpccli_srvsvc_NETRDFSCREATELOCALPARTITION(struct rpc_pipe_client
*cli
,
7785 TALLOC_CTX
*mem_ctx
,
7788 struct srvsvc_NETRDFSCREATELOCALPARTITION r
;
7793 if (DEBUGLEVEL
>= 10) {
7794 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION
, &r
);
7797 status
= cli
->dispatch(cli
,
7800 NDR_SRVSVC_NETRDFSCREATELOCALPARTITION
,
7803 if (!NT_STATUS_IS_OK(status
)) {
7807 if (DEBUGLEVEL
>= 10) {
7808 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION
, &r
);
7811 if (NT_STATUS_IS_ERR(status
)) {
7815 /* Return variables */
7819 *werror
= r
.out
.result
;
7822 return werror_to_ntstatus(r
.out
.result
);
7825 struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state
{
7826 struct srvsvc_NETRDFSDELETELOCALPARTITION orig
;
7827 struct srvsvc_NETRDFSDELETELOCALPARTITION tmp
;
7828 TALLOC_CTX
*out_mem_ctx
;
7829 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7832 static void rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_done(struct tevent_req
*subreq
);
7834 struct tevent_req
*rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_send(TALLOC_CTX
*mem_ctx
,
7835 struct tevent_context
*ev
,
7836 struct rpc_pipe_client
*cli
)
7838 struct tevent_req
*req
;
7839 struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state
*state
;
7840 struct tevent_req
*subreq
;
7842 req
= tevent_req_create(mem_ctx
, &state
,
7843 struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state
);
7847 state
->out_mem_ctx
= NULL
;
7848 state
->dispatch_recv
= cli
->dispatch_recv
;
7852 /* Out parameters */
7855 ZERO_STRUCT(state
->orig
.out
.result
);
7857 if (DEBUGLEVEL
>= 10) {
7858 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION
, &state
->orig
);
7861 /* make a temporary copy, that we pass to the dispatch function */
7862 state
->tmp
= state
->orig
;
7864 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7866 NDR_SRVSVC_NETRDFSDELETELOCALPARTITION
,
7868 if (tevent_req_nomem(subreq
, req
)) {
7869 return tevent_req_post(req
, ev
);
7871 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_done
, req
);
7875 static void rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_done(struct tevent_req
*subreq
)
7877 struct tevent_req
*req
= tevent_req_callback_data(
7878 subreq
, struct tevent_req
);
7879 struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state
*state
= tevent_req_data(
7880 req
, struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state
);
7882 TALLOC_CTX
*mem_ctx
;
7884 if (state
->out_mem_ctx
) {
7885 mem_ctx
= state
->out_mem_ctx
;
7890 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7891 TALLOC_FREE(subreq
);
7892 if (!NT_STATUS_IS_OK(status
)) {
7893 tevent_req_nterror(req
, status
);
7897 /* Copy out parameters */
7900 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7902 /* Reset temporary structure */
7903 ZERO_STRUCT(state
->tmp
);
7905 if (DEBUGLEVEL
>= 10) {
7906 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION
, &state
->orig
);
7909 tevent_req_done(req
);
7912 NTSTATUS
rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_recv(struct tevent_req
*req
,
7913 TALLOC_CTX
*mem_ctx
,
7916 struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state
*state
= tevent_req_data(
7917 req
, struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state
);
7920 if (tevent_req_is_nterror(req
, &status
)) {
7921 tevent_req_received(req
);
7925 /* Steal possbile out parameters to the callers context */
7926 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7929 *result
= state
->orig
.out
.result
;
7931 tevent_req_received(req
);
7932 return NT_STATUS_OK
;
7935 NTSTATUS
rpccli_srvsvc_NETRDFSDELETELOCALPARTITION(struct rpc_pipe_client
*cli
,
7936 TALLOC_CTX
*mem_ctx
,
7939 struct srvsvc_NETRDFSDELETELOCALPARTITION r
;
7944 if (DEBUGLEVEL
>= 10) {
7945 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION
, &r
);
7948 status
= cli
->dispatch(cli
,
7951 NDR_SRVSVC_NETRDFSDELETELOCALPARTITION
,
7954 if (!NT_STATUS_IS_OK(status
)) {
7958 if (DEBUGLEVEL
>= 10) {
7959 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION
, &r
);
7962 if (NT_STATUS_IS_ERR(status
)) {
7966 /* Return variables */
7970 *werror
= r
.out
.result
;
7973 return werror_to_ntstatus(r
.out
.result
);
7976 struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state
{
7977 struct srvsvc_NETRDFSSETLOCALVOLUMESTATE orig
;
7978 struct srvsvc_NETRDFSSETLOCALVOLUMESTATE tmp
;
7979 TALLOC_CTX
*out_mem_ctx
;
7980 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7983 static void rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_done(struct tevent_req
*subreq
);
7985 struct tevent_req
*rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_send(TALLOC_CTX
*mem_ctx
,
7986 struct tevent_context
*ev
,
7987 struct rpc_pipe_client
*cli
)
7989 struct tevent_req
*req
;
7990 struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state
*state
;
7991 struct tevent_req
*subreq
;
7993 req
= tevent_req_create(mem_ctx
, &state
,
7994 struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state
);
7998 state
->out_mem_ctx
= NULL
;
7999 state
->dispatch_recv
= cli
->dispatch_recv
;
8003 /* Out parameters */
8006 ZERO_STRUCT(state
->orig
.out
.result
);
8008 if (DEBUGLEVEL
>= 10) {
8009 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE
, &state
->orig
);
8012 /* make a temporary copy, that we pass to the dispatch function */
8013 state
->tmp
= state
->orig
;
8015 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8017 NDR_SRVSVC_NETRDFSSETLOCALVOLUMESTATE
,
8019 if (tevent_req_nomem(subreq
, req
)) {
8020 return tevent_req_post(req
, ev
);
8022 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_done
, req
);
8026 static void rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_done(struct tevent_req
*subreq
)
8028 struct tevent_req
*req
= tevent_req_callback_data(
8029 subreq
, struct tevent_req
);
8030 struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state
*state
= tevent_req_data(
8031 req
, struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state
);
8033 TALLOC_CTX
*mem_ctx
;
8035 if (state
->out_mem_ctx
) {
8036 mem_ctx
= state
->out_mem_ctx
;
8041 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8042 TALLOC_FREE(subreq
);
8043 if (!NT_STATUS_IS_OK(status
)) {
8044 tevent_req_nterror(req
, status
);
8048 /* Copy out parameters */
8051 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8053 /* Reset temporary structure */
8054 ZERO_STRUCT(state
->tmp
);
8056 if (DEBUGLEVEL
>= 10) {
8057 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE
, &state
->orig
);
8060 tevent_req_done(req
);
8063 NTSTATUS
rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_recv(struct tevent_req
*req
,
8064 TALLOC_CTX
*mem_ctx
,
8067 struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state
*state
= tevent_req_data(
8068 req
, struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state
);
8071 if (tevent_req_is_nterror(req
, &status
)) {
8072 tevent_req_received(req
);
8076 /* Steal possbile out parameters to the callers context */
8077 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8080 *result
= state
->orig
.out
.result
;
8082 tevent_req_received(req
);
8083 return NT_STATUS_OK
;
8086 NTSTATUS
rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct rpc_pipe_client
*cli
,
8087 TALLOC_CTX
*mem_ctx
,
8090 struct srvsvc_NETRDFSSETLOCALVOLUMESTATE r
;
8095 if (DEBUGLEVEL
>= 10) {
8096 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE
, &r
);
8099 status
= cli
->dispatch(cli
,
8102 NDR_SRVSVC_NETRDFSSETLOCALVOLUMESTATE
,
8105 if (!NT_STATUS_IS_OK(status
)) {
8109 if (DEBUGLEVEL
>= 10) {
8110 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE
, &r
);
8113 if (NT_STATUS_IS_ERR(status
)) {
8117 /* Return variables */
8121 *werror
= r
.out
.result
;
8124 return werror_to_ntstatus(r
.out
.result
);
8127 struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state
{
8128 struct srvsvc_NETRDFSSETSERVERINFO orig
;
8129 struct srvsvc_NETRDFSSETSERVERINFO tmp
;
8130 TALLOC_CTX
*out_mem_ctx
;
8131 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8134 static void rpccli_srvsvc_NETRDFSSETSERVERINFO_done(struct tevent_req
*subreq
);
8136 struct tevent_req
*rpccli_srvsvc_NETRDFSSETSERVERINFO_send(TALLOC_CTX
*mem_ctx
,
8137 struct tevent_context
*ev
,
8138 struct rpc_pipe_client
*cli
)
8140 struct tevent_req
*req
;
8141 struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state
*state
;
8142 struct tevent_req
*subreq
;
8144 req
= tevent_req_create(mem_ctx
, &state
,
8145 struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state
);
8149 state
->out_mem_ctx
= NULL
;
8150 state
->dispatch_recv
= cli
->dispatch_recv
;
8154 /* Out parameters */
8157 ZERO_STRUCT(state
->orig
.out
.result
);
8159 if (DEBUGLEVEL
>= 10) {
8160 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSSETSERVERINFO
, &state
->orig
);
8163 /* make a temporary copy, that we pass to the dispatch function */
8164 state
->tmp
= state
->orig
;
8166 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8168 NDR_SRVSVC_NETRDFSSETSERVERINFO
,
8170 if (tevent_req_nomem(subreq
, req
)) {
8171 return tevent_req_post(req
, ev
);
8173 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSSETSERVERINFO_done
, req
);
8177 static void rpccli_srvsvc_NETRDFSSETSERVERINFO_done(struct tevent_req
*subreq
)
8179 struct tevent_req
*req
= tevent_req_callback_data(
8180 subreq
, struct tevent_req
);
8181 struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state
*state
= tevent_req_data(
8182 req
, struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state
);
8184 TALLOC_CTX
*mem_ctx
;
8186 if (state
->out_mem_ctx
) {
8187 mem_ctx
= state
->out_mem_ctx
;
8192 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8193 TALLOC_FREE(subreq
);
8194 if (!NT_STATUS_IS_OK(status
)) {
8195 tevent_req_nterror(req
, status
);
8199 /* Copy out parameters */
8202 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8204 /* Reset temporary structure */
8205 ZERO_STRUCT(state
->tmp
);
8207 if (DEBUGLEVEL
>= 10) {
8208 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETSERVERINFO
, &state
->orig
);
8211 tevent_req_done(req
);
8214 NTSTATUS
rpccli_srvsvc_NETRDFSSETSERVERINFO_recv(struct tevent_req
*req
,
8215 TALLOC_CTX
*mem_ctx
,
8218 struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state
*state
= tevent_req_data(
8219 req
, struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state
);
8222 if (tevent_req_is_nterror(req
, &status
)) {
8223 tevent_req_received(req
);
8227 /* Steal possbile out parameters to the callers context */
8228 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8231 *result
= state
->orig
.out
.result
;
8233 tevent_req_received(req
);
8234 return NT_STATUS_OK
;
8237 NTSTATUS
rpccli_srvsvc_NETRDFSSETSERVERINFO(struct rpc_pipe_client
*cli
,
8238 TALLOC_CTX
*mem_ctx
,
8241 struct srvsvc_NETRDFSSETSERVERINFO r
;
8246 if (DEBUGLEVEL
>= 10) {
8247 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSSETSERVERINFO
, &r
);
8250 status
= cli
->dispatch(cli
,
8253 NDR_SRVSVC_NETRDFSSETSERVERINFO
,
8256 if (!NT_STATUS_IS_OK(status
)) {
8260 if (DEBUGLEVEL
>= 10) {
8261 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETSERVERINFO
, &r
);
8264 if (NT_STATUS_IS_ERR(status
)) {
8268 /* Return variables */
8272 *werror
= r
.out
.result
;
8275 return werror_to_ntstatus(r
.out
.result
);
8278 struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state
{
8279 struct srvsvc_NETRDFSCREATEEXITPOINT orig
;
8280 struct srvsvc_NETRDFSCREATEEXITPOINT tmp
;
8281 TALLOC_CTX
*out_mem_ctx
;
8282 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8285 static void rpccli_srvsvc_NETRDFSCREATEEXITPOINT_done(struct tevent_req
*subreq
);
8287 struct tevent_req
*rpccli_srvsvc_NETRDFSCREATEEXITPOINT_send(TALLOC_CTX
*mem_ctx
,
8288 struct tevent_context
*ev
,
8289 struct rpc_pipe_client
*cli
)
8291 struct tevent_req
*req
;
8292 struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state
*state
;
8293 struct tevent_req
*subreq
;
8295 req
= tevent_req_create(mem_ctx
, &state
,
8296 struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state
);
8300 state
->out_mem_ctx
= NULL
;
8301 state
->dispatch_recv
= cli
->dispatch_recv
;
8305 /* Out parameters */
8308 ZERO_STRUCT(state
->orig
.out
.result
);
8310 if (DEBUGLEVEL
>= 10) {
8311 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT
, &state
->orig
);
8314 /* make a temporary copy, that we pass to the dispatch function */
8315 state
->tmp
= state
->orig
;
8317 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8319 NDR_SRVSVC_NETRDFSCREATEEXITPOINT
,
8321 if (tevent_req_nomem(subreq
, req
)) {
8322 return tevent_req_post(req
, ev
);
8324 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSCREATEEXITPOINT_done
, req
);
8328 static void rpccli_srvsvc_NETRDFSCREATEEXITPOINT_done(struct tevent_req
*subreq
)
8330 struct tevent_req
*req
= tevent_req_callback_data(
8331 subreq
, struct tevent_req
);
8332 struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state
*state
= tevent_req_data(
8333 req
, struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state
);
8335 TALLOC_CTX
*mem_ctx
;
8337 if (state
->out_mem_ctx
) {
8338 mem_ctx
= state
->out_mem_ctx
;
8343 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8344 TALLOC_FREE(subreq
);
8345 if (!NT_STATUS_IS_OK(status
)) {
8346 tevent_req_nterror(req
, status
);
8350 /* Copy out parameters */
8353 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8355 /* Reset temporary structure */
8356 ZERO_STRUCT(state
->tmp
);
8358 if (DEBUGLEVEL
>= 10) {
8359 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT
, &state
->orig
);
8362 tevent_req_done(req
);
8365 NTSTATUS
rpccli_srvsvc_NETRDFSCREATEEXITPOINT_recv(struct tevent_req
*req
,
8366 TALLOC_CTX
*mem_ctx
,
8369 struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state
*state
= tevent_req_data(
8370 req
, struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state
);
8373 if (tevent_req_is_nterror(req
, &status
)) {
8374 tevent_req_received(req
);
8378 /* Steal possbile out parameters to the callers context */
8379 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8382 *result
= state
->orig
.out
.result
;
8384 tevent_req_received(req
);
8385 return NT_STATUS_OK
;
8388 NTSTATUS
rpccli_srvsvc_NETRDFSCREATEEXITPOINT(struct rpc_pipe_client
*cli
,
8389 TALLOC_CTX
*mem_ctx
,
8392 struct srvsvc_NETRDFSCREATEEXITPOINT r
;
8397 if (DEBUGLEVEL
>= 10) {
8398 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT
, &r
);
8401 status
= cli
->dispatch(cli
,
8404 NDR_SRVSVC_NETRDFSCREATEEXITPOINT
,
8407 if (!NT_STATUS_IS_OK(status
)) {
8411 if (DEBUGLEVEL
>= 10) {
8412 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT
, &r
);
8415 if (NT_STATUS_IS_ERR(status
)) {
8419 /* Return variables */
8423 *werror
= r
.out
.result
;
8426 return werror_to_ntstatus(r
.out
.result
);
8429 struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state
{
8430 struct srvsvc_NETRDFSDELETEEXITPOINT orig
;
8431 struct srvsvc_NETRDFSDELETEEXITPOINT tmp
;
8432 TALLOC_CTX
*out_mem_ctx
;
8433 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8436 static void rpccli_srvsvc_NETRDFSDELETEEXITPOINT_done(struct tevent_req
*subreq
);
8438 struct tevent_req
*rpccli_srvsvc_NETRDFSDELETEEXITPOINT_send(TALLOC_CTX
*mem_ctx
,
8439 struct tevent_context
*ev
,
8440 struct rpc_pipe_client
*cli
)
8442 struct tevent_req
*req
;
8443 struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state
*state
;
8444 struct tevent_req
*subreq
;
8446 req
= tevent_req_create(mem_ctx
, &state
,
8447 struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state
);
8451 state
->out_mem_ctx
= NULL
;
8452 state
->dispatch_recv
= cli
->dispatch_recv
;
8456 /* Out parameters */
8459 ZERO_STRUCT(state
->orig
.out
.result
);
8461 if (DEBUGLEVEL
>= 10) {
8462 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT
, &state
->orig
);
8465 /* make a temporary copy, that we pass to the dispatch function */
8466 state
->tmp
= state
->orig
;
8468 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8470 NDR_SRVSVC_NETRDFSDELETEEXITPOINT
,
8472 if (tevent_req_nomem(subreq
, req
)) {
8473 return tevent_req_post(req
, ev
);
8475 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSDELETEEXITPOINT_done
, req
);
8479 static void rpccli_srvsvc_NETRDFSDELETEEXITPOINT_done(struct tevent_req
*subreq
)
8481 struct tevent_req
*req
= tevent_req_callback_data(
8482 subreq
, struct tevent_req
);
8483 struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state
*state
= tevent_req_data(
8484 req
, struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state
);
8486 TALLOC_CTX
*mem_ctx
;
8488 if (state
->out_mem_ctx
) {
8489 mem_ctx
= state
->out_mem_ctx
;
8494 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8495 TALLOC_FREE(subreq
);
8496 if (!NT_STATUS_IS_OK(status
)) {
8497 tevent_req_nterror(req
, status
);
8501 /* Copy out parameters */
8504 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8506 /* Reset temporary structure */
8507 ZERO_STRUCT(state
->tmp
);
8509 if (DEBUGLEVEL
>= 10) {
8510 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT
, &state
->orig
);
8513 tevent_req_done(req
);
8516 NTSTATUS
rpccli_srvsvc_NETRDFSDELETEEXITPOINT_recv(struct tevent_req
*req
,
8517 TALLOC_CTX
*mem_ctx
,
8520 struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state
*state
= tevent_req_data(
8521 req
, struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state
);
8524 if (tevent_req_is_nterror(req
, &status
)) {
8525 tevent_req_received(req
);
8529 /* Steal possbile out parameters to the callers context */
8530 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8533 *result
= state
->orig
.out
.result
;
8535 tevent_req_received(req
);
8536 return NT_STATUS_OK
;
8539 NTSTATUS
rpccli_srvsvc_NETRDFSDELETEEXITPOINT(struct rpc_pipe_client
*cli
,
8540 TALLOC_CTX
*mem_ctx
,
8543 struct srvsvc_NETRDFSDELETEEXITPOINT r
;
8548 if (DEBUGLEVEL
>= 10) {
8549 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT
, &r
);
8552 status
= cli
->dispatch(cli
,
8555 NDR_SRVSVC_NETRDFSDELETEEXITPOINT
,
8558 if (!NT_STATUS_IS_OK(status
)) {
8562 if (DEBUGLEVEL
>= 10) {
8563 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT
, &r
);
8566 if (NT_STATUS_IS_ERR(status
)) {
8570 /* Return variables */
8574 *werror
= r
.out
.result
;
8577 return werror_to_ntstatus(r
.out
.result
);
8580 struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state
{
8581 struct srvsvc_NETRDFSMODIFYPREFIX orig
;
8582 struct srvsvc_NETRDFSMODIFYPREFIX tmp
;
8583 TALLOC_CTX
*out_mem_ctx
;
8584 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8587 static void rpccli_srvsvc_NETRDFSMODIFYPREFIX_done(struct tevent_req
*subreq
);
8589 struct tevent_req
*rpccli_srvsvc_NETRDFSMODIFYPREFIX_send(TALLOC_CTX
*mem_ctx
,
8590 struct tevent_context
*ev
,
8591 struct rpc_pipe_client
*cli
)
8593 struct tevent_req
*req
;
8594 struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state
*state
;
8595 struct tevent_req
*subreq
;
8597 req
= tevent_req_create(mem_ctx
, &state
,
8598 struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state
);
8602 state
->out_mem_ctx
= NULL
;
8603 state
->dispatch_recv
= cli
->dispatch_recv
;
8607 /* Out parameters */
8610 ZERO_STRUCT(state
->orig
.out
.result
);
8612 if (DEBUGLEVEL
>= 10) {
8613 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSMODIFYPREFIX
, &state
->orig
);
8616 /* make a temporary copy, that we pass to the dispatch function */
8617 state
->tmp
= state
->orig
;
8619 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8621 NDR_SRVSVC_NETRDFSMODIFYPREFIX
,
8623 if (tevent_req_nomem(subreq
, req
)) {
8624 return tevent_req_post(req
, ev
);
8626 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSMODIFYPREFIX_done
, req
);
8630 static void rpccli_srvsvc_NETRDFSMODIFYPREFIX_done(struct tevent_req
*subreq
)
8632 struct tevent_req
*req
= tevent_req_callback_data(
8633 subreq
, struct tevent_req
);
8634 struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state
*state
= tevent_req_data(
8635 req
, struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state
);
8637 TALLOC_CTX
*mem_ctx
;
8639 if (state
->out_mem_ctx
) {
8640 mem_ctx
= state
->out_mem_ctx
;
8645 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8646 TALLOC_FREE(subreq
);
8647 if (!NT_STATUS_IS_OK(status
)) {
8648 tevent_req_nterror(req
, status
);
8652 /* Copy out parameters */
8655 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8657 /* Reset temporary structure */
8658 ZERO_STRUCT(state
->tmp
);
8660 if (DEBUGLEVEL
>= 10) {
8661 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMODIFYPREFIX
, &state
->orig
);
8664 tevent_req_done(req
);
8667 NTSTATUS
rpccli_srvsvc_NETRDFSMODIFYPREFIX_recv(struct tevent_req
*req
,
8668 TALLOC_CTX
*mem_ctx
,
8671 struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state
*state
= tevent_req_data(
8672 req
, struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state
);
8675 if (tevent_req_is_nterror(req
, &status
)) {
8676 tevent_req_received(req
);
8680 /* Steal possbile out parameters to the callers context */
8681 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8684 *result
= state
->orig
.out
.result
;
8686 tevent_req_received(req
);
8687 return NT_STATUS_OK
;
8690 NTSTATUS
rpccli_srvsvc_NETRDFSMODIFYPREFIX(struct rpc_pipe_client
*cli
,
8691 TALLOC_CTX
*mem_ctx
,
8694 struct srvsvc_NETRDFSMODIFYPREFIX r
;
8699 if (DEBUGLEVEL
>= 10) {
8700 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSMODIFYPREFIX
, &r
);
8703 status
= cli
->dispatch(cli
,
8706 NDR_SRVSVC_NETRDFSMODIFYPREFIX
,
8709 if (!NT_STATUS_IS_OK(status
)) {
8713 if (DEBUGLEVEL
>= 10) {
8714 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMODIFYPREFIX
, &r
);
8717 if (NT_STATUS_IS_ERR(status
)) {
8721 /* Return variables */
8725 *werror
= r
.out
.result
;
8728 return werror_to_ntstatus(r
.out
.result
);
8731 struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state
{
8732 struct srvsvc_NETRDFSFIXLOCALVOLUME orig
;
8733 struct srvsvc_NETRDFSFIXLOCALVOLUME tmp
;
8734 TALLOC_CTX
*out_mem_ctx
;
8735 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8738 static void rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_done(struct tevent_req
*subreq
);
8740 struct tevent_req
*rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_send(TALLOC_CTX
*mem_ctx
,
8741 struct tevent_context
*ev
,
8742 struct rpc_pipe_client
*cli
)
8744 struct tevent_req
*req
;
8745 struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state
*state
;
8746 struct tevent_req
*subreq
;
8748 req
= tevent_req_create(mem_ctx
, &state
,
8749 struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state
);
8753 state
->out_mem_ctx
= NULL
;
8754 state
->dispatch_recv
= cli
->dispatch_recv
;
8758 /* Out parameters */
8761 ZERO_STRUCT(state
->orig
.out
.result
);
8763 if (DEBUGLEVEL
>= 10) {
8764 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME
, &state
->orig
);
8767 /* make a temporary copy, that we pass to the dispatch function */
8768 state
->tmp
= state
->orig
;
8770 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8772 NDR_SRVSVC_NETRDFSFIXLOCALVOLUME
,
8774 if (tevent_req_nomem(subreq
, req
)) {
8775 return tevent_req_post(req
, ev
);
8777 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_done
, req
);
8781 static void rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_done(struct tevent_req
*subreq
)
8783 struct tevent_req
*req
= tevent_req_callback_data(
8784 subreq
, struct tevent_req
);
8785 struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state
*state
= tevent_req_data(
8786 req
, struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state
);
8788 TALLOC_CTX
*mem_ctx
;
8790 if (state
->out_mem_ctx
) {
8791 mem_ctx
= state
->out_mem_ctx
;
8796 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8797 TALLOC_FREE(subreq
);
8798 if (!NT_STATUS_IS_OK(status
)) {
8799 tevent_req_nterror(req
, status
);
8803 /* Copy out parameters */
8806 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8808 /* Reset temporary structure */
8809 ZERO_STRUCT(state
->tmp
);
8811 if (DEBUGLEVEL
>= 10) {
8812 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME
, &state
->orig
);
8815 tevent_req_done(req
);
8818 NTSTATUS
rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_recv(struct tevent_req
*req
,
8819 TALLOC_CTX
*mem_ctx
,
8822 struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state
*state
= tevent_req_data(
8823 req
, struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state
);
8826 if (tevent_req_is_nterror(req
, &status
)) {
8827 tevent_req_received(req
);
8831 /* Steal possbile out parameters to the callers context */
8832 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8835 *result
= state
->orig
.out
.result
;
8837 tevent_req_received(req
);
8838 return NT_STATUS_OK
;
8841 NTSTATUS
rpccli_srvsvc_NETRDFSFIXLOCALVOLUME(struct rpc_pipe_client
*cli
,
8842 TALLOC_CTX
*mem_ctx
,
8845 struct srvsvc_NETRDFSFIXLOCALVOLUME r
;
8850 if (DEBUGLEVEL
>= 10) {
8851 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME
, &r
);
8854 status
= cli
->dispatch(cli
,
8857 NDR_SRVSVC_NETRDFSFIXLOCALVOLUME
,
8860 if (!NT_STATUS_IS_OK(status
)) {
8864 if (DEBUGLEVEL
>= 10) {
8865 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME
, &r
);
8868 if (NT_STATUS_IS_ERR(status
)) {
8872 /* Return variables */
8876 *werror
= r
.out
.result
;
8879 return werror_to_ntstatus(r
.out
.result
);
8882 struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state
{
8883 struct srvsvc_NETRDFSMANAGERREPORTSITEINFO orig
;
8884 struct srvsvc_NETRDFSMANAGERREPORTSITEINFO tmp
;
8885 TALLOC_CTX
*out_mem_ctx
;
8886 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8889 static void rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_done(struct tevent_req
*subreq
);
8891 struct tevent_req
*rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_send(TALLOC_CTX
*mem_ctx
,
8892 struct tevent_context
*ev
,
8893 struct rpc_pipe_client
*cli
)
8895 struct tevent_req
*req
;
8896 struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state
*state
;
8897 struct tevent_req
*subreq
;
8899 req
= tevent_req_create(mem_ctx
, &state
,
8900 struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state
);
8904 state
->out_mem_ctx
= NULL
;
8905 state
->dispatch_recv
= cli
->dispatch_recv
;
8909 /* Out parameters */
8912 ZERO_STRUCT(state
->orig
.out
.result
);
8914 if (DEBUGLEVEL
>= 10) {
8915 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO
, &state
->orig
);
8918 /* make a temporary copy, that we pass to the dispatch function */
8919 state
->tmp
= state
->orig
;
8921 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8923 NDR_SRVSVC_NETRDFSMANAGERREPORTSITEINFO
,
8925 if (tevent_req_nomem(subreq
, req
)) {
8926 return tevent_req_post(req
, ev
);
8928 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_done
, req
);
8932 static void rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_done(struct tevent_req
*subreq
)
8934 struct tevent_req
*req
= tevent_req_callback_data(
8935 subreq
, struct tevent_req
);
8936 struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state
*state
= tevent_req_data(
8937 req
, struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state
);
8939 TALLOC_CTX
*mem_ctx
;
8941 if (state
->out_mem_ctx
) {
8942 mem_ctx
= state
->out_mem_ctx
;
8947 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8948 TALLOC_FREE(subreq
);
8949 if (!NT_STATUS_IS_OK(status
)) {
8950 tevent_req_nterror(req
, status
);
8954 /* Copy out parameters */
8957 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8959 /* Reset temporary structure */
8960 ZERO_STRUCT(state
->tmp
);
8962 if (DEBUGLEVEL
>= 10) {
8963 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO
, &state
->orig
);
8966 tevent_req_done(req
);
8969 NTSTATUS
rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_recv(struct tevent_req
*req
,
8970 TALLOC_CTX
*mem_ctx
,
8973 struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state
*state
= tevent_req_data(
8974 req
, struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state
);
8977 if (tevent_req_is_nterror(req
, &status
)) {
8978 tevent_req_received(req
);
8982 /* Steal possbile out parameters to the callers context */
8983 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8986 *result
= state
->orig
.out
.result
;
8988 tevent_req_received(req
);
8989 return NT_STATUS_OK
;
8992 NTSTATUS
rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct rpc_pipe_client
*cli
,
8993 TALLOC_CTX
*mem_ctx
,
8996 struct srvsvc_NETRDFSMANAGERREPORTSITEINFO r
;
9001 if (DEBUGLEVEL
>= 10) {
9002 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO
, &r
);
9005 status
= cli
->dispatch(cli
,
9008 NDR_SRVSVC_NETRDFSMANAGERREPORTSITEINFO
,
9011 if (!NT_STATUS_IS_OK(status
)) {
9015 if (DEBUGLEVEL
>= 10) {
9016 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO
, &r
);
9019 if (NT_STATUS_IS_ERR(status
)) {
9023 /* Return variables */
9027 *werror
= r
.out
.result
;
9030 return werror_to_ntstatus(r
.out
.result
);
9033 struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state
{
9034 struct srvsvc_NETRSERVERTRANSPORTDELEX orig
;
9035 struct srvsvc_NETRSERVERTRANSPORTDELEX tmp
;
9036 TALLOC_CTX
*out_mem_ctx
;
9037 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9040 static void rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_done(struct tevent_req
*subreq
);
9042 struct tevent_req
*rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_send(TALLOC_CTX
*mem_ctx
,
9043 struct tevent_context
*ev
,
9044 struct rpc_pipe_client
*cli
)
9046 struct tevent_req
*req
;
9047 struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state
*state
;
9048 struct tevent_req
*subreq
;
9050 req
= tevent_req_create(mem_ctx
, &state
,
9051 struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state
);
9055 state
->out_mem_ctx
= NULL
;
9056 state
->dispatch_recv
= cli
->dispatch_recv
;
9060 /* Out parameters */
9063 ZERO_STRUCT(state
->orig
.out
.result
);
9065 if (DEBUGLEVEL
>= 10) {
9066 NDR_PRINT_IN_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX
, &state
->orig
);
9069 /* make a temporary copy, that we pass to the dispatch function */
9070 state
->tmp
= state
->orig
;
9072 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9074 NDR_SRVSVC_NETRSERVERTRANSPORTDELEX
,
9076 if (tevent_req_nomem(subreq
, req
)) {
9077 return tevent_req_post(req
, ev
);
9079 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_done
, req
);
9083 static void rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_done(struct tevent_req
*subreq
)
9085 struct tevent_req
*req
= tevent_req_callback_data(
9086 subreq
, struct tevent_req
);
9087 struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state
*state
= tevent_req_data(
9088 req
, struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state
);
9090 TALLOC_CTX
*mem_ctx
;
9092 if (state
->out_mem_ctx
) {
9093 mem_ctx
= state
->out_mem_ctx
;
9098 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9099 TALLOC_FREE(subreq
);
9100 if (!NT_STATUS_IS_OK(status
)) {
9101 tevent_req_nterror(req
, status
);
9105 /* Copy out parameters */
9108 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9110 /* Reset temporary structure */
9111 ZERO_STRUCT(state
->tmp
);
9113 if (DEBUGLEVEL
>= 10) {
9114 NDR_PRINT_OUT_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX
, &state
->orig
);
9117 tevent_req_done(req
);
9120 NTSTATUS
rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_recv(struct tevent_req
*req
,
9121 TALLOC_CTX
*mem_ctx
,
9124 struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state
*state
= tevent_req_data(
9125 req
, struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state
);
9128 if (tevent_req_is_nterror(req
, &status
)) {
9129 tevent_req_received(req
);
9133 /* Steal possbile out parameters to the callers context */
9134 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9137 *result
= state
->orig
.out
.result
;
9139 tevent_req_received(req
);
9140 return NT_STATUS_OK
;
9143 NTSTATUS
rpccli_srvsvc_NETRSERVERTRANSPORTDELEX(struct rpc_pipe_client
*cli
,
9144 TALLOC_CTX
*mem_ctx
,
9147 struct srvsvc_NETRSERVERTRANSPORTDELEX r
;
9152 if (DEBUGLEVEL
>= 10) {
9153 NDR_PRINT_IN_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX
, &r
);
9156 status
= cli
->dispatch(cli
,
9159 NDR_SRVSVC_NETRSERVERTRANSPORTDELEX
,
9162 if (!NT_STATUS_IS_OK(status
)) {
9166 if (DEBUGLEVEL
>= 10) {
9167 NDR_PRINT_OUT_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX
, &r
);
9170 if (NT_STATUS_IS_ERR(status
)) {
9174 /* Return variables */
9178 *werror
= r
.out
.result
;
9181 return werror_to_ntstatus(r
.out
.result
);