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 state
->out_mem_ctx
= talloc_named_const(state
, 0,
54 "rpccli_srvsvc_NetCharDevEnum_out_memory");
55 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
56 return tevent_req_post(req
, ev
);
59 /* make a temporary copy, that we pass to the dispatch function */
60 state
->tmp
= state
->orig
;
62 subreq
= cli
->dispatch_send(state
, ev
, cli
,
64 NDR_SRVSVC_NETCHARDEVENUM
,
66 if (tevent_req_nomem(subreq
, req
)) {
67 return tevent_req_post(req
, ev
);
69 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetCharDevEnum_done
, req
);
73 static void rpccli_srvsvc_NetCharDevEnum_done(struct tevent_req
*subreq
)
75 struct tevent_req
*req
= tevent_req_callback_data(
76 subreq
, struct tevent_req
);
77 struct rpccli_srvsvc_NetCharDevEnum_state
*state
= tevent_req_data(
78 req
, struct rpccli_srvsvc_NetCharDevEnum_state
);
82 if (state
->out_mem_ctx
) {
83 mem_ctx
= state
->out_mem_ctx
;
88 status
= state
->dispatch_recv(subreq
, mem_ctx
);
90 if (!NT_STATUS_IS_OK(status
)) {
91 tevent_req_nterror(req
, status
);
95 /* Copy out parameters */
96 *state
->orig
.out
.info_ctr
= *state
->tmp
.out
.info_ctr
;
97 *state
->orig
.out
.totalentries
= *state
->tmp
.out
.totalentries
;
98 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
99 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
103 state
->orig
.out
.result
= state
->tmp
.out
.result
;
105 /* Reset temporary structure */
106 ZERO_STRUCT(state
->tmp
);
108 tevent_req_done(req
);
111 NTSTATUS
rpccli_srvsvc_NetCharDevEnum_recv(struct tevent_req
*req
,
115 struct rpccli_srvsvc_NetCharDevEnum_state
*state
= tevent_req_data(
116 req
, struct rpccli_srvsvc_NetCharDevEnum_state
);
119 if (tevent_req_is_nterror(req
, &status
)) {
120 tevent_req_received(req
);
124 /* Steal possbile out parameters to the callers context */
125 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
128 *result
= state
->orig
.out
.result
;
130 tevent_req_received(req
);
134 NTSTATUS
rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client
*cli
,
136 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
137 struct srvsvc_NetCharDevInfoCtr
*info_ctr
/* [in,out] [ref] */,
138 uint32_t max_buffer
/* [in] */,
139 uint32_t *totalentries
/* [out] [ref] */,
140 uint32_t *resume_handle
/* [in,out] [unique] */,
143 struct srvsvc_NetCharDevEnum r
;
147 r
.in
.server_unc
= server_unc
;
148 r
.in
.info_ctr
= info_ctr
;
149 r
.in
.max_buffer
= max_buffer
;
150 r
.in
.resume_handle
= resume_handle
;
152 status
= cli
->dispatch(cli
,
155 NDR_SRVSVC_NETCHARDEVENUM
,
158 if (!NT_STATUS_IS_OK(status
)) {
162 if (NT_STATUS_IS_ERR(status
)) {
166 /* Return variables */
167 *info_ctr
= *r
.out
.info_ctr
;
168 *totalentries
= *r
.out
.totalentries
;
169 if (resume_handle
&& r
.out
.resume_handle
) {
170 *resume_handle
= *r
.out
.resume_handle
;
175 *werror
= r
.out
.result
;
178 return werror_to_ntstatus(r
.out
.result
);
181 struct rpccli_srvsvc_NetCharDevGetInfo_state
{
182 struct srvsvc_NetCharDevGetInfo orig
;
183 struct srvsvc_NetCharDevGetInfo tmp
;
184 TALLOC_CTX
*out_mem_ctx
;
185 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
188 static void rpccli_srvsvc_NetCharDevGetInfo_done(struct tevent_req
*subreq
);
190 struct tevent_req
*rpccli_srvsvc_NetCharDevGetInfo_send(TALLOC_CTX
*mem_ctx
,
191 struct tevent_context
*ev
,
192 struct rpc_pipe_client
*cli
,
193 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
194 const char *_device_name
/* [in] [charset(UTF16)] */,
195 uint32_t _level
/* [in] */,
196 union srvsvc_NetCharDevInfo
*_info
/* [out] [ref,switch_is(level)] */)
198 struct tevent_req
*req
;
199 struct rpccli_srvsvc_NetCharDevGetInfo_state
*state
;
200 struct tevent_req
*subreq
;
202 req
= tevent_req_create(mem_ctx
, &state
,
203 struct rpccli_srvsvc_NetCharDevGetInfo_state
);
207 state
->out_mem_ctx
= NULL
;
208 state
->dispatch_recv
= cli
->dispatch_recv
;
211 state
->orig
.in
.server_unc
= _server_unc
;
212 state
->orig
.in
.device_name
= _device_name
;
213 state
->orig
.in
.level
= _level
;
216 state
->orig
.out
.info
= _info
;
219 ZERO_STRUCT(state
->orig
.out
.result
);
221 state
->out_mem_ctx
= talloc_named_const(state
, 0,
222 "rpccli_srvsvc_NetCharDevGetInfo_out_memory");
223 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
224 return tevent_req_post(req
, ev
);
227 /* make a temporary copy, that we pass to the dispatch function */
228 state
->tmp
= state
->orig
;
230 subreq
= cli
->dispatch_send(state
, ev
, cli
,
232 NDR_SRVSVC_NETCHARDEVGETINFO
,
234 if (tevent_req_nomem(subreq
, req
)) {
235 return tevent_req_post(req
, ev
);
237 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetCharDevGetInfo_done
, req
);
241 static void rpccli_srvsvc_NetCharDevGetInfo_done(struct tevent_req
*subreq
)
243 struct tevent_req
*req
= tevent_req_callback_data(
244 subreq
, struct tevent_req
);
245 struct rpccli_srvsvc_NetCharDevGetInfo_state
*state
= tevent_req_data(
246 req
, struct rpccli_srvsvc_NetCharDevGetInfo_state
);
250 if (state
->out_mem_ctx
) {
251 mem_ctx
= state
->out_mem_ctx
;
256 status
= state
->dispatch_recv(subreq
, mem_ctx
);
258 if (!NT_STATUS_IS_OK(status
)) {
259 tevent_req_nterror(req
, status
);
263 /* Copy out parameters */
264 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
267 state
->orig
.out
.result
= state
->tmp
.out
.result
;
269 /* Reset temporary structure */
270 ZERO_STRUCT(state
->tmp
);
272 tevent_req_done(req
);
275 NTSTATUS
rpccli_srvsvc_NetCharDevGetInfo_recv(struct tevent_req
*req
,
279 struct rpccli_srvsvc_NetCharDevGetInfo_state
*state
= tevent_req_data(
280 req
, struct rpccli_srvsvc_NetCharDevGetInfo_state
);
283 if (tevent_req_is_nterror(req
, &status
)) {
284 tevent_req_received(req
);
288 /* Steal possbile out parameters to the callers context */
289 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
292 *result
= state
->orig
.out
.result
;
294 tevent_req_received(req
);
298 NTSTATUS
rpccli_srvsvc_NetCharDevGetInfo(struct rpc_pipe_client
*cli
,
300 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
301 const char *device_name
/* [in] [charset(UTF16)] */,
302 uint32_t level
/* [in] */,
303 union srvsvc_NetCharDevInfo
*info
/* [out] [ref,switch_is(level)] */,
306 struct srvsvc_NetCharDevGetInfo r
;
310 r
.in
.server_unc
= server_unc
;
311 r
.in
.device_name
= device_name
;
314 status
= cli
->dispatch(cli
,
317 NDR_SRVSVC_NETCHARDEVGETINFO
,
320 if (!NT_STATUS_IS_OK(status
)) {
324 if (NT_STATUS_IS_ERR(status
)) {
328 /* Return variables */
333 *werror
= r
.out
.result
;
336 return werror_to_ntstatus(r
.out
.result
);
339 struct rpccli_srvsvc_NetCharDevControl_state
{
340 struct srvsvc_NetCharDevControl orig
;
341 struct srvsvc_NetCharDevControl tmp
;
342 TALLOC_CTX
*out_mem_ctx
;
343 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
346 static void rpccli_srvsvc_NetCharDevControl_done(struct tevent_req
*subreq
);
348 struct tevent_req
*rpccli_srvsvc_NetCharDevControl_send(TALLOC_CTX
*mem_ctx
,
349 struct tevent_context
*ev
,
350 struct rpc_pipe_client
*cli
,
351 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
352 const char *_device_name
/* [in] [charset(UTF16)] */,
353 uint32_t _opcode
/* [in] */)
355 struct tevent_req
*req
;
356 struct rpccli_srvsvc_NetCharDevControl_state
*state
;
357 struct tevent_req
*subreq
;
359 req
= tevent_req_create(mem_ctx
, &state
,
360 struct rpccli_srvsvc_NetCharDevControl_state
);
364 state
->out_mem_ctx
= NULL
;
365 state
->dispatch_recv
= cli
->dispatch_recv
;
368 state
->orig
.in
.server_unc
= _server_unc
;
369 state
->orig
.in
.device_name
= _device_name
;
370 state
->orig
.in
.opcode
= _opcode
;
375 ZERO_STRUCT(state
->orig
.out
.result
);
377 /* make a temporary copy, that we pass to the dispatch function */
378 state
->tmp
= state
->orig
;
380 subreq
= cli
->dispatch_send(state
, ev
, cli
,
382 NDR_SRVSVC_NETCHARDEVCONTROL
,
384 if (tevent_req_nomem(subreq
, req
)) {
385 return tevent_req_post(req
, ev
);
387 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetCharDevControl_done
, req
);
391 static void rpccli_srvsvc_NetCharDevControl_done(struct tevent_req
*subreq
)
393 struct tevent_req
*req
= tevent_req_callback_data(
394 subreq
, struct tevent_req
);
395 struct rpccli_srvsvc_NetCharDevControl_state
*state
= tevent_req_data(
396 req
, struct rpccli_srvsvc_NetCharDevControl_state
);
400 if (state
->out_mem_ctx
) {
401 mem_ctx
= state
->out_mem_ctx
;
406 status
= state
->dispatch_recv(subreq
, mem_ctx
);
408 if (!NT_STATUS_IS_OK(status
)) {
409 tevent_req_nterror(req
, status
);
413 /* Copy out parameters */
416 state
->orig
.out
.result
= state
->tmp
.out
.result
;
418 /* Reset temporary structure */
419 ZERO_STRUCT(state
->tmp
);
421 tevent_req_done(req
);
424 NTSTATUS
rpccli_srvsvc_NetCharDevControl_recv(struct tevent_req
*req
,
428 struct rpccli_srvsvc_NetCharDevControl_state
*state
= tevent_req_data(
429 req
, struct rpccli_srvsvc_NetCharDevControl_state
);
432 if (tevent_req_is_nterror(req
, &status
)) {
433 tevent_req_received(req
);
437 /* Steal possbile out parameters to the callers context */
438 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
441 *result
= state
->orig
.out
.result
;
443 tevent_req_received(req
);
447 NTSTATUS
rpccli_srvsvc_NetCharDevControl(struct rpc_pipe_client
*cli
,
449 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
450 const char *device_name
/* [in] [charset(UTF16)] */,
451 uint32_t opcode
/* [in] */,
454 struct srvsvc_NetCharDevControl r
;
458 r
.in
.server_unc
= server_unc
;
459 r
.in
.device_name
= device_name
;
460 r
.in
.opcode
= opcode
;
462 status
= cli
->dispatch(cli
,
465 NDR_SRVSVC_NETCHARDEVCONTROL
,
468 if (!NT_STATUS_IS_OK(status
)) {
472 if (NT_STATUS_IS_ERR(status
)) {
476 /* Return variables */
480 *werror
= r
.out
.result
;
483 return werror_to_ntstatus(r
.out
.result
);
486 struct rpccli_srvsvc_NetCharDevQEnum_state
{
487 struct srvsvc_NetCharDevQEnum orig
;
488 struct srvsvc_NetCharDevQEnum tmp
;
489 TALLOC_CTX
*out_mem_ctx
;
490 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
493 static void rpccli_srvsvc_NetCharDevQEnum_done(struct tevent_req
*subreq
);
495 struct tevent_req
*rpccli_srvsvc_NetCharDevQEnum_send(TALLOC_CTX
*mem_ctx
,
496 struct tevent_context
*ev
,
497 struct rpc_pipe_client
*cli
,
498 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
499 const char *_user
/* [in] [unique,charset(UTF16)] */,
500 struct srvsvc_NetCharDevQInfoCtr
*_info_ctr
/* [in,out] [ref] */,
501 uint32_t _max_buffer
/* [in] */,
502 uint32_t *_totalentries
/* [out] [ref] */,
503 uint32_t *_resume_handle
/* [in,out] [unique] */)
505 struct tevent_req
*req
;
506 struct rpccli_srvsvc_NetCharDevQEnum_state
*state
;
507 struct tevent_req
*subreq
;
509 req
= tevent_req_create(mem_ctx
, &state
,
510 struct rpccli_srvsvc_NetCharDevQEnum_state
);
514 state
->out_mem_ctx
= NULL
;
515 state
->dispatch_recv
= cli
->dispatch_recv
;
518 state
->orig
.in
.server_unc
= _server_unc
;
519 state
->orig
.in
.user
= _user
;
520 state
->orig
.in
.info_ctr
= _info_ctr
;
521 state
->orig
.in
.max_buffer
= _max_buffer
;
522 state
->orig
.in
.resume_handle
= _resume_handle
;
525 state
->orig
.out
.info_ctr
= _info_ctr
;
526 state
->orig
.out
.totalentries
= _totalentries
;
527 state
->orig
.out
.resume_handle
= _resume_handle
;
530 ZERO_STRUCT(state
->orig
.out
.result
);
532 state
->out_mem_ctx
= talloc_named_const(state
, 0,
533 "rpccli_srvsvc_NetCharDevQEnum_out_memory");
534 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
535 return tevent_req_post(req
, ev
);
538 /* make a temporary copy, that we pass to the dispatch function */
539 state
->tmp
= state
->orig
;
541 subreq
= cli
->dispatch_send(state
, ev
, cli
,
543 NDR_SRVSVC_NETCHARDEVQENUM
,
545 if (tevent_req_nomem(subreq
, req
)) {
546 return tevent_req_post(req
, ev
);
548 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetCharDevQEnum_done
, req
);
552 static void rpccli_srvsvc_NetCharDevQEnum_done(struct tevent_req
*subreq
)
554 struct tevent_req
*req
= tevent_req_callback_data(
555 subreq
, struct tevent_req
);
556 struct rpccli_srvsvc_NetCharDevQEnum_state
*state
= tevent_req_data(
557 req
, struct rpccli_srvsvc_NetCharDevQEnum_state
);
561 if (state
->out_mem_ctx
) {
562 mem_ctx
= state
->out_mem_ctx
;
567 status
= state
->dispatch_recv(subreq
, mem_ctx
);
569 if (!NT_STATUS_IS_OK(status
)) {
570 tevent_req_nterror(req
, status
);
574 /* Copy out parameters */
575 *state
->orig
.out
.info_ctr
= *state
->tmp
.out
.info_ctr
;
576 *state
->orig
.out
.totalentries
= *state
->tmp
.out
.totalentries
;
577 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
578 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
582 state
->orig
.out
.result
= state
->tmp
.out
.result
;
584 /* Reset temporary structure */
585 ZERO_STRUCT(state
->tmp
);
587 tevent_req_done(req
);
590 NTSTATUS
rpccli_srvsvc_NetCharDevQEnum_recv(struct tevent_req
*req
,
594 struct rpccli_srvsvc_NetCharDevQEnum_state
*state
= tevent_req_data(
595 req
, struct rpccli_srvsvc_NetCharDevQEnum_state
);
598 if (tevent_req_is_nterror(req
, &status
)) {
599 tevent_req_received(req
);
603 /* Steal possbile out parameters to the callers context */
604 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
607 *result
= state
->orig
.out
.result
;
609 tevent_req_received(req
);
613 NTSTATUS
rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client
*cli
,
615 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
616 const char *user
/* [in] [unique,charset(UTF16)] */,
617 struct srvsvc_NetCharDevQInfoCtr
*info_ctr
/* [in,out] [ref] */,
618 uint32_t max_buffer
/* [in] */,
619 uint32_t *totalentries
/* [out] [ref] */,
620 uint32_t *resume_handle
/* [in,out] [unique] */,
623 struct srvsvc_NetCharDevQEnum r
;
627 r
.in
.server_unc
= server_unc
;
629 r
.in
.info_ctr
= info_ctr
;
630 r
.in
.max_buffer
= max_buffer
;
631 r
.in
.resume_handle
= resume_handle
;
633 status
= cli
->dispatch(cli
,
636 NDR_SRVSVC_NETCHARDEVQENUM
,
639 if (!NT_STATUS_IS_OK(status
)) {
643 if (NT_STATUS_IS_ERR(status
)) {
647 /* Return variables */
648 *info_ctr
= *r
.out
.info_ctr
;
649 *totalentries
= *r
.out
.totalentries
;
650 if (resume_handle
&& r
.out
.resume_handle
) {
651 *resume_handle
= *r
.out
.resume_handle
;
656 *werror
= r
.out
.result
;
659 return werror_to_ntstatus(r
.out
.result
);
662 struct rpccli_srvsvc_NetCharDevQGetInfo_state
{
663 struct srvsvc_NetCharDevQGetInfo orig
;
664 struct srvsvc_NetCharDevQGetInfo tmp
;
665 TALLOC_CTX
*out_mem_ctx
;
666 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
669 static void rpccli_srvsvc_NetCharDevQGetInfo_done(struct tevent_req
*subreq
);
671 struct tevent_req
*rpccli_srvsvc_NetCharDevQGetInfo_send(TALLOC_CTX
*mem_ctx
,
672 struct tevent_context
*ev
,
673 struct rpc_pipe_client
*cli
,
674 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
675 const char *_queue_name
/* [in] [charset(UTF16)] */,
676 const char *_user
/* [in] [charset(UTF16)] */,
677 uint32_t _level
/* [in] */,
678 union srvsvc_NetCharDevQInfo
*_info
/* [out] [ref,switch_is(level)] */)
680 struct tevent_req
*req
;
681 struct rpccli_srvsvc_NetCharDevQGetInfo_state
*state
;
682 struct tevent_req
*subreq
;
684 req
= tevent_req_create(mem_ctx
, &state
,
685 struct rpccli_srvsvc_NetCharDevQGetInfo_state
);
689 state
->out_mem_ctx
= NULL
;
690 state
->dispatch_recv
= cli
->dispatch_recv
;
693 state
->orig
.in
.server_unc
= _server_unc
;
694 state
->orig
.in
.queue_name
= _queue_name
;
695 state
->orig
.in
.user
= _user
;
696 state
->orig
.in
.level
= _level
;
699 state
->orig
.out
.info
= _info
;
702 ZERO_STRUCT(state
->orig
.out
.result
);
704 state
->out_mem_ctx
= talloc_named_const(state
, 0,
705 "rpccli_srvsvc_NetCharDevQGetInfo_out_memory");
706 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
707 return tevent_req_post(req
, ev
);
710 /* make a temporary copy, that we pass to the dispatch function */
711 state
->tmp
= state
->orig
;
713 subreq
= cli
->dispatch_send(state
, ev
, cli
,
715 NDR_SRVSVC_NETCHARDEVQGETINFO
,
717 if (tevent_req_nomem(subreq
, req
)) {
718 return tevent_req_post(req
, ev
);
720 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetCharDevQGetInfo_done
, req
);
724 static void rpccli_srvsvc_NetCharDevQGetInfo_done(struct tevent_req
*subreq
)
726 struct tevent_req
*req
= tevent_req_callback_data(
727 subreq
, struct tevent_req
);
728 struct rpccli_srvsvc_NetCharDevQGetInfo_state
*state
= tevent_req_data(
729 req
, struct rpccli_srvsvc_NetCharDevQGetInfo_state
);
733 if (state
->out_mem_ctx
) {
734 mem_ctx
= state
->out_mem_ctx
;
739 status
= state
->dispatch_recv(subreq
, mem_ctx
);
741 if (!NT_STATUS_IS_OK(status
)) {
742 tevent_req_nterror(req
, status
);
746 /* Copy out parameters */
747 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
750 state
->orig
.out
.result
= state
->tmp
.out
.result
;
752 /* Reset temporary structure */
753 ZERO_STRUCT(state
->tmp
);
755 tevent_req_done(req
);
758 NTSTATUS
rpccli_srvsvc_NetCharDevQGetInfo_recv(struct tevent_req
*req
,
762 struct rpccli_srvsvc_NetCharDevQGetInfo_state
*state
= tevent_req_data(
763 req
, struct rpccli_srvsvc_NetCharDevQGetInfo_state
);
766 if (tevent_req_is_nterror(req
, &status
)) {
767 tevent_req_received(req
);
771 /* Steal possbile out parameters to the callers context */
772 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
775 *result
= state
->orig
.out
.result
;
777 tevent_req_received(req
);
781 NTSTATUS
rpccli_srvsvc_NetCharDevQGetInfo(struct rpc_pipe_client
*cli
,
783 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
784 const char *queue_name
/* [in] [charset(UTF16)] */,
785 const char *user
/* [in] [charset(UTF16)] */,
786 uint32_t level
/* [in] */,
787 union srvsvc_NetCharDevQInfo
*info
/* [out] [ref,switch_is(level)] */,
790 struct srvsvc_NetCharDevQGetInfo r
;
794 r
.in
.server_unc
= server_unc
;
795 r
.in
.queue_name
= queue_name
;
799 status
= cli
->dispatch(cli
,
802 NDR_SRVSVC_NETCHARDEVQGETINFO
,
805 if (!NT_STATUS_IS_OK(status
)) {
809 if (NT_STATUS_IS_ERR(status
)) {
813 /* Return variables */
818 *werror
= r
.out
.result
;
821 return werror_to_ntstatus(r
.out
.result
);
824 struct rpccli_srvsvc_NetCharDevQSetInfo_state
{
825 struct srvsvc_NetCharDevQSetInfo orig
;
826 struct srvsvc_NetCharDevQSetInfo tmp
;
827 TALLOC_CTX
*out_mem_ctx
;
828 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
831 static void rpccli_srvsvc_NetCharDevQSetInfo_done(struct tevent_req
*subreq
);
833 struct tevent_req
*rpccli_srvsvc_NetCharDevQSetInfo_send(TALLOC_CTX
*mem_ctx
,
834 struct tevent_context
*ev
,
835 struct rpc_pipe_client
*cli
,
836 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
837 const char *_queue_name
/* [in] [charset(UTF16)] */,
838 uint32_t _level
/* [in] */,
839 union srvsvc_NetCharDevQInfo _info
/* [in] [switch_is(level)] */,
840 uint32_t *_parm_error
/* [in,out] [unique] */)
842 struct tevent_req
*req
;
843 struct rpccli_srvsvc_NetCharDevQSetInfo_state
*state
;
844 struct tevent_req
*subreq
;
846 req
= tevent_req_create(mem_ctx
, &state
,
847 struct rpccli_srvsvc_NetCharDevQSetInfo_state
);
851 state
->out_mem_ctx
= NULL
;
852 state
->dispatch_recv
= cli
->dispatch_recv
;
855 state
->orig
.in
.server_unc
= _server_unc
;
856 state
->orig
.in
.queue_name
= _queue_name
;
857 state
->orig
.in
.level
= _level
;
858 state
->orig
.in
.info
= _info
;
859 state
->orig
.in
.parm_error
= _parm_error
;
862 state
->orig
.out
.parm_error
= _parm_error
;
865 ZERO_STRUCT(state
->orig
.out
.result
);
867 state
->out_mem_ctx
= talloc_named_const(state
, 0,
868 "rpccli_srvsvc_NetCharDevQSetInfo_out_memory");
869 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
870 return tevent_req_post(req
, ev
);
873 /* make a temporary copy, that we pass to the dispatch function */
874 state
->tmp
= state
->orig
;
876 subreq
= cli
->dispatch_send(state
, ev
, cli
,
878 NDR_SRVSVC_NETCHARDEVQSETINFO
,
880 if (tevent_req_nomem(subreq
, req
)) {
881 return tevent_req_post(req
, ev
);
883 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetCharDevQSetInfo_done
, req
);
887 static void rpccli_srvsvc_NetCharDevQSetInfo_done(struct tevent_req
*subreq
)
889 struct tevent_req
*req
= tevent_req_callback_data(
890 subreq
, struct tevent_req
);
891 struct rpccli_srvsvc_NetCharDevQSetInfo_state
*state
= tevent_req_data(
892 req
, struct rpccli_srvsvc_NetCharDevQSetInfo_state
);
896 if (state
->out_mem_ctx
) {
897 mem_ctx
= state
->out_mem_ctx
;
902 status
= state
->dispatch_recv(subreq
, mem_ctx
);
904 if (!NT_STATUS_IS_OK(status
)) {
905 tevent_req_nterror(req
, status
);
909 /* Copy out parameters */
910 if (state
->orig
.out
.parm_error
&& state
->tmp
.out
.parm_error
) {
911 *state
->orig
.out
.parm_error
= *state
->tmp
.out
.parm_error
;
915 state
->orig
.out
.result
= state
->tmp
.out
.result
;
917 /* Reset temporary structure */
918 ZERO_STRUCT(state
->tmp
);
920 tevent_req_done(req
);
923 NTSTATUS
rpccli_srvsvc_NetCharDevQSetInfo_recv(struct tevent_req
*req
,
927 struct rpccli_srvsvc_NetCharDevQSetInfo_state
*state
= tevent_req_data(
928 req
, struct rpccli_srvsvc_NetCharDevQSetInfo_state
);
931 if (tevent_req_is_nterror(req
, &status
)) {
932 tevent_req_received(req
);
936 /* Steal possbile out parameters to the callers context */
937 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
940 *result
= state
->orig
.out
.result
;
942 tevent_req_received(req
);
946 NTSTATUS
rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client
*cli
,
948 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
949 const char *queue_name
/* [in] [charset(UTF16)] */,
950 uint32_t level
/* [in] */,
951 union srvsvc_NetCharDevQInfo info
/* [in] [switch_is(level)] */,
952 uint32_t *parm_error
/* [in,out] [unique] */,
955 struct srvsvc_NetCharDevQSetInfo r
;
959 r
.in
.server_unc
= server_unc
;
960 r
.in
.queue_name
= queue_name
;
963 r
.in
.parm_error
= parm_error
;
965 status
= cli
->dispatch(cli
,
968 NDR_SRVSVC_NETCHARDEVQSETINFO
,
971 if (!NT_STATUS_IS_OK(status
)) {
975 if (NT_STATUS_IS_ERR(status
)) {
979 /* Return variables */
980 if (parm_error
&& r
.out
.parm_error
) {
981 *parm_error
= *r
.out
.parm_error
;
986 *werror
= r
.out
.result
;
989 return werror_to_ntstatus(r
.out
.result
);
992 struct rpccli_srvsvc_NetCharDevQPurge_state
{
993 struct srvsvc_NetCharDevQPurge orig
;
994 struct srvsvc_NetCharDevQPurge tmp
;
995 TALLOC_CTX
*out_mem_ctx
;
996 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
999 static void rpccli_srvsvc_NetCharDevQPurge_done(struct tevent_req
*subreq
);
1001 struct tevent_req
*rpccli_srvsvc_NetCharDevQPurge_send(TALLOC_CTX
*mem_ctx
,
1002 struct tevent_context
*ev
,
1003 struct rpc_pipe_client
*cli
,
1004 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
1005 const char *_queue_name
/* [in] [charset(UTF16)] */)
1007 struct tevent_req
*req
;
1008 struct rpccli_srvsvc_NetCharDevQPurge_state
*state
;
1009 struct tevent_req
*subreq
;
1011 req
= tevent_req_create(mem_ctx
, &state
,
1012 struct rpccli_srvsvc_NetCharDevQPurge_state
);
1016 state
->out_mem_ctx
= NULL
;
1017 state
->dispatch_recv
= cli
->dispatch_recv
;
1020 state
->orig
.in
.server_unc
= _server_unc
;
1021 state
->orig
.in
.queue_name
= _queue_name
;
1023 /* Out parameters */
1026 ZERO_STRUCT(state
->orig
.out
.result
);
1028 /* make a temporary copy, that we pass to the dispatch function */
1029 state
->tmp
= state
->orig
;
1031 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1033 NDR_SRVSVC_NETCHARDEVQPURGE
,
1035 if (tevent_req_nomem(subreq
, req
)) {
1036 return tevent_req_post(req
, ev
);
1038 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetCharDevQPurge_done
, req
);
1042 static void rpccli_srvsvc_NetCharDevQPurge_done(struct tevent_req
*subreq
)
1044 struct tevent_req
*req
= tevent_req_callback_data(
1045 subreq
, struct tevent_req
);
1046 struct rpccli_srvsvc_NetCharDevQPurge_state
*state
= tevent_req_data(
1047 req
, struct rpccli_srvsvc_NetCharDevQPurge_state
);
1049 TALLOC_CTX
*mem_ctx
;
1051 if (state
->out_mem_ctx
) {
1052 mem_ctx
= state
->out_mem_ctx
;
1057 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1058 TALLOC_FREE(subreq
);
1059 if (!NT_STATUS_IS_OK(status
)) {
1060 tevent_req_nterror(req
, status
);
1064 /* Copy out parameters */
1067 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1069 /* Reset temporary structure */
1070 ZERO_STRUCT(state
->tmp
);
1072 tevent_req_done(req
);
1075 NTSTATUS
rpccli_srvsvc_NetCharDevQPurge_recv(struct tevent_req
*req
,
1076 TALLOC_CTX
*mem_ctx
,
1079 struct rpccli_srvsvc_NetCharDevQPurge_state
*state
= tevent_req_data(
1080 req
, struct rpccli_srvsvc_NetCharDevQPurge_state
);
1083 if (tevent_req_is_nterror(req
, &status
)) {
1084 tevent_req_received(req
);
1088 /* Steal possbile out parameters to the callers context */
1089 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1092 *result
= state
->orig
.out
.result
;
1094 tevent_req_received(req
);
1095 return NT_STATUS_OK
;
1098 NTSTATUS
rpccli_srvsvc_NetCharDevQPurge(struct rpc_pipe_client
*cli
,
1099 TALLOC_CTX
*mem_ctx
,
1100 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
1101 const char *queue_name
/* [in] [charset(UTF16)] */,
1104 struct srvsvc_NetCharDevQPurge r
;
1108 r
.in
.server_unc
= server_unc
;
1109 r
.in
.queue_name
= queue_name
;
1111 status
= cli
->dispatch(cli
,
1114 NDR_SRVSVC_NETCHARDEVQPURGE
,
1117 if (!NT_STATUS_IS_OK(status
)) {
1121 if (NT_STATUS_IS_ERR(status
)) {
1125 /* Return variables */
1129 *werror
= r
.out
.result
;
1132 return werror_to_ntstatus(r
.out
.result
);
1135 struct rpccli_srvsvc_NetCharDevQPurgeSelf_state
{
1136 struct srvsvc_NetCharDevQPurgeSelf orig
;
1137 struct srvsvc_NetCharDevQPurgeSelf tmp
;
1138 TALLOC_CTX
*out_mem_ctx
;
1139 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1142 static void rpccli_srvsvc_NetCharDevQPurgeSelf_done(struct tevent_req
*subreq
);
1144 struct tevent_req
*rpccli_srvsvc_NetCharDevQPurgeSelf_send(TALLOC_CTX
*mem_ctx
,
1145 struct tevent_context
*ev
,
1146 struct rpc_pipe_client
*cli
,
1147 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
1148 const char *_queue_name
/* [in] [charset(UTF16)] */,
1149 const char *_computer_name
/* [in] [charset(UTF16)] */)
1151 struct tevent_req
*req
;
1152 struct rpccli_srvsvc_NetCharDevQPurgeSelf_state
*state
;
1153 struct tevent_req
*subreq
;
1155 req
= tevent_req_create(mem_ctx
, &state
,
1156 struct rpccli_srvsvc_NetCharDevQPurgeSelf_state
);
1160 state
->out_mem_ctx
= NULL
;
1161 state
->dispatch_recv
= cli
->dispatch_recv
;
1164 state
->orig
.in
.server_unc
= _server_unc
;
1165 state
->orig
.in
.queue_name
= _queue_name
;
1166 state
->orig
.in
.computer_name
= _computer_name
;
1168 /* Out parameters */
1171 ZERO_STRUCT(state
->orig
.out
.result
);
1173 /* make a temporary copy, that we pass to the dispatch function */
1174 state
->tmp
= state
->orig
;
1176 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1178 NDR_SRVSVC_NETCHARDEVQPURGESELF
,
1180 if (tevent_req_nomem(subreq
, req
)) {
1181 return tevent_req_post(req
, ev
);
1183 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetCharDevQPurgeSelf_done
, req
);
1187 static void rpccli_srvsvc_NetCharDevQPurgeSelf_done(struct tevent_req
*subreq
)
1189 struct tevent_req
*req
= tevent_req_callback_data(
1190 subreq
, struct tevent_req
);
1191 struct rpccli_srvsvc_NetCharDevQPurgeSelf_state
*state
= tevent_req_data(
1192 req
, struct rpccli_srvsvc_NetCharDevQPurgeSelf_state
);
1194 TALLOC_CTX
*mem_ctx
;
1196 if (state
->out_mem_ctx
) {
1197 mem_ctx
= state
->out_mem_ctx
;
1202 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1203 TALLOC_FREE(subreq
);
1204 if (!NT_STATUS_IS_OK(status
)) {
1205 tevent_req_nterror(req
, status
);
1209 /* Copy out parameters */
1212 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1214 /* Reset temporary structure */
1215 ZERO_STRUCT(state
->tmp
);
1217 tevent_req_done(req
);
1220 NTSTATUS
rpccli_srvsvc_NetCharDevQPurgeSelf_recv(struct tevent_req
*req
,
1221 TALLOC_CTX
*mem_ctx
,
1224 struct rpccli_srvsvc_NetCharDevQPurgeSelf_state
*state
= tevent_req_data(
1225 req
, struct rpccli_srvsvc_NetCharDevQPurgeSelf_state
);
1228 if (tevent_req_is_nterror(req
, &status
)) {
1229 tevent_req_received(req
);
1233 /* Steal possbile out parameters to the callers context */
1234 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1237 *result
= state
->orig
.out
.result
;
1239 tevent_req_received(req
);
1240 return NT_STATUS_OK
;
1243 NTSTATUS
rpccli_srvsvc_NetCharDevQPurgeSelf(struct rpc_pipe_client
*cli
,
1244 TALLOC_CTX
*mem_ctx
,
1245 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
1246 const char *queue_name
/* [in] [charset(UTF16)] */,
1247 const char *computer_name
/* [in] [charset(UTF16)] */,
1250 struct srvsvc_NetCharDevQPurgeSelf r
;
1254 r
.in
.server_unc
= server_unc
;
1255 r
.in
.queue_name
= queue_name
;
1256 r
.in
.computer_name
= computer_name
;
1258 status
= cli
->dispatch(cli
,
1261 NDR_SRVSVC_NETCHARDEVQPURGESELF
,
1264 if (!NT_STATUS_IS_OK(status
)) {
1268 if (NT_STATUS_IS_ERR(status
)) {
1272 /* Return variables */
1276 *werror
= r
.out
.result
;
1279 return werror_to_ntstatus(r
.out
.result
);
1282 struct rpccli_srvsvc_NetConnEnum_state
{
1283 struct srvsvc_NetConnEnum orig
;
1284 struct srvsvc_NetConnEnum tmp
;
1285 TALLOC_CTX
*out_mem_ctx
;
1286 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1289 static void rpccli_srvsvc_NetConnEnum_done(struct tevent_req
*subreq
);
1291 struct tevent_req
*rpccli_srvsvc_NetConnEnum_send(TALLOC_CTX
*mem_ctx
,
1292 struct tevent_context
*ev
,
1293 struct rpc_pipe_client
*cli
,
1294 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
1295 const char *_path
/* [in] [unique,charset(UTF16)] */,
1296 struct srvsvc_NetConnInfoCtr
*_info_ctr
/* [in,out] [ref] */,
1297 uint32_t _max_buffer
/* [in] */,
1298 uint32_t *_totalentries
/* [out] [ref] */,
1299 uint32_t *_resume_handle
/* [in,out] [unique] */)
1301 struct tevent_req
*req
;
1302 struct rpccli_srvsvc_NetConnEnum_state
*state
;
1303 struct tevent_req
*subreq
;
1305 req
= tevent_req_create(mem_ctx
, &state
,
1306 struct rpccli_srvsvc_NetConnEnum_state
);
1310 state
->out_mem_ctx
= NULL
;
1311 state
->dispatch_recv
= cli
->dispatch_recv
;
1314 state
->orig
.in
.server_unc
= _server_unc
;
1315 state
->orig
.in
.path
= _path
;
1316 state
->orig
.in
.info_ctr
= _info_ctr
;
1317 state
->orig
.in
.max_buffer
= _max_buffer
;
1318 state
->orig
.in
.resume_handle
= _resume_handle
;
1320 /* Out parameters */
1321 state
->orig
.out
.info_ctr
= _info_ctr
;
1322 state
->orig
.out
.totalentries
= _totalentries
;
1323 state
->orig
.out
.resume_handle
= _resume_handle
;
1326 ZERO_STRUCT(state
->orig
.out
.result
);
1328 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1329 "rpccli_srvsvc_NetConnEnum_out_memory");
1330 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1331 return tevent_req_post(req
, ev
);
1334 /* make a temporary copy, that we pass to the dispatch function */
1335 state
->tmp
= state
->orig
;
1337 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1339 NDR_SRVSVC_NETCONNENUM
,
1341 if (tevent_req_nomem(subreq
, req
)) {
1342 return tevent_req_post(req
, ev
);
1344 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetConnEnum_done
, req
);
1348 static void rpccli_srvsvc_NetConnEnum_done(struct tevent_req
*subreq
)
1350 struct tevent_req
*req
= tevent_req_callback_data(
1351 subreq
, struct tevent_req
);
1352 struct rpccli_srvsvc_NetConnEnum_state
*state
= tevent_req_data(
1353 req
, struct rpccli_srvsvc_NetConnEnum_state
);
1355 TALLOC_CTX
*mem_ctx
;
1357 if (state
->out_mem_ctx
) {
1358 mem_ctx
= state
->out_mem_ctx
;
1363 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1364 TALLOC_FREE(subreq
);
1365 if (!NT_STATUS_IS_OK(status
)) {
1366 tevent_req_nterror(req
, status
);
1370 /* Copy out parameters */
1371 *state
->orig
.out
.info_ctr
= *state
->tmp
.out
.info_ctr
;
1372 *state
->orig
.out
.totalentries
= *state
->tmp
.out
.totalentries
;
1373 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
1374 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
1378 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1380 /* Reset temporary structure */
1381 ZERO_STRUCT(state
->tmp
);
1383 tevent_req_done(req
);
1386 NTSTATUS
rpccli_srvsvc_NetConnEnum_recv(struct tevent_req
*req
,
1387 TALLOC_CTX
*mem_ctx
,
1390 struct rpccli_srvsvc_NetConnEnum_state
*state
= tevent_req_data(
1391 req
, struct rpccli_srvsvc_NetConnEnum_state
);
1394 if (tevent_req_is_nterror(req
, &status
)) {
1395 tevent_req_received(req
);
1399 /* Steal possbile out parameters to the callers context */
1400 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1403 *result
= state
->orig
.out
.result
;
1405 tevent_req_received(req
);
1406 return NT_STATUS_OK
;
1409 NTSTATUS
rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client
*cli
,
1410 TALLOC_CTX
*mem_ctx
,
1411 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
1412 const char *path
/* [in] [unique,charset(UTF16)] */,
1413 struct srvsvc_NetConnInfoCtr
*info_ctr
/* [in,out] [ref] */,
1414 uint32_t max_buffer
/* [in] */,
1415 uint32_t *totalentries
/* [out] [ref] */,
1416 uint32_t *resume_handle
/* [in,out] [unique] */,
1419 struct srvsvc_NetConnEnum r
;
1423 r
.in
.server_unc
= server_unc
;
1425 r
.in
.info_ctr
= info_ctr
;
1426 r
.in
.max_buffer
= max_buffer
;
1427 r
.in
.resume_handle
= resume_handle
;
1429 status
= cli
->dispatch(cli
,
1432 NDR_SRVSVC_NETCONNENUM
,
1435 if (!NT_STATUS_IS_OK(status
)) {
1439 if (NT_STATUS_IS_ERR(status
)) {
1443 /* Return variables */
1444 *info_ctr
= *r
.out
.info_ctr
;
1445 *totalentries
= *r
.out
.totalentries
;
1446 if (resume_handle
&& r
.out
.resume_handle
) {
1447 *resume_handle
= *r
.out
.resume_handle
;
1452 *werror
= r
.out
.result
;
1455 return werror_to_ntstatus(r
.out
.result
);
1458 struct rpccli_srvsvc_NetFileEnum_state
{
1459 struct srvsvc_NetFileEnum orig
;
1460 struct srvsvc_NetFileEnum tmp
;
1461 TALLOC_CTX
*out_mem_ctx
;
1462 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1465 static void rpccli_srvsvc_NetFileEnum_done(struct tevent_req
*subreq
);
1467 struct tevent_req
*rpccli_srvsvc_NetFileEnum_send(TALLOC_CTX
*mem_ctx
,
1468 struct tevent_context
*ev
,
1469 struct rpc_pipe_client
*cli
,
1470 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
1471 const char *_path
/* [in] [unique,charset(UTF16)] */,
1472 const char *_user
/* [in] [unique,charset(UTF16)] */,
1473 struct srvsvc_NetFileInfoCtr
*_info_ctr
/* [in,out] [ref] */,
1474 uint32_t _max_buffer
/* [in] */,
1475 uint32_t *_totalentries
/* [out] [ref] */,
1476 uint32_t *_resume_handle
/* [in,out] [unique] */)
1478 struct tevent_req
*req
;
1479 struct rpccli_srvsvc_NetFileEnum_state
*state
;
1480 struct tevent_req
*subreq
;
1482 req
= tevent_req_create(mem_ctx
, &state
,
1483 struct rpccli_srvsvc_NetFileEnum_state
);
1487 state
->out_mem_ctx
= NULL
;
1488 state
->dispatch_recv
= cli
->dispatch_recv
;
1491 state
->orig
.in
.server_unc
= _server_unc
;
1492 state
->orig
.in
.path
= _path
;
1493 state
->orig
.in
.user
= _user
;
1494 state
->orig
.in
.info_ctr
= _info_ctr
;
1495 state
->orig
.in
.max_buffer
= _max_buffer
;
1496 state
->orig
.in
.resume_handle
= _resume_handle
;
1498 /* Out parameters */
1499 state
->orig
.out
.info_ctr
= _info_ctr
;
1500 state
->orig
.out
.totalentries
= _totalentries
;
1501 state
->orig
.out
.resume_handle
= _resume_handle
;
1504 ZERO_STRUCT(state
->orig
.out
.result
);
1506 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1507 "rpccli_srvsvc_NetFileEnum_out_memory");
1508 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1509 return tevent_req_post(req
, ev
);
1512 /* make a temporary copy, that we pass to the dispatch function */
1513 state
->tmp
= state
->orig
;
1515 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1517 NDR_SRVSVC_NETFILEENUM
,
1519 if (tevent_req_nomem(subreq
, req
)) {
1520 return tevent_req_post(req
, ev
);
1522 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetFileEnum_done
, req
);
1526 static void rpccli_srvsvc_NetFileEnum_done(struct tevent_req
*subreq
)
1528 struct tevent_req
*req
= tevent_req_callback_data(
1529 subreq
, struct tevent_req
);
1530 struct rpccli_srvsvc_NetFileEnum_state
*state
= tevent_req_data(
1531 req
, struct rpccli_srvsvc_NetFileEnum_state
);
1533 TALLOC_CTX
*mem_ctx
;
1535 if (state
->out_mem_ctx
) {
1536 mem_ctx
= state
->out_mem_ctx
;
1541 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1542 TALLOC_FREE(subreq
);
1543 if (!NT_STATUS_IS_OK(status
)) {
1544 tevent_req_nterror(req
, status
);
1548 /* Copy out parameters */
1549 *state
->orig
.out
.info_ctr
= *state
->tmp
.out
.info_ctr
;
1550 *state
->orig
.out
.totalentries
= *state
->tmp
.out
.totalentries
;
1551 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
1552 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
1556 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1558 /* Reset temporary structure */
1559 ZERO_STRUCT(state
->tmp
);
1561 tevent_req_done(req
);
1564 NTSTATUS
rpccli_srvsvc_NetFileEnum_recv(struct tevent_req
*req
,
1565 TALLOC_CTX
*mem_ctx
,
1568 struct rpccli_srvsvc_NetFileEnum_state
*state
= tevent_req_data(
1569 req
, struct rpccli_srvsvc_NetFileEnum_state
);
1572 if (tevent_req_is_nterror(req
, &status
)) {
1573 tevent_req_received(req
);
1577 /* Steal possbile out parameters to the callers context */
1578 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1581 *result
= state
->orig
.out
.result
;
1583 tevent_req_received(req
);
1584 return NT_STATUS_OK
;
1587 NTSTATUS
rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client
*cli
,
1588 TALLOC_CTX
*mem_ctx
,
1589 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
1590 const char *path
/* [in] [unique,charset(UTF16)] */,
1591 const char *user
/* [in] [unique,charset(UTF16)] */,
1592 struct srvsvc_NetFileInfoCtr
*info_ctr
/* [in,out] [ref] */,
1593 uint32_t max_buffer
/* [in] */,
1594 uint32_t *totalentries
/* [out] [ref] */,
1595 uint32_t *resume_handle
/* [in,out] [unique] */,
1598 struct srvsvc_NetFileEnum r
;
1602 r
.in
.server_unc
= server_unc
;
1605 r
.in
.info_ctr
= info_ctr
;
1606 r
.in
.max_buffer
= max_buffer
;
1607 r
.in
.resume_handle
= resume_handle
;
1609 status
= cli
->dispatch(cli
,
1612 NDR_SRVSVC_NETFILEENUM
,
1615 if (!NT_STATUS_IS_OK(status
)) {
1619 if (NT_STATUS_IS_ERR(status
)) {
1623 /* Return variables */
1624 *info_ctr
= *r
.out
.info_ctr
;
1625 *totalentries
= *r
.out
.totalentries
;
1626 if (resume_handle
&& r
.out
.resume_handle
) {
1627 *resume_handle
= *r
.out
.resume_handle
;
1632 *werror
= r
.out
.result
;
1635 return werror_to_ntstatus(r
.out
.result
);
1638 struct rpccli_srvsvc_NetFileGetInfo_state
{
1639 struct srvsvc_NetFileGetInfo orig
;
1640 struct srvsvc_NetFileGetInfo tmp
;
1641 TALLOC_CTX
*out_mem_ctx
;
1642 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1645 static void rpccli_srvsvc_NetFileGetInfo_done(struct tevent_req
*subreq
);
1647 struct tevent_req
*rpccli_srvsvc_NetFileGetInfo_send(TALLOC_CTX
*mem_ctx
,
1648 struct tevent_context
*ev
,
1649 struct rpc_pipe_client
*cli
,
1650 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
1651 uint32_t _fid
/* [in] */,
1652 uint32_t _level
/* [in] */,
1653 union srvsvc_NetFileInfo
*_info
/* [out] [ref,switch_is(level)] */)
1655 struct tevent_req
*req
;
1656 struct rpccli_srvsvc_NetFileGetInfo_state
*state
;
1657 struct tevent_req
*subreq
;
1659 req
= tevent_req_create(mem_ctx
, &state
,
1660 struct rpccli_srvsvc_NetFileGetInfo_state
);
1664 state
->out_mem_ctx
= NULL
;
1665 state
->dispatch_recv
= cli
->dispatch_recv
;
1668 state
->orig
.in
.server_unc
= _server_unc
;
1669 state
->orig
.in
.fid
= _fid
;
1670 state
->orig
.in
.level
= _level
;
1672 /* Out parameters */
1673 state
->orig
.out
.info
= _info
;
1676 ZERO_STRUCT(state
->orig
.out
.result
);
1678 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1679 "rpccli_srvsvc_NetFileGetInfo_out_memory");
1680 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1681 return tevent_req_post(req
, ev
);
1684 /* make a temporary copy, that we pass to the dispatch function */
1685 state
->tmp
= state
->orig
;
1687 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1689 NDR_SRVSVC_NETFILEGETINFO
,
1691 if (tevent_req_nomem(subreq
, req
)) {
1692 return tevent_req_post(req
, ev
);
1694 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetFileGetInfo_done
, req
);
1698 static void rpccli_srvsvc_NetFileGetInfo_done(struct tevent_req
*subreq
)
1700 struct tevent_req
*req
= tevent_req_callback_data(
1701 subreq
, struct tevent_req
);
1702 struct rpccli_srvsvc_NetFileGetInfo_state
*state
= tevent_req_data(
1703 req
, struct rpccli_srvsvc_NetFileGetInfo_state
);
1705 TALLOC_CTX
*mem_ctx
;
1707 if (state
->out_mem_ctx
) {
1708 mem_ctx
= state
->out_mem_ctx
;
1713 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1714 TALLOC_FREE(subreq
);
1715 if (!NT_STATUS_IS_OK(status
)) {
1716 tevent_req_nterror(req
, status
);
1720 /* Copy out parameters */
1721 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
1724 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1726 /* Reset temporary structure */
1727 ZERO_STRUCT(state
->tmp
);
1729 tevent_req_done(req
);
1732 NTSTATUS
rpccli_srvsvc_NetFileGetInfo_recv(struct tevent_req
*req
,
1733 TALLOC_CTX
*mem_ctx
,
1736 struct rpccli_srvsvc_NetFileGetInfo_state
*state
= tevent_req_data(
1737 req
, struct rpccli_srvsvc_NetFileGetInfo_state
);
1740 if (tevent_req_is_nterror(req
, &status
)) {
1741 tevent_req_received(req
);
1745 /* Steal possbile out parameters to the callers context */
1746 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1749 *result
= state
->orig
.out
.result
;
1751 tevent_req_received(req
);
1752 return NT_STATUS_OK
;
1755 NTSTATUS
rpccli_srvsvc_NetFileGetInfo(struct rpc_pipe_client
*cli
,
1756 TALLOC_CTX
*mem_ctx
,
1757 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
1758 uint32_t fid
/* [in] */,
1759 uint32_t level
/* [in] */,
1760 union srvsvc_NetFileInfo
*info
/* [out] [ref,switch_is(level)] */,
1763 struct srvsvc_NetFileGetInfo r
;
1767 r
.in
.server_unc
= server_unc
;
1771 status
= cli
->dispatch(cli
,
1774 NDR_SRVSVC_NETFILEGETINFO
,
1777 if (!NT_STATUS_IS_OK(status
)) {
1781 if (NT_STATUS_IS_ERR(status
)) {
1785 /* Return variables */
1786 *info
= *r
.out
.info
;
1790 *werror
= r
.out
.result
;
1793 return werror_to_ntstatus(r
.out
.result
);
1796 struct rpccli_srvsvc_NetFileClose_state
{
1797 struct srvsvc_NetFileClose orig
;
1798 struct srvsvc_NetFileClose tmp
;
1799 TALLOC_CTX
*out_mem_ctx
;
1800 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1803 static void rpccli_srvsvc_NetFileClose_done(struct tevent_req
*subreq
);
1805 struct tevent_req
*rpccli_srvsvc_NetFileClose_send(TALLOC_CTX
*mem_ctx
,
1806 struct tevent_context
*ev
,
1807 struct rpc_pipe_client
*cli
,
1808 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
1809 uint32_t _fid
/* [in] */)
1811 struct tevent_req
*req
;
1812 struct rpccli_srvsvc_NetFileClose_state
*state
;
1813 struct tevent_req
*subreq
;
1815 req
= tevent_req_create(mem_ctx
, &state
,
1816 struct rpccli_srvsvc_NetFileClose_state
);
1820 state
->out_mem_ctx
= NULL
;
1821 state
->dispatch_recv
= cli
->dispatch_recv
;
1824 state
->orig
.in
.server_unc
= _server_unc
;
1825 state
->orig
.in
.fid
= _fid
;
1827 /* Out parameters */
1830 ZERO_STRUCT(state
->orig
.out
.result
);
1832 /* make a temporary copy, that we pass to the dispatch function */
1833 state
->tmp
= state
->orig
;
1835 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1837 NDR_SRVSVC_NETFILECLOSE
,
1839 if (tevent_req_nomem(subreq
, req
)) {
1840 return tevent_req_post(req
, ev
);
1842 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetFileClose_done
, req
);
1846 static void rpccli_srvsvc_NetFileClose_done(struct tevent_req
*subreq
)
1848 struct tevent_req
*req
= tevent_req_callback_data(
1849 subreq
, struct tevent_req
);
1850 struct rpccli_srvsvc_NetFileClose_state
*state
= tevent_req_data(
1851 req
, struct rpccli_srvsvc_NetFileClose_state
);
1853 TALLOC_CTX
*mem_ctx
;
1855 if (state
->out_mem_ctx
) {
1856 mem_ctx
= state
->out_mem_ctx
;
1861 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1862 TALLOC_FREE(subreq
);
1863 if (!NT_STATUS_IS_OK(status
)) {
1864 tevent_req_nterror(req
, status
);
1868 /* Copy out parameters */
1871 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1873 /* Reset temporary structure */
1874 ZERO_STRUCT(state
->tmp
);
1876 tevent_req_done(req
);
1879 NTSTATUS
rpccli_srvsvc_NetFileClose_recv(struct tevent_req
*req
,
1880 TALLOC_CTX
*mem_ctx
,
1883 struct rpccli_srvsvc_NetFileClose_state
*state
= tevent_req_data(
1884 req
, struct rpccli_srvsvc_NetFileClose_state
);
1887 if (tevent_req_is_nterror(req
, &status
)) {
1888 tevent_req_received(req
);
1892 /* Steal possbile out parameters to the callers context */
1893 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1896 *result
= state
->orig
.out
.result
;
1898 tevent_req_received(req
);
1899 return NT_STATUS_OK
;
1902 NTSTATUS
rpccli_srvsvc_NetFileClose(struct rpc_pipe_client
*cli
,
1903 TALLOC_CTX
*mem_ctx
,
1904 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
1905 uint32_t fid
/* [in] */,
1908 struct srvsvc_NetFileClose r
;
1912 r
.in
.server_unc
= server_unc
;
1915 status
= cli
->dispatch(cli
,
1918 NDR_SRVSVC_NETFILECLOSE
,
1921 if (!NT_STATUS_IS_OK(status
)) {
1925 if (NT_STATUS_IS_ERR(status
)) {
1929 /* Return variables */
1933 *werror
= r
.out
.result
;
1936 return werror_to_ntstatus(r
.out
.result
);
1939 struct rpccli_srvsvc_NetSessEnum_state
{
1940 struct srvsvc_NetSessEnum orig
;
1941 struct srvsvc_NetSessEnum tmp
;
1942 TALLOC_CTX
*out_mem_ctx
;
1943 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1946 static void rpccli_srvsvc_NetSessEnum_done(struct tevent_req
*subreq
);
1948 struct tevent_req
*rpccli_srvsvc_NetSessEnum_send(TALLOC_CTX
*mem_ctx
,
1949 struct tevent_context
*ev
,
1950 struct rpc_pipe_client
*cli
,
1951 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
1952 const char *_client
/* [in] [unique,charset(UTF16)] */,
1953 const char *_user
/* [in] [unique,charset(UTF16)] */,
1954 struct srvsvc_NetSessInfoCtr
*_info_ctr
/* [in,out] [ref] */,
1955 uint32_t _max_buffer
/* [in] */,
1956 uint32_t *_totalentries
/* [out] [ref] */,
1957 uint32_t *_resume_handle
/* [in,out] [unique] */)
1959 struct tevent_req
*req
;
1960 struct rpccli_srvsvc_NetSessEnum_state
*state
;
1961 struct tevent_req
*subreq
;
1963 req
= tevent_req_create(mem_ctx
, &state
,
1964 struct rpccli_srvsvc_NetSessEnum_state
);
1968 state
->out_mem_ctx
= NULL
;
1969 state
->dispatch_recv
= cli
->dispatch_recv
;
1972 state
->orig
.in
.server_unc
= _server_unc
;
1973 state
->orig
.in
.client
= _client
;
1974 state
->orig
.in
.user
= _user
;
1975 state
->orig
.in
.info_ctr
= _info_ctr
;
1976 state
->orig
.in
.max_buffer
= _max_buffer
;
1977 state
->orig
.in
.resume_handle
= _resume_handle
;
1979 /* Out parameters */
1980 state
->orig
.out
.info_ctr
= _info_ctr
;
1981 state
->orig
.out
.totalentries
= _totalentries
;
1982 state
->orig
.out
.resume_handle
= _resume_handle
;
1985 ZERO_STRUCT(state
->orig
.out
.result
);
1987 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1988 "rpccli_srvsvc_NetSessEnum_out_memory");
1989 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1990 return tevent_req_post(req
, ev
);
1993 /* make a temporary copy, that we pass to the dispatch function */
1994 state
->tmp
= state
->orig
;
1996 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1998 NDR_SRVSVC_NETSESSENUM
,
2000 if (tevent_req_nomem(subreq
, req
)) {
2001 return tevent_req_post(req
, ev
);
2003 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetSessEnum_done
, req
);
2007 static void rpccli_srvsvc_NetSessEnum_done(struct tevent_req
*subreq
)
2009 struct tevent_req
*req
= tevent_req_callback_data(
2010 subreq
, struct tevent_req
);
2011 struct rpccli_srvsvc_NetSessEnum_state
*state
= tevent_req_data(
2012 req
, struct rpccli_srvsvc_NetSessEnum_state
);
2014 TALLOC_CTX
*mem_ctx
;
2016 if (state
->out_mem_ctx
) {
2017 mem_ctx
= state
->out_mem_ctx
;
2022 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2023 TALLOC_FREE(subreq
);
2024 if (!NT_STATUS_IS_OK(status
)) {
2025 tevent_req_nterror(req
, status
);
2029 /* Copy out parameters */
2030 *state
->orig
.out
.info_ctr
= *state
->tmp
.out
.info_ctr
;
2031 *state
->orig
.out
.totalentries
= *state
->tmp
.out
.totalentries
;
2032 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
2033 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
2037 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2039 /* Reset temporary structure */
2040 ZERO_STRUCT(state
->tmp
);
2042 tevent_req_done(req
);
2045 NTSTATUS
rpccli_srvsvc_NetSessEnum_recv(struct tevent_req
*req
,
2046 TALLOC_CTX
*mem_ctx
,
2049 struct rpccli_srvsvc_NetSessEnum_state
*state
= tevent_req_data(
2050 req
, struct rpccli_srvsvc_NetSessEnum_state
);
2053 if (tevent_req_is_nterror(req
, &status
)) {
2054 tevent_req_received(req
);
2058 /* Steal possbile out parameters to the callers context */
2059 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2062 *result
= state
->orig
.out
.result
;
2064 tevent_req_received(req
);
2065 return NT_STATUS_OK
;
2068 NTSTATUS
rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client
*cli
,
2069 TALLOC_CTX
*mem_ctx
,
2070 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
2071 const char *client
/* [in] [unique,charset(UTF16)] */,
2072 const char *user
/* [in] [unique,charset(UTF16)] */,
2073 struct srvsvc_NetSessInfoCtr
*info_ctr
/* [in,out] [ref] */,
2074 uint32_t max_buffer
/* [in] */,
2075 uint32_t *totalentries
/* [out] [ref] */,
2076 uint32_t *resume_handle
/* [in,out] [unique] */,
2079 struct srvsvc_NetSessEnum r
;
2083 r
.in
.server_unc
= server_unc
;
2084 r
.in
.client
= client
;
2086 r
.in
.info_ctr
= info_ctr
;
2087 r
.in
.max_buffer
= max_buffer
;
2088 r
.in
.resume_handle
= resume_handle
;
2090 status
= cli
->dispatch(cli
,
2093 NDR_SRVSVC_NETSESSENUM
,
2096 if (!NT_STATUS_IS_OK(status
)) {
2100 if (NT_STATUS_IS_ERR(status
)) {
2104 /* Return variables */
2105 *info_ctr
= *r
.out
.info_ctr
;
2106 *totalentries
= *r
.out
.totalentries
;
2107 if (resume_handle
&& r
.out
.resume_handle
) {
2108 *resume_handle
= *r
.out
.resume_handle
;
2113 *werror
= r
.out
.result
;
2116 return werror_to_ntstatus(r
.out
.result
);
2119 struct rpccli_srvsvc_NetSessDel_state
{
2120 struct srvsvc_NetSessDel orig
;
2121 struct srvsvc_NetSessDel tmp
;
2122 TALLOC_CTX
*out_mem_ctx
;
2123 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2126 static void rpccli_srvsvc_NetSessDel_done(struct tevent_req
*subreq
);
2128 struct tevent_req
*rpccli_srvsvc_NetSessDel_send(TALLOC_CTX
*mem_ctx
,
2129 struct tevent_context
*ev
,
2130 struct rpc_pipe_client
*cli
,
2131 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
2132 const char *_client
/* [in] [unique,charset(UTF16)] */,
2133 const char *_user
/* [in] [unique,charset(UTF16)] */)
2135 struct tevent_req
*req
;
2136 struct rpccli_srvsvc_NetSessDel_state
*state
;
2137 struct tevent_req
*subreq
;
2139 req
= tevent_req_create(mem_ctx
, &state
,
2140 struct rpccli_srvsvc_NetSessDel_state
);
2144 state
->out_mem_ctx
= NULL
;
2145 state
->dispatch_recv
= cli
->dispatch_recv
;
2148 state
->orig
.in
.server_unc
= _server_unc
;
2149 state
->orig
.in
.client
= _client
;
2150 state
->orig
.in
.user
= _user
;
2152 /* Out parameters */
2155 ZERO_STRUCT(state
->orig
.out
.result
);
2157 /* make a temporary copy, that we pass to the dispatch function */
2158 state
->tmp
= state
->orig
;
2160 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2162 NDR_SRVSVC_NETSESSDEL
,
2164 if (tevent_req_nomem(subreq
, req
)) {
2165 return tevent_req_post(req
, ev
);
2167 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetSessDel_done
, req
);
2171 static void rpccli_srvsvc_NetSessDel_done(struct tevent_req
*subreq
)
2173 struct tevent_req
*req
= tevent_req_callback_data(
2174 subreq
, struct tevent_req
);
2175 struct rpccli_srvsvc_NetSessDel_state
*state
= tevent_req_data(
2176 req
, struct rpccli_srvsvc_NetSessDel_state
);
2178 TALLOC_CTX
*mem_ctx
;
2180 if (state
->out_mem_ctx
) {
2181 mem_ctx
= state
->out_mem_ctx
;
2186 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2187 TALLOC_FREE(subreq
);
2188 if (!NT_STATUS_IS_OK(status
)) {
2189 tevent_req_nterror(req
, status
);
2193 /* Copy out parameters */
2196 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2198 /* Reset temporary structure */
2199 ZERO_STRUCT(state
->tmp
);
2201 tevent_req_done(req
);
2204 NTSTATUS
rpccli_srvsvc_NetSessDel_recv(struct tevent_req
*req
,
2205 TALLOC_CTX
*mem_ctx
,
2208 struct rpccli_srvsvc_NetSessDel_state
*state
= tevent_req_data(
2209 req
, struct rpccli_srvsvc_NetSessDel_state
);
2212 if (tevent_req_is_nterror(req
, &status
)) {
2213 tevent_req_received(req
);
2217 /* Steal possbile out parameters to the callers context */
2218 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2221 *result
= state
->orig
.out
.result
;
2223 tevent_req_received(req
);
2224 return NT_STATUS_OK
;
2227 NTSTATUS
rpccli_srvsvc_NetSessDel(struct rpc_pipe_client
*cli
,
2228 TALLOC_CTX
*mem_ctx
,
2229 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
2230 const char *client
/* [in] [unique,charset(UTF16)] */,
2231 const char *user
/* [in] [unique,charset(UTF16)] */,
2234 struct srvsvc_NetSessDel r
;
2238 r
.in
.server_unc
= server_unc
;
2239 r
.in
.client
= client
;
2242 status
= cli
->dispatch(cli
,
2245 NDR_SRVSVC_NETSESSDEL
,
2248 if (!NT_STATUS_IS_OK(status
)) {
2252 if (NT_STATUS_IS_ERR(status
)) {
2256 /* Return variables */
2260 *werror
= r
.out
.result
;
2263 return werror_to_ntstatus(r
.out
.result
);
2266 struct rpccli_srvsvc_NetShareAdd_state
{
2267 struct srvsvc_NetShareAdd orig
;
2268 struct srvsvc_NetShareAdd tmp
;
2269 TALLOC_CTX
*out_mem_ctx
;
2270 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2273 static void rpccli_srvsvc_NetShareAdd_done(struct tevent_req
*subreq
);
2275 struct tevent_req
*rpccli_srvsvc_NetShareAdd_send(TALLOC_CTX
*mem_ctx
,
2276 struct tevent_context
*ev
,
2277 struct rpc_pipe_client
*cli
,
2278 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
2279 uint32_t _level
/* [in] */,
2280 union srvsvc_NetShareInfo
*_info
/* [in] [ref,switch_is(level)] */,
2281 uint32_t *_parm_error
/* [in,out] [unique] */)
2283 struct tevent_req
*req
;
2284 struct rpccli_srvsvc_NetShareAdd_state
*state
;
2285 struct tevent_req
*subreq
;
2287 req
= tevent_req_create(mem_ctx
, &state
,
2288 struct rpccli_srvsvc_NetShareAdd_state
);
2292 state
->out_mem_ctx
= NULL
;
2293 state
->dispatch_recv
= cli
->dispatch_recv
;
2296 state
->orig
.in
.server_unc
= _server_unc
;
2297 state
->orig
.in
.level
= _level
;
2298 state
->orig
.in
.info
= _info
;
2299 state
->orig
.in
.parm_error
= _parm_error
;
2301 /* Out parameters */
2302 state
->orig
.out
.parm_error
= _parm_error
;
2305 ZERO_STRUCT(state
->orig
.out
.result
);
2307 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2308 "rpccli_srvsvc_NetShareAdd_out_memory");
2309 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2310 return tevent_req_post(req
, ev
);
2313 /* make a temporary copy, that we pass to the dispatch function */
2314 state
->tmp
= state
->orig
;
2316 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2318 NDR_SRVSVC_NETSHAREADD
,
2320 if (tevent_req_nomem(subreq
, req
)) {
2321 return tevent_req_post(req
, ev
);
2323 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareAdd_done
, req
);
2327 static void rpccli_srvsvc_NetShareAdd_done(struct tevent_req
*subreq
)
2329 struct tevent_req
*req
= tevent_req_callback_data(
2330 subreq
, struct tevent_req
);
2331 struct rpccli_srvsvc_NetShareAdd_state
*state
= tevent_req_data(
2332 req
, struct rpccli_srvsvc_NetShareAdd_state
);
2334 TALLOC_CTX
*mem_ctx
;
2336 if (state
->out_mem_ctx
) {
2337 mem_ctx
= state
->out_mem_ctx
;
2342 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2343 TALLOC_FREE(subreq
);
2344 if (!NT_STATUS_IS_OK(status
)) {
2345 tevent_req_nterror(req
, status
);
2349 /* Copy out parameters */
2350 if (state
->orig
.out
.parm_error
&& state
->tmp
.out
.parm_error
) {
2351 *state
->orig
.out
.parm_error
= *state
->tmp
.out
.parm_error
;
2355 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2357 /* Reset temporary structure */
2358 ZERO_STRUCT(state
->tmp
);
2360 tevent_req_done(req
);
2363 NTSTATUS
rpccli_srvsvc_NetShareAdd_recv(struct tevent_req
*req
,
2364 TALLOC_CTX
*mem_ctx
,
2367 struct rpccli_srvsvc_NetShareAdd_state
*state
= tevent_req_data(
2368 req
, struct rpccli_srvsvc_NetShareAdd_state
);
2371 if (tevent_req_is_nterror(req
, &status
)) {
2372 tevent_req_received(req
);
2376 /* Steal possbile out parameters to the callers context */
2377 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2380 *result
= state
->orig
.out
.result
;
2382 tevent_req_received(req
);
2383 return NT_STATUS_OK
;
2386 NTSTATUS
rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client
*cli
,
2387 TALLOC_CTX
*mem_ctx
,
2388 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
2389 uint32_t level
/* [in] */,
2390 union srvsvc_NetShareInfo
*info
/* [in] [ref,switch_is(level)] */,
2391 uint32_t *parm_error
/* [in,out] [unique] */,
2394 struct srvsvc_NetShareAdd r
;
2398 r
.in
.server_unc
= server_unc
;
2401 r
.in
.parm_error
= parm_error
;
2403 status
= cli
->dispatch(cli
,
2406 NDR_SRVSVC_NETSHAREADD
,
2409 if (!NT_STATUS_IS_OK(status
)) {
2413 if (NT_STATUS_IS_ERR(status
)) {
2417 /* Return variables */
2418 if (parm_error
&& r
.out
.parm_error
) {
2419 *parm_error
= *r
.out
.parm_error
;
2424 *werror
= r
.out
.result
;
2427 return werror_to_ntstatus(r
.out
.result
);
2430 struct rpccli_srvsvc_NetShareEnumAll_state
{
2431 struct srvsvc_NetShareEnumAll orig
;
2432 struct srvsvc_NetShareEnumAll tmp
;
2433 TALLOC_CTX
*out_mem_ctx
;
2434 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2437 static void rpccli_srvsvc_NetShareEnumAll_done(struct tevent_req
*subreq
);
2439 struct tevent_req
*rpccli_srvsvc_NetShareEnumAll_send(TALLOC_CTX
*mem_ctx
,
2440 struct tevent_context
*ev
,
2441 struct rpc_pipe_client
*cli
,
2442 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
2443 struct srvsvc_NetShareInfoCtr
*_info_ctr
/* [in,out] [ref] */,
2444 uint32_t _max_buffer
/* [in] */,
2445 uint32_t *_totalentries
/* [out] [ref] */,
2446 uint32_t *_resume_handle
/* [in,out] [unique] */)
2448 struct tevent_req
*req
;
2449 struct rpccli_srvsvc_NetShareEnumAll_state
*state
;
2450 struct tevent_req
*subreq
;
2452 req
= tevent_req_create(mem_ctx
, &state
,
2453 struct rpccli_srvsvc_NetShareEnumAll_state
);
2457 state
->out_mem_ctx
= NULL
;
2458 state
->dispatch_recv
= cli
->dispatch_recv
;
2461 state
->orig
.in
.server_unc
= _server_unc
;
2462 state
->orig
.in
.info_ctr
= _info_ctr
;
2463 state
->orig
.in
.max_buffer
= _max_buffer
;
2464 state
->orig
.in
.resume_handle
= _resume_handle
;
2466 /* Out parameters */
2467 state
->orig
.out
.info_ctr
= _info_ctr
;
2468 state
->orig
.out
.totalentries
= _totalentries
;
2469 state
->orig
.out
.resume_handle
= _resume_handle
;
2472 ZERO_STRUCT(state
->orig
.out
.result
);
2474 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2475 "rpccli_srvsvc_NetShareEnumAll_out_memory");
2476 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2477 return tevent_req_post(req
, ev
);
2480 /* make a temporary copy, that we pass to the dispatch function */
2481 state
->tmp
= state
->orig
;
2483 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2485 NDR_SRVSVC_NETSHAREENUMALL
,
2487 if (tevent_req_nomem(subreq
, req
)) {
2488 return tevent_req_post(req
, ev
);
2490 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareEnumAll_done
, req
);
2494 static void rpccli_srvsvc_NetShareEnumAll_done(struct tevent_req
*subreq
)
2496 struct tevent_req
*req
= tevent_req_callback_data(
2497 subreq
, struct tevent_req
);
2498 struct rpccli_srvsvc_NetShareEnumAll_state
*state
= tevent_req_data(
2499 req
, struct rpccli_srvsvc_NetShareEnumAll_state
);
2501 TALLOC_CTX
*mem_ctx
;
2503 if (state
->out_mem_ctx
) {
2504 mem_ctx
= state
->out_mem_ctx
;
2509 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2510 TALLOC_FREE(subreq
);
2511 if (!NT_STATUS_IS_OK(status
)) {
2512 tevent_req_nterror(req
, status
);
2516 /* Copy out parameters */
2517 *state
->orig
.out
.info_ctr
= *state
->tmp
.out
.info_ctr
;
2518 *state
->orig
.out
.totalentries
= *state
->tmp
.out
.totalentries
;
2519 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
2520 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
2524 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2526 /* Reset temporary structure */
2527 ZERO_STRUCT(state
->tmp
);
2529 tevent_req_done(req
);
2532 NTSTATUS
rpccli_srvsvc_NetShareEnumAll_recv(struct tevent_req
*req
,
2533 TALLOC_CTX
*mem_ctx
,
2536 struct rpccli_srvsvc_NetShareEnumAll_state
*state
= tevent_req_data(
2537 req
, struct rpccli_srvsvc_NetShareEnumAll_state
);
2540 if (tevent_req_is_nterror(req
, &status
)) {
2541 tevent_req_received(req
);
2545 /* Steal possbile out parameters to the callers context */
2546 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2549 *result
= state
->orig
.out
.result
;
2551 tevent_req_received(req
);
2552 return NT_STATUS_OK
;
2555 NTSTATUS
rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client
*cli
,
2556 TALLOC_CTX
*mem_ctx
,
2557 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
2558 struct srvsvc_NetShareInfoCtr
*info_ctr
/* [in,out] [ref] */,
2559 uint32_t max_buffer
/* [in] */,
2560 uint32_t *totalentries
/* [out] [ref] */,
2561 uint32_t *resume_handle
/* [in,out] [unique] */,
2564 struct srvsvc_NetShareEnumAll r
;
2568 r
.in
.server_unc
= server_unc
;
2569 r
.in
.info_ctr
= info_ctr
;
2570 r
.in
.max_buffer
= max_buffer
;
2571 r
.in
.resume_handle
= resume_handle
;
2573 status
= cli
->dispatch(cli
,
2576 NDR_SRVSVC_NETSHAREENUMALL
,
2579 if (!NT_STATUS_IS_OK(status
)) {
2583 if (NT_STATUS_IS_ERR(status
)) {
2587 /* Return variables */
2588 *info_ctr
= *r
.out
.info_ctr
;
2589 *totalentries
= *r
.out
.totalentries
;
2590 if (resume_handle
&& r
.out
.resume_handle
) {
2591 *resume_handle
= *r
.out
.resume_handle
;
2596 *werror
= r
.out
.result
;
2599 return werror_to_ntstatus(r
.out
.result
);
2602 struct rpccli_srvsvc_NetShareGetInfo_state
{
2603 struct srvsvc_NetShareGetInfo orig
;
2604 struct srvsvc_NetShareGetInfo tmp
;
2605 TALLOC_CTX
*out_mem_ctx
;
2606 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2609 static void rpccli_srvsvc_NetShareGetInfo_done(struct tevent_req
*subreq
);
2611 struct tevent_req
*rpccli_srvsvc_NetShareGetInfo_send(TALLOC_CTX
*mem_ctx
,
2612 struct tevent_context
*ev
,
2613 struct rpc_pipe_client
*cli
,
2614 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
2615 const char *_share_name
/* [in] [charset(UTF16)] */,
2616 uint32_t _level
/* [in] */,
2617 union srvsvc_NetShareInfo
*_info
/* [out] [ref,switch_is(level)] */)
2619 struct tevent_req
*req
;
2620 struct rpccli_srvsvc_NetShareGetInfo_state
*state
;
2621 struct tevent_req
*subreq
;
2623 req
= tevent_req_create(mem_ctx
, &state
,
2624 struct rpccli_srvsvc_NetShareGetInfo_state
);
2628 state
->out_mem_ctx
= NULL
;
2629 state
->dispatch_recv
= cli
->dispatch_recv
;
2632 state
->orig
.in
.server_unc
= _server_unc
;
2633 state
->orig
.in
.share_name
= _share_name
;
2634 state
->orig
.in
.level
= _level
;
2636 /* Out parameters */
2637 state
->orig
.out
.info
= _info
;
2640 ZERO_STRUCT(state
->orig
.out
.result
);
2642 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2643 "rpccli_srvsvc_NetShareGetInfo_out_memory");
2644 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2645 return tevent_req_post(req
, ev
);
2648 /* make a temporary copy, that we pass to the dispatch function */
2649 state
->tmp
= state
->orig
;
2651 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2653 NDR_SRVSVC_NETSHAREGETINFO
,
2655 if (tevent_req_nomem(subreq
, req
)) {
2656 return tevent_req_post(req
, ev
);
2658 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareGetInfo_done
, req
);
2662 static void rpccli_srvsvc_NetShareGetInfo_done(struct tevent_req
*subreq
)
2664 struct tevent_req
*req
= tevent_req_callback_data(
2665 subreq
, struct tevent_req
);
2666 struct rpccli_srvsvc_NetShareGetInfo_state
*state
= tevent_req_data(
2667 req
, struct rpccli_srvsvc_NetShareGetInfo_state
);
2669 TALLOC_CTX
*mem_ctx
;
2671 if (state
->out_mem_ctx
) {
2672 mem_ctx
= state
->out_mem_ctx
;
2677 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2678 TALLOC_FREE(subreq
);
2679 if (!NT_STATUS_IS_OK(status
)) {
2680 tevent_req_nterror(req
, status
);
2684 /* Copy out parameters */
2685 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
2688 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2690 /* Reset temporary structure */
2691 ZERO_STRUCT(state
->tmp
);
2693 tevent_req_done(req
);
2696 NTSTATUS
rpccli_srvsvc_NetShareGetInfo_recv(struct tevent_req
*req
,
2697 TALLOC_CTX
*mem_ctx
,
2700 struct rpccli_srvsvc_NetShareGetInfo_state
*state
= tevent_req_data(
2701 req
, struct rpccli_srvsvc_NetShareGetInfo_state
);
2704 if (tevent_req_is_nterror(req
, &status
)) {
2705 tevent_req_received(req
);
2709 /* Steal possbile out parameters to the callers context */
2710 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2713 *result
= state
->orig
.out
.result
;
2715 tevent_req_received(req
);
2716 return NT_STATUS_OK
;
2719 NTSTATUS
rpccli_srvsvc_NetShareGetInfo(struct rpc_pipe_client
*cli
,
2720 TALLOC_CTX
*mem_ctx
,
2721 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
2722 const char *share_name
/* [in] [charset(UTF16)] */,
2723 uint32_t level
/* [in] */,
2724 union srvsvc_NetShareInfo
*info
/* [out] [ref,switch_is(level)] */,
2727 struct srvsvc_NetShareGetInfo r
;
2731 r
.in
.server_unc
= server_unc
;
2732 r
.in
.share_name
= share_name
;
2735 status
= cli
->dispatch(cli
,
2738 NDR_SRVSVC_NETSHAREGETINFO
,
2741 if (!NT_STATUS_IS_OK(status
)) {
2745 if (NT_STATUS_IS_ERR(status
)) {
2749 /* Return variables */
2750 *info
= *r
.out
.info
;
2754 *werror
= r
.out
.result
;
2757 return werror_to_ntstatus(r
.out
.result
);
2760 struct rpccli_srvsvc_NetShareSetInfo_state
{
2761 struct srvsvc_NetShareSetInfo orig
;
2762 struct srvsvc_NetShareSetInfo tmp
;
2763 TALLOC_CTX
*out_mem_ctx
;
2764 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2767 static void rpccli_srvsvc_NetShareSetInfo_done(struct tevent_req
*subreq
);
2769 struct tevent_req
*rpccli_srvsvc_NetShareSetInfo_send(TALLOC_CTX
*mem_ctx
,
2770 struct tevent_context
*ev
,
2771 struct rpc_pipe_client
*cli
,
2772 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
2773 const char *_share_name
/* [in] [charset(UTF16)] */,
2774 uint32_t _level
/* [in] */,
2775 union srvsvc_NetShareInfo
*_info
/* [in] [ref,switch_is(level)] */,
2776 uint32_t *_parm_error
/* [in,out] [unique] */)
2778 struct tevent_req
*req
;
2779 struct rpccli_srvsvc_NetShareSetInfo_state
*state
;
2780 struct tevent_req
*subreq
;
2782 req
= tevent_req_create(mem_ctx
, &state
,
2783 struct rpccli_srvsvc_NetShareSetInfo_state
);
2787 state
->out_mem_ctx
= NULL
;
2788 state
->dispatch_recv
= cli
->dispatch_recv
;
2791 state
->orig
.in
.server_unc
= _server_unc
;
2792 state
->orig
.in
.share_name
= _share_name
;
2793 state
->orig
.in
.level
= _level
;
2794 state
->orig
.in
.info
= _info
;
2795 state
->orig
.in
.parm_error
= _parm_error
;
2797 /* Out parameters */
2798 state
->orig
.out
.parm_error
= _parm_error
;
2801 ZERO_STRUCT(state
->orig
.out
.result
);
2803 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2804 "rpccli_srvsvc_NetShareSetInfo_out_memory");
2805 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2806 return tevent_req_post(req
, ev
);
2809 /* make a temporary copy, that we pass to the dispatch function */
2810 state
->tmp
= state
->orig
;
2812 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2814 NDR_SRVSVC_NETSHARESETINFO
,
2816 if (tevent_req_nomem(subreq
, req
)) {
2817 return tevent_req_post(req
, ev
);
2819 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareSetInfo_done
, req
);
2823 static void rpccli_srvsvc_NetShareSetInfo_done(struct tevent_req
*subreq
)
2825 struct tevent_req
*req
= tevent_req_callback_data(
2826 subreq
, struct tevent_req
);
2827 struct rpccli_srvsvc_NetShareSetInfo_state
*state
= tevent_req_data(
2828 req
, struct rpccli_srvsvc_NetShareSetInfo_state
);
2830 TALLOC_CTX
*mem_ctx
;
2832 if (state
->out_mem_ctx
) {
2833 mem_ctx
= state
->out_mem_ctx
;
2838 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2839 TALLOC_FREE(subreq
);
2840 if (!NT_STATUS_IS_OK(status
)) {
2841 tevent_req_nterror(req
, status
);
2845 /* Copy out parameters */
2846 if (state
->orig
.out
.parm_error
&& state
->tmp
.out
.parm_error
) {
2847 *state
->orig
.out
.parm_error
= *state
->tmp
.out
.parm_error
;
2851 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2853 /* Reset temporary structure */
2854 ZERO_STRUCT(state
->tmp
);
2856 tevent_req_done(req
);
2859 NTSTATUS
rpccli_srvsvc_NetShareSetInfo_recv(struct tevent_req
*req
,
2860 TALLOC_CTX
*mem_ctx
,
2863 struct rpccli_srvsvc_NetShareSetInfo_state
*state
= tevent_req_data(
2864 req
, struct rpccli_srvsvc_NetShareSetInfo_state
);
2867 if (tevent_req_is_nterror(req
, &status
)) {
2868 tevent_req_received(req
);
2872 /* Steal possbile out parameters to the callers context */
2873 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2876 *result
= state
->orig
.out
.result
;
2878 tevent_req_received(req
);
2879 return NT_STATUS_OK
;
2882 NTSTATUS
rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client
*cli
,
2883 TALLOC_CTX
*mem_ctx
,
2884 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
2885 const char *share_name
/* [in] [charset(UTF16)] */,
2886 uint32_t level
/* [in] */,
2887 union srvsvc_NetShareInfo
*info
/* [in] [ref,switch_is(level)] */,
2888 uint32_t *parm_error
/* [in,out] [unique] */,
2891 struct srvsvc_NetShareSetInfo r
;
2895 r
.in
.server_unc
= server_unc
;
2896 r
.in
.share_name
= share_name
;
2899 r
.in
.parm_error
= parm_error
;
2901 status
= cli
->dispatch(cli
,
2904 NDR_SRVSVC_NETSHARESETINFO
,
2907 if (!NT_STATUS_IS_OK(status
)) {
2911 if (NT_STATUS_IS_ERR(status
)) {
2915 /* Return variables */
2916 if (parm_error
&& r
.out
.parm_error
) {
2917 *parm_error
= *r
.out
.parm_error
;
2922 *werror
= r
.out
.result
;
2925 return werror_to_ntstatus(r
.out
.result
);
2928 struct rpccli_srvsvc_NetShareDel_state
{
2929 struct srvsvc_NetShareDel orig
;
2930 struct srvsvc_NetShareDel tmp
;
2931 TALLOC_CTX
*out_mem_ctx
;
2932 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2935 static void rpccli_srvsvc_NetShareDel_done(struct tevent_req
*subreq
);
2937 struct tevent_req
*rpccli_srvsvc_NetShareDel_send(TALLOC_CTX
*mem_ctx
,
2938 struct tevent_context
*ev
,
2939 struct rpc_pipe_client
*cli
,
2940 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
2941 const char *_share_name
/* [in] [charset(UTF16)] */,
2942 uint32_t _reserved
/* [in] */)
2944 struct tevent_req
*req
;
2945 struct rpccli_srvsvc_NetShareDel_state
*state
;
2946 struct tevent_req
*subreq
;
2948 req
= tevent_req_create(mem_ctx
, &state
,
2949 struct rpccli_srvsvc_NetShareDel_state
);
2953 state
->out_mem_ctx
= NULL
;
2954 state
->dispatch_recv
= cli
->dispatch_recv
;
2957 state
->orig
.in
.server_unc
= _server_unc
;
2958 state
->orig
.in
.share_name
= _share_name
;
2959 state
->orig
.in
.reserved
= _reserved
;
2961 /* Out parameters */
2964 ZERO_STRUCT(state
->orig
.out
.result
);
2966 /* make a temporary copy, that we pass to the dispatch function */
2967 state
->tmp
= state
->orig
;
2969 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2971 NDR_SRVSVC_NETSHAREDEL
,
2973 if (tevent_req_nomem(subreq
, req
)) {
2974 return tevent_req_post(req
, ev
);
2976 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareDel_done
, req
);
2980 static void rpccli_srvsvc_NetShareDel_done(struct tevent_req
*subreq
)
2982 struct tevent_req
*req
= tevent_req_callback_data(
2983 subreq
, struct tevent_req
);
2984 struct rpccli_srvsvc_NetShareDel_state
*state
= tevent_req_data(
2985 req
, struct rpccli_srvsvc_NetShareDel_state
);
2987 TALLOC_CTX
*mem_ctx
;
2989 if (state
->out_mem_ctx
) {
2990 mem_ctx
= state
->out_mem_ctx
;
2995 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2996 TALLOC_FREE(subreq
);
2997 if (!NT_STATUS_IS_OK(status
)) {
2998 tevent_req_nterror(req
, status
);
3002 /* Copy out parameters */
3005 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3007 /* Reset temporary structure */
3008 ZERO_STRUCT(state
->tmp
);
3010 tevent_req_done(req
);
3013 NTSTATUS
rpccli_srvsvc_NetShareDel_recv(struct tevent_req
*req
,
3014 TALLOC_CTX
*mem_ctx
,
3017 struct rpccli_srvsvc_NetShareDel_state
*state
= tevent_req_data(
3018 req
, struct rpccli_srvsvc_NetShareDel_state
);
3021 if (tevent_req_is_nterror(req
, &status
)) {
3022 tevent_req_received(req
);
3026 /* Steal possbile out parameters to the callers context */
3027 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3030 *result
= state
->orig
.out
.result
;
3032 tevent_req_received(req
);
3033 return NT_STATUS_OK
;
3036 NTSTATUS
rpccli_srvsvc_NetShareDel(struct rpc_pipe_client
*cli
,
3037 TALLOC_CTX
*mem_ctx
,
3038 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
3039 const char *share_name
/* [in] [charset(UTF16)] */,
3040 uint32_t reserved
/* [in] */,
3043 struct srvsvc_NetShareDel r
;
3047 r
.in
.server_unc
= server_unc
;
3048 r
.in
.share_name
= share_name
;
3049 r
.in
.reserved
= reserved
;
3051 status
= cli
->dispatch(cli
,
3054 NDR_SRVSVC_NETSHAREDEL
,
3057 if (!NT_STATUS_IS_OK(status
)) {
3061 if (NT_STATUS_IS_ERR(status
)) {
3065 /* Return variables */
3069 *werror
= r
.out
.result
;
3072 return werror_to_ntstatus(r
.out
.result
);
3075 struct rpccli_srvsvc_NetShareDelSticky_state
{
3076 struct srvsvc_NetShareDelSticky orig
;
3077 struct srvsvc_NetShareDelSticky tmp
;
3078 TALLOC_CTX
*out_mem_ctx
;
3079 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3082 static void rpccli_srvsvc_NetShareDelSticky_done(struct tevent_req
*subreq
);
3084 struct tevent_req
*rpccli_srvsvc_NetShareDelSticky_send(TALLOC_CTX
*mem_ctx
,
3085 struct tevent_context
*ev
,
3086 struct rpc_pipe_client
*cli
,
3087 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
3088 const char *_share_name
/* [in] [charset(UTF16)] */,
3089 uint32_t _reserved
/* [in] */)
3091 struct tevent_req
*req
;
3092 struct rpccli_srvsvc_NetShareDelSticky_state
*state
;
3093 struct tevent_req
*subreq
;
3095 req
= tevent_req_create(mem_ctx
, &state
,
3096 struct rpccli_srvsvc_NetShareDelSticky_state
);
3100 state
->out_mem_ctx
= NULL
;
3101 state
->dispatch_recv
= cli
->dispatch_recv
;
3104 state
->orig
.in
.server_unc
= _server_unc
;
3105 state
->orig
.in
.share_name
= _share_name
;
3106 state
->orig
.in
.reserved
= _reserved
;
3108 /* Out parameters */
3111 ZERO_STRUCT(state
->orig
.out
.result
);
3113 /* make a temporary copy, that we pass to the dispatch function */
3114 state
->tmp
= state
->orig
;
3116 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3118 NDR_SRVSVC_NETSHAREDELSTICKY
,
3120 if (tevent_req_nomem(subreq
, req
)) {
3121 return tevent_req_post(req
, ev
);
3123 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareDelSticky_done
, req
);
3127 static void rpccli_srvsvc_NetShareDelSticky_done(struct tevent_req
*subreq
)
3129 struct tevent_req
*req
= tevent_req_callback_data(
3130 subreq
, struct tevent_req
);
3131 struct rpccli_srvsvc_NetShareDelSticky_state
*state
= tevent_req_data(
3132 req
, struct rpccli_srvsvc_NetShareDelSticky_state
);
3134 TALLOC_CTX
*mem_ctx
;
3136 if (state
->out_mem_ctx
) {
3137 mem_ctx
= state
->out_mem_ctx
;
3142 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3143 TALLOC_FREE(subreq
);
3144 if (!NT_STATUS_IS_OK(status
)) {
3145 tevent_req_nterror(req
, status
);
3149 /* Copy out parameters */
3152 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3154 /* Reset temporary structure */
3155 ZERO_STRUCT(state
->tmp
);
3157 tevent_req_done(req
);
3160 NTSTATUS
rpccli_srvsvc_NetShareDelSticky_recv(struct tevent_req
*req
,
3161 TALLOC_CTX
*mem_ctx
,
3164 struct rpccli_srvsvc_NetShareDelSticky_state
*state
= tevent_req_data(
3165 req
, struct rpccli_srvsvc_NetShareDelSticky_state
);
3168 if (tevent_req_is_nterror(req
, &status
)) {
3169 tevent_req_received(req
);
3173 /* Steal possbile out parameters to the callers context */
3174 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3177 *result
= state
->orig
.out
.result
;
3179 tevent_req_received(req
);
3180 return NT_STATUS_OK
;
3183 NTSTATUS
rpccli_srvsvc_NetShareDelSticky(struct rpc_pipe_client
*cli
,
3184 TALLOC_CTX
*mem_ctx
,
3185 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
3186 const char *share_name
/* [in] [charset(UTF16)] */,
3187 uint32_t reserved
/* [in] */,
3190 struct srvsvc_NetShareDelSticky r
;
3194 r
.in
.server_unc
= server_unc
;
3195 r
.in
.share_name
= share_name
;
3196 r
.in
.reserved
= reserved
;
3198 status
= cli
->dispatch(cli
,
3201 NDR_SRVSVC_NETSHAREDELSTICKY
,
3204 if (!NT_STATUS_IS_OK(status
)) {
3208 if (NT_STATUS_IS_ERR(status
)) {
3212 /* Return variables */
3216 *werror
= r
.out
.result
;
3219 return werror_to_ntstatus(r
.out
.result
);
3222 struct rpccli_srvsvc_NetShareCheck_state
{
3223 struct srvsvc_NetShareCheck orig
;
3224 struct srvsvc_NetShareCheck tmp
;
3225 TALLOC_CTX
*out_mem_ctx
;
3226 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3229 static void rpccli_srvsvc_NetShareCheck_done(struct tevent_req
*subreq
);
3231 struct tevent_req
*rpccli_srvsvc_NetShareCheck_send(TALLOC_CTX
*mem_ctx
,
3232 struct tevent_context
*ev
,
3233 struct rpc_pipe_client
*cli
,
3234 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
3235 const char *_device_name
/* [in] [charset(UTF16)] */,
3236 enum srvsvc_ShareType
*_type
/* [out] [ref] */)
3238 struct tevent_req
*req
;
3239 struct rpccli_srvsvc_NetShareCheck_state
*state
;
3240 struct tevent_req
*subreq
;
3242 req
= tevent_req_create(mem_ctx
, &state
,
3243 struct rpccli_srvsvc_NetShareCheck_state
);
3247 state
->out_mem_ctx
= NULL
;
3248 state
->dispatch_recv
= cli
->dispatch_recv
;
3251 state
->orig
.in
.server_unc
= _server_unc
;
3252 state
->orig
.in
.device_name
= _device_name
;
3254 /* Out parameters */
3255 state
->orig
.out
.type
= _type
;
3258 ZERO_STRUCT(state
->orig
.out
.result
);
3260 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3261 "rpccli_srvsvc_NetShareCheck_out_memory");
3262 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3263 return tevent_req_post(req
, ev
);
3266 /* make a temporary copy, that we pass to the dispatch function */
3267 state
->tmp
= state
->orig
;
3269 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3271 NDR_SRVSVC_NETSHARECHECK
,
3273 if (tevent_req_nomem(subreq
, req
)) {
3274 return tevent_req_post(req
, ev
);
3276 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareCheck_done
, req
);
3280 static void rpccli_srvsvc_NetShareCheck_done(struct tevent_req
*subreq
)
3282 struct tevent_req
*req
= tevent_req_callback_data(
3283 subreq
, struct tevent_req
);
3284 struct rpccli_srvsvc_NetShareCheck_state
*state
= tevent_req_data(
3285 req
, struct rpccli_srvsvc_NetShareCheck_state
);
3287 TALLOC_CTX
*mem_ctx
;
3289 if (state
->out_mem_ctx
) {
3290 mem_ctx
= state
->out_mem_ctx
;
3295 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3296 TALLOC_FREE(subreq
);
3297 if (!NT_STATUS_IS_OK(status
)) {
3298 tevent_req_nterror(req
, status
);
3302 /* Copy out parameters */
3303 *state
->orig
.out
.type
= *state
->tmp
.out
.type
;
3306 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3308 /* Reset temporary structure */
3309 ZERO_STRUCT(state
->tmp
);
3311 tevent_req_done(req
);
3314 NTSTATUS
rpccli_srvsvc_NetShareCheck_recv(struct tevent_req
*req
,
3315 TALLOC_CTX
*mem_ctx
,
3318 struct rpccli_srvsvc_NetShareCheck_state
*state
= tevent_req_data(
3319 req
, struct rpccli_srvsvc_NetShareCheck_state
);
3322 if (tevent_req_is_nterror(req
, &status
)) {
3323 tevent_req_received(req
);
3327 /* Steal possbile out parameters to the callers context */
3328 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3331 *result
= state
->orig
.out
.result
;
3333 tevent_req_received(req
);
3334 return NT_STATUS_OK
;
3337 NTSTATUS
rpccli_srvsvc_NetShareCheck(struct rpc_pipe_client
*cli
,
3338 TALLOC_CTX
*mem_ctx
,
3339 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
3340 const char *device_name
/* [in] [charset(UTF16)] */,
3341 enum srvsvc_ShareType
*type
/* [out] [ref] */,
3344 struct srvsvc_NetShareCheck r
;
3348 r
.in
.server_unc
= server_unc
;
3349 r
.in
.device_name
= device_name
;
3351 status
= cli
->dispatch(cli
,
3354 NDR_SRVSVC_NETSHARECHECK
,
3357 if (!NT_STATUS_IS_OK(status
)) {
3361 if (NT_STATUS_IS_ERR(status
)) {
3365 /* Return variables */
3366 *type
= *r
.out
.type
;
3370 *werror
= r
.out
.result
;
3373 return werror_to_ntstatus(r
.out
.result
);
3376 struct rpccli_srvsvc_NetSrvGetInfo_state
{
3377 struct srvsvc_NetSrvGetInfo orig
;
3378 struct srvsvc_NetSrvGetInfo tmp
;
3379 TALLOC_CTX
*out_mem_ctx
;
3380 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3383 static void rpccli_srvsvc_NetSrvGetInfo_done(struct tevent_req
*subreq
);
3385 struct tevent_req
*rpccli_srvsvc_NetSrvGetInfo_send(TALLOC_CTX
*mem_ctx
,
3386 struct tevent_context
*ev
,
3387 struct rpc_pipe_client
*cli
,
3388 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
3389 uint32_t _level
/* [in] */,
3390 union srvsvc_NetSrvInfo
*_info
/* [out] [ref,switch_is(level)] */)
3392 struct tevent_req
*req
;
3393 struct rpccli_srvsvc_NetSrvGetInfo_state
*state
;
3394 struct tevent_req
*subreq
;
3396 req
= tevent_req_create(mem_ctx
, &state
,
3397 struct rpccli_srvsvc_NetSrvGetInfo_state
);
3401 state
->out_mem_ctx
= NULL
;
3402 state
->dispatch_recv
= cli
->dispatch_recv
;
3405 state
->orig
.in
.server_unc
= _server_unc
;
3406 state
->orig
.in
.level
= _level
;
3408 /* Out parameters */
3409 state
->orig
.out
.info
= _info
;
3412 ZERO_STRUCT(state
->orig
.out
.result
);
3414 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3415 "rpccli_srvsvc_NetSrvGetInfo_out_memory");
3416 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3417 return tevent_req_post(req
, ev
);
3420 /* make a temporary copy, that we pass to the dispatch function */
3421 state
->tmp
= state
->orig
;
3423 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3425 NDR_SRVSVC_NETSRVGETINFO
,
3427 if (tevent_req_nomem(subreq
, req
)) {
3428 return tevent_req_post(req
, ev
);
3430 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetSrvGetInfo_done
, req
);
3434 static void rpccli_srvsvc_NetSrvGetInfo_done(struct tevent_req
*subreq
)
3436 struct tevent_req
*req
= tevent_req_callback_data(
3437 subreq
, struct tevent_req
);
3438 struct rpccli_srvsvc_NetSrvGetInfo_state
*state
= tevent_req_data(
3439 req
, struct rpccli_srvsvc_NetSrvGetInfo_state
);
3441 TALLOC_CTX
*mem_ctx
;
3443 if (state
->out_mem_ctx
) {
3444 mem_ctx
= state
->out_mem_ctx
;
3449 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3450 TALLOC_FREE(subreq
);
3451 if (!NT_STATUS_IS_OK(status
)) {
3452 tevent_req_nterror(req
, status
);
3456 /* Copy out parameters */
3457 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
3460 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3462 /* Reset temporary structure */
3463 ZERO_STRUCT(state
->tmp
);
3465 tevent_req_done(req
);
3468 NTSTATUS
rpccli_srvsvc_NetSrvGetInfo_recv(struct tevent_req
*req
,
3469 TALLOC_CTX
*mem_ctx
,
3472 struct rpccli_srvsvc_NetSrvGetInfo_state
*state
= tevent_req_data(
3473 req
, struct rpccli_srvsvc_NetSrvGetInfo_state
);
3476 if (tevent_req_is_nterror(req
, &status
)) {
3477 tevent_req_received(req
);
3481 /* Steal possbile out parameters to the callers context */
3482 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3485 *result
= state
->orig
.out
.result
;
3487 tevent_req_received(req
);
3488 return NT_STATUS_OK
;
3491 NTSTATUS
rpccli_srvsvc_NetSrvGetInfo(struct rpc_pipe_client
*cli
,
3492 TALLOC_CTX
*mem_ctx
,
3493 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
3494 uint32_t level
/* [in] */,
3495 union srvsvc_NetSrvInfo
*info
/* [out] [ref,switch_is(level)] */,
3498 struct srvsvc_NetSrvGetInfo r
;
3502 r
.in
.server_unc
= server_unc
;
3505 status
= cli
->dispatch(cli
,
3508 NDR_SRVSVC_NETSRVGETINFO
,
3511 if (!NT_STATUS_IS_OK(status
)) {
3515 if (NT_STATUS_IS_ERR(status
)) {
3519 /* Return variables */
3520 *info
= *r
.out
.info
;
3524 *werror
= r
.out
.result
;
3527 return werror_to_ntstatus(r
.out
.result
);
3530 struct rpccli_srvsvc_NetSrvSetInfo_state
{
3531 struct srvsvc_NetSrvSetInfo orig
;
3532 struct srvsvc_NetSrvSetInfo tmp
;
3533 TALLOC_CTX
*out_mem_ctx
;
3534 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3537 static void rpccli_srvsvc_NetSrvSetInfo_done(struct tevent_req
*subreq
);
3539 struct tevent_req
*rpccli_srvsvc_NetSrvSetInfo_send(TALLOC_CTX
*mem_ctx
,
3540 struct tevent_context
*ev
,
3541 struct rpc_pipe_client
*cli
,
3542 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
3543 uint32_t _level
/* [in] */,
3544 union srvsvc_NetSrvInfo
*_info
/* [in] [ref,switch_is(level)] */,
3545 uint32_t *_parm_error
/* [in,out] [unique] */)
3547 struct tevent_req
*req
;
3548 struct rpccli_srvsvc_NetSrvSetInfo_state
*state
;
3549 struct tevent_req
*subreq
;
3551 req
= tevent_req_create(mem_ctx
, &state
,
3552 struct rpccli_srvsvc_NetSrvSetInfo_state
);
3556 state
->out_mem_ctx
= NULL
;
3557 state
->dispatch_recv
= cli
->dispatch_recv
;
3560 state
->orig
.in
.server_unc
= _server_unc
;
3561 state
->orig
.in
.level
= _level
;
3562 state
->orig
.in
.info
= _info
;
3563 state
->orig
.in
.parm_error
= _parm_error
;
3565 /* Out parameters */
3566 state
->orig
.out
.parm_error
= _parm_error
;
3569 ZERO_STRUCT(state
->orig
.out
.result
);
3571 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3572 "rpccli_srvsvc_NetSrvSetInfo_out_memory");
3573 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3574 return tevent_req_post(req
, ev
);
3577 /* make a temporary copy, that we pass to the dispatch function */
3578 state
->tmp
= state
->orig
;
3580 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3582 NDR_SRVSVC_NETSRVSETINFO
,
3584 if (tevent_req_nomem(subreq
, req
)) {
3585 return tevent_req_post(req
, ev
);
3587 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetSrvSetInfo_done
, req
);
3591 static void rpccli_srvsvc_NetSrvSetInfo_done(struct tevent_req
*subreq
)
3593 struct tevent_req
*req
= tevent_req_callback_data(
3594 subreq
, struct tevent_req
);
3595 struct rpccli_srvsvc_NetSrvSetInfo_state
*state
= tevent_req_data(
3596 req
, struct rpccli_srvsvc_NetSrvSetInfo_state
);
3598 TALLOC_CTX
*mem_ctx
;
3600 if (state
->out_mem_ctx
) {
3601 mem_ctx
= state
->out_mem_ctx
;
3606 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3607 TALLOC_FREE(subreq
);
3608 if (!NT_STATUS_IS_OK(status
)) {
3609 tevent_req_nterror(req
, status
);
3613 /* Copy out parameters */
3614 if (state
->orig
.out
.parm_error
&& state
->tmp
.out
.parm_error
) {
3615 *state
->orig
.out
.parm_error
= *state
->tmp
.out
.parm_error
;
3619 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3621 /* Reset temporary structure */
3622 ZERO_STRUCT(state
->tmp
);
3624 tevent_req_done(req
);
3627 NTSTATUS
rpccli_srvsvc_NetSrvSetInfo_recv(struct tevent_req
*req
,
3628 TALLOC_CTX
*mem_ctx
,
3631 struct rpccli_srvsvc_NetSrvSetInfo_state
*state
= tevent_req_data(
3632 req
, struct rpccli_srvsvc_NetSrvSetInfo_state
);
3635 if (tevent_req_is_nterror(req
, &status
)) {
3636 tevent_req_received(req
);
3640 /* Steal possbile out parameters to the callers context */
3641 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3644 *result
= state
->orig
.out
.result
;
3646 tevent_req_received(req
);
3647 return NT_STATUS_OK
;
3650 NTSTATUS
rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client
*cli
,
3651 TALLOC_CTX
*mem_ctx
,
3652 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
3653 uint32_t level
/* [in] */,
3654 union srvsvc_NetSrvInfo
*info
/* [in] [ref,switch_is(level)] */,
3655 uint32_t *parm_error
/* [in,out] [unique] */,
3658 struct srvsvc_NetSrvSetInfo r
;
3662 r
.in
.server_unc
= server_unc
;
3665 r
.in
.parm_error
= parm_error
;
3667 status
= cli
->dispatch(cli
,
3670 NDR_SRVSVC_NETSRVSETINFO
,
3673 if (!NT_STATUS_IS_OK(status
)) {
3677 if (NT_STATUS_IS_ERR(status
)) {
3681 /* Return variables */
3682 if (parm_error
&& r
.out
.parm_error
) {
3683 *parm_error
= *r
.out
.parm_error
;
3688 *werror
= r
.out
.result
;
3691 return werror_to_ntstatus(r
.out
.result
);
3694 struct rpccli_srvsvc_NetDiskEnum_state
{
3695 struct srvsvc_NetDiskEnum orig
;
3696 struct srvsvc_NetDiskEnum tmp
;
3697 TALLOC_CTX
*out_mem_ctx
;
3698 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3701 static void rpccli_srvsvc_NetDiskEnum_done(struct tevent_req
*subreq
);
3703 struct tevent_req
*rpccli_srvsvc_NetDiskEnum_send(TALLOC_CTX
*mem_ctx
,
3704 struct tevent_context
*ev
,
3705 struct rpc_pipe_client
*cli
,
3706 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
3707 uint32_t _level
/* [in] */,
3708 struct srvsvc_NetDiskInfo
*_info
/* [in,out] [ref] */,
3709 uint32_t _maxlen
/* [in] */,
3710 uint32_t *_totalentries
/* [out] [ref] */,
3711 uint32_t *_resume_handle
/* [in,out] [unique] */)
3713 struct tevent_req
*req
;
3714 struct rpccli_srvsvc_NetDiskEnum_state
*state
;
3715 struct tevent_req
*subreq
;
3717 req
= tevent_req_create(mem_ctx
, &state
,
3718 struct rpccli_srvsvc_NetDiskEnum_state
);
3722 state
->out_mem_ctx
= NULL
;
3723 state
->dispatch_recv
= cli
->dispatch_recv
;
3726 state
->orig
.in
.server_unc
= _server_unc
;
3727 state
->orig
.in
.level
= _level
;
3728 state
->orig
.in
.info
= _info
;
3729 state
->orig
.in
.maxlen
= _maxlen
;
3730 state
->orig
.in
.resume_handle
= _resume_handle
;
3732 /* Out parameters */
3733 state
->orig
.out
.info
= _info
;
3734 state
->orig
.out
.totalentries
= _totalentries
;
3735 state
->orig
.out
.resume_handle
= _resume_handle
;
3738 ZERO_STRUCT(state
->orig
.out
.result
);
3740 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3741 "rpccli_srvsvc_NetDiskEnum_out_memory");
3742 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3743 return tevent_req_post(req
, ev
);
3746 /* make a temporary copy, that we pass to the dispatch function */
3747 state
->tmp
= state
->orig
;
3749 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3751 NDR_SRVSVC_NETDISKENUM
,
3753 if (tevent_req_nomem(subreq
, req
)) {
3754 return tevent_req_post(req
, ev
);
3756 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetDiskEnum_done
, req
);
3760 static void rpccli_srvsvc_NetDiskEnum_done(struct tevent_req
*subreq
)
3762 struct tevent_req
*req
= tevent_req_callback_data(
3763 subreq
, struct tevent_req
);
3764 struct rpccli_srvsvc_NetDiskEnum_state
*state
= tevent_req_data(
3765 req
, struct rpccli_srvsvc_NetDiskEnum_state
);
3767 TALLOC_CTX
*mem_ctx
;
3769 if (state
->out_mem_ctx
) {
3770 mem_ctx
= state
->out_mem_ctx
;
3775 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3776 TALLOC_FREE(subreq
);
3777 if (!NT_STATUS_IS_OK(status
)) {
3778 tevent_req_nterror(req
, status
);
3782 /* Copy out parameters */
3783 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
3784 *state
->orig
.out
.totalentries
= *state
->tmp
.out
.totalentries
;
3785 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
3786 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
3790 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3792 /* Reset temporary structure */
3793 ZERO_STRUCT(state
->tmp
);
3795 tevent_req_done(req
);
3798 NTSTATUS
rpccli_srvsvc_NetDiskEnum_recv(struct tevent_req
*req
,
3799 TALLOC_CTX
*mem_ctx
,
3802 struct rpccli_srvsvc_NetDiskEnum_state
*state
= tevent_req_data(
3803 req
, struct rpccli_srvsvc_NetDiskEnum_state
);
3806 if (tevent_req_is_nterror(req
, &status
)) {
3807 tevent_req_received(req
);
3811 /* Steal possbile out parameters to the callers context */
3812 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3815 *result
= state
->orig
.out
.result
;
3817 tevent_req_received(req
);
3818 return NT_STATUS_OK
;
3821 NTSTATUS
rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client
*cli
,
3822 TALLOC_CTX
*mem_ctx
,
3823 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
3824 uint32_t level
/* [in] */,
3825 struct srvsvc_NetDiskInfo
*info
/* [in,out] [ref] */,
3826 uint32_t maxlen
/* [in] */,
3827 uint32_t *totalentries
/* [out] [ref] */,
3828 uint32_t *resume_handle
/* [in,out] [unique] */,
3831 struct srvsvc_NetDiskEnum r
;
3835 r
.in
.server_unc
= server_unc
;
3838 r
.in
.maxlen
= maxlen
;
3839 r
.in
.resume_handle
= resume_handle
;
3841 status
= cli
->dispatch(cli
,
3844 NDR_SRVSVC_NETDISKENUM
,
3847 if (!NT_STATUS_IS_OK(status
)) {
3851 if (NT_STATUS_IS_ERR(status
)) {
3855 /* Return variables */
3856 *info
= *r
.out
.info
;
3857 *totalentries
= *r
.out
.totalentries
;
3858 if (resume_handle
&& r
.out
.resume_handle
) {
3859 *resume_handle
= *r
.out
.resume_handle
;
3864 *werror
= r
.out
.result
;
3867 return werror_to_ntstatus(r
.out
.result
);
3870 struct rpccli_srvsvc_NetServerStatisticsGet_state
{
3871 struct srvsvc_NetServerStatisticsGet orig
;
3872 struct srvsvc_NetServerStatisticsGet tmp
;
3873 TALLOC_CTX
*out_mem_ctx
;
3874 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3877 static void rpccli_srvsvc_NetServerStatisticsGet_done(struct tevent_req
*subreq
);
3879 struct tevent_req
*rpccli_srvsvc_NetServerStatisticsGet_send(TALLOC_CTX
*mem_ctx
,
3880 struct tevent_context
*ev
,
3881 struct rpc_pipe_client
*cli
,
3882 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
3883 const char *_service
/* [in] [unique,charset(UTF16)] */,
3884 uint32_t _level
/* [in] */,
3885 uint32_t _options
/* [in] */,
3886 struct srvsvc_Statistics
**_stats
/* [out] [ref] */)
3888 struct tevent_req
*req
;
3889 struct rpccli_srvsvc_NetServerStatisticsGet_state
*state
;
3890 struct tevent_req
*subreq
;
3892 req
= tevent_req_create(mem_ctx
, &state
,
3893 struct rpccli_srvsvc_NetServerStatisticsGet_state
);
3897 state
->out_mem_ctx
= NULL
;
3898 state
->dispatch_recv
= cli
->dispatch_recv
;
3901 state
->orig
.in
.server_unc
= _server_unc
;
3902 state
->orig
.in
.service
= _service
;
3903 state
->orig
.in
.level
= _level
;
3904 state
->orig
.in
.options
= _options
;
3906 /* Out parameters */
3907 state
->orig
.out
.stats
= _stats
;
3910 ZERO_STRUCT(state
->orig
.out
.result
);
3912 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3913 "rpccli_srvsvc_NetServerStatisticsGet_out_memory");
3914 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3915 return tevent_req_post(req
, ev
);
3918 /* make a temporary copy, that we pass to the dispatch function */
3919 state
->tmp
= state
->orig
;
3921 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3923 NDR_SRVSVC_NETSERVERSTATISTICSGET
,
3925 if (tevent_req_nomem(subreq
, req
)) {
3926 return tevent_req_post(req
, ev
);
3928 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetServerStatisticsGet_done
, req
);
3932 static void rpccli_srvsvc_NetServerStatisticsGet_done(struct tevent_req
*subreq
)
3934 struct tevent_req
*req
= tevent_req_callback_data(
3935 subreq
, struct tevent_req
);
3936 struct rpccli_srvsvc_NetServerStatisticsGet_state
*state
= tevent_req_data(
3937 req
, struct rpccli_srvsvc_NetServerStatisticsGet_state
);
3939 TALLOC_CTX
*mem_ctx
;
3941 if (state
->out_mem_ctx
) {
3942 mem_ctx
= state
->out_mem_ctx
;
3947 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3948 TALLOC_FREE(subreq
);
3949 if (!NT_STATUS_IS_OK(status
)) {
3950 tevent_req_nterror(req
, status
);
3954 /* Copy out parameters */
3955 *state
->orig
.out
.stats
= *state
->tmp
.out
.stats
;
3958 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3960 /* Reset temporary structure */
3961 ZERO_STRUCT(state
->tmp
);
3963 tevent_req_done(req
);
3966 NTSTATUS
rpccli_srvsvc_NetServerStatisticsGet_recv(struct tevent_req
*req
,
3967 TALLOC_CTX
*mem_ctx
,
3970 struct rpccli_srvsvc_NetServerStatisticsGet_state
*state
= tevent_req_data(
3971 req
, struct rpccli_srvsvc_NetServerStatisticsGet_state
);
3974 if (tevent_req_is_nterror(req
, &status
)) {
3975 tevent_req_received(req
);
3979 /* Steal possbile out parameters to the callers context */
3980 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3983 *result
= state
->orig
.out
.result
;
3985 tevent_req_received(req
);
3986 return NT_STATUS_OK
;
3989 NTSTATUS
rpccli_srvsvc_NetServerStatisticsGet(struct rpc_pipe_client
*cli
,
3990 TALLOC_CTX
*mem_ctx
,
3991 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
3992 const char *service
/* [in] [unique,charset(UTF16)] */,
3993 uint32_t level
/* [in] */,
3994 uint32_t options
/* [in] */,
3995 struct srvsvc_Statistics
**stats
/* [out] [ref] */,
3998 struct srvsvc_NetServerStatisticsGet r
;
4002 r
.in
.server_unc
= server_unc
;
4003 r
.in
.service
= service
;
4005 r
.in
.options
= options
;
4007 status
= cli
->dispatch(cli
,
4010 NDR_SRVSVC_NETSERVERSTATISTICSGET
,
4013 if (!NT_STATUS_IS_OK(status
)) {
4017 if (NT_STATUS_IS_ERR(status
)) {
4021 /* Return variables */
4022 *stats
= *r
.out
.stats
;
4026 *werror
= r
.out
.result
;
4029 return werror_to_ntstatus(r
.out
.result
);
4032 struct rpccli_srvsvc_NetTransportAdd_state
{
4033 struct srvsvc_NetTransportAdd orig
;
4034 struct srvsvc_NetTransportAdd tmp
;
4035 TALLOC_CTX
*out_mem_ctx
;
4036 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4039 static void rpccli_srvsvc_NetTransportAdd_done(struct tevent_req
*subreq
);
4041 struct tevent_req
*rpccli_srvsvc_NetTransportAdd_send(TALLOC_CTX
*mem_ctx
,
4042 struct tevent_context
*ev
,
4043 struct rpc_pipe_client
*cli
,
4044 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
4045 uint32_t _level
/* [in] */,
4046 union srvsvc_NetTransportInfo _info
/* [in] [switch_is(level)] */)
4048 struct tevent_req
*req
;
4049 struct rpccli_srvsvc_NetTransportAdd_state
*state
;
4050 struct tevent_req
*subreq
;
4052 req
= tevent_req_create(mem_ctx
, &state
,
4053 struct rpccli_srvsvc_NetTransportAdd_state
);
4057 state
->out_mem_ctx
= NULL
;
4058 state
->dispatch_recv
= cli
->dispatch_recv
;
4061 state
->orig
.in
.server_unc
= _server_unc
;
4062 state
->orig
.in
.level
= _level
;
4063 state
->orig
.in
.info
= _info
;
4065 /* Out parameters */
4068 ZERO_STRUCT(state
->orig
.out
.result
);
4070 /* make a temporary copy, that we pass to the dispatch function */
4071 state
->tmp
= state
->orig
;
4073 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4075 NDR_SRVSVC_NETTRANSPORTADD
,
4077 if (tevent_req_nomem(subreq
, req
)) {
4078 return tevent_req_post(req
, ev
);
4080 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetTransportAdd_done
, req
);
4084 static void rpccli_srvsvc_NetTransportAdd_done(struct tevent_req
*subreq
)
4086 struct tevent_req
*req
= tevent_req_callback_data(
4087 subreq
, struct tevent_req
);
4088 struct rpccli_srvsvc_NetTransportAdd_state
*state
= tevent_req_data(
4089 req
, struct rpccli_srvsvc_NetTransportAdd_state
);
4091 TALLOC_CTX
*mem_ctx
;
4093 if (state
->out_mem_ctx
) {
4094 mem_ctx
= state
->out_mem_ctx
;
4099 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4100 TALLOC_FREE(subreq
);
4101 if (!NT_STATUS_IS_OK(status
)) {
4102 tevent_req_nterror(req
, status
);
4106 /* Copy out parameters */
4109 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4111 /* Reset temporary structure */
4112 ZERO_STRUCT(state
->tmp
);
4114 tevent_req_done(req
);
4117 NTSTATUS
rpccli_srvsvc_NetTransportAdd_recv(struct tevent_req
*req
,
4118 TALLOC_CTX
*mem_ctx
,
4121 struct rpccli_srvsvc_NetTransportAdd_state
*state
= tevent_req_data(
4122 req
, struct rpccli_srvsvc_NetTransportAdd_state
);
4125 if (tevent_req_is_nterror(req
, &status
)) {
4126 tevent_req_received(req
);
4130 /* Steal possbile out parameters to the callers context */
4131 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4134 *result
= state
->orig
.out
.result
;
4136 tevent_req_received(req
);
4137 return NT_STATUS_OK
;
4140 NTSTATUS
rpccli_srvsvc_NetTransportAdd(struct rpc_pipe_client
*cli
,
4141 TALLOC_CTX
*mem_ctx
,
4142 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
4143 uint32_t level
/* [in] */,
4144 union srvsvc_NetTransportInfo info
/* [in] [switch_is(level)] */,
4147 struct srvsvc_NetTransportAdd r
;
4151 r
.in
.server_unc
= server_unc
;
4155 status
= cli
->dispatch(cli
,
4158 NDR_SRVSVC_NETTRANSPORTADD
,
4161 if (!NT_STATUS_IS_OK(status
)) {
4165 if (NT_STATUS_IS_ERR(status
)) {
4169 /* Return variables */
4173 *werror
= r
.out
.result
;
4176 return werror_to_ntstatus(r
.out
.result
);
4179 struct rpccli_srvsvc_NetTransportEnum_state
{
4180 struct srvsvc_NetTransportEnum orig
;
4181 struct srvsvc_NetTransportEnum tmp
;
4182 TALLOC_CTX
*out_mem_ctx
;
4183 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4186 static void rpccli_srvsvc_NetTransportEnum_done(struct tevent_req
*subreq
);
4188 struct tevent_req
*rpccli_srvsvc_NetTransportEnum_send(TALLOC_CTX
*mem_ctx
,
4189 struct tevent_context
*ev
,
4190 struct rpc_pipe_client
*cli
,
4191 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
4192 struct srvsvc_NetTransportInfoCtr
*_transports
/* [in,out] [ref] */,
4193 uint32_t _max_buffer
/* [in] */,
4194 uint32_t *_totalentries
/* [out] [ref] */,
4195 uint32_t *_resume_handle
/* [in,out] [unique] */)
4197 struct tevent_req
*req
;
4198 struct rpccli_srvsvc_NetTransportEnum_state
*state
;
4199 struct tevent_req
*subreq
;
4201 req
= tevent_req_create(mem_ctx
, &state
,
4202 struct rpccli_srvsvc_NetTransportEnum_state
);
4206 state
->out_mem_ctx
= NULL
;
4207 state
->dispatch_recv
= cli
->dispatch_recv
;
4210 state
->orig
.in
.server_unc
= _server_unc
;
4211 state
->orig
.in
.transports
= _transports
;
4212 state
->orig
.in
.max_buffer
= _max_buffer
;
4213 state
->orig
.in
.resume_handle
= _resume_handle
;
4215 /* Out parameters */
4216 state
->orig
.out
.transports
= _transports
;
4217 state
->orig
.out
.totalentries
= _totalentries
;
4218 state
->orig
.out
.resume_handle
= _resume_handle
;
4221 ZERO_STRUCT(state
->orig
.out
.result
);
4223 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4224 "rpccli_srvsvc_NetTransportEnum_out_memory");
4225 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4226 return tevent_req_post(req
, ev
);
4229 /* make a temporary copy, that we pass to the dispatch function */
4230 state
->tmp
= state
->orig
;
4232 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4234 NDR_SRVSVC_NETTRANSPORTENUM
,
4236 if (tevent_req_nomem(subreq
, req
)) {
4237 return tevent_req_post(req
, ev
);
4239 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetTransportEnum_done
, req
);
4243 static void rpccli_srvsvc_NetTransportEnum_done(struct tevent_req
*subreq
)
4245 struct tevent_req
*req
= tevent_req_callback_data(
4246 subreq
, struct tevent_req
);
4247 struct rpccli_srvsvc_NetTransportEnum_state
*state
= tevent_req_data(
4248 req
, struct rpccli_srvsvc_NetTransportEnum_state
);
4250 TALLOC_CTX
*mem_ctx
;
4252 if (state
->out_mem_ctx
) {
4253 mem_ctx
= state
->out_mem_ctx
;
4258 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4259 TALLOC_FREE(subreq
);
4260 if (!NT_STATUS_IS_OK(status
)) {
4261 tevent_req_nterror(req
, status
);
4265 /* Copy out parameters */
4266 *state
->orig
.out
.transports
= *state
->tmp
.out
.transports
;
4267 *state
->orig
.out
.totalentries
= *state
->tmp
.out
.totalentries
;
4268 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
4269 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
4273 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4275 /* Reset temporary structure */
4276 ZERO_STRUCT(state
->tmp
);
4278 tevent_req_done(req
);
4281 NTSTATUS
rpccli_srvsvc_NetTransportEnum_recv(struct tevent_req
*req
,
4282 TALLOC_CTX
*mem_ctx
,
4285 struct rpccli_srvsvc_NetTransportEnum_state
*state
= tevent_req_data(
4286 req
, struct rpccli_srvsvc_NetTransportEnum_state
);
4289 if (tevent_req_is_nterror(req
, &status
)) {
4290 tevent_req_received(req
);
4294 /* Steal possbile out parameters to the callers context */
4295 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4298 *result
= state
->orig
.out
.result
;
4300 tevent_req_received(req
);
4301 return NT_STATUS_OK
;
4304 NTSTATUS
rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client
*cli
,
4305 TALLOC_CTX
*mem_ctx
,
4306 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
4307 struct srvsvc_NetTransportInfoCtr
*transports
/* [in,out] [ref] */,
4308 uint32_t max_buffer
/* [in] */,
4309 uint32_t *totalentries
/* [out] [ref] */,
4310 uint32_t *resume_handle
/* [in,out] [unique] */,
4313 struct srvsvc_NetTransportEnum r
;
4317 r
.in
.server_unc
= server_unc
;
4318 r
.in
.transports
= transports
;
4319 r
.in
.max_buffer
= max_buffer
;
4320 r
.in
.resume_handle
= resume_handle
;
4322 status
= cli
->dispatch(cli
,
4325 NDR_SRVSVC_NETTRANSPORTENUM
,
4328 if (!NT_STATUS_IS_OK(status
)) {
4332 if (NT_STATUS_IS_ERR(status
)) {
4336 /* Return variables */
4337 *transports
= *r
.out
.transports
;
4338 *totalentries
= *r
.out
.totalentries
;
4339 if (resume_handle
&& r
.out
.resume_handle
) {
4340 *resume_handle
= *r
.out
.resume_handle
;
4345 *werror
= r
.out
.result
;
4348 return werror_to_ntstatus(r
.out
.result
);
4351 struct rpccli_srvsvc_NetTransportDel_state
{
4352 struct srvsvc_NetTransportDel orig
;
4353 struct srvsvc_NetTransportDel tmp
;
4354 TALLOC_CTX
*out_mem_ctx
;
4355 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4358 static void rpccli_srvsvc_NetTransportDel_done(struct tevent_req
*subreq
);
4360 struct tevent_req
*rpccli_srvsvc_NetTransportDel_send(TALLOC_CTX
*mem_ctx
,
4361 struct tevent_context
*ev
,
4362 struct rpc_pipe_client
*cli
,
4363 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
4364 uint32_t _level
/* [in] */,
4365 struct srvsvc_NetTransportInfo0
*_info0
/* [in] [ref] */)
4367 struct tevent_req
*req
;
4368 struct rpccli_srvsvc_NetTransportDel_state
*state
;
4369 struct tevent_req
*subreq
;
4371 req
= tevent_req_create(mem_ctx
, &state
,
4372 struct rpccli_srvsvc_NetTransportDel_state
);
4376 state
->out_mem_ctx
= NULL
;
4377 state
->dispatch_recv
= cli
->dispatch_recv
;
4380 state
->orig
.in
.server_unc
= _server_unc
;
4381 state
->orig
.in
.level
= _level
;
4382 state
->orig
.in
.info0
= _info0
;
4384 /* Out parameters */
4387 ZERO_STRUCT(state
->orig
.out
.result
);
4389 /* make a temporary copy, that we pass to the dispatch function */
4390 state
->tmp
= state
->orig
;
4392 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4394 NDR_SRVSVC_NETTRANSPORTDEL
,
4396 if (tevent_req_nomem(subreq
, req
)) {
4397 return tevent_req_post(req
, ev
);
4399 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetTransportDel_done
, req
);
4403 static void rpccli_srvsvc_NetTransportDel_done(struct tevent_req
*subreq
)
4405 struct tevent_req
*req
= tevent_req_callback_data(
4406 subreq
, struct tevent_req
);
4407 struct rpccli_srvsvc_NetTransportDel_state
*state
= tevent_req_data(
4408 req
, struct rpccli_srvsvc_NetTransportDel_state
);
4410 TALLOC_CTX
*mem_ctx
;
4412 if (state
->out_mem_ctx
) {
4413 mem_ctx
= state
->out_mem_ctx
;
4418 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4419 TALLOC_FREE(subreq
);
4420 if (!NT_STATUS_IS_OK(status
)) {
4421 tevent_req_nterror(req
, status
);
4425 /* Copy out parameters */
4428 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4430 /* Reset temporary structure */
4431 ZERO_STRUCT(state
->tmp
);
4433 tevent_req_done(req
);
4436 NTSTATUS
rpccli_srvsvc_NetTransportDel_recv(struct tevent_req
*req
,
4437 TALLOC_CTX
*mem_ctx
,
4440 struct rpccli_srvsvc_NetTransportDel_state
*state
= tevent_req_data(
4441 req
, struct rpccli_srvsvc_NetTransportDel_state
);
4444 if (tevent_req_is_nterror(req
, &status
)) {
4445 tevent_req_received(req
);
4449 /* Steal possbile out parameters to the callers context */
4450 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4453 *result
= state
->orig
.out
.result
;
4455 tevent_req_received(req
);
4456 return NT_STATUS_OK
;
4459 NTSTATUS
rpccli_srvsvc_NetTransportDel(struct rpc_pipe_client
*cli
,
4460 TALLOC_CTX
*mem_ctx
,
4461 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
4462 uint32_t level
/* [in] */,
4463 struct srvsvc_NetTransportInfo0
*info0
/* [in] [ref] */,
4466 struct srvsvc_NetTransportDel r
;
4470 r
.in
.server_unc
= server_unc
;
4474 status
= cli
->dispatch(cli
,
4477 NDR_SRVSVC_NETTRANSPORTDEL
,
4480 if (!NT_STATUS_IS_OK(status
)) {
4484 if (NT_STATUS_IS_ERR(status
)) {
4488 /* Return variables */
4492 *werror
= r
.out
.result
;
4495 return werror_to_ntstatus(r
.out
.result
);
4498 struct rpccli_srvsvc_NetRemoteTOD_state
{
4499 struct srvsvc_NetRemoteTOD orig
;
4500 struct srvsvc_NetRemoteTOD tmp
;
4501 TALLOC_CTX
*out_mem_ctx
;
4502 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4505 static void rpccli_srvsvc_NetRemoteTOD_done(struct tevent_req
*subreq
);
4507 struct tevent_req
*rpccli_srvsvc_NetRemoteTOD_send(TALLOC_CTX
*mem_ctx
,
4508 struct tevent_context
*ev
,
4509 struct rpc_pipe_client
*cli
,
4510 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
4511 struct srvsvc_NetRemoteTODInfo
**_info
/* [out] [ref] */)
4513 struct tevent_req
*req
;
4514 struct rpccli_srvsvc_NetRemoteTOD_state
*state
;
4515 struct tevent_req
*subreq
;
4517 req
= tevent_req_create(mem_ctx
, &state
,
4518 struct rpccli_srvsvc_NetRemoteTOD_state
);
4522 state
->out_mem_ctx
= NULL
;
4523 state
->dispatch_recv
= cli
->dispatch_recv
;
4526 state
->orig
.in
.server_unc
= _server_unc
;
4528 /* Out parameters */
4529 state
->orig
.out
.info
= _info
;
4532 ZERO_STRUCT(state
->orig
.out
.result
);
4534 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4535 "rpccli_srvsvc_NetRemoteTOD_out_memory");
4536 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4537 return tevent_req_post(req
, ev
);
4540 /* make a temporary copy, that we pass to the dispatch function */
4541 state
->tmp
= state
->orig
;
4543 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4545 NDR_SRVSVC_NETREMOTETOD
,
4547 if (tevent_req_nomem(subreq
, req
)) {
4548 return tevent_req_post(req
, ev
);
4550 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetRemoteTOD_done
, req
);
4554 static void rpccli_srvsvc_NetRemoteTOD_done(struct tevent_req
*subreq
)
4556 struct tevent_req
*req
= tevent_req_callback_data(
4557 subreq
, struct tevent_req
);
4558 struct rpccli_srvsvc_NetRemoteTOD_state
*state
= tevent_req_data(
4559 req
, struct rpccli_srvsvc_NetRemoteTOD_state
);
4561 TALLOC_CTX
*mem_ctx
;
4563 if (state
->out_mem_ctx
) {
4564 mem_ctx
= state
->out_mem_ctx
;
4569 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4570 TALLOC_FREE(subreq
);
4571 if (!NT_STATUS_IS_OK(status
)) {
4572 tevent_req_nterror(req
, status
);
4576 /* Copy out parameters */
4577 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
4580 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4582 /* Reset temporary structure */
4583 ZERO_STRUCT(state
->tmp
);
4585 tevent_req_done(req
);
4588 NTSTATUS
rpccli_srvsvc_NetRemoteTOD_recv(struct tevent_req
*req
,
4589 TALLOC_CTX
*mem_ctx
,
4592 struct rpccli_srvsvc_NetRemoteTOD_state
*state
= tevent_req_data(
4593 req
, struct rpccli_srvsvc_NetRemoteTOD_state
);
4596 if (tevent_req_is_nterror(req
, &status
)) {
4597 tevent_req_received(req
);
4601 /* Steal possbile out parameters to the callers context */
4602 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4605 *result
= state
->orig
.out
.result
;
4607 tevent_req_received(req
);
4608 return NT_STATUS_OK
;
4611 NTSTATUS
rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client
*cli
,
4612 TALLOC_CTX
*mem_ctx
,
4613 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
4614 struct srvsvc_NetRemoteTODInfo
**info
/* [out] [ref] */,
4617 struct srvsvc_NetRemoteTOD r
;
4621 r
.in
.server_unc
= server_unc
;
4623 status
= cli
->dispatch(cli
,
4626 NDR_SRVSVC_NETREMOTETOD
,
4629 if (!NT_STATUS_IS_OK(status
)) {
4633 if (NT_STATUS_IS_ERR(status
)) {
4637 /* Return variables */
4638 *info
= *r
.out
.info
;
4642 *werror
= r
.out
.result
;
4645 return werror_to_ntstatus(r
.out
.result
);
4648 struct rpccli_srvsvc_NetSetServiceBits_state
{
4649 struct srvsvc_NetSetServiceBits orig
;
4650 struct srvsvc_NetSetServiceBits tmp
;
4651 TALLOC_CTX
*out_mem_ctx
;
4652 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4655 static void rpccli_srvsvc_NetSetServiceBits_done(struct tevent_req
*subreq
);
4657 struct tevent_req
*rpccli_srvsvc_NetSetServiceBits_send(TALLOC_CTX
*mem_ctx
,
4658 struct tevent_context
*ev
,
4659 struct rpc_pipe_client
*cli
,
4660 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
4661 const char *_transport
/* [in] [unique,charset(UTF16)] */,
4662 uint32_t _servicebits
/* [in] */,
4663 uint32_t _updateimmediately
/* [in] */)
4665 struct tevent_req
*req
;
4666 struct rpccli_srvsvc_NetSetServiceBits_state
*state
;
4667 struct tevent_req
*subreq
;
4669 req
= tevent_req_create(mem_ctx
, &state
,
4670 struct rpccli_srvsvc_NetSetServiceBits_state
);
4674 state
->out_mem_ctx
= NULL
;
4675 state
->dispatch_recv
= cli
->dispatch_recv
;
4678 state
->orig
.in
.server_unc
= _server_unc
;
4679 state
->orig
.in
.transport
= _transport
;
4680 state
->orig
.in
.servicebits
= _servicebits
;
4681 state
->orig
.in
.updateimmediately
= _updateimmediately
;
4683 /* Out parameters */
4686 ZERO_STRUCT(state
->orig
.out
.result
);
4688 /* make a temporary copy, that we pass to the dispatch function */
4689 state
->tmp
= state
->orig
;
4691 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4693 NDR_SRVSVC_NETSETSERVICEBITS
,
4695 if (tevent_req_nomem(subreq
, req
)) {
4696 return tevent_req_post(req
, ev
);
4698 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetSetServiceBits_done
, req
);
4702 static void rpccli_srvsvc_NetSetServiceBits_done(struct tevent_req
*subreq
)
4704 struct tevent_req
*req
= tevent_req_callback_data(
4705 subreq
, struct tevent_req
);
4706 struct rpccli_srvsvc_NetSetServiceBits_state
*state
= tevent_req_data(
4707 req
, struct rpccli_srvsvc_NetSetServiceBits_state
);
4709 TALLOC_CTX
*mem_ctx
;
4711 if (state
->out_mem_ctx
) {
4712 mem_ctx
= state
->out_mem_ctx
;
4717 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4718 TALLOC_FREE(subreq
);
4719 if (!NT_STATUS_IS_OK(status
)) {
4720 tevent_req_nterror(req
, status
);
4724 /* Copy out parameters */
4727 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4729 /* Reset temporary structure */
4730 ZERO_STRUCT(state
->tmp
);
4732 tevent_req_done(req
);
4735 NTSTATUS
rpccli_srvsvc_NetSetServiceBits_recv(struct tevent_req
*req
,
4736 TALLOC_CTX
*mem_ctx
,
4739 struct rpccli_srvsvc_NetSetServiceBits_state
*state
= tevent_req_data(
4740 req
, struct rpccli_srvsvc_NetSetServiceBits_state
);
4743 if (tevent_req_is_nterror(req
, &status
)) {
4744 tevent_req_received(req
);
4748 /* Steal possbile out parameters to the callers context */
4749 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4752 *result
= state
->orig
.out
.result
;
4754 tevent_req_received(req
);
4755 return NT_STATUS_OK
;
4758 NTSTATUS
rpccli_srvsvc_NetSetServiceBits(struct rpc_pipe_client
*cli
,
4759 TALLOC_CTX
*mem_ctx
,
4760 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
4761 const char *transport
/* [in] [unique,charset(UTF16)] */,
4762 uint32_t servicebits
/* [in] */,
4763 uint32_t updateimmediately
/* [in] */,
4766 struct srvsvc_NetSetServiceBits r
;
4770 r
.in
.server_unc
= server_unc
;
4771 r
.in
.transport
= transport
;
4772 r
.in
.servicebits
= servicebits
;
4773 r
.in
.updateimmediately
= updateimmediately
;
4775 status
= cli
->dispatch(cli
,
4778 NDR_SRVSVC_NETSETSERVICEBITS
,
4781 if (!NT_STATUS_IS_OK(status
)) {
4785 if (NT_STATUS_IS_ERR(status
)) {
4789 /* Return variables */
4793 *werror
= r
.out
.result
;
4796 return werror_to_ntstatus(r
.out
.result
);
4799 struct rpccli_srvsvc_NetPathType_state
{
4800 struct srvsvc_NetPathType orig
;
4801 struct srvsvc_NetPathType tmp
;
4802 TALLOC_CTX
*out_mem_ctx
;
4803 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4806 static void rpccli_srvsvc_NetPathType_done(struct tevent_req
*subreq
);
4808 struct tevent_req
*rpccli_srvsvc_NetPathType_send(TALLOC_CTX
*mem_ctx
,
4809 struct tevent_context
*ev
,
4810 struct rpc_pipe_client
*cli
,
4811 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
4812 const char *_path
/* [in] [charset(UTF16)] */,
4813 uint32_t _pathflags
/* [in] */,
4814 uint32_t *_pathtype
/* [out] [ref] */)
4816 struct tevent_req
*req
;
4817 struct rpccli_srvsvc_NetPathType_state
*state
;
4818 struct tevent_req
*subreq
;
4820 req
= tevent_req_create(mem_ctx
, &state
,
4821 struct rpccli_srvsvc_NetPathType_state
);
4825 state
->out_mem_ctx
= NULL
;
4826 state
->dispatch_recv
= cli
->dispatch_recv
;
4829 state
->orig
.in
.server_unc
= _server_unc
;
4830 state
->orig
.in
.path
= _path
;
4831 state
->orig
.in
.pathflags
= _pathflags
;
4833 /* Out parameters */
4834 state
->orig
.out
.pathtype
= _pathtype
;
4837 ZERO_STRUCT(state
->orig
.out
.result
);
4839 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4840 "rpccli_srvsvc_NetPathType_out_memory");
4841 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4842 return tevent_req_post(req
, ev
);
4845 /* make a temporary copy, that we pass to the dispatch function */
4846 state
->tmp
= state
->orig
;
4848 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4850 NDR_SRVSVC_NETPATHTYPE
,
4852 if (tevent_req_nomem(subreq
, req
)) {
4853 return tevent_req_post(req
, ev
);
4855 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetPathType_done
, req
);
4859 static void rpccli_srvsvc_NetPathType_done(struct tevent_req
*subreq
)
4861 struct tevent_req
*req
= tevent_req_callback_data(
4862 subreq
, struct tevent_req
);
4863 struct rpccli_srvsvc_NetPathType_state
*state
= tevent_req_data(
4864 req
, struct rpccli_srvsvc_NetPathType_state
);
4866 TALLOC_CTX
*mem_ctx
;
4868 if (state
->out_mem_ctx
) {
4869 mem_ctx
= state
->out_mem_ctx
;
4874 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4875 TALLOC_FREE(subreq
);
4876 if (!NT_STATUS_IS_OK(status
)) {
4877 tevent_req_nterror(req
, status
);
4881 /* Copy out parameters */
4882 *state
->orig
.out
.pathtype
= *state
->tmp
.out
.pathtype
;
4885 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4887 /* Reset temporary structure */
4888 ZERO_STRUCT(state
->tmp
);
4890 tevent_req_done(req
);
4893 NTSTATUS
rpccli_srvsvc_NetPathType_recv(struct tevent_req
*req
,
4894 TALLOC_CTX
*mem_ctx
,
4897 struct rpccli_srvsvc_NetPathType_state
*state
= tevent_req_data(
4898 req
, struct rpccli_srvsvc_NetPathType_state
);
4901 if (tevent_req_is_nterror(req
, &status
)) {
4902 tevent_req_received(req
);
4906 /* Steal possbile out parameters to the callers context */
4907 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4910 *result
= state
->orig
.out
.result
;
4912 tevent_req_received(req
);
4913 return NT_STATUS_OK
;
4916 NTSTATUS
rpccli_srvsvc_NetPathType(struct rpc_pipe_client
*cli
,
4917 TALLOC_CTX
*mem_ctx
,
4918 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
4919 const char *path
/* [in] [charset(UTF16)] */,
4920 uint32_t pathflags
/* [in] */,
4921 uint32_t *pathtype
/* [out] [ref] */,
4924 struct srvsvc_NetPathType r
;
4928 r
.in
.server_unc
= server_unc
;
4930 r
.in
.pathflags
= pathflags
;
4932 status
= cli
->dispatch(cli
,
4935 NDR_SRVSVC_NETPATHTYPE
,
4938 if (!NT_STATUS_IS_OK(status
)) {
4942 if (NT_STATUS_IS_ERR(status
)) {
4946 /* Return variables */
4947 *pathtype
= *r
.out
.pathtype
;
4951 *werror
= r
.out
.result
;
4954 return werror_to_ntstatus(r
.out
.result
);
4957 struct rpccli_srvsvc_NetPathCanonicalize_state
{
4958 struct srvsvc_NetPathCanonicalize orig
;
4959 struct srvsvc_NetPathCanonicalize tmp
;
4960 TALLOC_CTX
*out_mem_ctx
;
4961 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4964 static void rpccli_srvsvc_NetPathCanonicalize_done(struct tevent_req
*subreq
);
4966 struct tevent_req
*rpccli_srvsvc_NetPathCanonicalize_send(TALLOC_CTX
*mem_ctx
,
4967 struct tevent_context
*ev
,
4968 struct rpc_pipe_client
*cli
,
4969 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
4970 const char *_path
/* [in] [charset(UTF16)] */,
4971 uint8_t *_can_path
/* [out] [size_is(maxbuf)] */,
4972 uint32_t _maxbuf
/* [in] */,
4973 const char *_prefix
/* [in] [charset(UTF16)] */,
4974 uint32_t *_pathtype
/* [in,out] [ref] */,
4975 uint32_t _pathflags
/* [in] */)
4977 struct tevent_req
*req
;
4978 struct rpccli_srvsvc_NetPathCanonicalize_state
*state
;
4979 struct tevent_req
*subreq
;
4981 req
= tevent_req_create(mem_ctx
, &state
,
4982 struct rpccli_srvsvc_NetPathCanonicalize_state
);
4986 state
->out_mem_ctx
= NULL
;
4987 state
->dispatch_recv
= cli
->dispatch_recv
;
4990 state
->orig
.in
.server_unc
= _server_unc
;
4991 state
->orig
.in
.path
= _path
;
4992 state
->orig
.in
.maxbuf
= _maxbuf
;
4993 state
->orig
.in
.prefix
= _prefix
;
4994 state
->orig
.in
.pathtype
= _pathtype
;
4995 state
->orig
.in
.pathflags
= _pathflags
;
4997 /* Out parameters */
4998 state
->orig
.out
.can_path
= _can_path
;
4999 state
->orig
.out
.pathtype
= _pathtype
;
5002 ZERO_STRUCT(state
->orig
.out
.result
);
5004 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5005 "rpccli_srvsvc_NetPathCanonicalize_out_memory");
5006 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5007 return tevent_req_post(req
, ev
);
5010 /* make a temporary copy, that we pass to the dispatch function */
5011 state
->tmp
= state
->orig
;
5013 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5015 NDR_SRVSVC_NETPATHCANONICALIZE
,
5017 if (tevent_req_nomem(subreq
, req
)) {
5018 return tevent_req_post(req
, ev
);
5020 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetPathCanonicalize_done
, req
);
5024 static void rpccli_srvsvc_NetPathCanonicalize_done(struct tevent_req
*subreq
)
5026 struct tevent_req
*req
= tevent_req_callback_data(
5027 subreq
, struct tevent_req
);
5028 struct rpccli_srvsvc_NetPathCanonicalize_state
*state
= tevent_req_data(
5029 req
, struct rpccli_srvsvc_NetPathCanonicalize_state
);
5031 TALLOC_CTX
*mem_ctx
;
5033 if (state
->out_mem_ctx
) {
5034 mem_ctx
= state
->out_mem_ctx
;
5039 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5040 TALLOC_FREE(subreq
);
5041 if (!NT_STATUS_IS_OK(status
)) {
5042 tevent_req_nterror(req
, status
);
5046 /* Copy out parameters */
5047 memcpy(state
->orig
.out
.can_path
, state
->tmp
.out
.can_path
, (state
->tmp
.in
.maxbuf
) * sizeof(*state
->orig
.out
.can_path
));
5048 *state
->orig
.out
.pathtype
= *state
->tmp
.out
.pathtype
;
5051 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5053 /* Reset temporary structure */
5054 ZERO_STRUCT(state
->tmp
);
5056 tevent_req_done(req
);
5059 NTSTATUS
rpccli_srvsvc_NetPathCanonicalize_recv(struct tevent_req
*req
,
5060 TALLOC_CTX
*mem_ctx
,
5063 struct rpccli_srvsvc_NetPathCanonicalize_state
*state
= tevent_req_data(
5064 req
, struct rpccli_srvsvc_NetPathCanonicalize_state
);
5067 if (tevent_req_is_nterror(req
, &status
)) {
5068 tevent_req_received(req
);
5072 /* Steal possbile out parameters to the callers context */
5073 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5076 *result
= state
->orig
.out
.result
;
5078 tevent_req_received(req
);
5079 return NT_STATUS_OK
;
5082 NTSTATUS
rpccli_srvsvc_NetPathCanonicalize(struct rpc_pipe_client
*cli
,
5083 TALLOC_CTX
*mem_ctx
,
5084 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
5085 const char *path
/* [in] [charset(UTF16)] */,
5086 uint8_t *can_path
/* [out] [size_is(maxbuf)] */,
5087 uint32_t maxbuf
/* [in] */,
5088 const char *prefix
/* [in] [charset(UTF16)] */,
5089 uint32_t *pathtype
/* [in,out] [ref] */,
5090 uint32_t pathflags
/* [in] */,
5093 struct srvsvc_NetPathCanonicalize r
;
5097 r
.in
.server_unc
= server_unc
;
5099 r
.in
.maxbuf
= maxbuf
;
5100 r
.in
.prefix
= prefix
;
5101 r
.in
.pathtype
= pathtype
;
5102 r
.in
.pathflags
= pathflags
;
5104 status
= cli
->dispatch(cli
,
5107 NDR_SRVSVC_NETPATHCANONICALIZE
,
5110 if (!NT_STATUS_IS_OK(status
)) {
5114 if (NT_STATUS_IS_ERR(status
)) {
5118 /* Return variables */
5119 memcpy(can_path
, r
.out
.can_path
, (r
.in
.maxbuf
) * sizeof(*can_path
));
5120 *pathtype
= *r
.out
.pathtype
;
5124 *werror
= r
.out
.result
;
5127 return werror_to_ntstatus(r
.out
.result
);
5130 struct rpccli_srvsvc_NetPathCompare_state
{
5131 struct srvsvc_NetPathCompare orig
;
5132 struct srvsvc_NetPathCompare tmp
;
5133 TALLOC_CTX
*out_mem_ctx
;
5134 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5137 static void rpccli_srvsvc_NetPathCompare_done(struct tevent_req
*subreq
);
5139 struct tevent_req
*rpccli_srvsvc_NetPathCompare_send(TALLOC_CTX
*mem_ctx
,
5140 struct tevent_context
*ev
,
5141 struct rpc_pipe_client
*cli
,
5142 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
5143 const char *_path1
/* [in] [charset(UTF16)] */,
5144 const char *_path2
/* [in] [charset(UTF16)] */,
5145 uint32_t _pathtype
/* [in] */,
5146 uint32_t _pathflags
/* [in] */)
5148 struct tevent_req
*req
;
5149 struct rpccli_srvsvc_NetPathCompare_state
*state
;
5150 struct tevent_req
*subreq
;
5152 req
= tevent_req_create(mem_ctx
, &state
,
5153 struct rpccli_srvsvc_NetPathCompare_state
);
5157 state
->out_mem_ctx
= NULL
;
5158 state
->dispatch_recv
= cli
->dispatch_recv
;
5161 state
->orig
.in
.server_unc
= _server_unc
;
5162 state
->orig
.in
.path1
= _path1
;
5163 state
->orig
.in
.path2
= _path2
;
5164 state
->orig
.in
.pathtype
= _pathtype
;
5165 state
->orig
.in
.pathflags
= _pathflags
;
5167 /* Out parameters */
5170 ZERO_STRUCT(state
->orig
.out
.result
);
5172 /* make a temporary copy, that we pass to the dispatch function */
5173 state
->tmp
= state
->orig
;
5175 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5177 NDR_SRVSVC_NETPATHCOMPARE
,
5179 if (tevent_req_nomem(subreq
, req
)) {
5180 return tevent_req_post(req
, ev
);
5182 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetPathCompare_done
, req
);
5186 static void rpccli_srvsvc_NetPathCompare_done(struct tevent_req
*subreq
)
5188 struct tevent_req
*req
= tevent_req_callback_data(
5189 subreq
, struct tevent_req
);
5190 struct rpccli_srvsvc_NetPathCompare_state
*state
= tevent_req_data(
5191 req
, struct rpccli_srvsvc_NetPathCompare_state
);
5193 TALLOC_CTX
*mem_ctx
;
5195 if (state
->out_mem_ctx
) {
5196 mem_ctx
= state
->out_mem_ctx
;
5201 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5202 TALLOC_FREE(subreq
);
5203 if (!NT_STATUS_IS_OK(status
)) {
5204 tevent_req_nterror(req
, status
);
5208 /* Copy out parameters */
5211 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5213 /* Reset temporary structure */
5214 ZERO_STRUCT(state
->tmp
);
5216 tevent_req_done(req
);
5219 NTSTATUS
rpccli_srvsvc_NetPathCompare_recv(struct tevent_req
*req
,
5220 TALLOC_CTX
*mem_ctx
,
5223 struct rpccli_srvsvc_NetPathCompare_state
*state
= tevent_req_data(
5224 req
, struct rpccli_srvsvc_NetPathCompare_state
);
5227 if (tevent_req_is_nterror(req
, &status
)) {
5228 tevent_req_received(req
);
5232 /* Steal possbile out parameters to the callers context */
5233 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5236 *result
= state
->orig
.out
.result
;
5238 tevent_req_received(req
);
5239 return NT_STATUS_OK
;
5242 NTSTATUS
rpccli_srvsvc_NetPathCompare(struct rpc_pipe_client
*cli
,
5243 TALLOC_CTX
*mem_ctx
,
5244 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
5245 const char *path1
/* [in] [charset(UTF16)] */,
5246 const char *path2
/* [in] [charset(UTF16)] */,
5247 uint32_t pathtype
/* [in] */,
5248 uint32_t pathflags
/* [in] */,
5251 struct srvsvc_NetPathCompare r
;
5255 r
.in
.server_unc
= server_unc
;
5258 r
.in
.pathtype
= pathtype
;
5259 r
.in
.pathflags
= pathflags
;
5261 status
= cli
->dispatch(cli
,
5264 NDR_SRVSVC_NETPATHCOMPARE
,
5267 if (!NT_STATUS_IS_OK(status
)) {
5271 if (NT_STATUS_IS_ERR(status
)) {
5275 /* Return variables */
5279 *werror
= r
.out
.result
;
5282 return werror_to_ntstatus(r
.out
.result
);
5285 struct rpccli_srvsvc_NetNameValidate_state
{
5286 struct srvsvc_NetNameValidate orig
;
5287 struct srvsvc_NetNameValidate tmp
;
5288 TALLOC_CTX
*out_mem_ctx
;
5289 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5292 static void rpccli_srvsvc_NetNameValidate_done(struct tevent_req
*subreq
);
5294 struct tevent_req
*rpccli_srvsvc_NetNameValidate_send(TALLOC_CTX
*mem_ctx
,
5295 struct tevent_context
*ev
,
5296 struct rpc_pipe_client
*cli
,
5297 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
5298 const char *_name
/* [in] [charset(UTF16)] */,
5299 uint32_t _name_type
/* [in] */,
5300 uint32_t _flags
/* [in] */)
5302 struct tevent_req
*req
;
5303 struct rpccli_srvsvc_NetNameValidate_state
*state
;
5304 struct tevent_req
*subreq
;
5306 req
= tevent_req_create(mem_ctx
, &state
,
5307 struct rpccli_srvsvc_NetNameValidate_state
);
5311 state
->out_mem_ctx
= NULL
;
5312 state
->dispatch_recv
= cli
->dispatch_recv
;
5315 state
->orig
.in
.server_unc
= _server_unc
;
5316 state
->orig
.in
.name
= _name
;
5317 state
->orig
.in
.name_type
= _name_type
;
5318 state
->orig
.in
.flags
= _flags
;
5320 /* Out parameters */
5323 ZERO_STRUCT(state
->orig
.out
.result
);
5325 /* make a temporary copy, that we pass to the dispatch function */
5326 state
->tmp
= state
->orig
;
5328 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5330 NDR_SRVSVC_NETNAMEVALIDATE
,
5332 if (tevent_req_nomem(subreq
, req
)) {
5333 return tevent_req_post(req
, ev
);
5335 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetNameValidate_done
, req
);
5339 static void rpccli_srvsvc_NetNameValidate_done(struct tevent_req
*subreq
)
5341 struct tevent_req
*req
= tevent_req_callback_data(
5342 subreq
, struct tevent_req
);
5343 struct rpccli_srvsvc_NetNameValidate_state
*state
= tevent_req_data(
5344 req
, struct rpccli_srvsvc_NetNameValidate_state
);
5346 TALLOC_CTX
*mem_ctx
;
5348 if (state
->out_mem_ctx
) {
5349 mem_ctx
= state
->out_mem_ctx
;
5354 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5355 TALLOC_FREE(subreq
);
5356 if (!NT_STATUS_IS_OK(status
)) {
5357 tevent_req_nterror(req
, status
);
5361 /* Copy out parameters */
5364 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5366 /* Reset temporary structure */
5367 ZERO_STRUCT(state
->tmp
);
5369 tevent_req_done(req
);
5372 NTSTATUS
rpccli_srvsvc_NetNameValidate_recv(struct tevent_req
*req
,
5373 TALLOC_CTX
*mem_ctx
,
5376 struct rpccli_srvsvc_NetNameValidate_state
*state
= tevent_req_data(
5377 req
, struct rpccli_srvsvc_NetNameValidate_state
);
5380 if (tevent_req_is_nterror(req
, &status
)) {
5381 tevent_req_received(req
);
5385 /* Steal possbile out parameters to the callers context */
5386 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5389 *result
= state
->orig
.out
.result
;
5391 tevent_req_received(req
);
5392 return NT_STATUS_OK
;
5395 NTSTATUS
rpccli_srvsvc_NetNameValidate(struct rpc_pipe_client
*cli
,
5396 TALLOC_CTX
*mem_ctx
,
5397 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
5398 const char *name
/* [in] [charset(UTF16)] */,
5399 uint32_t name_type
/* [in] */,
5400 uint32_t flags
/* [in] */,
5403 struct srvsvc_NetNameValidate r
;
5407 r
.in
.server_unc
= server_unc
;
5409 r
.in
.name_type
= name_type
;
5412 status
= cli
->dispatch(cli
,
5415 NDR_SRVSVC_NETNAMEVALIDATE
,
5418 if (!NT_STATUS_IS_OK(status
)) {
5422 if (NT_STATUS_IS_ERR(status
)) {
5426 /* Return variables */
5430 *werror
= r
.out
.result
;
5433 return werror_to_ntstatus(r
.out
.result
);
5436 struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state
{
5437 struct srvsvc_NETRPRNAMECANONICALIZE orig
;
5438 struct srvsvc_NETRPRNAMECANONICALIZE tmp
;
5439 TALLOC_CTX
*out_mem_ctx
;
5440 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5443 static void rpccli_srvsvc_NETRPRNAMECANONICALIZE_done(struct tevent_req
*subreq
);
5445 struct tevent_req
*rpccli_srvsvc_NETRPRNAMECANONICALIZE_send(TALLOC_CTX
*mem_ctx
,
5446 struct tevent_context
*ev
,
5447 struct rpc_pipe_client
*cli
)
5449 struct tevent_req
*req
;
5450 struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state
*state
;
5451 struct tevent_req
*subreq
;
5453 req
= tevent_req_create(mem_ctx
, &state
,
5454 struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state
);
5458 state
->out_mem_ctx
= NULL
;
5459 state
->dispatch_recv
= cli
->dispatch_recv
;
5463 /* Out parameters */
5466 ZERO_STRUCT(state
->orig
.out
.result
);
5468 /* make a temporary copy, that we pass to the dispatch function */
5469 state
->tmp
= state
->orig
;
5471 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5473 NDR_SRVSVC_NETRPRNAMECANONICALIZE
,
5475 if (tevent_req_nomem(subreq
, req
)) {
5476 return tevent_req_post(req
, ev
);
5478 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRPRNAMECANONICALIZE_done
, req
);
5482 static void rpccli_srvsvc_NETRPRNAMECANONICALIZE_done(struct tevent_req
*subreq
)
5484 struct tevent_req
*req
= tevent_req_callback_data(
5485 subreq
, struct tevent_req
);
5486 struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state
*state
= tevent_req_data(
5487 req
, struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state
);
5489 TALLOC_CTX
*mem_ctx
;
5491 if (state
->out_mem_ctx
) {
5492 mem_ctx
= state
->out_mem_ctx
;
5497 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5498 TALLOC_FREE(subreq
);
5499 if (!NT_STATUS_IS_OK(status
)) {
5500 tevent_req_nterror(req
, status
);
5504 /* Copy out parameters */
5507 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5509 /* Reset temporary structure */
5510 ZERO_STRUCT(state
->tmp
);
5512 tevent_req_done(req
);
5515 NTSTATUS
rpccli_srvsvc_NETRPRNAMECANONICALIZE_recv(struct tevent_req
*req
,
5516 TALLOC_CTX
*mem_ctx
,
5519 struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state
*state
= tevent_req_data(
5520 req
, struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state
);
5523 if (tevent_req_is_nterror(req
, &status
)) {
5524 tevent_req_received(req
);
5528 /* Steal possbile out parameters to the callers context */
5529 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5532 *result
= state
->orig
.out
.result
;
5534 tevent_req_received(req
);
5535 return NT_STATUS_OK
;
5538 NTSTATUS
rpccli_srvsvc_NETRPRNAMECANONICALIZE(struct rpc_pipe_client
*cli
,
5539 TALLOC_CTX
*mem_ctx
,
5542 struct srvsvc_NETRPRNAMECANONICALIZE r
;
5547 status
= cli
->dispatch(cli
,
5550 NDR_SRVSVC_NETRPRNAMECANONICALIZE
,
5553 if (!NT_STATUS_IS_OK(status
)) {
5557 if (NT_STATUS_IS_ERR(status
)) {
5561 /* Return variables */
5565 *werror
= r
.out
.result
;
5568 return werror_to_ntstatus(r
.out
.result
);
5571 struct rpccli_srvsvc_NetPRNameCompare_state
{
5572 struct srvsvc_NetPRNameCompare orig
;
5573 struct srvsvc_NetPRNameCompare tmp
;
5574 TALLOC_CTX
*out_mem_ctx
;
5575 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5578 static void rpccli_srvsvc_NetPRNameCompare_done(struct tevent_req
*subreq
);
5580 struct tevent_req
*rpccli_srvsvc_NetPRNameCompare_send(TALLOC_CTX
*mem_ctx
,
5581 struct tevent_context
*ev
,
5582 struct rpc_pipe_client
*cli
,
5583 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
5584 const char *_name1
/* [in] [charset(UTF16)] */,
5585 const char *_name2
/* [in] [charset(UTF16)] */,
5586 uint32_t _name_type
/* [in] */,
5587 uint32_t _flags
/* [in] */)
5589 struct tevent_req
*req
;
5590 struct rpccli_srvsvc_NetPRNameCompare_state
*state
;
5591 struct tevent_req
*subreq
;
5593 req
= tevent_req_create(mem_ctx
, &state
,
5594 struct rpccli_srvsvc_NetPRNameCompare_state
);
5598 state
->out_mem_ctx
= NULL
;
5599 state
->dispatch_recv
= cli
->dispatch_recv
;
5602 state
->orig
.in
.server_unc
= _server_unc
;
5603 state
->orig
.in
.name1
= _name1
;
5604 state
->orig
.in
.name2
= _name2
;
5605 state
->orig
.in
.name_type
= _name_type
;
5606 state
->orig
.in
.flags
= _flags
;
5608 /* Out parameters */
5611 ZERO_STRUCT(state
->orig
.out
.result
);
5613 /* make a temporary copy, that we pass to the dispatch function */
5614 state
->tmp
= state
->orig
;
5616 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5618 NDR_SRVSVC_NETPRNAMECOMPARE
,
5620 if (tevent_req_nomem(subreq
, req
)) {
5621 return tevent_req_post(req
, ev
);
5623 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetPRNameCompare_done
, req
);
5627 static void rpccli_srvsvc_NetPRNameCompare_done(struct tevent_req
*subreq
)
5629 struct tevent_req
*req
= tevent_req_callback_data(
5630 subreq
, struct tevent_req
);
5631 struct rpccli_srvsvc_NetPRNameCompare_state
*state
= tevent_req_data(
5632 req
, struct rpccli_srvsvc_NetPRNameCompare_state
);
5634 TALLOC_CTX
*mem_ctx
;
5636 if (state
->out_mem_ctx
) {
5637 mem_ctx
= state
->out_mem_ctx
;
5642 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5643 TALLOC_FREE(subreq
);
5644 if (!NT_STATUS_IS_OK(status
)) {
5645 tevent_req_nterror(req
, status
);
5649 /* Copy out parameters */
5652 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5654 /* Reset temporary structure */
5655 ZERO_STRUCT(state
->tmp
);
5657 tevent_req_done(req
);
5660 NTSTATUS
rpccli_srvsvc_NetPRNameCompare_recv(struct tevent_req
*req
,
5661 TALLOC_CTX
*mem_ctx
,
5664 struct rpccli_srvsvc_NetPRNameCompare_state
*state
= tevent_req_data(
5665 req
, struct rpccli_srvsvc_NetPRNameCompare_state
);
5668 if (tevent_req_is_nterror(req
, &status
)) {
5669 tevent_req_received(req
);
5673 /* Steal possbile out parameters to the callers context */
5674 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5677 *result
= state
->orig
.out
.result
;
5679 tevent_req_received(req
);
5680 return NT_STATUS_OK
;
5683 NTSTATUS
rpccli_srvsvc_NetPRNameCompare(struct rpc_pipe_client
*cli
,
5684 TALLOC_CTX
*mem_ctx
,
5685 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
5686 const char *name1
/* [in] [charset(UTF16)] */,
5687 const char *name2
/* [in] [charset(UTF16)] */,
5688 uint32_t name_type
/* [in] */,
5689 uint32_t flags
/* [in] */,
5692 struct srvsvc_NetPRNameCompare r
;
5696 r
.in
.server_unc
= server_unc
;
5699 r
.in
.name_type
= name_type
;
5702 status
= cli
->dispatch(cli
,
5705 NDR_SRVSVC_NETPRNAMECOMPARE
,
5708 if (!NT_STATUS_IS_OK(status
)) {
5712 if (NT_STATUS_IS_ERR(status
)) {
5716 /* Return variables */
5720 *werror
= r
.out
.result
;
5723 return werror_to_ntstatus(r
.out
.result
);
5726 struct rpccli_srvsvc_NetShareEnum_state
{
5727 struct srvsvc_NetShareEnum orig
;
5728 struct srvsvc_NetShareEnum tmp
;
5729 TALLOC_CTX
*out_mem_ctx
;
5730 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5733 static void rpccli_srvsvc_NetShareEnum_done(struct tevent_req
*subreq
);
5735 struct tevent_req
*rpccli_srvsvc_NetShareEnum_send(TALLOC_CTX
*mem_ctx
,
5736 struct tevent_context
*ev
,
5737 struct rpc_pipe_client
*cli
,
5738 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
5739 struct srvsvc_NetShareInfoCtr
*_info_ctr
/* [in,out] [ref] */,
5740 uint32_t _max_buffer
/* [in] */,
5741 uint32_t *_totalentries
/* [out] [ref] */,
5742 uint32_t *_resume_handle
/* [in,out] [unique] */)
5744 struct tevent_req
*req
;
5745 struct rpccli_srvsvc_NetShareEnum_state
*state
;
5746 struct tevent_req
*subreq
;
5748 req
= tevent_req_create(mem_ctx
, &state
,
5749 struct rpccli_srvsvc_NetShareEnum_state
);
5753 state
->out_mem_ctx
= NULL
;
5754 state
->dispatch_recv
= cli
->dispatch_recv
;
5757 state
->orig
.in
.server_unc
= _server_unc
;
5758 state
->orig
.in
.info_ctr
= _info_ctr
;
5759 state
->orig
.in
.max_buffer
= _max_buffer
;
5760 state
->orig
.in
.resume_handle
= _resume_handle
;
5762 /* Out parameters */
5763 state
->orig
.out
.info_ctr
= _info_ctr
;
5764 state
->orig
.out
.totalentries
= _totalentries
;
5765 state
->orig
.out
.resume_handle
= _resume_handle
;
5768 ZERO_STRUCT(state
->orig
.out
.result
);
5770 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5771 "rpccli_srvsvc_NetShareEnum_out_memory");
5772 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5773 return tevent_req_post(req
, ev
);
5776 /* make a temporary copy, that we pass to the dispatch function */
5777 state
->tmp
= state
->orig
;
5779 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5781 NDR_SRVSVC_NETSHAREENUM
,
5783 if (tevent_req_nomem(subreq
, req
)) {
5784 return tevent_req_post(req
, ev
);
5786 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareEnum_done
, req
);
5790 static void rpccli_srvsvc_NetShareEnum_done(struct tevent_req
*subreq
)
5792 struct tevent_req
*req
= tevent_req_callback_data(
5793 subreq
, struct tevent_req
);
5794 struct rpccli_srvsvc_NetShareEnum_state
*state
= tevent_req_data(
5795 req
, struct rpccli_srvsvc_NetShareEnum_state
);
5797 TALLOC_CTX
*mem_ctx
;
5799 if (state
->out_mem_ctx
) {
5800 mem_ctx
= state
->out_mem_ctx
;
5805 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5806 TALLOC_FREE(subreq
);
5807 if (!NT_STATUS_IS_OK(status
)) {
5808 tevent_req_nterror(req
, status
);
5812 /* Copy out parameters */
5813 *state
->orig
.out
.info_ctr
= *state
->tmp
.out
.info_ctr
;
5814 *state
->orig
.out
.totalentries
= *state
->tmp
.out
.totalentries
;
5815 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
5816 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
5820 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5822 /* Reset temporary structure */
5823 ZERO_STRUCT(state
->tmp
);
5825 tevent_req_done(req
);
5828 NTSTATUS
rpccli_srvsvc_NetShareEnum_recv(struct tevent_req
*req
,
5829 TALLOC_CTX
*mem_ctx
,
5832 struct rpccli_srvsvc_NetShareEnum_state
*state
= tevent_req_data(
5833 req
, struct rpccli_srvsvc_NetShareEnum_state
);
5836 if (tevent_req_is_nterror(req
, &status
)) {
5837 tevent_req_received(req
);
5841 /* Steal possbile out parameters to the callers context */
5842 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5845 *result
= state
->orig
.out
.result
;
5847 tevent_req_received(req
);
5848 return NT_STATUS_OK
;
5851 NTSTATUS
rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client
*cli
,
5852 TALLOC_CTX
*mem_ctx
,
5853 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
5854 struct srvsvc_NetShareInfoCtr
*info_ctr
/* [in,out] [ref] */,
5855 uint32_t max_buffer
/* [in] */,
5856 uint32_t *totalentries
/* [out] [ref] */,
5857 uint32_t *resume_handle
/* [in,out] [unique] */,
5860 struct srvsvc_NetShareEnum r
;
5864 r
.in
.server_unc
= server_unc
;
5865 r
.in
.info_ctr
= info_ctr
;
5866 r
.in
.max_buffer
= max_buffer
;
5867 r
.in
.resume_handle
= resume_handle
;
5869 status
= cli
->dispatch(cli
,
5872 NDR_SRVSVC_NETSHAREENUM
,
5875 if (!NT_STATUS_IS_OK(status
)) {
5879 if (NT_STATUS_IS_ERR(status
)) {
5883 /* Return variables */
5884 *info_ctr
= *r
.out
.info_ctr
;
5885 *totalentries
= *r
.out
.totalentries
;
5886 if (resume_handle
&& r
.out
.resume_handle
) {
5887 *resume_handle
= *r
.out
.resume_handle
;
5892 *werror
= r
.out
.result
;
5895 return werror_to_ntstatus(r
.out
.result
);
5898 struct rpccli_srvsvc_NetShareDelStart_state
{
5899 struct srvsvc_NetShareDelStart orig
;
5900 struct srvsvc_NetShareDelStart tmp
;
5901 TALLOC_CTX
*out_mem_ctx
;
5902 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5905 static void rpccli_srvsvc_NetShareDelStart_done(struct tevent_req
*subreq
);
5907 struct tevent_req
*rpccli_srvsvc_NetShareDelStart_send(TALLOC_CTX
*mem_ctx
,
5908 struct tevent_context
*ev
,
5909 struct rpc_pipe_client
*cli
,
5910 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
5911 const char *_share
/* [in] [charset(UTF16)] */,
5912 uint32_t _reserved
/* [in] */,
5913 struct policy_handle
*_hnd
/* [out] [unique] */)
5915 struct tevent_req
*req
;
5916 struct rpccli_srvsvc_NetShareDelStart_state
*state
;
5917 struct tevent_req
*subreq
;
5919 req
= tevent_req_create(mem_ctx
, &state
,
5920 struct rpccli_srvsvc_NetShareDelStart_state
);
5924 state
->out_mem_ctx
= NULL
;
5925 state
->dispatch_recv
= cli
->dispatch_recv
;
5928 state
->orig
.in
.server_unc
= _server_unc
;
5929 state
->orig
.in
.share
= _share
;
5930 state
->orig
.in
.reserved
= _reserved
;
5932 /* Out parameters */
5933 state
->orig
.out
.hnd
= _hnd
;
5936 ZERO_STRUCT(state
->orig
.out
.result
);
5938 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5939 "rpccli_srvsvc_NetShareDelStart_out_memory");
5940 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5941 return tevent_req_post(req
, ev
);
5944 /* make a temporary copy, that we pass to the dispatch function */
5945 state
->tmp
= state
->orig
;
5947 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5949 NDR_SRVSVC_NETSHAREDELSTART
,
5951 if (tevent_req_nomem(subreq
, req
)) {
5952 return tevent_req_post(req
, ev
);
5954 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareDelStart_done
, req
);
5958 static void rpccli_srvsvc_NetShareDelStart_done(struct tevent_req
*subreq
)
5960 struct tevent_req
*req
= tevent_req_callback_data(
5961 subreq
, struct tevent_req
);
5962 struct rpccli_srvsvc_NetShareDelStart_state
*state
= tevent_req_data(
5963 req
, struct rpccli_srvsvc_NetShareDelStart_state
);
5965 TALLOC_CTX
*mem_ctx
;
5967 if (state
->out_mem_ctx
) {
5968 mem_ctx
= state
->out_mem_ctx
;
5973 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5974 TALLOC_FREE(subreq
);
5975 if (!NT_STATUS_IS_OK(status
)) {
5976 tevent_req_nterror(req
, status
);
5980 /* Copy out parameters */
5981 if (state
->orig
.out
.hnd
&& state
->tmp
.out
.hnd
) {
5982 *state
->orig
.out
.hnd
= *state
->tmp
.out
.hnd
;
5986 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5988 /* Reset temporary structure */
5989 ZERO_STRUCT(state
->tmp
);
5991 tevent_req_done(req
);
5994 NTSTATUS
rpccli_srvsvc_NetShareDelStart_recv(struct tevent_req
*req
,
5995 TALLOC_CTX
*mem_ctx
,
5998 struct rpccli_srvsvc_NetShareDelStart_state
*state
= tevent_req_data(
5999 req
, struct rpccli_srvsvc_NetShareDelStart_state
);
6002 if (tevent_req_is_nterror(req
, &status
)) {
6003 tevent_req_received(req
);
6007 /* Steal possbile out parameters to the callers context */
6008 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6011 *result
= state
->orig
.out
.result
;
6013 tevent_req_received(req
);
6014 return NT_STATUS_OK
;
6017 NTSTATUS
rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client
*cli
,
6018 TALLOC_CTX
*mem_ctx
,
6019 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
6020 const char *share
/* [in] [charset(UTF16)] */,
6021 uint32_t reserved
/* [in] */,
6022 struct policy_handle
*hnd
/* [out] [unique] */,
6025 struct srvsvc_NetShareDelStart r
;
6029 r
.in
.server_unc
= server_unc
;
6031 r
.in
.reserved
= reserved
;
6033 status
= cli
->dispatch(cli
,
6036 NDR_SRVSVC_NETSHAREDELSTART
,
6039 if (!NT_STATUS_IS_OK(status
)) {
6043 if (NT_STATUS_IS_ERR(status
)) {
6047 /* Return variables */
6048 if (hnd
&& r
.out
.hnd
) {
6054 *werror
= r
.out
.result
;
6057 return werror_to_ntstatus(r
.out
.result
);
6060 struct rpccli_srvsvc_NetShareDelCommit_state
{
6061 struct srvsvc_NetShareDelCommit orig
;
6062 struct srvsvc_NetShareDelCommit tmp
;
6063 TALLOC_CTX
*out_mem_ctx
;
6064 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6067 static void rpccli_srvsvc_NetShareDelCommit_done(struct tevent_req
*subreq
);
6069 struct tevent_req
*rpccli_srvsvc_NetShareDelCommit_send(TALLOC_CTX
*mem_ctx
,
6070 struct tevent_context
*ev
,
6071 struct rpc_pipe_client
*cli
,
6072 struct policy_handle
*_hnd
/* [in,out] [unique] */)
6074 struct tevent_req
*req
;
6075 struct rpccli_srvsvc_NetShareDelCommit_state
*state
;
6076 struct tevent_req
*subreq
;
6078 req
= tevent_req_create(mem_ctx
, &state
,
6079 struct rpccli_srvsvc_NetShareDelCommit_state
);
6083 state
->out_mem_ctx
= NULL
;
6084 state
->dispatch_recv
= cli
->dispatch_recv
;
6087 state
->orig
.in
.hnd
= _hnd
;
6089 /* Out parameters */
6090 state
->orig
.out
.hnd
= _hnd
;
6093 ZERO_STRUCT(state
->orig
.out
.result
);
6095 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6096 "rpccli_srvsvc_NetShareDelCommit_out_memory");
6097 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6098 return tevent_req_post(req
, ev
);
6101 /* make a temporary copy, that we pass to the dispatch function */
6102 state
->tmp
= state
->orig
;
6104 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6106 NDR_SRVSVC_NETSHAREDELCOMMIT
,
6108 if (tevent_req_nomem(subreq
, req
)) {
6109 return tevent_req_post(req
, ev
);
6111 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetShareDelCommit_done
, req
);
6115 static void rpccli_srvsvc_NetShareDelCommit_done(struct tevent_req
*subreq
)
6117 struct tevent_req
*req
= tevent_req_callback_data(
6118 subreq
, struct tevent_req
);
6119 struct rpccli_srvsvc_NetShareDelCommit_state
*state
= tevent_req_data(
6120 req
, struct rpccli_srvsvc_NetShareDelCommit_state
);
6122 TALLOC_CTX
*mem_ctx
;
6124 if (state
->out_mem_ctx
) {
6125 mem_ctx
= state
->out_mem_ctx
;
6130 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6131 TALLOC_FREE(subreq
);
6132 if (!NT_STATUS_IS_OK(status
)) {
6133 tevent_req_nterror(req
, status
);
6137 /* Copy out parameters */
6138 if (state
->orig
.out
.hnd
&& state
->tmp
.out
.hnd
) {
6139 *state
->orig
.out
.hnd
= *state
->tmp
.out
.hnd
;
6143 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6145 /* Reset temporary structure */
6146 ZERO_STRUCT(state
->tmp
);
6148 tevent_req_done(req
);
6151 NTSTATUS
rpccli_srvsvc_NetShareDelCommit_recv(struct tevent_req
*req
,
6152 TALLOC_CTX
*mem_ctx
,
6155 struct rpccli_srvsvc_NetShareDelCommit_state
*state
= tevent_req_data(
6156 req
, struct rpccli_srvsvc_NetShareDelCommit_state
);
6159 if (tevent_req_is_nterror(req
, &status
)) {
6160 tevent_req_received(req
);
6164 /* Steal possbile out parameters to the callers context */
6165 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6168 *result
= state
->orig
.out
.result
;
6170 tevent_req_received(req
);
6171 return NT_STATUS_OK
;
6174 NTSTATUS
rpccli_srvsvc_NetShareDelCommit(struct rpc_pipe_client
*cli
,
6175 TALLOC_CTX
*mem_ctx
,
6176 struct policy_handle
*hnd
/* [in,out] [unique] */,
6179 struct srvsvc_NetShareDelCommit r
;
6185 status
= cli
->dispatch(cli
,
6188 NDR_SRVSVC_NETSHAREDELCOMMIT
,
6191 if (!NT_STATUS_IS_OK(status
)) {
6195 if (NT_STATUS_IS_ERR(status
)) {
6199 /* Return variables */
6200 if (hnd
&& r
.out
.hnd
) {
6206 *werror
= r
.out
.result
;
6209 return werror_to_ntstatus(r
.out
.result
);
6212 struct rpccli_srvsvc_NetGetFileSecurity_state
{
6213 struct srvsvc_NetGetFileSecurity orig
;
6214 struct srvsvc_NetGetFileSecurity tmp
;
6215 TALLOC_CTX
*out_mem_ctx
;
6216 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6219 static void rpccli_srvsvc_NetGetFileSecurity_done(struct tevent_req
*subreq
);
6221 struct tevent_req
*rpccli_srvsvc_NetGetFileSecurity_send(TALLOC_CTX
*mem_ctx
,
6222 struct tevent_context
*ev
,
6223 struct rpc_pipe_client
*cli
,
6224 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
6225 const char *_share
/* [in] [unique,charset(UTF16)] */,
6226 const char *_file
/* [in] [charset(UTF16)] */,
6227 uint32_t _securityinformation
/* [in] */,
6228 struct sec_desc_buf
**_sd_buf
/* [out] [ref] */)
6230 struct tevent_req
*req
;
6231 struct rpccli_srvsvc_NetGetFileSecurity_state
*state
;
6232 struct tevent_req
*subreq
;
6234 req
= tevent_req_create(mem_ctx
, &state
,
6235 struct rpccli_srvsvc_NetGetFileSecurity_state
);
6239 state
->out_mem_ctx
= NULL
;
6240 state
->dispatch_recv
= cli
->dispatch_recv
;
6243 state
->orig
.in
.server_unc
= _server_unc
;
6244 state
->orig
.in
.share
= _share
;
6245 state
->orig
.in
.file
= _file
;
6246 state
->orig
.in
.securityinformation
= _securityinformation
;
6248 /* Out parameters */
6249 state
->orig
.out
.sd_buf
= _sd_buf
;
6252 ZERO_STRUCT(state
->orig
.out
.result
);
6254 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6255 "rpccli_srvsvc_NetGetFileSecurity_out_memory");
6256 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6257 return tevent_req_post(req
, ev
);
6260 /* make a temporary copy, that we pass to the dispatch function */
6261 state
->tmp
= state
->orig
;
6263 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6265 NDR_SRVSVC_NETGETFILESECURITY
,
6267 if (tevent_req_nomem(subreq
, req
)) {
6268 return tevent_req_post(req
, ev
);
6270 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetGetFileSecurity_done
, req
);
6274 static void rpccli_srvsvc_NetGetFileSecurity_done(struct tevent_req
*subreq
)
6276 struct tevent_req
*req
= tevent_req_callback_data(
6277 subreq
, struct tevent_req
);
6278 struct rpccli_srvsvc_NetGetFileSecurity_state
*state
= tevent_req_data(
6279 req
, struct rpccli_srvsvc_NetGetFileSecurity_state
);
6281 TALLOC_CTX
*mem_ctx
;
6283 if (state
->out_mem_ctx
) {
6284 mem_ctx
= state
->out_mem_ctx
;
6289 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6290 TALLOC_FREE(subreq
);
6291 if (!NT_STATUS_IS_OK(status
)) {
6292 tevent_req_nterror(req
, status
);
6296 /* Copy out parameters */
6297 *state
->orig
.out
.sd_buf
= *state
->tmp
.out
.sd_buf
;
6300 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6302 /* Reset temporary structure */
6303 ZERO_STRUCT(state
->tmp
);
6305 tevent_req_done(req
);
6308 NTSTATUS
rpccli_srvsvc_NetGetFileSecurity_recv(struct tevent_req
*req
,
6309 TALLOC_CTX
*mem_ctx
,
6312 struct rpccli_srvsvc_NetGetFileSecurity_state
*state
= tevent_req_data(
6313 req
, struct rpccli_srvsvc_NetGetFileSecurity_state
);
6316 if (tevent_req_is_nterror(req
, &status
)) {
6317 tevent_req_received(req
);
6321 /* Steal possbile out parameters to the callers context */
6322 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6325 *result
= state
->orig
.out
.result
;
6327 tevent_req_received(req
);
6328 return NT_STATUS_OK
;
6331 NTSTATUS
rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client
*cli
,
6332 TALLOC_CTX
*mem_ctx
,
6333 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
6334 const char *share
/* [in] [unique,charset(UTF16)] */,
6335 const char *file
/* [in] [charset(UTF16)] */,
6336 uint32_t securityinformation
/* [in] */,
6337 struct sec_desc_buf
**sd_buf
/* [out] [ref] */,
6340 struct srvsvc_NetGetFileSecurity r
;
6344 r
.in
.server_unc
= server_unc
;
6347 r
.in
.securityinformation
= securityinformation
;
6349 status
= cli
->dispatch(cli
,
6352 NDR_SRVSVC_NETGETFILESECURITY
,
6355 if (!NT_STATUS_IS_OK(status
)) {
6359 if (NT_STATUS_IS_ERR(status
)) {
6363 /* Return variables */
6364 *sd_buf
= *r
.out
.sd_buf
;
6368 *werror
= r
.out
.result
;
6371 return werror_to_ntstatus(r
.out
.result
);
6374 struct rpccli_srvsvc_NetSetFileSecurity_state
{
6375 struct srvsvc_NetSetFileSecurity orig
;
6376 struct srvsvc_NetSetFileSecurity tmp
;
6377 TALLOC_CTX
*out_mem_ctx
;
6378 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6381 static void rpccli_srvsvc_NetSetFileSecurity_done(struct tevent_req
*subreq
);
6383 struct tevent_req
*rpccli_srvsvc_NetSetFileSecurity_send(TALLOC_CTX
*mem_ctx
,
6384 struct tevent_context
*ev
,
6385 struct rpc_pipe_client
*cli
,
6386 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
6387 const char *_share
/* [in] [unique,charset(UTF16)] */,
6388 const char *_file
/* [in] [charset(UTF16)] */,
6389 uint32_t _securityinformation
/* [in] */,
6390 struct sec_desc_buf
*_sd_buf
/* [in] [ref] */)
6392 struct tevent_req
*req
;
6393 struct rpccli_srvsvc_NetSetFileSecurity_state
*state
;
6394 struct tevent_req
*subreq
;
6396 req
= tevent_req_create(mem_ctx
, &state
,
6397 struct rpccli_srvsvc_NetSetFileSecurity_state
);
6401 state
->out_mem_ctx
= NULL
;
6402 state
->dispatch_recv
= cli
->dispatch_recv
;
6405 state
->orig
.in
.server_unc
= _server_unc
;
6406 state
->orig
.in
.share
= _share
;
6407 state
->orig
.in
.file
= _file
;
6408 state
->orig
.in
.securityinformation
= _securityinformation
;
6409 state
->orig
.in
.sd_buf
= _sd_buf
;
6411 /* Out parameters */
6414 ZERO_STRUCT(state
->orig
.out
.result
);
6416 /* make a temporary copy, that we pass to the dispatch function */
6417 state
->tmp
= state
->orig
;
6419 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6421 NDR_SRVSVC_NETSETFILESECURITY
,
6423 if (tevent_req_nomem(subreq
, req
)) {
6424 return tevent_req_post(req
, ev
);
6426 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetSetFileSecurity_done
, req
);
6430 static void rpccli_srvsvc_NetSetFileSecurity_done(struct tevent_req
*subreq
)
6432 struct tevent_req
*req
= tevent_req_callback_data(
6433 subreq
, struct tevent_req
);
6434 struct rpccli_srvsvc_NetSetFileSecurity_state
*state
= tevent_req_data(
6435 req
, struct rpccli_srvsvc_NetSetFileSecurity_state
);
6437 TALLOC_CTX
*mem_ctx
;
6439 if (state
->out_mem_ctx
) {
6440 mem_ctx
= state
->out_mem_ctx
;
6445 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6446 TALLOC_FREE(subreq
);
6447 if (!NT_STATUS_IS_OK(status
)) {
6448 tevent_req_nterror(req
, status
);
6452 /* Copy out parameters */
6455 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6457 /* Reset temporary structure */
6458 ZERO_STRUCT(state
->tmp
);
6460 tevent_req_done(req
);
6463 NTSTATUS
rpccli_srvsvc_NetSetFileSecurity_recv(struct tevent_req
*req
,
6464 TALLOC_CTX
*mem_ctx
,
6467 struct rpccli_srvsvc_NetSetFileSecurity_state
*state
= tevent_req_data(
6468 req
, struct rpccli_srvsvc_NetSetFileSecurity_state
);
6471 if (tevent_req_is_nterror(req
, &status
)) {
6472 tevent_req_received(req
);
6476 /* Steal possbile out parameters to the callers context */
6477 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6480 *result
= state
->orig
.out
.result
;
6482 tevent_req_received(req
);
6483 return NT_STATUS_OK
;
6486 NTSTATUS
rpccli_srvsvc_NetSetFileSecurity(struct rpc_pipe_client
*cli
,
6487 TALLOC_CTX
*mem_ctx
,
6488 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
6489 const char *share
/* [in] [unique,charset(UTF16)] */,
6490 const char *file
/* [in] [charset(UTF16)] */,
6491 uint32_t securityinformation
/* [in] */,
6492 struct sec_desc_buf
*sd_buf
/* [in] [ref] */,
6495 struct srvsvc_NetSetFileSecurity r
;
6499 r
.in
.server_unc
= server_unc
;
6502 r
.in
.securityinformation
= securityinformation
;
6503 r
.in
.sd_buf
= sd_buf
;
6505 status
= cli
->dispatch(cli
,
6508 NDR_SRVSVC_NETSETFILESECURITY
,
6511 if (!NT_STATUS_IS_OK(status
)) {
6515 if (NT_STATUS_IS_ERR(status
)) {
6519 /* Return variables */
6523 *werror
= r
.out
.result
;
6526 return werror_to_ntstatus(r
.out
.result
);
6529 struct rpccli_srvsvc_NetServerTransportAddEx_state
{
6530 struct srvsvc_NetServerTransportAddEx orig
;
6531 struct srvsvc_NetServerTransportAddEx tmp
;
6532 TALLOC_CTX
*out_mem_ctx
;
6533 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6536 static void rpccli_srvsvc_NetServerTransportAddEx_done(struct tevent_req
*subreq
);
6538 struct tevent_req
*rpccli_srvsvc_NetServerTransportAddEx_send(TALLOC_CTX
*mem_ctx
,
6539 struct tevent_context
*ev
,
6540 struct rpc_pipe_client
*cli
,
6541 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
6542 uint32_t _level
/* [in] */,
6543 union srvsvc_NetTransportInfo _info
/* [in] [switch_is(level)] */)
6545 struct tevent_req
*req
;
6546 struct rpccli_srvsvc_NetServerTransportAddEx_state
*state
;
6547 struct tevent_req
*subreq
;
6549 req
= tevent_req_create(mem_ctx
, &state
,
6550 struct rpccli_srvsvc_NetServerTransportAddEx_state
);
6554 state
->out_mem_ctx
= NULL
;
6555 state
->dispatch_recv
= cli
->dispatch_recv
;
6558 state
->orig
.in
.server_unc
= _server_unc
;
6559 state
->orig
.in
.level
= _level
;
6560 state
->orig
.in
.info
= _info
;
6562 /* Out parameters */
6565 ZERO_STRUCT(state
->orig
.out
.result
);
6567 /* make a temporary copy, that we pass to the dispatch function */
6568 state
->tmp
= state
->orig
;
6570 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6572 NDR_SRVSVC_NETSERVERTRANSPORTADDEX
,
6574 if (tevent_req_nomem(subreq
, req
)) {
6575 return tevent_req_post(req
, ev
);
6577 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetServerTransportAddEx_done
, req
);
6581 static void rpccli_srvsvc_NetServerTransportAddEx_done(struct tevent_req
*subreq
)
6583 struct tevent_req
*req
= tevent_req_callback_data(
6584 subreq
, struct tevent_req
);
6585 struct rpccli_srvsvc_NetServerTransportAddEx_state
*state
= tevent_req_data(
6586 req
, struct rpccli_srvsvc_NetServerTransportAddEx_state
);
6588 TALLOC_CTX
*mem_ctx
;
6590 if (state
->out_mem_ctx
) {
6591 mem_ctx
= state
->out_mem_ctx
;
6596 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6597 TALLOC_FREE(subreq
);
6598 if (!NT_STATUS_IS_OK(status
)) {
6599 tevent_req_nterror(req
, status
);
6603 /* Copy out parameters */
6606 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6608 /* Reset temporary structure */
6609 ZERO_STRUCT(state
->tmp
);
6611 tevent_req_done(req
);
6614 NTSTATUS
rpccli_srvsvc_NetServerTransportAddEx_recv(struct tevent_req
*req
,
6615 TALLOC_CTX
*mem_ctx
,
6618 struct rpccli_srvsvc_NetServerTransportAddEx_state
*state
= tevent_req_data(
6619 req
, struct rpccli_srvsvc_NetServerTransportAddEx_state
);
6622 if (tevent_req_is_nterror(req
, &status
)) {
6623 tevent_req_received(req
);
6627 /* Steal possbile out parameters to the callers context */
6628 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6631 *result
= state
->orig
.out
.result
;
6633 tevent_req_received(req
);
6634 return NT_STATUS_OK
;
6637 NTSTATUS
rpccli_srvsvc_NetServerTransportAddEx(struct rpc_pipe_client
*cli
,
6638 TALLOC_CTX
*mem_ctx
,
6639 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
6640 uint32_t level
/* [in] */,
6641 union srvsvc_NetTransportInfo info
/* [in] [switch_is(level)] */,
6644 struct srvsvc_NetServerTransportAddEx r
;
6648 r
.in
.server_unc
= server_unc
;
6652 status
= cli
->dispatch(cli
,
6655 NDR_SRVSVC_NETSERVERTRANSPORTADDEX
,
6658 if (!NT_STATUS_IS_OK(status
)) {
6662 if (NT_STATUS_IS_ERR(status
)) {
6666 /* Return variables */
6670 *werror
= r
.out
.result
;
6673 return werror_to_ntstatus(r
.out
.result
);
6676 struct rpccli_srvsvc_NetServerSetServiceBitsEx_state
{
6677 struct srvsvc_NetServerSetServiceBitsEx orig
;
6678 struct srvsvc_NetServerSetServiceBitsEx tmp
;
6679 TALLOC_CTX
*out_mem_ctx
;
6680 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6683 static void rpccli_srvsvc_NetServerSetServiceBitsEx_done(struct tevent_req
*subreq
);
6685 struct tevent_req
*rpccli_srvsvc_NetServerSetServiceBitsEx_send(TALLOC_CTX
*mem_ctx
,
6686 struct tevent_context
*ev
,
6687 struct rpc_pipe_client
*cli
,
6688 const char *_server_unc
/* [in] [unique,charset(UTF16)] */,
6689 const char *_emulated_server_unc
/* [in] [unique,charset(UTF16)] */,
6690 const char *_transport
/* [in] [unique,charset(UTF16)] */,
6691 uint32_t _servicebitsofinterest
/* [in] */,
6692 uint32_t _servicebits
/* [in] */,
6693 uint32_t _updateimmediately
/* [in] */)
6695 struct tevent_req
*req
;
6696 struct rpccli_srvsvc_NetServerSetServiceBitsEx_state
*state
;
6697 struct tevent_req
*subreq
;
6699 req
= tevent_req_create(mem_ctx
, &state
,
6700 struct rpccli_srvsvc_NetServerSetServiceBitsEx_state
);
6704 state
->out_mem_ctx
= NULL
;
6705 state
->dispatch_recv
= cli
->dispatch_recv
;
6708 state
->orig
.in
.server_unc
= _server_unc
;
6709 state
->orig
.in
.emulated_server_unc
= _emulated_server_unc
;
6710 state
->orig
.in
.transport
= _transport
;
6711 state
->orig
.in
.servicebitsofinterest
= _servicebitsofinterest
;
6712 state
->orig
.in
.servicebits
= _servicebits
;
6713 state
->orig
.in
.updateimmediately
= _updateimmediately
;
6715 /* Out parameters */
6718 ZERO_STRUCT(state
->orig
.out
.result
);
6720 /* make a temporary copy, that we pass to the dispatch function */
6721 state
->tmp
= state
->orig
;
6723 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6725 NDR_SRVSVC_NETSERVERSETSERVICEBITSEX
,
6727 if (tevent_req_nomem(subreq
, req
)) {
6728 return tevent_req_post(req
, ev
);
6730 tevent_req_set_callback(subreq
, rpccli_srvsvc_NetServerSetServiceBitsEx_done
, req
);
6734 static void rpccli_srvsvc_NetServerSetServiceBitsEx_done(struct tevent_req
*subreq
)
6736 struct tevent_req
*req
= tevent_req_callback_data(
6737 subreq
, struct tevent_req
);
6738 struct rpccli_srvsvc_NetServerSetServiceBitsEx_state
*state
= tevent_req_data(
6739 req
, struct rpccli_srvsvc_NetServerSetServiceBitsEx_state
);
6741 TALLOC_CTX
*mem_ctx
;
6743 if (state
->out_mem_ctx
) {
6744 mem_ctx
= state
->out_mem_ctx
;
6749 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6750 TALLOC_FREE(subreq
);
6751 if (!NT_STATUS_IS_OK(status
)) {
6752 tevent_req_nterror(req
, status
);
6756 /* Copy out parameters */
6759 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6761 /* Reset temporary structure */
6762 ZERO_STRUCT(state
->tmp
);
6764 tevent_req_done(req
);
6767 NTSTATUS
rpccli_srvsvc_NetServerSetServiceBitsEx_recv(struct tevent_req
*req
,
6768 TALLOC_CTX
*mem_ctx
,
6771 struct rpccli_srvsvc_NetServerSetServiceBitsEx_state
*state
= tevent_req_data(
6772 req
, struct rpccli_srvsvc_NetServerSetServiceBitsEx_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_NetServerSetServiceBitsEx(struct rpc_pipe_client
*cli
,
6791 TALLOC_CTX
*mem_ctx
,
6792 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
6793 const char *emulated_server_unc
/* [in] [unique,charset(UTF16)] */,
6794 const char *transport
/* [in] [unique,charset(UTF16)] */,
6795 uint32_t servicebitsofinterest
/* [in] */,
6796 uint32_t servicebits
/* [in] */,
6797 uint32_t updateimmediately
/* [in] */,
6800 struct srvsvc_NetServerSetServiceBitsEx r
;
6804 r
.in
.server_unc
= server_unc
;
6805 r
.in
.emulated_server_unc
= emulated_server_unc
;
6806 r
.in
.transport
= transport
;
6807 r
.in
.servicebitsofinterest
= servicebitsofinterest
;
6808 r
.in
.servicebits
= servicebits
;
6809 r
.in
.updateimmediately
= updateimmediately
;
6811 status
= cli
->dispatch(cli
,
6814 NDR_SRVSVC_NETSERVERSETSERVICEBITSEX
,
6817 if (!NT_STATUS_IS_OK(status
)) {
6821 if (NT_STATUS_IS_ERR(status
)) {
6825 /* Return variables */
6829 *werror
= r
.out
.result
;
6832 return werror_to_ntstatus(r
.out
.result
);
6835 struct rpccli_srvsvc_NETRDFSGETVERSION_state
{
6836 struct srvsvc_NETRDFSGETVERSION orig
;
6837 struct srvsvc_NETRDFSGETVERSION tmp
;
6838 TALLOC_CTX
*out_mem_ctx
;
6839 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6842 static void rpccli_srvsvc_NETRDFSGETVERSION_done(struct tevent_req
*subreq
);
6844 struct tevent_req
*rpccli_srvsvc_NETRDFSGETVERSION_send(TALLOC_CTX
*mem_ctx
,
6845 struct tevent_context
*ev
,
6846 struct rpc_pipe_client
*cli
)
6848 struct tevent_req
*req
;
6849 struct rpccli_srvsvc_NETRDFSGETVERSION_state
*state
;
6850 struct tevent_req
*subreq
;
6852 req
= tevent_req_create(mem_ctx
, &state
,
6853 struct rpccli_srvsvc_NETRDFSGETVERSION_state
);
6857 state
->out_mem_ctx
= NULL
;
6858 state
->dispatch_recv
= cli
->dispatch_recv
;
6862 /* Out parameters */
6865 ZERO_STRUCT(state
->orig
.out
.result
);
6867 /* make a temporary copy, that we pass to the dispatch function */
6868 state
->tmp
= state
->orig
;
6870 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6872 NDR_SRVSVC_NETRDFSGETVERSION
,
6874 if (tevent_req_nomem(subreq
, req
)) {
6875 return tevent_req_post(req
, ev
);
6877 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSGETVERSION_done
, req
);
6881 static void rpccli_srvsvc_NETRDFSGETVERSION_done(struct tevent_req
*subreq
)
6883 struct tevent_req
*req
= tevent_req_callback_data(
6884 subreq
, struct tevent_req
);
6885 struct rpccli_srvsvc_NETRDFSGETVERSION_state
*state
= tevent_req_data(
6886 req
, struct rpccli_srvsvc_NETRDFSGETVERSION_state
);
6888 TALLOC_CTX
*mem_ctx
;
6890 if (state
->out_mem_ctx
) {
6891 mem_ctx
= state
->out_mem_ctx
;
6896 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6897 TALLOC_FREE(subreq
);
6898 if (!NT_STATUS_IS_OK(status
)) {
6899 tevent_req_nterror(req
, status
);
6903 /* Copy out parameters */
6906 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6908 /* Reset temporary structure */
6909 ZERO_STRUCT(state
->tmp
);
6911 tevent_req_done(req
);
6914 NTSTATUS
rpccli_srvsvc_NETRDFSGETVERSION_recv(struct tevent_req
*req
,
6915 TALLOC_CTX
*mem_ctx
,
6918 struct rpccli_srvsvc_NETRDFSGETVERSION_state
*state
= tevent_req_data(
6919 req
, struct rpccli_srvsvc_NETRDFSGETVERSION_state
);
6922 if (tevent_req_is_nterror(req
, &status
)) {
6923 tevent_req_received(req
);
6927 /* Steal possbile out parameters to the callers context */
6928 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6931 *result
= state
->orig
.out
.result
;
6933 tevent_req_received(req
);
6934 return NT_STATUS_OK
;
6937 NTSTATUS
rpccli_srvsvc_NETRDFSGETVERSION(struct rpc_pipe_client
*cli
,
6938 TALLOC_CTX
*mem_ctx
,
6941 struct srvsvc_NETRDFSGETVERSION r
;
6946 status
= cli
->dispatch(cli
,
6949 NDR_SRVSVC_NETRDFSGETVERSION
,
6952 if (!NT_STATUS_IS_OK(status
)) {
6956 if (NT_STATUS_IS_ERR(status
)) {
6960 /* Return variables */
6964 *werror
= r
.out
.result
;
6967 return werror_to_ntstatus(r
.out
.result
);
6970 struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state
{
6971 struct srvsvc_NETRDFSCREATELOCALPARTITION orig
;
6972 struct srvsvc_NETRDFSCREATELOCALPARTITION tmp
;
6973 TALLOC_CTX
*out_mem_ctx
;
6974 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6977 static void rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_done(struct tevent_req
*subreq
);
6979 struct tevent_req
*rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_send(TALLOC_CTX
*mem_ctx
,
6980 struct tevent_context
*ev
,
6981 struct rpc_pipe_client
*cli
)
6983 struct tevent_req
*req
;
6984 struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state
*state
;
6985 struct tevent_req
*subreq
;
6987 req
= tevent_req_create(mem_ctx
, &state
,
6988 struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state
);
6992 state
->out_mem_ctx
= NULL
;
6993 state
->dispatch_recv
= cli
->dispatch_recv
;
6997 /* Out parameters */
7000 ZERO_STRUCT(state
->orig
.out
.result
);
7002 /* make a temporary copy, that we pass to the dispatch function */
7003 state
->tmp
= state
->orig
;
7005 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7007 NDR_SRVSVC_NETRDFSCREATELOCALPARTITION
,
7009 if (tevent_req_nomem(subreq
, req
)) {
7010 return tevent_req_post(req
, ev
);
7012 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_done
, req
);
7016 static void rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_done(struct tevent_req
*subreq
)
7018 struct tevent_req
*req
= tevent_req_callback_data(
7019 subreq
, struct tevent_req
);
7020 struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state
*state
= tevent_req_data(
7021 req
, struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state
);
7023 TALLOC_CTX
*mem_ctx
;
7025 if (state
->out_mem_ctx
) {
7026 mem_ctx
= state
->out_mem_ctx
;
7031 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7032 TALLOC_FREE(subreq
);
7033 if (!NT_STATUS_IS_OK(status
)) {
7034 tevent_req_nterror(req
, status
);
7038 /* Copy out parameters */
7041 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7043 /* Reset temporary structure */
7044 ZERO_STRUCT(state
->tmp
);
7046 tevent_req_done(req
);
7049 NTSTATUS
rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_recv(struct tevent_req
*req
,
7050 TALLOC_CTX
*mem_ctx
,
7053 struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state
*state
= tevent_req_data(
7054 req
, struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state
);
7057 if (tevent_req_is_nterror(req
, &status
)) {
7058 tevent_req_received(req
);
7062 /* Steal possbile out parameters to the callers context */
7063 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7066 *result
= state
->orig
.out
.result
;
7068 tevent_req_received(req
);
7069 return NT_STATUS_OK
;
7072 NTSTATUS
rpccli_srvsvc_NETRDFSCREATELOCALPARTITION(struct rpc_pipe_client
*cli
,
7073 TALLOC_CTX
*mem_ctx
,
7076 struct srvsvc_NETRDFSCREATELOCALPARTITION r
;
7081 status
= cli
->dispatch(cli
,
7084 NDR_SRVSVC_NETRDFSCREATELOCALPARTITION
,
7087 if (!NT_STATUS_IS_OK(status
)) {
7091 if (NT_STATUS_IS_ERR(status
)) {
7095 /* Return variables */
7099 *werror
= r
.out
.result
;
7102 return werror_to_ntstatus(r
.out
.result
);
7105 struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state
{
7106 struct srvsvc_NETRDFSDELETELOCALPARTITION orig
;
7107 struct srvsvc_NETRDFSDELETELOCALPARTITION tmp
;
7108 TALLOC_CTX
*out_mem_ctx
;
7109 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7112 static void rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_done(struct tevent_req
*subreq
);
7114 struct tevent_req
*rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_send(TALLOC_CTX
*mem_ctx
,
7115 struct tevent_context
*ev
,
7116 struct rpc_pipe_client
*cli
)
7118 struct tevent_req
*req
;
7119 struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state
*state
;
7120 struct tevent_req
*subreq
;
7122 req
= tevent_req_create(mem_ctx
, &state
,
7123 struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state
);
7127 state
->out_mem_ctx
= NULL
;
7128 state
->dispatch_recv
= cli
->dispatch_recv
;
7132 /* Out parameters */
7135 ZERO_STRUCT(state
->orig
.out
.result
);
7137 /* make a temporary copy, that we pass to the dispatch function */
7138 state
->tmp
= state
->orig
;
7140 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7142 NDR_SRVSVC_NETRDFSDELETELOCALPARTITION
,
7144 if (tevent_req_nomem(subreq
, req
)) {
7145 return tevent_req_post(req
, ev
);
7147 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_done
, req
);
7151 static void rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_done(struct tevent_req
*subreq
)
7153 struct tevent_req
*req
= tevent_req_callback_data(
7154 subreq
, struct tevent_req
);
7155 struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state
*state
= tevent_req_data(
7156 req
, struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state
);
7158 TALLOC_CTX
*mem_ctx
;
7160 if (state
->out_mem_ctx
) {
7161 mem_ctx
= state
->out_mem_ctx
;
7166 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7167 TALLOC_FREE(subreq
);
7168 if (!NT_STATUS_IS_OK(status
)) {
7169 tevent_req_nterror(req
, status
);
7173 /* Copy out parameters */
7176 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7178 /* Reset temporary structure */
7179 ZERO_STRUCT(state
->tmp
);
7181 tevent_req_done(req
);
7184 NTSTATUS
rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_recv(struct tevent_req
*req
,
7185 TALLOC_CTX
*mem_ctx
,
7188 struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state
*state
= tevent_req_data(
7189 req
, struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state
);
7192 if (tevent_req_is_nterror(req
, &status
)) {
7193 tevent_req_received(req
);
7197 /* Steal possbile out parameters to the callers context */
7198 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7201 *result
= state
->orig
.out
.result
;
7203 tevent_req_received(req
);
7204 return NT_STATUS_OK
;
7207 NTSTATUS
rpccli_srvsvc_NETRDFSDELETELOCALPARTITION(struct rpc_pipe_client
*cli
,
7208 TALLOC_CTX
*mem_ctx
,
7211 struct srvsvc_NETRDFSDELETELOCALPARTITION r
;
7216 status
= cli
->dispatch(cli
,
7219 NDR_SRVSVC_NETRDFSDELETELOCALPARTITION
,
7222 if (!NT_STATUS_IS_OK(status
)) {
7226 if (NT_STATUS_IS_ERR(status
)) {
7230 /* Return variables */
7234 *werror
= r
.out
.result
;
7237 return werror_to_ntstatus(r
.out
.result
);
7240 struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state
{
7241 struct srvsvc_NETRDFSSETLOCALVOLUMESTATE orig
;
7242 struct srvsvc_NETRDFSSETLOCALVOLUMESTATE tmp
;
7243 TALLOC_CTX
*out_mem_ctx
;
7244 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7247 static void rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_done(struct tevent_req
*subreq
);
7249 struct tevent_req
*rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_send(TALLOC_CTX
*mem_ctx
,
7250 struct tevent_context
*ev
,
7251 struct rpc_pipe_client
*cli
)
7253 struct tevent_req
*req
;
7254 struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state
*state
;
7255 struct tevent_req
*subreq
;
7257 req
= tevent_req_create(mem_ctx
, &state
,
7258 struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state
);
7262 state
->out_mem_ctx
= NULL
;
7263 state
->dispatch_recv
= cli
->dispatch_recv
;
7267 /* Out parameters */
7270 ZERO_STRUCT(state
->orig
.out
.result
);
7272 /* make a temporary copy, that we pass to the dispatch function */
7273 state
->tmp
= state
->orig
;
7275 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7277 NDR_SRVSVC_NETRDFSSETLOCALVOLUMESTATE
,
7279 if (tevent_req_nomem(subreq
, req
)) {
7280 return tevent_req_post(req
, ev
);
7282 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_done
, req
);
7286 static void rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_done(struct tevent_req
*subreq
)
7288 struct tevent_req
*req
= tevent_req_callback_data(
7289 subreq
, struct tevent_req
);
7290 struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state
*state
= tevent_req_data(
7291 req
, struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state
);
7293 TALLOC_CTX
*mem_ctx
;
7295 if (state
->out_mem_ctx
) {
7296 mem_ctx
= state
->out_mem_ctx
;
7301 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7302 TALLOC_FREE(subreq
);
7303 if (!NT_STATUS_IS_OK(status
)) {
7304 tevent_req_nterror(req
, status
);
7308 /* Copy out parameters */
7311 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7313 /* Reset temporary structure */
7314 ZERO_STRUCT(state
->tmp
);
7316 tevent_req_done(req
);
7319 NTSTATUS
rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_recv(struct tevent_req
*req
,
7320 TALLOC_CTX
*mem_ctx
,
7323 struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state
*state
= tevent_req_data(
7324 req
, struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state
);
7327 if (tevent_req_is_nterror(req
, &status
)) {
7328 tevent_req_received(req
);
7332 /* Steal possbile out parameters to the callers context */
7333 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7336 *result
= state
->orig
.out
.result
;
7338 tevent_req_received(req
);
7339 return NT_STATUS_OK
;
7342 NTSTATUS
rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct rpc_pipe_client
*cli
,
7343 TALLOC_CTX
*mem_ctx
,
7346 struct srvsvc_NETRDFSSETLOCALVOLUMESTATE r
;
7351 status
= cli
->dispatch(cli
,
7354 NDR_SRVSVC_NETRDFSSETLOCALVOLUMESTATE
,
7357 if (!NT_STATUS_IS_OK(status
)) {
7361 if (NT_STATUS_IS_ERR(status
)) {
7365 /* Return variables */
7369 *werror
= r
.out
.result
;
7372 return werror_to_ntstatus(r
.out
.result
);
7375 struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state
{
7376 struct srvsvc_NETRDFSSETSERVERINFO orig
;
7377 struct srvsvc_NETRDFSSETSERVERINFO tmp
;
7378 TALLOC_CTX
*out_mem_ctx
;
7379 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7382 static void rpccli_srvsvc_NETRDFSSETSERVERINFO_done(struct tevent_req
*subreq
);
7384 struct tevent_req
*rpccli_srvsvc_NETRDFSSETSERVERINFO_send(TALLOC_CTX
*mem_ctx
,
7385 struct tevent_context
*ev
,
7386 struct rpc_pipe_client
*cli
)
7388 struct tevent_req
*req
;
7389 struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state
*state
;
7390 struct tevent_req
*subreq
;
7392 req
= tevent_req_create(mem_ctx
, &state
,
7393 struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state
);
7397 state
->out_mem_ctx
= NULL
;
7398 state
->dispatch_recv
= cli
->dispatch_recv
;
7402 /* Out parameters */
7405 ZERO_STRUCT(state
->orig
.out
.result
);
7407 /* make a temporary copy, that we pass to the dispatch function */
7408 state
->tmp
= state
->orig
;
7410 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7412 NDR_SRVSVC_NETRDFSSETSERVERINFO
,
7414 if (tevent_req_nomem(subreq
, req
)) {
7415 return tevent_req_post(req
, ev
);
7417 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSSETSERVERINFO_done
, req
);
7421 static void rpccli_srvsvc_NETRDFSSETSERVERINFO_done(struct tevent_req
*subreq
)
7423 struct tevent_req
*req
= tevent_req_callback_data(
7424 subreq
, struct tevent_req
);
7425 struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state
*state
= tevent_req_data(
7426 req
, struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state
);
7428 TALLOC_CTX
*mem_ctx
;
7430 if (state
->out_mem_ctx
) {
7431 mem_ctx
= state
->out_mem_ctx
;
7436 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7437 TALLOC_FREE(subreq
);
7438 if (!NT_STATUS_IS_OK(status
)) {
7439 tevent_req_nterror(req
, status
);
7443 /* Copy out parameters */
7446 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7448 /* Reset temporary structure */
7449 ZERO_STRUCT(state
->tmp
);
7451 tevent_req_done(req
);
7454 NTSTATUS
rpccli_srvsvc_NETRDFSSETSERVERINFO_recv(struct tevent_req
*req
,
7455 TALLOC_CTX
*mem_ctx
,
7458 struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state
*state
= tevent_req_data(
7459 req
, struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state
);
7462 if (tevent_req_is_nterror(req
, &status
)) {
7463 tevent_req_received(req
);
7467 /* Steal possbile out parameters to the callers context */
7468 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7471 *result
= state
->orig
.out
.result
;
7473 tevent_req_received(req
);
7474 return NT_STATUS_OK
;
7477 NTSTATUS
rpccli_srvsvc_NETRDFSSETSERVERINFO(struct rpc_pipe_client
*cli
,
7478 TALLOC_CTX
*mem_ctx
,
7481 struct srvsvc_NETRDFSSETSERVERINFO r
;
7486 status
= cli
->dispatch(cli
,
7489 NDR_SRVSVC_NETRDFSSETSERVERINFO
,
7492 if (!NT_STATUS_IS_OK(status
)) {
7496 if (NT_STATUS_IS_ERR(status
)) {
7500 /* Return variables */
7504 *werror
= r
.out
.result
;
7507 return werror_to_ntstatus(r
.out
.result
);
7510 struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state
{
7511 struct srvsvc_NETRDFSCREATEEXITPOINT orig
;
7512 struct srvsvc_NETRDFSCREATEEXITPOINT tmp
;
7513 TALLOC_CTX
*out_mem_ctx
;
7514 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7517 static void rpccli_srvsvc_NETRDFSCREATEEXITPOINT_done(struct tevent_req
*subreq
);
7519 struct tevent_req
*rpccli_srvsvc_NETRDFSCREATEEXITPOINT_send(TALLOC_CTX
*mem_ctx
,
7520 struct tevent_context
*ev
,
7521 struct rpc_pipe_client
*cli
)
7523 struct tevent_req
*req
;
7524 struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state
*state
;
7525 struct tevent_req
*subreq
;
7527 req
= tevent_req_create(mem_ctx
, &state
,
7528 struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state
);
7532 state
->out_mem_ctx
= NULL
;
7533 state
->dispatch_recv
= cli
->dispatch_recv
;
7537 /* Out parameters */
7540 ZERO_STRUCT(state
->orig
.out
.result
);
7542 /* make a temporary copy, that we pass to the dispatch function */
7543 state
->tmp
= state
->orig
;
7545 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7547 NDR_SRVSVC_NETRDFSCREATEEXITPOINT
,
7549 if (tevent_req_nomem(subreq
, req
)) {
7550 return tevent_req_post(req
, ev
);
7552 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSCREATEEXITPOINT_done
, req
);
7556 static void rpccli_srvsvc_NETRDFSCREATEEXITPOINT_done(struct tevent_req
*subreq
)
7558 struct tevent_req
*req
= tevent_req_callback_data(
7559 subreq
, struct tevent_req
);
7560 struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state
*state
= tevent_req_data(
7561 req
, struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state
);
7563 TALLOC_CTX
*mem_ctx
;
7565 if (state
->out_mem_ctx
) {
7566 mem_ctx
= state
->out_mem_ctx
;
7571 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7572 TALLOC_FREE(subreq
);
7573 if (!NT_STATUS_IS_OK(status
)) {
7574 tevent_req_nterror(req
, status
);
7578 /* Copy out parameters */
7581 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7583 /* Reset temporary structure */
7584 ZERO_STRUCT(state
->tmp
);
7586 tevent_req_done(req
);
7589 NTSTATUS
rpccli_srvsvc_NETRDFSCREATEEXITPOINT_recv(struct tevent_req
*req
,
7590 TALLOC_CTX
*mem_ctx
,
7593 struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state
*state
= tevent_req_data(
7594 req
, struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state
);
7597 if (tevent_req_is_nterror(req
, &status
)) {
7598 tevent_req_received(req
);
7602 /* Steal possbile out parameters to the callers context */
7603 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7606 *result
= state
->orig
.out
.result
;
7608 tevent_req_received(req
);
7609 return NT_STATUS_OK
;
7612 NTSTATUS
rpccli_srvsvc_NETRDFSCREATEEXITPOINT(struct rpc_pipe_client
*cli
,
7613 TALLOC_CTX
*mem_ctx
,
7616 struct srvsvc_NETRDFSCREATEEXITPOINT r
;
7621 status
= cli
->dispatch(cli
,
7624 NDR_SRVSVC_NETRDFSCREATEEXITPOINT
,
7627 if (!NT_STATUS_IS_OK(status
)) {
7631 if (NT_STATUS_IS_ERR(status
)) {
7635 /* Return variables */
7639 *werror
= r
.out
.result
;
7642 return werror_to_ntstatus(r
.out
.result
);
7645 struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state
{
7646 struct srvsvc_NETRDFSDELETEEXITPOINT orig
;
7647 struct srvsvc_NETRDFSDELETEEXITPOINT tmp
;
7648 TALLOC_CTX
*out_mem_ctx
;
7649 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7652 static void rpccli_srvsvc_NETRDFSDELETEEXITPOINT_done(struct tevent_req
*subreq
);
7654 struct tevent_req
*rpccli_srvsvc_NETRDFSDELETEEXITPOINT_send(TALLOC_CTX
*mem_ctx
,
7655 struct tevent_context
*ev
,
7656 struct rpc_pipe_client
*cli
)
7658 struct tevent_req
*req
;
7659 struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state
*state
;
7660 struct tevent_req
*subreq
;
7662 req
= tevent_req_create(mem_ctx
, &state
,
7663 struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state
);
7667 state
->out_mem_ctx
= NULL
;
7668 state
->dispatch_recv
= cli
->dispatch_recv
;
7672 /* Out parameters */
7675 ZERO_STRUCT(state
->orig
.out
.result
);
7677 /* make a temporary copy, that we pass to the dispatch function */
7678 state
->tmp
= state
->orig
;
7680 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7682 NDR_SRVSVC_NETRDFSDELETEEXITPOINT
,
7684 if (tevent_req_nomem(subreq
, req
)) {
7685 return tevent_req_post(req
, ev
);
7687 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSDELETEEXITPOINT_done
, req
);
7691 static void rpccli_srvsvc_NETRDFSDELETEEXITPOINT_done(struct tevent_req
*subreq
)
7693 struct tevent_req
*req
= tevent_req_callback_data(
7694 subreq
, struct tevent_req
);
7695 struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state
*state
= tevent_req_data(
7696 req
, struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state
);
7698 TALLOC_CTX
*mem_ctx
;
7700 if (state
->out_mem_ctx
) {
7701 mem_ctx
= state
->out_mem_ctx
;
7706 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7707 TALLOC_FREE(subreq
);
7708 if (!NT_STATUS_IS_OK(status
)) {
7709 tevent_req_nterror(req
, status
);
7713 /* Copy out parameters */
7716 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7718 /* Reset temporary structure */
7719 ZERO_STRUCT(state
->tmp
);
7721 tevent_req_done(req
);
7724 NTSTATUS
rpccli_srvsvc_NETRDFSDELETEEXITPOINT_recv(struct tevent_req
*req
,
7725 TALLOC_CTX
*mem_ctx
,
7728 struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state
*state
= tevent_req_data(
7729 req
, struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state
);
7732 if (tevent_req_is_nterror(req
, &status
)) {
7733 tevent_req_received(req
);
7737 /* Steal possbile out parameters to the callers context */
7738 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7741 *result
= state
->orig
.out
.result
;
7743 tevent_req_received(req
);
7744 return NT_STATUS_OK
;
7747 NTSTATUS
rpccli_srvsvc_NETRDFSDELETEEXITPOINT(struct rpc_pipe_client
*cli
,
7748 TALLOC_CTX
*mem_ctx
,
7751 struct srvsvc_NETRDFSDELETEEXITPOINT r
;
7756 status
= cli
->dispatch(cli
,
7759 NDR_SRVSVC_NETRDFSDELETEEXITPOINT
,
7762 if (!NT_STATUS_IS_OK(status
)) {
7766 if (NT_STATUS_IS_ERR(status
)) {
7770 /* Return variables */
7774 *werror
= r
.out
.result
;
7777 return werror_to_ntstatus(r
.out
.result
);
7780 struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state
{
7781 struct srvsvc_NETRDFSMODIFYPREFIX orig
;
7782 struct srvsvc_NETRDFSMODIFYPREFIX tmp
;
7783 TALLOC_CTX
*out_mem_ctx
;
7784 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7787 static void rpccli_srvsvc_NETRDFSMODIFYPREFIX_done(struct tevent_req
*subreq
);
7789 struct tevent_req
*rpccli_srvsvc_NETRDFSMODIFYPREFIX_send(TALLOC_CTX
*mem_ctx
,
7790 struct tevent_context
*ev
,
7791 struct rpc_pipe_client
*cli
)
7793 struct tevent_req
*req
;
7794 struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state
*state
;
7795 struct tevent_req
*subreq
;
7797 req
= tevent_req_create(mem_ctx
, &state
,
7798 struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state
);
7802 state
->out_mem_ctx
= NULL
;
7803 state
->dispatch_recv
= cli
->dispatch_recv
;
7807 /* Out parameters */
7810 ZERO_STRUCT(state
->orig
.out
.result
);
7812 /* make a temporary copy, that we pass to the dispatch function */
7813 state
->tmp
= state
->orig
;
7815 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7817 NDR_SRVSVC_NETRDFSMODIFYPREFIX
,
7819 if (tevent_req_nomem(subreq
, req
)) {
7820 return tevent_req_post(req
, ev
);
7822 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSMODIFYPREFIX_done
, req
);
7826 static void rpccli_srvsvc_NETRDFSMODIFYPREFIX_done(struct tevent_req
*subreq
)
7828 struct tevent_req
*req
= tevent_req_callback_data(
7829 subreq
, struct tevent_req
);
7830 struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state
*state
= tevent_req_data(
7831 req
, struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state
);
7833 TALLOC_CTX
*mem_ctx
;
7835 if (state
->out_mem_ctx
) {
7836 mem_ctx
= state
->out_mem_ctx
;
7841 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7842 TALLOC_FREE(subreq
);
7843 if (!NT_STATUS_IS_OK(status
)) {
7844 tevent_req_nterror(req
, status
);
7848 /* Copy out parameters */
7851 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7853 /* Reset temporary structure */
7854 ZERO_STRUCT(state
->tmp
);
7856 tevent_req_done(req
);
7859 NTSTATUS
rpccli_srvsvc_NETRDFSMODIFYPREFIX_recv(struct tevent_req
*req
,
7860 TALLOC_CTX
*mem_ctx
,
7863 struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state
*state
= tevent_req_data(
7864 req
, struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state
);
7867 if (tevent_req_is_nterror(req
, &status
)) {
7868 tevent_req_received(req
);
7872 /* Steal possbile out parameters to the callers context */
7873 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7876 *result
= state
->orig
.out
.result
;
7878 tevent_req_received(req
);
7879 return NT_STATUS_OK
;
7882 NTSTATUS
rpccli_srvsvc_NETRDFSMODIFYPREFIX(struct rpc_pipe_client
*cli
,
7883 TALLOC_CTX
*mem_ctx
,
7886 struct srvsvc_NETRDFSMODIFYPREFIX r
;
7891 status
= cli
->dispatch(cli
,
7894 NDR_SRVSVC_NETRDFSMODIFYPREFIX
,
7897 if (!NT_STATUS_IS_OK(status
)) {
7901 if (NT_STATUS_IS_ERR(status
)) {
7905 /* Return variables */
7909 *werror
= r
.out
.result
;
7912 return werror_to_ntstatus(r
.out
.result
);
7915 struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state
{
7916 struct srvsvc_NETRDFSFIXLOCALVOLUME orig
;
7917 struct srvsvc_NETRDFSFIXLOCALVOLUME tmp
;
7918 TALLOC_CTX
*out_mem_ctx
;
7919 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7922 static void rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_done(struct tevent_req
*subreq
);
7924 struct tevent_req
*rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_send(TALLOC_CTX
*mem_ctx
,
7925 struct tevent_context
*ev
,
7926 struct rpc_pipe_client
*cli
)
7928 struct tevent_req
*req
;
7929 struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state
*state
;
7930 struct tevent_req
*subreq
;
7932 req
= tevent_req_create(mem_ctx
, &state
,
7933 struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state
);
7937 state
->out_mem_ctx
= NULL
;
7938 state
->dispatch_recv
= cli
->dispatch_recv
;
7942 /* Out parameters */
7945 ZERO_STRUCT(state
->orig
.out
.result
);
7947 /* make a temporary copy, that we pass to the dispatch function */
7948 state
->tmp
= state
->orig
;
7950 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7952 NDR_SRVSVC_NETRDFSFIXLOCALVOLUME
,
7954 if (tevent_req_nomem(subreq
, req
)) {
7955 return tevent_req_post(req
, ev
);
7957 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_done
, req
);
7961 static void rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_done(struct tevent_req
*subreq
)
7963 struct tevent_req
*req
= tevent_req_callback_data(
7964 subreq
, struct tevent_req
);
7965 struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state
*state
= tevent_req_data(
7966 req
, struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state
);
7968 TALLOC_CTX
*mem_ctx
;
7970 if (state
->out_mem_ctx
) {
7971 mem_ctx
= state
->out_mem_ctx
;
7976 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7977 TALLOC_FREE(subreq
);
7978 if (!NT_STATUS_IS_OK(status
)) {
7979 tevent_req_nterror(req
, status
);
7983 /* Copy out parameters */
7986 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7988 /* Reset temporary structure */
7989 ZERO_STRUCT(state
->tmp
);
7991 tevent_req_done(req
);
7994 NTSTATUS
rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_recv(struct tevent_req
*req
,
7995 TALLOC_CTX
*mem_ctx
,
7998 struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state
*state
= tevent_req_data(
7999 req
, struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state
);
8002 if (tevent_req_is_nterror(req
, &status
)) {
8003 tevent_req_received(req
);
8007 /* Steal possbile out parameters to the callers context */
8008 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8011 *result
= state
->orig
.out
.result
;
8013 tevent_req_received(req
);
8014 return NT_STATUS_OK
;
8017 NTSTATUS
rpccli_srvsvc_NETRDFSFIXLOCALVOLUME(struct rpc_pipe_client
*cli
,
8018 TALLOC_CTX
*mem_ctx
,
8021 struct srvsvc_NETRDFSFIXLOCALVOLUME r
;
8026 status
= cli
->dispatch(cli
,
8029 NDR_SRVSVC_NETRDFSFIXLOCALVOLUME
,
8032 if (!NT_STATUS_IS_OK(status
)) {
8036 if (NT_STATUS_IS_ERR(status
)) {
8040 /* Return variables */
8044 *werror
= r
.out
.result
;
8047 return werror_to_ntstatus(r
.out
.result
);
8050 struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state
{
8051 struct srvsvc_NETRDFSMANAGERREPORTSITEINFO orig
;
8052 struct srvsvc_NETRDFSMANAGERREPORTSITEINFO tmp
;
8053 TALLOC_CTX
*out_mem_ctx
;
8054 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8057 static void rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_done(struct tevent_req
*subreq
);
8059 struct tevent_req
*rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_send(TALLOC_CTX
*mem_ctx
,
8060 struct tevent_context
*ev
,
8061 struct rpc_pipe_client
*cli
)
8063 struct tevent_req
*req
;
8064 struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state
*state
;
8065 struct tevent_req
*subreq
;
8067 req
= tevent_req_create(mem_ctx
, &state
,
8068 struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state
);
8072 state
->out_mem_ctx
= NULL
;
8073 state
->dispatch_recv
= cli
->dispatch_recv
;
8077 /* Out parameters */
8080 ZERO_STRUCT(state
->orig
.out
.result
);
8082 /* make a temporary copy, that we pass to the dispatch function */
8083 state
->tmp
= state
->orig
;
8085 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8087 NDR_SRVSVC_NETRDFSMANAGERREPORTSITEINFO
,
8089 if (tevent_req_nomem(subreq
, req
)) {
8090 return tevent_req_post(req
, ev
);
8092 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_done
, req
);
8096 static void rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_done(struct tevent_req
*subreq
)
8098 struct tevent_req
*req
= tevent_req_callback_data(
8099 subreq
, struct tevent_req
);
8100 struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state
*state
= tevent_req_data(
8101 req
, struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state
);
8103 TALLOC_CTX
*mem_ctx
;
8105 if (state
->out_mem_ctx
) {
8106 mem_ctx
= state
->out_mem_ctx
;
8111 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8112 TALLOC_FREE(subreq
);
8113 if (!NT_STATUS_IS_OK(status
)) {
8114 tevent_req_nterror(req
, status
);
8118 /* Copy out parameters */
8121 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8123 /* Reset temporary structure */
8124 ZERO_STRUCT(state
->tmp
);
8126 tevent_req_done(req
);
8129 NTSTATUS
rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_recv(struct tevent_req
*req
,
8130 TALLOC_CTX
*mem_ctx
,
8133 struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state
*state
= tevent_req_data(
8134 req
, struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state
);
8137 if (tevent_req_is_nterror(req
, &status
)) {
8138 tevent_req_received(req
);
8142 /* Steal possbile out parameters to the callers context */
8143 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8146 *result
= state
->orig
.out
.result
;
8148 tevent_req_received(req
);
8149 return NT_STATUS_OK
;
8152 NTSTATUS
rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct rpc_pipe_client
*cli
,
8153 TALLOC_CTX
*mem_ctx
,
8156 struct srvsvc_NETRDFSMANAGERREPORTSITEINFO r
;
8161 status
= cli
->dispatch(cli
,
8164 NDR_SRVSVC_NETRDFSMANAGERREPORTSITEINFO
,
8167 if (!NT_STATUS_IS_OK(status
)) {
8171 if (NT_STATUS_IS_ERR(status
)) {
8175 /* Return variables */
8179 *werror
= r
.out
.result
;
8182 return werror_to_ntstatus(r
.out
.result
);
8185 struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state
{
8186 struct srvsvc_NETRSERVERTRANSPORTDELEX orig
;
8187 struct srvsvc_NETRSERVERTRANSPORTDELEX tmp
;
8188 TALLOC_CTX
*out_mem_ctx
;
8189 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8192 static void rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_done(struct tevent_req
*subreq
);
8194 struct tevent_req
*rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_send(TALLOC_CTX
*mem_ctx
,
8195 struct tevent_context
*ev
,
8196 struct rpc_pipe_client
*cli
)
8198 struct tevent_req
*req
;
8199 struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state
*state
;
8200 struct tevent_req
*subreq
;
8202 req
= tevent_req_create(mem_ctx
, &state
,
8203 struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state
);
8207 state
->out_mem_ctx
= NULL
;
8208 state
->dispatch_recv
= cli
->dispatch_recv
;
8212 /* Out parameters */
8215 ZERO_STRUCT(state
->orig
.out
.result
);
8217 /* make a temporary copy, that we pass to the dispatch function */
8218 state
->tmp
= state
->orig
;
8220 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8222 NDR_SRVSVC_NETRSERVERTRANSPORTDELEX
,
8224 if (tevent_req_nomem(subreq
, req
)) {
8225 return tevent_req_post(req
, ev
);
8227 tevent_req_set_callback(subreq
, rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_done
, req
);
8231 static void rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_done(struct tevent_req
*subreq
)
8233 struct tevent_req
*req
= tevent_req_callback_data(
8234 subreq
, struct tevent_req
);
8235 struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state
*state
= tevent_req_data(
8236 req
, struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state
);
8238 TALLOC_CTX
*mem_ctx
;
8240 if (state
->out_mem_ctx
) {
8241 mem_ctx
= state
->out_mem_ctx
;
8246 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8247 TALLOC_FREE(subreq
);
8248 if (!NT_STATUS_IS_OK(status
)) {
8249 tevent_req_nterror(req
, status
);
8253 /* Copy out parameters */
8256 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8258 /* Reset temporary structure */
8259 ZERO_STRUCT(state
->tmp
);
8261 tevent_req_done(req
);
8264 NTSTATUS
rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_recv(struct tevent_req
*req
,
8265 TALLOC_CTX
*mem_ctx
,
8268 struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state
*state
= tevent_req_data(
8269 req
, struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state
);
8272 if (tevent_req_is_nterror(req
, &status
)) {
8273 tevent_req_received(req
);
8277 /* Steal possbile out parameters to the callers context */
8278 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8281 *result
= state
->orig
.out
.result
;
8283 tevent_req_received(req
);
8284 return NT_STATUS_OK
;
8287 NTSTATUS
rpccli_srvsvc_NETRSERVERTRANSPORTDELEX(struct rpc_pipe_client
*cli
,
8288 TALLOC_CTX
*mem_ctx
,
8291 struct srvsvc_NETRSERVERTRANSPORTDELEX r
;
8296 status
= cli
->dispatch(cli
,
8299 NDR_SRVSVC_NETRSERVERTRANSPORTDELEX
,
8302 if (!NT_STATUS_IS_OK(status
)) {
8306 if (NT_STATUS_IS_ERR(status
)) {
8310 /* Return variables */
8314 *werror
= r
.out
.result
;
8317 return werror_to_ntstatus(r
.out
.result
);